From 5ddfd63e1be6378721913af1f26fa1d4cbf09c5d Mon Sep 17 00:00:00 2001 From: "jcivelli@chromium.org" Date: Wed, 1 Sep 2010 15:48:37 +0000 Subject: 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 --- webkit/glue/dom_operations.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'webkit/glue/dom_operations.cc') 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* meta_elements) { +void GetMetaElementsWithAttribute(WebDocument* document, + const string16& attribute_name, + const string16& attribute_value, + std::vector* meta_elements) { DCHECK(document); DCHECK(meta_elements); meta_elements->clear(); @@ -610,8 +611,8 @@ void GetMetaElementsWithName(WebDocument* document, WebElement element = node.to(); 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); } -- cgit v1.1