Summary: | Support dynamic pseudo-classes on elements with display: contents | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Pavel Klimashkin <klimashkin> | ||||||||||
Component: | CSS | Assignee: | Nobody <webkit-unassigned> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | as.avramenko, cdumez, commit-queue, dino, ews-watchlist, koivisto, rego, rniwa, simon.fraser, webkit-bug-importer, zalan | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | Safari Technology Preview | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=181680 | ||||||||||||
Attachments: |
|
Description
Pavel Klimashkin
2018-01-14 15:56:25 PST
:hover and :active The bug here is that hover/active style doesn't get invalidated on display:contents elements. Created attachment 332029 [details]
patch
Comment on attachment 332029 [details] patch Attachment 332029 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/6182997 New failing tests: fast/css/display-contents-hover-active.html Created attachment 332031 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2
The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.6
Created attachment 332062 [details]
patch
Hi from 08.11.2018. This bug is still not fixed. Demo: http://jsfiddle.net/6208eox5/ Safari version: 11.1.2 build 13605.3.8 Antti, is this patch still valid? Not sure why we ended up not landing this patch. (In reply to Ryosuke Niwa from comment #9) > Antti, is this patch still valid? Not sure why we ended up not landing this > patch. The patch is valid, feel free to review. It was slightly risky to land at that point due to switch to DOM based traversal and then got forgotten. Also I got sidetracked to 181680, :active was broken in general. Created attachment 354330 [details]
rebased patch
Comment on attachment 354330 [details] rebased patch View in context: https://bugs.webkit.org/attachment.cgi?id=354330&action=review > Source/WebCore/dom/Element.cpp:2920 > + if (!hasRareData()) > + return nullptr; > + auto* style = elementRareData()->computedStyle(); > + if (style && style->display() == DisplayType::Contents) Could you have if (!hasRareData() || !hasDisplayContents()) return nullptr; return elementRareData()->computedStyle(); Either way is fine with me. > Could you have
>
> if (!hasRareData() || !hasDisplayContents())
> return nullptr;
>
> return elementRareData()->computedStyle();
>
> Either way is fine with me.
This is slightly more efficient (in principle, meaningless in practice) since hasDisplayContents() needs to fetch the computed style from rare data too.
Comment on attachment 354330 [details] rebased patch Clearing flags on attachment: 354330 Committed r238097: <https://trac.webkit.org/changeset/238097> All reviewed patches have been landed. Closing bug. Thanks! In what release that patch will probably land? (In reply to Pavel Klimashkin from comment #16) > Thanks! In what release that patch will probably land? Unfortunately, Apple does not comment on future produce release plans so we can't say. But you can usually see up-coming fixes & features in Safari Technology Preview way before it gets released to public: https://developer.apple.com/safari/technology-preview/ |