Skip to content

Commit

Permalink
Add parsing support for grammar and spelling error pseudo-elements
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=265334
rdar://118785399

Reviewed by Tim Nguyen.

Add support for parsing `::grammar-error` and `::spelling-error` behind a
preference.

* LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/highlight-currentcolor-computed-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/highlight-pseudos-computed-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/highlight-pseudos-visited-computed-001-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/parsing/highlight-pseudos-expected.txt:
* Source/JavaScriptCore/inspector/protocol/CSS.json:
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/animation/WebAnimationUtilities.cpp:
(WebCore::compareDeclarativeAnimationOwningElementPositionsInDocumentTreeOrder):
(WebCore::pseudoIdAsString):
* Source/WebCore/animation/WebAnimationUtilities.h:
* Source/WebCore/css/CSSSelector.cpp:
(WebCore::CSSSelector::pseudoId):
(WebCore::CSSSelector::parsePseudoElementType):
* Source/WebCore/css/CSSSelector.h:
* Source/WebCore/css/ComputedStyleExtractor.h:
* Source/WebCore/css/SelectorPseudoElementTypeMap.in:
* Source/WebCore/css/parser/CSSParserContext.cpp:
(WebCore::add):
* Source/WebCore/css/parser/CSSParserContext.h:
* Source/WebCore/css/parser/CSSSelectorParserContext.cpp:
(WebCore::CSSSelectorParserContext::CSSSelectorParserContext):
(WebCore::add):
* Source/WebCore/css/parser/CSSSelectorParserContext.h:
* Source/WebCore/cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::constructFragmentsInternal):
* Source/WebCore/inspector/agents/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::protocolValueForPseudoId):
* Source/WebCore/rendering/style/RenderStyle.h:

Move bits around in `NonInheritedFlags` to remove padding. This ensures new
pseudo ID bits can be added without overflowing the existing bitfield size.

* Source/WebCore/rendering/style/RenderStyleConstants.cpp:
(WebCore::operator<<):
* Source/WebCore/rendering/style/RenderStyleConstants.h:
* Source/WebInspectorUI/UserInterface/Controllers/CSSManager.js:
(WI.CSSManager.displayNameForPseudoId):

Canonical link: https://commits.webkit.org/271271@main
  • Loading branch information
pxlcoder committed Nov 29, 2023
1 parent 98e1d75 commit 56d0d7b
Show file tree
Hide file tree
Showing 22 changed files with 89 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ PASS getComputedStyle() for ::selection at #target1
PASS getComputedStyle() for ::selection at #target2
FAIL getComputedStyle() for ::target-text at #target1 assert_equals: Background color is lime. expected "rgb(0, 255, 0)" but got "rgb(0, 128, 0)"
FAIL getComputedStyle() for ::target-text at #target2 assert_equals: Background color is lime. expected "rgb(0, 255, 0)" but got "rgba(0, 0, 0, 0)"
FAIL getComputedStyle() for ::spelling-error at #target1 assert_equals: Background color is lime. expected "rgb(0, 255, 0)" but got "rgb(0, 128, 0)"
FAIL getComputedStyle() for ::spelling-error at #target2 assert_equals: Background color is lime. expected "rgb(0, 255, 0)" but got "rgba(0, 0, 0, 0)"
FAIL getComputedStyle() for ::grammar-error at #target1 assert_equals: Background color is lime. expected "rgb(0, 255, 0)" but got "rgb(0, 128, 0)"
FAIL getComputedStyle() for ::grammar-error at #target2 assert_equals: Background color is lime. expected "rgb(0, 255, 0)" but got "rgba(0, 0, 0, 0)"
PASS getComputedStyle() for ::spelling-error at #target1
PASS getComputedStyle() for ::spelling-error at #target2
PASS getComputedStyle() for ::grammar-error at #target1
PASS getComputedStyle() for ::grammar-error at #target2
FAIL getComputedStyle() for ::highlight(foo) at #target1 assert_equals: Background color is lime. expected "rgb(0, 255, 0)" but got "rgb(0, 128, 0)"
FAIL getComputedStyle() for ::highlight(foo) at #target2 assert_equals: Background color is lime. expected "rgb(0, 255, 0)" but got "rgba(0, 0, 0, 0)"

Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ PASS getComputedStyle() for ::target-text(foo) should be element's default
PASS getComputedStyle() for ::target-text() should be element's default
PASS getComputedStyle() for :::target-text should be element's default
PASS getComputedStyle() for ::target-text. should be element's default
FAIL getComputedStyle() for ::spelling-error assert_equals: Background color is green. expected "rgb(0, 128, 0)" but got "rgba(0, 0, 0, 0)"
PASS getComputedStyle() for ::spelling-error
PASS getComputedStyle() for ::spelling-error: should be element's default
PASS getComputedStyle() for ::spelling-error) should be element's default
PASS getComputedStyle() for ::spelling-error( should be element's default
PASS getComputedStyle() for ::spelling-error(foo) should be element's default
PASS getComputedStyle() for ::spelling-error() should be element's default
PASS getComputedStyle() for :::spelling-error should be element's default
PASS getComputedStyle() for ::spelling-error. should be element's default
FAIL getComputedStyle() for ::grammar-error assert_equals: Background color is green. expected "rgb(0, 128, 0)" but got "rgba(0, 0, 0, 0)"
PASS getComputedStyle() for ::grammar-error
PASS getComputedStyle() for ::grammar-error: should be element's default
PASS getComputedStyle() for ::grammar-error) should be element's default
PASS getComputedStyle() for ::grammar-error( should be element's default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ PASS getComputedStyle() for ::selection at #target1
PASS getComputedStyle() for ::selection at #target2
FAIL getComputedStyle() for ::target-text at #target1 assert_equals: Color is lime. expected "rgb(0, 255, 0)" but got "rgb(0, 0, 238)"
FAIL getComputedStyle() for ::target-text at #target2 assert_equals: Color is lime. expected "rgb(0, 255, 0)" but got "rgb(0, 0, 238)"
FAIL getComputedStyle() for ::spelling-error at #target1 assert_equals: Color is lime. expected "rgb(0, 255, 0)" but got "rgb(0, 0, 238)"
FAIL getComputedStyle() for ::spelling-error at #target2 assert_equals: Color is lime. expected "rgb(0, 255, 0)" but got "rgb(0, 0, 238)"
FAIL getComputedStyle() for ::grammar-error at #target1 assert_equals: Color is lime. expected "rgb(0, 255, 0)" but got "rgb(0, 0, 238)"
FAIL getComputedStyle() for ::grammar-error at #target2 assert_equals: Color is lime. expected "rgb(0, 255, 0)" but got "rgb(0, 0, 238)"
PASS getComputedStyle() for ::spelling-error at #target1
PASS getComputedStyle() for ::spelling-error at #target2
PASS getComputedStyle() for ::grammar-error at #target1
PASS getComputedStyle() for ::grammar-error at #target2
FAIL getComputedStyle() for ::highlight(foo) at #target1 assert_equals: Color is lime. expected "rgb(0, 255, 0)" but got "rgb(0, 0, 238)"
FAIL getComputedStyle() for ::highlight(foo) at #target2 assert_equals: Color is lime. expected "rgb(0, 255, 0)" but got "rgb(0, 0, 238)"

Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ PASS "::target-text div" should be an invalid selector
PASS "::target-text::after" should be an invalid selector
PASS "::target-text:hover" should be an invalid selector
PASS ":not(::target-text)" should be an invalid selector
FAIL "::spelling-error" should be a valid selector '::spelling-error' is not a valid selector.
FAIL ".a::spelling-error" should be a valid selector '.a::spelling-error' is not a valid selector.
FAIL "div ::spelling-error" should be a valid selector 'div ::spelling-error' is not a valid selector.
FAIL "::part(my-part)::spelling-error" should be a valid selector '::part(my-part)::spelling-error' is not a valid selector.
PASS "::spelling-error" should be a valid selector
PASS ".a::spelling-error" should be a valid selector
PASS "div ::spelling-error" should be a valid selector
PASS "::part(my-part)::spelling-error" should be a valid selector
PASS "::before::spelling-error" should be an invalid selector
PASS "::spelling-error.a" should be an invalid selector
PASS "::spelling-error div" should be an invalid selector
PASS "::spelling-error::after" should be an invalid selector
PASS "::spelling-error:hover" should be an invalid selector
PASS ":not(::spelling-error)" should be an invalid selector
FAIL "::grammar-error" should be a valid selector '::grammar-error' is not a valid selector.
FAIL ".a::grammar-error" should be a valid selector '.a::grammar-error' is not a valid selector.
FAIL "div ::grammar-error" should be a valid selector 'div ::grammar-error' is not a valid selector.
FAIL "::part(my-part)::grammar-error" should be a valid selector '::part(my-part)::grammar-error' is not a valid selector.
PASS "::grammar-error" should be a valid selector
PASS ".a::grammar-error" should be a valid selector
PASS "div ::grammar-error" should be a valid selector
PASS "::part(my-part)::grammar-error" should be a valid selector
PASS "::before::grammar-error" should be an invalid selector
PASS "::grammar-error.a" should be an invalid selector
PASS "::grammar-error div" should be an invalid selector
Expand Down
2 changes: 2 additions & 0 deletions Source/JavaScriptCore/inspector/protocol/CSS.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"enum": [
"first-line",
"first-letter",
"grammar-error",
"highlight",
"marker",
"before",
Expand All @@ -50,6 +51,7 @@
"scrollbar-track",
"scrollbar-track-piece",
"scrollbar-corner",
"spelling-error",
"resizer",
"view-transition",
"view-transition-group",
Expand Down
14 changes: 14 additions & 0 deletions Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2872,6 +2872,20 @@ GoogleAntiFlickerOptimizationQuirkEnabled:
WebCore:
default: true

GrammarAndSpellingPseudoElementsEnabled:
type: bool
status: testable
category: css
humanReadableName: "::grammar-error and ::spelling-error pseudo-elements"
humanReadableDescription: "Enable the ::grammar-error and ::spelling-error CSS pseudo-elements"
defaultValue:
WebKitLegacy:
default: false
WebKit:
default: false
WebCore:
default: false

GraphicsContextFiltersEnabled:
type: bool
status: stable
Expand Down
12 changes: 11 additions & 1 deletion Source/WebCore/animation/WebAnimationUtilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static bool compareDeclarativeAnimationOwningElementPositionsInDocumentTreeOrder
// - any other pseudo-elements not mentioned specifically in this list, sorted in ascending order by the Unicode codepoints that make up each selector
// - ::after
// - element children
enum SortingIndex : uint8_t { NotPseudo, Marker, Before, FirstLetter, FirstLine, Highlight, Scrollbar, Selection, After, Other };
enum SortingIndex : uint8_t { NotPseudo, Marker, Before, FirstLetter, FirstLine, GrammarError, Highlight, Scrollbar, Selection, SpellingError, After, Other };
auto sortingIndex = [](PseudoId pseudoId) -> SortingIndex {
switch (pseudoId) {
case PseudoId::None:
Expand All @@ -74,12 +74,16 @@ static bool compareDeclarativeAnimationOwningElementPositionsInDocumentTreeOrder
return FirstLetter;
case PseudoId::FirstLine:
return FirstLine;
case PseudoId::GrammarError:
return GrammarError;
case PseudoId::Highlight:
return Highlight;
case PseudoId::Scrollbar:
return Scrollbar;
case PseudoId::Selection:
return Selection;
case PseudoId::SpellingError:
return SpellingError;
case PseudoId::After:
return After;
default:
Expand Down Expand Up @@ -287,10 +291,12 @@ String pseudoIdAsString(PseudoId pseudoId)
static NeverDestroyed<const String> before(MAKE_STATIC_STRING_IMPL("::before"));
static NeverDestroyed<const String> firstLetter(MAKE_STATIC_STRING_IMPL("::first-letter"));
static NeverDestroyed<const String> firstLine(MAKE_STATIC_STRING_IMPL("::first-line"));
static NeverDestroyed<const String> grammarError(MAKE_STATIC_STRING_IMPL("::grammar-error"));
static NeverDestroyed<const String> highlight(MAKE_STATIC_STRING_IMPL("::highlight"));
static NeverDestroyed<const String> marker(MAKE_STATIC_STRING_IMPL("::marker"));
static NeverDestroyed<const String> selection(MAKE_STATIC_STRING_IMPL("::selection"));
static NeverDestroyed<const String> scrollbar(MAKE_STATIC_STRING_IMPL("::-webkit-scrollbar"));
static NeverDestroyed<const String> spellingError(MAKE_STATIC_STRING_IMPL("::spelling-error"));
static NeverDestroyed<const String> viewTransition(MAKE_STATIC_STRING_IMPL("::view-transition"));
static NeverDestroyed<const String> viewTransitionGroup(MAKE_STATIC_STRING_IMPL("::view-transition-group"));
static NeverDestroyed<const String> viewTransitionImagePair(MAKE_STATIC_STRING_IMPL("::view-transition-image-pair"));
Expand All @@ -305,6 +311,8 @@ String pseudoIdAsString(PseudoId pseudoId)
return firstLetter;
case PseudoId::FirstLine:
return firstLine;
case PseudoId::GrammarError:
return grammarError;
case PseudoId::Highlight:
return highlight;
case PseudoId::Marker:
Expand All @@ -313,6 +321,8 @@ String pseudoIdAsString(PseudoId pseudoId)
return selection;
case PseudoId::Scrollbar:
return scrollbar;
case PseudoId::SpellingError:
return spellingError;
case PseudoId::ViewTransition:
return viewTransition;
case PseudoId::ViewTransitionGroup:
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/animation/WebAnimationUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

namespace WebCore {

enum class PseudoId : uint16_t;
enum class PseudoId : uint32_t;

class AnimationEventBase;
class Element;
Expand Down
9 changes: 9 additions & 0 deletions Source/WebCore/css/CSSSelector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ PseudoId CSSSelector::pseudoId(PseudoElementType type)
return PseudoId::FirstLine;
case PseudoElementFirstLetter:
return PseudoId::FirstLetter;
case PseudoElementGrammarError:
return PseudoId::GrammarError;
case PseudoElementSpellingError:
return PseudoId::SpellingError;
case PseudoElementSelection:
return PseudoId::Selection;
case PseudoElementHighlight:
Expand Down Expand Up @@ -311,6 +315,11 @@ CSSSelector::PseudoElementType CSSSelector::parsePseudoElementType(StringView na
if (!context.highlightAPIEnabled)
return PseudoElementUnknown;
break;
case PseudoElementGrammarError:
case PseudoElementSpellingError:
if (!context.grammarAndSpellingPseudoElementsEnabled)
return PseudoElementUnknown;
break;
case PseudoElementViewTransition:
case PseudoElementViewTransitionGroup:
case PseudoElementViewTransitionImagePair:
Expand Down
2 changes: 2 additions & 0 deletions Source/WebCore/css/CSSSelector.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ struct PossiblyQuotedIdentifier {
#endif
PseudoElementFirstLetter,
PseudoElementFirstLine,
PseudoElementGrammarError,
PseudoElementHighlight,
PseudoElementMarker,
PseudoElementPart,
Expand All @@ -222,6 +223,7 @@ struct PossiblyQuotedIdentifier {
PseudoElementScrollbarTrackPiece,
PseudoElementSelection,
PseudoElementSlotted,
PseudoElementSpellingError,
PseudoElementViewTransition,
PseudoElementViewTransitionGroup,
PseudoElementViewTransitionImagePair,
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/css/ComputedStyleExtractor.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct PropertyValue;
enum CSSPropertyID : uint16_t;
enum CSSValueID : uint16_t;

enum class PseudoId : uint16_t;
enum class PseudoId : uint32_t;
enum class SVGPaintType : uint8_t;

using CSSValueListBuilder = Vector<Ref<CSSValue>, 4>;
Expand Down
2 changes: 2 additions & 0 deletions Source/WebCore/css/SelectorPseudoElementTypeMap.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ cue
#endif
first-letter
first-line
grammar-error
highlight
marker
part
Expand All @@ -22,6 +23,7 @@ placeholder, PseudoElementWebKitCustom
-webkit-scrollbar-track-piece
selection
slotted
spelling-error
thumb, PseudoElementWebKitCustom
track, PseudoElementWebKitCustom
view-transition
Expand Down
4 changes: 3 additions & 1 deletion Source/WebCore/css/parser/CSSParserContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ CSSParserContext::CSSParserContext(const Document& document, const URL& sheetBas
, sidewaysWritingModesEnabled { document.settings().sidewaysWritingModesEnabled() }
, cssTextWrapPrettyEnabled { document.settings().cssTextWrapPrettyEnabled() }
, highlightAPIEnabled { document.settings().highlightAPIEnabled() }
, grammarAndSpellingPseudoElementsEnabled { document.settings().grammarAndSpellingPseudoElementsEnabled() }
, propertySettings { CSSPropertySettings { document.settings() } }
{
}
Expand Down Expand Up @@ -140,7 +141,8 @@ void add(Hasher& hasher, const CSSParserContext& context)
| context.sidewaysWritingModesEnabled << 24
| context.cssTextWrapPrettyEnabled << 25
| context.highlightAPIEnabled << 26
| (uint64_t)context.mode << 27; // This is multiple bits, so keep it last.
| context.grammarAndSpellingPseudoElementsEnabled << 27
| (uint64_t)context.mode << 28; // This is multiple bits, so keep it last.
add(hasher, context.baseURL, context.charset, context.propertySettings, bits);
}

Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/css/parser/CSSParserContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ struct CSSParserContext {
bool sidewaysWritingModesEnabled : 1 { false };
bool cssTextWrapPrettyEnabled : 1 { false };
bool highlightAPIEnabled : 1 { false };
bool grammarAndSpellingPseudoElementsEnabled : 1 { false };

// Settings, those affecting properties.
CSSPropertySettings propertySettings;
Expand Down
3 changes: 3 additions & 0 deletions Source/WebCore/css/parser/CSSSelectorParserContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ CSSSelectorParserContext::CSSSelectorParserContext(const CSSParserContext& conte
: mode(context.mode)
, cssNestingEnabled(context.cssNestingEnabled)
, focusVisibleEnabled(context.focusVisibleEnabled)
, grammarAndSpellingPseudoElementsEnabled(context.grammarAndSpellingPseudoElementsEnabled)
, hasPseudoClassEnabled(context.hasPseudoClassEnabled)
, highlightAPIEnabled(context.highlightAPIEnabled)
, popoverAttributeEnabled(context.popoverAttributeEnabled)
Expand All @@ -47,6 +48,7 @@ CSSSelectorParserContext::CSSSelectorParserContext(const Document& document)
: mode(document.inQuirksMode() ? HTMLQuirksMode : HTMLStandardMode)
, cssNestingEnabled(document.settings().cssNestingEnabled())
, focusVisibleEnabled(document.settings().focusVisibleEnabled())
, grammarAndSpellingPseudoElementsEnabled(document.settings().grammarAndSpellingPseudoElementsEnabled())
, hasPseudoClassEnabled(document.settings().hasPseudoClassEnabled())
, highlightAPIEnabled(document.settings().highlightAPIEnabled())
, popoverAttributeEnabled(document.settings().popoverAttributeEnabled())
Expand All @@ -60,6 +62,7 @@ void add(Hasher& hasher, const CSSSelectorParserContext& context)
context.mode,
context.cssNestingEnabled,
context.focusVisibleEnabled,
context.grammarAndSpellingPseudoElementsEnabled,
context.hasPseudoClassEnabled,
context.highlightAPIEnabled,
context.popoverAttributeEnabled,
Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/css/parser/CSSSelectorParserContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ struct CSSSelectorParserContext {
CSSParserMode mode { CSSParserMode::HTMLStandardMode };
bool cssNestingEnabled { false };
bool focusVisibleEnabled { false };
bool grammarAndSpellingPseudoElementsEnabled { false };
bool hasPseudoClassEnabled { false };
bool highlightAPIEnabled { false };
bool popoverAttributeEnabled { false };
Expand Down
2 changes: 2 additions & 0 deletions Source/WebCore/cssjit/SelectorCompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1483,6 +1483,7 @@ static FunctionType constructFragmentsInternal(const CSSSelector* rootSelector,
case CSSSelector::PseudoElementBefore:
case CSSSelector::PseudoElementFirstLetter:
case CSSSelector::PseudoElementFirstLine:
case CSSSelector::PseudoElementGrammarError:
case CSSSelector::PseudoElementMarker:
case CSSSelector::PseudoElementResizer:
case CSSSelector::PseudoElementScrollbar:
Expand All @@ -1492,6 +1493,7 @@ static FunctionType constructFragmentsInternal(const CSSSelector* rootSelector,
case CSSSelector::PseudoElementScrollbarTrack:
case CSSSelector::PseudoElementScrollbarTrackPiece:
case CSSSelector::PseudoElementSelection:
case CSSSelector::PseudoElementSpellingError:
case CSSSelector::PseudoElementViewTransition:
case CSSSelector::PseudoElementWebKitCustom:
case CSSSelector::PseudoElementWebKitCustomLegacyPrefixed:
Expand Down
4 changes: 4 additions & 0 deletions Source/WebCore/inspector/agents/InspectorCSSAgent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,8 @@ std::optional<Protocol::CSS::PseudoId> InspectorCSSAgent::protocolValueForPseudo
return Protocol::CSS::PseudoId::FirstLine;
case PseudoId::FirstLetter:
return Protocol::CSS::PseudoId::FirstLetter;
case PseudoId::GrammarError:
return Protocol::CSS::PseudoId::GrammarError;
case PseudoId::Marker:
return Protocol::CSS::PseudoId::Marker;
case PseudoId::Backdrop:
Expand All @@ -426,6 +428,8 @@ std::optional<Protocol::CSS::PseudoId> InspectorCSSAgent::protocolValueForPseudo
return Protocol::CSS::PseudoId::ScrollbarTrackPiece;
case PseudoId::ScrollbarCorner:
return Protocol::CSS::PseudoId::ScrollbarCorner;
case PseudoId::SpellingError:
return Protocol::CSS::PseudoId::SpellingError;
case PseudoId::Resizer:
return Protocol::CSS::PseudoId::Resizer;
case PseudoId::ViewTransition:
Expand Down
8 changes: 4 additions & 4 deletions Source/WebCore/rendering/style/RenderStyle.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ enum class PaintType : uint8_t;
enum class PointerEvents : uint8_t;
enum class PositionType : uint8_t;
enum class PrintColorAdjust : bool;
enum class PseudoId : uint16_t;
enum class PseudoId : uint32_t;
enum class QuoteType : uint8_t;
enum class Resize : uint8_t;
enum class RubyPosition : uint8_t;
Expand Down Expand Up @@ -275,7 +275,7 @@ class CustomPropertyRegistry;
struct ScopedName;
}

constexpr auto PublicPseudoIDBits = 14;
constexpr auto PublicPseudoIDBits = 16;
constexpr auto TextDecorationLineBits = 4;
constexpr auto TextTransformBits = 5;

Expand Down Expand Up @@ -2171,14 +2171,14 @@ class RenderStyle {
unsigned unicodeBidi : 3; // UnicodeBidi
unsigned floating : 3; // Float
unsigned tableLayout : 1; // TableLayoutType
unsigned textDecorationLine : TextDecorationLineBits; // Text decorations defined *only* by this element.

unsigned usesViewportUnits : 1;
unsigned usesContainerUnits : 1;
unsigned isUnique : 1; // Style cannot be shared.
unsigned textDecorationLine : TextDecorationLineBits; // Text decorations defined *only* by this element.
unsigned hasExplicitlyInheritedProperties : 1; // Explicitly inherits a non-inherited property.
unsigned disallowsFastPathInheritance : 1;
unsigned hasContentNone : 1;
unsigned isUnique : 1; // Style cannot be shared.

// Non-property related state bits.
unsigned emptyState : 1;
Expand Down
Loading

0 comments on commit 56d0d7b

Please sign in to comment.