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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 1172753003: Move LowerCaseEqualsASCII to base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util
Patch Set: Created 5 years, 6 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/renderer/render_frame_impl.cc ('k') | content/renderer/savable_resources.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 2201 matching lines...) Expand 10 before | Expand all | Expand 10 after
2212 if (node.isElementNode()) { 2212 if (node.isElementNode()) {
2213 const WebElement& element = node.toConst<WebElement>(); 2213 const WebElement& element = node.toConst<WebElement>();
2214 if (element.isTextFormControlElement()) { 2214 if (element.isTextFormControlElement()) {
2215 if (!(element.hasAttribute("readonly") || 2215 if (!(element.hasAttribute("readonly") ||
2216 element.hasAttribute("disabled"))) 2216 element.hasAttribute("disabled")))
2217 return true; 2217 return true;
2218 } 2218 }
2219 2219
2220 // Also return true if it has an ARIA role of 'textbox'. 2220 // Also return true if it has an ARIA role of 'textbox'.
2221 for (unsigned i = 0; i < element.attributeCount(); ++i) { 2221 for (unsigned i = 0; i < element.attributeCount(); ++i) {
2222 if (LowerCaseEqualsASCII(element.attributeLocalName(i), "role")) { 2222 if (base::LowerCaseEqualsASCII(element.attributeLocalName(i), "role")) {
2223 if (LowerCaseEqualsASCII(element.attributeValue(i), "textbox")) 2223 if (base::LowerCaseEqualsASCII(element.attributeValue(i), "textbox"))
2224 return true; 2224 return true;
2225 break; 2225 break;
2226 } 2226 }
2227 } 2227 }
2228 } 2228 }
2229 2229
2230 return false; 2230 return false;
2231 } 2231 }
2232 2232
2233 bool RenderViewImpl::ShouldDisplayScrollbars(int width, int height) const { 2233 bool RenderViewImpl::ShouldDisplayScrollbars(int width, int height) const {
(...skipping 1546 matching lines...) Expand 10 before | Expand all | Expand 10 after
3780 std::vector<gfx::Size> sizes; 3780 std::vector<gfx::Size> sizes;
3781 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 3781 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
3782 if (!url.isEmpty()) 3782 if (!url.isEmpty())
3783 urls.push_back( 3783 urls.push_back(
3784 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 3784 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
3785 } 3785 }
3786 SendUpdateFaviconURL(urls); 3786 SendUpdateFaviconURL(urls);
3787 } 3787 }
3788 3788
3789 } // namespace content 3789 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/renderer/savable_resources.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698