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

Side by Side Diff: Source/WebCore/rendering/RenderBox.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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
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 994 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 if (!child->hasLayer() && child->nodeAtPoint(request, result, locationIn Container, adjustedLocation, action)) { 1005 if (!child->hasLayer() && child->nodeAtPoint(request, result, locationIn Container, adjustedLocation, action)) {
1006 updateHitTestResult(result, locationInContainer.point() - toLayoutSi ze(adjustedLocation)); 1006 updateHitTestResult(result, locationInContainer.point() - toLayoutSi ze(adjustedLocation));
1007 return true; 1007 return true;
1008 } 1008 }
1009 } 1009 }
1010 1010
1011 // Check our bounds next. For this purpose always assume that we can only be hit in the 1011 // Check our bounds next. For this purpose always assume that we can only be hit in the
1012 // foreground phase (which is true for replaced elements like images). 1012 // foreground phase (which is true for replaced elements like images).
1013 LayoutRect boundsRect = borderBoxRectInRegion(locationInContainer.region()); 1013 LayoutRect boundsRect = borderBoxRectInRegion(locationInContainer.region());
1014 boundsRect.moveBy(adjustedLocation); 1014 boundsRect.moveBy(adjustedLocation);
1015 if (visibleToHitTesting() && action == HitTestForeground && locationInContai ner.intersects(boundsRect)) { 1015 if (visibleToHitTestRequest(request) && action == HitTestForeground && locat ionInContainer.intersects(boundsRect)) {
1016 updateHitTestResult(result, locationInContainer.point() - toLayoutSize(a djustedLocation)); 1016 updateHitTestResult(result, locationInContainer.point() - toLayoutSize(a djustedLocation));
1017 if (!result.addNodeToRectBasedTestResult(node(), request, locationInCont ainer, boundsRect)) 1017 if (!result.addNodeToRectBasedTestResult(node(), request, locationInCont ainer, boundsRect))
1018 return true; 1018 return true;
1019 } 1019 }
1020 1020
1021 return false; 1021 return false;
1022 } 1022 }
1023 1023
1024 // --------------------- painting stuff ------------------------------- 1024 // --------------------- painting stuff -------------------------------
1025 1025
(...skipping 3531 matching lines...) Expand 10 before | Expand all | Expand 10 after
4557 4557
4558 void RenderBox::reportStaticMembersMemoryUsage(MemoryInstrumentation* memoryInst rumentation) 4558 void RenderBox::reportStaticMembersMemoryUsage(MemoryInstrumentation* memoryInst rumentation)
4559 { 4559 {
4560 memoryInstrumentation->addRootObject(gOverrideHeightMap, WebCoreMemoryTypes: :RenderingStructures); 4560 memoryInstrumentation->addRootObject(gOverrideHeightMap, WebCoreMemoryTypes: :RenderingStructures);
4561 memoryInstrumentation->addRootObject(gOverrideWidthMap, WebCoreMemoryTypes:: RenderingStructures); 4561 memoryInstrumentation->addRootObject(gOverrideWidthMap, WebCoreMemoryTypes:: RenderingStructures);
4562 memoryInstrumentation->addRootObject(gOverrideContainingBlockLogicalHeightMa p, WebCoreMemoryTypes::RenderingStructures); 4562 memoryInstrumentation->addRootObject(gOverrideContainingBlockLogicalHeightMa p, WebCoreMemoryTypes::RenderingStructures);
4563 memoryInstrumentation->addRootObject(gOverrideContainingBlockLogicalWidthMap , WebCoreMemoryTypes::RenderingStructures); 4563 memoryInstrumentation->addRootObject(gOverrideContainingBlockLogicalWidthMap , WebCoreMemoryTypes::RenderingStructures);
4564 } 4564 }
4565 4565
4566 } // namespace WebCore 4566 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698