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

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: Fix review issues. 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 bcc9efce3aba6aee142ffd152b7b6c25697c2425..7c5771125315c5cf3def84d0732f17b3abe98f00 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/DataEquivalency.h"
#include "core/rendering/style/QuotesData.h"
@@ -39,7 +40,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];
@@ -152,6 +153,7 @@ StyleRareInheritedData::StyleRareInheritedData(const StyleRareInheritedData& o)
, textEmphasisCustomMark(o.textEmphasisCustomMark)
, m_tabSize(o.m_tabSize)
, tapHighlightColor(o.tapHighlightColor)
+ , appliedTextDecorations(o.appliedTextDecorations)
{
}
@@ -159,6 +161,11 @@ StyleRareInheritedData::~StyleRareInheritedData()
{
}
+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
@@ -214,7 +221,8 @@ bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const
&& m_imageRendering == o.m_imageRendering
&& m_textUnderlinePosition == o.m_textUnderlinePosition
&& m_rubyPosition == o.m_rubyPosition
- && dataEquivalent(listStyleImage.get(), o.listStyleImage.get());
+ && dataEquivalent(listStyleImage.get(), o.listStyleImage.get())
+ && appliedTextDecorationsEquivalent(appliedTextDecorations.get(), o.appliedTextDecorations.get());
Julien - ping for review 2014/05/05 17:45:08 I think dataEquivalent(appliedTextDecorations, o.a
andersr 2014/05/06 13:15:29 Done.
}
bool StyleRareInheritedData::shadowDataEquivalent(const StyleRareInheritedData& o) const

Powered by Google App Engine
This is Rietveld 408576698