Make StyleResolver::isValid{Cue, Region}StyleProperty() static, inline, non-member...
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Jul 2017 23:06:29 +0000 (23:06 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Jul 2017 23:06:29 +0000 (23:06 +0000)
https://bugs.webkit.org/show_bug.cgi?id=174827

Reviewed by Simon Fraser.

StyleResolver::isValid{Cue, Region}StyleProperty() access neither instance nor
class data. Moreover, they are private member functions and hence cannot be
used outside of StyleResolver's implementation. So, make these static, inline,
non-member functions.

* css/StyleResolver.cpp:
(WebCore::isValidRegionStyleProperty):
(WebCore::isValidCueStyleProperty):
(WebCore::StyleResolver::CascadedProperties::addMatch):
(WebCore::StyleResolver::isValidRegionStyleProperty): Deleted.
(WebCore::StyleResolver::isValidCueStyleProperty): Deleted.
* css/StyleResolver.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@219892 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/css/StyleResolver.h

index 0019153..5f9fe4b 100644 (file)
@@ -1,3 +1,23 @@
+2017-07-25  Daniel Bates  <dabates@apple.com>
+
+        Make StyleResolver::isValid{Cue, Region}StyleProperty() static, inline, non-member functions
+        https://bugs.webkit.org/show_bug.cgi?id=174827
+
+        Reviewed by Simon Fraser.
+
+        StyleResolver::isValid{Cue, Region}StyleProperty() access neither instance nor
+        class data. Moreover, they are private member functions and hence cannot be
+        used outside of StyleResolver's implementation. So, make these static, inline,
+        non-member functions.
+
+        * css/StyleResolver.cpp:
+        (WebCore::isValidRegionStyleProperty):
+        (WebCore::isValidCueStyleProperty):
+        (WebCore::StyleResolver::CascadedProperties::addMatch):
+        (WebCore::StyleResolver::isValidRegionStyleProperty): Deleted.
+        (WebCore::StyleResolver::isValidCueStyleProperty): Deleted.
+        * css/StyleResolver.h:
+
 2017-07-25  Per Arne Vollan  <pvollan@apple.com>
 
         Dragged links are blurry on 1x displays.
index 323a252..6eabcb1 100644 (file)
@@ -1474,8 +1474,8 @@ inline bool isValidVisitedLinkProperty(CSSPropertyID id)
 }
 
 // http://dev.w3.org/csswg/css3-regions/#the-at-region-style-rule
-// FIXME: add incremental support for other region styling properties.
-inline bool StyleResolver::isValidRegionStyleProperty(CSSPropertyID id)
+// FIXME: Add incremental support for other region styling properties.
+static inline bool isValidRegionStyleProperty(CSSPropertyID id)
 {
     switch (id) {
     case CSSPropertyBackgroundColor:
@@ -1489,7 +1489,7 @@ inline bool StyleResolver::isValidRegionStyleProperty(CSSPropertyID id)
 }
 
 #if ENABLE(VIDEO_TRACK)
-inline bool StyleResolver::isValidCueStyleProperty(CSSPropertyID id)
+static inline bool isValidCueStyleProperty(CSSPropertyID id)
 {
     switch (id) {
     case CSSPropertyBackground:
@@ -2146,10 +2146,10 @@ void StyleResolver::CascadedProperties::addMatch(const MatchResult& matchResult,
         }
         CSSPropertyID propertyID = current.id();
 
-        if (propertyWhitelistType == PropertyWhitelistRegion && !StyleResolver::isValidRegionStyleProperty(propertyID))
+        if (propertyWhitelistType == PropertyWhitelistRegion && !isValidRegionStyleProperty(propertyID))
             continue;
 #if ENABLE(VIDEO_TRACK)
-        if (propertyWhitelistType == PropertyWhitelistCue && !StyleResolver::isValidCueStyleProperty(propertyID))
+        if (propertyWhitelistType == PropertyWhitelistCue && !isValidCueStyleProperty(propertyID))
             continue;
 #endif
 
index 59c8560..7d606a7 100644 (file)
@@ -327,10 +327,6 @@ private:
     void applyCascadedProperties(CascadedProperties&, int firstProperty, int lastProperty, const MatchResult*);
     void cascadeMatches(CascadedProperties&, const MatchResult&, bool important, int startIndex, int endIndex, bool inheritedOnly);
 
-    static bool isValidRegionStyleProperty(CSSPropertyID);
-#if ENABLE(VIDEO_TRACK)
-    static bool isValidCueStyleProperty(CSSPropertyID);
-#endif
     void matchPageRules(MatchResult&, RuleSet*, bool isLeftPage, bool isFirstPage, const String& pageName);
     void matchPageRulesForList(Vector<StyleRulePage*>& matchedRules, const Vector<StyleRulePage*>&, bool isLeftPage, bool isFirstPage, const String& pageName);