RESOLVED FIXED 178584
Support ::before/::after pseudo elements with display:contents
https://bugs.webkit.org/show_bug.cgi?id=178584
Summary Support ::before/::after pseudo elements with display:contents
Antti Koivisto
Reported 2017-10-20 07:41:27 PDT
::before { display:contents; content:'foo' }
Attachments
patch (11.59 KB, patch)
2017-10-20 07:55 PDT, Antti Koivisto
buildbot: commit-queue-
Archive of layout-test-results from ews100 for mac-elcapitan (1.32 MB, application/zip)
2017-10-20 08:44 PDT, Build Bot
no flags
Archive of layout-test-results from ews125 for ios-simulator-wk2 (7.77 MB, application/zip)
2017-10-20 09:13 PDT, Build Bot
no flags
Archive of layout-test-results from ews115 for mac-elcapitan (2.03 MB, application/zip)
2017-10-20 09:36 PDT, Build Bot
no flags
patch (11.66 KB, patch)
2017-10-20 12:20 PDT, Antti Koivisto
rniwa: review+
patch (12.41 KB, patch)
2017-10-21 00:40 PDT, Antti Koivisto
no flags
Antti Koivisto
Comment 1 2017-10-20 07:55:39 PDT
Build Bot
Comment 2 2017-10-20 08:44:29 PDT
Comment on attachment 324398 [details] patch Attachment 324398 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/4933455 New failing tests: svg/custom/assert-empty-layout-attributes.svg svg/text/svg-rtl-text-crash.html svg/custom/crash-textPath-attributes.html
Build Bot
Comment 3 2017-10-20 08:44:30 PDT
Created attachment 324403 [details] Archive of layout-test-results from ews100 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 4 2017-10-20 09:13:38 PDT
Comment on attachment 324398 [details] patch Attachment 324398 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/4933517 New failing tests: svg/custom/assert-empty-layout-attributes.svg svg/text/svg-rtl-text-crash.html svg/custom/crash-textPath-attributes.html
Build Bot
Comment 5 2017-10-20 09:13:40 PDT
Created attachment 324405 [details] Archive of layout-test-results from ews125 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews125 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.6
Build Bot
Comment 6 2017-10-20 09:36:00 PDT
Comment on attachment 324398 [details] patch Attachment 324398 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/4933658 New failing tests: svg/custom/assert-empty-layout-attributes.svg svg/text/svg-rtl-text-crash.html svg/custom/crash-textPath-attributes.html
Build Bot
Comment 7 2017-10-20 09:36:01 PDT
Created attachment 324408 [details] Archive of layout-test-results from ews115 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews115 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Antti Koivisto
Comment 8 2017-10-20 12:20:29 PDT
Ryosuke Niwa
Comment 9 2017-10-20 15:35:49 PDT
Comment on attachment 324426 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=324426&action=review > Source/WebCore/style/RenderTreeUpdaterGeneratedContent.cpp:117 > + removeAndDestroyContentRenderers(*pseudoElement); > + Could you clarify why this code change is needed in the change log? > Source/WebCore/style/RenderTreeUpdaterGeneratedContent.cpp:156 > + if (pseudoElementRenderer) > + renderTreePosition.moveToLastChild(); > + else > + renderTreePosition.computeNextSibling(*pseudoElement); Could you also describe why code to move to the next sibling is needed in the change log?
Antti Koivisto
Comment 10 2017-10-21 00:38:00 PDT
Added this: (WebCore::RenderTreeUpdater::GeneratedContent::updatePseudoElement): In the normal case create a render tree position for the pseudo element renderer and use RenderTreePosition::moveToLastChild to make it a valid position. (The existing RenderTreePosition interface didn't have way to move to positions in anonymous boxes) In the case of a non box generating display:contents pseudo element, use the current render tree position instead. Ensure that pseudo element renderers are destroyed before creating the new ones since in display:contents case they are not descendants of the pseudo renderer and don't get cleared automatically.
Antti Koivisto
Comment 11 2017-10-21 00:40:15 PDT
WebKit Commit Bot
Comment 12 2017-10-21 01:15:13 PDT
Comment on attachment 324496 [details] patch Clearing flags on attachment: 324496 Committed r223810: <https://trac.webkit.org/changeset/223810>
WebKit Commit Bot
Comment 13 2017-10-21 01:15:15 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 14 2017-11-13 15:39:22 PST
Note You need to log in before you can comment on or make changes to this bug.