From 6882a04fb36642862b11efe514251d32070c3d65 Mon Sep 17 00:00:00 2001 From: Konstantin Tokarev Date: Thu, 25 Aug 2016 19:20:41 +0300 Subject: Imported QtWebKit TP3 (git b57bc6801f1876c3220d5a4bfea33d620d477443) Change-Id: I3b1d8a2808782c9f34d50240000e20cb38d3680f Reviewed-by: Konstantin Tokarev --- Source/WebCore/html/HTMLFontElement.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'Source/WebCore/html/HTMLFontElement.cpp') diff --git a/Source/WebCore/html/HTMLFontElement.cpp b/Source/WebCore/html/HTMLFontElement.cpp index 32543a74e..398d1457a 100644 --- a/Source/WebCore/html/HTMLFontElement.cpp +++ b/Source/WebCore/html/HTMLFontElement.cpp @@ -23,7 +23,6 @@ #include "config.h" #include "HTMLFontElement.h" -#include "Attribute.h" #include "CSSPropertyNames.h" #include "CSSStyleSheet.h" #include "CSSValueKeywords.h" @@ -31,7 +30,7 @@ #include "CSSValuePool.h" #include "HTMLNames.h" #include "HTMLParserIdioms.h" -#include "StylePropertySet.h" +#include "StyleProperties.h" #include using namespace WTF; @@ -40,15 +39,15 @@ namespace WebCore { using namespace HTMLNames; -HTMLFontElement::HTMLFontElement(const QualifiedName& tagName, Document* document) +HTMLFontElement::HTMLFontElement(const QualifiedName& tagName, Document& document) : HTMLElement(tagName, document) { ASSERT(hasTagName(fontTag)); } -PassRefPtr HTMLFontElement::create(const QualifiedName& tagName, Document* document) +Ref HTMLFontElement::create(const QualifiedName& tagName, Document& document) { - return adoptRef(new HTMLFontElement(tagName, document)); + return adoptRef(*new HTMLFontElement(tagName, document)); } // http://www.whatwg.org/specs/web-apps/current-work/multipage/rendering.html#fonts-and-colors @@ -71,7 +70,7 @@ static bool parseFontSize(const CharacterType* characters, unsigned length, int& // Step 4 if (position == end) return false; - ASSERT(position < end); + ASSERT_WITH_SECURITY_IMPLICATION(position < end); // Step 5 enum { @@ -186,7 +185,7 @@ bool HTMLFontElement::isPresentationAttribute(const QualifiedName& name) const return HTMLElement::isPresentationAttribute(name); } -void HTMLFontElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStylePropertySet* style) +void HTMLFontElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStyleProperties& style) { if (name == sizeAttr) { CSSValueID size = CSSValueInvalid; @@ -195,8 +194,8 @@ void HTMLFontElement::collectStyleForPresentationAttribute(const QualifiedName& } else if (name == colorAttr) addHTMLColorToStyle(style, CSSPropertyColor, value); else if (name == faceAttr) { - if (RefPtr fontFaceValue = cssValuePool().createFontFaceValue(value)) - style->setProperty(CSSProperty(CSSPropertyFontFamily, fontFaceValue.release())); + if (RefPtr fontFaceValue = CSSValuePool::singleton().createFontFaceValue(value)) + style.setProperty(CSSProperty(CSSPropertyFontFamily, fontFaceValue.release())); } else HTMLElement::collectStyleForPresentationAttribute(name, value, style); } -- cgit v1.2.1