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

Unified Diff: Source/core/layout/LayoutObject.cpp

Issue 950623002: Store resolved color in AppliedTextDecoration (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: removed inherited_flags.m_textunderline Created 5 years, 7 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/layout/LayoutObject.cpp
diff --git a/Source/core/layout/LayoutObject.cpp b/Source/core/layout/LayoutObject.cpp
index 495e2c0b694dbc745bee90ac66cde4ff19cee03e..0d3157b916f5bafe6cd256ea7d785764d04ecc8b 100644
--- a/Source/core/layout/LayoutObject.cpp
+++ b/Source/core/layout/LayoutObject.cpp
@@ -70,6 +70,7 @@
#include "core/layout/LayoutTheme.h"
#include "core/layout/LayoutView.h"
#include "core/layout/compositing/DeprecatedPaintLayerCompositor.h"
+#include "core/style/AppliedTextDecoration.h"
#include "core/style/ContentData.h"
#include "core/style/ShadowList.h"
#include "core/page/AutoscrollController.h"
@@ -2839,18 +2840,18 @@ void LayoutObject::getTextDecorations(unsigned decorations, AppliedTextDecoratio
if (currDecs) {
if (currDecs & TextDecorationUnderline) {
decorations &= ~TextDecorationUnderline;
- underline.color = resultColor;
- underline.style = resultStyle;
+ underline.setColor(resultColor);
+ underline.setStyle(resultStyle);
}
if (currDecs & TextDecorationOverline) {
decorations &= ~TextDecorationOverline;
- overline.color = resultColor;
- overline.style = resultStyle;
+ overline.setColor(resultColor);
+ overline.setStyle(resultStyle);
}
if (currDecs & TextDecorationLineThrough) {
decorations &= ~TextDecorationLineThrough;
- linethrough.color = resultColor;
- linethrough.style = resultStyle;
+ linethrough.setColor(resultColor);
+ linethrough.setStyle(resultStyle);
}
}
if (curr->isRubyText())
@@ -2865,16 +2866,16 @@ void LayoutObject::getTextDecorations(unsigned decorations, AppliedTextDecoratio
styleToUse = curr->style(firstlineStyle);
resultColor = styleToUse->visitedDependentColor(CSSPropertyTextDecorationColor);
if (decorations & TextDecorationUnderline) {
- underline.color = resultColor;
- underline.style = resultStyle;
+ underline.setColor(resultColor);
+ underline.setStyle(resultStyle);
}
if (decorations & TextDecorationOverline) {
- overline.color = resultColor;
- overline.style = resultStyle;
+ overline.setColor(resultColor);
+ overline.setStyle(resultStyle);
}
if (decorations & TextDecorationLineThrough) {
- linethrough.color = resultColor;
- linethrough.style = resultStyle;
+ linethrough.setColor(resultColor);
+ linethrough.setStyle(resultStyle);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698