diff --git a/engine/core/core.gni b/engine/core/core.gni index 4348f7273e5..5ecbe0a7e25 100644 --- a/engine/core/core.gni +++ b/engine/core/core.gni @@ -963,8 +963,6 @@ sky_core_files = [ "rendering/style/NinePieceImage.cpp", "rendering/style/NinePieceImage.h", "rendering/style/OutlineValue.h", - "rendering/style/QuotesData.cpp", - "rendering/style/QuotesData.h", "rendering/style/RenderStyle.cpp", "rendering/style/RenderStyle.h", "rendering/style/RenderStyleConstants.h", diff --git a/engine/core/css/CSSComputedStyleDeclaration.cpp b/engine/core/css/CSSComputedStyleDeclaration.cpp index 811de98546e..2a6898775c1 100644 --- a/engine/core/css/CSSComputedStyleDeclaration.cpp +++ b/engine/core/css/CSSComputedStyleDeclaration.cpp @@ -2082,7 +2082,6 @@ PassRefPtr CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert /* Other unimplemented properties */ case CSSPropertyPage: // for @page - case CSSPropertyQuotes: // FIXME: needs implementation case CSSPropertySize: // for @page break; diff --git a/engine/core/css/CSSProperties.in b/engine/core/css/CSSProperties.in index 1433d88bcec..fbf4a196345 100644 --- a/engine/core/css/CSSProperties.in +++ b/engine/core/css/CSSProperties.in @@ -266,9 +266,6 @@ pointer-events inherited // LAYOUT position -// OBSOLETE -quotes inherited, converter=convertQuotes - // LAYOUT right animatable, initial=initialOffset, converter=convertLengthOrAuto diff --git a/engine/core/css/parser/CSSPropertyParser.cpp b/engine/core/css/parser/CSSPropertyParser.cpp index 438960ff567..3a90928911a 100644 --- a/engine/core/css/parser/CSSPropertyParser.cpp +++ b/engine/core/css/parser/CSSPropertyParser.cpp @@ -451,13 +451,6 @@ bool CSSPropertyParser::parseValue(CSSPropertyID propId) case CSSPropertySize: // {1,2} | auto | [ || [ portrait | landscape] ] return parseSize(propId); - case CSSPropertyQuotes: // [ ]+ | none - if (id == CSSValueNone) - validPrimitive = true; - else - parsedValue = parseQuotes(); - break; - case CSSPropertyClip: // | auto | inherit if (id == CSSValueAuto) validPrimitive = true; @@ -1662,23 +1655,6 @@ CSSPropertyParser::SizeParameterType CSSPropertyParser::parseSizeParameter(CSSVa } } -// [ ]+ | none, but none is handled in parseValue -PassRefPtr CSSPropertyParser::parseQuotes() -{ - RefPtr values = CSSValueList::createCommaSeparated(); - while (CSSParserValue* val = m_valueList->current()) { - RefPtr parsedValue = nullptr; - if (val->unit != CSSPrimitiveValue::CSS_STRING) - return nullptr; - parsedValue = CSSPrimitiveValue::create(val->string, CSSPrimitiveValue::CSS_STRING); - values->append(parsedValue.release()); - m_valueList->next(); - } - if (values->length() && values->length() % 2 == 0) - return values.release(); - return nullptr; -} - PassRefPtr CSSPropertyParser::parseAttr(CSSParserValueList* args) { if (args->size() != 1) diff --git a/engine/core/css/parser/CSSPropertyParser.h b/engine/core/css/parser/CSSPropertyParser.h index 50cd321beb7..114a604f530 100644 --- a/engine/core/css/parser/CSSPropertyParser.h +++ b/engine/core/css/parser/CSSPropertyParser.h @@ -88,7 +88,6 @@ private: bool parseShorthand(CSSPropertyID, const StylePropertyShorthand&); bool parse4Values(CSSPropertyID, const CSSPropertyID* properties); - PassRefPtr parseQuotes(); PassRefPtr parseAttr(CSSParserValueList* args); diff --git a/engine/core/css/resolver/StyleBuilderConverter.cpp b/engine/core/css/resolver/StyleBuilderConverter.cpp index 5ae6206bda9..36683d01e75 100644 --- a/engine/core/css/resolver/StyleBuilderConverter.cpp +++ b/engine/core/css/resolver/StyleBuilderConverter.cpp @@ -209,24 +209,6 @@ float StyleBuilderConverter::convertNumberOrPercentage(StyleResolverState& state return primitiveValue->getFloatValue() / 100.0f; } -PassRefPtr StyleBuilderConverter::convertQuotes(StyleResolverState&, CSSValue* value) -{ - if (value->isValueList()) { - CSSValueList* list = toCSSValueList(value); - RefPtr quotes = QuotesData::create(); - for (size_t i = 0; i < list->length(); i += 2) { - CSSValue* first = list->item(i); - CSSValue* second = list->item(i + 1); - String startQuote = toCSSPrimitiveValue(first)->getStringValue(); - String endQuote = toCSSPrimitiveValue(second)->getStringValue(); - quotes->addPair(std::make_pair(startQuote, endQuote)); - } - return quotes.release(); - } - // FIXME: We should assert we're a primitive value with valueID = CSSValueNone - return QuotesData::create(); -} - LengthSize StyleBuilderConverter::convertRadius(StyleResolverState& state, CSSValue* value) { CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); diff --git a/engine/core/css/resolver/StyleBuilderConverter.h b/engine/core/css/resolver/StyleBuilderConverter.h index 92c126d3ba6..0ee142a4974 100644 --- a/engine/core/css/resolver/StyleBuilderConverter.h +++ b/engine/core/css/resolver/StyleBuilderConverter.h @@ -31,7 +31,6 @@ #include "sky/engine/core/css/CSSValueList.h" #include "sky/engine/core/css/resolver/StyleResolverState.h" #include "sky/engine/core/rendering/RenderView.h" -#include "sky/engine/core/rendering/style/QuotesData.h" #include "sky/engine/core/rendering/style/ShadowList.h" #include "sky/engine/platform/LengthSize.h" #include "sky/engine/platform/fonts/FontDescription.h" @@ -58,7 +57,6 @@ public: static LengthPoint convertLengthPoint(StyleResolverState&, CSSValue*); static LineBoxContain convertLineBoxContain(StyleResolverState&, CSSValue*); static float convertNumberOrPercentage(StyleResolverState&, CSSValue*); - static PassRefPtr convertQuotes(StyleResolverState&, CSSValue*); static LengthSize convertRadius(StyleResolverState&, CSSValue*); static PassRefPtr convertShadow(StyleResolverState&, CSSValue*); static float convertSpacing(StyleResolverState&, CSSValue*); diff --git a/engine/core/css/resolver/StyleBuilderCustom.cpp b/engine/core/css/resolver/StyleBuilderCustom.cpp index 0ea77e0af13..4fd7cb55501 100644 --- a/engine/core/css/resolver/StyleBuilderCustom.cpp +++ b/engine/core/css/resolver/StyleBuilderCustom.cpp @@ -62,7 +62,6 @@ #include "sky/engine/core/css/resolver/TransformBuilder.h" #include "sky/engine/core/frame/LocalFrame.h" #include "sky/engine/core/frame/Settings.h" -#include "sky/engine/core/rendering/style/QuotesData.h" #include "sky/engine/core/rendering/style/RenderStyle.h" #include "sky/engine/core/rendering/style/RenderStyleConstants.h" #include "sky/engine/core/rendering/style/StyleGeneratedImage.h" diff --git a/engine/core/rendering/style/QuotesData.cpp b/engine/core/rendering/style/QuotesData.cpp deleted file mode 100644 index ecae8152d12..00000000000 --- a/engine/core/rendering/style/QuotesData.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Copyright (C) 2011 Nokia Inc. All rights reserved. - * Copyright (C) 2012 Google Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - */ - -#include "sky/engine/config.h" -#include "sky/engine/core/rendering/style/QuotesData.h" - -namespace blink { - -PassRefPtr QuotesData::create(String open, String close) -{ - RefPtr data = QuotesData::create(); - data->addPair(std::make_pair(open, close)); - return data; -} - -PassRefPtr QuotesData::create(UChar open1, UChar close1, UChar open2, UChar close2) -{ - RefPtr data = QuotesData::create(); - data->addPair(std::make_pair(String(&open1, 1), String(&close1, 1))); - data->addPair(std::make_pair(String(&open2, 1), String(&close2, 1))); - return data; -} - -void QuotesData::addPair(std::pair quotePair) -{ - m_quotePairs.append(quotePair); -} - -const String QuotesData::getOpenQuote(int index) const -{ - ASSERT(index >= 0); - if (!m_quotePairs.size() || index < 0) - return emptyString(); - if ((size_t)index >= m_quotePairs.size()) - return m_quotePairs.last().first; - return m_quotePairs.at(index).first; -} - -const String QuotesData::getCloseQuote(int index) const -{ - ASSERT(index >= -1); - if (!m_quotePairs.size() || index < 0) - return emptyString(); - if ((size_t)index >= m_quotePairs.size()) - return m_quotePairs.last().second; - return m_quotePairs.at(index).second; -} - -} // namespace blink diff --git a/engine/core/rendering/style/QuotesData.h b/engine/core/rendering/style/QuotesData.h deleted file mode 100644 index 7ac0256853c..00000000000 --- a/engine/core/rendering/style/QuotesData.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2011 Nokia Inc. All rights reserved. - * Copyright (C) 2012 Google Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - */ - -#ifndef SKY_ENGINE_CORE_RENDERING_STYLE_QUOTESDATA_H_ -#define SKY_ENGINE_CORE_RENDERING_STYLE_QUOTESDATA_H_ - -#include "sky/engine/wtf/PassRefPtr.h" -#include "sky/engine/wtf/RefCounted.h" -#include "sky/engine/wtf/Vector.h" -#include "sky/engine/wtf/text/WTFString.h" - -namespace blink { - -class QuotesData : public RefCounted { -public: - static PassRefPtr create() { return adoptRef(new QuotesData()); } - static PassRefPtr create(const String open, const String close); - static PassRefPtr create(UChar open1, UChar close1, UChar open2, UChar close2); - - bool operator==(const QuotesData& o) const { return m_quotePairs == o.m_quotePairs; } - bool operator!=(const QuotesData& o) const { return !(*this == o); } - - void addPair(const std::pair quotePair); - const String getOpenQuote(int index) const; - const String getCloseQuote(int index) const; - -private: - QuotesData() { } - - Vector > m_quotePairs; -}; - -} // namespace blink - -#endif // SKY_ENGINE_CORE_RENDERING_STYLE_QUOTESDATA_H_ diff --git a/engine/core/rendering/style/RenderStyle.cpp b/engine/core/rendering/style/RenderStyle.cpp index 6b683f35ec2..181a5de5d3b 100644 --- a/engine/core/rendering/style/RenderStyle.cpp +++ b/engine/core/rendering/style/RenderStyle.cpp @@ -29,7 +29,6 @@ #include "sky/engine/core/rendering/RenderTheme.h" #include "sky/engine/core/rendering/style/AppliedTextDecoration.h" #include "sky/engine/core/rendering/style/DataEquivalency.h" -#include "sky/engine/core/rendering/style/QuotesData.h" #include "sky/engine/core/rendering/style/ShadowList.h" #include "sky/engine/core/rendering/style/StyleImage.h" #include "sky/engine/core/rendering/style/StyleInheritedData.h" @@ -376,9 +375,6 @@ bool RenderStyle::diffNeedsFullLayout(const RenderStyle& other) const if (!rareInheritedData->shadowDataEquivalent(*other.rareInheritedData.get())) return true; - - if (!rareInheritedData->quotesDataEquivalent(*other.rareInheritedData.get())) - return true; } if (inherited.get() != other.inherited.get()) { @@ -457,11 +453,6 @@ void RenderStyle::updatePropertySpecificDifferences(const RenderStyle& other, St } } -void RenderStyle::setQuotes(PassRefPtr q) -{ - rareInheritedData.access()->quotes = q; -} - inline bool requireTransformOrigin(const Vector >& transformOperations, RenderStyle::ApplyTransformOrigin applyOrigin) { // transform-origin brackets the transform with translate operations. diff --git a/engine/core/rendering/style/RenderStyle.h b/engine/core/rendering/style/RenderStyle.h index b51f4df321a..d7057eb67f7 100644 --- a/engine/core/rendering/style/RenderStyle.h +++ b/engine/core/rendering/style/RenderStyle.h @@ -1029,9 +1029,6 @@ public: CounterDirectiveMap& accessCounterDirectives(); const CounterDirectives getCounterDirectives(const AtomicString& identifier) const; - QuotesData* quotes() const { return rareInheritedData->quotes.get(); } - void setQuotes(PassRefPtr); - const AtomicString& hyphenString() const; bool inheritedNotEqual(const RenderStyle*) const; @@ -1191,8 +1188,6 @@ public: static WrapFlow initialWrapFlow() { return WrapFlowAuto; } static WrapThrough initialWrapThrough() { return WrapThroughWrap; } - static QuotesData* initialQuotes() { return 0; } - // Keep these at the end. // FIXME: Why? Seems these should all be one big sorted list. static Color initialTapHighlightColor(); diff --git a/engine/core/rendering/style/StyleRareInheritedData.cpp b/engine/core/rendering/style/StyleRareInheritedData.cpp index 5f7acde8a5c..7a1634a997f 100644 --- a/engine/core/rendering/style/StyleRareInheritedData.cpp +++ b/engine/core/rendering/style/StyleRareInheritedData.cpp @@ -24,7 +24,6 @@ #include "sky/engine/core/rendering/style/AppliedTextDecoration.h" #include "sky/engine/core/rendering/style/DataEquivalency.h" -#include "sky/engine/core/rendering/style/QuotesData.h" #include "sky/engine/core/rendering/style/RenderStyle.h" #include "sky/engine/core/rendering/style/RenderStyleConstants.h" #include "sky/engine/core/rendering/style/ShadowList.h" @@ -39,7 +38,6 @@ struct SameSizeAsStyleRareInheritedData : public RefCounted quotes; unsigned m_tabSize;