| 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 15 matching lines...) Expand all Loading... |
| 26 #define RenderStyle_h | 26 #define RenderStyle_h |
| 27 | 27 |
| 28 #include "CSSPropertyNames.h" | 28 #include "CSSPropertyNames.h" |
| 29 #include "core/css/CSSLineBoxContainValue.h" | 29 #include "core/css/CSSLineBoxContainValue.h" |
| 30 #include "core/css/CSSPrimitiveValue.h" | 30 #include "core/css/CSSPrimitiveValue.h" |
| 31 #include "core/css/LengthFunctions.h" | 31 #include "core/css/LengthFunctions.h" |
| 32 #include "core/platform/Length.h" | 32 #include "core/platform/Length.h" |
| 33 #include "core/platform/LengthBox.h" | 33 #include "core/platform/LengthBox.h" |
| 34 #include "core/platform/LengthSize.h" | 34 #include "core/platform/LengthSize.h" |
| 35 #include "core/platform/ThemeTypes.h" | 35 #include "core/platform/ThemeTypes.h" |
| 36 #include "core/platform/animation/CSSAnimationDataList.h" | 36 #include "core/platform/animation/StyleAnimationDataList.h" |
| 37 #include "core/platform/graphics/Color.h" | 37 #include "core/platform/graphics/Color.h" |
| 38 #include "core/platform/graphics/ColorSpace.h" | 38 #include "core/platform/graphics/ColorSpace.h" |
| 39 #include "core/platform/graphics/FontBaseline.h" | 39 #include "core/platform/graphics/FontBaseline.h" |
| 40 #include "core/platform/graphics/FontDescription.h" | 40 #include "core/platform/graphics/FontDescription.h" |
| 41 #include "core/platform/graphics/GraphicsTypes.h" | 41 #include "core/platform/graphics/GraphicsTypes.h" |
| 42 #include "core/platform/graphics/LayoutBoxExtent.h" | 42 #include "core/platform/graphics/LayoutBoxExtent.h" |
| 43 #include "core/platform/graphics/RoundedRect.h" | 43 #include "core/platform/graphics/RoundedRect.h" |
| 44 #include "core/platform/graphics/transforms/TransformOperations.h" | 44 #include "core/platform/graphics/transforms/TransformOperations.h" |
| 45 #include "core/platform/text/TextDirection.h" | 45 #include "core/platform/text/TextDirection.h" |
| 46 #include "core/platform/text/UnicodeBidi.h" | 46 #include "core/platform/text/UnicodeBidi.h" |
| (...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 870 | 870 |
| 871 const AtomicString& lineGrid() const { return rareInheritedData->m_lineGrid;
} | 871 const AtomicString& lineGrid() const { return rareInheritedData->m_lineGrid;
} |
| 872 LineSnap lineSnap() const { return static_cast<LineSnap>(rareInheritedData->
m_lineSnap); } | 872 LineSnap lineSnap() const { return static_cast<LineSnap>(rareInheritedData->
m_lineSnap); } |
| 873 LineAlign lineAlign() const { return static_cast<LineAlign>(rareInheritedDat
a->m_lineAlign); } | 873 LineAlign lineAlign() const { return static_cast<LineAlign>(rareInheritedDat
a->m_lineAlign); } |
| 874 | 874 |
| 875 WrapFlow wrapFlow() const { return static_cast<WrapFlow>(rareNonInheritedDat
a->m_wrapFlow); } | 875 WrapFlow wrapFlow() const { return static_cast<WrapFlow>(rareNonInheritedDat
a->m_wrapFlow); } |
| 876 WrapThrough wrapThrough() const { return static_cast<WrapThrough>(rareNonInh
eritedData->m_wrapThrough); } | 876 WrapThrough wrapThrough() const { return static_cast<WrapThrough>(rareNonInh
eritedData->m_wrapThrough); } |
| 877 | 877 |
| 878 // Apple-specific property getter methods | 878 // Apple-specific property getter methods |
| 879 EPointerEvents pointerEvents() const { return static_cast<EPointerEvents>(in
herited_flags._pointerEvents); } | 879 EPointerEvents pointerEvents() const { return static_cast<EPointerEvents>(in
herited_flags._pointerEvents); } |
| 880 const CSSAnimationDataList* animations() const { return rareNonInheritedData
->m_animations.get(); } | 880 const StyleAnimationDataList* animations() const { return rareNonInheritedDa
ta->m_animations.get(); } |
| 881 const CSSAnimationDataList* transitions() const { return rareNonInheritedDat
a->m_transitions.get(); } | 881 const StyleAnimationDataList* transitions() const { return rareNonInheritedD
ata->m_transitions.get(); } |
| 882 | 882 |
| 883 CSSAnimationDataList* accessAnimations(); | 883 StyleAnimationDataList* accessAnimations(); |
| 884 CSSAnimationDataList* accessTransitions(); | 884 StyleAnimationDataList* accessTransitions(); |
| 885 | 885 |
| 886 bool hasAnimations() const { return rareNonInheritedData->m_animations && ra
reNonInheritedData->m_animations->size() > 0; } | 886 bool hasAnimations() const { return rareNonInheritedData->m_animations && ra
reNonInheritedData->m_animations->size() > 0; } |
| 887 bool hasTransitions() const { return rareNonInheritedData->m_transitions &&
rareNonInheritedData->m_transitions->size() > 0; } | 887 bool hasTransitions() const { return rareNonInheritedData->m_transitions &&
rareNonInheritedData->m_transitions->size() > 0; } |
| 888 | 888 |
| 889 // return the first found Animation (including 'all' transitions) | 889 // return the first found Animation (including 'all' transitions) |
| 890 const CSSAnimationData* transitionForProperty(CSSPropertyID) const; | 890 const StyleAnimationData* transitionForProperty(CSSPropertyID) const; |
| 891 | 891 |
| 892 ETransformStyle3D transformStyle3D() const { return static_cast<ETransformSt
yle3D>(rareNonInheritedData->m_transformStyle3D); } | 892 ETransformStyle3D transformStyle3D() const { return static_cast<ETransformSt
yle3D>(rareNonInheritedData->m_transformStyle3D); } |
| 893 bool preserves3D() const { return rareNonInheritedData->m_transformStyle3D =
= TransformStyle3DPreserve3D; } | 893 bool preserves3D() const { return rareNonInheritedData->m_transformStyle3D =
= TransformStyle3DPreserve3D; } |
| 894 | 894 |
| 895 EBackfaceVisibility backfaceVisibility() const { return static_cast<EBackfac
eVisibility>(rareNonInheritedData->m_backfaceVisibility); } | 895 EBackfaceVisibility backfaceVisibility() const { return static_cast<EBackfac
eVisibility>(rareNonInheritedData->m_backfaceVisibility); } |
| 896 float perspective() const { return rareNonInheritedData->m_perspective; } | 896 float perspective() const { return rareNonInheritedData->m_perspective; } |
| 897 bool hasPerspective() const { return rareNonInheritedData->m_perspective > 0
; } | 897 bool hasPerspective() const { return rareNonInheritedData->m_perspective > 0
; } |
| 898 Length perspectiveOriginX() const { return rareNonInheritedData->m_perspecti
veOriginX; } | 898 Length perspectiveOriginX() const { return rareNonInheritedData->m_perspecti
veOriginX; } |
| 899 Length perspectiveOriginY() const { return rareNonInheritedData->m_perspecti
veOriginY; } | 899 Length perspectiveOriginY() const { return rareNonInheritedData->m_perspecti
veOriginY; } |
| 900 LengthSize pageSize() const { return rareNonInheritedData->m_pageSize; } | 900 LengthSize pageSize() const { return rareNonInheritedData->m_pageSize; } |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1316 void clearAnimations() | 1316 void clearAnimations() |
| 1317 { | 1317 { |
| 1318 rareNonInheritedData.access()->m_animations.clear(); | 1318 rareNonInheritedData.access()->m_animations.clear(); |
| 1319 } | 1319 } |
| 1320 | 1320 |
| 1321 void clearTransitions() | 1321 void clearTransitions() |
| 1322 { | 1322 { |
| 1323 rareNonInheritedData.access()->m_transitions.clear(); | 1323 rareNonInheritedData.access()->m_transitions.clear(); |
| 1324 } | 1324 } |
| 1325 | 1325 |
| 1326 void inheritAnimations(const CSSAnimationDataList* parent) { rareNonInherite
dData.access()->m_animations = parent ? adoptPtr(new CSSAnimationDataList(*paren
t)) : nullptr; } | 1326 void inheritAnimations(const StyleAnimationDataList* parent) { rareNonInheri
tedData.access()->m_animations = parent ? adoptPtr(new StyleAnimationDataList(*p
arent)) : nullptr; } |
| 1327 void inheritTransitions(const CSSAnimationDataList* parent) { rareNonInherit
edData.access()->m_transitions = parent ? adoptPtr(new CSSAnimationDataList(*par
ent)) : nullptr; } | 1327 void inheritTransitions(const StyleAnimationDataList* parent) { rareNonInher
itedData.access()->m_transitions = parent ? adoptPtr(new StyleAnimationDataList(
*parent)) : nullptr; } |
| 1328 void adjustAnimations(); | 1328 void adjustAnimations(); |
| 1329 void adjustTransitions(); | 1329 void adjustTransitions(); |
| 1330 | 1330 |
| 1331 void setTransformStyle3D(ETransformStyle3D b) { SET_VAR(rareNonInheritedData
, m_transformStyle3D, b); } | 1331 void setTransformStyle3D(ETransformStyle3D b) { SET_VAR(rareNonInheritedData
, m_transformStyle3D, b); } |
| 1332 void setBackfaceVisibility(EBackfaceVisibility b) { SET_VAR(rareNonInherited
Data, m_backfaceVisibility, b); } | 1332 void setBackfaceVisibility(EBackfaceVisibility b) { SET_VAR(rareNonInherited
Data, m_backfaceVisibility, b); } |
| 1333 void setPerspective(float p) { SET_VAR(rareNonInheritedData, m_perspective,
p); } | 1333 void setPerspective(float p) { SET_VAR(rareNonInheritedData, m_perspective,
p); } |
| 1334 void setPerspectiveOriginX(Length l) { SET_VAR(rareNonInheritedData, m_persp
ectiveOriginX, l); } | 1334 void setPerspectiveOriginX(Length l) { SET_VAR(rareNonInheritedData, m_persp
ectiveOriginX, l); } |
| 1335 void setPerspectiveOriginY(Length l) { SET_VAR(rareNonInheritedData, m_persp
ectiveOriginY, l); } | 1335 void setPerspectiveOriginY(Length l) { SET_VAR(rareNonInheritedData, m_persp
ectiveOriginY, l); } |
| 1336 void setPageSize(LengthSize s) { SET_VAR(rareNonInheritedData, m_pageSize, s
); } | 1336 void setPageSize(LengthSize s) { SET_VAR(rareNonInheritedData, m_pageSize, s
); } |
| 1337 void setPageSizeType(PageSizeType t) { SET_VAR(rareNonInheritedData, m_pageS
izeType, t); } | 1337 void setPageSizeType(PageSizeType t) { SET_VAR(rareNonInheritedData, m_pageS
izeType, t); } |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1801 if (compareEqual(rareInheritedData->m_textOrientation, textOrientation)) | 1801 if (compareEqual(rareInheritedData->m_textOrientation, textOrientation)) |
| 1802 return false; | 1802 return false; |
| 1803 | 1803 |
| 1804 rareInheritedData.access()->m_textOrientation = textOrientation; | 1804 rareInheritedData.access()->m_textOrientation = textOrientation; |
| 1805 return true; | 1805 return true; |
| 1806 } | 1806 } |
| 1807 | 1807 |
| 1808 } // namespace WebCore | 1808 } // namespace WebCore |
| 1809 | 1809 |
| 1810 #endif // RenderStyle_h | 1810 #endif // RenderStyle_h |
| OLD | NEW |