Skip to content

Commit

Permalink
Updated Cargo files
Browse files Browse the repository at this point in the history
Implementation-with-tests

implemented-baseline-source

cargo-files

squahed-commits

Enable baseline-source tests in css-inline-minor code changes

wpt: Enable tests in `/css/css-inline/baseline-source/` (servo#31913)

* updated-baseline-source

* updated-for-tests-with-fmt

rebased-for-tests

minor-change
  • Loading branch information
MunishMummadi committed Apr 1, 2024
1 parent 8c8d68e commit b94b6d3
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 244 deletions.
26 changes: 13 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 12 additions & 6 deletions components/layout_2020/flow/inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ use style::properties::ComputedValues;
use style::values::computed::Length;
use style::values::generics::box_::VerticalAlignKeyword;
use style::values::generics::font::LineHeight;
use style::values::specified::box_::BaselineSource;
use style::values::specified::text::{TextAlignKeyword, TextDecorationLine};
use style::values::specified::{TextAlignLast, TextJustify};
use style::Zero;
Expand Down Expand Up @@ -2143,13 +2144,18 @@ impl IndependentFormattingContext {
/// Picks either the first or the last baseline, depending on `baseline-source`.
/// <https://drafts.csswg.org/css-inline/#baseline-source>
fn pick_baseline(&self, baselines: &Baselines) -> Option<Au> {
// TODO: Currently this only supports the initial `baseline-source: auto`.
if let Self::NonReplaced(non_replaced) = self {
if let NonReplacedFormattingContextContents::Flow(_) = non_replaced.contents {
return baselines.last;
}
match self.style().clone_baseline_source() {
BaselineSource::First => baselines.first,
BaselineSource::Last => baselines.last,
BaselineSource::Auto => {
if let Self::NonReplaced(non_replaced) = self {
if let NonReplacedFormattingContextContents::Flow(_) = non_replaced.contents {
return baselines.last;
}
}
baselines.first
},
}
baselines.first
}

fn get_block_sizes_and_baseline_offset(
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -37,90 +37,3 @@

[Web Animations: property <baseline-source> from [initial\] to [last\] at (1.5) should be [last\]]
expected: FAIL

[CSS Transitions with transition-behavior:allow-discrete: property <baseline-source> from [initial\] to [last\] at (0.5) should be [last\]]
expected: FAIL

[CSS Transitions with transition-behavior:allow-discrete: property <baseline-source> from [initial\] to [last\] at (0.6) should be [last\]]
expected: FAIL

[CSS Transitions with transition-behavior:allow-discrete: property <baseline-source> from [initial\] to [last\] at (1) should be [last\]]
expected: FAIL

[CSS Transitions with transition-behavior:allow-discrete: property <baseline-source> from [initial\] to [last\] at (1.5) should be [last\]]
expected: FAIL

[CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <baseline-source> from [initial\] to [last\] at (0.5) should be [last\]]
expected: FAIL

[CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <baseline-source> from [initial\] to [last\] at (0.6) should be [last\]]
expected: FAIL

[CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <baseline-source> from [initial\] to [last\] at (1) should be [last\]]
expected: FAIL

[CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <baseline-source> from [initial\] to [last\] at (1.5) should be [last\]]
expected: FAIL

[CSS Transitions: property <baseline-source> from [initial\] to [last\] at (-0.3) should be [last\]]
expected: FAIL

[CSS Transitions: property <baseline-source> from [initial\] to [last\] at (0) should be [last\]]
expected: FAIL

[CSS Transitions: property <baseline-source> from [initial\] to [last\] at (0.3) should be [last\]]
expected: FAIL

[CSS Transitions: property <baseline-source> from [initial\] to [last\] at (0.5) should be [last\]]
expected: FAIL

[CSS Transitions: property <baseline-source> from [initial\] to [last\] at (0.6) should be [last\]]
expected: FAIL

[CSS Transitions: property <baseline-source> from [initial\] to [last\] at (1) should be [last\]]
expected: FAIL

[CSS Transitions: property <baseline-source> from [initial\] to [last\] at (1.5) should be [last\]]
expected: FAIL

[CSS Transitions with transition: all: property <baseline-source> from [initial\] to [last\] at (-0.3) should be [last\]]
expected: FAIL

[CSS Transitions with transition: all: property <baseline-source> from [initial\] to [last\] at (0) should be [last\]]
expected: FAIL

[CSS Transitions with transition: all: property <baseline-source> from [initial\] to [last\] at (0.3) should be [last\]]
expected: FAIL

[CSS Transitions with transition: all: property <baseline-source> from [initial\] to [last\] at (0.5) should be [last\]]
expected: FAIL

[CSS Transitions with transition: all: property <baseline-source> from [initial\] to [last\] at (0.6) should be [last\]]
expected: FAIL

[CSS Transitions with transition: all: property <baseline-source> from [initial\] to [last\] at (1) should be [last\]]
expected: FAIL

[CSS Transitions with transition: all: property <baseline-source> from [initial\] to [last\] at (1.5) should be [last\]]
expected: FAIL

[CSS Animations: property <baseline-source> from [initial\] to [last\] at (-0.3) should be [initial\]]
expected: FAIL

[CSS Animations: property <baseline-source> from [initial\] to [last\] at (0) should be [initial\]]
expected: FAIL

[CSS Animations: property <baseline-source> from [initial\] to [last\] at (0.3) should be [initial\]]
expected: FAIL

[CSS Animations: property <baseline-source> from [initial\] to [last\] at (0.5) should be [last\]]
expected: FAIL

[CSS Animations: property <baseline-source> from [initial\] to [last\] at (0.6) should be [last\]]
expected: FAIL

[CSS Animations: property <baseline-source> from [initial\] to [last\] at (1) should be [last\]]
expected: FAIL

[CSS Animations: property <baseline-source> from [initial\] to [last\] at (1.5) should be [last\]]
expected: FAIL

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
[baseline-source-first-001.html]
[.target > * 1]
expected: FAIL

[.target > * 3]
expected: FAIL

[.target > * 5]
expected: FAIL

[.target > * 7]
expected: FAIL

[.target > * 9]
expected: FAIL

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
[.target > * 1]
expected: FAIL

[.target > * 3]
expected: FAIL

[.target > * 5]
expected: FAIL

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,90 +37,3 @@

[Web Animations: property <baseline-source> from [initial\] to [last\] at (1.5) should be [last\]]
expected: FAIL

[CSS Transitions with transition-behavior:allow-discrete: property <baseline-source> from [initial\] to [last\] at (0.5) should be [last\]]
expected: FAIL

[CSS Transitions with transition-behavior:allow-discrete: property <baseline-source> from [initial\] to [last\] at (0.6) should be [last\]]
expected: FAIL

[CSS Transitions with transition-behavior:allow-discrete: property <baseline-source> from [initial\] to [last\] at (1) should be [last\]]
expected: FAIL

[CSS Transitions with transition-behavior:allow-discrete: property <baseline-source> from [initial\] to [last\] at (1.5) should be [last\]]
expected: FAIL

[CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <baseline-source> from [initial\] to [last\] at (0.5) should be [last\]]
expected: FAIL

[CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <baseline-source> from [initial\] to [last\] at (0.6) should be [last\]]
expected: FAIL

[CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <baseline-source> from [initial\] to [last\] at (1) should be [last\]]
expected: FAIL

[CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <baseline-source> from [initial\] to [last\] at (1.5) should be [last\]]
expected: FAIL

[CSS Transitions: property <baseline-source> from [initial\] to [last\] at (-0.3) should be [last\]]
expected: FAIL

[CSS Transitions: property <baseline-source> from [initial\] to [last\] at (0) should be [last\]]
expected: FAIL

[CSS Transitions: property <baseline-source> from [initial\] to [last\] at (0.3) should be [last\]]
expected: FAIL

[CSS Transitions: property <baseline-source> from [initial\] to [last\] at (0.5) should be [last\]]
expected: FAIL

[CSS Transitions: property <baseline-source> from [initial\] to [last\] at (0.6) should be [last\]]
expected: FAIL

[CSS Transitions: property <baseline-source> from [initial\] to [last\] at (1) should be [last\]]
expected: FAIL

[CSS Transitions: property <baseline-source> from [initial\] to [last\] at (1.5) should be [last\]]
expected: FAIL

[CSS Transitions with transition: all: property <baseline-source> from [initial\] to [last\] at (-0.3) should be [last\]]
expected: FAIL

[CSS Transitions with transition: all: property <baseline-source> from [initial\] to [last\] at (0) should be [last\]]
expected: FAIL

[CSS Transitions with transition: all: property <baseline-source> from [initial\] to [last\] at (0.3) should be [last\]]
expected: FAIL

[CSS Transitions with transition: all: property <baseline-source> from [initial\] to [last\] at (0.5) should be [last\]]
expected: FAIL

[CSS Transitions with transition: all: property <baseline-source> from [initial\] to [last\] at (0.6) should be [last\]]
expected: FAIL

[CSS Transitions with transition: all: property <baseline-source> from [initial\] to [last\] at (1) should be [last\]]
expected: FAIL

[CSS Transitions with transition: all: property <baseline-source> from [initial\] to [last\] at (1.5) should be [last\]]
expected: FAIL

[CSS Animations: property <baseline-source> from [initial\] to [last\] at (-0.3) should be [initial\]]
expected: FAIL

[CSS Animations: property <baseline-source> from [initial\] to [last\] at (0) should be [initial\]]
expected: FAIL

[CSS Animations: property <baseline-source> from [initial\] to [last\] at (0.3) should be [initial\]]
expected: FAIL

[CSS Animations: property <baseline-source> from [initial\] to [last\] at (0.5) should be [last\]]
expected: FAIL

[CSS Animations: property <baseline-source> from [initial\] to [last\] at (0.6) should be [last\]]
expected: FAIL

[CSS Animations: property <baseline-source> from [initial\] to [last\] at (1) should be [last\]]
expected: FAIL

[CSS Animations: property <baseline-source> from [initial\] to [last\] at (1.5) should be [last\]]
expected: FAIL

This file was deleted.

0 comments on commit b94b6d3

Please sign in to comment.