summaryrefslogtreecommitdiffstats
path: root/WebCore/dom/StyleElement.cpp
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2008-10-21 07:00:00 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2008-10-21 07:00:00 -0700
commit9364f22aed35e1a1e9d07c121510f80be3ab0502 (patch)
treed49911209b132da58d838efa852daf28d516df21 /WebCore/dom/StyleElement.cpp
parent87eb0cb35bad8784770ebc807e6c982432e47107 (diff)
downloadexternal_webkit-9364f22aed35e1a1e9d07c121510f80be3ab0502.zip
external_webkit-9364f22aed35e1a1e9d07c121510f80be3ab0502.tar.gz
external_webkit-9364f22aed35e1a1e9d07c121510f80be3ab0502.tar.bz2
Initial Contribution
Diffstat (limited to 'WebCore/dom/StyleElement.cpp')
-rw-r--r--WebCore/dom/StyleElement.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/WebCore/dom/StyleElement.cpp b/WebCore/dom/StyleElement.cpp
index 8280880..322808d 100644
--- a/WebCore/dom/StyleElement.cpp
+++ b/WebCore/dom/StyleElement.cpp
@@ -1,6 +1,7 @@
-/*
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
* Copyright (C) 2006, 2007 Rob Buis
- * Copyright (C) 2008 Apple, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -17,7 +18,6 @@
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-
#include "config.h"
#include "StyleElement.h"
@@ -56,13 +56,13 @@ void StyleElement::process(Element* e)
if (!e || !e->inDocument())
return;
- Vector<UChar> text;
+ String text = "";
for (Node* c = e->firstChild(); c; c = c->nextSibling())
if (c->nodeType() == Node::TEXT_NODE || c->nodeType() == Node::CDATA_SECTION_NODE || c->nodeType() == Node::COMMENT_NODE)
- append(text, c->nodeValue());
+ text += c->nodeValue();
- createSheet(e, String::adopt(text));
+ createSheet(e, text);
}
void StyleElement::createSheet(Element* e, const String& text)
@@ -74,9 +74,8 @@ void StyleElement::createSheet(Element* e, const String& text)
m_sheet = 0;
}
- // If type is empty or CSS, this is a CSS style sheet.
- const AtomicString& type = this->type();
- if (type.isEmpty() || (e->isHTMLElement() ? equalIgnoringCase(type, "text/css") : (type == "text/css"))) {
+ String typeValue = e->isHTMLElement() ? type().deprecatedString().lower() : type();
+ if (typeValue.isEmpty() || typeValue == "text/css") { // Type must be empty or CSS
RefPtr<MediaList> mediaList = new MediaList((CSSStyleSheet*)0, media(), e->isHTMLElement());
MediaQueryEvaluator screenEval("screen", true);
MediaQueryEvaluator printEval("print", true);