Set Ready For Review
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Oops... I'm sorry for missing some tests. I'll fix and reactive this CL. Thank @cg...@chromium.org for voting `CQ +2`!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Oops... I'm sorry for missing some tests. I'll fix and reactive this CL. Thank @cg...@chromium.org for voting `CQ +2`!
You're welcome, feel free to ping me if you need another dry run.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Hi, @and...@chromium.org, @cg...@chromium.org. Can I ask how to generate expected images of `third_party/blink/web_tests/css1/text_properties/letter_spacing.html` for every platforms?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Hi, @and...@chromium.org, @cg...@chromium.org. Can I ask how to generate expected images of `third_party/blink/web_tests/css1/text_properties/letter_spacing.html` for every platforms?
As far as I know, if each platform is the same, you can do this[1] to rebaseline locally, otherwise you may need to use tryjobs[2]. Since you don't have trybot permission, you can also let me to run the cq+1 AND copy the expected image into your local code base of each platform manually.
[1]https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_test_expectations.md#Local-manual-rebaselining
[2]https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_test_expectations.md#Rebaselining-using-try-jobs
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Jason LeoHi, @and...@chromium.org, @cg...@chromium.org. Can I ask how to generate expected images of `third_party/blink/web_tests/css1/text_properties/letter_spacing.html` for every platforms?
As far as I know, if each platform is the same, you can do this[1] to rebaseline locally, otherwise you may need to use tryjobs[2]. Since you don't have trybot permission, you can also let me to run the cq+1 AND copy the expected image into your local code base of each platform manually.
[1]https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_test_expectations.md#Local-manual-rebaselining
[2]https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_test_expectations.md#Rebaselining-using-try-jobs
You can click the checks tab to see all checks result, and click one of them, you'll see there's `actual_image`, that is the new baseline you want to replace.
Jason LeoHi, @and...@chromium.org, @cg...@chromium.org. Can I ask how to generate expected images of `third_party/blink/web_tests/css1/text_properties/letter_spacing.html` for every platforms?
Jason LeoAs far as I know, if each platform is the same, you can do this[1] to rebaseline locally, otherwise you may need to use tryjobs[2]. Since you don't have trybot permission, you can also let me to run the cq+1 AND copy the expected image into your local code base of each platform manually.
[1]https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_test_expectations.md#Local-manual-rebaselining
[2]https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_test_expectations.md#Rebaselining-using-try-jobs
You can click the checks tab to see all checks result, and click one of them, you'll see there's `actual_image`, that is the new baseline you want to replace.
Thanks for prompt reply and explanation kindly!
I understand. The each expected result looks different per platform. Would you vote cq+1, please?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
I've updated this CL. Would you vote `cq +1` and review this, please?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Hi @cg...@chromium.org. Would you vote cq+1, please? I've fixed the test by removing redundant affected baselines.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
To achieve this, the type of 'letter-spacing' in FontDescription is
changed from float to Length, allowing proper inheritance and improved
compatibility with computed style resolution.
I'm not sure why need to keep percentages around on the computed style?
https://www.w3.org/TR/css-text-4/#letter-spacing-property says percentages resolve against the computed font-size, which means we can and should resolve them earlier.
I see that we have a WPT with e.g. the following assertion:
```
test_computed_value("letter-spacing", "110%");
```
I don't see how this can be correct. @ko...@chromium.org: thoughts on this?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
To achieve this, the type of 'letter-spacing' in FontDescription is
changed from float to Length, allowing proper inheritance and improved
compatibility with computed style resolution.
I'm not sure why need to keep percentages around on the computed style?
https://www.w3.org/TR/css-text-4/#letter-spacing-property says percentages resolve against the computed font-size, which means we can and should resolve them earlier.
I see that we have a WPT with e.g. the following assertion:
```
test_computed_value("letter-spacing", "110%");
```I don't see how this can be correct. @ko...@chromium.org: thoughts on this?
I think the `letter-spacing` should be computed when child doesn't have `letter-spacing` but parent has, and their font size is different.
The `letter-spacing-percent-001.html` test will be failed if we don't keep the percentages.
Here is failure cases.
```
<style type='text/css'>
div { font-size: 20px; line-height: 1; color: blue; }
small { font-size: 50%; }
</style>
<div style="letter-spacing: 10%">ABC123().*$いろはx x x፡x་x
<small>ABC123().*$いろはx x x፡x་x</small></div>
...
<div style="letter-spacing: 10%; font-size: 0.1em"><div style="font-size: 20px">ABC123().*$いろはx x x፡x་x
<small>ABC123().*$いろはx x x፡x་x</small></div></div>
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
To achieve this, the type of 'letter-spacing' in FontDescription is
changed from float to Length, allowing proper inheritance and improved
compatibility with computed style resolution.
김민성I'm not sure why need to keep percentages around on the computed style?
https://www.w3.org/TR/css-text-4/#letter-spacing-property says percentages resolve against the computed font-size, which means we can and should resolve them earlier.
I see that we have a WPT with e.g. the following assertion:
```
test_computed_value("letter-spacing", "110%");
```I don't see how this can be correct. @ko...@chromium.org: thoughts on this?
I think the `letter-spacing` should be computed when child doesn't have `letter-spacing` but parent has, and their font size is different.
The `letter-spacing-percent-001.html` test will be failed if we don't keep the percentages.
Here is failure cases.
```
<style type='text/css'>
div { font-size: 20px; line-height: 1; color: blue; }
small { font-size: 50%; }
</style><div style="letter-spacing: 10%">ABC123().*$いろはx x x፡x་x
<small>ABC123().*$いろはx x x፡x་x</small></div>
...
<div style="letter-spacing: 10%; font-size: 0.1em"><div style="font-size: 20px">ABC123().*$いろはx x x፡x་x
<small>ABC123().*$いろはx x x፡x་x</small></div></div>
```
Never mind, the spec says "Percentages inherit intact" in a note, I just missed it. You're right.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
To achieve this, the type of 'letter-spacing' in FontDescription is
changed from float to Length, allowing proper inheritance and improved
compatibility with computed style resolution.
김민성I'm not sure why need to keep percentages around on the computed style?
https://www.w3.org/TR/css-text-4/#letter-spacing-property says percentages resolve against the computed font-size, which means we can and should resolve them earlier.
I see that we have a WPT with e.g. the following assertion:
```
test_computed_value("letter-spacing", "110%");
```I don't see how this can be correct. @ko...@chromium.org: thoughts on this?
Anders Hartvoll RuudI think the `letter-spacing` should be computed when child doesn't have `letter-spacing` but parent has, and their font size is different.
The `letter-spacing-percent-001.html` test will be failed if we don't keep the percentages.
Here is failure cases.
```
<style type='text/css'>
div { font-size: 20px; line-height: 1; color: blue; }
small { font-size: 50%; }
</style><div style="letter-spacing: 10%">ABC123().*$いろはx x x፡x་x
<small>ABC123().*$いろはx x x፡x་x</small></div>
...
<div style="letter-spacing: 10%; font-size: 0.1em"><div style="font-size: 20px">ABC123().*$いろはx x x፡x་x
<small>ABC123().*$いろはx x x፡x་x</small></div></div>
```
Never mind, the spec says "Percentages inherit intact" in a note, I just missed it. You're right.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Looks pretty reasonable overall.
// TODO(Minseong): Merge ParseLetterSpacing and ParseWordSpacing if percentagePlease use `TODO(crbug.com/ABC)`.
// TODO(Minseong): Merge ConvertLetterSpacing and ConvertWordSpacing ifcrbug
const CSSPrimitiveValue& primitive_value = To<CSSPrimitiveValue>(value);
if (RuntimeEnabledFeatures::CSSLetterSpacingPercentageEnabled() &&
primitive_value.IsPercentage()) {
return Length::Percent(
primitive_value.ComputePercentage(AdjustedZoomConversionData(state)));
}
if (RuntimeEnabledFeatures::CSSLetterSpacingPercentageEnabled() &&
primitive_value.IsCalculated()) {
const auto* calculation_value =
To<CSSMathFunctionValue>(primitive_value)
.ToCalcValue(AdjustedZoomConversionData(state));
if (primitive_value.HasPercentage()) {
return Length(calculation_value);
}
float computed_font_size =
state.StyleBuilder().GetFontDescription().ComputedSize();
return Length::Fixed(ValueForLength(Length(calculation_value),
LayoutUnit(computed_font_size)));
}
return Length::Fixed(
primitive_value.ComputeLength<float>(state.CssToLengthConversionData()));Shouldn't we just be using `StyleBuilderConverter::ConvertLength` for all of this?
PixelsAndPercent(20.0, 50.0, /* has_explicit_pixels */ true,We should use this style so that clang-tidy can understand it:
```suggestion
PixelsAndPercent(20.0, 50.0, /*has_explicit_pixels=*/ true,
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
// TODO(Minseong): Merge ParseLetterSpacing and ParseWordSpacing if percentage// TODO(Minseong): Merge ConvertLetterSpacing and ConvertWordSpacing if김민성crbug
Done
const CSSPrimitiveValue& primitive_value = To<CSSPrimitiveValue>(value);
if (RuntimeEnabledFeatures::CSSLetterSpacingPercentageEnabled() &&
primitive_value.IsPercentage()) {
return Length::Percent(
primitive_value.ComputePercentage(AdjustedZoomConversionData(state)));
}
if (RuntimeEnabledFeatures::CSSLetterSpacingPercentageEnabled() &&
primitive_value.IsCalculated()) {
const auto* calculation_value =
To<CSSMathFunctionValue>(primitive_value)
.ToCalcValue(AdjustedZoomConversionData(state));
if (primitive_value.HasPercentage()) {
return Length(calculation_value);
}
float computed_font_size =
state.StyleBuilder().GetFontDescription().ComputedSize();
return Length::Fixed(ValueForLength(Length(calculation_value),
LayoutUnit(computed_font_size)));
}
return Length::Fixed(
primitive_value.ComputeLength<float>(state.CssToLengthConversionData()));Shouldn't we just be using `StyleBuilderConverter::ConvertLength` for all of this?
Oh, yes we can use. Thanks!
PixelsAndPercent(20.0, 50.0, /* has_explicit_pixels */ true,We should use this style so that clang-tidy can understand it:
```suggestion
PixelsAndPercent(20.0, 50.0, /*has_explicit_pixels=*/ true,
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +2 |
LGTM
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Just a reminder: do we need a I2S process for this? @and...@chromium.org
Not to land this CL specifically, since it's behind a flag with status:experimental.
But yeah, to set status:stable, we do need an approved I2S.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +2 |
Anders Hartvoll RuudJust a reminder: do we need a I2S process for this? @and...@chromium.org
Not to land this CL specifically, since it's behind a flag with status:experimental.
But yeah, to set status:stable, we do need an approved I2S.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Support percentage values for letter-spacing
This CL implements support for percentage values in the 'letter-spacing'
property, as defined in the CSS Text Module Level 4 spec.
To achieve this, the type of 'letter-spacing' in FontDescription is
changed from float to Length, allowing proper inheritance and improved
compatibility with computed style resolution.
Note: This CL does not implement percentage handling for 'word-spacing'.
Spec: https://www.w3.org/TR/css-text-4/#letter-spacing-property
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Hi, would you review this, please?
Previously, I mistakenly placed the win-10 image under the win directory, which led to incorrect results. This has been fixed.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |