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 @@
{
name: "PseudoBits",
field_template: "primitive",
field_size: 8,
field_size: 7,
default_value: "kPseudoIdNone",
type_name: "unsigned",
custom_copy: true,
......
......@@ -3400,8 +3400,6 @@ static scoped_refptr<ComputedStyle> FirstLineStyleForCachedUncachedType(
if (type == kCached) {
// A first-line style is in effect. Cache a first-line style for
// ourselves.
layout_object_for_first_line_style->MutableStyleRef().SetHasPseudoStyle(
kPseudoIdFirstLineInherited);
return layout_object_for_first_line_style->GetCachedPseudoStyle(
kPseudoIdFirstLineInherited, parent_style);
}
......
......@@ -63,8 +63,8 @@ enum StyleRecalcChange {
// Static pseudo styles. Dynamic ones are produced on the fly.
enum PseudoId {
// 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
// ComputedStyle.
// If you add or remove a public ID, you must update the field_size of
// "PseudoBits" in ComputedStyleExtraFields.json5.
kPseudoIdNone,
kPseudoIdFirstLine,
kPseudoIdFirstLetter,
......@@ -72,9 +72,9 @@ enum PseudoId {
kPseudoIdAfter,
kPseudoIdBackdrop,
kPseudoIdSelection,
kPseudoIdFirstLineInherited,
kPseudoIdScrollbar,
// Internal IDs follow:
kPseudoIdFirstLineInherited,
kPseudoIdScrollbarThumb,
kPseudoIdScrollbarButton,
kPseudoIdScrollbarTrack,
......@@ -85,7 +85,7 @@ enum PseudoId {
// Special values follow:
kAfterLastInternalPseudoId,
kFirstPublicPseudoId = kPseudoIdFirstLine,
kFirstInternalPseudoId = kPseudoIdScrollbarThumb,
kFirstInternalPseudoId = kPseudoIdFirstLineInherited,
kElementPseudoIdMask = (1 << (kPseudoIdBefore - kFirstPublicPseudoId)) |
(1 << (kPseudoIdAfter - 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