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
This commit is contained in:
Hixie 2015-04-09 09:24:49 -07:00
parent 1964bdad39
commit ac53fad655
12 changed files with 11 additions and 44 deletions

View File

@ -143,7 +143,6 @@ namespace blink {
}
{% endmacro %}
{{apply_auto('CSSPropertyClip')}}
{{apply_auto('CSSPropertyOrphans')}}
{{apply_auto('CSSPropertyWidows')}}
{{apply_auto('CSSPropertyZIndex')}}

View File

@ -352,8 +352,6 @@ PassRefPtr<AnimatableValue> 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:

View File

@ -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:

View File

@ -137,7 +137,6 @@ static const CSSPropertyID staticComputableProperties[] = {
CSSPropertyObjectFit,
CSSPropertyObjectPosition,
CSSPropertyOpacity,
CSSPropertyOrphans,
CSSPropertyOutlineColor,
CSSPropertyOutlineOffset,
CSSPropertyOutlineStyle,
@ -1540,10 +1539,6 @@ PassRefPtr<CSSValue> 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:

View File

@ -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<int>
outline-style custom_all

View File

@ -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,

View File

@ -702,7 +702,6 @@ bool CSSPropertyParser::parseValue(CSSPropertyID propId)
validPrimitive = (!id && validUnit(value, FLength | FPercent));
break;
case CSSPropertyOrphans: // <integer> | inherit | auto (We've added support for auto for backwards compatibility)
case CSSPropertyWidows: // <integer> | inherit | auto (Ditto)
if (id == CSSValueAuto)
validPrimitive = true;

View File

@ -381,9 +381,6 @@ void AnimatedStyleBuilder::applyProperty(CSSPropertyID property, StyleResolverSt
// Avoiding a value of 1 forces a layer to be created.
style->setOpacity(clampTo<float>(toAnimatableDouble(value)->toDouble(), 0, nextafterf(1, 0)));
return;
case CSSPropertyOrphans:
style->setOrphans(animatableValueRoundClampTo<unsigned short>(value, 1));
return;
case CSSPropertyOutlineColor:
style->setOutlineColor(toAnimatableColor(value)->color());
return;

View File

@ -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.

View File

@ -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<EPageBreak>(noninherited_flags.pageBreakInside); }
EPageBreak pageBreakBefore() const { return static_cast<EPageBreak>(noninherited_flags.pageBreakBefore); }
EPageBreak pageBreakAfter() const { return static_cast<EPageBreak>(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; }

View File

@ -42,8 +42,8 @@ struct SameSizeAsStyleRareInheritedData : public RefCounted<SameSizeAsStyleRareI
void* refPtrs[1];
Length lengths[1];
unsigned m_bitfields[2];
short pagedMediaShorts[2];
unsigned unsigneds[1];
short pagedMediaShorts[1];
short hyphenationShorts[3];
Color touchColors;
@ -54,10 +54,6 @@ COMPILE_ASSERT(sizeof(StyleRareInheritedData) == sizeof(SameSizeAsStyleRareInher
StyleRareInheritedData::StyleRareInheritedData()
: textStrokeWidth(RenderStyle::initialTextStrokeWidth())
, indent(RenderStyle::initialTextIndent())
, widows(RenderStyle::initialWidows())
, orphans(RenderStyle::initialOrphans())
, m_hasAutoWidows(true)
, m_hasAutoOrphans(true)
, m_textStrokeColorIsCurrentColor(true)
, m_textFillColorIsCurrentColor(true)
, m_textEmphasisColorIsCurrentColor(true)
@ -81,6 +77,8 @@ StyleRareInheritedData::StyleRareInheritedData()
, m_textUnderlinePosition(RenderStyle::initialTextUnderlinePosition())
, m_touchActionDelay(RenderStyle::initialTouchActionDelay())
, m_subtreeWillChangeContents(false)
, m_hasAutoWidows(true)
, widows(RenderStyle::initialWidows())
, hyphenationLimitBefore(-1)
, hyphenationLimitAfter(-1)
, hyphenationLimitLines(-1)
@ -98,10 +96,6 @@ StyleRareInheritedData::StyleRareInheritedData(const StyleRareInheritedData& o)
, textShadow(o.textShadow)
, highlight(o.highlight)
, indent(o.indent)
, widows(o.widows)
, orphans(o.orphans)
, m_hasAutoWidows(o.m_hasAutoWidows)
, m_hasAutoOrphans(o.m_hasAutoOrphans)
, m_textStrokeColorIsCurrentColor(o.m_textStrokeColorIsCurrentColor)
, m_textFillColorIsCurrentColor(o.m_textFillColorIsCurrentColor)
, m_textEmphasisColorIsCurrentColor(o.m_textEmphasisColorIsCurrentColor)
@ -125,10 +119,12 @@ StyleRareInheritedData::StyleRareInheritedData(const StyleRareInheritedData& o)
, m_textUnderlinePosition(o.m_textUnderlinePosition)
, m_touchActionDelay(o.m_touchActionDelay)
, m_subtreeWillChangeContents(o.m_subtreeWillChangeContents)
, hyphenationString(o.hyphenationString)
, m_hasAutoWidows(o.m_hasAutoWidows)
, widows(o.widows)
, hyphenationLimitBefore(o.hyphenationLimitBefore)
, hyphenationLimitAfter(o.hyphenationLimitAfter)
, hyphenationLimitLines(o.hyphenationLimitLines)
, hyphenationString(o.hyphenationString)
, locale(o.locale)
, textEmphasisCustomMark(o.textEmphasisCustomMark)
, m_tabSize(o.m_tabSize)
@ -152,9 +148,7 @@ bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const
&& highlight == o.highlight
&& indent == o.indent
&& widows == o.widows
&& orphans == o.orphans
&& m_hasAutoWidows == o.m_hasAutoWidows
&& m_hasAutoOrphans == o.m_hasAutoOrphans
&& m_textStrokeColorIsCurrentColor == o.m_textStrokeColorIsCurrentColor
&& m_textFillColorIsCurrentColor == o.m_textFillColorIsCurrentColor
&& m_textEmphasisColorIsCurrentColor == o.m_textEmphasisColorIsCurrentColor

View File

@ -78,12 +78,6 @@ public:
Length indent;
// Paged media properties.
short widows;
short orphans;
unsigned m_hasAutoWidows : 1;
unsigned m_hasAutoOrphans : 1;
unsigned m_textStrokeColorIsCurrentColor : 1;
unsigned m_textFillColorIsCurrentColor : 1;
unsigned m_textEmphasisColorIsCurrentColor : 1;
@ -113,10 +107,14 @@ public:
// expressed by 'will-change: contents' includes descendants.
unsigned m_subtreeWillChangeContents : 1;
AtomicString hyphenationString;
// Paged media properties.
unsigned m_hasAutoWidows : 1;
short widows;
short hyphenationLimitBefore;
short hyphenationLimitAfter;
short hyphenationLimitLines;
AtomicString hyphenationString;
AtomicString locale;