[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
jchaffraix at webkit.org
jchaffraix at webkit.org
Wed Dec 22 13:27:01 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit abbcc0c0e798b06b0e607a5dd0dae8506ee4ed37
Author: jchaffraix at webkit.org <jchaffraix at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Sep 15 22:57:04 2010 +0000
Unreviewed.
Reverting my changes as it is breaking several tests on Gtk and Qt.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index ff33063..60cfd5f 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,12 @@
+2010-09-15 Julien Chaffraix <jchaffraix at codeaurora.org>
+
+ Unreviewed.
+
+ Reverting my changes as it is breaking several tests on Gtk and Qt.
+
+ * platform/mac/Skipped:
+ * platform/qt/Skipped:
+
2010-09-15 Erik Arvidsson <arv at chromium.org>
Reviewed by Adam Barth.
diff --git a/LayoutTests/platform/mac/Skipped b/LayoutTests/platform/mac/Skipped
index 888b7b0..b8ca528 100644
--- a/LayoutTests/platform/mac/Skipped
+++ b/LayoutTests/platform/mac/Skipped
@@ -188,6 +188,7 @@ canvas/philip/tests/2d.drawImage.null.html
canvas/philip/tests/2d.fillStyle.parse.current.basic.html
canvas/philip/tests/2d.fillStyle.parse.current.changed.html
canvas/philip/tests/2d.fillStyle.parse.current.removed.html
+canvas/philip/tests/2d.fillStyle.parse.system.html
canvas/philip/tests/2d.gradient.radial.cone.front.html
canvas/philip/tests/2d.gradient.radial.cone.top.html
canvas/philip/tests/2d.gradient.radial.inside2.html
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index 3d6c20c..102ff7d 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -5223,6 +5223,7 @@ canvas/philip/tests/2d.drawImage.null.html
canvas/philip/tests/2d.fillStyle.parse.current.basic.html
canvas/philip/tests/2d.fillStyle.parse.current.changed.html
canvas/philip/tests/2d.fillStyle.parse.current.removed.html
+canvas/philip/tests/2d.fillStyle.parse.system.html
canvas/philip/tests/2d.gradient.radial.cone.behind.html
canvas/philip/tests/2d.gradient.radial.cone.beside.html
canvas/philip/tests/2d.gradient.radial.cone.bottom.html
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 03e4af1..7249a48 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,5 +1,21 @@
2010-09-15 Julien Chaffraix <jchaffraix at codeaurora.org>
+ Unreviewed.
+
+ Reverting my changes as it is breaking several tests on Gtk and Qt.
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseColor):
+ * css/CSSParser.h:
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::setStrokeColor):
+ (WebCore::CanvasRenderingContext2D::setFillColor):
+ * html/canvas/CanvasStyle.cpp:
+ (WebCore::CanvasStyle::createFromString):
+ * html/canvas/CanvasStyle.h:
+
+2010-09-15 Julien Chaffraix <jchaffraix at codeaurora.org>
+
Reviewed by Andreas Kling.
Parse system colors in the HTML5 canvas context.
diff --git a/WebCore/css/CSSParser.cpp b/WebCore/css/CSSParser.cpp
index 2745660..7c35739 100644
--- a/WebCore/css/CSSParser.cpp
+++ b/WebCore/css/CSSParser.cpp
@@ -63,10 +63,8 @@
#include "FontValue.h"
#include "MediaList.h"
#include "MediaQueryExp.h"
-#include "Page.h"
#include "Pair.h"
#include "Rect.h"
-#include "RenderTheme.h"
#include "ShadowValue.h"
#include "WebKitCSSKeyframeRule.h"
#include "WebKitCSSKeyframesRule.h"
@@ -295,15 +293,12 @@ bool CSSParser::parseColor(RGBA32& color, const String& string, bool strict)
return false;
CSSValue* value = parser.m_parsedProperties[0]->value();
- if (value->cssValueType() != CSSValue::CSS_PRIMITIVE_VALUE)
- return false;
-
- CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
- if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_RGBCOLOR) {
+ if (value->cssValueType() == CSSValue::CSS_PRIMITIVE_VALUE) {
+ CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
color = primitiveValue->getRGBA32Value();
- return true;
}
- return false;
+
+ return true;
}
bool CSSParser::parseColor(CSSMutableStyleDeclaration* declaration, const String& string)
@@ -318,22 +313,6 @@ bool CSSParser::parseColor(CSSMutableStyleDeclaration* declaration, const String
return (m_numParsedProperties && m_parsedProperties[0]->m_id == CSSPropertyColor);
}
-bool CSSParser::parseSystemColor(RGBA32& color, const String& string, Document* document)
-{
- if (!document || !document->page())
- return false;
-
- CSSParserString cssColor;
- cssColor.characters = const_cast<UChar*>(string.characters());
- cssColor.length = string.length();
- int id = cssValueKeywordID(cssColor);
- if (id <= 0)
- return false;
-
- color = document->page()->theme()->systemColor(id).rgb();
- return true;
-}
-
void CSSParser::parseSelector(const String& string, Document* doc, CSSSelectorList& selectorList)
{
RefPtr<CSSStyleSheet> dummyStyleSheet = CSSStyleSheet::create(doc);
diff --git a/WebCore/css/CSSParser.h b/WebCore/css/CSSParser.h
index fff4efe..47f0bed 100644
--- a/WebCore/css/CSSParser.h
+++ b/WebCore/css/CSSParser.h
@@ -65,7 +65,6 @@ namespace WebCore {
PassRefPtr<CSSRule> parseKeyframeRule(CSSStyleSheet*, const String&);
bool parseValue(CSSMutableStyleDeclaration*, int propId, const String&, bool important);
static bool parseColor(RGBA32& color, const String&, bool strict = false);
- static bool parseSystemColor(RGBA32& color, const String&, Document*);
bool parseColor(CSSMutableStyleDeclaration*, const String&);
bool parseDeclaration(CSSMutableStyleDeclaration*, const String&);
bool parseMediaQuery(MediaList*, const String&);
diff --git a/WebCore/html/canvas/CanvasRenderingContext2D.cpp b/WebCore/html/canvas/CanvasRenderingContext2D.cpp
index 4822596..0fb7ed5 100644
--- a/WebCore/html/canvas/CanvasRenderingContext2D.cpp
+++ b/WebCore/html/canvas/CanvasRenderingContext2D.cpp
@@ -53,7 +53,6 @@
#include "KURL.h"
#include "Page.h"
#include "RenderHTMLCanvas.h"
-#include "RenderTheme.h"
#include "SecurityOrigin.h"
#include "Settings.h"
#include "StrokeStyleApplier.h"
@@ -570,7 +569,7 @@ void CanvasRenderingContext2D::setStrokeColor(const String& color)
{
if (color == state().m_unparsedStrokeColor)
return;
- setStrokeStyle(CanvasStyle::createFromString(color, canvas()->document()));
+ setStrokeStyle(CanvasStyle::createFromString(color));
state().m_unparsedStrokeColor = color;
}
@@ -611,7 +610,7 @@ void CanvasRenderingContext2D::setFillColor(const String& color)
{
if (color == state().m_unparsedFillColor)
return;
- setFillStyle(CanvasStyle::createFromString(color, canvas()->document()));
+ setFillStyle(CanvasStyle::createFromString(color));
state().m_unparsedFillColor = color;
}
diff --git a/WebCore/html/canvas/CanvasStyle.cpp b/WebCore/html/canvas/CanvasStyle.cpp
index 0b139a4..fd3c6e5 100644
--- a/WebCore/html/canvas/CanvasStyle.cpp
+++ b/WebCore/html/canvas/CanvasStyle.cpp
@@ -86,16 +86,12 @@ CanvasStyle::CanvasStyle(PassRefPtr<CanvasPattern> pattern)
{
}
-PassRefPtr<CanvasStyle> CanvasStyle::createFromString(const String& color, Document* document)
+PassRefPtr<CanvasStyle> CanvasStyle::createFromString(const String& color)
{
RGBA32 rgba;
- if (CSSParser::parseColor(rgba, color))
- return adoptRef(new CanvasStyle(rgba));
-
- if (CSSParser::parseSystemColor(rgba, color, document))
- return adoptRef(new CanvasStyle(rgba));
-
- return 0;
+ if (!CSSParser::parseColor(rgba, color))
+ return 0;
+ return adoptRef(new CanvasStyle(rgba));
}
PassRefPtr<CanvasStyle> CanvasStyle::createFromStringWithOverrideAlpha(const String& color, float alpha)
diff --git a/WebCore/html/canvas/CanvasStyle.h b/WebCore/html/canvas/CanvasStyle.h
index b463c3f..3ca760a 100644
--- a/WebCore/html/canvas/CanvasStyle.h
+++ b/WebCore/html/canvas/CanvasStyle.h
@@ -34,13 +34,12 @@ namespace WebCore {
class CanvasGradient;
class CanvasPattern;
- class Document;
class GraphicsContext;
class CanvasStyle : public RefCounted<CanvasStyle> {
public:
static PassRefPtr<CanvasStyle> createFromRGBA(RGBA32 rgba) { return adoptRef(new CanvasStyle(rgba)); }
- static PassRefPtr<CanvasStyle> createFromString(const String& color, Document* = 0);
+ static PassRefPtr<CanvasStyle> createFromString(const String& color);
static PassRefPtr<CanvasStyle> createFromStringWithOverrideAlpha(const String& color, float alpha);
static PassRefPtr<CanvasStyle> createFromGrayLevelWithAlpha(float grayLevel, float alpha) { return adoptRef(new CanvasStyle(grayLevel, alpha)); }
static PassRefPtr<CanvasStyle> createFromRGBAChannels(float r, float g, float b, float a) { return adoptRef(new CanvasStyle(r, g, b, a)); }
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list