<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):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114325
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-04-16 Andreas Kling <kling@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 <danakj@chromium.org>
[chromium] Consistent checking for clipped rects when we need the computed result enclosed within the real result
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));
}
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&);
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;
RefPtr<CSSValueList>& value = m_fontFaceValueCache.add(string, 0).iterator->second;
if (!value)
- value = CSSParser::parseFontFaceValue(string, contextStyleSheet);
+ value = CSSParser::parseFontFaceValue(string);
return value;
}
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; }
} 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);