Title: [174427] releases/WebKitGTK/webkit-2.6/Source/WebCore
Revision
174427
Author
carlo...@webkit.org
Date
2014-10-08 03:37:20 -0700 (Wed, 08 Oct 2014)

Log Message

Merge r173769 - Add a size check for CSSSelector
https://bugs.webkit.org/show_bug.cgi?id=136882

Patch by Benjamin Poulain <bpoul...@apple.com> on 2014-09-19
Reviewed by Christophe Dumez.

* css/CSSSelector.cpp:

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.6/Source/WebCore/ChangeLog (174426 => 174427)


--- releases/WebKitGTK/webkit-2.6/Source/WebCore/ChangeLog	2014-10-08 10:22:22 UTC (rev 174426)
+++ releases/WebKitGTK/webkit-2.6/Source/WebCore/ChangeLog	2014-10-08 10:37:20 UTC (rev 174427)
@@ -1,3 +1,12 @@
+2014-09-19  Benjamin Poulain  <bpoul...@apple.com>
+
+        Add a size check for CSSSelector
+        https://bugs.webkit.org/show_bug.cgi?id=136882
+
+        Reviewed by Christophe Dumez.
+
+        * css/CSSSelector.cpp:
+
 2014-10-07  Carlos Garcia Campos  <cgar...@igalia.com>
 
         [SOUP] TLS errors should take precedence over HTTP authentication

Modified: releases/WebKitGTK/webkit-2.6/Source/WebCore/css/CSSSelector.cpp (174426 => 174427)


--- releases/WebKitGTK/webkit-2.6/Source/WebCore/css/CSSSelector.cpp	2014-10-08 10:22:22 UTC (rev 174426)
+++ releases/WebKitGTK/webkit-2.6/Source/WebCore/css/CSSSelector.cpp	2014-10-08 10:37:20 UTC (rev 174427)
@@ -42,6 +42,13 @@
 
 using namespace HTMLNames;
 
+struct SameSizeAsCSSSelector {
+    unsigned flags;
+    void* unionPointer;
+};
+
+static_assert(sizeof(CSSSelector) == sizeof(SameSizeAsCSSSelector), "CSSSelector should remain small.");
+
 void CSSSelector::createRareData()
 {
     ASSERT(match() != Tag);

Modified: releases/WebKitGTK/webkit-2.6/Source/WebCore/css/CSSSelector.h (174426 => 174427)


--- releases/WebKitGTK/webkit-2.6/Source/WebCore/css/CSSSelector.h	2014-10-08 10:22:22 UTC (rev 174426)
+++ releases/WebKitGTK/webkit-2.6/Source/WebCore/css/CSSSelector.h	2014-10-08 10:37:20 UTC (rev 174427)
@@ -277,15 +277,15 @@
         void setForPage() { m_isForPage = true; }
 
     private:
-        unsigned m_relation           : 3; // enum Relation
-        mutable unsigned m_match      : 4; // enum Match
-        mutable unsigned m_pseudoType : 8; // PseudoType
-        mutable bool m_parsedNth      : 1; // Used for :nth-*
-        bool m_isLastInSelectorList   : 1;
-        bool m_isLastInTagHistory     : 1;
-        bool m_hasRareData            : 1;
-        bool m_isForPage              : 1;
-        bool m_tagIsForNamespaceRule  : 1;
+        unsigned m_relation              : 3; // enum Relation.
+        mutable unsigned m_match         : 4; // enum Match.
+        mutable unsigned m_pseudoType    : 8; // PseudoType.
+        mutable unsigned m_parsedNth     : 1; // Used for :nth-*.
+        unsigned m_isLastInSelectorList  : 1;
+        unsigned m_isLastInTagHistory    : 1;
+        unsigned m_hasRareData           : 1;
+        unsigned m_isForPage             : 1;
+        unsigned m_tagIsForNamespaceRule : 1;
 
         unsigned specificityForOneSelector() const;
         unsigned specificityForPage() const;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to