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

Unified Diff: Source/core/rendering/style/RenderStyle.h

Issue 22839023: Add support for the object-position CSS property. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/style/RenderStyle.h
diff --git a/Source/core/rendering/style/RenderStyle.h b/Source/core/rendering/style/RenderStyle.h
index fa739b695a3b8fe99d867e7a82748837cd720064..05c17e07431f801ffe7d352d23e8553ed75e4cdc 100644
--- a/Source/core/rendering/style/RenderStyle.h
+++ b/Source/core/rendering/style/RenderStyle.h
@@ -819,6 +819,7 @@ public:
TextOrientation textOrientation() const { return static_cast<TextOrientation>(rareInheritedData->m_textOrientation); }
ObjectFit objectFit() const { return static_cast<ObjectFit>(rareNonInheritedData->m_objectFit); }
+ LengthPoint objectPosition() const { return rareNonInheritedData->m_objectPosition; }
// Return true if any transform related property (currently transform, transformStyle3D or perspective)
// indicates that we are transforming
@@ -1254,6 +1255,7 @@ public:
bool setTextOrientation(TextOrientation);
void setObjectFit(ObjectFit f) { SET_VAR(rareNonInheritedData, m_objectFit, f); }
+ void setObjectPosition(LengthPoint position) { SET_VAR(rareNonInheritedData, m_objectPosition, position); }
void setRubyPosition(RubyPosition position) { SET_VAR(rareInheritedData, m_rubyPosition, position); }
@@ -1461,6 +1463,7 @@ public:
static TextCombine initialTextCombine() { return TextCombineNone; }
static TextOrientation initialTextOrientation() { return TextOrientationVerticalRight; }
static ObjectFit initialObjectFit() { return ObjectFitFill; }
+ static LengthPoint initialObjectPosition() { return LengthPoint(Length(50.0, Percent), Length(50.0, Percent)); }
static EDisplay initialDisplay() { return INLINE; }
static EEmptyCell initialEmptyCells() { return SHOW; }
static EFloat initialFloating() { return NoFloat; }

Powered by Google App Engine
This is Rietveld 408576698