diff options
Diffstat (limited to 'WebCore/rendering/style')
-rw-r--r-- | WebCore/rendering/style/RenderStyle.cpp | 5 | ||||
-rw-r--r-- | WebCore/rendering/style/RenderStyle.h | 1 | ||||
-rw-r--r-- | WebCore/rendering/style/RenderStyleConstants.h | 5 |
3 files changed, 10 insertions, 1 deletions
diff --git a/WebCore/rendering/style/RenderStyle.cpp b/WebCore/rendering/style/RenderStyle.cpp index 0952557..712344f 100644 --- a/WebCore/rendering/style/RenderStyle.cpp +++ b/WebCore/rendering/style/RenderStyle.cpp @@ -192,6 +192,11 @@ static inline int pseudoBit(PseudoId pseudo) return 1 << (pseudo - 1); } +bool RenderStyle::hasAnyPublicPseudoStyles() const +{ + return PUBLIC_PSEUDOID_MASK & noninherited_flags._pseudoBits; +} + bool RenderStyle::hasPseudoStyle(PseudoId pseudo) const { ASSERT(pseudo > NOPSEUDO); diff --git a/WebCore/rendering/style/RenderStyle.h b/WebCore/rendering/style/RenderStyle.h index 696a2b7..c7db254 100644 --- a/WebCore/rendering/style/RenderStyle.h +++ b/WebCore/rendering/style/RenderStyle.h @@ -350,6 +350,7 @@ public: bool isStyleAvailable() const; + bool hasAnyPublicPseudoStyles() const; bool hasPseudoStyle(PseudoId pseudo) const; void setHasPseudoStyle(PseudoId pseudo); diff --git a/WebCore/rendering/style/RenderStyleConstants.h b/WebCore/rendering/style/RenderStyleConstants.h index 01862f6..4abbc1c 100644 --- a/WebCore/rendering/style/RenderStyleConstants.h +++ b/WebCore/rendering/style/RenderStyleConstants.h @@ -66,6 +66,7 @@ enum StyleDifferenceContextSensitiveProperty { // Static pseudo styles. Dynamic ones are produced on the fly. enum PseudoId { + // The order must be NOP ID, public IDs, and then internal IDs. NOPSEUDO, FIRST_LINE, FIRST_LETTER, BEFORE, AFTER, SELECTION, FIRST_LINE_INHERITED, SCROLLBAR, FILE_UPLOAD_BUTTON, INPUT_PLACEHOLDER, SLIDER_THUMB, SEARCH_CANCEL_BUTTON, SEARCH_DECORATION, SEARCH_RESULTS_DECORATION, SEARCH_RESULTS_BUTTON, MEDIA_CONTROLS_PANEL, MEDIA_CONTROLS_PLAY_BUTTON, MEDIA_CONTROLS_MUTE_BUTTON, MEDIA_CONTROLS_TIMELINE, MEDIA_CONTROLS_TIMELINE_CONTAINER, @@ -75,7 +76,9 @@ enum PseudoId { MEDIA_CONTROLS_STATUS_DISPLAY, SCROLLBAR_THUMB, SCROLLBAR_BUTTON, SCROLLBAR_TRACK, SCROLLBAR_TRACK_PIECE, SCROLLBAR_CORNER, RESIZER, INPUT_LIST_BUTTON, INNER_SPIN_BUTTON, OUTER_SPIN_BUTTON, - FIRST_INTERNAL_PSEUDOID = FILE_UPLOAD_BUTTON + FIRST_PUBLIC_PSEUDOID = FIRST_LINE, + FIRST_INTERNAL_PSEUDOID = FILE_UPLOAD_BUTTON, + PUBLIC_PSEUDOID_MASK = ((1 << FIRST_INTERNAL_PSEUDOID) - 1) & ~((1 << FIRST_PUBLIC_PSEUDOID) - 1) }; // These have been defined in the order of their precedence for border-collapsing. Do |