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

Unified Diff: Source/core/rendering/RenderObject.cpp

Issue 351213002: Change RenderObject::style(bool) to accept an enum instead (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Renamed enum to OwnOrFirstLineStyle, rebased and got rid of duplicate state on the stack in RootInl… Created 6 years, 5 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
« no previous file with comments | « Source/core/rendering/RenderObject.h ('k') | Source/core/rendering/RenderObjectInlines.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderObject.cpp
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp
index bacc6c588b996b74f4965d55e00ba5bed33a0f97..73c428c61d3fe04a42b18790b390575ad79bdcb0 100644
--- a/Source/core/rendering/RenderObject.cpp
+++ b/Source/core/rendering/RenderObject.cpp
@@ -3070,7 +3070,7 @@ void RenderObject::getTextDecorations(unsigned decorations, AppliedTextDecoratio
Color resultColor;
TextDecorationStyle resultStyle;
do {
- styleToUse = curr->style(firstlineStyle);
+ styleToUse = curr->style(firstlineStyle ? FirstLineStyle : OwnStyle);
currDecs = styleToUse->textDecoration();
currDecs &= decorations;
resultColor = styleToUse->visitedDependentDecorationColor();
@@ -3102,7 +3102,7 @@ void RenderObject::getTextDecorations(unsigned decorations, AppliedTextDecoratio
// If we bailed out, use the element we bailed out at (typically a <font> or <a> element).
if (decorations && curr) {
- styleToUse = curr->style(firstlineStyle);
+ styleToUse = curr->style(firstlineStyle ? FirstLineStyle : OwnStyle);
resultColor = styleToUse->visitedDependentDecorationColor();
if (decorations & TextDecorationUnderline) {
underline.color = resultColor;
« no previous file with comments | « Source/core/rendering/RenderObject.h ('k') | Source/core/rendering/RenderObjectInlines.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698