[webkit-help] Disabling rendering changes processing behavior in WebCore

Ryosuke Niwa rniwa at webkit.org
Tue Jan 3 16:11:28 PST 2012

The last time I checked, renderers were required to load some resources so
you can't just stop generating renderers. Also, if JavaScript queries
values that depends on layout (e.g. offsetWidth), then that also requires
renderers. Given that JavaScript can behave differently depending on such
values, I don't think obtaining the identical DOM without creating renderer
is possible.

- Ryosuke

On Tue, Jan 3, 2012 at 4:05 PM, wkdev911 <wkdev911 at gmail.com> wrote:

> Hi,
> I am currently fighting with a problem that disabling rendering in WebKit
> may change the final content of a web page.
> All I need is the final HTML after JS is executed (main page plus any
> secondary frames/iframes), so I thought that disabling creation of
> renderers may be a valid way to improve performance a little bit.
> So, I am using an option in Document class
> (WebKit\Source\WebCore\dom\Document.h) to disable renderers:
> Document::setShouldCreateRenderers(false).
> When comparing output HTML for the cases when renderers are enabled and
> when disabled, I see that in certain rare cases disabling rendering also
> causes some frames being missed. This looks like the main frame is missing,
> but a secondary frame become the main frame (i.e. the pointer to the
> secondary frame is returned instead of the pointer to the main frame, when
> the top level IWebFrame object is asked for IDOMHTMLDocument). As a
> result if we dump DOM in HTML, we get only partial content and without the
> main frame.
> Have anyone faced such problem before? Any suggestions how to fix this are
> appreciated.
> -Luc
> P.S. I don't this this is port-specific but just in case I am using
> WinCairo port.
> _______________________________________________
> webkit-help mailing list
> webkit-help at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20120103/ceda3335/attachment.html>

More information about the webkit-help mailing list