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

Side by Side Diff: Source/modules/accessibility/AXLayoutObject.cpp

Issue 1175623002: Revert of Moving HitTest function to DeprecatedPaintLayerStackingNode. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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 | « Source/core/paint/DeprecatedPaintLayerStackingNode.cpp ('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) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple 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 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after
1498 1498
1499 AXObject* AXLayoutObject::accessibilityHitTest(const IntPoint& point) const 1499 AXObject* AXLayoutObject::accessibilityHitTest(const IntPoint& point) const
1500 { 1500 {
1501 if (!m_layoutObject || !m_layoutObject->hasLayer()) 1501 if (!m_layoutObject || !m_layoutObject->hasLayer())
1502 return 0; 1502 return 0;
1503 1503
1504 DeprecatedPaintLayer* layer = toLayoutBox(m_layoutObject)->layer(); 1504 DeprecatedPaintLayer* layer = toLayoutBox(m_layoutObject)->layer();
1505 1505
1506 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active); 1506 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active);
1507 HitTestResult hitTestResult = HitTestResult(request, point); 1507 HitTestResult hitTestResult = HitTestResult(request, point);
1508 layer->stackingNode()->hitTest(hitTestResult); 1508 layer->hitTest(hitTestResult);
1509 if (!hitTestResult.innerNode()) 1509 if (!hitTestResult.innerNode())
1510 return 0; 1510 return 0;
1511 1511
1512 Node* node = hitTestResult.innerNode(); 1512 Node* node = hitTestResult.innerNode();
1513 1513
1514 // Allow the hit test to return media control buttons. 1514 // Allow the hit test to return media control buttons.
1515 if (node->isInShadowTree() && (!isHTMLInputElement(*node) || !node->isMediaC ontrolElement())) 1515 if (node->isInShadowTree() && (!isHTMLInputElement(*node) || !node->isMediaC ontrolElement()))
1516 node = node->shadowHost(); 1516 node = node->shadowHost();
1517 1517
1518 if (isHTMLAreaElement(node)) 1518 if (isHTMLAreaElement(node))
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
2484 if (label && label->layoutObject()) { 2484 if (label && label->layoutObject()) {
2485 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect(); 2485 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect();
2486 result.unite(labelRect); 2486 result.unite(labelRect);
2487 } 2487 }
2488 } 2488 }
2489 2489
2490 return result; 2490 return result;
2491 } 2491 }
2492 2492
2493 } // namespace blink 2493 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/DeprecatedPaintLayerStackingNode.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698