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

Unified Diff: Source/core/css/resolver/StyleBuilderCustom.cpp

Issue 22336008: Use the runtime flag and remove '-webkit-' prefix for CSS3 text-indent. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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
Index: Source/core/css/resolver/StyleBuilderCustom.cpp
diff --git a/Source/core/css/resolver/StyleBuilderCustom.cpp b/Source/core/css/resolver/StyleBuilderCustom.cpp
index e9b9c658bd0b43098b9d56e8dea3a3f5316726d6..81f79b23465cfff20f1263e645eecceb008cc259 100644
--- a/Source/core/css/resolver/StyleBuilderCustom.cpp
+++ b/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -515,17 +515,15 @@ void StyleBuilderFunctions::applyValueCSSPropertyTextDecoration(StyleResolverSta
void StyleBuilderFunctions::applyInheritCSSPropertyTextIndent(StyleResolverState& state)
{
state.style()->setTextIndent(state.parentStyle()->textIndent());
-#if ENABLE(CSS3_TEXT)
- state.style()->setTextIndentLine(state.parentStyle()->textIndentLine());
-#endif
+ if (RuntimeEnabledFeatures::css3TextEnabled())
+ state.style()->setTextIndentLine(state.parentStyle()->textIndentLine());
}
void StyleBuilderFunctions::applyInitialCSSPropertyTextIndent(StyleResolverState& state)
{
state.style()->setTextIndent(RenderStyle::initialTextIndent());
-#if ENABLE(CSS3_TEXT)
- state.style()->setTextIndentLine(RenderStyle::initialTextIndentLine());
-#endif
+ if (RuntimeEnabledFeatures::css3TextEnabled())
Julien - ping for review 2013/08/21 01:50:08 Again shouldn't be needed as we block each-line at
jaehun 2013/08/21 05:51:02 Done.
+ state.style()->setTextIndentLine(RenderStyle::initialTextIndentLine());
}
void StyleBuilderFunctions::applyValueCSSPropertyTextIndent(StyleResolverState& state, CSSValue* value)
@@ -533,9 +531,9 @@ void StyleBuilderFunctions::applyValueCSSPropertyTextIndent(StyleResolverState&
if (!value->isValueList())
return;
- // [ <length> | <percentage> ] -webkit-each-line
+ // [ <length> | <percentage> ] each-line
// The order is guaranteed. See CSSParser::parseTextIndent.
- // The second value, -webkit-each-line is handled only when CSS3_TEXT is enabled.
+ // The second value, each-line is handled only when css3TextEnabled() returns true.
CSSValueList* valueList = toCSSValueList(value);
CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(valueList->itemWithoutBoundsCheck(0));
@@ -543,16 +541,16 @@ void StyleBuilderFunctions::applyValueCSSPropertyTextIndent(StyleResolverState&
ASSERT(!lengthOrPercentageValue.isUndefined());
state.style()->setTextIndent(lengthOrPercentageValue);
-#if ENABLE(CSS3_TEXT)
+ if (!RuntimeEnabledFeatures::css3TextEnabled())
Julien - ping for review 2013/08/21 01:50:08 You reject CSS 3 Text at parse time if the flag is
jaehun 2013/08/21 05:51:02 Removed.
+ return;
+
ASSERT(valueList->length() <= 2);
CSSPrimitiveValue* eachLineValue = toCSSPrimitiveValue(valueList->item(1));
if (eachLineValue) {
- ASSERT(eachLineValue->getValueID() == CSSValueWebkitEachLine);
+ ASSERT(eachLineValue->getValueID() == CSSValueEachLine);
state.style()->setTextIndentLine(TextIndentEachLine);
- } else {
+ } else
state.style()->setTextIndentLine(TextIndentFirstLine);
- }
-#endif
}
void StyleBuilderFunctions::applyValueCSSPropertyVerticalAlign(StyleResolverState& state, CSSValue* value)

Powered by Google App Engine
This is Rietveld 408576698