Diff
Modified: trunk/Source/WebCore/ChangeLog (114324 => 114325)
--- trunk/Source/WebCore/ChangeLog 2012-04-17 00:21:46 UTC (rev 114324)
+++ trunk/Source/WebCore/ChangeLog 2012-04-17 00:28:11 UTC (rev 114325)
@@ -1,3 +1,22 @@
+2012-04-16 Andreas Kling <kl...@webkit.org>
+
+ Remove contextStyleSheet argument from CSSValuePool::createFontFaceValue().
+ <http://webkit.org/b/83988>
+
+ Reviewed by Antti Koivisto.
+
+ Remove the 'context style sheet' argument to <font face> value parsing.
+ It was only ever used to grab at the CSSValuePool back when they were per-Document.
+
+ * css/CSSParser.h:
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseFontFaceValue):
+ * css/CSSValuePool.h:
+ * css/CSSValuePool.cpp:
+ (WebCore::CSSValuePool::createFontFaceValue):
+ * html/HTMLFontElement.cpp:
+ (WebCore::HTMLFontElement::collectStyleForAttribute):
+
2012-04-16 Dana Jansens <dan...@chromium.org>
[chromium] Consistent checking for clipped rects when we need the computed result enclosed within the real result
Modified: trunk/Source/WebCore/css/CSSParser.cpp (114324 => 114325)
--- trunk/Source/WebCore/css/CSSParser.cpp 2012-04-17 00:21:46 UTC (rev 114324)
+++ trunk/Source/WebCore/css/CSSParser.cpp 2012-04-17 00:28:11 UTC (rev 114325)
@@ -940,10 +940,10 @@
return true;
}
-PassRefPtr<CSSValueList> CSSParser::parseFontFaceValue(const AtomicString& string, StyleSheetInternal* contextStyleSheet)
+PassRefPtr<CSSValueList> CSSParser::parseFontFaceValue(const AtomicString& string)
{
RefPtr<StylePropertySet> dummyStyle = StylePropertySet::create();
- if (!parseValue(dummyStyle.get(), CSSPropertyFontFamily, string, false, CSSQuirksMode, contextStyleSheet))
+ if (!parseValue(dummyStyle.get(), CSSPropertyFontFamily, string, false, CSSQuirksMode, 0))
return 0;
return static_pointer_cast<CSSValueList>(dummyStyle->getPropertyCSSValue(CSSPropertyFontFamily));
}
Modified: trunk/Source/WebCore/css/CSSParser.h (114324 => 114325)
--- trunk/Source/WebCore/css/CSSParser.h 2012-04-17 00:21:46 UTC (rev 114324)
+++ trunk/Source/WebCore/css/CSSParser.h 2012-04-17 00:28:11 UTC (rev 114325)
@@ -76,7 +76,7 @@
static bool parseValue(StylePropertySet*, CSSPropertyID, const String&, bool important, CSSParserMode, StyleSheetInternal*);
static bool parseColor(RGBA32& color, const String&, bool strict = false);
static bool parseSystemColor(RGBA32& color, const String&, Document*);
- static PassRefPtr<CSSValueList> parseFontFaceValue(const AtomicString&, StyleSheetInternal* contextStyleSheet);
+ static PassRefPtr<CSSValueList> parseFontFaceValue(const AtomicString&);
PassRefPtr<CSSPrimitiveValue> parseValidPrimitive(int ident, CSSParserValue*);
bool parseDeclaration(StylePropertySet*, const String&, RefPtr<CSSStyleSourceData>*, StyleSheetInternal* contextStyleSheet);
PassOwnPtr<MediaQuery> parseMediaQuery(const String&);
Modified: trunk/Source/WebCore/css/CSSValuePool.cpp (114324 => 114325)
--- trunk/Source/WebCore/css/CSSValuePool.cpp 2012-04-17 00:21:46 UTC (rev 114324)
+++ trunk/Source/WebCore/css/CSSValuePool.cpp 2012-04-17 00:28:11 UTC (rev 114325)
@@ -134,7 +134,7 @@
return value;
}
-PassRefPtr<CSSValueList> CSSValuePool::createFontFaceValue(const AtomicString& string, StyleSheetInternal* contextStyleSheet)
+PassRefPtr<CSSValueList> CSSValuePool::createFontFaceValue(const AtomicString& string)
{
// Just wipe out the cache and start rebuilding if it gets too big.
const int maximumFontFaceCacheSize = 128;
@@ -143,7 +143,7 @@
RefPtr<CSSValueList>& value = m_fontFaceValueCache.add(string, 0).iterator->second;
if (!value)
- value = CSSParser::parseFontFaceValue(string, contextStyleSheet);
+ value = CSSParser::parseFontFaceValue(string);
return value;
}
Modified: trunk/Source/WebCore/css/CSSValuePool.h (114324 => 114325)
--- trunk/Source/WebCore/css/CSSValuePool.h 2012-04-17 00:21:46 UTC (rev 114324)
+++ trunk/Source/WebCore/css/CSSValuePool.h 2012-04-17 00:28:11 UTC (rev 114325)
@@ -36,11 +36,10 @@
namespace WebCore {
class CSSValueList;
-class StyleSheetInternal;
class CSSValuePool {
public:
- PassRefPtr<CSSValueList> createFontFaceValue(const AtomicString&, StyleSheetInternal* contextStyleSheet);
+ PassRefPtr<CSSValueList> createFontFaceValue(const AtomicString&);
PassRefPtr<CSSPrimitiveValue> createFontFamilyValue(const String&);
PassRefPtr<CSSInheritedValue> createInheritedValue() { return m_inheritedValue; }
PassRefPtr<CSSInitialValue> createImplicitInitialValue() { return m_implicitInitialValue; }
Modified: trunk/Source/WebCore/html/HTMLFontElement.cpp (114324 => 114325)
--- trunk/Source/WebCore/html/HTMLFontElement.cpp 2012-04-17 00:21:46 UTC (rev 114324)
+++ trunk/Source/WebCore/html/HTMLFontElement.cpp 2012-04-17 00:28:11 UTC (rev 114325)
@@ -177,7 +177,7 @@
} else if (attr->name() == colorAttr)
addHTMLColorToStyle(style, CSSPropertyColor, attr->value());
else if (attr->name() == faceAttr) {
- if (RefPtr<CSSValueList> fontFaceValue = cssValuePool().createFontFaceValue(attr->value(), document()->elementSheet()->internal()))
+ if (RefPtr<CSSValueList> fontFaceValue = cssValuePool().createFontFaceValue(attr->value()))
style->setProperty(CSSProperty(CSSPropertyFontFamily, fontFaceValue.release()));
} else
HTMLElement::collectStyleForAttribute(attr, style);