On Fri, Jan 13, 2012 at 10:32:02AM +0100, Andreas Pakulat wrote: > Maybe I didn't read your code close enough, but it merely looked like a > case where different page-contents influence a given attribute in > different ways. So the code tries to determine which attribute is best > used for height. This is not uncommon in browsers, layouting HTML is a > hard business due to varying rules and missing definitions. So it might > just be that the contentsSize property does not map to the > body.offsetHeight but uses some other property which is not set > correctly in some webpages.
The difficulty of laying out HTML is irrelevant. Whatever that difficulty, WebKit uses a single algorithm for laying out a given set of HTML. In other words if you layout the same HTML n times, you will deterministically get the same result n times. So for what you're saying to make sense, the C++ API would need to query the layout engine in a different way than the javascript engine, to get the same layout information. Which in turn means that they have different memory models of the rendered document. Which is what James' example also appears to be suffering from. Anyway, I claim that you will find disconnects between the javascript API and the C++ API a lot in Qt WebKit, make of that claim whatever you want. Kovid. -- _____________________________________ Dr. Kovid Goyal http://www.kovidgoyal.net http://calibre-ebook.com _____________________________________
signature.asc
Description: Digital signature
_______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt