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

Unified Diff: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp

Issue 1815093002: Canvas2d: fix event.region being null on mouseleave/out events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
index 3c4d22d77d64dfeea4888b54bcb968b0bb3e4ae2..906002445120ea876aa4f6a536fea58f73442dfe 100644
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
@@ -605,6 +605,16 @@ std::pair<Element*, String> CanvasRenderingContext2D::getControlAndIdIfHitRegion
return std::make_pair(nullptr, String());
}
+String CanvasRenderingContext2D::getIdFromControl(const Element* element)
+{
+ if (hitRegionsCount() <= 0)
+ return String();
+
+ if (HitRegion* hitRegion = m_hitRegionManager->getHitRegionByControl(element))
+ return hitRegion->id();
+ return String();
+}
+
String CanvasRenderingContext2D::textAlign() const
{
return textAlignName(state().getTextAlign());

Powered by Google App Engine
This is Rietveld 408576698