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

Side by Side Diff: Source/WebCore/rendering/RenderRegion.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/RenderObject.h ('k') | Source/WebCore/rendering/RenderTable.cpp » ('j') | 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) 2011 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2011 Adobe Systems Incorporated. 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 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 if (!isValid()) 175 if (!isValid())
176 return false; 176 return false;
177 177
178 LayoutPoint adjustedLocation = accumulatedOffset + location(); 178 LayoutPoint adjustedLocation = accumulatedOffset + location();
179 179
180 // Check our bounds next. For this purpose always assume that we can only be hit in the 180 // Check our bounds next. For this purpose always assume that we can only be hit in the
181 // foreground phase (which is true for replaced elements like images). 181 // foreground phase (which is true for replaced elements like images).
182 // FIXME: Once we support overflow, we need to intersect with that and not w ith the bounds rect. 182 // FIXME: Once we support overflow, we need to intersect with that and not w ith the bounds rect.
183 LayoutRect boundsRect = borderBoxRectInRegion(locationInContainer.region()); 183 LayoutRect boundsRect = borderBoxRectInRegion(locationInContainer.region());
184 boundsRect.moveBy(adjustedLocation); 184 boundsRect.moveBy(adjustedLocation);
185 if (visibleToHitTesting() && action == HitTestForeground && locationInContai ner.intersects(boundsRect)) { 185 if (visibleToHitTestRequest(request) && action == HitTestForeground && locat ionInContainer.intersects(boundsRect)) {
186 // Check the contents of the RenderFlowThread. 186 // Check the contents of the RenderFlowThread.
187 if (m_flowThread->hitTestFlowThreadPortionInRegion(this, flowThreadPorti onRect(), flowThreadPortionOverflowRect(), request, result, locationInContainer, LayoutPoint(adjustedLocation.x() + borderLeft() + paddingLeft(), adjustedLocati on.y() + borderTop() + paddingTop()))) 187 if (m_flowThread->hitTestFlowThreadPortionInRegion(this, flowThreadPorti onRect(), flowThreadPortionOverflowRect(), request, result, locationInContainer, LayoutPoint(adjustedLocation.x() + borderLeft() + paddingLeft(), adjustedLocati on.y() + borderTop() + paddingTop())))
188 return true; 188 return true;
189 updateHitTestResult(result, locationInContainer.point() - toLayoutSize(a djustedLocation)); 189 updateHitTestResult(result, locationInContainer.point() - toLayoutSize(a djustedLocation));
190 if (!result.addNodeToRectBasedTestResult(generatingNode(), request, loca tionInContainer, boundsRect)) 190 if (!result.addNodeToRectBasedTestResult(generatingNode(), request, loca tionInContainer, boundsRect))
191 return true; 191 return true;
192 } 192 }
193 193
194 return false; 194 return false;
195 } 195 }
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 if (!hasOverrideHeight()) 648 if (!hasOverrideHeight())
649 return; 649 return;
650 650
651 LayoutUnit newLogicalHeight = overrideLogicalContentHeight() + borderAndPadd ingLogicalHeight(); 651 LayoutUnit newLogicalHeight = overrideLogicalContentHeight() + borderAndPadd ingLogicalHeight();
652 ASSERT(newLogicalHeight < LayoutUnit::max() / 2); 652 ASSERT(newLogicalHeight < LayoutUnit::max() / 2);
653 if (newLogicalHeight > logicalHeight()) 653 if (newLogicalHeight > logicalHeight())
654 setLogicalHeight(newLogicalHeight); 654 setLogicalHeight(newLogicalHeight);
655 } 655 }
656 656
657 } // namespace WebCore 657 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderObject.h ('k') | Source/WebCore/rendering/RenderTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698