Skip to content

Commit

Permalink
updated-for-tests-with-fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
MunishMummadi committed Mar 28, 2024
1 parent fc1e8a4 commit 98c3c13
Show file tree
Hide file tree
Showing 30 changed files with 1,060 additions and 13 deletions.
18 changes: 6 additions & 12 deletions components/layout_2020/flow/inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ use style::properties::ComputedValues;
use style::values::computed::Length;
use style::values::generics::box_::VerticalAlignKeyword;
use style::values::generics::text::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 @@ -2144,18 +2143,13 @@ 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> {
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
},
// 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;
}
}
baselines.first
}

fn get_block_sizes_and_baseline_offset(
Expand Down
2 changes: 1 addition & 1 deletion tests/wpt/include.ini
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ skip: true
[css-highlight-api]
skip: true
[css-inline]
skip: true
skip: false
[css-layout-api]
skip: true
[css-masking]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[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

[.target > * 10]
expected: FAIL

[.target > * 11]
expected: FAIL

[.target > * 13]
expected: FAIL

[.target > * 14]
expected: FAIL

[.target > * 15]
expected: FAIL

[.target > * 17]
expected: FAIL

[.target > * 19]
expected: FAIL

[.target > * 20]
expected: FAIL

[.target > * 21]
expected: FAIL
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
[baseline-source-first-002.html]
[.target > * 1]
expected: FAIL

[.target > * 2]
expected: FAIL

[.target > * 3]
expected: FAIL

[.target > * 4]
expected: FAIL

[.target > * 5]
expected: FAIL

[.target > * 6]
expected: FAIL

[.target > * 7]
expected: FAIL

[.target > * 8]
expected: FAIL

[.target > * 9]
expected: FAIL

[.target > * 11]
expected: FAIL

[.target > * 12]
expected: FAIL

[.target > * 13]
expected: FAIL

[.target > * 15]
expected: FAIL

[.target > * 16]
expected: FAIL

[.target > * 17]
expected: FAIL

[.target > * 18]
expected: FAIL

[.target > * 19]
expected: FAIL

[.target > * 20]
expected: FAIL

[.target > * 21]
expected: FAIL

[.target > * 22]
expected: FAIL
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
[baseline-source-first-003.html]
[.target > * 1]
expected: FAIL

[.target > * 2]
expected: FAIL

[.target > * 3]
expected: FAIL

[.target > * 4]
expected: FAIL

[.target > * 5]
expected: FAIL

[.target > * 6]
expected: FAIL

[.target > * 7]
expected: FAIL

[.target > * 8]
expected: FAIL

[.target > * 9]
expected: FAIL

[.target > * 11]
expected: FAIL

[.target > * 12]
expected: FAIL

[.target > * 13]
expected: FAIL

[.target > * 15]
expected: FAIL

[.target > * 16]
expected: FAIL

[.target > * 17]
expected: FAIL

[.target > * 18]
expected: FAIL

[.target > * 19]
expected: FAIL

[.target > * 20]
expected: FAIL

[.target > * 21]
expected: FAIL

[.target > * 22]
expected: FAIL
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[baseline-source-first-textarea-001.tentative.html]
[.target > * 1]
expected: FAIL

[.target > * 3]
expected: FAIL

[.target > * 5]
expected: FAIL

[.target > * 7]
expected: FAIL

[.target > * 9]
expected: FAIL

[.target > * 11]
expected: FAIL
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[baseline-source-first-textarea-002.tentative.html]
[.target > * 1]
expected: FAIL

[.target > * 2]
expected: FAIL

[.target > * 3]
expected: FAIL

[.target > * 4]
expected: FAIL

[.target > * 5]
expected: FAIL

[.target > * 6]
expected: FAIL

[.target > * 7]
expected: FAIL

[.target > * 8]
expected: FAIL

[.target > * 9]
expected: FAIL

[.target > * 10]
expected: FAIL

[.target > * 11]
expected: FAIL

[.target > * 12]
expected: FAIL
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[baseline-source-first-textarea-003.tentative.html]
[.target > * 1]
expected: FAIL

[.target > * 2]
expected: FAIL

[.target > * 3]
expected: FAIL

[.target > * 4]
expected: FAIL

[.target > * 5]
expected: FAIL

[.target > * 6]
expected: FAIL

[.target > * 7]
expected: FAIL

[.target > * 8]
expected: FAIL

[.target > * 9]
expected: FAIL

[.target > * 10]
expected: FAIL

[.target > * 11]
expected: FAIL

[.target > * 12]
expected: FAIL
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[baseline-source-last-001.html]
[.target > * 3]
expected: FAIL

[.target > * 7]
expected: FAIL

[.target > * 9]
expected: FAIL

[.target > * 10]
expected: FAIL

[.target > * 13]
expected: FAIL

[.target > * 14]
expected: FAIL

[.target > * 15]
expected: FAIL

[.target > * 17]
expected: FAIL

[.target > * 19]
expected: FAIL

[.target > * 20]
expected: FAIL

[.target > * 21]
expected: FAIL
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
[baseline-source-last-002.html]
[.target > * 1]
expected: FAIL

[.target > * 2]
expected: FAIL

[.target > * 3]
expected: FAIL

[.target > * 4]
expected: FAIL

[.target > * 5]
expected: FAIL

[.target > * 6]
expected: FAIL

[.target > * 7]
expected: FAIL

[.target > * 8]
expected: FAIL

[.target > * 9]
expected: FAIL

[.target > * 11]
expected: FAIL

[.target > * 12]
expected: FAIL

[.target > * 13]
expected: FAIL

[.target > * 15]
expected: FAIL

[.target > * 16]
expected: FAIL

[.target > * 17]
expected: FAIL

[.target > * 18]
expected: FAIL

[.target > * 19]
expected: FAIL

[.target > * 20]
expected: FAIL

[.target > * 21]
expected: FAIL

[.target > * 22]
expected: FAIL

0 comments on commit 98c3c13

Please sign in to comment.