Optimzie SelectorCheckingContext memory layout
authorshinyak@chromium.org <shinyak@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Oct 2012 07:47:59 +0000 (07:47 +0000)
committershinyak@chromium.org <shinyak@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Oct 2012 07:47:59 +0000 (07:47 +0000)
https://bugs.webkit.org/show_bug.cgi?id=99139

Reviewed by Hajime Morita.

Since VisitedMatchType and PseudoId are both enum, we can make SelectorChecker more compact
if these two fields are continuously placed.

No new tests, no change in behavior.

* css/SelectorChecker.h:
(WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
(SelectorCheckingContext):

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

Source/WebCore/ChangeLog
Source/WebCore/css/SelectorChecker.h

index 2adecaf..3d699bc 100644 (file)
@@ -1,3 +1,19 @@
+2012-10-12  Shinya Kawanaka  <shinyak@chromium.org>
+
+        Optimzie SelectorCheckingContext memory layout
+        https://bugs.webkit.org/show_bug.cgi?id=99139
+
+        Reviewed by Hajime Morita.
+
+        Since VisitedMatchType and PseudoId are both enum, we can make SelectorChecker more compact
+        if these two fields are continuously placed.
+
+        No new tests, no change in behavior.
+
+        * css/SelectorChecker.h:
+        (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
+        (SelectorCheckingContext):
+
 2012-10-12  Kenichi Ishibashi  <bashi@chromium.org>
 
         [WebSocket] Add "Cache-Control: no-cache" to handshake request
index c4e8f30..dccf563 100644 (file)
@@ -61,10 +61,10 @@ public:
             , element(element)
             , scope(0)
             , visitedMatchType(visitedMatchType)
+            , pseudoStyle(NOPSEUDO)
             , elementStyle(0)
             , elementParentStyle(0)
             , isSubSelector(false)
-            , pseudoStyle(NOPSEUDO)
             , hasScrollbarPseudo(false)
             , hasSelectionPseudo(false)
         { }
@@ -73,10 +73,10 @@ public:
         Element* element;
         const ContainerNode* scope;
         VisitedMatchType visitedMatchType;
+        PseudoId pseudoStyle;
         RenderStyle* elementStyle;
         RenderStyle* elementParentStyle;
         bool isSubSelector;
-        PseudoId pseudoStyle;
         bool hasScrollbarPseudo;
         bool hasSelectionPseudo;
     };