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

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

Issue 2009283002: Fix touch accessibility events in WebViews and iframes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable cross-site test temporarily 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
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 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after
1406 PaintLayer* layer = toLayoutBox(m_layoutObject)->layer(); 1406 PaintLayer* layer = toLayoutBox(m_layoutObject)->layer();
1407 1407
1408 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active); 1408 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active);
1409 HitTestResult hitTestResult = HitTestResult(request, point); 1409 HitTestResult hitTestResult = HitTestResult(request, point);
1410 layer->hitTest(hitTestResult); 1410 layer->hitTest(hitTestResult);
1411 if (!hitTestResult.innerNode()) 1411 if (!hitTestResult.innerNode())
1412 return 0; 1412 return 0;
1413 1413
1414 Node* node = hitTestResult.innerNode(); 1414 Node* node = hitTestResult.innerNode();
1415 1415
1416 // MediaDocument has a special shadow root for displaying the save button.
1417 bool allowNodeInShadowTree = node->document().isMediaDocument() && RuntimeEn abledFeatures::mediaDocumentDownloadButtonEnabled();
1418
1419 // Allow the hit test to return media control buttons.
1420 if (node->isInShadowTree() && (!isHTMLInputElement(*node) || !node->isMediaC ontrolElement()) && !allowNodeInShadowTree)
1421 node = node->shadowHost();
1422
1423 if (isHTMLAreaElement(node)) 1416 if (isHTMLAreaElement(node))
1424 return accessibilityImageMapHitTest(toHTMLAreaElement(node), point); 1417 return accessibilityImageMapHitTest(toHTMLAreaElement(node), point);
1425 1418
1426 if (isHTMLOptionElement(node)) 1419 if (isHTMLOptionElement(node))
1427 node = toHTMLOptionElement(*node).ownerSelectElement(); 1420 node = toHTMLOptionElement(*node).ownerSelectElement();
1428 1421
1429 LayoutObject* obj = node->layoutObject(); 1422 LayoutObject* obj = node->layoutObject();
1430 if (!obj) 1423 if (!obj)
1431 return 0; 1424 return 0;
1432 1425
(...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after
2474 if (label && label->layoutObject()) { 2467 if (label && label->layoutObject()) {
2475 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe ct(); 2468 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe ct();
2476 result.unite(labelRect); 2469 result.unite(labelRect);
2477 } 2470 }
2478 } 2471 }
2479 2472
2480 return result; 2473 return result;
2481 } 2474 }
2482 2475
2483 } // namespace blink 2476 } // namespace blink
OLDNEW
« no previous file with comments | « content/content_tests.gypi ('k') | third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698