[webkit-reviews] review granted: [Bug 108404] Default element styles are not always collected for sharing detection : [Attachment 185883] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Feb 2 18:03:51 PST 2013


Antti Koivisto <koivisto at iki.fi> has granted Dean Jackson <dino at apple.com>'s
request for review:
Bug 108404: Default element styles are not always collected for sharing
detection
https://bugs.webkit.org/show_bug.cgi?id=108404

Attachment 185883: Patch
https://bugs.webkit.org/attachment.cgi?id=185883&action=review

------- Additional Comments from Antti Koivisto <koivisto at iki.fi>
View in context: https://bugs.webkit.org/attachment.cgi?id=185883&action=review


Good find! A test would be cool though I realize it may be difficult.

> Source/WebCore/ChangeLog:12
> +
> +	   This is a fairly obscure case that is difficult to reproduce. It
most
> +	   often appeared when styling siblings in a complex shadow tree. The
problem
> +	   was that ensureDefaultStyleSheetsForElement could add rules to the
> +	   defaultStyle, but that was not collected into the StyleResolver,
which
> +	   uses the rules to detect if it should not share styles.

As mentioned, this needs to be updated the describe the actual problem.

> Source/WebCore/css/StyleResolver.cpp:558
> -static void ensureDefaultStyleSheetsForElement(Element* element)
> +static bool ensureDefaultStyleSheetsForElement(Element* element)

I think you should use a bool& argument instead of a return value. Currently it
is rather mysterious in the call site what the return value means. Then you can
use a sensibly named variable.


More information about the webkit-reviews mailing list