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

Side by Side Diff: content/renderer/accessibility/blink_ax_tree_source.cc

Issue 1282363003: Convert remaining StringToLowerASCII to ToLowerASCII (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « content/public/browser/media_device_id.cc ('k') | content/renderer/manifest/manifest_parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/accessibility/blink_ax_tree_source.h" 5 #include "content/renderer/accessibility/blink_ax_tree_source.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 375
376 if (!node.isNull() && node.isElementNode()) { 376 if (!node.isNull() && node.isElementNode()) {
377 WebElement element = node.to<WebElement>(); 377 WebElement element = node.to<WebElement>();
378 is_iframe = (element.tagName() == ASCIIToUTF16("IFRAME")); 378 is_iframe = (element.tagName() == ASCIIToUTF16("IFRAME"));
379 379
380 // TODO(ctguil): The tagName in WebKit is lower cased but 380 // TODO(ctguil): The tagName in WebKit is lower cased but
381 // HTMLElement::nodeName calls localNameUpper. Consider adding 381 // HTMLElement::nodeName calls localNameUpper. Consider adding
382 // a WebElement method that returns the original lower cased tagName. 382 // a WebElement method that returns the original lower cased tagName.
383 dst->AddStringAttribute( 383 dst->AddStringAttribute(
384 ui::AX_ATTR_HTML_TAG, 384 ui::AX_ATTR_HTML_TAG,
385 base::StringToLowerASCII(UTF16ToUTF8( 385 base::ToLowerASCII(UTF16ToUTF8(
386 base::StringPiece16(element.tagName())))); 386 base::StringPiece16(element.tagName()))));
387 for (unsigned i = 0; i < element.attributeCount(); ++i) { 387 for (unsigned i = 0; i < element.attributeCount(); ++i) {
388 std::string name = base::StringToLowerASCII(UTF16ToUTF8( 388 std::string name = base::ToLowerASCII(UTF16ToUTF8(
389 base::StringPiece16(element.attributeLocalName(i)))); 389 base::StringPiece16(element.attributeLocalName(i))));
390 std::string value = 390 std::string value =
391 UTF16ToUTF8(base::StringPiece16(element.attributeValue(i))); 391 UTF16ToUTF8(base::StringPiece16(element.attributeValue(i)));
392 dst->html_attributes.push_back(std::make_pair(name, value)); 392 dst->html_attributes.push_back(std::make_pair(name, value));
393 } 393 }
394 394
395 if (!src.isReadOnly() || dst->role == ui::AX_ROLE_TEXT_FIELD) { 395 if (!src.isReadOnly() || dst->role == ui::AX_ROLE_TEXT_FIELD) {
396 dst->AddIntAttribute(ui::AX_ATTR_TEXT_SEL_START, src.selectionStart()); 396 dst->AddIntAttribute(ui::AX_ATTR_TEXT_SEL_START, src.selectionStart());
397 dst->AddIntAttribute(ui::AX_ATTR_TEXT_SEL_END, src.selectionEnd()); 397 dst->AddIntAttribute(ui::AX_ATTR_TEXT_SEL_END, src.selectionEnd());
398 398
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 } 657 }
658 } 658 }
659 659
660 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { 660 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const {
661 if (render_frame_ && render_frame_->GetWebFrame()) 661 if (render_frame_ && render_frame_->GetWebFrame())
662 return render_frame_->GetWebFrame()->document(); 662 return render_frame_->GetWebFrame()->document();
663 return WebDocument(); 663 return WebDocument();
664 } 664 }
665 665
666 } // namespace content 666 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/media_device_id.cc ('k') | content/renderer/manifest/manifest_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698