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

Unified Diff: sky/engine/core/html/canvas/MouseEventHitRegion.h

Issue 870073003: Remove mouse events from Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: sky/engine/core/html/canvas/MouseEventHitRegion.h
diff --git a/sky/engine/core/html/canvas/MouseEventHitRegion.h b/sky/engine/core/html/canvas/MouseEventHitRegion.h
deleted file mode 100644
index 3ad9f4c64ee930fa4e036b10a7683a5e45d46284..0000000000000000000000000000000000000000
--- a/sky/engine/core/html/canvas/MouseEventHitRegion.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef SKY_ENGINE_CORE_HTML_CANVAS_MOUSEEVENTHITREGION_H_
-#define SKY_ENGINE_CORE_HTML_CANVAS_MOUSEEVENTHITREGION_H_
-
-#include "sky/engine/core/events/MouseEvent.h"
-#include "sky/engine/core/html/HTMLCanvasElement.h"
-#include "sky/engine/core/html/canvas/CanvasRenderingContext.h"
-#include "sky/engine/core/html/canvas/CanvasRenderingContext2D.h"
-
-namespace blink {
-
-class MouseEventHitRegion {
-public:
- static String region(MouseEvent& event)
- {
- if (!event.target() || !isHTMLCanvasElement(event.target()->toNode()))
- return String();
-
- HTMLCanvasElement* canvas = toHTMLCanvasElement(event.target()->toNode());
- CanvasRenderingContext* context = canvas->renderingContext();
- if (!context || !context->is2d())
- return String();
-
- HitRegion* hitRegion = toCanvasRenderingContext2D(context)->
- hitRegionAtPoint(LayoutPoint(event.offsetX(), event.offsetY()));
-
- if (!hitRegion)
- return String();
-
- String id = hitRegion->id();
- if (id.isEmpty())
- return String();
-
- return id;
- }
-};
-
-} // namespace blink
-
-#endif // SKY_ENGINE_CORE_HTML_CANVAS_MOUSEEVENTHITREGION_H_

Powered by Google App Engine
This is Rietveld 408576698