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

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp

Issue 2035583003: Revert of Make click targets inside links work. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « third_party/WebKit/LayoutTests/accessibility/image-inside-link.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012, Google Inc. All rights reserved. 2 * Copyright (C) 2012, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 1991 matching lines...) Expand 10 before | Expand all | Expand 10 after
2002 case TabRole: 2002 case TabRole:
2003 case MenuItemRole: 2003 case MenuItemRole:
2004 case MenuItemCheckBoxRole: 2004 case MenuItemCheckBoxRole:
2005 case MenuItemRadioRole: 2005 case MenuItemRadioRole:
2006 case ListItemRole: 2006 case ListItemRole:
2007 return toElement(node); 2007 return toElement(node);
2008 default: 2008 default:
2009 break; 2009 break;
2010 } 2010 }
2011 2011
2012 Element* anchor = anchorElement(); 2012 Element* elt = anchorElement();
2013 Element* clickElement = mouseButtonListener(); 2013 if (!elt)
2014 if (!anchor || (clickElement && clickElement->isDescendantOf(anchor))) 2014 elt = mouseButtonListener();
2015 return clickElement; 2015 return elt;
2016 return anchor;
2017 } 2016 }
2018 2017
2019 Element* AXNodeObject::anchorElement() const 2018 Element* AXNodeObject::anchorElement() const
2020 { 2019 {
2021 Node* node = this->getNode(); 2020 Node* node = this->getNode();
2022 if (!node) 2021 if (!node)
2023 return 0; 2022 return 0;
2024 2023
2025 AXObjectCacheImpl& cache = axObjectCache(); 2024 AXObjectCacheImpl& cache = axObjectCache();
2026 2025
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
2848 return placeholder; 2847 return placeholder;
2849 } 2848 }
2850 2849
2851 DEFINE_TRACE(AXNodeObject) 2850 DEFINE_TRACE(AXNodeObject)
2852 { 2851 {
2853 visitor->trace(m_node); 2852 visitor->trace(m_node);
2854 AXObject::trace(visitor); 2853 AXObject::trace(visitor);
2855 } 2854 }
2856 2855
2857 } // namespace blink 2856 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/accessibility/image-inside-link.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698