-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The definition of "rendered legend" should use the box tree, or at least the flat tree. #3331
Comments
Can you give examples that demonstrate the difference in definition? (The current definition already pokes at the box tree afaict.) |
Trivial example would be: <fieldset>
<div style="display: contents">
<legend>Legend</legend>
</div>
</fieldset> You could construct another with Shadow DOM adding a https://html.spec.whatwg.org/#rendered-legend says:
Where |
I guess for |
Not entirely sure what terminology to use though as CSS doesn't really define the box model in sufficient detail. Would "first child box whose corresponding element is a legend element" work? Assuming we also keep the other conditions already in the standard. |
I think that would match what's implemented in both blink and Gecko at least. |
(And WebKit too, just checked). May be worth to check edge in case it does something different, but I can't do that easily. |
Like this? http://software.hixie.ch/utilities/js/live-dom-viewer/saved/6080 This seems to work in WebKit/Chromium/Gecko. (In EdgeHTML 17, |
To confirm, the wording suggested above ("first child box whose corresponding element is a legend element") would include the flat tree case? |
Yes, it would. Elements outside of the flat tree don't generate boxes (or have styles for that matter). |
…display: contents, a=testonly Automatic update from web-platform-testsHTML: test fieldset with shadow DOM and display: contents See whatwg/html#3331 -- wpt-commits: 69e18d06f5030e3567dcf323e24452c7f4b5f6df wpt-pr: 12643
…display: contents, a=testonly Automatic update from web-platform-testsHTML: test fieldset with shadow DOM and display: contents See whatwg/html#3331 -- wpt-commits: 69e18d06f5030e3567dcf323e24452c7f4b5f6df wpt-pr: 12643
Properly define the rendering of the fieldset and legend elements. The layout model used is most similar to Gecko, which uses an anonymous box to hold the fieldset's contents. Fixes #3955, fixes #3930, fixes #3929, fixes #3928, fixes #3927, fixes #3915, fixes #3913, fixes #3660, fixes #3331, fixes #2756, fixes #4013. Tests: https://github.com/web-platform-tests/wpt/tree/master/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements https://github.com/web-platform-tests/wpt/tree/master/html/semantics/forms/the-fieldset-element
Properly define the rendering of the fieldset and legend elements. The layout model used is most similar to Gecko, which uses an anonymous box to hold the fieldset's contents. Fixes whatwg#3955, fixes whatwg#3930, fixes whatwg#3929, fixes whatwg#3928, fixes whatwg#3927, fixes whatwg#3915, fixes whatwg#3913, fixes whatwg#3660, fixes whatwg#3331, fixes whatwg#2756, fixes whatwg#4013. Tests: https://github.com/web-platform-tests/wpt/tree/master/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements https://github.com/web-platform-tests/wpt/tree/master/html/semantics/forms/the-fieldset-element
Properly define the rendering of the fieldset and legend elements. The layout model used is most similar to Gecko, which uses an anonymous box to hold the fieldset's contents. Fixes whatwg#3955, fixes whatwg#3930, fixes whatwg#3929, fixes whatwg#3928, fixes whatwg#3927, fixes whatwg#3915, fixes whatwg#3913, fixes whatwg#3660, fixes whatwg#3331, fixes whatwg#2756, fixes whatwg#4013. Tests: https://github.com/web-platform-tests/wpt/tree/master/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements https://github.com/web-platform-tests/wpt/tree/master/html/semantics/forms/the-fieldset-element
…display: contents, a=testonly Automatic update from web-platform-testsHTML: test fieldset with shadow DOM and display: contents See whatwg/html#3331 -- wpt-commits: 69e18d06f5030e3567dcf323e24452c7f4b5f6df wpt-pr: 12643 UltraBlame original commit: 746986266e94d0af5def61af3941b2a69bd76324
…display: contents, a=testonly Automatic update from web-platform-testsHTML: test fieldset with shadow DOM and display: contents See whatwg/html#3331 -- wpt-commits: 69e18d06f5030e3567dcf323e24452c7f4b5f6df wpt-pr: 12643 UltraBlame original commit: 746986266e94d0af5def61af3941b2a69bd76324
…display: contents, a=testonly Automatic update from web-platform-testsHTML: test fieldset with shadow DOM and display: contents See whatwg/html#3331 -- wpt-commits: 69e18d06f5030e3567dcf323e24452c7f4b5f6df wpt-pr: 12643 UltraBlame original commit: 746986266e94d0af5def61af3941b2a69bd76324
That is how browsers (at least WebKit / Gecko / Blink) implement it, and it makes sense.
If it's defined using the flat tree it should account for display: contents ancestors (skipping them as appropriate).
The text was updated successfully, but these errors were encountered: