type_name: "int",It might be better to represent this as std::optional<int> rather than have the additional field.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
type_name: "int",It might be better to represent this as std::optional<int> rather than have the additional field.
`std:optional<int>` can't represent clamping by both lines and height (e.g. `max-lines: 3 auto`).
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
type_name: "int",Andreu BotellaIt might be better to represent this as std::optional<int> rather than have the additional field.
`std:optional<int>` can't represent clamping by both lines and height (e.g. `max-lines: 3 auto`).
Ah I see - so for something which likely isn't going to be set that much i'd marginally prefer something like:
third_party/blink/renderer/core/style/text_overflow_data.h
(then don't have to write all the inheritance logic etc)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
type_name: "int",Andreu BotellaIt might be better to represent this as std::optional<int> rather than have the additional field.
Ian Kilpatrick`std:optional<int>` can't represent clamping by both lines and height (e.g. `max-lines: 3 auto`).
Ah I see - so for something which likely isn't going to be set that much i'd marginally prefer something like:
third_party/blink/renderer/core/style/text_overflow_data.h(then don't have to write all the inheritance logic etc)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
int data_;So I would rather make this explicit.
e.g. either
```
unsigned lines_ : kLineBits;
unsigned has_auto_ : 1;
```
with this variant you'll need to do `ClampTo<unsigned>(num, 0, 1 << kLineBits)`
or (perhaps preferred)
```
uint16_t lines_;
bool has_auto_;
```
explicit MaxLinesData(int lines, bool has_auto = false) {```suggestion
MaxLinesData(int lines, bool has_auto) {
```
the optional arg variant doesn't appear to be used.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
So I would rather make this explicit.
e.g. either
```
unsigned lines_ : kLineBits;
unsigned has_auto_ : 1;
```with this variant you'll need to do `ClampTo<unsigned>(num, 0, 1 << kLineBits)`
or (perhaps preferred)
```
uint16_t lines_;
bool has_auto_;
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
num_lines = css_parsing_utils::ConsumePositiveInteger(stream, context,likely want:
```
css_parsing_utils::ConsumeIntegerOrNumberCalc(
stream, context, local_context,
CSSPrimitiveValue::ValueRange::kPositiveInteger);
```
so that `line-clamp: round(up, calc(7/2))` works.
ClampTo<uint16_t>(ConvertInteger(state, *num_lines_value)), has_auto);`To<CSSPrimitiveValue>(num_lines_value).ConvertTo<uint16_t>(state.CssToLengthConversionData())`
explicit MaxLinesData(int lines, bool has_auto = false) {```suggestion
MaxLinesData(int lines, bool has_auto) {
```the optional arg variant doesn't appear to be used.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
num_lines = css_parsing_utils::ConsumePositiveInteger(stream, context,likely want:
```
css_parsing_utils::ConsumeIntegerOrNumberCalc(
stream, context, local_context,
CSSPrimitiveValue::ValueRange::kPositiveInteger);
```
so that `line-clamp: round(up, calc(7/2))` works.
`ConsumePositiveInteger` does support math functions.
ClampTo<uint16_t>(ConvertInteger(state, *num_lines_value)), has_auto);`To<CSSPrimitiveValue>(num_lines_value).ConvertTo<uint16_t>(state.CssToLengthConversionData())`
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
num_lines = css_parsing_utils::ConsumePositiveInteger(stream, context,Andreu Botellalikely want:
```
css_parsing_utils::ConsumeIntegerOrNumberCalc(
stream, context, local_context,
CSSPrimitiveValue::ValueRange::kPositiveInteger);
```
so that `line-clamp: round(up, calc(7/2))` works.
`ConsumePositiveInteger` does support math functions.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Exportable changes to web-platform-tests were detected in this CL and a pull request in the upstream repo has been made: https://github.com/web-platform-tests/wpt/pull/59735.
When this CL lands, the bot will automatically merge the PR on GitHub if the required GitHub checks pass; otherwise, ecosystem-infra@ team will triage the failures and may contact you.
WPT Export docs:
https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md#Automatic-export-process
| 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. |
I haven't been able to reproduce this failure, but it seems to be consistent, so I'll take a look.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |