summaryrefslogtreecommitdiffstats
path: root/webkit/glue/dom_operations.cc
diff options
context:
space:
mode:
authorjcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-01 15:48:37 +0000
committerjcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-01 15:48:37 +0000
commit5ddfd63e1be6378721913af1f26fa1d4cbf09c5d (patch)
tree01af8f99ac0a2deaf6e63caea891a736bfa4fde1 /webkit/glue/dom_operations.cc
parent203c78635602da82ca215b188362c85d60fc306a (diff)
downloadchromium_src-5ddfd63e1be6378721913af1f26fa1d4cbf09c5d.zip
chromium_src-5ddfd63e1be6378721913af1f26fa1d4cbf09c5d.tar.gz
chromium_src-5ddfd63e1be6378721913af1f26fa1d4cbf09c5d.tar.bz2
This CL ensures we use the language specified in the language meta tag if any.
Also IsPageTranslatable was moved to TranslateHelper as it is where it belongs. BUG=51454 TEST=Run the browser tests. Review URL: http://codereview.chromium.org/3236008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58175 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/dom_operations.cc')
-rw-r--r--webkit/glue/dom_operations.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/webkit/glue/dom_operations.cc b/webkit/glue/dom_operations.cc
index b39943f..724e200 100644
--- a/webkit/glue/dom_operations.cc
+++ b/webkit/glue/dom_operations.cc
@@ -592,9 +592,10 @@ int NumberOfActiveAnimations(WebView* view) {
return controller->numberOfActiveAnimations();
}
-void GetMetaElementsWithName(WebDocument* document,
- const string16& name,
- std::vector<WebElement>* meta_elements) {
+void GetMetaElementsWithAttribute(WebDocument* document,
+ const string16& attribute_name,
+ const string16& attribute_value,
+ std::vector<WebElement>* meta_elements) {
DCHECK(document);
DCHECK(meta_elements);
meta_elements->clear();
@@ -610,8 +611,8 @@ void GetMetaElementsWithName(WebDocument* document,
WebElement element = node.to<WebElement>();
if (!element.hasTagName("meta"))
continue;
- WebString meta_name = element.getAttribute("name");
- if (meta_name.isNull() || meta_name != name)
+ WebString value = element.getAttribute(attribute_name);
+ if (value.isNull() || value != attribute_value)
continue;
meta_elements->push_back(element);
}