Skip to content
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

List item forces strict line height #38

Open
mstensho opened this issue Dec 20, 2018 · 5 comments
Open

List item forces strict line height #38

mstensho opened this issue Dec 20, 2018 · 5 comments
Labels
interop Implementations are not interoperable with each other

Comments

@mstensho
Copy link

It seems that all browsers agree that list items disable the line height quirk [1] on ALL lines. I'm guessing this was added to make sure that there always be room for the list item marker, although that doesn't really explain why it should be like this on every line in the list item. Doing it on the first line (where the list item marker is) would have been good enough.

One implementation difference: Gecko triggers on HTML LI elements, while the others trigger on CSS display:list-item

Example:

<!-- quirks mode -->
<p>There should be a filled green square below, and no red.</p>
<div style="width:100px; height:100px; background:red;">
  <li style="line-height:50px; color:green; background:green;">
    <br>
    <div style="display:inline-block; width:1px; height:1px;"></div>
  </li>
</div>

Try changing from LI to DIV and observe the changes.

[1] https://quirks.spec.whatwg.org/#the-line-height-calculation-quirk

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Dec 20, 2018
This makes us match legacy engine behavior more closely, and both Edge
and Firefox have something similar, although Firefox triggers based on
element type (LI), and not display type (list-item). There's currently
nothing in the spec [1] that suggests such special behavior for list
items.

[1] https://quirks.spec.whatwg.org/#the-line-height-calculation-quirk

This fix makes the line height differences go away in the test
tables/mozilla/bugs/bug23235.html (but note that it will still require
a rebaseline, because of minor text rendering differences between
legacy and NG).

See whatwg/quirks#38 for spec discussion.

Change-Id: I396c0c85454feeaa45a0a5953b9e6b7c475d131e
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Dec 20, 2018
This makes us match legacy engine behavior more closely, and both Edge
and Firefox have something similar, although Firefox triggers based on
element type (LI), and not display type (list-item). There's currently
nothing in the spec [1] that suggests such special behavior for list
items.

[1] https://quirks.spec.whatwg.org/#the-line-height-calculation-quirk

This fix makes the line height differences go away in the test
tables/mozilla/bugs/bug23235.html (but note that it will still require
a rebaseline, because of minor text rendering differences between
legacy and NG).

See whatwg/quirks#38 for spec discussion.

Change-Id: I396c0c85454feeaa45a0a5953b9e6b7c475d131e
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Dec 20, 2018
This makes us match legacy engine behavior more closely, and both Edge
and Firefox have something similar, although Firefox triggers based on
element type (LI), and not display type (list-item). There's currently
nothing in the spec [1] that suggests such special behavior for list
items.

[1] https://quirks.spec.whatwg.org/#the-line-height-calculation-quirk

This fix makes the line height differences go away in the test
tables/mozilla/bugs/bug23235.html (but note that it will still require
a rebaseline, because of minor text rendering differences between
legacy and NG).

See whatwg/quirks#38 for spec discussion.

Change-Id: I396c0c85454feeaa45a0a5953b9e6b7c475d131e
Reviewed-on: https://chromium-review.googlesource.com/c/1379897
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: Aleks Totic <atotic@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618304}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Dec 20, 2018
This makes us match legacy engine behavior more closely, and both Edge
and Firefox have something similar, although Firefox triggers based on
element type (LI), and not display type (list-item). There's currently
nothing in the spec [1] that suggests such special behavior for list
items.

[1] https://quirks.spec.whatwg.org/#the-line-height-calculation-quirk

This fix makes the line height differences go away in the test
tables/mozilla/bugs/bug23235.html (but note that it will still require
a rebaseline, because of minor text rendering differences between
legacy and NG).

See whatwg/quirks#38 for spec discussion.

Change-Id: I396c0c85454feeaa45a0a5953b9e6b7c475d131e
Reviewed-on: https://chromium-review.googlesource.com/c/1379897
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: Aleks Totic <atotic@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618304}
aarongable pushed a commit to chromium/chromium that referenced this issue Dec 20, 2018
This makes us match legacy engine behavior more closely, and both Edge
and Firefox have something similar, although Firefox triggers based on
element type (LI), and not display type (list-item). There's currently
nothing in the spec [1] that suggests such special behavior for list
items.

[1] https://quirks.spec.whatwg.org/#the-line-height-calculation-quirk

This fix makes the line height differences go away in the test
tables/mozilla/bugs/bug23235.html (but note that it will still require
a rebaseline, because of minor text rendering differences between
legacy and NG).

See whatwg/quirks#38 for spec discussion.

Change-Id: I396c0c85454feeaa45a0a5953b9e6b7c475d131e
Reviewed-on: https://chromium-review.googlesource.com/c/1379897
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: Aleks Totic <atotic@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618304}
@zcorpan
Copy link
Member

zcorpan commented Jan 9, 2019

It seems reasonable to me to specify what non-Gecko browsers do (disable the quirk for display: list-item). @bzbarsky sounds ok?

@mstensho interested in making a PR?

@zcorpan zcorpan added the interop Implementations are not interoperable with each other label Jan 9, 2019
@mstensho
Copy link
Author

mstensho commented Jan 9, 2019

Triggering on element type (like Gecko) kind of makes more sense to me, though.

@zcorpan
Copy link
Member

zcorpan commented Jan 9, 2019

OK, that sounds good to me. :)

@bzbarsky
Copy link

bzbarsky commented Jan 9, 2019

I have no idea how this stuff works, sorry. @dbaron might.

@bzbarsky
Copy link

bzbarsky commented Jan 9, 2019

And in particular, the behavior seems to not be quite what's described above. Here's the behavior I see on the testcase from #38 (comment) in Chrome as far as I can tell:

  1. If the inner element is display:block, the green bit is half as tall as the red bit.
  2. If the inner element is display: list-item the green bit is the same height as the red bit.

In Gecko, I see the following behavior:

  1. If the inner thing is an <li> with display: list-item; list-style-position: inside (the default in quirks mode only for <li> not in a list in Gecko), the green bit is a bit more than half the height of the red bit.
  2. If the inner thing is an <li> with display: list-item, list-style-position: outside, the green bit is the same height as the red bit.
  3. If the inner thing is an <li> with display: block, the green bit is the same height as the red bit.
  4. If the inner thing is a <div> with display: list-item; list-style-position: inside the green bit is only a few pixels tall.
  5. If the inner thing is a <div> with display: list-item; list-style-position: outside the green bit is half the height of the red bit.
  6. If the inner thing is a <div> with display: block the green bit is half the height of the red bit.

So the Gecko behavior is falling out of an interaction between the list marker and line-height calculations, though I dunno what's going on with the "<div> with display: list-item; list-style-position: inside" case.

I did look and we have some code in line layout to do something special for the last line of an <li> (and <dt> and <dd>), but it doesn't seem like that would apply here. Maybe it does, though.

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Feb 5, 2019
… inside list items., a=testonly

Automatic update from web-platform-tests
[LayoutNG] Don't allow line height quirk inside list items.

This makes us match legacy engine behavior more closely, and both Edge
and Firefox have something similar, although Firefox triggers based on
element type (LI), and not display type (list-item). There's currently
nothing in the spec [1] that suggests such special behavior for list
items.

[1] https://quirks.spec.whatwg.org/#the-line-height-calculation-quirk

This fix makes the line height differences go away in the test
tables/mozilla/bugs/bug23235.html (but note that it will still require
a rebaseline, because of minor text rendering differences between
legacy and NG).

See whatwg/quirks#38 for spec discussion.

Change-Id: I396c0c85454feeaa45a0a5953b9e6b7c475d131e
Reviewed-on: https://chromium-review.googlesource.com/c/1379897
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: Aleks Totic <atotic@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618304}

--

wpt-commits: 6bfd51316130abc1d6b648ba281792fb34e4ee82
wpt-pr: 14623
mykmelez pushed a commit to mykmelez/gecko that referenced this issue Feb 6, 2019
… inside list items., a=testonly

Automatic update from web-platform-tests
[LayoutNG] Don't allow line height quirk inside list items.

This makes us match legacy engine behavior more closely, and both Edge
and Firefox have something similar, although Firefox triggers based on
element type (LI), and not display type (list-item). There's currently
nothing in the spec [1] that suggests such special behavior for list
items.

[1] https://quirks.spec.whatwg.org/#the-line-height-calculation-quirk

This fix makes the line height differences go away in the test
tables/mozilla/bugs/bug23235.html (but note that it will still require
a rebaseline, because of minor text rendering differences between
legacy and NG).

See whatwg/quirks#38 for spec discussion.

Change-Id: I396c0c85454feeaa45a0a5953b9e6b7c475d131e
Reviewed-on: https://chromium-review.googlesource.com/c/1379897
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: Aleks Totic <atotic@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618304}

--

wpt-commits: 6bfd51316130abc1d6b648ba281792fb34e4ee82
wpt-pr: 14623
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Feb 7, 2019
… inside list items., a=testonly

Automatic update from web-platform-tests
[LayoutNG] Don't allow line height quirk inside list items.

This makes us match legacy engine behavior more closely, and both Edge
and Firefox have something similar, although Firefox triggers based on
element type (LI), and not display type (list-item). There's currently
nothing in the spec [1] that suggests such special behavior for list
items.

[1] https://quirks.spec.whatwg.org/#the-line-height-calculation-quirk

This fix makes the line height differences go away in the test
tables/mozilla/bugs/bug23235.html (but note that it will still require
a rebaseline, because of minor text rendering differences between
legacy and NG).

See whatwg/quirks#38 for spec discussion.

Change-Id: I396c0c85454feeaa45a0a5953b9e6b7c475d131e
Reviewed-on: https://chromium-review.googlesource.com/c/1379897
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: Aleks Totic <atotic@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618304}

--

wpt-commits: 6bfd51316130abc1d6b648ba281792fb34e4ee82
wpt-pr: 14623
mykmelez pushed a commit to mykmelez/gecko that referenced this issue Feb 8, 2019
… inside list items., a=testonly

Automatic update from web-platform-tests
[LayoutNG] Don't allow line height quirk inside list items.

This makes us match legacy engine behavior more closely, and both Edge
and Firefox have something similar, although Firefox triggers based on
element type (LI), and not display type (list-item). There's currently
nothing in the spec [1] that suggests such special behavior for list
items.

[1] https://quirks.spec.whatwg.org/#the-line-height-calculation-quirk

This fix makes the line height differences go away in the test
tables/mozilla/bugs/bug23235.html (but note that it will still require
a rebaseline, because of minor text rendering differences between
legacy and NG).

See whatwg/quirks#38 for spec discussion.

Change-Id: I396c0c85454feeaa45a0a5953b9e6b7c475d131e
Reviewed-on: https://chromium-review.googlesource.com/c/1379897
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: Aleks Totic <atotic@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618304}

--

wpt-commits: 6bfd51316130abc1d6b648ba281792fb34e4ee82
wpt-pr: 14623
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 3, 2019
… inside list items., a=testonly

Automatic update from web-platform-tests
[LayoutNG] Don't allow line height quirk inside list items.

This makes us match legacy engine behavior more closely, and both Edge
and Firefox have something similar, although Firefox triggers based on
element type (LI), and not display type (list-item). There's currently
nothing in the spec [1] that suggests such special behavior for list
items.

[1] https://quirks.spec.whatwg.org/#the-line-height-calculation-quirk

This fix makes the line height differences go away in the test
tables/mozilla/bugs/bug23235.html (but note that it will still require
a rebaseline, because of minor text rendering differences between
legacy and NG).

See whatwg/quirks#38 for spec discussion.

Change-Id: I396c0c85454feeaa45a0a5953b9e6b7c475d131e
Reviewed-on: https://chromium-review.googlesource.com/c/1379897
Commit-Queue: Emil A Eklund <eaechromium.org>
Reviewed-by: Aleks Totic <atoticchromium.org>
Reviewed-by: Koji Ishii <kojiichromium.org>
Reviewed-by: Emil A Eklund <eaechromium.org>
Cr-Commit-Position: refs/heads/master{#618304}

--

wpt-commits: 6bfd51316130abc1d6b648ba281792fb34e4ee82
wpt-pr: 14623

UltraBlame original commit: c6a8d1fbea4cdc17fd4dd9ba4d30f5bd5c31c05e
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 3, 2019
… inside list items., a=testonly

Automatic update from web-platform-tests
[LayoutNG] Don't allow line height quirk inside list items.

This makes us match legacy engine behavior more closely, and both Edge
and Firefox have something similar, although Firefox triggers based on
element type (LI), and not display type (list-item). There's currently
nothing in the spec [1] that suggests such special behavior for list
items.

[1] https://quirks.spec.whatwg.org/#the-line-height-calculation-quirk

This fix makes the line height differences go away in the test
tables/mozilla/bugs/bug23235.html (but note that it will still require
a rebaseline, because of minor text rendering differences between
legacy and NG).

See whatwg/quirks#38 for spec discussion.

Change-Id: I396c0c85454feeaa45a0a5953b9e6b7c475d131e
Reviewed-on: https://chromium-review.googlesource.com/c/1379897
Commit-Queue: Emil A Eklund <eaechromium.org>
Reviewed-by: Aleks Totic <atoticchromium.org>
Reviewed-by: Koji Ishii <kojiichromium.org>
Reviewed-by: Emil A Eklund <eaechromium.org>
Cr-Commit-Position: refs/heads/master{#618304}

--

wpt-commits: 6bfd51316130abc1d6b648ba281792fb34e4ee82
wpt-pr: 14623

UltraBlame original commit: e820da6c7a2e8b6a9d20eb4dc0bddf2c4e763035
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 3, 2019
… inside list items., a=testonly

Automatic update from web-platform-tests
[LayoutNG] Don't allow line height quirk inside list items.

This makes us match legacy engine behavior more closely, and both Edge
and Firefox have something similar, although Firefox triggers based on
element type (LI), and not display type (list-item). There's currently
nothing in the spec [1] that suggests such special behavior for list
items.

[1] https://quirks.spec.whatwg.org/#the-line-height-calculation-quirk

This fix makes the line height differences go away in the test
tables/mozilla/bugs/bug23235.html (but note that it will still require
a rebaseline, because of minor text rendering differences between
legacy and NG).

See whatwg/quirks#38 for spec discussion.

Change-Id: I396c0c85454feeaa45a0a5953b9e6b7c475d131e
Reviewed-on: https://chromium-review.googlesource.com/c/1379897
Commit-Queue: Emil A Eklund <eaechromium.org>
Reviewed-by: Aleks Totic <atoticchromium.org>
Reviewed-by: Koji Ishii <kojiichromium.org>
Reviewed-by: Emil A Eklund <eaechromium.org>
Cr-Commit-Position: refs/heads/master{#618304}

--

wpt-commits: 6bfd51316130abc1d6b648ba281792fb34e4ee82
wpt-pr: 14623

UltraBlame original commit: c6a8d1fbea4cdc17fd4dd9ba4d30f5bd5c31c05e
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 3, 2019
… inside list items., a=testonly

Automatic update from web-platform-tests
[LayoutNG] Don't allow line height quirk inside list items.

This makes us match legacy engine behavior more closely, and both Edge
and Firefox have something similar, although Firefox triggers based on
element type (LI), and not display type (list-item). There's currently
nothing in the spec [1] that suggests such special behavior for list
items.

[1] https://quirks.spec.whatwg.org/#the-line-height-calculation-quirk

This fix makes the line height differences go away in the test
tables/mozilla/bugs/bug23235.html (but note that it will still require
a rebaseline, because of minor text rendering differences between
legacy and NG).

See whatwg/quirks#38 for spec discussion.

Change-Id: I396c0c85454feeaa45a0a5953b9e6b7c475d131e
Reviewed-on: https://chromium-review.googlesource.com/c/1379897
Commit-Queue: Emil A Eklund <eaechromium.org>
Reviewed-by: Aleks Totic <atoticchromium.org>
Reviewed-by: Koji Ishii <kojiichromium.org>
Reviewed-by: Emil A Eklund <eaechromium.org>
Cr-Commit-Position: refs/heads/master{#618304}

--

wpt-commits: 6bfd51316130abc1d6b648ba281792fb34e4ee82
wpt-pr: 14623

UltraBlame original commit: e820da6c7a2e8b6a9d20eb4dc0bddf2c4e763035
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 4, 2019
… inside list items., a=testonly

Automatic update from web-platform-tests
[LayoutNG] Don't allow line height quirk inside list items.

This makes us match legacy engine behavior more closely, and both Edge
and Firefox have something similar, although Firefox triggers based on
element type (LI), and not display type (list-item). There's currently
nothing in the spec [1] that suggests such special behavior for list
items.

[1] https://quirks.spec.whatwg.org/#the-line-height-calculation-quirk

This fix makes the line height differences go away in the test
tables/mozilla/bugs/bug23235.html (but note that it will still require
a rebaseline, because of minor text rendering differences between
legacy and NG).

See whatwg/quirks#38 for spec discussion.

Change-Id: I396c0c85454feeaa45a0a5953b9e6b7c475d131e
Reviewed-on: https://chromium-review.googlesource.com/c/1379897
Commit-Queue: Emil A Eklund <eaechromium.org>
Reviewed-by: Aleks Totic <atoticchromium.org>
Reviewed-by: Koji Ishii <kojiichromium.org>
Reviewed-by: Emil A Eklund <eaechromium.org>
Cr-Commit-Position: refs/heads/master{#618304}

--

wpt-commits: 6bfd51316130abc1d6b648ba281792fb34e4ee82
wpt-pr: 14623

UltraBlame original commit: c6a8d1fbea4cdc17fd4dd9ba4d30f5bd5c31c05e
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 4, 2019
… inside list items., a=testonly

Automatic update from web-platform-tests
[LayoutNG] Don't allow line height quirk inside list items.

This makes us match legacy engine behavior more closely, and both Edge
and Firefox have something similar, although Firefox triggers based on
element type (LI), and not display type (list-item). There's currently
nothing in the spec [1] that suggests such special behavior for list
items.

[1] https://quirks.spec.whatwg.org/#the-line-height-calculation-quirk

This fix makes the line height differences go away in the test
tables/mozilla/bugs/bug23235.html (but note that it will still require
a rebaseline, because of minor text rendering differences between
legacy and NG).

See whatwg/quirks#38 for spec discussion.

Change-Id: I396c0c85454feeaa45a0a5953b9e6b7c475d131e
Reviewed-on: https://chromium-review.googlesource.com/c/1379897
Commit-Queue: Emil A Eklund <eaechromium.org>
Reviewed-by: Aleks Totic <atoticchromium.org>
Reviewed-by: Koji Ishii <kojiichromium.org>
Reviewed-by: Emil A Eklund <eaechromium.org>
Cr-Commit-Position: refs/heads/master{#618304}

--

wpt-commits: 6bfd51316130abc1d6b648ba281792fb34e4ee82
wpt-pr: 14623

UltraBlame original commit: e820da6c7a2e8b6a9d20eb4dc0bddf2c4e763035
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interop Implementations are not interoperable with each other
Development

No branches or pull requests

3 participants