summaryrefslogtreecommitdiff
path: root/chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGContainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGContainer.cpp')
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGContainer.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGContainer.cpp b/chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGContainer.cpp
index f9a9bf16c9a..04f28cae872 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGContainer.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGContainer.cpp
@@ -25,12 +25,14 @@
#include "core/rendering/svg/RenderSVGContainer.h"
-#include "core/platform/graphics/GraphicsContextStateSaver.h"
+#include "core/rendering/GraphicsContextAnnotator.h"
+#include "core/rendering/LayoutRectRecorder.h"
#include "core/rendering/LayoutRepainter.h"
#include "core/rendering/RenderView.h"
#include "core/rendering/svg/SVGRenderingContext.h"
#include "core/rendering/svg/SVGResources.h"
#include "core/rendering/svg/SVGResourcesCache.h"
+#include "platform/graphics/GraphicsContextStateSaver.h"
namespace WebCore {
@@ -52,6 +54,7 @@ void RenderSVGContainer::layout()
// RenderSVGRoot disables layoutState for the SVG rendering tree.
ASSERT(!view()->layoutStateEnabled());
+ LayoutRectRecorder recorder(*this);
LayoutRepainter repainter(*this, SVGRenderSupport::checkForSVGRepaintDuringLayout(this) || selfWillPaint());
// Allow RenderSVGViewportContainer to update its viewport.
@@ -183,7 +186,14 @@ bool RenderSVGContainer::nodeAtFloatPoint(const HitTestRequest& request, HitTest
}
}
- // Spec: Only graphical elements can be targeted by the mouse, period.
+ // pointer-events=boundingBox makes it possible for containers to be direct targets
+ if (style()->pointerEvents() == PE_BOUNDINGBOX) {
+ ASSERT(isObjectBoundingBoxValid());
+ if (objectBoundingBox().contains(localPoint)) {
+ updateHitTestResult(result, roundedLayoutPoint(localPoint));
+ return true;
+ }
+ }
// 16.4: "If there are no graphics elements whose relevant graphics content is under the pointer (i.e., there is no target element), the event is not dispatched."
return false;
}