baseline-source: first behaves oddly on textarea
Categories
(Core :: Layout: Block and Inline, defect, P3)
Tracking
()
People
(Reporter: tobias.buschor, Assigned: dshin)
References
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0
Steps to reproduce:
create a textarea element
vertical-align it to baseline
baseline-source to first
Actual results:
the baseline is not align with the first text-line in the textarea
Expected results:
The first textline should act as baseline-source. chromium does it that way.
Funnily enough, firefox without baseline-source does exacly that and I integrated "textarea {baseline-source:first}" into my css-normalize to make chrome act the same as firefox.
Comment 1•11 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::CSS Parsing and Computation' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•11 months ago
|
||
Yeah this behavior looks rather odd. David can you take a look?
Updated•11 months ago
|
Updated•11 months ago
|
Updated•11 months ago
|
Assignee | ||
Updated•10 months ago
|
Assignee | ||
Comment 3•10 months ago
|
||
Interestingly enough, we explicitly don't give baseline for multi-line nsTextControlFrame.
Not specifying gives the cached baseline during reflow, which happens to be the first line, hence the second textarea working.
Assignee | ||
Comment 4•10 months ago
|
||
Tests go to mozilla-specific WPT tests, because behaviour when there's no content,
or when there's placeholder text, seem very differnt for each browser.
Pushed by dshin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/928b78db7b30 Baseline calculation for textarea. r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/41428 for changes under testing/web-platform/tests
Comment 7•10 months ago
|
||
Backed out for causing reftest failures on display-block-baselines-3.html.
Upstream PR was closed without merging
Assignee | ||
Comment 9•10 months ago
|
||
Test expectation adjusted - textarea did not used to give baseline for the enclosing block frame, now it gives the border-end edge as the baseline, which matches the that of scrolled frames.
Comment 10•10 months ago
|
||
Pushed by dshin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2187935f6d78 Baseline calculation for textarea. r=emilio
Comment 11•10 months ago
|
||
:dshin - I suspect Firefox is doing some rounding in the line-height calculations for this test. The current expectations have the offsetTop of the textarea's as "11" , but there is only "10px" padding from the container?
Assignee | ||
Comment 12•10 months ago
|
||
Ah, I missed that we apply 1px block-dir margin to textarea
in our stylesheet.
We should be ok to specify margin: 0
for textarea
for the purpose of this test, and I see that brings offsetTop
to 10
in Gecko, Blink & WebKit.
I think at this point, the best course of action is to make the change upstream (Unless this gets backed out for another failure, in which case I'll adjust it here).
Assignee | ||
Updated•10 months ago
|
Comment 13•10 months ago
|
||
bugherder |
Upstream PR merged by moz-wptsync-bot
Assignee | ||
Comment 15•10 months ago
|
||
(In reply to David Shin[:dshin] from comment #12)
Ah, I missed that we apply 1px block-dir margin to
textarea
in our stylesheet.
We should be ok to specifymargin: 0
fortextarea
for the purpose of this test, and I see that bringsoffsetTop
to10
in Gecko, Blink & WebKit.
I think at this point, the best course of action is to make the change upstream (Unless this gets backed out for another failure, in which case I'll adjust it here).
Upstream review: https://github.com/web-platform-tests/wpt/pull/41491
Updated•10 months ago
|
Comment 16•10 months ago
|
||
Reproducible on a 2023-08-03 Nightly build on Windows 10.
Verified as fixed on Firefox 118.0b2(20230829180158) and Nightly 119.0a1(20230830212731) on Windows 10, macOS 12, Ubuntu 22.
Description
•