OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |