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

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

Issue 1328283005: Add support for multiple text decorations with same line positioning (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 5 years, 3 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: third_party/WebKit/Source/core/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index db3f1b39503cbfd8d2d8035bdc12268837bfb83b..d28fed77ab886d624d1128d6a71dda4a2d071ec0 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -2840,63 +2840,6 @@ PassRefPtr<ComputedStyle> LayoutObject::getUncachedPseudoStyleFromParentOrShadow
return getUncachedPseudoStyle(PseudoStyleRequest(SELECTION));
}
-void LayoutObject::getTextDecorations(unsigned decorations, AppliedTextDecoration& underline, AppliedTextDecoration& overline, AppliedTextDecoration& linethrough, bool quirksMode, bool firstlineStyle)
-{
- LayoutObject* curr = this;
- const ComputedStyle* styleToUse = nullptr;
- unsigned currDecs = TextDecorationNone;
- Color resultColor;
- TextDecorationStyle resultStyle;
- do {
- styleToUse = curr->style(firstlineStyle);
- currDecs = styleToUse->textDecoration();
- currDecs &= decorations;
- resultColor = styleToUse->visitedDependentColor(CSSPropertyTextDecorationColor);
- resultStyle = styleToUse->textDecorationStyle();
- // Parameter 'decorations' is cast as an int to enable the bitwise operations below.
- if (currDecs) {
- if (currDecs & TextDecorationUnderline) {
- decorations &= ~TextDecorationUnderline;
- underline.color = resultColor;
- underline.style = resultStyle;
- }
- if (currDecs & TextDecorationOverline) {
- decorations &= ~TextDecorationOverline;
- overline.color = resultColor;
- overline.style = resultStyle;
- }
- if (currDecs & TextDecorationLineThrough) {
- decorations &= ~TextDecorationLineThrough;
- linethrough.color = resultColor;
- linethrough.style = resultStyle;
- }
- }
- if (curr->isRubyText())
- return;
- curr = curr->parent();
- if (curr && curr->isAnonymousBlock() && toLayoutBlock(curr)->continuation())
- curr = toLayoutBlock(curr)->continuation();
- } while (curr && decorations && (!quirksMode || !curr->node() || (!isHTMLAnchorElement(*curr->node()) && !isHTMLFontElement(*curr->node()))));
-
- // If we bailed out, use the element we bailed out at (typically a <font> or <a> element).
- if (decorations && curr) {
- styleToUse = curr->style(firstlineStyle);
- resultColor = styleToUse->visitedDependentColor(CSSPropertyTextDecorationColor);
- if (decorations & TextDecorationUnderline) {
- underline.color = resultColor;
- underline.style = resultStyle;
- }
- if (decorations & TextDecorationOverline) {
- overline.color = resultColor;
- overline.style = resultStyle;
- }
- if (decorations & TextDecorationLineThrough) {
- linethrough.color = resultColor;
- linethrough.style = resultStyle;
- }
- }
-}
-
void LayoutObject::addAnnotatedRegions(Vector<AnnotatedRegionValue>& regions)
{
// Convert the style regions to absolute coordinates.

Powered by Google App Engine
This is Rietveld 408576698