Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Unified Diff: webkit/glue/dom_operations.cc

Issue 10916316: Add support for non-all-lower-case meta tags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Alternate method of handling case-insensitivity that doesn't require changes to WebKit Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/dom_operations.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/dom_operations.cc
diff --git a/webkit/glue/dom_operations.cc b/webkit/glue/dom_operations.cc
index cedf58ec04a7e6eea913b057e6bc1f9beb62cac1..59a4c06909c7609c89c1ca54635c1c8a1c05feb4 100644
--- a/webkit/glue/dom_operations.cc
+++ b/webkit/glue/dom_operations.cc
@@ -9,6 +9,7 @@
#include "base/compiler_specific.h"
#include "base/logging.h"
#include "base/string_util.h"
+#include "base/utf_string_conversions.h"
MAD 2012/09/27 20:19:44 Did you try to also remove it from chrome/renderer
#include "third_party/WebKit/Source/WebKit/chromium/public/WebAnimationController.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h"
@@ -309,8 +310,8 @@ int NumberOfActiveAnimations(WebView* view) {
}
void GetMetaElementsWithAttribute(WebDocument* document,
- const string16& attribute_name,
- const string16& attribute_value,
+ const char* attribute_name,
+ const char* attribute_value,
std::vector<WebElement>* meta_elements) {
DCHECK(document);
DCHECK(meta_elements);
@@ -319,6 +320,8 @@ void GetMetaElementsWithAttribute(WebDocument* document,
if (head.isNull() || !head.hasChildNodes())
return;
+ string16 attribute_name16(ASCIIToUTF16(attribute_name));
+
WebNodeList children = head.childNodes();
for (size_t i = 0; i < children.length(); ++i) {
WebNode node = children.item(i);
@@ -327,8 +330,8 @@ void GetMetaElementsWithAttribute(WebDocument* document,
WebElement element = node.to<WebElement>();
if (!element.hasTagName("meta"))
continue;
- WebString value = element.getAttribute(attribute_name);
- if (value.isNull() || value != attribute_value)
+ WebString value = element.getAttribute(attribute_name16);
+ if (value.isNull() || !LowerCaseEqualsASCII(value, attribute_value))
continue;
meta_elements->push_back(element);
}
« no previous file with comments | « webkit/glue/dom_operations.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698