| 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 r
ights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 } | 450 } |
| 451 LayoutRectOutsets borderImageOutsets() const | 451 LayoutRectOutsets borderImageOutsets() const |
| 452 { | 452 { |
| 453 return imageOutsets(borderImage()); | 453 return imageOutsets(borderImage()); |
| 454 } | 454 } |
| 455 | 455 |
| 456 // Returns |true| if any property that renders using filter operations is | 456 // Returns |true| if any property that renders using filter operations is |
| 457 // used (including, but not limited to, 'filter'). | 457 // used (including, but not limited to, 'filter'). |
| 458 bool hasFilterInducingProperty() const { return hasFilter() || (RuntimeEnabl
edFeatures::cssBoxReflectFilterEnabled() && hasBoxReflect()); } | 458 bool hasFilterInducingProperty() const { return hasFilter() || (RuntimeEnabl
edFeatures::cssBoxReflectFilterEnabled() && hasBoxReflect()); } |
| 459 | 459 |
| 460 // Returns |true| if opacity should be considered to have non-initial value
for the purpose |
| 461 // of creating stacking contexts. |
| 462 bool hasNonInitialOpacity() const { return hasOpacity() || hasWillChangeOpac
ityHint() || hasCurrentOpacityAnimation(); } |
| 463 |
| 464 // Returns whether this style contains any grouping property as defined by [
css-transforms]. |
| 465 // The main purpose of this is to adjust the used value of transform-style p
roperty. |
| 466 // Note: We currently don't include every grouping property on the spec to m
aintain |
| 467 // backward compatibility. |
| 468 // [css-transforms] https://drafts.csswg.org/css-transforms/#grouping-proper
ty-values |
| 469 bool hasGroupingProperty() const { return !isOverflowVisible() || hasFilterI
nducingProperty() || hasNonInitialOpacity(); } |
| 470 |
| 460 Order rtlOrdering() const { return static_cast<Order>(inherited_flags.m_rtlO
rdering); } | 471 Order rtlOrdering() const { return static_cast<Order>(inherited_flags.m_rtlO
rdering); } |
| 461 void setRTLOrdering(Order o) { inherited_flags.m_rtlOrdering = o; } | 472 void setRTLOrdering(Order o) { inherited_flags.m_rtlOrdering = o; } |
| 462 | 473 |
| 463 bool isStyleAvailable() const; | 474 bool isStyleAvailable() const; |
| 464 | 475 |
| 465 bool hasAnyPublicPseudoStyles() const; | 476 bool hasAnyPublicPseudoStyles() const; |
| 466 bool hasPseudoStyle(PseudoId) const; | 477 bool hasPseudoStyle(PseudoId) const; |
| 467 void setHasPseudoStyle(PseudoId); | 478 void setHasPseudoStyle(PseudoId); |
| 468 bool hasUniquePseudoStyle() const; | 479 bool hasUniquePseudoStyle() const; |
| 469 bool hasPseudoElementStyle() const; | 480 bool hasPseudoElementStyle() const; |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 955 | 966 |
| 956 // Apple-specific property getter methods | 967 // Apple-specific property getter methods |
| 957 EPointerEvents pointerEvents() const { return static_cast<EPointerEvents>(in
herited_flags._pointerEvents); } | 968 EPointerEvents pointerEvents() const { return static_cast<EPointerEvents>(in
herited_flags._pointerEvents); } |
| 958 const CSSAnimationData* animations() const { return rareNonInheritedData->m_
animations.get(); } | 969 const CSSAnimationData* animations() const { return rareNonInheritedData->m_
animations.get(); } |
| 959 const CSSTransitionData* transitions() const { return rareNonInheritedData->
m_transitions.get(); } | 970 const CSSTransitionData* transitions() const { return rareNonInheritedData->
m_transitions.get(); } |
| 960 | 971 |
| 961 CSSAnimationData& accessAnimations(); | 972 CSSAnimationData& accessAnimations(); |
| 962 CSSTransitionData& accessTransitions(); | 973 CSSTransitionData& accessTransitions(); |
| 963 | 974 |
| 964 ETransformStyle3D transformStyle3D() const { return static_cast<ETransformSt
yle3D>(rareNonInheritedData->m_transformStyle3D); } | 975 ETransformStyle3D transformStyle3D() const { return static_cast<ETransformSt
yle3D>(rareNonInheritedData->m_transformStyle3D); } |
| 965 bool preserves3D() const { return rareNonInheritedData->m_transformStyle3D =
= TransformStyle3DPreserve3D; } | 976 ETransformStyle3D usedTransformStyle3D() const { return hasGroupingProperty(
) ? TransformStyle3DFlat : transformStyle3D(); } |
| 977 bool preserves3D() const { return usedTransformStyle3D() != TransformStyle3D
Flat; } |
| 966 | 978 |
| 967 EBackfaceVisibility backfaceVisibility() const { return static_cast<EBackfac
eVisibility>(rareNonInheritedData->m_backfaceVisibility); } | 979 EBackfaceVisibility backfaceVisibility() const { return static_cast<EBackfac
eVisibility>(rareNonInheritedData->m_backfaceVisibility); } |
| 968 float perspective() const { return rareNonInheritedData->m_perspective; } | 980 float perspective() const { return rareNonInheritedData->m_perspective; } |
| 969 bool hasPerspective() const { return rareNonInheritedData->m_perspective > 0
; } | 981 bool hasPerspective() const { return rareNonInheritedData->m_perspective > 0
; } |
| 970 const LengthPoint& perspectiveOrigin() const { return rareNonInheritedData->
m_perspectiveOrigin; } | 982 const LengthPoint& perspectiveOrigin() const { return rareNonInheritedData->
m_perspectiveOrigin; } |
| 971 const Length& perspectiveOriginX() const { return perspectiveOrigin().x(); } | 983 const Length& perspectiveOriginX() const { return perspectiveOrigin().x(); } |
| 972 const Length& perspectiveOriginY() const { return perspectiveOrigin().y(); } | 984 const Length& perspectiveOriginY() const { return perspectiveOrigin().y(); } |
| 973 const FloatSize& pageSize() const { return rareNonInheritedData->m_pageSize;
} | 985 const FloatSize& pageSize() const { return rareNonInheritedData->m_pageSize;
} |
| 974 PageSizeType getPageSizeType() const { return static_cast<PageSizeType>(rare
NonInheritedData->m_pageSizeType); } | 986 PageSizeType getPageSizeType() const { return static_cast<PageSizeType>(rare
NonInheritedData->m_pageSizeType); } |
| 975 | 987 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1023 ScrollSnapType getScrollSnapType() const { return static_cast<ScrollSnapType
>(rareNonInheritedData->m_scrollSnapType); } | 1035 ScrollSnapType getScrollSnapType() const { return static_cast<ScrollSnapType
>(rareNonInheritedData->m_scrollSnapType); } |
| 1024 const ScrollSnapPoints& scrollSnapPointsX() const { return rareNonInheritedD
ata->m_scrollSnap->m_xPoints; } | 1036 const ScrollSnapPoints& scrollSnapPointsX() const { return rareNonInheritedD
ata->m_scrollSnap->m_xPoints; } |
| 1025 const ScrollSnapPoints& scrollSnapPointsY() const { return rareNonInheritedD
ata->m_scrollSnap->m_yPoints; } | 1037 const ScrollSnapPoints& scrollSnapPointsY() const { return rareNonInheritedD
ata->m_scrollSnap->m_yPoints; } |
| 1026 const Vector<LengthPoint>& scrollSnapCoordinate() const { return rareNonInhe
ritedData->m_scrollSnap->m_coordinates; } | 1038 const Vector<LengthPoint>& scrollSnapCoordinate() const { return rareNonInhe
ritedData->m_scrollSnap->m_coordinates; } |
| 1027 const LengthPoint& scrollSnapDestination() const { return rareNonInheritedDa
ta->m_scrollSnap->m_destination; } | 1039 const LengthPoint& scrollSnapDestination() const { return rareNonInheritedDa
ta->m_scrollSnap->m_destination; } |
| 1028 | 1040 |
| 1029 const Vector<CSSPropertyID>& willChangeProperties() const { return rareNonIn
heritedData->m_willChange->m_properties; } | 1041 const Vector<CSSPropertyID>& willChangeProperties() const { return rareNonIn
heritedData->m_willChange->m_properties; } |
| 1030 bool willChangeContents() const { return rareNonInheritedData->m_willChange-
>m_contents; } | 1042 bool willChangeContents() const { return rareNonInheritedData->m_willChange-
>m_contents; } |
| 1031 bool willChangeScrollPosition() const { return rareNonInheritedData->m_willC
hange->m_scrollPosition; } | 1043 bool willChangeScrollPosition() const { return rareNonInheritedData->m_willC
hange->m_scrollPosition; } |
| 1032 bool hasWillChangeCompositingHint() const; | 1044 bool hasWillChangeCompositingHint() const; |
| 1045 bool hasWillChangeOpacityHint() const { return willChangeProperties().contai
ns(CSSPropertyOpacity); } |
| 1033 bool hasWillChangeTransformHint() const; | 1046 bool hasWillChangeTransformHint() const; |
| 1034 bool subtreeWillChangeContents() const { return rareInheritedData->m_subtree
WillChangeContents; } | 1047 bool subtreeWillChangeContents() const { return rareInheritedData->m_subtree
WillChangeContents; } |
| 1035 | 1048 |
| 1036 // attribute setter methods | 1049 // attribute setter methods |
| 1037 | 1050 |
| 1038 void setDisplay(EDisplay v) { noninherited_flags.effectiveDisplay = v; } | 1051 void setDisplay(EDisplay v) { noninherited_flags.effectiveDisplay = v; } |
| 1039 void setOriginalDisplay(EDisplay v) { noninherited_flags.originalDisplay = v
; } | 1052 void setOriginalDisplay(EDisplay v) { noninherited_flags.originalDisplay = v
; } |
| 1040 void setPosition(EPosition v) { noninherited_flags.position = v; } | 1053 void setPosition(EPosition v) { noninherited_flags.position = v; } |
| 1041 void setFloating(EFloat v) { noninherited_flags.floating = v; } | 1054 void setFloating(EFloat v) { noninherited_flags.floating = v; } |
| 1042 | 1055 |
| (...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2028 } | 2041 } |
| 2029 | 2042 |
| 2030 inline bool ComputedStyle::hasPseudoElementStyle() const | 2043 inline bool ComputedStyle::hasPseudoElementStyle() const |
| 2031 { | 2044 { |
| 2032 return noninherited_flags.pseudoBits & ElementPseudoIdMask; | 2045 return noninherited_flags.pseudoBits & ElementPseudoIdMask; |
| 2033 } | 2046 } |
| 2034 | 2047 |
| 2035 } // namespace blink | 2048 } // namespace blink |
| 2036 | 2049 |
| 2037 #endif // ComputedStyle_h | 2050 #endif // ComputedStyle_h |
| OLD | NEW |