| Index: Source/core/html/canvas/MouseEventHitRegion.h
|
| diff --git a/Source/core/html/canvas/MouseEventHitRegion.h b/Source/core/html/canvas/MouseEventHitRegion.h
|
| index acb074aedeec2cffd2beadc1493cbfce29736c6d..1c5016f8c4e934f470b0eb0f7df43bd7d4033fb3 100644
|
| --- a/Source/core/html/canvas/MouseEventHitRegion.h
|
| +++ b/Source/core/html/canvas/MouseEventHitRegion.h
|
| @@ -14,28 +14,25 @@ namespace WebCore {
|
|
|
| class MouseEventHitRegion {
|
| public:
|
| - static String region(MouseEvent& event, bool& isNull)
|
| + static String region(MouseEvent& event)
|
| {
|
| - if (!event.target() || !isHTMLCanvasElement(event.target()->toNode())) {
|
| - isNull = true;
|
| + if (!event.target() || !isHTMLCanvasElement(event.target()->toNode()))
|
| return String();
|
| - }
|
|
|
| HTMLCanvasElement* canvas = toHTMLCanvasElement(event.target()->toNode());
|
| CanvasRenderingContext* context = canvas->renderingContext();
|
| - if (!context || !context->is2d()) {
|
| - isNull = true;
|
| + if (!context || !context->is2d())
|
| return String();
|
| - }
|
|
|
| HitRegion* hitRegion = toCanvasRenderingContext2D(context)->
|
| hitRegionAtPoint(LayoutPoint(event.offsetX(), event.offsetY()));
|
|
|
| - String id;
|
| - if (hitRegion)
|
| - id = hitRegion->id();
|
| + if (!hitRegion)
|
| + return String();
|
|
|
| - isNull = id.isEmpty();
|
| + String id = hitRegion->id();
|
| + if (id.isEmpty())
|
| + return String();
|
|
|
| return id;
|
| }
|
|
|