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

Side by Side Diff: third_party/WebKit/Source/core/style/ComputedStyle.h

Issue 2352273002: CSS Motion Path: offset-anchor and offset-position (Closed)
Patch Set: rebase Created 4 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 962 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 // object-fit 973 // object-fit
974 static ObjectFit initialObjectFit() { return ObjectFitFill; } 974 static ObjectFit initialObjectFit() { return ObjectFitFill; }
975 ObjectFit getObjectFit() const { return static_cast<ObjectFit>(m_rareNonInhe ritedData->m_objectFit); } 975 ObjectFit getObjectFit() const { return static_cast<ObjectFit>(m_rareNonInhe ritedData->m_objectFit); }
976 void setObjectFit(ObjectFit f) { SET_VAR(m_rareNonInheritedData, m_objectFit , f); } 976 void setObjectFit(ObjectFit f) { SET_VAR(m_rareNonInheritedData, m_objectFit , f); }
977 977
978 // object-position 978 // object-position
979 static LengthPoint initialObjectPosition() { return LengthPoint(Length(50.0, Percent), Length(50.0, Percent)); } 979 static LengthPoint initialObjectPosition() { return LengthPoint(Length(50.0, Percent), Length(50.0, Percent)); }
980 LengthPoint objectPosition() const { return m_rareNonInheritedData->m_object Position; } 980 LengthPoint objectPosition() const { return m_rareNonInheritedData->m_object Position; }
981 void setObjectPosition(LengthPoint position) { SET_VAR(m_rareNonInheritedDat a, m_objectPosition, position); } 981 void setObjectPosition(LengthPoint position) { SET_VAR(m_rareNonInheritedDat a, m_objectPosition, position); }
982 982
983 // offset-anchor
984 static LengthPoint initialOffsetAnchor() { return LengthPoint(Length(50.0, P ercent), Length(50.0, Percent)); }
985 const LengthPoint& offsetAnchor() const { return m_rareNonInheritedData->m_t ransform->m_motion.m_anchor; }
986 void setOffsetAnchor(const LengthPoint& offsetAnchor) { SET_NESTED_VAR(m_rar eNonInheritedData, m_transform, m_motion.m_anchor, offsetAnchor); }
987
983 // offset-distance 988 // offset-distance
984 static Length initialOffsetDistance() { return Length(0, Fixed); } 989 static Length initialOffsetDistance() { return Length(0, Fixed); }
985 const Length& offsetDistance() const { return m_rareNonInheritedData->m_tran sform->m_motion.m_distance; } 990 const Length& offsetDistance() const { return m_rareNonInheritedData->m_tran sform->m_motion.m_distance; }
986 void setOffsetDistance(const Length& offsetDistance) { SET_NESTED_VAR(m_rare NonInheritedData, m_transform, m_motion.m_distance, offsetDistance); } 991 void setOffsetDistance(const Length& offsetDistance) { SET_NESTED_VAR(m_rare NonInheritedData, m_transform, m_motion.m_distance, offsetDistance); }
987 992
988 // offset-path 993 // offset-path
989 static StylePath* initialOffsetPath() { return nullptr; } 994 static StylePath* initialOffsetPath() { return nullptr; }
990 StylePath* offsetPath() const { return m_rareNonInheritedData->m_transform-> m_motion.m_path.get(); } 995 StylePath* offsetPath() const { return m_rareNonInheritedData->m_transform-> m_motion.m_path.get(); }
991 void setOffsetPath(PassRefPtr<StylePath>); 996 void setOffsetPath(PassRefPtr<StylePath>);
992 997
998 // offset-position
999 static LengthPoint initialOffsetPosition() { return LengthPoint(Length(Auto) , Length(Auto)); }
1000 const LengthPoint& offsetPosition() const { return m_rareNonInheritedData->m _transform->m_motion.m_position; }
1001 void setOffsetPosition(const LengthPoint& offsetPosition) { SET_NESTED_VAR(m _rareNonInheritedData, m_transform, m_motion.m_position, offsetPosition); }
1002
993 // offset-rotation 1003 // offset-rotation
994 static StyleOffsetRotation initialOffsetRotation() { return StyleOffsetRotat ion(0, OffsetRotationAuto); } 1004 static StyleOffsetRotation initialOffsetRotation() { return StyleOffsetRotat ion(0, OffsetRotationAuto); }
995 const StyleOffsetRotation& offsetRotation() const { return m_rareNonInherite dData->m_transform->m_motion.m_rotation; } 1005 const StyleOffsetRotation& offsetRotation() const { return m_rareNonInherite dData->m_transform->m_motion.m_rotation; }
996 void setOffsetRotation(const StyleOffsetRotation& offsetRotation) { SET_NEST ED_VAR(m_rareNonInheritedData, m_transform, m_motion.m_rotation, offsetRotation) ; } 1006 void setOffsetRotation(const StyleOffsetRotation& offsetRotation) { SET_NEST ED_VAR(m_rareNonInheritedData, m_transform, m_motion.m_rotation, offsetRotation) ; }
997 1007
998 // opacity (aka -webkit-opacity) 1008 // opacity (aka -webkit-opacity)
999 static float initialOpacity() { return 1.0f; } 1009 static float initialOpacity() { return 1.0f; }
1000 float opacity() const { return m_rareNonInheritedData->opacity; } 1010 float opacity() const { return m_rareNonInheritedData->opacity; }
1001 void setOpacity(float f) { float v = clampTo<float>(f, 0, 1); SET_VAR(m_rare NonInheritedData, opacity, v); } 1011 void setOpacity(float f) { float v = clampTo<float>(f, 0, 1); SET_VAR(m_rare NonInheritedData, opacity, v); }
1002 1012
(...skipping 1612 matching lines...) Expand 10 before | Expand all | Expand 10 after
2615 } 2625 }
2616 2626
2617 inline bool ComputedStyle::hasPseudoElementStyle() const 2627 inline bool ComputedStyle::hasPseudoElementStyle() const
2618 { 2628 {
2619 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; 2629 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask;
2620 } 2630 }
2621 2631
2622 } // namespace blink 2632 } // namespace blink
2623 2633
2624 #endif // ComputedStyle_h 2634 #endif // ComputedStyle_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.cpp ('k') | third_party/WebKit/Source/core/style/StyleMotionData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698