<dialog> should have display:block in UA stylesheet |
|||
Issue description
,
Mar 27 2017
I will have a look at this. Direct link to the failing test: http://w3c-test.org/html/rendering/non-replaced-elements/flow-content-0/dialog-display.html
,
Mar 28 2017
I believe that the test under http://w3c-test.org/html/rendering/non-replaced-elements/flow-content-0/dialog.html should be updated, as there is an assertion for display: none > assert_equals: display expected "none" but got "block" Should I add the expected failures in dialog-expected.txt or file an issue at https://github.com/w3c/web-platform-tests/issues and wait until the test is updated?
,
Mar 28 2017
That is per spec:
dialog:not([open]) { display: none; }
https://html.spec.whatwg.org/#flow-content-3
It is currently display: none in Chromium when the open attribute is absent. Changing that to display: block would be a regression.
,
Mar 28 2017
Okay, I believe that the issue was the css-specificity. When I add display:block to dialog directly, it always overrides the dialog:not([open]) rule. It would be possible using the two rules below, but it doesn't seem particularly pretty. Just running it by you, as I want to make sure this is the way to go.
dialog:not([open]) { display: none; }
dialog:[open] { display: block; }
,
Mar 28 2017
"dialog { display: block }" should suffice.
,
Mar 28 2017
That results in : external/wpt/html/rendering/non-replaced-elements/flow-content-0/dialog.html This is a testharness.js-based test. FAIL Closed dialog in width: 540px iframe assert_equals: display expected "none" but got "block" PASS Open dialog in width: 540px iframe PASS Modal dialog in width: 540px iframe FAIL Closed dialog in width: 538px iframe assert_equals: display expected "none" but got "block" PASS Open dialog in width: 538px iframe PASS Modal dialog in width: 538px iframe Harness: the test ran to completion. The "Closed dialog" computed attribute for "display": http://i.imgur.com/zv4HPx0.png
,
Mar 29 2017
,
Mar 29 2017
There's a specificity bug causing this. You can move the dialog:not([open]) rule below the dialog rule, or wait for the fix for the blocker to land.
,
Mar 29 2017
Thanks for the fix. https://codereview.chromium.org/2782823005/
,
Mar 30 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0799d3367209d4185480b0408397eea79cd67fc8 commit 0799d3367209d4185480b0408397eea79cd67fc8 Author: martin <martin@martinrogalla.com> Date: Thu Mar 30 04:42:34 2017 Use display:block for dialog in UA stylesheet. This patch adds display:block for dialog to the UA stylesheet. This modification ensures that all the tests in [3] pass. More Information: [1] - https://github.com/whatwg/html/pull/2458 [2] - https://github.com/w3c/web-platform-tests/pull/5211 [3] - http://w3c-test.org/html/rendering/non-replaced-elements/flow-content-0/dialog-display.html BUG= 704848 Review-Url: https://codereview.chromium.org/2782823005 Cr-Commit-Position: refs/heads/master@{#460665} [delete] https://crrev.com/1582bcfa6979192f20e21d3ae4afb6951f0793c6/third_party/WebKit/LayoutTests/external/wpt/html/rendering/non-replaced-elements/flow-content-0/dialog-display-expected.txt [modify] https://crrev.com/0799d3367209d4185480b0408397eea79cd67fc8/third_party/WebKit/LayoutTests/html/dialog/element-removed-from-top-layer-has-original-position.html [modify] https://crrev.com/0799d3367209d4185480b0408397eea79cd67fc8/third_party/WebKit/Source/core/css/html.css
,
Mar 30 2017
I made a chromestatus entry for this just in case. https://www.chromestatus.com/feature/5754335753404416 |
|||
►
Sign in to add a comment |
|||
Comment 1 by tkent@chromium.org
, Mar 24 2017Labels: Hotlist-GoodFirstBug
Status: Available (was: Untriaged)