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

Side by Side Diff: third_party/WebKit/Source/core/style/ComputedStyle.h

Issue 2497963002: Add support for multiple text decorations with same line positioning (Closed)
Patch Set: Rebased Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
6 * rights reserved. 6 * rights reserved.
7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 // TODO(sashab): Generate this function. 212 // TODO(sashab): Generate this function.
213 return (m_pointerEvents == other.m_pointerEvents); 213 return (m_pointerEvents == other.m_pointerEvents);
214 } 214 }
215 215
216 inline bool compareEqualNonIndependent(const InheritedData& other) const { 216 inline bool compareEqualNonIndependent(const InheritedData& other) const {
217 return (m_captionSide == other.m_captionSide) && 217 return (m_captionSide == other.m_captionSide) &&
218 (m_listStyleType == other.m_listStyleType) && 218 (m_listStyleType == other.m_listStyleType) &&
219 (m_listStylePosition == other.m_listStylePosition) && 219 (m_listStylePosition == other.m_listStylePosition) &&
220 (m_textAlign == other.m_textAlign) && 220 (m_textAlign == other.m_textAlign) &&
221 (m_textTransform == other.m_textTransform) && 221 (m_textTransform == other.m_textTransform) &&
222 (m_textUnderline == other.m_textUnderline) && 222 (m_hasSimpleUnderline == other.m_hasSimpleUnderline) &&
223 (m_cursorStyle == other.m_cursorStyle) && 223 (m_cursorStyle == other.m_cursorStyle) &&
224 (m_direction == other.m_direction) && 224 (m_direction == other.m_direction) &&
225 (m_whiteSpace == other.m_whiteSpace) && 225 (m_whiteSpace == other.m_whiteSpace) &&
226 (m_borderCollapse == other.m_borderCollapse) && 226 (m_borderCollapse == other.m_borderCollapse) &&
227 (m_boxDirection == other.m_boxDirection) && 227 (m_boxDirection == other.m_boxDirection) &&
228 (m_rtlOrdering == other.m_rtlOrdering) && 228 (m_rtlOrdering == other.m_rtlOrdering) &&
229 (m_printColorAdjust == other.m_printColorAdjust) && 229 (m_printColorAdjust == other.m_printColorAdjust) &&
230 (m_insideLink == other.m_insideLink) && 230 (m_insideLink == other.m_insideLink) &&
231 (m_writingMode == other.m_writingMode); 231 (m_writingMode == other.m_writingMode);
232 } 232 }
233 233
234 unsigned m_captionSide : 2; // ECaptionSide 234 unsigned m_captionSide : 2; // ECaptionSide
235 unsigned m_listStyleType : 7; // EListStyleType 235 unsigned m_listStyleType : 7; // EListStyleType
236 unsigned m_listStylePosition : 1; // EListStylePosition 236 unsigned m_listStylePosition : 1; // EListStylePosition
237 unsigned m_textAlign : 4; // ETextAlign 237 unsigned m_textAlign : 4; // ETextAlign
238 unsigned m_textTransform : 2; // ETextTransform 238 unsigned m_textTransform : 2; // ETextTransform
239 unsigned m_textUnderline : 1; 239 unsigned m_hasSimpleUnderline : 1; // True if 'underline solid' is the only
240 // text decoration on this element.
240 unsigned m_cursorStyle : 6; // ECursor 241 unsigned m_cursorStyle : 6; // ECursor
241 unsigned m_direction : 1; // TextDirection 242 unsigned m_direction : 1; // TextDirection
242 unsigned m_whiteSpace : 3; // EWhiteSpace 243 unsigned m_whiteSpace : 3; // EWhiteSpace
243 unsigned m_borderCollapse : 1; // EBorderCollapse 244 unsigned m_borderCollapse : 1; // EBorderCollapse
244 unsigned m_boxDirection : 1; // EBoxDirection (CSS3 box_direction property, 245 unsigned m_boxDirection : 1; // EBoxDirection (CSS3 box_direction property,
245 // flexible box layout module) 246 // flexible box layout module)
246 // 32 bits 247 // 32 bits
247 248
248 // non CSS2 inherited 249 // non CSS2 inherited
249 unsigned m_rtlOrdering : 1; // Order 250 unsigned m_rtlOrdering : 1; // Order
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 363
363 void setBitDefaults() { 364 void setBitDefaults() {
364 ComputedStyleBase::setBitDefaults(); 365 ComputedStyleBase::setBitDefaults();
365 m_inheritedData.m_captionSide = static_cast<unsigned>(initialCaptionSide()); 366 m_inheritedData.m_captionSide = static_cast<unsigned>(initialCaptionSide());
366 m_inheritedData.m_listStyleType = 367 m_inheritedData.m_listStyleType =
367 static_cast<unsigned>(initialListStyleType()); 368 static_cast<unsigned>(initialListStyleType());
368 m_inheritedData.m_listStylePosition = 369 m_inheritedData.m_listStylePosition =
369 static_cast<unsigned>(initialListStylePosition()); 370 static_cast<unsigned>(initialListStylePosition());
370 m_inheritedData.m_textAlign = initialTextAlign(); 371 m_inheritedData.m_textAlign = initialTextAlign();
371 m_inheritedData.m_textTransform = initialTextTransform(); 372 m_inheritedData.m_textTransform = initialTextTransform();
372 m_inheritedData.m_textUnderline = false; 373 m_inheritedData.m_hasSimpleUnderline = false;
373 m_inheritedData.m_cursorStyle = initialCursor(); 374 m_inheritedData.m_cursorStyle = initialCursor();
374 m_inheritedData.m_direction = initialDirection(); 375 m_inheritedData.m_direction = initialDirection();
375 m_inheritedData.m_whiteSpace = initialWhiteSpace(); 376 m_inheritedData.m_whiteSpace = initialWhiteSpace();
376 m_inheritedData.m_borderCollapse = initialBorderCollapse(); 377 m_inheritedData.m_borderCollapse = initialBorderCollapse();
377 m_inheritedData.m_rtlOrdering = initialRTLOrdering(); 378 m_inheritedData.m_rtlOrdering = initialRTLOrdering();
378 m_inheritedData.m_boxDirection = initialBoxDirection(); 379 m_inheritedData.m_boxDirection = initialBoxDirection();
379 m_inheritedData.m_printColorAdjust = initialPrintColorAdjust(); 380 m_inheritedData.m_printColorAdjust = initialPrintColorAdjust();
380 m_inheritedData.m_pointerEvents = initialPointerEvents(); 381 m_inheritedData.m_pointerEvents = initialPointerEvents();
381 m_inheritedData.m_insideLink = NotInsideLink; 382 m_inheritedData.m_insideLink = NotInsideLink;
382 m_inheritedData.m_writingMode = initialWritingMode(); 383 m_inheritedData.m_writingMode = initialWritingMode();
(...skipping 3171 matching lines...) Expand 10 before | Expand all | Expand 10 after
3554 3555
3555 // Cursor utility functions. 3556 // Cursor utility functions.
3556 CursorList* cursors() const { return m_rareInheritedData->cursorData.get(); } 3557 CursorList* cursors() const { return m_rareInheritedData->cursorData.get(); }
3557 void addCursor(StyleImage*, 3558 void addCursor(StyleImage*,
3558 bool hotSpotSpecified, 3559 bool hotSpotSpecified,
3559 const IntPoint& hotSpot = IntPoint()); 3560 const IntPoint& hotSpot = IntPoint());
3560 void setCursorList(CursorList*); 3561 void setCursorList(CursorList*);
3561 void clearCursorList(); 3562 void clearCursorList();
3562 3563
3563 // Text decoration utility functions. 3564 // Text decoration utility functions.
3564 void applyTextDecorations(); 3565 void applyTextDecorations(const Color& parentTextDecorationColor,
3566 bool overrideExistingColors);
3565 void clearAppliedTextDecorations(); 3567 void clearAppliedTextDecorations();
3566 void restoreParentTextDecorations(const ComputedStyle& parentStyle); 3568 void restoreParentTextDecorations(const ComputedStyle& parentStyle);
3567 const Vector<AppliedTextDecoration>& appliedTextDecorations() const; 3569 const Vector<AppliedTextDecoration>& appliedTextDecorations() const;
3568 TextDecoration textDecorationsInEffect() const; 3570 TextDecoration textDecorationsInEffect() const;
3569 3571
3570 // Overflow utility functions. 3572 // Overflow utility functions.
3571 3573
3572 EOverflow overflowInlineDirection() const { 3574 EOverflow overflowInlineDirection() const {
3573 return isHorizontalWritingMode() ? overflowX() : overflowY(); 3575 return isHorizontalWritingMode() ? overflowX() : overflowY();
3574 } 3576 }
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
3986 } 3988 }
3987 3989
3988 StyleColor decorationColorIncludingFallback(bool visitedLink) const; 3990 StyleColor decorationColorIncludingFallback(bool visitedLink) const;
3989 Color colorIncludingFallback(int colorProperty, bool visitedLink) const; 3991 Color colorIncludingFallback(int colorProperty, bool visitedLink) const;
3990 3992
3991 Color stopColor() const { return svgStyle().stopColor(); } 3993 Color stopColor() const { return svgStyle().stopColor(); }
3992 Color floodColor() const { return svgStyle().floodColor(); } 3994 Color floodColor() const { return svgStyle().floodColor(); }
3993 Color lightingColor() const { return svgStyle().lightingColor(); } 3995 Color lightingColor() const { return svgStyle().lightingColor(); }
3994 3996
3995 void addAppliedTextDecoration(const AppliedTextDecoration&); 3997 void addAppliedTextDecoration(const AppliedTextDecoration&);
3998 void overrideTextDecorationColors(Color propagatedColor);
3996 void applyMotionPathTransform(float originX, 3999 void applyMotionPathTransform(float originX,
3997 float originY, 4000 float originY,
3998 const FloatRect& boundingBox, 4001 const FloatRect& boundingBox,
3999 TransformationMatrix&) const; 4002 TransformationMatrix&) const;
4000 4003
4001 bool scrollAnchorDisablingPropertyChanged(const ComputedStyle& other, 4004 bool scrollAnchorDisablingPropertyChanged(const ComputedStyle& other,
4002 StyleDifference&) const; 4005 StyleDifference&) const;
4003 bool diffNeedsFullLayoutAndPaintInvalidation( 4006 bool diffNeedsFullLayoutAndPaintInvalidation(
4004 const ComputedStyle& other) const; 4007 const ComputedStyle& other) const;
4005 bool diffNeedsFullLayout(const ComputedStyle& other) const; 4008 bool diffNeedsFullLayout(const ComputedStyle& other) const;
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
4104 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); 4107 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1);
4105 } 4108 }
4106 4109
4107 inline bool ComputedStyle::hasPseudoElementStyle() const { 4110 inline bool ComputedStyle::hasPseudoElementStyle() const {
4108 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; 4111 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask;
4109 } 4112 }
4110 4113
4111 } // namespace blink 4114 } // namespace blink
4112 4115
4113 #endif // ComputedStyle_h 4116 #endif // ComputedStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698