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

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: Resolve decoration colors dynamically. Created 6 years, 8 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 25168214f5378642d8e65a632521e1ae3c293206..6671b636e738a113813b482597afa77ddd5f3f8e 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/AppliedTextDecoration.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];
@@ -151,6 +152,7 @@ StyleRareInheritedData::StyleRareInheritedData(const StyleRareInheritedData& o)
, textEmphasisCustomMark(o.textEmphasisCustomMark)
, m_tabSize(o.m_tabSize)
, tapHighlightColor(o.tapHighlightColor)
+ , appliedTextDecorations(o.appliedTextDecorations)
{
}
@@ -167,6 +169,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
@@ -222,7 +229,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