| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 = static_cast<unsigned>(initialTextAlign()); | 371 m_inheritedData.m_textAlign = static_cast<unsigned>(initialTextAlign()); |
| 371 m_inheritedData.m_textTransform = initialTextTransform(); | 372 m_inheritedData.m_textTransform = initialTextTransform(); |
| 372 m_inheritedData.m_textUnderline = false; | 373 m_inheritedData.m_cursorStyle = static_cast<unsigned>(initialCursor()); |
| 374 m_inheritedData.m_hasSimpleUnderline = false; |
| 373 m_inheritedData.m_cursorStyle = static_cast<unsigned>(initialCursor()); | 375 m_inheritedData.m_cursorStyle = static_cast<unsigned>(initialCursor()); |
| 374 m_inheritedData.m_direction = initialDirection(); | 376 m_inheritedData.m_direction = initialDirection(); |
| 375 m_inheritedData.m_whiteSpace = initialWhiteSpace(); | 377 m_inheritedData.m_whiteSpace = initialWhiteSpace(); |
| 376 m_inheritedData.m_borderCollapse = initialBorderCollapse(); | 378 m_inheritedData.m_borderCollapse = initialBorderCollapse(); |
| 377 m_inheritedData.m_rtlOrdering = initialRTLOrdering(); | 379 m_inheritedData.m_rtlOrdering = initialRTLOrdering(); |
| 378 m_inheritedData.m_boxDirection = initialBoxDirection(); | 380 m_inheritedData.m_boxDirection = initialBoxDirection(); |
| 379 m_inheritedData.m_printColorAdjust = initialPrintColorAdjust(); | 381 m_inheritedData.m_printColorAdjust = initialPrintColorAdjust(); |
| 380 m_inheritedData.m_pointerEvents = initialPointerEvents(); | 382 m_inheritedData.m_pointerEvents = initialPointerEvents(); |
| 381 m_inheritedData.m_insideLink = NotInsideLink; | 383 m_inheritedData.m_insideLink = NotInsideLink; |
| 382 m_inheritedData.m_writingMode = initialWritingMode(); | 384 m_inheritedData.m_writingMode = initialWritingMode(); |
| (...skipping 3175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3558 | 3560 |
| 3559 // Cursor utility functions. | 3561 // Cursor utility functions. |
| 3560 CursorList* cursors() const { return m_rareInheritedData->cursorData.get(); } | 3562 CursorList* cursors() const { return m_rareInheritedData->cursorData.get(); } |
| 3561 void addCursor(StyleImage*, | 3563 void addCursor(StyleImage*, |
| 3562 bool hotSpotSpecified, | 3564 bool hotSpotSpecified, |
| 3563 const IntPoint& hotSpot = IntPoint()); | 3565 const IntPoint& hotSpot = IntPoint()); |
| 3564 void setCursorList(CursorList*); | 3566 void setCursorList(CursorList*); |
| 3565 void clearCursorList(); | 3567 void clearCursorList(); |
| 3566 | 3568 |
| 3567 // Text decoration utility functions. | 3569 // Text decoration utility functions. |
| 3568 void applyTextDecorations(); | 3570 void applyTextDecorations(const Color& parentTextDecorationColor, |
| 3571 bool overrideExistingColors); |
| 3569 void clearAppliedTextDecorations(); | 3572 void clearAppliedTextDecorations(); |
| 3570 void restoreParentTextDecorations(const ComputedStyle& parentStyle); | 3573 void restoreParentTextDecorations(const ComputedStyle& parentStyle); |
| 3571 const Vector<AppliedTextDecoration>& appliedTextDecorations() const; | 3574 const Vector<AppliedTextDecoration>& appliedTextDecorations() const; |
| 3572 TextDecoration textDecorationsInEffect() const; | 3575 TextDecoration textDecorationsInEffect() const; |
| 3573 | 3576 |
| 3574 // Overflow utility functions. | 3577 // Overflow utility functions. |
| 3575 | 3578 |
| 3576 EOverflow overflowInlineDirection() const { | 3579 EOverflow overflowInlineDirection() const { |
| 3577 return isHorizontalWritingMode() ? overflowX() : overflowY(); | 3580 return isHorizontalWritingMode() ? overflowX() : overflowY(); |
| 3578 } | 3581 } |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3990 } | 3993 } |
| 3991 | 3994 |
| 3992 StyleColor decorationColorIncludingFallback(bool visitedLink) const; | 3995 StyleColor decorationColorIncludingFallback(bool visitedLink) const; |
| 3993 Color colorIncludingFallback(int colorProperty, bool visitedLink) const; | 3996 Color colorIncludingFallback(int colorProperty, bool visitedLink) const; |
| 3994 | 3997 |
| 3995 Color stopColor() const { return svgStyle().stopColor(); } | 3998 Color stopColor() const { return svgStyle().stopColor(); } |
| 3996 Color floodColor() const { return svgStyle().floodColor(); } | 3999 Color floodColor() const { return svgStyle().floodColor(); } |
| 3997 Color lightingColor() const { return svgStyle().lightingColor(); } | 4000 Color lightingColor() const { return svgStyle().lightingColor(); } |
| 3998 | 4001 |
| 3999 void addAppliedTextDecoration(const AppliedTextDecoration&); | 4002 void addAppliedTextDecoration(const AppliedTextDecoration&); |
| 4003 void overrideTextDecorationColors(Color propagatedColor); |
| 4000 void applyMotionPathTransform(float originX, | 4004 void applyMotionPathTransform(float originX, |
| 4001 float originY, | 4005 float originY, |
| 4002 const FloatRect& boundingBox, | 4006 const FloatRect& boundingBox, |
| 4003 TransformationMatrix&) const; | 4007 TransformationMatrix&) const; |
| 4004 | 4008 |
| 4005 bool scrollAnchorDisablingPropertyChanged(const ComputedStyle& other, | 4009 bool scrollAnchorDisablingPropertyChanged(const ComputedStyle& other, |
| 4006 StyleDifference&) const; | 4010 StyleDifference&) const; |
| 4007 bool diffNeedsFullLayoutAndPaintInvalidation( | 4011 bool diffNeedsFullLayoutAndPaintInvalidation( |
| 4008 const ComputedStyle& other) const; | 4012 const ComputedStyle& other) const; |
| 4009 bool diffNeedsFullLayout(const ComputedStyle& other) const; | 4013 bool diffNeedsFullLayout(const ComputedStyle& other) const; |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4108 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); | 4112 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); |
| 4109 } | 4113 } |
| 4110 | 4114 |
| 4111 inline bool ComputedStyle::hasPseudoElementStyle() const { | 4115 inline bool ComputedStyle::hasPseudoElementStyle() const { |
| 4112 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; | 4116 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; |
| 4113 } | 4117 } |
| 4114 | 4118 |
| 4115 } // namespace blink | 4119 } // namespace blink |
| 4116 | 4120 |
| 4117 #endif // ComputedStyle_h | 4121 #endif // ComputedStyle_h |
| OLD | NEW |