Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1517)

Unified Diff: Source/core/rendering/style/StyleRareInheritedData.cpp

Issue 219633002: Proper support for multiple text decorations. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/style/StyleRareInheritedData.cpp
diff --git a/Source/core/rendering/style/StyleRareInheritedData.cpp b/Source/core/rendering/style/StyleRareInheritedData.cpp
index 5c59d2fd05f4d3cc79aaf89b146f0807c541cf73..b544d0542198bcd829993a98c3a47558900fa6b8 100644
--- a/Source/core/rendering/style/StyleRareInheritedData.cpp
+++ b/Source/core/rendering/style/StyleRareInheritedData.cpp
@@ -22,6 +22,7 @@
#include "config.h"
#include "core/rendering/style/StyleRareInheritedData.h"
+#include "core/rendering/style/AppliedTextDecorationList.h"
#include "core/rendering/style/CursorList.h"
#include "core/rendering/style/QuotesData.h"
#include "core/rendering/style/RenderStyle.h"
@@ -38,7 +39,7 @@ struct SameSizeAsStyleRareInheritedData : public RefCounted<SameSizeAsStyleRareI
Color colors[5];
void* ownPtrs[1];
AtomicString atomicStrings[4];
- void* refPtrs[2];
+ void* refPtrs[3];
Length lengths[1];
float secondFloat;
unsigned m_bitfields[2];
@@ -149,6 +150,7 @@ StyleRareInheritedData::StyleRareInheritedData(const StyleRareInheritedData& o)
, textEmphasisCustomMark(o.textEmphasisCustomMark)
, m_tabSize(o.m_tabSize)
, tapHighlightColor(o.tapHighlightColor)
+ , appliedTextDecorations(o.appliedTextDecorations)
{
}
@@ -165,6 +167,11 @@ static bool cursorDataEquivalent(const CursorList* c1, const CursorList* c2)
return (*c1 == *c2);
}
+static bool appliedTextDecorationsEquivalent(const AppliedTextDecorationList* d1, const AppliedTextDecorationList* d2)
+{
+ return (d1 == d2) || (d1 && d2 && *d1 == *d2);
+}
+
bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const
{
return m_textStrokeColor == o.m_textStrokeColor
@@ -219,7 +226,8 @@ bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const
&& m_imageRendering == o.m_imageRendering
&& m_textUnderlinePosition == o.m_textUnderlinePosition
&& m_rubyPosition == o.m_rubyPosition
- && StyleImage::imagesEquivalent(listStyleImage.get(), o.listStyleImage.get());
+ && StyleImage::imagesEquivalent(listStyleImage.get(), o.listStyleImage.get())
+ && appliedTextDecorationsEquivalent(appliedTextDecorations.get(), o.appliedTextDecorations.get());
}
bool StyleRareInheritedData::shadowDataEquivalent(const StyleRareInheritedData& o) const

Powered by Google App Engine
This is Rietveld 408576698