| 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 b9360ae366f388a9be6a6bdbc77e6fb533e8757b..790406f972eac3309c2e7cd3177b53eabf531c34 100644
|
| --- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
|
| +++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
|
| @@ -79,10 +79,6 @@ struct SameSizeAsComputedStyle : public RefCounted<SameSizeAsComputedStyle> {
|
| void* ownPtrs[1];
|
| void* dataRefSvgStyle;
|
|
|
| - struct InheritedData {
|
| - unsigned m_bitfields[1];
|
| - } m_inheritedData;
|
| -
|
| struct NonInheritedData {
|
| unsigned m_bitfields[1];
|
| } m_nonInheritedData;
|
| @@ -153,7 +149,6 @@ ALWAYS_INLINE ComputedStyle::ComputedStyle(const ComputedStyle& o)
|
| m_rareInheritedData(o.m_rareInheritedData),
|
| m_styleInheritedData(o.m_styleInheritedData),
|
| m_svgStyle(o.m_svgStyle),
|
| - m_inheritedData(o.m_inheritedData),
|
| m_nonInheritedData(o.m_nonInheritedData) {}
|
|
|
| static StyleRecalcChange diffPseudoStyles(const ComputedStyle& oldStyle,
|
| @@ -335,7 +330,6 @@ void ComputedStyle::inheritFrom(const ComputedStyle& inheritParent,
|
| m_rareInheritedData = inheritParent.m_rareInheritedData;
|
| }
|
| m_styleInheritedData = inheritParent.m_styleInheritedData;
|
| - m_inheritedData = inheritParent.m_inheritedData;
|
| if (m_svgStyle != inheritParent.m_svgStyle)
|
| m_svgStyle.access()->inheritFrom(inheritParent.m_svgStyle.get());
|
| }
|
| @@ -477,7 +471,6 @@ bool ComputedStyle::independentInheritedEqual(
|
| bool ComputedStyle::nonIndependentInheritedEqual(
|
| const ComputedStyle& other) const {
|
| return ComputedStyleBase::nonIndependentInheritedEqual(other) &&
|
| - m_inheritedData == other.m_inheritedData &&
|
| m_styleInheritedData == other.m_styleInheritedData &&
|
| m_svgStyle->inheritedEqual(*other.m_svgStyle) &&
|
| m_rareInheritedData == other.m_rareInheritedData;
|
| @@ -501,7 +494,6 @@ bool ComputedStyle::inheritedDataShared(const ComputedStyle& other) const {
|
| // This is a fast check that only looks if the data structures are shared.
|
| // TODO(sashab): Should ComputedStyleBase have an inheritedDataShared method?
|
| return ComputedStyleBase::inheritedEqual(other) &&
|
| - m_inheritedData == other.m_inheritedData &&
|
| m_styleInheritedData.get() == other.m_styleInheritedData.get() &&
|
| m_svgStyle.get() == other.m_svgStyle.get() &&
|
| m_rareInheritedData.get() == other.m_rareInheritedData.get();
|
| @@ -914,7 +906,7 @@ bool ComputedStyle::diffNeedsPaintInvalidationObject(
|
| const ComputedStyle& other) const {
|
| if (visibility() != other.visibility() ||
|
| printColorAdjust() != other.printColorAdjust() ||
|
| - m_inheritedData.m_insideLink != other.m_inheritedData.m_insideLink ||
|
| + insideLink() != other.insideLink() ||
|
| !m_surround->border.visuallyEqual(other.m_surround->border) ||
|
| *m_background != *other.m_background)
|
| return true;
|
| @@ -1066,8 +1058,7 @@ void ComputedStyle::updatePropertySpecificDifferences(
|
| if (m_styleInheritedData->color != other.m_styleInheritedData->color ||
|
| m_styleInheritedData->visitedLinkColor !=
|
| other.m_styleInheritedData->visitedLinkColor ||
|
| - m_inheritedData.m_hasSimpleUnderline !=
|
| - other.m_inheritedData.m_hasSimpleUnderline ||
|
| + m_hasSimpleUnderline != other.m_hasSimpleUnderline ||
|
| m_visual->textDecoration != other.m_visual->textDecoration) {
|
| diff.setTextDecorationOrColorChanged();
|
| } else if (m_rareNonInheritedData.get() !=
|
| @@ -1710,7 +1701,7 @@ FontStretch ComputedStyle::fontStretch() const {
|
| }
|
|
|
| TextDecoration ComputedStyle::textDecorationsInEffect() const {
|
| - if (m_inheritedData.m_hasSimpleUnderline)
|
| + if (m_hasSimpleUnderline)
|
| return TextDecorationUnderline;
|
| if (!m_rareInheritedData->appliedTextDecorations)
|
| return TextDecorationNone;
|
| @@ -1727,7 +1718,7 @@ TextDecoration ComputedStyle::textDecorationsInEffect() const {
|
|
|
| const Vector<AppliedTextDecoration>& ComputedStyle::appliedTextDecorations()
|
| const {
|
| - if (m_inheritedData.m_hasSimpleUnderline) {
|
| + if (m_hasSimpleUnderline) {
|
| DEFINE_STATIC_LOCAL(
|
| Vector<AppliedTextDecoration>, underline,
|
| (1, AppliedTextDecoration(
|
| @@ -2012,8 +2003,7 @@ void ComputedStyle::overrideTextDecorationColors(Color overrideColor) {
|
|
|
| void ComputedStyle::applyTextDecorations(const Color& parentTextDecorationColor,
|
| bool overrideExistingColors) {
|
| - if (getTextDecoration() == TextDecorationNone &&
|
| - !m_inheritedData.m_hasSimpleUnderline &&
|
| + if (getTextDecoration() == TextDecorationNone && !m_hasSimpleUnderline &&
|
| !m_rareInheritedData->appliedTextDecorations)
|
| return;
|
|
|
| @@ -2021,10 +2011,10 @@ void ComputedStyle::applyTextDecorations(const Color& parentTextDecorationColor,
|
| // using m_hasSimpleUnderline.
|
| Color currentTextDecorationColor =
|
| visitedDependentColor(CSSPropertyTextDecorationColor);
|
| - if (m_inheritedData.m_hasSimpleUnderline &&
|
| + if (m_hasSimpleUnderline &&
|
| (getTextDecoration() != TextDecorationNone ||
|
| currentTextDecorationColor != parentTextDecorationColor)) {
|
| - m_inheritedData.m_hasSimpleUnderline = false;
|
| + m_hasSimpleUnderline = false;
|
| addAppliedTextDecoration(AppliedTextDecoration(TextDecorationUnderline,
|
| TextDecorationStyleSolid,
|
| parentTextDecorationColor));
|
| @@ -2033,7 +2023,7 @@ void ComputedStyle::applyTextDecorations(const Color& parentTextDecorationColor,
|
| overrideTextDecorationColors(currentTextDecorationColor);
|
| if (getTextDecoration() == TextDecorationNone)
|
| return;
|
| - DCHECK(!m_inheritedData.m_hasSimpleUnderline);
|
| + DCHECK(!m_hasSimpleUnderline);
|
| // To save memory, we don't use AppliedTextDecoration objects in the common
|
| // case of a single simple underline of currentColor.
|
| TextDecoration decorationLines = getTextDecoration();
|
| @@ -2042,7 +2032,7 @@ void ComputedStyle::applyTextDecorations(const Color& parentTextDecorationColor,
|
| decorationStyle == TextDecorationStyleSolid &&
|
| textDecorationColor().isCurrentColor();
|
| if (isSimpleUnderline && !m_rareInheritedData->appliedTextDecorations) {
|
| - m_inheritedData.m_hasSimpleUnderline = true;
|
| + m_hasSimpleUnderline = true;
|
| return;
|
| }
|
|
|
| @@ -2051,7 +2041,7 @@ void ComputedStyle::applyTextDecorations(const Color& parentTextDecorationColor,
|
| }
|
|
|
| void ComputedStyle::clearAppliedTextDecorations() {
|
| - m_inheritedData.m_hasSimpleUnderline = false;
|
| + m_hasSimpleUnderline = false;
|
|
|
| if (m_rareInheritedData->appliedTextDecorations)
|
| m_rareInheritedData.access()->appliedTextDecorations = nullptr;
|
| @@ -2059,8 +2049,7 @@ void ComputedStyle::clearAppliedTextDecorations() {
|
|
|
| void ComputedStyle::restoreParentTextDecorations(
|
| const ComputedStyle& parentStyle) {
|
| - m_inheritedData.m_hasSimpleUnderline =
|
| - parentStyle.m_inheritedData.m_hasSimpleUnderline;
|
| + m_hasSimpleUnderline = parentStyle.m_hasSimpleUnderline;
|
| if (m_rareInheritedData->appliedTextDecorations !=
|
| parentStyle.m_rareInheritedData->appliedTextDecorations)
|
| m_rareInheritedData.access()->appliedTextDecorations =
|
|
|