New issue
Advanced search Search tips

Issue 794498 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 657748



Sign in to add a comment

Correct behavior for display:contents on unusual elements

Project Member Reported by futhark@chromium.org, Dec 13 2017

Issue description

Our implementation and the wpt test display-contents-replaced-001.html does not match the non-normative section for unusual elements [1].

[1] https://drafts.csswg.org/css-display/#unbox

 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/542fd0e1f5aef361e7022c7eff11bde7e64cdd87

commit 542fd0e1f5aef361e7022c7eff11bde7e64cdd87
Author: Rune Lillesveen <futhark@chromium.org>
Date: Fri Dec 15 00:13:11 2017

HTML elements with display:contents behaving as display:none.

For certain "unusual" html elements, display:contents behaves as
display:none [1].

Frame and frameset always create layout objects, also when inserted into
a body with appendChild (the parser will discard them). This is also the
case for Gecko. I decided not to touch those even though the CSS Display
spec mentions them.

Similarly, there is no test for the applet element which is no longer
supported in Blink, so there is no test for it and it behaves like any
other unknown element supporting display:contents.

[1] https://drafts.csswg.org/css-display/#unbox-html

Bug:  794498 
Change-Id: I7ce6f70efff563b6ff770f7c536c9144210ad0be
Reviewed-on: https://chromium-review.googlesource.com/827069
Reviewed-by: meade_UTC10 <meade@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524249}
[add] https://crrev.com/542fd0e1f5aef361e7022c7eff11bde7e64cdd87/third_party/WebKit/LayoutTests/external/wpt/css/css-display/display-contents-unusual-html-elements-none.html
[modify] https://crrev.com/542fd0e1f5aef361e7022c7eff11bde7e64cdd87/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp

Status: Started (was: Assigned)
Project Member

Comment 4 by bugdroid1@chromium.org, Dec 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b20c89c7d032fb4c4289f09b92e5ba6181a7c91b

commit b20c89c7d032fb4c4289f09b92e5ba6181a7c91b
Author: Rune Lillesveen <futhark@chromium.org>
Date: Mon Dec 18 12:39:32 2017

Tests and implementation of display:contents in SVG.

Adjusted how display:contents affect various SVG elements as specified
in https://drafts.csswg.org/css-display/#unbox-svg

By using IsOutermostSVGSVGElement() for svg root testing , this change
also fixes 795685.

Bug:  794498 ,  795685 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I6b45f1ad65cfe9b29378d9ea9f2c4f9d855da231
Reviewed-on: https://chromium-review.googlesource.com/829633
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#524687}
[add] https://crrev.com/b20c89c7d032fb4c4289f09b92e5ba6181a7c91b/third_party/WebKit/LayoutTests/external/wpt/css/css-display/display-contents-svg-elements-ref.html
[add] https://crrev.com/b20c89c7d032fb4c4289f09b92e5ba6181a7c91b/third_party/WebKit/LayoutTests/external/wpt/css/css-display/display-contents-svg-elements.html
[add] https://crrev.com/b20c89c7d032fb4c4289f09b92e5ba6181a7c91b/third_party/WebKit/LayoutTests/external/wpt/svg/foreignobject/position-svg-root-in-foreign-object-ref.html
[add] https://crrev.com/b20c89c7d032fb4c4289f09b92e5ba6181a7c91b/third_party/WebKit/LayoutTests/external/wpt/svg/foreignobject/position-svg-root-in-foreign-object.html
[modify] https://crrev.com/b20c89c7d032fb4c4289f09b92e5ba6181a7c91b/third_party/WebKit/LayoutTests/svg/css/display-computed.html
[modify] https://crrev.com/b20c89c7d032fb4c4289f09b92e5ba6181a7c91b/third_party/WebKit/LayoutTests/svg/css/display-expected.html
[modify] https://crrev.com/b20c89c7d032fb4c4289f09b92e5ba6181a7c91b/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
[modify] https://crrev.com/b20c89c7d032fb4c4289f09b92e5ba6181a7c91b/third_party/WebKit/Source/core/svg/SVGGElement.cpp
[modify] https://crrev.com/b20c89c7d032fb4c4289f09b92e5ba6181a7c91b/third_party/WebKit/Source/core/svg/SVGUseElement.cpp

Status: Fixed (was: Started)
Project Member

Comment 6 by bugdroid1@chromium.org, Dec 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b95b8ab72bb813553b48df4f6ff551642fbd4be5

commit b95b8ab72bb813553b48df4f6ff551642fbd4be5
Author: Rune Lillesveen <futhark@chromium.org>
Date: Mon Dec 18 13:54:05 2017

Removed incorrect display:contents test obsoleted by new tests.

The reference contained display:contents style making this test always
pass. The elements tested here are now covered by:

css/css-display/display-contents-unusual-html-elements-none.html
css/css-display/display-contents-button.html

Bug:  794498 
Change-Id: I392c71d09fa8dc32d1b29ef99c0859af50cd75ed
Reviewed-on: https://chromium-review.googlesource.com/832086
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524700}
[delete] https://crrev.com/97b283f950a14bad9ff01b8a47911531589fba40/third_party/WebKit/LayoutTests/external/wpt/css/css-display/display-contents-replaced-001-ref.html
[delete] https://crrev.com/97b283f950a14bad9ff01b8a47911531589fba40/third_party/WebKit/LayoutTests/external/wpt/css/css-display/display-contents-replaced-001.html

Sign in to add a comment