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

Side by Side Diff: Source/core/rendering/style/RenderStyle.h

Issue 643893002: Store [-webkit-]perspective-origin as a LengthPoint. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase (again). Created 6 years, 2 months 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 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
52 #include "core/rendering/style/StyleMultiColData.h" 52 #include "core/rendering/style/StyleMultiColData.h"
53 #include "core/rendering/style/StyleRareInheritedData.h" 53 #include "core/rendering/style/StyleRareInheritedData.h"
54 #include "core/rendering/style/StyleRareNonInheritedData.h" 54 #include "core/rendering/style/StyleRareNonInheritedData.h"
55 #include "core/rendering/style/StyleReflection.h" 55 #include "core/rendering/style/StyleReflection.h"
56 #include "core/rendering/style/StyleSurroundData.h" 56 #include "core/rendering/style/StyleSurroundData.h"
57 #include "core/rendering/style/StyleTransformData.h" 57 #include "core/rendering/style/StyleTransformData.h"
58 #include "core/rendering/style/StyleVisualData.h" 58 #include "core/rendering/style/StyleVisualData.h"
59 #include "core/rendering/style/StyleWillChangeData.h" 59 #include "core/rendering/style/StyleWillChangeData.h"
60 #include "platform/Length.h" 60 #include "platform/Length.h"
61 #include "platform/LengthBox.h" 61 #include "platform/LengthBox.h"
62 #include "platform/LengthPoint.h"
62 #include "platform/LengthSize.h" 63 #include "platform/LengthSize.h"
63 #include "platform/ThemeTypes.h" 64 #include "platform/ThemeTypes.h"
64 #include "platform/fonts/FontBaseline.h" 65 #include "platform/fonts/FontBaseline.h"
65 #include "platform/fonts/FontDescription.h" 66 #include "platform/fonts/FontDescription.h"
66 #include "platform/geometry/FloatRoundedRect.h" 67 #include "platform/geometry/FloatRoundedRect.h"
67 #include "platform/geometry/LayoutBoxExtent.h" 68 #include "platform/geometry/LayoutBoxExtent.h"
68 #include "platform/geometry/RoundedRect.h" 69 #include "platform/geometry/RoundedRect.h"
69 #include "platform/graphics/Color.h" 70 #include "platform/graphics/Color.h"
70 #include "platform/graphics/GraphicsTypes.h" 71 #include "platform/graphics/GraphicsTypes.h"
71 #include "platform/scroll/ScrollableArea.h" 72 #include "platform/scroll/ScrollableArea.h"
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 908
908 CSSAnimationData& accessAnimations(); 909 CSSAnimationData& accessAnimations();
909 CSSTransitionData& accessTransitions(); 910 CSSTransitionData& accessTransitions();
910 911
911 ETransformStyle3D transformStyle3D() const { return static_cast<ETransformSt yle3D>(rareNonInheritedData->m_transformStyle3D); } 912 ETransformStyle3D transformStyle3D() const { return static_cast<ETransformSt yle3D>(rareNonInheritedData->m_transformStyle3D); }
912 bool preserves3D() const { return rareNonInheritedData->m_transformStyle3D = = TransformStyle3DPreserve3D; } 913 bool preserves3D() const { return rareNonInheritedData->m_transformStyle3D = = TransformStyle3DPreserve3D; }
913 914
914 EBackfaceVisibility backfaceVisibility() const { return static_cast<EBackfac eVisibility>(rareNonInheritedData->m_backfaceVisibility); } 915 EBackfaceVisibility backfaceVisibility() const { return static_cast<EBackfac eVisibility>(rareNonInheritedData->m_backfaceVisibility); }
915 float perspective() const { return rareNonInheritedData->m_perspective; } 916 float perspective() const { return rareNonInheritedData->m_perspective; }
916 bool hasPerspective() const { return rareNonInheritedData->m_perspective > 0 ; } 917 bool hasPerspective() const { return rareNonInheritedData->m_perspective > 0 ; }
917 const Length& perspectiveOriginX() const { return rareNonInheritedData->m_pe rspectiveOriginX; } 918 const LengthPoint& perspectiveOrigin() const { return rareNonInheritedData-> m_perspectiveOrigin; }
918 const Length& perspectiveOriginY() const { return rareNonInheritedData->m_pe rspectiveOriginY; } 919 const Length& perspectiveOriginX() const { return perspectiveOrigin().x(); }
920 const Length& perspectiveOriginY() const { return perspectiveOrigin().y(); }
919 const LengthSize& pageSize() const { return rareNonInheritedData->m_pageSize ; } 921 const LengthSize& pageSize() const { return rareNonInheritedData->m_pageSize ; }
920 PageSizeType pageSizeType() const { return static_cast<PageSizeType>(rareNon InheritedData->m_pageSizeType); } 922 PageSizeType pageSizeType() const { return static_cast<PageSizeType>(rareNon InheritedData->m_pageSizeType); }
921 923
922 bool hasCurrentOpacityAnimation() const { return rareNonInheritedData->m_has CurrentOpacityAnimation; } 924 bool hasCurrentOpacityAnimation() const { return rareNonInheritedData->m_has CurrentOpacityAnimation; }
923 bool hasCurrentTransformAnimation() const { return rareNonInheritedData->m_h asCurrentTransformAnimation; } 925 bool hasCurrentTransformAnimation() const { return rareNonInheritedData->m_h asCurrentTransformAnimation; }
924 bool hasCurrentFilterAnimation() const { return rareNonInheritedData->m_hasC urrentFilterAnimation; } 926 bool hasCurrentFilterAnimation() const { return rareNonInheritedData->m_hasC urrentFilterAnimation; }
925 bool shouldCompositeForCurrentAnimations() { return hasCurrentOpacityAnimati on() || hasCurrentTransformAnimation() || hasCurrentFilterAnimation(); } 927 bool shouldCompositeForCurrentAnimations() { return hasCurrentOpacityAnimati on() || hasCurrentTransformAnimation() || hasCurrentFilterAnimation(); }
926 928
927 bool isRunningOpacityAnimationOnCompositor() const { return rareNonInherited Data->m_runningOpacityAnimationOnCompositor; } 929 bool isRunningOpacityAnimationOnCompositor() const { return rareNonInherited Data->m_runningOpacityAnimationOnCompositor; }
928 bool isRunningTransformAnimationOnCompositor() const { return rareNonInherit edData->m_runningTransformAnimationOnCompositor; } 930 bool isRunningTransformAnimationOnCompositor() const { return rareNonInherit edData->m_runningTransformAnimationOnCompositor; }
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 } 1378 }
1377 1379
1378 void clearTransitions() 1380 void clearTransitions()
1379 { 1381 {
1380 rareNonInheritedData.access()->m_transitions.clear(); 1382 rareNonInheritedData.access()->m_transitions.clear();
1381 } 1383 }
1382 1384
1383 void setTransformStyle3D(ETransformStyle3D b) { SET_VAR(rareNonInheritedData , m_transformStyle3D, b); } 1385 void setTransformStyle3D(ETransformStyle3D b) { SET_VAR(rareNonInheritedData , m_transformStyle3D, b); }
1384 void setBackfaceVisibility(EBackfaceVisibility b) { SET_VAR(rareNonInherited Data, m_backfaceVisibility, b); } 1386 void setBackfaceVisibility(EBackfaceVisibility b) { SET_VAR(rareNonInherited Data, m_backfaceVisibility, b); }
1385 void setPerspective(float p) { SET_VAR(rareNonInheritedData, m_perspective, p); } 1387 void setPerspective(float p) { SET_VAR(rareNonInheritedData, m_perspective, p); }
1386 void setPerspectiveOriginX(const Length& l) { SET_VAR(rareNonInheritedData, m_perspectiveOriginX, l); } 1388 void setPerspectiveOriginX(const Length& v) { setPerspectiveOrigin(LengthPoi nt(v, perspectiveOriginY())); }
1387 void setPerspectiveOriginY(const Length& l) { SET_VAR(rareNonInheritedData, m_perspectiveOriginY, l); } 1389 void setPerspectiveOriginY(const Length& v) { setPerspectiveOrigin(LengthPoi nt(perspectiveOriginX(), v)); }
1390 void setPerspectiveOrigin(const LengthPoint& p) { SET_VAR(rareNonInheritedDa ta, m_perspectiveOrigin, p); }
1388 void setPageSize(const LengthSize& s) { SET_VAR(rareNonInheritedData, m_page Size, s); } 1391 void setPageSize(const LengthSize& s) { SET_VAR(rareNonInheritedData, m_page Size, s); }
1389 void setPageSizeType(PageSizeType t) { SET_VAR(rareNonInheritedData, m_pageS izeType, t); } 1392 void setPageSizeType(PageSizeType t) { SET_VAR(rareNonInheritedData, m_pageS izeType, t); }
1390 void resetPageSizeType() { SET_VAR(rareNonInheritedData, m_pageSizeType, PAG E_SIZE_AUTO); } 1393 void resetPageSizeType() { SET_VAR(rareNonInheritedData, m_pageSizeType, PAG E_SIZE_AUTO); }
1391 1394
1392 void setHasCurrentOpacityAnimation(bool b = true) { SET_VAR(rareNonInherited Data, m_hasCurrentOpacityAnimation, b); } 1395 void setHasCurrentOpacityAnimation(bool b = true) { SET_VAR(rareNonInherited Data, m_hasCurrentOpacityAnimation, b); }
1393 void setHasCurrentTransformAnimation(bool b = true) { SET_VAR(rareNonInherit edData, m_hasCurrentTransformAnimation, b); } 1396 void setHasCurrentTransformAnimation(bool b = true) { SET_VAR(rareNonInherit edData, m_hasCurrentTransformAnimation, b); }
1394 void setHasCurrentFilterAnimation(bool b = true) { SET_VAR(rareNonInheritedD ata, m_hasCurrentFilterAnimation, b); } 1397 void setHasCurrentFilterAnimation(bool b = true) { SET_VAR(rareNonInheritedD ata, m_hasCurrentFilterAnimation, b); }
1395 1398
1396 void setIsRunningOpacityAnimationOnCompositor(bool b = true) { SET_VAR(rareN onInheritedData, m_runningOpacityAnimationOnCompositor, b); } 1399 void setIsRunningOpacityAnimationOnCompositor(bool b = true) { SET_VAR(rareN onInheritedData, m_runningOpacityAnimationOnCompositor, b); }
1397 void setIsRunningTransformAnimationOnCompositor(bool b = true) { SET_VAR(rar eNonInheritedData, m_runningTransformAnimationOnCompositor, b); } 1400 void setIsRunningTransformAnimationOnCompositor(bool b = true) { SET_VAR(rar eNonInheritedData, m_runningTransformAnimationOnCompositor, b); }
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
1659 static const TransformOperations& initialTransform() { DEFINE_STATIC_LOCAL(T ransformOperations, ops, ()); return ops; } 1662 static const TransformOperations& initialTransform() { DEFINE_STATIC_LOCAL(T ransformOperations, ops, ()); return ops; }
1660 static Length initialTransformOriginX() { return Length(50.0, Percent); } 1663 static Length initialTransformOriginX() { return Length(50.0, Percent); }
1661 static Length initialTransformOriginY() { return Length(50.0, Percent); } 1664 static Length initialTransformOriginY() { return Length(50.0, Percent); }
1662 static EPointerEvents initialPointerEvents() { return PE_AUTO; } 1665 static EPointerEvents initialPointerEvents() { return PE_AUTO; }
1663 static float initialTransformOriginZ() { return 0; } 1666 static float initialTransformOriginZ() { return 0; }
1664 static ETransformStyle3D initialTransformStyle3D() { return TransformStyle3D Flat; } 1667 static ETransformStyle3D initialTransformStyle3D() { return TransformStyle3D Flat; }
1665 static EBackfaceVisibility initialBackfaceVisibility() { return BackfaceVisi bilityVisible; } 1668 static EBackfaceVisibility initialBackfaceVisibility() { return BackfaceVisi bilityVisible; }
1666 static float initialPerspective() { return 0; } 1669 static float initialPerspective() { return 0; }
1667 static Length initialPerspectiveOriginX() { return Length(50.0, Percent); } 1670 static Length initialPerspectiveOriginX() { return Length(50.0, Percent); }
1668 static Length initialPerspectiveOriginY() { return Length(50.0, Percent); } 1671 static Length initialPerspectiveOriginY() { return Length(50.0, Percent); }
1672 static LengthPoint initialPerspectiveOrigin() { return LengthPoint(Length(50 .0, Percent), Length(50.0, Percent)); }
1669 static Color initialBackgroundColor() { return Color::transparent; } 1673 static Color initialBackgroundColor() { return Color::transparent; }
1670 static TextEmphasisFill initialTextEmphasisFill() { return TextEmphasisFillF illed; } 1674 static TextEmphasisFill initialTextEmphasisFill() { return TextEmphasisFillF illed; }
1671 static TextEmphasisMark initialTextEmphasisMark() { return TextEmphasisMarkN one; } 1675 static TextEmphasisMark initialTextEmphasisMark() { return TextEmphasisMarkN one; }
1672 static const AtomicString& initialTextEmphasisCustomMark() { return nullAtom ; } 1676 static const AtomicString& initialTextEmphasisCustomMark() { return nullAtom ; }
1673 static TextEmphasisPosition initialTextEmphasisPosition() { return TextEmpha sisPositionOver; } 1677 static TextEmphasisPosition initialTextEmphasisPosition() { return TextEmpha sisPositionOver; }
1674 static RubyPosition initialRubyPosition() { return RubyPositionBefore; } 1678 static RubyPosition initialRubyPosition() { return RubyPositionBefore; }
1675 static LineBoxContain initialLineBoxContain() { return LineBoxContainBlock | LineBoxContainInline | LineBoxContainReplaced; } 1679 static LineBoxContain initialLineBoxContain() { return LineBoxContainBlock | LineBoxContainInline | LineBoxContainReplaced; }
1676 static ImageOrientationEnum initialImageOrientation() { return OriginTopLeft ; } 1680 static ImageOrientationEnum initialImageOrientation() { return OriginTopLeft ; }
1677 static EImageRendering initialImageRendering() { return ImageRenderingAuto; } 1681 static EImageRendering initialImageRendering() { return ImageRenderingAuto; }
1678 static ImageResolutionSource initialImageResolutionSource() { return ImageRe solutionSpecified; } 1682 static ImageResolutionSource initialImageResolutionSource() { return ImageRe solutionSpecified; }
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1922 inline bool RenderStyle::hasPseudoElementStyle() const 1926 inline bool RenderStyle::hasPseudoElementStyle() const
1923 { 1927 {
1924 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; 1928 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK;
1925 } 1929 }
1926 1930
1927 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect ::Radii&); 1931 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect ::Radii&);
1928 1932
1929 } // namespace blink 1933 } // namespace blink
1930 1934
1931 #endif // RenderStyle_h 1935 #endif // RenderStyle_h
OLDNEW
« no previous file with comments | « Source/core/css/resolver/StyleBuilderCustom.cpp ('k') | Source/core/rendering/style/StyleRareNonInheritedData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698