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

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: Almost forgot: drop unused ctor. (+ rebase). 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #include "core/rendering/style/StyleInheritedData.h" 50 #include "core/rendering/style/StyleInheritedData.h"
51 #include "core/rendering/style/StyleMarqueeData.h" 51 #include "core/rendering/style/StyleMarqueeData.h"
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 "core/rendering/style/TransformOrigin.h"
60 #include "platform/Length.h" 61 #include "platform/Length.h"
61 #include "platform/LengthBox.h" 62 #include "platform/LengthBox.h"
62 #include "platform/LengthPoint.h" 63 #include "platform/LengthPoint.h"
63 #include "platform/LengthSize.h" 64 #include "platform/LengthSize.h"
64 #include "platform/ThemeTypes.h" 65 #include "platform/ThemeTypes.h"
65 #include "platform/fonts/FontBaseline.h" 66 #include "platform/fonts/FontBaseline.h"
66 #include "platform/fonts/FontDescription.h" 67 #include "platform/fonts/FontDescription.h"
67 #include "platform/geometry/FloatRoundedRect.h" 68 #include "platform/geometry/FloatRoundedRect.h"
68 #include "platform/geometry/LayoutBoxExtent.h" 69 #include "platform/geometry/LayoutBoxExtent.h"
69 #include "platform/geometry/RoundedRect.h" 70 #include "platform/geometry/RoundedRect.h"
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 bool hasNormalColumnGap() const { return rareNonInheritedData->m_multiCol->m _normalGap; } 856 bool hasNormalColumnGap() const { return rareNonInheritedData->m_multiCol->m _normalGap; }
856 EBorderStyle columnRuleStyle() const { return rareNonInheritedData->m_multiC ol->m_rule.style(); } 857 EBorderStyle columnRuleStyle() const { return rareNonInheritedData->m_multiC ol->m_rule.style(); }
857 unsigned short columnRuleWidth() const { return rareNonInheritedData->m_mult iCol->ruleWidth(); } 858 unsigned short columnRuleWidth() const { return rareNonInheritedData->m_mult iCol->ruleWidth(); }
858 bool columnRuleIsTransparent() const { return rareNonInheritedData->m_multiC ol->m_rule.isTransparent(); } 859 bool columnRuleIsTransparent() const { return rareNonInheritedData->m_multiC ol->m_rule.isTransparent(); }
859 ColumnSpan columnSpan() const { return static_cast<ColumnSpan>(rareNonInheri tedData->m_multiCol->m_columnSpan); } 860 ColumnSpan columnSpan() const { return static_cast<ColumnSpan>(rareNonInheri tedData->m_multiCol->m_columnSpan); }
860 EPageBreak columnBreakBefore() const { return static_cast<EPageBreak>(rareNo nInheritedData->m_multiCol->m_breakBefore); } 861 EPageBreak columnBreakBefore() const { return static_cast<EPageBreak>(rareNo nInheritedData->m_multiCol->m_breakBefore); }
861 EPageBreak columnBreakInside() const { return static_cast<EPageBreak>(rareNo nInheritedData->m_multiCol->m_breakInside); } 862 EPageBreak columnBreakInside() const { return static_cast<EPageBreak>(rareNo nInheritedData->m_multiCol->m_breakInside); }
862 EPageBreak columnBreakAfter() const { return static_cast<EPageBreak>(rareNon InheritedData->m_multiCol->m_breakAfter); } 863 EPageBreak columnBreakAfter() const { return static_cast<EPageBreak>(rareNon InheritedData->m_multiCol->m_breakAfter); }
863 bool hasInlineTransform() const { return rareNonInheritedData->m_hasInlineTr ansform; } 864 bool hasInlineTransform() const { return rareNonInheritedData->m_hasInlineTr ansform; }
864 const TransformOperations& transform() const { return rareNonInheritedData-> m_transform->m_operations; } 865 const TransformOperations& transform() const { return rareNonInheritedData-> m_transform->m_operations; }
865 const Length& transformOriginX() const { return rareNonInheritedData->m_tran sform->m_x; } 866 const TransformOrigin& transformOrigin() const { return rareNonInheritedData ->m_transform->m_origin; }
866 const Length& transformOriginY() const { return rareNonInheritedData->m_tran sform->m_y; } 867 const Length& transformOriginX() const { return transformOrigin().x(); }
867 float transformOriginZ() const { return rareNonInheritedData->m_transform->m _z; } 868 const Length& transformOriginY() const { return transformOrigin().y(); }
869 float transformOriginZ() const { return transformOrigin().z(); }
868 bool hasTransform() const { return !rareNonInheritedData->m_transform->m_ope rations.operations().isEmpty(); } 870 bool hasTransform() const { return !rareNonInheritedData->m_transform->m_ope rations.operations().isEmpty(); }
869 bool transformDataEquivalent(const RenderStyle& otherStyle) const { return r areNonInheritedData->m_transform == otherStyle.rareNonInheritedData->m_transform ; } 871 bool transformDataEquivalent(const RenderStyle& otherStyle) const { return r areNonInheritedData->m_transform == otherStyle.rareNonInheritedData->m_transform ; }
870 872
871 TextEmphasisFill textEmphasisFill() const { return static_cast<TextEmphasisF ill>(rareInheritedData->textEmphasisFill); } 873 TextEmphasisFill textEmphasisFill() const { return static_cast<TextEmphasisF ill>(rareInheritedData->textEmphasisFill); }
872 TextEmphasisMark textEmphasisMark() const; 874 TextEmphasisMark textEmphasisMark() const;
873 const AtomicString& textEmphasisCustomMark() const { return rareInheritedDat a->textEmphasisCustomMark; } 875 const AtomicString& textEmphasisCustomMark() const { return rareInheritedDat a->textEmphasisCustomMark; }
874 TextEmphasisPosition textEmphasisPosition() const { return static_cast<TextE mphasisPosition>(rareInheritedData->textEmphasisPosition); } 876 TextEmphasisPosition textEmphasisPosition() const { return static_cast<TextE mphasisPosition>(rareInheritedData->textEmphasisPosition); }
875 const AtomicString& textEmphasisMarkString() const; 877 const AtomicString& textEmphasisMarkString() const;
876 878
877 RubyPosition rubyPosition() const { return static_cast<RubyPosition>(rareInh eritedData->m_rubyPosition); } 879 RubyPosition rubyPosition() const { return static_cast<RubyPosition>(rareInh eritedData->m_rubyPosition); }
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
1335 void setColumnRuleWidth(unsigned short w) { SET_VAR(rareNonInheritedData.acc ess()->m_multiCol, m_rule.m_width, w); } 1337 void setColumnRuleWidth(unsigned short w) { SET_VAR(rareNonInheritedData.acc ess()->m_multiCol, m_rule.m_width, w); }
1336 void resetColumnRule() { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_rule, BorderValue()); } 1338 void resetColumnRule() { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_rule, BorderValue()); }
1337 void setColumnSpan(ColumnSpan columnSpan) { SET_VAR(rareNonInheritedData.acc ess()->m_multiCol, m_columnSpan, columnSpan); } 1339 void setColumnSpan(ColumnSpan columnSpan) { SET_VAR(rareNonInheritedData.acc ess()->m_multiCol, m_columnSpan, columnSpan); }
1338 void setColumnBreakBefore(EPageBreak p) { SET_VAR(rareNonInheritedData.acces s()->m_multiCol, m_breakBefore, p); } 1340 void setColumnBreakBefore(EPageBreak p) { SET_VAR(rareNonInheritedData.acces s()->m_multiCol, m_breakBefore, p); }
1339 // For valid values of column-break-inside see http://www.w3.org/TR/css3-mul ticol/#break-before-break-after-break-inside 1341 // For valid values of column-break-inside see http://www.w3.org/TR/css3-mul ticol/#break-before-break-after-break-inside
1340 void setColumnBreakInside(EPageBreak p) { ASSERT(p == PBAUTO || p == PBAVOID ); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_breakInside, p); } 1342 void setColumnBreakInside(EPageBreak p) { ASSERT(p == PBAUTO || p == PBAVOID ); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_breakInside, p); }
1341 void setColumnBreakAfter(EPageBreak p) { SET_VAR(rareNonInheritedData.access ()->m_multiCol, m_breakAfter, p); } 1343 void setColumnBreakAfter(EPageBreak p) { SET_VAR(rareNonInheritedData.access ()->m_multiCol, m_breakAfter, p); }
1342 void inheritColumnPropertiesFrom(RenderStyle* parent) { rareNonInheritedData .access()->m_multiCol = parent->rareNonInheritedData->m_multiCol; } 1344 void inheritColumnPropertiesFrom(RenderStyle* parent) { rareNonInheritedData .access()->m_multiCol = parent->rareNonInheritedData->m_multiCol; }
1343 void setHasInlineTransform(bool b) { SET_VAR(rareNonInheritedData, m_hasInli neTransform, b); } 1345 void setHasInlineTransform(bool b) { SET_VAR(rareNonInheritedData, m_hasInli neTransform, b); }
1344 void setTransform(const TransformOperations& ops) { SET_VAR(rareNonInherited Data.access()->m_transform, m_operations, ops); } 1346 void setTransform(const TransformOperations& ops) { SET_VAR(rareNonInherited Data.access()->m_transform, m_operations, ops); }
1345 void setTransformOriginX(const Length& l) { SET_VAR(rareNonInheritedData.acc ess()->m_transform, m_x, l); } 1347 void setTransformOriginX(const Length& v) { setTransformOrigin(TransformOrig in(v, transformOriginY(), transformOriginZ())); }
1346 void setTransformOriginY(const Length& l) { SET_VAR(rareNonInheritedData.acc ess()->m_transform, m_y, l); } 1348 void setTransformOriginY(const Length& v) { setTransformOrigin(TransformOrig in(transformOriginX(), v, transformOriginZ())); }
1347 void setTransformOriginZ(float f) { SET_VAR(rareNonInheritedData.access()->m _transform, m_z, f); } 1349 void setTransformOriginZ(float f) { setTransformOrigin(TransformOrigin(trans formOriginX(), transformOriginY(), f)); }
1350 void setTransformOrigin(const TransformOrigin& o) { SET_VAR(rareNonInherited Data.access()->m_transform, m_origin, o); }
1348 void setSpeak(ESpeak s) { SET_VAR(rareInheritedData, speak, s); } 1351 void setSpeak(ESpeak s) { SET_VAR(rareInheritedData, speak, s); }
1349 void setTextCombine(TextCombine v) { SET_VAR(rareNonInheritedData, m_textCom bine, v); } 1352 void setTextCombine(TextCombine v) { SET_VAR(rareNonInheritedData, m_textCom bine, v); }
1350 void setTextDecorationColor(const StyleColor& c) { SET_VAR(rareNonInheritedD ata, m_textDecorationColor, c); } 1353 void setTextDecorationColor(const StyleColor& c) { SET_VAR(rareNonInheritedD ata, m_textDecorationColor, c); }
1351 void setTextEmphasisColor(const StyleColor& c) { SET_VAR_WITH_SETTER(rareInh eritedData, textEmphasisColor, setTextEmphasisColor, c); } 1354 void setTextEmphasisColor(const StyleColor& c) { SET_VAR_WITH_SETTER(rareInh eritedData, textEmphasisColor, setTextEmphasisColor, c); }
1352 void setTextEmphasisFill(TextEmphasisFill fill) { SET_VAR(rareInheritedData, textEmphasisFill, fill); } 1355 void setTextEmphasisFill(TextEmphasisFill fill) { SET_VAR(rareInheritedData, textEmphasisFill, fill); }
1353 void setTextEmphasisMark(TextEmphasisMark mark) { SET_VAR(rareInheritedData, textEmphasisMark, mark); } 1356 void setTextEmphasisMark(TextEmphasisMark mark) { SET_VAR(rareInheritedData, textEmphasisMark, mark); }
1354 void setTextEmphasisCustomMark(const AtomicString& mark) { SET_VAR(rareInher itedData, textEmphasisCustomMark, mark); } 1357 void setTextEmphasisCustomMark(const AtomicString& mark) { SET_VAR(rareInher itedData, textEmphasisCustomMark, mark); }
1355 void setTextEmphasisPosition(TextEmphasisPosition position) { SET_VAR(rareIn heritedData, textEmphasisPosition, position); } 1358 void setTextEmphasisPosition(TextEmphasisPosition position) { SET_VAR(rareIn heritedData, textEmphasisPosition, position); }
1356 bool setTextOrientation(TextOrientation); 1359 bool setTextOrientation(TextOrientation);
1357 1360
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
1655 static float initialAspectRatioDenominator() { return 1; } 1658 static float initialAspectRatioDenominator() { return 1; }
1656 static float initialAspectRatioNumerator() { return 1; } 1659 static float initialAspectRatioNumerator() { return 1; }
1657 static Order initialRTLOrdering() { return LogicalOrder; } 1660 static Order initialRTLOrdering() { return LogicalOrder; }
1658 static float initialTextStrokeWidth() { return 0; } 1661 static float initialTextStrokeWidth() { return 0; }
1659 static unsigned short initialColumnCount() { return 1; } 1662 static unsigned short initialColumnCount() { return 1; }
1660 static ColumnFill initialColumnFill() { return ColumnFillBalance; } 1663 static ColumnFill initialColumnFill() { return ColumnFillBalance; }
1661 static ColumnSpan initialColumnSpan() { return ColumnSpanNone; } 1664 static ColumnSpan initialColumnSpan() { return ColumnSpanNone; }
1662 static const TransformOperations& initialTransform() { DEFINE_STATIC_LOCAL(T ransformOperations, ops, ()); return ops; } 1665 static const TransformOperations& initialTransform() { DEFINE_STATIC_LOCAL(T ransformOperations, ops, ()); return ops; }
1663 static Length initialTransformOriginX() { return Length(50.0, Percent); } 1666 static Length initialTransformOriginX() { return Length(50.0, Percent); }
1664 static Length initialTransformOriginY() { return Length(50.0, Percent); } 1667 static Length initialTransformOriginY() { return Length(50.0, Percent); }
1668 static float initialTransformOriginZ() { return 0; }
1669 static TransformOrigin initialTransformOrigin() { return TransformOrigin(Len gth(50.0, Percent), Length(50.0, Percent), 0); }
1665 static EPointerEvents initialPointerEvents() { return PE_AUTO; } 1670 static EPointerEvents initialPointerEvents() { return PE_AUTO; }
1666 static float initialTransformOriginZ() { return 0; }
1667 static ETransformStyle3D initialTransformStyle3D() { return TransformStyle3D Flat; } 1671 static ETransformStyle3D initialTransformStyle3D() { return TransformStyle3D Flat; }
1668 static EBackfaceVisibility initialBackfaceVisibility() { return BackfaceVisi bilityVisible; } 1672 static EBackfaceVisibility initialBackfaceVisibility() { return BackfaceVisi bilityVisible; }
1669 static float initialPerspective() { return 0; } 1673 static float initialPerspective() { return 0; }
1670 static Length initialPerspectiveOriginX() { return Length(50.0, Percent); } 1674 static Length initialPerspectiveOriginX() { return Length(50.0, Percent); }
1671 static Length initialPerspectiveOriginY() { return Length(50.0, Percent); } 1675 static Length initialPerspectiveOriginY() { return Length(50.0, Percent); }
1672 static LengthPoint initialPerspectiveOrigin() { return LengthPoint(Length(50 .0, Percent), Length(50.0, Percent)); } 1676 static LengthPoint initialPerspectiveOrigin() { return LengthPoint(Length(50 .0, Percent), Length(50.0, Percent)); }
1673 static Color initialBackgroundColor() { return Color::transparent; } 1677 static Color initialBackgroundColor() { return Color::transparent; }
1674 static TextEmphasisFill initialTextEmphasisFill() { return TextEmphasisFillF illed; } 1678 static TextEmphasisFill initialTextEmphasisFill() { return TextEmphasisFillF illed; }
1675 static TextEmphasisMark initialTextEmphasisMark() { return TextEmphasisMarkN one; } 1679 static TextEmphasisMark initialTextEmphasisMark() { return TextEmphasisMarkN one; }
1676 static const AtomicString& initialTextEmphasisCustomMark() { return nullAtom ; } 1680 static const AtomicString& initialTextEmphasisCustomMark() { return nullAtom ; }
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
1926 inline bool RenderStyle::hasPseudoElementStyle() const 1930 inline bool RenderStyle::hasPseudoElementStyle() const
1927 { 1931 {
1928 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; 1932 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK;
1929 } 1933 }
1930 1934
1931 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect ::Radii&); 1935 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect ::Radii&);
1932 1936
1933 } // namespace blink 1937 } // namespace blink
1934 1938
1935 #endif // RenderStyle_h 1939 #endif // RenderStyle_h
OLDNEW
« no previous file with comments | « Source/core/css/resolver/StyleBuilderCustom.cpp ('k') | Source/core/rendering/style/StyleTransformData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698