Chromium Code Reviews| Index: Source/core/layout/LayoutObject.cpp |
| diff --git a/Source/core/layout/LayoutObject.cpp b/Source/core/layout/LayoutObject.cpp |
| index 2fa594d795b58033d5ff04abe59b35de5c51df22..60d21cb97a49ae8ffb45c863ab581ba605fd1e06 100644 |
| --- a/Source/core/layout/LayoutObject.cpp |
| +++ b/Source/core/layout/LayoutObject.cpp |
| @@ -1599,6 +1599,8 @@ StyleDifference LayoutObject::adjustStyleDifference(StyleDifference diff) const |
| if (style()->hasBorder() || style()->hasOutline() |
| || (isText() && !toLayoutText(this)->isAllCollapsibleWhitespace())) |
| diff.setNeedsPaintInvalidationObject(); |
| + if (style()->hasSimpleUnderlineTextDecoration()) |
| + style()->adjustTextDecorationDifference(); |
|
Timothy Loh
2015/03/25 00:26:23
This seems a bit weird. I don't think we should be
|
| } |
| // The answer to layerTypeRequired() for plugins, iframes, and canvas can change without the actual |
| @@ -2763,18 +2765,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()) |
| @@ -2789,16 +2791,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); |
| } |
| } |
| } |