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

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

Issue 430333002: Do not expose auto as value of widows (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Set initial to 1 Created 6 years 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/RenderBlockFlow.cpp ('k') | Source/core/rendering/style/StyleRareInheritedData.h » ('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 d89ca471594509ea2d6928ebfed3af7063fff820..f8d041bac77ddd78807108bf9a5d2dd4ecad1802 100644
--- a/Source/core/rendering/style/RenderStyle.h
+++ b/Source/core/rendering/style/RenderStyle.h
@@ -689,7 +689,7 @@ public:
short widows() const { return rareInheritedData->widows; }
short orphans() const { return rareInheritedData->orphans; }
- bool hasAutoWidows() const { return rareInheritedData->m_hasAutoWidows; }
+ bool hasAutoWidows() const { return rareInheritedData->widows == 1; }
bool hasAutoOrphans() const { return rareInheritedData->m_hasAutoOrphans; }
EPageBreak pageBreakInside() const { return static_cast<EPageBreak>(noninherited_flags.pageBreakInside); }
EPageBreak pageBreakBefore() const { return static_cast<EPageBreak>(noninherited_flags.pageBreakBefore); }
@@ -1175,8 +1175,8 @@ public:
int zIndex() const { return m_box->zIndex(); }
void setZIndex(int v) { SET_VAR(m_box, m_hasAutoZIndex, false); SET_VAR(m_box, m_zIndex, v); }
- void setHasAutoWidows() { SET_VAR(rareInheritedData, m_hasAutoWidows, true); SET_VAR(rareInheritedData, widows, initialWidows()); }
- void setWidows(short w) { SET_VAR(rareInheritedData, m_hasAutoWidows, false); SET_VAR(rareInheritedData, widows, w); }
+ void setHasAutoWidows() { SET_VAR(rareInheritedData, widows, initialWidows()); }
+ void setWidows(short w) { SET_VAR(rareInheritedData, widows, w); }
void setHasAutoOrphans() { SET_VAR(rareInheritedData, m_hasAutoOrphans, true); SET_VAR(rareInheritedData, orphans, initialOrphans()); }
void setOrphans(short o) { SET_VAR(rareInheritedData, m_hasAutoOrphans, false); SET_VAR(rareInheritedData, orphans, o); }
@@ -1518,7 +1518,7 @@ public:
static TextIndentLine initialTextIndentLine() { return TextIndentFirstLine; }
static TextIndentType initialTextIndentType() { return TextIndentNormal; }
static EVerticalAlign initialVerticalAlign() { return BASELINE; }
- static short initialWidows() { return 2; }
+ static short initialWidows() { return 1; }
static short initialOrphans() { return 2; }
static Length initialLineHeight() { return Length(-100.0, Percent); }
static ETextAlign initialTextAlign() { return TASTART; }
« no previous file with comments | « Source/core/rendering/RenderBlockFlow.cpp ('k') | Source/core/rendering/style/StyleRareInheritedData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698