Commit ff940dfb authored by Bugs Nash's avatar Bugs Nash Committed by Commit Bot

Deleted custom parsing code now that it has all moved to APIs.

This patch
- Deleted custom implementations of ParseSingleValue and ParseShorthand
  since all the properties handled here have been implemented in
  property APIs.
- Added default implementation to generated CSSProprtyAPI header instead
- Deleted CSSPropertyAPIBaseCustom.cpp as it was now empty.

Bug: 668012
Change-Id: Ib969064802eb2724556f1bfffc12761263d98081
Reviewed-on: https://chromium-review.googlesource.com/664457Reviewed-by: default avatarJia Meng <jiameng@chromium.org>
Commit-Queue: Bugs Nash <bugsnash@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501547}
parent 44c140b9
...@@ -30,10 +30,13 @@ class CSSPropertyAPI { ...@@ -30,10 +30,13 @@ class CSSPropertyAPI {
// Parses and consumes a longhand property value from the token range. // Parses and consumes a longhand property value from the token range.
// Returns nullptr if the input is invalid. // Returns nullptr if the input is invalid.
// TODO(bugsnash): remove CSSPropertyID arg from this and ParseShorthand
virtual const CSSValue* ParseSingleValue(CSSPropertyID, virtual const CSSValue* ParseSingleValue(CSSPropertyID,
CSSParserTokenRange&, CSSParserTokenRange&,
const CSSParserContext&, const CSSParserContext&,
const CSSParserLocalContext&) const; const CSSParserLocalContext&) const {
return nullptr;
}
// Parses and consumes entire shorthand value from the token range and adds // Parses and consumes entire shorthand value from the token range and adds
// all constituent parsed longhand properties to the 'properties' set. // all constituent parsed longhand properties to the 'properties' set.
// Returns false if the input is invalid. // Returns false if the input is invalid.
...@@ -42,7 +45,9 @@ class CSSPropertyAPI { ...@@ -42,7 +45,9 @@ class CSSPropertyAPI {
CSSParserTokenRange&, CSSParserTokenRange&,
const CSSParserContext&, const CSSParserContext&,
const CSSParserLocalContext&, const CSSParserLocalContext&,
HeapVector<CSSProperty, 256>& properties) const; HeapVector<CSSProperty, 256>& properties) const {
return false;
}
virtual bool IsInterpolable() const { return false; } virtual bool IsInterpolable() const { return false; }
virtual bool IsInherited() const { return false; } virtual bool IsInherited() const { return false; }
......
...@@ -421,7 +421,6 @@ blink_core_sources("css") { ...@@ -421,7 +421,6 @@ blink_core_sources("css") {
"properties/CSSPropertyAPIBackgroundColor.cpp", "properties/CSSPropertyAPIBackgroundColor.cpp",
"properties/CSSPropertyAPIBackgroundOrMaskImage.cpp", "properties/CSSPropertyAPIBackgroundOrMaskImage.cpp",
"properties/CSSPropertyAPIBackgroundOrMaskSize.cpp", "properties/CSSPropertyAPIBackgroundOrMaskSize.cpp",
"properties/CSSPropertyAPIBaseCustom.cpp",
"properties/CSSPropertyAPIBaselineShift.cpp", "properties/CSSPropertyAPIBaselineShift.cpp",
"properties/CSSPropertyAPIBorderColor.cpp", "properties/CSSPropertyAPIBorderColor.cpp",
"properties/CSSPropertyAPIBorderImageOutset.cpp", "properties/CSSPropertyAPIBorderImageOutset.cpp",
......
// 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/CSSPropertyAPI.h"
#include "core/CSSPropertyNames.h"
#include "core/StylePropertyShorthand.h"
#include "core/css/CSSValue.h"
#include "core/css/parser/CSSParserContext.h"
#include "core/css/parser/CSSParserLocalContext.h"
#include "core/css/parser/CSSPropertyParserHelpers.h"
#include "core/css/properties/CSSPropertyAnimationTimingFunctionUtils.h"
#include "core/css/properties/CSSPropertyBackgroundUtils.h"
#include "core/css/properties/CSSPropertyBorderImageUtils.h"
#include "core/css/properties/CSSPropertyBoxShadowUtils.h"
#include "core/css/properties/CSSPropertyGridUtils.h"
#include "core/css/properties/CSSPropertyLengthUtils.h"
#include "core/css/properties/CSSPropertyMarginUtils.h"
#include "core/css/properties/CSSPropertyPositionUtils.h"
#include "core/css/properties/CSSPropertyTextDecorationLineUtils.h"
#include "core/css/properties/CSSPropertyTransitionPropertyUtils.h"
#include "platform/RuntimeEnabledFeatures.h"
namespace blink {
using namespace CSSPropertyParserHelpers;
const CSSValue* CSSPropertyAPI::ParseSingleValue(
CSSPropertyID property,
CSSParserTokenRange& range,
const CSSParserContext& context,
const CSSParserLocalContext& local_context) const {
// This is the legacy ParseSingleValue code.
// TODO(bugsnash): Move all of this to individual CSSPropertyAPI subclasses.
return nullptr;
}
bool CSSPropertyAPI::ParseShorthand(
CSSPropertyID property,
bool important,
CSSParserTokenRange& range,
const CSSParserContext& context,
const CSSParserLocalContext& local_context,
HeapVector<CSSProperty, 256>& properties) const {
return false;
}
} // 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