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