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

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

Issue 1909233002: Spec-compliant parsing and initial values for 'orphans' and 'widows'. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Some unit tests had non-conformant widphans assumptions too. Created 4 years, 8 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: 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 06c70e080e04596c5abd1cd8c7a55aa7b93dc325..5cb71933d25aff04ba70c1999103a620d87b5172 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -751,8 +751,6 @@ public:
short widows() const { return rareInheritedData->widows; }
short orphans() const { return rareInheritedData->orphans; }
- bool hasAutoWidows() const { return rareInheritedData->widows == 1; }
- bool hasAutoOrphans() const { return rareInheritedData->m_hasAutoOrphans; }
EBreak breakAfter() const { return static_cast<EBreak>(noninherited_flags.breakAfter); }
EBreak breakBefore() const { return static_cast<EBreak>(noninherited_flags.breakBefore); }
EBreak breakInside() const { return static_cast<EBreak>(noninherited_flags.breakInside); }
@@ -1301,13 +1299,8 @@ public:
void setHasAutoZIndex() { SET_VAR(m_box, m_hasAutoZIndex, true); SET_VAR(m_box, m_zIndex, 0); }
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, 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); }
-
+ void setOrphans(short o) { SET_VAR(rareInheritedData, orphans, o); }
void setBreakAfter(EBreak b) { ASSERT(b <= BreakValueLastAllowedForBreakAfterAndBefore); noninherited_flags.breakAfter = b; }
void setBreakBefore(EBreak b) { ASSERT(b <= BreakValueLastAllowedForBreakAfterAndBefore); noninherited_flags.breakBefore = b; }
void setBreakInside(EBreak b) { ASSERT(b <= BreakValueLastAllowedForBreakInside); noninherited_flags.breakInside = b; }
@@ -1711,7 +1704,7 @@ public:
static TextIndentLine initialTextIndentLine() { return TextIndentFirstLine; }
static TextIndentType initialTextIndentType() { return TextIndentNormal; }
static EVerticalAlign initialVerticalAlign() { return VerticalAlignBaseline; }
- static short initialWidows() { return 1; }
+ static short initialWidows() { return 2; }
static short initialOrphans() { return 2; }
static Length initialLineHeight() { return Length(-100.0, Percent); }
static ETextAlign initialTextAlign() { return TASTART; }

Powered by Google App Engine
This is Rietveld 408576698