Commit f3d35717 authored by aazzam's avatar aazzam Committed by Commit bot

Implemented CSSPropertyAPI for text-underline-position property.

Added CSSPropertyAPITextUnderlinePosition which implements
CSSPropertyAPI for the text-underline-position property.
Parsing logic is the same as before, just was moved from
CSSPropertyParser to the .cpp file. Added flag to
CSSProperties.in so that the .h file will be generated.

BUG=668012

Review-Url: https://codereview.chromium.org/2614903002
Cr-Commit-Position: refs/heads/master@{#441879}
parent 840051ec
......@@ -344,6 +344,7 @@ blink_core_sources("css") {
"parser/SizesAttributeParser.cpp",
"parser/SizesCalcParser.cpp",
"properties/CSSPropertyAPI.h",
"properties/CSSPropertyAPITextUnderlinePosition.cpp",
"properties/CSSPropertyAPITransformOrigin.cpp",
"properties/CSSPropertyAPITranslate.cpp",
"properties/CSSPropertyAPIWebkitPadding.cpp",
......
......@@ -384,7 +384,7 @@ text-overflow type_name=TextOverflow
text-shadow interpolable, inherited, converter=convertShadowList
text-size-adjust inherited, converter=convertTextSizeAdjust, type_name=TextSizeAdjust
text-transform inherited, keyword_only, keywords=[capitalize|uppercase|lowercase|none], initial_keyword=none
text-underline-position runtime_flag=CSS3TextDecorations, inherited, type_name=TextUnderlinePosition
text-underline-position runtime_flag=CSS3TextDecorations, inherited, type_name=TextUnderlinePosition, api_class
top typedom_types=[Length], keywords=[auto], supports_percentage, interpolable, initial=initialOffset, converter=convertLengthOrAuto
touch-action converter=convertFlags<TouchAction>, type_name=TouchAction
transform typedom_types=[Transform], keywords=[none], interpolable, converter=convertTransformOperations
......
......@@ -3709,11 +3709,6 @@ const CSSValue* CSSPropertyParser::parseSingleValue(
return consumeInteger(m_range, 0);
case CSSPropertyOrder:
return consumeInteger(m_range);
case CSSPropertyTextUnderlinePosition:
// auto | [ under || [ left | right ] ], but we only support auto | under
// for now
ASSERT(RuntimeEnabledFeatures::css3TextDecorationsEnabled());
return consumeIdent<CSSValueAuto, CSSValueUnder>(m_range);
case CSSPropertyVerticalAlign:
return consumeVerticalAlign(m_range, m_context.mode());
case CSSPropertyShapeOutside:
......
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "core/css/properties/CSSPropertyAPITextUnderlinePosition.h"
#include "core/css/parser/CSSPropertyParserHelpers.h"
#include "platform/RuntimeEnabledFeatures.h"
namespace blink {
const CSSValue* CSSPropertyAPITextUnderlinePosition::parseSingleValue(
CSSParserTokenRange& range,
const CSSParserContext& context) {
// auto | [ under || [ left | right ] ], but we only support auto | under
// for now
DCHECK(RuntimeEnabledFeatures::css3TextDecorationsEnabled());
// auto | [ under || [ left | right ] ], but we only support auto | under
// for now
DCHECK(RuntimeEnabledFeatures::css3TextDecorationsEnabled());
return CSSPropertyParserHelpers::consumeIdent<CSSValueAuto, CSSValueUnder>(
range);
}
} // namespace blink
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment