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 2583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2594 if (node.isContentEditable()) | 2594 if (node.isContentEditable()) |
2595 return true; | 2595 return true; |
2596 | 2596 |
2597 if (node.isElementNode()) { | 2597 if (node.isElementNode()) { |
2598 const WebElement& element = node.toConst<WebElement>(); | 2598 const WebElement& element = node.toConst<WebElement>(); |
2599 if (element.isTextFormControlElement()) | 2599 if (element.isTextFormControlElement()) |
2600 return true; | 2600 return true; |
2601 | 2601 |
2602 // Also return true if it has an ARIA role of 'textbox'. | 2602 // Also return true if it has an ARIA role of 'textbox'. |
2603 for (unsigned i = 0; i < element.attributeCount(); ++i) { | 2603 for (unsigned i = 0; i < element.attributeCount(); ++i) { |
2604 if (LowerCaseEqualsASCII(element.attributeLocalName(i), "role")) { | 2604 if (base::LowerCaseEqualsASCII( |
2605 if (LowerCaseEqualsASCII(element.attributeValue(i), "textbox")) | 2605 base::string16(element.attributeLocalName(i)), "role")) { |
| 2606 if (base::LowerCaseEqualsASCII( |
| 2607 base::string16(element.attributeValue(i)), "textbox")) |
2606 return true; | 2608 return true; |
2607 break; | 2609 break; |
2608 } | 2610 } |
2609 } | 2611 } |
2610 } | 2612 } |
2611 | 2613 |
2612 return false; | 2614 return false; |
2613 } | 2615 } |
2614 | 2616 |
2615 bool RenderViewImpl::NodeContainsPoint(const WebNode& node, | 2617 bool RenderViewImpl::NodeContainsPoint(const WebNode& node, |
(...skipping 1696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4312 std::vector<gfx::Size> sizes; | 4314 std::vector<gfx::Size> sizes; |
4313 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4315 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
4314 if (!url.isEmpty()) | 4316 if (!url.isEmpty()) |
4315 urls.push_back( | 4317 urls.push_back( |
4316 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4318 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
4317 } | 4319 } |
4318 SendUpdateFaviconURL(urls); | 4320 SendUpdateFaviconURL(urls); |
4319 } | 4321 } |
4320 | 4322 |
4321 } // namespace content | 4323 } // namespace content |
OLD | NEW |