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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 #include "sky/engine/platform/Length.h" | 52 #include "sky/engine/platform/Length.h" |
53 #include "sky/engine/platform/LengthBox.h" | 53 #include "sky/engine/platform/LengthBox.h" |
54 #include "sky/engine/platform/LengthSize.h" | 54 #include "sky/engine/platform/LengthSize.h" |
55 #include "sky/engine/platform/fonts/FontBaseline.h" | 55 #include "sky/engine/platform/fonts/FontBaseline.h" |
56 #include "sky/engine/platform/fonts/FontDescription.h" | 56 #include "sky/engine/platform/fonts/FontDescription.h" |
57 #include "sky/engine/platform/geometry/FloatRoundedRect.h" | 57 #include "sky/engine/platform/geometry/FloatRoundedRect.h" |
58 #include "sky/engine/platform/geometry/LayoutBoxExtent.h" | 58 #include "sky/engine/platform/geometry/LayoutBoxExtent.h" |
59 #include "sky/engine/platform/geometry/RoundedRect.h" | 59 #include "sky/engine/platform/geometry/RoundedRect.h" |
60 #include "sky/engine/platform/graphics/Color.h" | 60 #include "sky/engine/platform/graphics/Color.h" |
61 #include "sky/engine/platform/graphics/GraphicsTypes.h" | 61 #include "sky/engine/platform/graphics/GraphicsTypes.h" |
62 #include "sky/engine/platform/scroll/ScrollTypes.h" | |
63 #include "sky/engine/platform/text/TextDirection.h" | 62 #include "sky/engine/platform/text/TextDirection.h" |
64 #include "sky/engine/platform/text/UnicodeBidi.h" | 63 #include "sky/engine/platform/text/UnicodeBidi.h" |
65 #include "sky/engine/platform/transforms/TransformOperations.h" | 64 #include "sky/engine/platform/transforms/TransformOperations.h" |
66 #include "sky/engine/wtf/Forward.h" | 65 #include "sky/engine/wtf/Forward.h" |
67 #include "sky/engine/wtf/OwnPtr.h" | 66 #include "sky/engine/wtf/OwnPtr.h" |
68 #include "sky/engine/wtf/RefCounted.h" | 67 #include "sky/engine/wtf/RefCounted.h" |
69 #include "sky/engine/wtf/StdLibExtras.h" | 68 #include "sky/engine/wtf/StdLibExtras.h" |
70 #include "sky/engine/wtf/Vector.h" | 69 #include "sky/engine/wtf/Vector.h" |
71 | 70 |
72 template<typename T, typename U> inline bool compareEqual(const T& t, const U& u
) { return t == static_cast<T>(u); } | 71 template<typename T, typename U> inline bool compareEqual(const T& t, const U& u
) { return t == static_cast<T>(u); } |
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
761 Color tapHighlightColor() const { return rareInheritedData->tapHighlightColo
r; } | 760 Color tapHighlightColor() const { return rareInheritedData->tapHighlightColo
r; } |
762 | 761 |
763 EImageRendering imageRendering() const { return static_cast<EImageRendering>
(rareInheritedData->m_imageRendering); } | 762 EImageRendering imageRendering() const { return static_cast<EImageRendering>
(rareInheritedData->m_imageRendering); } |
764 | 763 |
765 ESpeak speak() const { return static_cast<ESpeak>(rareInheritedData->speak);
} | 764 ESpeak speak() const { return static_cast<ESpeak>(rareInheritedData->speak);
} |
766 | 765 |
767 FilterOperations& mutableFilter() { return rareNonInheritedData.access()->m_
filter.access()->m_operations; } | 766 FilterOperations& mutableFilter() { return rareNonInheritedData.access()->m_
filter.access()->m_operations; } |
768 const FilterOperations& filter() const { return rareNonInheritedData->m_filt
er->m_operations; } | 767 const FilterOperations& filter() const { return rareNonInheritedData->m_filt
er->m_operations; } |
769 bool hasFilter() const { return !rareNonInheritedData->m_filter->m_operation
s.operations().isEmpty(); } | 768 bool hasFilter() const { return !rareNonInheritedData->m_filter->m_operation
s.operations().isEmpty(); } |
770 | 769 |
771 bool shouldPlaceBlockDirectionScrollbarOnLogicalLeft() const { return !isLef
tToRightDirection(); } | |
772 | |
773 TouchAction touchAction() const { return static_cast<TouchAction>(rareNonInh
eritedData->m_touchAction); } | 770 TouchAction touchAction() const { return static_cast<TouchAction>(rareNonInh
eritedData->m_touchAction); } |
774 TouchActionDelay touchActionDelay() const { return static_cast<TouchActionDe
lay>(rareInheritedData->m_touchActionDelay); } | 771 TouchActionDelay touchActionDelay() const { return static_cast<TouchActionDe
lay>(rareInheritedData->m_touchActionDelay); } |
775 | 772 |
776 ScrollBehavior scrollBehavior() const { return static_cast<ScrollBehavior>(r
areNonInheritedData->m_scrollBehavior); } | |
777 | |
778 const Vector<CSSPropertyID>& willChangeProperties() const { return rareNonIn
heritedData->m_willChange->m_properties; } | 773 const Vector<CSSPropertyID>& willChangeProperties() const { return rareNonIn
heritedData->m_willChange->m_properties; } |
779 bool willChangeContents() const { return rareNonInheritedData->m_willChange-
>m_contents; } | 774 bool willChangeContents() const { return rareNonInheritedData->m_willChange-
>m_contents; } |
780 bool willChangeScrollPosition() const { return rareNonInheritedData->m_willC
hange->m_scrollPosition; } | |
781 bool hasWillChangeCompositingHint() const; | 775 bool hasWillChangeCompositingHint() const; |
782 bool subtreeWillChangeContents() const { return rareInheritedData->m_subtree
WillChangeContents; } | 776 bool subtreeWillChangeContents() const { return rareInheritedData->m_subtree
WillChangeContents; } |
783 | 777 |
784 // attribute setter methods | 778 // attribute setter methods |
785 | 779 |
786 void setDisplay(EDisplay v) { noninherited_flags.effectiveDisplay = v; } | 780 void setDisplay(EDisplay v) { noninherited_flags.effectiveDisplay = v; } |
787 void setOriginalDisplay(EDisplay v) { noninherited_flags.originalDisplay = v
; } | 781 void setOriginalDisplay(EDisplay v) { noninherited_flags.originalDisplay = v
; } |
788 void setPosition(EPosition v) { noninherited_flags.position = v; } | 782 void setPosition(EPosition v) { noninherited_flags.position = v; } |
789 | 783 |
790 void setLeft(const Length& v) { SET_VAR(surround, offset.m_left, v); } | 784 void setLeft(const Length& v) { SET_VAR(surround, offset.m_left, v); } |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1106 void setPerspectiveOriginY(const Length& l) { SET_VAR(rareNonInheritedData,
m_perspectiveOriginY, l); } | 1100 void setPerspectiveOriginY(const Length& l) { SET_VAR(rareNonInheritedData,
m_perspectiveOriginY, l); } |
1107 void setPageSize(const LengthSize& s) { SET_VAR(rareNonInheritedData, m_page
Size, s); } | 1101 void setPageSize(const LengthSize& s) { SET_VAR(rareNonInheritedData, m_page
Size, s); } |
1108 void setPageSizeType(PageSizeType t) { SET_VAR(rareNonInheritedData, m_pageS
izeType, t); } | 1102 void setPageSizeType(PageSizeType t) { SET_VAR(rareNonInheritedData, m_pageS
izeType, t); } |
1109 void resetPageSizeType() { SET_VAR(rareNonInheritedData, m_pageSizeType, PAG
E_SIZE_AUTO); } | 1103 void resetPageSizeType() { SET_VAR(rareNonInheritedData, m_pageSizeType, PAG
E_SIZE_AUTO); } |
1110 | 1104 |
1111 void setLineBoxContain(LineBoxContain c) { SET_VAR(rareInheritedData, m_line
BoxContain, c); } | 1105 void setLineBoxContain(LineBoxContain c) { SET_VAR(rareInheritedData, m_line
BoxContain, c); } |
1112 void setTapHighlightColor(const Color& c) { SET_VAR(rareInheritedData, tapHi
ghlightColor, c); } | 1106 void setTapHighlightColor(const Color& c) { SET_VAR(rareInheritedData, tapHi
ghlightColor, c); } |
1113 void setTouchAction(TouchAction t) { SET_VAR(rareNonInheritedData, m_touchAc
tion, t); } | 1107 void setTouchAction(TouchAction t) { SET_VAR(rareNonInheritedData, m_touchAc
tion, t); } |
1114 void setTouchActionDelay(TouchActionDelay t) { SET_VAR(rareInheritedData, m_
touchActionDelay, t); } | 1108 void setTouchActionDelay(TouchActionDelay t) { SET_VAR(rareInheritedData, m_
touchActionDelay, t); } |
1115 | 1109 |
1116 void setScrollBehavior(ScrollBehavior b) { SET_VAR(rareNonInheritedData, m_s
crollBehavior, b); } | |
1117 | |
1118 void setWillChangeProperties(const Vector<CSSPropertyID>& properties) { SET_
VAR(rareNonInheritedData.access()->m_willChange, m_properties, properties); } | 1110 void setWillChangeProperties(const Vector<CSSPropertyID>& properties) { SET_
VAR(rareNonInheritedData.access()->m_willChange, m_properties, properties); } |
1119 void setWillChangeContents(bool b) { SET_VAR(rareNonInheritedData.access()->
m_willChange, m_contents, b); } | 1111 void setWillChangeContents(bool b) { SET_VAR(rareNonInheritedData.access()->
m_willChange, m_contents, b); } |
1120 void setWillChangeScrollPosition(bool b) { SET_VAR(rareNonInheritedData.acce
ss()->m_willChange, m_scrollPosition, b); } | |
1121 void setSubtreeWillChangeContents(bool b) { SET_VAR(rareInheritedData, m_sub
treeWillChangeContents, b); } | 1112 void setSubtreeWillChangeContents(bool b) { SET_VAR(rareInheritedData, m_sub
treeWillChangeContents, b); } |
1122 | 1113 |
1123 bool requiresAcceleratedCompositingForExternalReasons(bool b) { return rareN
onInheritedData->m_requiresAcceleratedCompositingForExternalReasons; } | 1114 bool requiresAcceleratedCompositingForExternalReasons(bool b) { return rareN
onInheritedData->m_requiresAcceleratedCompositingForExternalReasons; } |
1124 void setRequiresAcceleratedCompositingForExternalReasons(bool b) { SET_VAR(r
areNonInheritedData, m_requiresAcceleratedCompositingForExternalReasons, b); } | 1115 void setRequiresAcceleratedCompositingForExternalReasons(bool b) { SET_VAR(r
areNonInheritedData, m_requiresAcceleratedCompositingForExternalReasons, b); } |
1125 | 1116 |
1126 void setClipPath(PassRefPtr<ClipPathOperation> operation) | 1117 void setClipPath(PassRefPtr<ClipPathOperation> operation) |
1127 { | 1118 { |
1128 if (rareNonInheritedData->m_clipPath != operation) | 1119 if (rareNonInheritedData->m_clipPath != operation) |
1129 rareNonInheritedData.access()->m_clipPath = operation; | 1120 rareNonInheritedData.access()->m_clipPath = operation; |
1130 } | 1121 } |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1292 static EImageRendering initialImageRendering() { return ImageRenderingAuto;
} | 1283 static EImageRendering initialImageRendering() { return ImageRenderingAuto;
} |
1293 static ImageResolutionSource initialImageResolutionSource() { return ImageRe
solutionSpecified; } | 1284 static ImageResolutionSource initialImageResolutionSource() { return ImageRe
solutionSpecified; } |
1294 static ImageResolutionSnap initialImageResolutionSnap() { return ImageResolu
tionNoSnap; } | 1285 static ImageResolutionSnap initialImageResolutionSnap() { return ImageResolu
tionNoSnap; } |
1295 static float initialImageResolution() { return 1; } | 1286 static float initialImageResolution() { return 1; } |
1296 static StyleImage* initialBorderImageSource() { return 0; } | 1287 static StyleImage* initialBorderImageSource() { return 0; } |
1297 static StyleImage* initialMaskBoxImageSource() { return 0; } | 1288 static StyleImage* initialMaskBoxImageSource() { return 0; } |
1298 static TouchAction initialTouchAction() { return TouchActionAuto; } | 1289 static TouchAction initialTouchAction() { return TouchActionAuto; } |
1299 static TouchActionDelay initialTouchActionDelay() { return TouchActionDelayS
cript; } | 1290 static TouchActionDelay initialTouchActionDelay() { return TouchActionDelayS
cript; } |
1300 static ShadowList* initialBoxShadow() { return 0; } | 1291 static ShadowList* initialBoxShadow() { return 0; } |
1301 static ShadowList* initialTextShadow() { return 0; } | 1292 static ShadowList* initialTextShadow() { return 0; } |
1302 static ScrollBehavior initialScrollBehavior() { return ScrollBehaviorInstant
; } | |
1303 | 1293 |
1304 static unsigned initialTabSize() { return 8; } | 1294 static unsigned initialTabSize() { return 8; } |
1305 | 1295 |
1306 static WrapFlow initialWrapFlow() { return WrapFlowAuto; } | 1296 static WrapFlow initialWrapFlow() { return WrapFlowAuto; } |
1307 static WrapThrough initialWrapThrough() { return WrapThroughWrap; } | 1297 static WrapThrough initialWrapThrough() { return WrapThroughWrap; } |
1308 | 1298 |
1309 static QuotesData* initialQuotes() { return 0; } | 1299 static QuotesData* initialQuotes() { return 0; } |
1310 | 1300 |
1311 // Keep these at the end. | 1301 // Keep these at the end. |
1312 // FIXME: Why? Seems these should all be one big sorted list. | 1302 // FIXME: Why? Seems these should all be one big sorted list. |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1378 | 1368 |
1379 rareInheritedData.access()->m_textOrientation = textOrientation; | 1369 rareInheritedData.access()->m_textOrientation = textOrientation; |
1380 return true; | 1370 return true; |
1381 } | 1371 } |
1382 | 1372 |
1383 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect
::Radii&); | 1373 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect
::Radii&); |
1384 | 1374 |
1385 } // namespace blink | 1375 } // namespace blink |
1386 | 1376 |
1387 #endif // SKY_ENGINE_CORE_RENDERING_STYLE_RENDERSTYLE_H_ | 1377 #endif // SKY_ENGINE_CORE_RENDERING_STYLE_RENDERSTYLE_H_ |
OLD | NEW |