Also adds WPT reftests to validate alignment behavior in horizontal and vertical
writing modes with the different `alignment-baseline` values. Additionally:
- The `alignment-baseline: middle` tests have failing expectations. This is
because the existing implementation does not match the css-inline-3 definition
(which the new WPTs follow). See Bug 2030203.
- The WidthTest-Regular.otf support font was updated to remove its unusual
ideographic-under baseline value, which affected its synthesized central
baseline. With the new support for `alignment-baseline: central`, this broke a
number of `text-combine-upright-compression-*` WPT reftests. The non-centered
baseline values were removed from this test using FontForge, so that the
synthesized central baseline matched the expectation of the test references.
Differential Revision: https://phabricator.services.mozilla.com/D292136
This reverts commit 482c9f881b.
Revert "Bug 2029869 - Synthesize vertical font metrics/baselines from horizontal metrics/baselines. r=layout-reviewers,jfkthame"
This reverts commit 8699ee2727.
Also adds WPT reftests to validate alignment behavior in horizontal and vertical
writing modes with the different `alignment-baseline` values. Additionally:
- The `alignment-baseline: middle` tests have failing expectations. This is
because the existing implementation does not match the css-inline-3 definition
(which the new WPTs follow). See Bug 2030203.
- The WidthTest-Regular.otf support font was updated to remove its unusual
ideographic-under baseline value, which affected its synthesized central
baseline. With the new support for `alignment-baseline: central`, this broke a
number of `text-combine-upright-compression-*` WPT reftests. The non-centered
baseline values were removed from this test using FontForge, so that the
synthesized central baseline matched the expectation of the test references.
Differential Revision: https://phabricator.services.mozilla.com/D292136
Don't apply text-indent to the outer input frame, since all the inner
frames also apply it. This gets the behavior from before my patch and is
consistent with other browsers as well.
Differential Revision: https://phabricator.services.mozilla.com/D296252
Don't apply text-indent to the outer input frame, since all the inner
frames also apply it. This gets the behavior from before my patch and is
consistent with other browsers as well.
Differential Revision: https://phabricator.services.mozilla.com/D296252
Moves the existing dominant-baseline CSS property out from SVG-specific
struct and into the general inherited box struct. Also adds new WPTs for
testing dominant-baseline against the alignment-baseline property.
Differential Revision: https://phabricator.services.mozilla.com/D282788
Replaces the `vertical-align` longhand with the shorthand version and the corresponding `alignment-baseline` and `baseline-shift` longhands (the `baseline-source` property was already implemented). Some notes about this change:
- The CSS Inline Layout Module Level 3 specification introduced new
values to `alignment-baseline` and `baseline-shift` that were not
available in the original `vertical-align` longhand. This change
only implements the original keywords; the new values will be used
in a future patch.
- The SVG layout still ignores the `vertical-align` (and now the
corresponding longhands) in favor of the `dominant-baseline`. This
will also be addressed in a future patch.
Differential Revision: https://phabricator.services.mozilla.com/D277725
No need to reposition views during layout and so on, now that we don't
use views for either popups nor subdocuments.
No need for nsView to have parent / sibling / children either.
Differential Revision: https://phabricator.services.mozilla.com/D271205
This allows us to fine-tune the positioning of ruby annotations. To my eye,
a setting of around 110 (so "padding" the normalized ascent/descent of the base
characters by an extra 10%) looks better, but we should get feedback from the
Japanese community to determine a good default.
(Setting the pref to zero restores our old line-box-based ruby rendering.
Non-zero values are clamped to the range [100..200] to avoid sending the
annotations really far away or making them overprint the base text.)
This shouldn't change behavior _unless_ the pref value is adjusted.
Differential Revision: https://phabricator.services.mozilla.com/D259842
This removes the implementation of nsHTMLButtonControlFrame, instead
reusing nsBlockFrame + align-content (or the relevant display type for
flex / grid / columns / etc).
This matches what Blink does and, for the most part, it is trivial.
It requires moving some special cases around, and override inline flow
display, tho so that buttons don't suddenly start fragmenting in the
inline axis.
It adds a tiny fix for a writing-mode mismatch in
nsBlockFrame::AlignContent(), covered by
layout/reftests/writing-mode/1138356-1-button-contents-alignment.html
containing-block-change-button tests are tweaked to avoid overflowing
the 600px viewport from WPT reftests causing scrollbar fuzziness.
contain-layout-baseline-005.html removes the <select> element just like
https://chromium-review.googlesource.com/c/chromium/src/+/5479489
removed the <button>s, since they align the same now, added a test for
that.
Differential Revision: https://phabricator.services.mozilla.com/D257149
... In addition to previous parameters, we need access to the positioned
frame, as well as the containing block's size (If we're in reflow).
Differential Revision: https://phabricator.services.mozilla.com/D249625
This reverts commit ec57e25d89.
Revert "Bug 1923961: Adjust WPT expectations. r=firefox-style-system-reviewers,emilio"
This reverts commit f2612695a7.
Revert "Bug 1923961: Resolve anchor() in calc(). r=firefox-style-system-reviewers,emilio"
This reverts commit b206c5264b.
Revert "Bug 1923961: Initial implementation of anchor lookup for anchor(). r=firefox-style-system-reviewers,emilio"
This reverts commit 56c17701c5.
Revert "Bug 1923961: Make `nsLayoutUtils::GetRectRelativeToFrame` take in const ptrs. r=firefox-style-system-reviewers,emilio"
This reverts commit 34fb773837.
Revert "Bug 1923961: Pass the new AnchorPosResolutionParams to servo side. r=firefox-style-system-reviewers,emilio"
This reverts commit 73477e3296.
Revert "Bug 1923961: Unify anchor resolution parameters and use it for inset resolution. r=layout-reviewers,emilio"
This reverts commit 8461579472.
Revert "Bug 1923961: Expose `AnchorSide` to C++. r=firefox-style-system-reviewers,boris"
This reverts commit 7ecbb38056.
... In addition to previous parameters, we need access to the positioned
frame, as well as the containing block's size (If we're in reflow).
Differential Revision: https://phabricator.services.mozilla.com/D249625
This reverts commit f94a0ccf5a.
Revert "Bug 1923961: Adjust WPT expectations. r=firefox-style-system-reviewers,emilio"
This reverts commit e3e24626a3.
Revert "Bug 1923961: Resolve anchor() in calc(). r=firefox-style-system-reviewers,emilio"
This reverts commit a21f60c569.
Revert "Bug 1923961: Initial implementation of anchor lookup for anchor(). r=firefox-style-system-reviewers,emilio"
This reverts commit daaa53a9ce.
Revert "Bug 1923961: Make `nsLayoutUtils::GetRectRelativeToFrame` take in const ptrs. r=firefox-style-system-reviewers,emilio"
This reverts commit c1db75e7fc.
Revert "Bug 1923961: Pass the new AnchorPosResolutionParams to servo side. r=firefox-style-system-reviewers,emilio"
This reverts commit e0f8f99c69.
Revert "Bug 1923961: Unify anchor resolution parameters and use it for inset resolution. r=layout-reviewers,emilio"
This reverts commit adc70f8493.
Revert "Bug 1923961: Expose `AnchorSide` to C++. r=firefox-style-system-reviewers,boris"
This reverts commit b917ffcec6.
... In addition to previous parameters, we need access to the positioned
frame, as well as the containing block's size (If we're in reflow).
Differential Revision: https://phabricator.services.mozilla.com/D249625
Reasoning with these functions gets confusing, because anchor
functions can become percentage as well as auto.
Defer optimization for now.
Differential Revision: https://phabricator.services.mozilla.com/D237098
Reasoning with these functions gets confusing, because anchor
functions can become percentage as well as auto.
Defer optimization for now.
Differential Revision: https://phabricator.services.mozilla.com/D237098
Reasoning with these functions gets confusing, because anchor
functions can become percentage as well as auto.
Defer optimization for now.
Differential Revision: https://phabricator.services.mozilla.com/D237098