Commit dd496fe6 authored by Rune Lillesveen's avatar Rune Lillesveen Committed by Commit Bot

[Squad] Make kPseudoIdFirstLineInherited an internal pseudo.

Gets rid of MutableStyleRef() access where we called SetHasPseudo() for
the inherited first-line styles in order to not return early from
GetCachedPseudoStyle.

TEST=fast/css/invalidation/first-line-change-inline-color-inherited.html

Bug: 813068
Change-Id: Ib34d8ae23e6203ccb27511fb3f5580d8d3002500
Reviewed-on: https://chromium-review.googlesource.com/1059249Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558831}
parent 8211f4f7
...@@ -196,7 +196,7 @@ ...@@ -196,7 +196,7 @@
{ {
name: "PseudoBits", name: "PseudoBits",
field_template: "primitive", field_template: "primitive",
field_size: 8, field_size: 7,
default_value: "kPseudoIdNone", default_value: "kPseudoIdNone",
type_name: "unsigned", type_name: "unsigned",
custom_copy: true, custom_copy: true,
......
...@@ -3400,8 +3400,6 @@ static scoped_refptr<ComputedStyle> FirstLineStyleForCachedUncachedType( ...@@ -3400,8 +3400,6 @@ static scoped_refptr<ComputedStyle> FirstLineStyleForCachedUncachedType(
if (type == kCached) { if (type == kCached) {
// A first-line style is in effect. Cache a first-line style for // A first-line style is in effect. Cache a first-line style for
// ourselves. // ourselves.
layout_object_for_first_line_style->MutableStyleRef().SetHasPseudoStyle(
kPseudoIdFirstLineInherited);
return layout_object_for_first_line_style->GetCachedPseudoStyle( return layout_object_for_first_line_style->GetCachedPseudoStyle(
kPseudoIdFirstLineInherited, parent_style); kPseudoIdFirstLineInherited, parent_style);
} }
......
...@@ -63,8 +63,8 @@ enum StyleRecalcChange { ...@@ -63,8 +63,8 @@ enum StyleRecalcChange {
// Static pseudo styles. Dynamic ones are produced on the fly. // Static pseudo styles. Dynamic ones are produced on the fly.
enum PseudoId { enum PseudoId {
// The order must be NOP ID, public IDs, and then internal IDs. // The order must be NOP ID, public IDs, and then internal IDs.
// If you add or remove a public ID, you must update _pseudoBits in // If you add or remove a public ID, you must update the field_size of
// ComputedStyle. // "PseudoBits" in ComputedStyleExtraFields.json5.
kPseudoIdNone, kPseudoIdNone,
kPseudoIdFirstLine, kPseudoIdFirstLine,
kPseudoIdFirstLetter, kPseudoIdFirstLetter,
...@@ -72,9 +72,9 @@ enum PseudoId { ...@@ -72,9 +72,9 @@ enum PseudoId {
kPseudoIdAfter, kPseudoIdAfter,
kPseudoIdBackdrop, kPseudoIdBackdrop,
kPseudoIdSelection, kPseudoIdSelection,
kPseudoIdFirstLineInherited,
kPseudoIdScrollbar, kPseudoIdScrollbar,
// Internal IDs follow: // Internal IDs follow:
kPseudoIdFirstLineInherited,
kPseudoIdScrollbarThumb, kPseudoIdScrollbarThumb,
kPseudoIdScrollbarButton, kPseudoIdScrollbarButton,
kPseudoIdScrollbarTrack, kPseudoIdScrollbarTrack,
...@@ -85,7 +85,7 @@ enum PseudoId { ...@@ -85,7 +85,7 @@ enum PseudoId {
// Special values follow: // Special values follow:
kAfterLastInternalPseudoId, kAfterLastInternalPseudoId,
kFirstPublicPseudoId = kPseudoIdFirstLine, kFirstPublicPseudoId = kPseudoIdFirstLine,
kFirstInternalPseudoId = kPseudoIdScrollbarThumb, kFirstInternalPseudoId = kPseudoIdFirstLineInherited,
kElementPseudoIdMask = (1 << (kPseudoIdBefore - kFirstPublicPseudoId)) | kElementPseudoIdMask = (1 << (kPseudoIdBefore - kFirstPublicPseudoId)) |
(1 << (kPseudoIdAfter - kFirstPublicPseudoId)) | (1 << (kPseudoIdAfter - kFirstPublicPseudoId)) |
(1 << (kPseudoIdBackdrop - kFirstPublicPseudoId)) (1 << (kPseudoIdBackdrop - kFirstPublicPseudoId))
......
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