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

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

Issue 462133002: Remove custom style building functions for 'clip'. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased. Created 6 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
« no previous file with comments | « Source/core/rendering/RenderObject.h ('k') | Source/core/rendering/style/RenderStyle.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/style/RenderStyle.h
diff --git a/Source/core/rendering/style/RenderStyle.h b/Source/core/rendering/style/RenderStyle.h
index 1e6c24a78e0d285ef8a1b097ef4cbbefa40c4364..531a8bc9a819aefae17e704d983cc4e00226f0a5 100644
--- a/Source/core/rendering/style/RenderStyle.h
+++ b/Source/core/rendering/style/RenderStyle.h
@@ -542,7 +542,7 @@ public:
const Length& clipTop() const { return visual->clip.top(); }
const Length& clipBottom() const { return visual->clip.bottom(); }
const LengthBox& clip() const { return visual->clip; }
- bool hasClip() const { return visual->hasClip; }
+ bool hasAutoClip() const { return visual->hasAutoClip; }
EUnicodeBidi unicodeBidi() const { return static_cast<EUnicodeBidi>(noninherited_flags.unicodeBidi); }
@@ -1099,13 +1099,8 @@ public:
void setVerticalAlign(EVerticalAlign v) { noninherited_flags.verticalAlign = v; }
void setVerticalAlignLength(const Length& length) { setVerticalAlign(LENGTH); SET_VAR(m_box, m_verticalAlign, length); }
- void setHasClip(bool b = true) { SET_VAR(visual, hasClip, b); }
- void setClipLeft(const Length& v) { SET_VAR(visual, clip.m_left, v); }
- void setClipRight(const Length& v) { SET_VAR(visual, clip.m_right, v); }
- void setClipTop(const Length& v) { SET_VAR(visual, clip.m_top, v); }
- void setClipBottom(const Length& v) { SET_VAR(visual, clip.m_bottom, v); }
- void setClip(const Length& top, const Length& right, const Length& bottom, const Length& left);
- void setClip(const LengthBox& box) { SET_VAR(visual, clip, box); }
+ void setHasAutoClip() { SET_VAR(visual, hasAutoClip, true); SET_VAR(visual, clip, RenderStyle::initialClip()); }
+ void setClip(const LengthBox& box) { SET_VAR(visual, hasAutoClip, false); SET_VAR(visual, clip, box); }
void setUnicodeBidi(EUnicodeBidi b) { noninherited_flags.unicodeBidi = b; }
@@ -1550,6 +1545,7 @@ public:
static LengthSize initialBorderRadius() { return LengthSize(Length(0, Fixed), Length(0, Fixed)); }
static ECaptionSide initialCaptionSide() { return CAPTOP; }
static EClear initialClear() { return CNONE; }
+ static LengthBox initialClip() { return LengthBox(); }
static TextDirection initialDirection() { return LTR; }
static WritingMode initialWritingMode() { return TopToBottomWritingMode; }
static TextCombine initialTextCombine() { return TextCombineNone; }
« no previous file with comments | « Source/core/rendering/RenderObject.h ('k') | Source/core/rendering/style/RenderStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698