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

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 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 9f80ca593c47a33958f8c9eb025376c01f79dac5..28b52665358dce45a16d073a9089e689294cbeb6 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -2929,63 +2929,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.
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.h ('k') | third_party/WebKit/Source/core/paint/InlineTextBoxPainter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698