From ac53fad655dec341a02e7d2b70dc5bd25c8277ad Mon Sep 17 00:00:00 2001 From: Hixie Date: Thu, 9 Apr 2015 09:24:49 -0700 Subject: [PATCH] drop 'orphan' property, since it's for paged media and we don't support paged media any more R=ojan@chromium.org Review URL: https://codereview.chromium.org/1068073002 --- .../templates/StyleBuilderFunctions.cpp.tmpl | 1 - .../css/CSSAnimatableValueFactory.cpp | 2 -- .../core/animation/css/CSSPropertyEquality.cpp | 2 -- .../core/css/CSSComputedStyleDeclaration.cpp | 5 ----- engine/core/css/CSSProperties.in | 3 --- engine/core/css/StylePropertySet.cpp | 1 - engine/core/css/parser/CSSPropertyParser.cpp | 1 - .../core/css/resolver/AnimatedStyleBuilder.cpp | 3 --- engine/core/editing/EditingStyle.cpp | 1 - engine/core/rendering/style/RenderStyle.h | 6 ------ .../rendering/style/StyleRareInheritedData.cpp | 18 ++++++------------ .../rendering/style/StyleRareInheritedData.h | 12 +++++------- 12 files changed, 11 insertions(+), 44 deletions(-) diff --git a/engine/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl b/engine/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl index 59fd5324eb0..e2735ea8c2d 100644 --- a/engine/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl +++ b/engine/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl @@ -143,7 +143,6 @@ namespace blink { } {% endmacro %} {{apply_auto('CSSPropertyClip')}} -{{apply_auto('CSSPropertyOrphans')}} {{apply_auto('CSSPropertyWidows')}} {{apply_auto('CSSPropertyZIndex')}} diff --git a/engine/core/animation/css/CSSAnimatableValueFactory.cpp b/engine/core/animation/css/CSSAnimatableValueFactory.cpp index 8ca30adacb7..637e45ae349 100644 --- a/engine/core/animation/css/CSSAnimatableValueFactory.cpp +++ b/engine/core/animation/css/CSSAnimatableValueFactory.cpp @@ -352,8 +352,6 @@ PassRefPtr CSSAnimatableValueFactory::create(CSSPropertyID prop return createFromLengthPoint(style.objectPosition(), style); case CSSPropertyOpacity: return createFromDouble(style.opacity()); - case CSSPropertyOrphans: - return createFromDouble(style.orphans()); case CSSPropertyOutlineColor: return createFromColor(property, style); case CSSPropertyOutlineOffset: diff --git a/engine/core/animation/css/CSSPropertyEquality.cpp b/engine/core/animation/css/CSSPropertyEquality.cpp index 240f6e98837..f7a1b97f677 100644 --- a/engine/core/animation/css/CSSPropertyEquality.cpp +++ b/engine/core/animation/css/CSSPropertyEquality.cpp @@ -152,8 +152,6 @@ bool CSSPropertyEquality::propertiesEqual(CSSPropertyID prop, const RenderStyle& return a.objectPosition() == b.objectPosition(); case CSSPropertyOpacity: return a.opacity() == b.opacity(); - case CSSPropertyOrphans: - return a.orphans() == b.orphans(); case CSSPropertyOutlineColor: return a.outlineColor().resolve(a.color()) == b.outlineColor().resolve(b.color()); case CSSPropertyOutlineOffset: diff --git a/engine/core/css/CSSComputedStyleDeclaration.cpp b/engine/core/css/CSSComputedStyleDeclaration.cpp index 16b0b9bd0ca..214286974a3 100644 --- a/engine/core/css/CSSComputedStyleDeclaration.cpp +++ b/engine/core/css/CSSComputedStyleDeclaration.cpp @@ -137,7 +137,6 @@ static const CSSPropertyID staticComputableProperties[] = { CSSPropertyObjectFit, CSSPropertyObjectPosition, CSSPropertyOpacity, - CSSPropertyOrphans, CSSPropertyOutlineColor, CSSPropertyOutlineOffset, CSSPropertyOutlineStyle, @@ -1540,10 +1539,6 @@ PassRefPtr CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert Pair::KeepIdenticalValues)); case CSSPropertyOpacity: return cssValuePool().createValue(style->opacity(), CSSPrimitiveValue::CSS_NUMBER); - case CSSPropertyOrphans: - if (style->hasAutoOrphans()) - return cssValuePool().createIdentifierValue(CSSValueAuto); - return cssValuePool().createValue(style->orphans(), CSSPrimitiveValue::CSS_NUMBER); case CSSPropertyOutlineColor: return m_allowVisitedStyle ? cssValuePool().createColorValue(style->colorIncludingFallback(CSSPropertyOutlineColor).rgb()) : currentColorOrValidColor(*style, style->outlineColor()); case CSSPropertyOutlineOffset: diff --git a/engine/core/css/CSSProperties.in b/engine/core/css/CSSProperties.in index 0ffef8c093f..8f59a290aab 100644 --- a/engine/core/css/CSSProperties.in +++ b/engine/core/css/CSSProperties.in @@ -222,9 +222,6 @@ opacity animatable, type_name=float // LAYOUT order type_name=int -// OBSOLETE -orphans animatable, inherited, type_name=short, custom_all - outline-color animatable, custom_all outline-offset animatable, converter=convertComputedLength outline-style custom_all diff --git a/engine/core/css/StylePropertySet.cpp b/engine/core/css/StylePropertySet.cpp index a917602a5e0..08a4b7035a1 100644 --- a/engine/core/css/StylePropertySet.cpp +++ b/engine/core/css/StylePropertySet.cpp @@ -280,7 +280,6 @@ String StylePropertySet::asText() const // This is the list of properties we want to copy in the copyBlockProperties() function. // It is the list of CSS properties that apply specially to block-level elements. static const CSSPropertyID staticBlockProperties[] = { - CSSPropertyOrphans, CSSPropertyOverflow, // This can be also be applied to replaced elements CSSPropertyWebkitAspectRatio, CSSPropertyPageBreakAfter, diff --git a/engine/core/css/parser/CSSPropertyParser.cpp b/engine/core/css/parser/CSSPropertyParser.cpp index 7c6095330bf..438960ff567 100644 --- a/engine/core/css/parser/CSSPropertyParser.cpp +++ b/engine/core/css/parser/CSSPropertyParser.cpp @@ -702,7 +702,6 @@ bool CSSPropertyParser::parseValue(CSSPropertyID propId) validPrimitive = (!id && validUnit(value, FLength | FPercent)); break; - case CSSPropertyOrphans: // | inherit | auto (We've added support for auto for backwards compatibility) case CSSPropertyWidows: // | inherit | auto (Ditto) if (id == CSSValueAuto) validPrimitive = true; diff --git a/engine/core/css/resolver/AnimatedStyleBuilder.cpp b/engine/core/css/resolver/AnimatedStyleBuilder.cpp index 838ad019bb4..9bceb7f1712 100644 --- a/engine/core/css/resolver/AnimatedStyleBuilder.cpp +++ b/engine/core/css/resolver/AnimatedStyleBuilder.cpp @@ -381,9 +381,6 @@ void AnimatedStyleBuilder::applyProperty(CSSPropertyID property, StyleResolverSt // Avoiding a value of 1 forces a layer to be created. style->setOpacity(clampTo(toAnimatableDouble(value)->toDouble(), 0, nextafterf(1, 0))); return; - case CSSPropertyOrphans: - style->setOrphans(animatableValueRoundClampTo(value, 1)); - return; case CSSPropertyOutlineColor: style->setOutlineColor(toAnimatableColor(value)->color()); return; diff --git a/engine/core/editing/EditingStyle.cpp b/engine/core/editing/EditingStyle.cpp index e094d785756..79a9db506f7 100644 --- a/engine/core/editing/EditingStyle.cpp +++ b/engine/core/editing/EditingStyle.cpp @@ -75,7 +75,6 @@ static const CSSPropertyID staticEditingProperties[] = { CSSPropertyFontWeight, CSSPropertyLetterSpacing, CSSPropertyLineHeight, - CSSPropertyOrphans, CSSPropertyTextAlign, // FIXME: CSSPropertyTextDecoration needs to be removed when CSS3 Text // Decoration feature is no longer experimental. diff --git a/engine/core/rendering/style/RenderStyle.h b/engine/core/rendering/style/RenderStyle.h index 27f49fe59d9..42d4d634e5e 100644 --- a/engine/core/rendering/style/RenderStyle.h +++ b/engine/core/rendering/style/RenderStyle.h @@ -583,9 +583,7 @@ public: bool isLink() const { return noninherited_flags.isLink; } short widows() const { return rareInheritedData->widows; } - short orphans() const { return rareInheritedData->orphans; } bool hasAutoWidows() const { return rareInheritedData->m_hasAutoWidows; } - bool hasAutoOrphans() const { return rareInheritedData->m_hasAutoOrphans; } EPageBreak pageBreakInside() const { return static_cast(noninherited_flags.pageBreakInside); } EPageBreak pageBreakBefore() const { return static_cast(noninherited_flags.pageBreakBefore); } EPageBreak pageBreakAfter() const { return static_cast(noninherited_flags.pageBreakAfter); } @@ -920,9 +918,6 @@ public: 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 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); } - // For valid values of page-break-inside see http://www.w3.org/TR/CSS21/page.html#page-break-props void setPageBreakInside(EPageBreak b) { ASSERT(b == PBAUTO || b == PBAVOID); noninherited_flags.pageBreakInside = b; } void setPageBreakBefore(EPageBreak b) { noninherited_flags.pageBreakBefore = b; } @@ -1115,7 +1110,6 @@ public: static TextIndentType initialTextIndentType() { return TextIndentNormal; } static EVerticalAlign initialVerticalAlign() { return BASELINE; } static short initialWidows() { return 2; } - static short initialOrphans() { return 2; } static Length initialLineHeight() { return Length(-100.0, Percent); } static ETextAlign initialTextAlign() { return TASTART; } static TextAlignLast initialTextAlignLast() { return TextAlignLastAuto; } diff --git a/engine/core/rendering/style/StyleRareInheritedData.cpp b/engine/core/rendering/style/StyleRareInheritedData.cpp index 85471789ece..c76aef1191b 100644 --- a/engine/core/rendering/style/StyleRareInheritedData.cpp +++ b/engine/core/rendering/style/StyleRareInheritedData.cpp @@ -42,8 +42,8 @@ struct SameSizeAsStyleRareInheritedData : public RefCounted