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

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

Issue 644953003: Store [-webkit-]transform-origin as a TransformOrigin. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Same patch, with correct base this time. 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #include "core/rendering/style/StyleInheritedData.h" 51 #include "core/rendering/style/StyleInheritedData.h"
52 #include "core/rendering/style/StyleMarqueeData.h" 52 #include "core/rendering/style/StyleMarqueeData.h"
53 #include "core/rendering/style/StyleMultiColData.h" 53 #include "core/rendering/style/StyleMultiColData.h"
54 #include "core/rendering/style/StyleRareInheritedData.h" 54 #include "core/rendering/style/StyleRareInheritedData.h"
55 #include "core/rendering/style/StyleRareNonInheritedData.h" 55 #include "core/rendering/style/StyleRareNonInheritedData.h"
56 #include "core/rendering/style/StyleReflection.h" 56 #include "core/rendering/style/StyleReflection.h"
57 #include "core/rendering/style/StyleSurroundData.h" 57 #include "core/rendering/style/StyleSurroundData.h"
58 #include "core/rendering/style/StyleTransformData.h" 58 #include "core/rendering/style/StyleTransformData.h"
59 #include "core/rendering/style/StyleVisualData.h" 59 #include "core/rendering/style/StyleVisualData.h"
60 #include "core/rendering/style/StyleWillChangeData.h" 60 #include "core/rendering/style/StyleWillChangeData.h"
61 #include "core/rendering/style/TransformOrigin.h"
61 #include "platform/Length.h" 62 #include "platform/Length.h"
62 #include "platform/LengthBox.h" 63 #include "platform/LengthBox.h"
63 #include "platform/LengthPoint.h" 64 #include "platform/LengthPoint.h"
64 #include "platform/LengthSize.h" 65 #include "platform/LengthSize.h"
65 #include "platform/ThemeTypes.h" 66 #include "platform/ThemeTypes.h"
66 #include "platform/fonts/FontBaseline.h" 67 #include "platform/fonts/FontBaseline.h"
67 #include "platform/fonts/FontDescription.h" 68 #include "platform/fonts/FontDescription.h"
68 #include "platform/geometry/FloatRoundedRect.h" 69 #include "platform/geometry/FloatRoundedRect.h"
69 #include "platform/geometry/LayoutBoxExtent.h" 70 #include "platform/geometry/LayoutBoxExtent.h"
70 #include "platform/geometry/RoundedRect.h" 71 #include "platform/geometry/RoundedRect.h"
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 bool hasNormalColumnGap() const { return rareNonInheritedData->m_multiCol->m _normalGap; } 854 bool hasNormalColumnGap() const { return rareNonInheritedData->m_multiCol->m _normalGap; }
854 EBorderStyle columnRuleStyle() const { return rareNonInheritedData->m_multiC ol->m_rule.style(); } 855 EBorderStyle columnRuleStyle() const { return rareNonInheritedData->m_multiC ol->m_rule.style(); }
855 unsigned short columnRuleWidth() const { return rareNonInheritedData->m_mult iCol->ruleWidth(); } 856 unsigned short columnRuleWidth() const { return rareNonInheritedData->m_mult iCol->ruleWidth(); }
856 bool columnRuleIsTransparent() const { return rareNonInheritedData->m_multiC ol->m_rule.isTransparent(); } 857 bool columnRuleIsTransparent() const { return rareNonInheritedData->m_multiC ol->m_rule.isTransparent(); }
857 ColumnSpan columnSpan() const { return static_cast<ColumnSpan>(rareNonInheri tedData->m_multiCol->m_columnSpan); } 858 ColumnSpan columnSpan() const { return static_cast<ColumnSpan>(rareNonInheri tedData->m_multiCol->m_columnSpan); }
858 EPageBreak columnBreakBefore() const { return static_cast<EPageBreak>(rareNo nInheritedData->m_multiCol->m_breakBefore); } 859 EPageBreak columnBreakBefore() const { return static_cast<EPageBreak>(rareNo nInheritedData->m_multiCol->m_breakBefore); }
859 EPageBreak columnBreakInside() const { return static_cast<EPageBreak>(rareNo nInheritedData->m_multiCol->m_breakInside); } 860 EPageBreak columnBreakInside() const { return static_cast<EPageBreak>(rareNo nInheritedData->m_multiCol->m_breakInside); }
860 EPageBreak columnBreakAfter() const { return static_cast<EPageBreak>(rareNon InheritedData->m_multiCol->m_breakAfter); } 861 EPageBreak columnBreakAfter() const { return static_cast<EPageBreak>(rareNon InheritedData->m_multiCol->m_breakAfter); }
861 bool hasInlineTransform() const { return rareNonInheritedData->m_hasInlineTr ansform; } 862 bool hasInlineTransform() const { return rareNonInheritedData->m_hasInlineTr ansform; }
862 const TransformOperations& transform() const { return rareNonInheritedData-> m_transform->m_operations; } 863 const TransformOperations& transform() const { return rareNonInheritedData-> m_transform->m_operations; }
863 const Length& transformOriginX() const { return rareNonInheritedData->m_tran sform->m_x; } 864 const TransformOrigin& transformOrigin() const { return rareNonInheritedData ->m_transform->m_origin; }
864 const Length& transformOriginY() const { return rareNonInheritedData->m_tran sform->m_y; } 865 const Length& transformOriginX() const { return transformOrigin().x(); }
865 float transformOriginZ() const { return rareNonInheritedData->m_transform->m _z; } 866 const Length& transformOriginY() const { return transformOrigin().y(); }
867 float transformOriginZ() const { return transformOrigin().z(); }
866 bool hasTransform() const { return !rareNonInheritedData->m_transform->m_ope rations.operations().isEmpty(); } 868 bool hasTransform() const { return !rareNonInheritedData->m_transform->m_ope rations.operations().isEmpty(); }
867 bool transformDataEquivalent(const RenderStyle& otherStyle) const { return r areNonInheritedData->m_transform == otherStyle.rareNonInheritedData->m_transform ; } 869 bool transformDataEquivalent(const RenderStyle& otherStyle) const { return r areNonInheritedData->m_transform == otherStyle.rareNonInheritedData->m_transform ; }
868 870
869 TextEmphasisFill textEmphasisFill() const { return static_cast<TextEmphasisF ill>(rareInheritedData->textEmphasisFill); } 871 TextEmphasisFill textEmphasisFill() const { return static_cast<TextEmphasisF ill>(rareInheritedData->textEmphasisFill); }
870 TextEmphasisMark textEmphasisMark() const; 872 TextEmphasisMark textEmphasisMark() const;
871 const AtomicString& textEmphasisCustomMark() const { return rareInheritedDat a->textEmphasisCustomMark; } 873 const AtomicString& textEmphasisCustomMark() const { return rareInheritedDat a->textEmphasisCustomMark; }
872 TextEmphasisPosition textEmphasisPosition() const { return static_cast<TextE mphasisPosition>(rareInheritedData->textEmphasisPosition); } 874 TextEmphasisPosition textEmphasisPosition() const { return static_cast<TextE mphasisPosition>(rareInheritedData->textEmphasisPosition); }
873 const AtomicString& textEmphasisMarkString() const; 875 const AtomicString& textEmphasisMarkString() const;
874 876
875 RubyPosition rubyPosition() const { return static_cast<RubyPosition>(rareInh eritedData->m_rubyPosition); } 877 RubyPosition rubyPosition() const { return static_cast<RubyPosition>(rareInh eritedData->m_rubyPosition); }
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
1332 void setColumnRuleWidth(unsigned short w) { SET_VAR(rareNonInheritedData.acc ess()->m_multiCol, m_rule.m_width, w); } 1334 void setColumnRuleWidth(unsigned short w) { SET_VAR(rareNonInheritedData.acc ess()->m_multiCol, m_rule.m_width, w); }
1333 void resetColumnRule() { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_rule, BorderValue()); } 1335 void resetColumnRule() { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_rule, BorderValue()); }
1334 void setColumnSpan(ColumnSpan columnSpan) { SET_VAR(rareNonInheritedData.acc ess()->m_multiCol, m_columnSpan, columnSpan); } 1336 void setColumnSpan(ColumnSpan columnSpan) { SET_VAR(rareNonInheritedData.acc ess()->m_multiCol, m_columnSpan, columnSpan); }
1335 void setColumnBreakBefore(EPageBreak p) { SET_VAR(rareNonInheritedData.acces s()->m_multiCol, m_breakBefore, p); } 1337 void setColumnBreakBefore(EPageBreak p) { SET_VAR(rareNonInheritedData.acces s()->m_multiCol, m_breakBefore, p); }
1336 // For valid values of column-break-inside see http://www.w3.org/TR/css3-mul ticol/#break-before-break-after-break-inside 1338 // For valid values of column-break-inside see http://www.w3.org/TR/css3-mul ticol/#break-before-break-after-break-inside
1337 void setColumnBreakInside(EPageBreak p) { ASSERT(p == PBAUTO || p == PBAVOID ); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_breakInside, p); } 1339 void setColumnBreakInside(EPageBreak p) { ASSERT(p == PBAUTO || p == PBAVOID ); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_breakInside, p); }
1338 void setColumnBreakAfter(EPageBreak p) { SET_VAR(rareNonInheritedData.access ()->m_multiCol, m_breakAfter, p); } 1340 void setColumnBreakAfter(EPageBreak p) { SET_VAR(rareNonInheritedData.access ()->m_multiCol, m_breakAfter, p); }
1339 void inheritColumnPropertiesFrom(RenderStyle* parent) { rareNonInheritedData .access()->m_multiCol = parent->rareNonInheritedData->m_multiCol; } 1341 void inheritColumnPropertiesFrom(RenderStyle* parent) { rareNonInheritedData .access()->m_multiCol = parent->rareNonInheritedData->m_multiCol; }
1340 void setHasInlineTransform(bool b) { SET_VAR(rareNonInheritedData, m_hasInli neTransform, b); } 1342 void setHasInlineTransform(bool b) { SET_VAR(rareNonInheritedData, m_hasInli neTransform, b); }
1341 void setTransform(const TransformOperations& ops) { SET_VAR(rareNonInherited Data.access()->m_transform, m_operations, ops); } 1343 void setTransform(const TransformOperations& ops) { SET_VAR(rareNonInherited Data.access()->m_transform, m_operations, ops); }
1342 void setTransformOriginX(const Length& l) { SET_VAR(rareNonInheritedData.acc ess()->m_transform, m_x, l); } 1344 void setTransformOriginX(const Length& v) { setTransformOrigin(TransformOrig in(v, transformOriginY(), transformOriginZ())); }
1343 void setTransformOriginY(const Length& l) { SET_VAR(rareNonInheritedData.acc ess()->m_transform, m_y, l); } 1345 void setTransformOriginY(const Length& v) { setTransformOrigin(TransformOrig in(transformOriginX(), v, transformOriginZ())); }
1344 void setTransformOriginZ(float f) { SET_VAR(rareNonInheritedData.access()->m _transform, m_z, f); } 1346 void setTransformOriginZ(float f) { setTransformOrigin(TransformOrigin(trans formOriginX(), transformOriginY(), f)); }
1347 void setTransformOrigin(const TransformOrigin& o) { SET_VAR(rareNonInherited Data.access()->m_transform, m_origin, o); }
1345 void setSpeak(ESpeak s) { SET_VAR(rareInheritedData, speak, s); } 1348 void setSpeak(ESpeak s) { SET_VAR(rareInheritedData, speak, s); }
1346 void setTextCombine(TextCombine v) { SET_VAR(rareNonInheritedData, m_textCom bine, v); } 1349 void setTextCombine(TextCombine v) { SET_VAR(rareNonInheritedData, m_textCom bine, v); }
1347 void setTextDecorationColor(const StyleColor& c) { SET_VAR(rareNonInheritedD ata, m_textDecorationColor, c); } 1350 void setTextDecorationColor(const StyleColor& c) { SET_VAR(rareNonInheritedD ata, m_textDecorationColor, c); }
1348 void setTextEmphasisColor(const StyleColor& c) { SET_VAR_WITH_SETTER(rareInh eritedData, textEmphasisColor, setTextEmphasisColor, c); } 1351 void setTextEmphasisColor(const StyleColor& c) { SET_VAR_WITH_SETTER(rareInh eritedData, textEmphasisColor, setTextEmphasisColor, c); }
1349 void setTextEmphasisFill(TextEmphasisFill fill) { SET_VAR(rareInheritedData, textEmphasisFill, fill); } 1352 void setTextEmphasisFill(TextEmphasisFill fill) { SET_VAR(rareInheritedData, textEmphasisFill, fill); }
1350 void setTextEmphasisMark(TextEmphasisMark mark) { SET_VAR(rareInheritedData, textEmphasisMark, mark); } 1353 void setTextEmphasisMark(TextEmphasisMark mark) { SET_VAR(rareInheritedData, textEmphasisMark, mark); }
1351 void setTextEmphasisCustomMark(const AtomicString& mark) { SET_VAR(rareInher itedData, textEmphasisCustomMark, mark); } 1354 void setTextEmphasisCustomMark(const AtomicString& mark) { SET_VAR(rareInher itedData, textEmphasisCustomMark, mark); }
1352 void setTextEmphasisPosition(TextEmphasisPosition position) { SET_VAR(rareIn heritedData, textEmphasisPosition, position); } 1355 void setTextEmphasisPosition(TextEmphasisPosition position) { SET_VAR(rareIn heritedData, textEmphasisPosition, position); }
1353 bool setTextOrientation(TextOrientation); 1356 bool setTextOrientation(TextOrientation);
1354 1357
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
1651 static bool initialHasNoneAspectRatio() { return true; } 1654 static bool initialHasNoneAspectRatio() { return true; }
1652 static AspectRatio initialAspectRatio() { return AspectRatio(); } 1655 static AspectRatio initialAspectRatio() { return AspectRatio(); }
1653 static Order initialRTLOrdering() { return LogicalOrder; } 1656 static Order initialRTLOrdering() { return LogicalOrder; }
1654 static float initialTextStrokeWidth() { return 0; } 1657 static float initialTextStrokeWidth() { return 0; }
1655 static unsigned short initialColumnCount() { return 1; } 1658 static unsigned short initialColumnCount() { return 1; }
1656 static ColumnFill initialColumnFill() { return ColumnFillBalance; } 1659 static ColumnFill initialColumnFill() { return ColumnFillBalance; }
1657 static ColumnSpan initialColumnSpan() { return ColumnSpanNone; } 1660 static ColumnSpan initialColumnSpan() { return ColumnSpanNone; }
1658 static const TransformOperations& initialTransform() { DEFINE_STATIC_LOCAL(T ransformOperations, ops, ()); return ops; } 1661 static const TransformOperations& initialTransform() { DEFINE_STATIC_LOCAL(T ransformOperations, ops, ()); return ops; }
1659 static Length initialTransformOriginX() { return Length(50.0, Percent); } 1662 static Length initialTransformOriginX() { return Length(50.0, Percent); }
1660 static Length initialTransformOriginY() { return Length(50.0, Percent); } 1663 static Length initialTransformOriginY() { return Length(50.0, Percent); }
1664 static float initialTransformOriginZ() { return 0; }
1665 static TransformOrigin initialTransformOrigin() { return TransformOrigin(Len gth(50.0, Percent), Length(50.0, Percent), 0); }
1661 static EPointerEvents initialPointerEvents() { return PE_AUTO; } 1666 static EPointerEvents initialPointerEvents() { return PE_AUTO; }
1662 static float initialTransformOriginZ() { return 0; }
1663 static ETransformStyle3D initialTransformStyle3D() { return TransformStyle3D Flat; } 1667 static ETransformStyle3D initialTransformStyle3D() { return TransformStyle3D Flat; }
1664 static EBackfaceVisibility initialBackfaceVisibility() { return BackfaceVisi bilityVisible; } 1668 static EBackfaceVisibility initialBackfaceVisibility() { return BackfaceVisi bilityVisible; }
1665 static float initialPerspective() { return 0; } 1669 static float initialPerspective() { return 0; }
1666 static Length initialPerspectiveOriginX() { return Length(50.0, Percent); } 1670 static Length initialPerspectiveOriginX() { return Length(50.0, Percent); }
1667 static Length initialPerspectiveOriginY() { return Length(50.0, Percent); } 1671 static Length initialPerspectiveOriginY() { return Length(50.0, Percent); }
1668 static LengthPoint initialPerspectiveOrigin() { return LengthPoint(Length(50 .0, Percent), 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 ; }
(...skipping 249 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

Powered by Google App Engine
This is Rietveld 408576698