Title: [118396] trunk/Source/WebCore
Revision
118396
Author
[email protected]
Date
2012-05-24 11:35:10 -0700 (Thu, 24 May 2012)

Log Message

improve StyleRareNonInheritedData bit packing on Windows
https://bugs.webkit.org/show_bug.cgi?id=87322

Reviewed by Eric Seidel.

Accessors for m_runningAcceleratedAnimation and m_hasAspectRatio are on RenderStyle already.

Also reorder the variables in operator== to be consistent with the constructor and header file.
This makes it easier to add or remove values.

No new tests, just refactoring.

* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
(StyleRareNonInheritedData):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (118395 => 118396)


--- trunk/Source/WebCore/ChangeLog	2012-05-24 18:14:36 UTC (rev 118395)
+++ trunk/Source/WebCore/ChangeLog	2012-05-24 18:35:10 UTC (rev 118396)
@@ -1,3 +1,23 @@
+2012-05-24  Tony Chang  <[email protected]>
+
+        improve StyleRareNonInheritedData bit packing on Windows
+        https://bugs.webkit.org/show_bug.cgi?id=87322
+
+        Reviewed by Eric Seidel.
+
+        Accessors for m_runningAcceleratedAnimation and m_hasAspectRatio are on RenderStyle already.
+
+        Also reorder the variables in operator== to be consistent with the constructor and header file.
+        This makes it easier to add or remove values.
+
+        No new tests, just refactoring.
+
+        * rendering/style/StyleRareNonInheritedData.cpp:
+        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
+        (WebCore::StyleRareNonInheritedData::operator==):
+        * rendering/style/StyleRareNonInheritedData.h:
+        (StyleRareNonInheritedData):
+
 2012-05-24  Robert Hogan  <[email protected]>
 
         Negative margin block doesn't properly clear a float enclosed by a previous sibling

Modified: trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp (118395 => 118396)


--- trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp	2012-05-24 18:14:36 UTC (rev 118395)
+++ trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp	2012-05-24 18:35:10 UTC (rev 118396)
@@ -69,10 +69,10 @@
     , m_textCombine(RenderStyle::initialTextCombine())
     , m_wrapFlow(RenderStyle::initialWrapFlow())
     , m_wrapThrough(RenderStyle::initialWrapThrough())
-    , m_hasAspectRatio(false)
 #if USE(ACCELERATED_COMPOSITING)
     , m_runningAcceleratedAnimation(false)
 #endif
+    , m_hasAspectRatio(false)
 {
     m_maskBoxImage.setMaskDefaults();
 }
@@ -136,10 +136,10 @@
     , m_textCombine(o.m_textCombine)
     , m_wrapFlow(o.m_wrapFlow)
     , m_wrapThrough(o.m_wrapThrough)
-    , m_hasAspectRatio(o.m_hasAspectRatio)
 #if USE(ACCELERATED_COMPOSITING)
     , m_runningAcceleratedAnimation(o.m_runningAcceleratedAnimation)
 #endif
+    , m_hasAspectRatio(o.m_hasAspectRatio)
 {
 }
 
@@ -149,11 +149,18 @@
 
 bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) const
 {
-    return lineClamp == o.lineClamp
+    return opacity == o.opacity
+        && m_aspectRatioDenominator == o.m_aspectRatioDenominator
+        && m_aspectRatioNumerator == o.m_aspectRatioNumerator
+        && m_counterIncrement == o.m_counterIncrement
+        && m_counterReset == o.m_counterReset
+        && m_perspective == o.m_perspective
+        && m_perspectiveOriginX == o.m_perspectiveOriginX
+        && m_perspectiveOriginY == o.m_perspectiveOriginY
+        && lineClamp == o.lineClamp
 #if ENABLE(DASHBOARD_SUPPORT)
         && m_dashboardRegions == o.m_dashboardRegions
 #endif
-        && opacity == o.opacity
         && m_deprecatedFlexibleBox == o.m_deprecatedFlexibleBox
         && m_flexibleBox == o.m_flexibleBox
         && m_marquee == o.m_marquee
@@ -166,53 +173,46 @@
         && m_gridItem == o.m_gridItem
         && contentDataEquivalent(o)
         && counterDataEquivalent(o)
-        && userDrag == o.userDrag
-        && textOverflow == o.textOverflow
-        && marginBeforeCollapse == o.marginBeforeCollapse
-        && marginAfterCollapse == o.marginAfterCollapse
-        && matchNearestMailBlockquoteColor == o.matchNearestMailBlockquoteColor
-        && m_appearance == o.m_appearance
-        && m_borderFit == o.m_borderFit
-        && m_textCombine == o.m_textCombine
-        && m_aspectRatioDenominator == o.m_aspectRatioDenominator
-        && m_aspectRatioNumerator == o.m_aspectRatioNumerator
-        && m_counterIncrement == o.m_counterIncrement
-        && m_counterReset == o.m_counterReset
-        && m_hasAspectRatio == o.m_hasAspectRatio
-#if USE(ACCELERATED_COMPOSITING)
-        && !m_runningAcceleratedAnimation && !o.m_runningAcceleratedAnimation
-#endif
         && shadowDataEquivalent(o)
         && reflectionDataEquivalent(o)
         && animationDataEquivalent(o)
         && transitionDataEquivalent(o)
         && m_mask == o.m_mask
         && m_maskBoxImage == o.m_maskBoxImage
-        && (m_transformStyle3D == o.m_transformStyle3D)
-        && (m_backfaceVisibility == o.m_backfaceVisibility)
-        && (m_perspective == o.m_perspective)
-        && (m_perspectiveOriginX == o.m_perspectiveOriginX)
-        && (m_perspectiveOriginY == o.m_perspectiveOriginY)
-        && (m_pageSize == o.m_pageSize)
-        && (m_pageSizeType == o.m_pageSizeType)
-        && (m_flowThread == o.m_flowThread)
-        && (m_regionThread == o.m_regionThread)
-        && (m_regionOverflow == o.m_regionOverflow)
-        && (m_wrapShapeInside == o.m_wrapShapeInside)
-        && (m_wrapShapeOutside == o.m_wrapShapeOutside)
-        && (m_wrapFlow == o.m_wrapFlow)
-        && (m_wrapThrough == o.m_wrapThrough)
-        && (m_wrapMargin == o.m_wrapMargin)
-        && (m_wrapPadding == o.m_wrapPadding)
+        && m_pageSize == o.m_pageSize
+        && m_wrapShapeInside == o.m_wrapShapeInside
+        && m_wrapShapeOutside == o.m_wrapShapeOutside
+        && m_wrapMargin == o.m_wrapMargin
+        && m_wrapPadding == o.m_wrapPadding
         && m_visitedLinkBackgroundColor == o.m_visitedLinkBackgroundColor
         && m_visitedLinkOutlineColor == o.m_visitedLinkOutlineColor
         && m_visitedLinkBorderLeftColor == o.m_visitedLinkBorderLeftColor
         && m_visitedLinkBorderRightColor == o.m_visitedLinkBorderRightColor
         && m_visitedLinkBorderTopColor == o.m_visitedLinkBorderTopColor
         && m_visitedLinkBorderBottomColor == o.m_visitedLinkBorderBottomColor
-        && (m_regionBreakAfter == o.m_regionBreakAfter)
-        && (m_regionBreakBefore == o.m_regionBreakBefore)
-        && (m_regionBreakInside == o.m_regionBreakInside);
+        && m_flowThread == o.m_flowThread
+        && m_regionThread == o.m_regionThread
+        && m_regionOverflow == o.m_regionOverflow
+        && m_regionBreakAfter == o.m_regionBreakAfter
+        && m_regionBreakBefore == o.m_regionBreakBefore
+        && m_regionBreakInside == o.m_regionBreakInside
+        && m_pageSizeType == o.m_pageSizeType
+        && m_transformStyle3D == o.m_transformStyle3D
+        && m_backfaceVisibility == o.m_backfaceVisibility
+        && userDrag == o.userDrag
+        && textOverflow == o.textOverflow
+        && marginBeforeCollapse == o.marginBeforeCollapse
+        && marginAfterCollapse == o.marginAfterCollapse
+        && matchNearestMailBlockquoteColor == o.matchNearestMailBlockquoteColor
+        && m_appearance == o.m_appearance
+        && m_borderFit == o.m_borderFit
+        && m_textCombine == o.m_textCombine
+        && m_wrapFlow == o.m_wrapFlow
+        && m_wrapThrough == o.m_wrapThrough
+#if USE(ACCELERATED_COMPOSITING)
+        && !m_runningAcceleratedAnimation && !o.m_runningAcceleratedAnimation
+#endif
+        && m_hasAspectRatio == o.m_hasAspectRatio;
 }
 
 bool StyleRareNonInheritedData::contentDataEquivalent(const StyleRareNonInheritedData& o) const

Modified: trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h (118395 => 118396)


--- trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h	2012-05-24 18:14:36 UTC (rev 118395)
+++ trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h	2012-05-24 18:35:10 UTC (rev 118396)
@@ -170,10 +170,10 @@
     unsigned m_wrapFlow: 3; // WrapFlow
     unsigned m_wrapThrough: 1; // WrapThrough
 
-    bool m_hasAspectRatio : 1; // Whether or not an aspect ratio has been specified.
 #if USE(ACCELERATED_COMPOSITING)
-    bool m_runningAcceleratedAnimation : 1;
+    unsigned m_runningAcceleratedAnimation : 1;
 #endif
+    unsigned m_hasAspectRatio : 1; // Whether or not an aspect ratio has been specified.
 
 private:
     StyleRareNonInheritedData();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to