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

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

Issue 1240663002: Canvas2d: Remove the updateAccessibility() method in HitRegion class. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « Source/modules/canvas2d/CanvasRenderingContext2D.h ('k') | Source/modules/canvas2d/HitRegion.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/canvas2d/CanvasRenderingContext2D.cpp
diff --git a/Source/modules/canvas2d/CanvasRenderingContext2D.cpp b/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
index 0e9cd78c51f800a60aef71c874d2fe993eba683c..64c11d0b173b35e5d7f03e614da6fa03ed99a011 100644
--- a/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
+++ b/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
@@ -2069,7 +2069,7 @@ void CanvasRenderingContext2D::drawFocusIfNeededInternal(const Path& path, Eleme
}
// Update its accessible bounds whether it's focused or not.
- updateFocusRingElementAccessibility(path, element);
+ updateElementAccessibility(path, element);
}
bool CanvasRenderingContext2D::focusRingCallIsValid(const Path& path, Element* element)
@@ -2106,7 +2106,7 @@ void CanvasRenderingContext2D::drawFocusRing(const Path& path)
didDraw(dirtyRect);
}
-void CanvasRenderingContext2D::updateFocusRingElementAccessibility(const Path& path, Element* element)
+void CanvasRenderingContext2D::updateElementAccessibility(const Path& path, Element* element)
{
AXObjectCache* axObjectCache = element->document().existingAXObjectCache();
LayoutBoxModelObject* lbmo = canvas()->layoutBoxModelObject();
@@ -2161,7 +2161,9 @@ void CanvasRenderingContext2D::addHitRegion(const HitRegionOptions& options, Exc
m_hitRegionManager->removeHitRegionByControl(options.control().get());
RefPtrWillBeRawPtr<HitRegion> hitRegion = HitRegion::create(hitRegionPath, options);
- hitRegion->updateAccessibility(canvas());
+ Element* element = hitRegion->control();
+ if (element && element->isDescendantOf(canvas()))
+ updateElementAccessibility(hitRegion->path(), hitRegion->control());
m_hitRegionManager->addHitRegion(hitRegion.release());
}
« no previous file with comments | « Source/modules/canvas2d/CanvasRenderingContext2D.h ('k') | Source/modules/canvas2d/HitRegion.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698