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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.h

Issue 2705143002: Split StyleSurroundData::offset into separate members. (Closed)
Patch Set: Fix typo Created 3 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/style/ComputedStyle.h
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
index 8fc530ad0bb2778b72e8186c3cfbeb31eb9df51f..117869a19d165c86c31bc45afd4113739c520833 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -642,20 +642,20 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
static Length initialOffset() { return Length(); }
// left
- const Length& left() const { return m_surround->offset.left(); }
- void setLeft(const Length& v) { SET_VAR(m_surround, offset.m_left, v); }
+ const Length& left() const { return m_surround->m_left; }
+ void setLeft(const Length& v) { SET_VAR(m_surround, m_left, v); }
// right
- const Length& right() const { return m_surround->offset.right(); }
- void setRight(const Length& v) { SET_VAR(m_surround, offset.m_right, v); }
+ const Length& right() const { return m_surround->m_right; }
+ void setRight(const Length& v) { SET_VAR(m_surround, m_right, v); }
// top
- const Length& top() const { return m_surround->offset.top(); }
- void setTop(const Length& v) { SET_VAR(m_surround, offset.m_top, v); }
+ const Length& top() const { return m_surround->m_top; }
+ void setTop(const Length& v) { SET_VAR(m_surround, m_top, v); }
// bottom
- const Length& bottom() const { return m_surround->offset.bottom(); }
- void setBottom(const Length& v) { SET_VAR(m_surround, offset.m_bottom, v); }
+ const Length& bottom() const { return m_surround->m_bottom; }
+ void setBottom(const Length& v) { SET_VAR(m_surround, m_bottom, v); }
// box-shadow (aka -webkit-box-shadow)
static ShadowList* initialBoxShadow() { return 0; }
@@ -3067,16 +3067,20 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
// Offset utility functions.
// Accessors for positioned object edges that take into account writing mode.
const Length& logicalLeft() const {
- return m_surround->offset.logicalLeft(getWritingMode());
+ return LengthBox::logicalLeft(getWritingMode(), left(), top());
}
const Length& logicalRight() const {
- return m_surround->offset.logicalRight(getWritingMode());
+ return LengthBox::logicalRight(getWritingMode(), right(), bottom());
}
const Length& logicalTop() const {
- return m_surround->offset.before(getWritingMode());
+ return LengthBox::before(getWritingMode(), top(), left(), right());
}
const Length& logicalBottom() const {
- return m_surround->offset.after(getWritingMode());
+ return LengthBox::after(getWritingMode(), bottom(), left(), right());
+ }
+ bool offsetEqual(const ComputedStyle& other) const {
+ return left() == other.left() && right() == other.right() &&
+ top() == other.top() && bottom() == other.bottom();
}
// Whether or not a positioned element requires normal flow x/y to be computed
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698