RESOLVED FIXED174145
We resolve one extra element's style when calling getComputedStyle on a display: none subtree, I think
https://bugs.webkit.org/show_bug.cgi?id=174145
Summary We resolve one extra element's style when calling getComputedStyle on a displ...
Emilio Cobos Álvarez
Reported 2017-07-04 20:45:06 PDT
Noticed this while trying to construct a test-case for bug 172753. In Element::resolveComputedStyle: elementsRequiringComputedStyle.prepend(&ancestor); if (auto* existingStyle = ancestor.existingComputedStyle()) { computedStyle = existingStyle; break; } I think that we resolve style when not needed for that ancestor we find an existing computed style for... Also, I think, that we resolve the first element inheriting from itself, which seems wrong (though I don't think it's observable, fwiw)... Will post a patch here to run through CI, and will update for review when needed.
Attachments
Patch (1.76 KB, patch)
2017-07-04 20:49 PDT, Emilio Cobos Álvarez
no flags
Emilio Cobos Álvarez
Comment 1 2017-07-04 20:49:57 PDT
Antti Koivisto
Comment 2 2017-07-05 10:34:40 PDT
Nice find, r=me
WebKit Commit Bot
Comment 3 2017-07-05 11:01:48 PDT
Comment on attachment 314594 [details] Patch Clearing flags on attachment: 314594 Committed r219138: <http://trac.webkit.org/changeset/219138>
WebKit Commit Bot
Comment 4 2017-07-05 11:01:50 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.