Bug 178513

Summary: Support ::before/::after pseudo elements on elements with display:contents
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, emilio, rniwa, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 157477    
Attachments:
Description Flags
patch
buildbot: commit-queue-
Archive of layout-test-results from ews125 for ios-simulator-wk2
none
patch
buildbot: commit-queue-
Archive of layout-test-results from ews121 for ios-simulator-wk2
none
Archive of layout-test-results from ews115 for mac-elcapitan
none
Archive of layout-test-results from ews102 for mac-elcapitan
none
patch
buildbot: commit-queue-
Archive of layout-test-results from ews100 for mac-elcapitan
none
Archive of layout-test-results from ews126 for ios-simulator-wk2
none
Archive of layout-test-results from ews114 for mac-elcapitan
none
patch rniwa: review+

Antti Koivisto
Reported 2017-10-19 07:21:47 PDT
div { display:contents } div::after { content: 'foo' } should work.
Attachments
patch (6.88 KB, patch)
2017-10-19 07:23 PDT, Antti Koivisto
buildbot: commit-queue-
Archive of layout-test-results from ews125 for ios-simulator-wk2 (841.01 KB, application/zip)
2017-10-19 08:35 PDT, Build Bot
no flags
patch (9.34 KB, patch)
2017-10-19 12:08 PDT, Antti Koivisto
buildbot: commit-queue-
Archive of layout-test-results from ews121 for ios-simulator-wk2 (25.74 MB, application/zip)
2017-10-19 14:30 PDT, Build Bot
no flags
Archive of layout-test-results from ews115 for mac-elcapitan (2.08 MB, application/zip)
2017-10-19 14:43 PDT, Build Bot
no flags
Archive of layout-test-results from ews102 for mac-elcapitan (1.18 MB, application/zip)
2017-10-19 14:46 PDT, Build Bot
no flags
patch (12.27 KB, patch)
2017-10-19 15:02 PDT, Antti Koivisto
buildbot: commit-queue-
Archive of layout-test-results from ews100 for mac-elcapitan (1.56 MB, application/zip)
2017-10-19 17:14 PDT, Build Bot
no flags
Archive of layout-test-results from ews126 for ios-simulator-wk2 (1.57 MB, application/zip)
2017-10-19 17:22 PDT, Build Bot
no flags
Archive of layout-test-results from ews114 for mac-elcapitan (2.25 MB, application/zip)
2017-10-19 17:42 PDT, Build Bot
no flags
patch (12.36 KB, patch)
2017-10-20 00:13 PDT, Antti Koivisto
rniwa: review+
Antti Koivisto
Comment 1 2017-10-19 07:23:19 PDT
Build Bot
Comment 2 2017-10-19 08:35:37 PDT
Comment on attachment 324225 [details] patch Attachment 324225 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/4919908 Number of test failures exceeded the failure limit.
Build Bot
Comment 3 2017-10-19 08:35:38 PDT
Created attachment 324237 [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
Antti Koivisto
Comment 4 2017-10-19 12:08:48 PDT
Build Bot
Comment 5 2017-10-19 14:30:55 PDT
Comment on attachment 324259 [details] patch Attachment 324259 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/4922877 New failing tests: fast/dom/offset-parent-positioned-and-inline.html platform/ios/ios/plugin/youtube-flash-plugin-iframe.html platform/ios/ios/plugin/youtube-flash-plugin-iframe-no-height-or-width.html security/contentSecurityPolicy/plugins-types-allows-quicktime-plugin-replacement.html imported/w3c/web-platform-tests/cssom/getComputedStyle-pseudo.html fast/replaced/replaced-child-of-absolute-with-auto-height.html security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement.html compositing/geometry/repaint-foreground-layer.html
Build Bot
Comment 6 2017-10-19 14:30:57 PDT
Created attachment 324290 [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
Build Bot
Comment 7 2017-10-19 14:43:11 PDT
Comment on attachment 324259 [details] patch Attachment 324259 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/4923397 New failing tests: fullscreen/full-screen-fixed-pos-parent.html fast/repaint/text-in-relative-positioned-inline.html security/contentSecurityPolicy/plugins-types-allows-quicktime-plugin-replacement.html imported/w3c/web-platform-tests/cssom/getComputedStyle-pseudo.html security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement.html security/contentSecurityPolicy/plugins-types-blocks-quicktime-plugin-replacement-without-mime-type.html fast/forms/select-listbox-focus-displaynone.html
Build Bot
Comment 8 2017-10-19 14:43:13 PDT
Created attachment 324293 [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
Build Bot
Comment 9 2017-10-19 14:46:44 PDT
Comment on attachment 324259 [details] patch Attachment 324259 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/4923616 New failing tests: fullscreen/full-screen-fixed-pos-parent.html fast/repaint/text-in-relative-positioned-inline.html security/contentSecurityPolicy/plugins-types-allows-quicktime-plugin-replacement.html imported/w3c/web-platform-tests/cssom/getComputedStyle-pseudo.html security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement.html security/contentSecurityPolicy/plugins-types-blocks-quicktime-plugin-replacement-without-mime-type.html fast/forms/select-listbox-focus-displaynone.html
Build Bot
Comment 10 2017-10-19 14:46:45 PDT
Created attachment 324295 [details] Archive of layout-test-results from ews102 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Antti Koivisto
Comment 11 2017-10-19 15:02:57 PDT
Build Bot
Comment 12 2017-10-19 17:14:56 PDT
Comment on attachment 324299 [details] patch Attachment 324299 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/4925825 New failing tests: security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement.html security/contentSecurityPolicy/plugins-types-allows-quicktime-plugin-replacement.html security/contentSecurityPolicy/plugins-types-blocks-quicktime-plugin-replacement-without-mime-type.html
Build Bot
Comment 13 2017-10-19 17:14:58 PDT
Created attachment 324319 [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 14 2017-10-19 17:22:00 PDT
Comment on attachment 324299 [details] patch Attachment 324299 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/4925646 New failing tests: fast/dom/offset-parent-positioned-and-inline.html platform/ios/ios/plugin/youtube-flash-plugin-iframe.html platform/ios/ios/plugin/youtube-flash-plugin-iframe-no-height-or-width.html security/contentSecurityPolicy/plugins-types-allows-quicktime-plugin-replacement.html fast/replaced/replaced-child-of-absolute-with-auto-height.html security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement.html compositing/geometry/repaint-foreground-layer.html
Build Bot
Comment 15 2017-10-19 17:22:02 PDT
Created attachment 324321 [details] Archive of layout-test-results from ews126 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews126 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.6
Build Bot
Comment 16 2017-10-19 17:42:56 PDT
Comment on attachment 324299 [details] patch Attachment 324299 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/4926007 New failing tests: security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement.html security/contentSecurityPolicy/plugins-types-allows-quicktime-plugin-replacement.html security/contentSecurityPolicy/plugins-types-blocks-quicktime-plugin-replacement-without-mime-type.html
Build Bot
Comment 17 2017-10-19 17:42:58 PDT
Created attachment 324324 [details] Archive of layout-test-results from ews114 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Antti Koivisto
Comment 18 2017-10-20 00:13:04 PDT
Ryosuke Niwa
Comment 19 2017-10-20 01:16:44 PDT
Comment on attachment 324366 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=324366&action=review > Source/WebCore/style/RenderTreePosition.cpp:89 > + auto initializeStack = [&] { I think it's cleaner to just have to code instead of creating a closure & calling it immediately. I thought you were trying to call this lazily or something. > Source/WebCore/style/RenderTreePosition.cpp:105 > + auto begin = [&] { I think begin() doesn't really covey the semantics. Please give it a more descriptive name. findFirstRendererConsideringBeforePseudoElement? > Source/WebCore/style/RenderTreePosition.cpp:109 > + if (host != parentElement) It's not clear what host != parentElement means. Maybe you can define a local boolean with a descriptive name or add a one line comment to clarify what it means? > Source/WebCore/style/RenderTreePosition.cpp:122 > + auto push = [&] (Element& element) -> RenderElement* { Can we give this a more descriptive name like pushIfBeforePseudoElementExists? > Source/WebCore/style/RenderTreePosition.cpp:132 > + auto pop = [&] (unsigned depth) -> RenderElement* { Can we call this popUntilAfterPseudoElement or something to make the semantics clear? pop(it.depth()) looks rather mysterious.
Antti Koivisto
Comment 20 2017-10-20 01:30:12 PDT
Radar WebKit Bug Importer
Comment 21 2017-11-13 15:41:10 PST
Note You need to log in before you can comment on or make changes to this bug.