| Index: third_party/WebKit/Source/core/style/ComputedStyle.cpp
|
| diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
|
| index 2a4c7e8f79e75f707efc63d35ac22ce03be24bbb..7e05ece156bba41646b0ec1f5c4b76824bd72bc9 100644
|
| --- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
|
| +++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
|
| @@ -78,6 +78,10 @@
|
| void* dataRefs[7];
|
| void* ownPtrs[1];
|
| void* dataRefSvgStyle;
|
| +
|
| + struct NonInheritedData {
|
| + unsigned m_bitfields[1];
|
| + } m_nonInheritedData;
|
| };
|
|
|
| // If this assert fails, it means that size of ComputedStyle has changed. Please
|
| @@ -144,7 +148,8 @@
|
| m_rareNonInheritedData(o.m_rareNonInheritedData),
|
| m_rareInheritedData(o.m_rareInheritedData),
|
| m_styleInheritedData(o.m_styleInheritedData),
|
| - m_svgStyle(o.m_svgStyle) {}
|
| + m_svgStyle(o.m_svgStyle),
|
| + m_nonInheritedData(o.m_nonInheritedData) {}
|
|
|
| static StyleRecalcChange diffPseudoStyles(const ComputedStyle& oldStyle,
|
| const ComputedStyle& newStyle) {
|
| @@ -337,22 +342,23 @@
|
| m_surround = other.m_surround;
|
| m_rareNonInheritedData = other.m_rareNonInheritedData;
|
|
|
| - // The flags are copied one-by-one because they contain
|
| + // The flags are copied one-by-one because m_nonInheritedData.m_contains a
|
| // bunch of stuff other than real style data.
|
| // See comments for each skipped flag below.
|
| -
|
| - // These are not generated in ComputedStyleBase
|
| - setOriginalDisplay(other.originalDisplay());
|
| - setVerticalAlign(other.verticalAlign());
|
| - setHasViewportUnits(other.hasViewportUnits());
|
| - m_hasRemUnits = other.hasRemUnits();
|
| + setOriginalDisplay(
|
| + other.originalDisplay()); // Not generated in ComputedStyleBase.
|
| + setVerticalAlign(
|
| + other.verticalAlign()); // Not generated in ComputedStyleBase
|
| + m_nonInheritedData.m_hasViewportUnits =
|
| + other.m_nonInheritedData.m_hasViewportUnits;
|
| + m_nonInheritedData.m_hasRemUnits = other.m_nonInheritedData.m_hasRemUnits;
|
|
|
| // Correctly set during selector matching:
|
| - // m_styleType
|
| - // m_pseudoBits
|
| + // m_nonInheritedData.m_styleType
|
| + // m_nonInheritedData.m_pseudoBits
|
|
|
| // Set correctly while computing style for children:
|
| - // m_explicitInheritance
|
| + // m_nonInheritedData.m_explicitInheritance
|
|
|
| // unique() styles are not cacheable.
|
| DCHECK(!other.unique());
|
| @@ -373,12 +379,12 @@
|
| // properties here, but the affectedBy flags will be set differently based on
|
| // the matching order of the :-webkit-any components.
|
| //
|
| - // m_emptyState
|
| - // m_affectedByFocus
|
| - // m_affectedByHover
|
| - // m_affectedByActive
|
| - // m_affectedByDrag
|
| - // m_isLink
|
| + // m_nonInheritedData.m_emptyState
|
| + // m_nonInheritedData.m_affectedByFocus
|
| + // m_nonInheritedData.m_affectedByHover
|
| + // m_nonInheritedData.m_affectedByActive
|
| + // m_nonInheritedData.m_affectedByDrag
|
| + // m_nonInheritedData.m_isLink
|
|
|
| if (m_svgStyle != other.m_svgStyle)
|
| m_svgStyle.access()->copyNonInheritedFromCached(other.m_svgStyle.get());
|
|
|