summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/HTMLFontElement.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-05-30 12:48:17 +0200
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-05-30 12:48:17 +0200
commit881da28418d380042aa95a97f0cbd42560a64f7c (patch)
treea794dff3274695e99c651902dde93d934ea7a5af /Source/WebCore/html/HTMLFontElement.cpp
parent7e104c57a70fdf551bb3d22a5d637cdcbc69dbea (diff)
parent0fcedcd17cc00d3dd44c718b3cb36c1033319671 (diff)
downloadqtwebkit-881da28418d380042aa95a97f0cbd42560a64f7c.tar.gz
Merge 'wip/next' into dev
Change-Id: Iff9ee5e23bb326c4371ec8ed81d56f2f05d680e9
Diffstat (limited to 'Source/WebCore/html/HTMLFontElement.cpp')
-rw-r--r--Source/WebCore/html/HTMLFontElement.cpp17
1 files changed, 8 insertions, 9 deletions
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 <wtf/text/StringBuilder.h>
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> HTMLFontElement::create(const QualifiedName& tagName, Document* document)
+Ref<HTMLFontElement> 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<CSSValueList> fontFaceValue = cssValuePool().createFontFaceValue(value))
- style->setProperty(CSSProperty(CSSPropertyFontFamily, fontFaceValue.release()));
+ if (RefPtr<CSSValueList> fontFaceValue = CSSValuePool::singleton().createFontFaceValue(value))
+ style.setProperty(CSSProperty(CSSPropertyFontFamily, fontFaceValue.release()));
} else
HTMLElement::collectStyleForPresentationAttribute(name, value, style);
}