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

Side by Side Diff: Source/WebCore/rendering/svg/RenderSVGRoot.cpp

Issue 13942005: Add hit testing mode which ignores pointer-events:none. (Closed) Base URL: svn://svn.chromium.org/blink/trunk/
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « Source/WebCore/rendering/RootInlineBox.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')
Property Changes:
Modified: svn:eol-style
- native
+ LF
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2007, 2008, 2009 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2007, 2008, 2009 Rob Buis <buis@kde.org>
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2009 Google, Inc. 5 * Copyright (C) 2009 Google, Inc.
6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 // FIXME: nodeAtFloatPoint() doesn't handle rect-based hit tests yet . 445 // FIXME: nodeAtFloatPoint() doesn't handle rect-based hit tests yet .
446 if (child->nodeAtFloatPoint(request, result, localPoint, hitTestActi on)) { 446 if (child->nodeAtFloatPoint(request, result, localPoint, hitTestActi on)) {
447 updateHitTestResult(result, pointInBorderBox); 447 updateHitTestResult(result, pointInBorderBox);
448 if (!result.addNodeToRectBasedTestResult(child->node(), request, locationInContainer)) 448 if (!result.addNodeToRectBasedTestResult(child->node(), request, locationInContainer))
449 return true; 449 return true;
450 } 450 }
451 } 451 }
452 } 452 }
453 453
454 // If we didn't early exit above, we've just hit the container <svg> element . Unlike SVG 1.1, 2nd Edition allows container elements to be hit. 454 // If we didn't early exit above, we've just hit the container <svg> element . Unlike SVG 1.1, 2nd Edition allows container elements to be hit.
455 if (hitTestAction == HitTestBlockBackground && visibleToHitTesting()) { 455 if (hitTestAction == HitTestBlockBackground && visibleToHitTestRequest(reque st)) {
456 // Only return true here, if the last hit testing phase 'BlockBackground ' is executed. If we'd return true in the 'Foreground' phase, 456 // Only return true here, if the last hit testing phase 'BlockBackground ' is executed. If we'd return true in the 'Foreground' phase,
457 // hit testing would stop immediately. For SVG only trees this doesn't m atter. Though when we have a <foreignObject> subtree we need 457 // hit testing would stop immediately. For SVG only trees this doesn't m atter. Though when we have a <foreignObject> subtree we need
458 // to be able to detect hits on the background of a <div> element. If we 'd return true here in the 'Foreground' phase, we are not able 458 // to be able to detect hits on the background of a <div> element. If we 'd return true here in the 'Foreground' phase, we are not able
459 // to detect these hits anymore. 459 // to detect these hits anymore.
460 LayoutRect boundsRect(accumulatedOffset + location(), size()); 460 LayoutRect boundsRect(accumulatedOffset + location(), size());
461 if (locationInContainer.intersects(boundsRect)) { 461 if (locationInContainer.intersects(boundsRect)) {
462 updateHitTestResult(result, pointInBorderBox); 462 updateHitTestResult(result, pointInBorderBox);
463 if (!result.addNodeToRectBasedTestResult(node(), request, locationIn Container, boundsRect)) 463 if (!result.addNodeToRectBasedTestResult(node(), request, locationIn Container, boundsRect))
464 return true; 464 return true;
465 } 465 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 while (svgRoot && !svgRoot->isSVGRoot()) 497 while (svgRoot && !svgRoot->isSVGRoot())
498 svgRoot = svgRoot->parent(); 498 svgRoot = svgRoot->parent();
499 if (!svgRoot) 499 if (!svgRoot)
500 return; 500 return;
501 toRenderSVGRoot(svgRoot)->m_resourcesNeedingToInvalidateClients.add(resource ); 501 toRenderSVGRoot(svgRoot)->m_resourcesNeedingToInvalidateClients.add(resource );
502 } 502 }
503 503
504 } 504 }
505 505
506 #endif // ENABLE(SVG) 506 #endif // ENABLE(SVG)
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RootInlineBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698