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

Unified Diff: Source/core/rendering/style/RenderStyle.h

Issue 219633002: Proper support for multiple text decorations. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix jchaffraix' issues. Created 6 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
« no previous file with comments | « Source/core/rendering/style/AppliedTextDecoration.cpp ('k') | Source/core/rendering/style/RenderStyle.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/style/RenderStyle.h
diff --git a/Source/core/rendering/style/RenderStyle.h b/Source/core/rendering/style/RenderStyle.h
index 5e432d81ff77c6289874a23d499c49a34c32b581..872c6e9ad8cd47a9e516b1e6c426d7323ab9de00 100644
--- a/Source/core/rendering/style/RenderStyle.h
+++ b/Source/core/rendering/style/RenderStyle.h
@@ -97,6 +97,7 @@ using std::max;
class FilterOperations;
+class AppliedTextDecoration;
class BorderData;
class CounterContent;
class CursorList;
@@ -163,7 +164,7 @@ protected:
&& (_visibility == other._visibility)
&& (_text_align == other._text_align)
&& (_text_transform == other._text_transform)
- && (_text_decorations == other._text_decorations)
+ && (m_textUnderline == other.m_textUnderline)
&& (_cursor_style == other._cursor_style)
&& (_direction == other._direction)
&& (_white_space == other._white_space)
@@ -185,24 +186,24 @@ protected:
unsigned _visibility : 2; // EVisibility
unsigned _text_align : 4; // ETextAlign
unsigned _text_transform : 2; // ETextTransform
- unsigned _text_decorations : TextDecorationBits;
+ unsigned m_textUnderline : 1;
unsigned _cursor_style : 6; // ECursor
unsigned _direction : 1; // TextDirection
unsigned _white_space : 3; // EWhiteSpace
- // 32 bits
unsigned _border_collapse : 1; // EBorderCollapse
unsigned _box_direction : 1; // EBoxDirection (CSS3 box_direction property, flexible box layout module)
+ // 32 bits
// non CSS2 inherited
unsigned m_rtlOrdering : 1; // Order
unsigned m_printColorAdjust : PrintColorAdjustBits;
unsigned _pointerEvents : 4; // EPointerEvents
unsigned _insideLink : 2; // EInsideLink
- // 43 bits
+ // 40 bits
// CSS Text Layout Module Level 3: Vertical writing support
unsigned m_writingMode : 2; // WritingMode
- // 45 bits
+ // 42 bits
} inherited_flags;
// don't inherit
@@ -302,7 +303,7 @@ protected:
inherited_flags._visibility = initialVisibility();
inherited_flags._text_align = initialTextAlign();
inherited_flags._text_transform = initialTextTransform();
- inherited_flags._text_decorations = initialTextDecoration();
+ inherited_flags.m_textUnderline = false;
inherited_flags._cursor_style = initialCursor();
inherited_flags._direction = initialDirection();
inherited_flags._white_space = initialWhiteSpace();
@@ -581,7 +582,9 @@ public:
TextAlignLast textAlignLast() const { return static_cast<TextAlignLast>(rareInheritedData->m_textAlignLast); }
TextJustify textJustify() const { return static_cast<TextJustify>(rareInheritedData->m_textJustify); }
ETextTransform textTransform() const { return static_cast<ETextTransform>(inherited_flags._text_transform); }
- TextDecoration textDecorationsInEffect() const { return static_cast<TextDecoration>(inherited_flags._text_decorations); }
+ TextDecoration textDecorationsInEffect() const;
+ const Vector<AppliedTextDecoration>& appliedTextDecorations() const;
+ bool hasAppliedTextDecorations() const { return appliedTextDecorations().size(); }
TextDecoration textDecoration() const { return static_cast<TextDecoration>(visual->textDecoration); }
TextUnderlinePosition textUnderlinePosition() const { return static_cast<TextUnderlinePosition>(rareInheritedData->m_textUnderlinePosition); }
TextDecorationStyle textDecorationStyle() const { return static_cast<TextDecorationStyle>(rareNonInheritedData->m_textDecorationStyle); }
@@ -1114,8 +1117,9 @@ public:
void setTextAlignLast(TextAlignLast v) { SET_VAR(rareInheritedData, m_textAlignLast, v); }
void setTextJustify(TextJustify v) { SET_VAR(rareInheritedData, m_textJustify, v); }
void setTextTransform(ETextTransform v) { inherited_flags._text_transform = v; }
- void addToTextDecorationsInEffect(TextDecoration v) { inherited_flags._text_decorations |= v; }
- void setTextDecorationsInEffect(TextDecoration v) { inherited_flags._text_decorations = v; }
+ void addAppliedTextDecoration(const AppliedTextDecoration&);
+ void applyTextDecorations();
+ void clearAppliedTextDecorations();
void setTextDecoration(TextDecoration v) { SET_VAR(visual, textDecoration, v); }
void setTextUnderlinePosition(TextUnderlinePosition v) { SET_VAR(rareInheritedData, m_textUnderlinePosition, v); }
void setTextDecorationStyle(TextDecorationStyle v) { SET_VAR(rareNonInheritedData, m_textDecorationStyle, v); }
@@ -1515,7 +1519,8 @@ public:
bool lastChildState() const { return noninherited_flags.lastChildState; }
void setLastChildState() { setUnique(); noninherited_flags.lastChildState = true; }
- StyleColor visitedDependentDecorationColor() const;
+ StyleColor visitedDependentDecorationStyleColor() const;
+ Color visitedDependentDecorationColor() const;
Color visitedDependentColor(int colorProperty) const;
void setHasExplicitlyInheritedProperties() { noninherited_flags.explicitInheritance = true; }
« no previous file with comments | « Source/core/rendering/style/AppliedTextDecoration.cpp ('k') | Source/core/rendering/style/RenderStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698