Commit c6bacb9a authored by Anders Hartvoll Ruud's avatar Anders Hartvoll Ruud Committed by Commit Bot

Make HasAuthorBackground/Border monotonic_flags

They are currently monotonic flags in practice (for a reason [1]), but
not actually generated as such. This is because the same flags were
set in a non-monotonic way in the old code path in the StyleResolver.

[1] https://crrev.com/1af5ee6fdf9ae9a96911385b8ea634cfdef8a7be

Change-Id: I4ea461b1e7e024ccbc98a26bdfa7982a107609ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2321411Reviewed-by: default avatarXiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/master@{#792596}
parent fe0c8c33
...@@ -165,9 +165,9 @@ void StyleCascade::Apply(CascadeFilter filter) { ...@@ -165,9 +165,9 @@ void StyleCascade::Apply(CascadeFilter filter) {
if (state_.Style()->HasAppearance()) { if (state_.Style()->HasAppearance()) {
if (resolver.AuthorFlags() & CSSProperty::kBackground) if (resolver.AuthorFlags() & CSSProperty::kBackground)
state_.Style()->SetHasAuthorBackground(true); state_.Style()->SetHasAuthorBackground();
if (resolver.AuthorFlags() & CSSProperty::kBorder) if (resolver.AuthorFlags() & CSSProperty::kBorder)
state_.Style()->SetHasAuthorBorder(true); state_.Style()->SetHasAuthorBorder();
} }
} }
......
...@@ -681,16 +681,12 @@ ...@@ -681,16 +681,12 @@
// Style adjustment for appearance is disabled when certain properties are set. // Style adjustment for appearance is disabled when certain properties are set.
{ {
name: "HasAuthorBackground", name: "HasAuthorBackground",
field_template: "primitive", field_template: "monotonic_flag",
type_name: "bool",
field_group: "*",
default_value: "false", default_value: "false",
}, },
{ {
name: "HasAuthorBorder", name: "HasAuthorBorder",
field_template: "primitive", field_template: "monotonic_flag",
type_name: "bool",
field_group: "*",
default_value: "false", default_value: "false",
}, },
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment