[webkit-reviews] review granted: [Bug 172753] Don't always do a style recalc for display: contents elements. : [Attachment 313198] Proposed patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Jun 18 00:44:40 PDT 2017
Antti Koivisto <koivisto at iki.fi> has granted Emilio Cobos Álvarez
<ecobos at igalia.com>'s request for review:
Bug 172753: Don't always do a style recalc for display: contents elements.
https://bugs.webkit.org/show_bug.cgi?id=172753
Attachment 313198: Proposed patch
https://bugs.webkit.org/attachment.cgi?id=313198&action=review
--- Comment #28 from Antti Koivisto <koivisto at iki.fi> ---
Comment on attachment 313198
--> https://bugs.webkit.org/attachment.cgi?id=313198
Proposed patch
View in context: https://bugs.webkit.org/attachment.cgi?id=313198&action=review
r=me but a test against the regressed case would be cool. You can use
internals.lastStyleUpdateSize or add a new testing interface if that is not
good for this.
> Source/WebCore/style/StyleTreeResolver.cpp:175
> + if (auto* cachedStyle = element.existingComputedStyle())
> + return cachedStyle->display() == CONTENTS ? cachedStyle : nullptr;
You could make this read bit better as
if (element.hasDisplayContents())
return element.existingComputedStyle();
More information about the webkit-reviews
mailing list