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

Unified Diff: Source/core/svg/SVGColor.cpp

Issue 189913012: Merge SVGColor into SVGPaint (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix system color test Created 6 years, 9 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
« no previous file with comments | « Source/core/svg/SVGColor.h ('k') | Source/core/svg/SVGFEDiffuseLightingElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGColor.cpp
diff --git a/Source/core/svg/SVGColor.cpp b/Source/core/svg/SVGColor.cpp
deleted file mode 100644
index e50e2a6246a082bd8db26530e1336af17daf7bbe..0000000000000000000000000000000000000000
--- a/Source/core/svg/SVGColor.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
- * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
- * Copyright (C) Research In Motion Limited 2011. 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 "config.h"
-#include "core/svg/SVGColor.h"
-
-#include "bindings/v8/ExceptionMessages.h"
-#include "bindings/v8/ExceptionState.h"
-#include "core/css/parser/BisonCSSParser.h"
-#include "core/css/RGBColor.h"
-
-namespace WebCore {
-
-SVGColor::SVGColor(const SVGColorType& colorType)
- : CSSValue(SVGColorClass)
- , m_colorType(colorType)
-{
-}
-
-SVGColor::SVGColor(ClassType classType, const SVGColorType& colorType)
- : CSSValue(classType)
- , m_colorType(colorType)
-{
-}
-
-StyleColor SVGColor::colorFromRGBColorString(const String& colorString)
-{
- // FIXME: Rework css parser so it is more SVG aware.
- RGBA32 color;
- if (BisonCSSParser::parseColor(color, colorString.stripWhiteSpace()))
- return StyleColor(color);
- // FIXME: This branch catches the string currentColor, but we should error if we have an illegal color value.
- return StyleColor::currentColor();
-}
-
-String SVGColor::customCSSText() const
-{
- switch (m_colorType) {
- case SVG_COLORTYPE_UNKNOWN:
- return String();
- case SVG_COLORTYPE_RGBCOLOR_ICCCOLOR:
- case SVG_COLORTYPE_RGBCOLOR:
- // FIXME: No ICC color support.
- return m_color.serializedAsCSSComponentValue();
- case SVG_COLORTYPE_CURRENTCOLOR:
- return "currentColor";
- }
-
- ASSERT_NOT_REACHED();
- return String();
-}
-
-SVGColor::SVGColor(ClassType classType, const SVGColor& cloneFrom)
- : CSSValue(classType, /*isCSSOMSafe*/ true)
- , m_color(cloneFrom.m_color)
- , m_colorType(cloneFrom.m_colorType)
-{
-}
-
-PassRefPtrWillBeRawPtr<SVGColor> SVGColor::cloneForCSSOM() const
-{
- return adoptRefWillBeRefCountedGarbageCollected(new SVGColor(SVGColorClass, *this));
-}
-
-bool SVGColor::equals(const SVGColor& other) const
-{
- return m_colorType == other.m_colorType && m_color == other.m_color;
-}
-
-}
« no previous file with comments | « Source/core/svg/SVGColor.h ('k') | Source/core/svg/SVGFEDiffuseLightingElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698