Title: [215089] trunk/Source/WebCore
- Revision
- 215089
- Author
- tpop...@redhat.com
- Date
- 2017-04-07 04:59:28 -0700 (Fri, 07 Apr 2017)
Log Message
AX: Don't crash if no renderer is available for AccessibilityRenderObject
https://bugs.webkit.org/show_bug.cgi?id=170448
Reviewed by Chris Fleizach.
Don't crash or assert if no renderer is available, but early return
gracefully (as in other places in the AccessibilityRenderObject.cpp).
Spotted by running some tests through dogtail.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::isOffScreen):
(WebCore::AccessibilityRenderObject::isUnvisited):
(WebCore::AccessibilityRenderObject::isVisited):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (215088 => 215089)
--- trunk/Source/WebCore/ChangeLog 2017-04-07 10:43:43 UTC (rev 215088)
+++ trunk/Source/WebCore/ChangeLog 2017-04-07 11:59:28 UTC (rev 215089)
@@ -1,3 +1,19 @@
+2017-04-07 Tomas Popela <tpop...@redhat.com>
+
+ AX: Don't crash if no renderer is available for AccessibilityRenderObject
+ https://bugs.webkit.org/show_bug.cgi?id=170448
+
+ Reviewed by Chris Fleizach.
+
+ Don't crash or assert if no renderer is available, but early return
+ gracefully (as in other places in the AccessibilityRenderObject.cpp).
+ Spotted by running some tests through dogtail.
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::isOffScreen):
+ (WebCore::AccessibilityRenderObject::isUnvisited):
+ (WebCore::AccessibilityRenderObject::isVisited):
+
2017-04-07 Carlos Garcia Campos <cgar...@igalia.com>
[GTK] Update the priorities used in glib main loop sources
Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (215088 => 215089)
--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2017-04-07 10:43:43 UTC (rev 215088)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2017-04-07 11:59:28 UTC (rev 215089)
@@ -531,7 +531,9 @@
bool AccessibilityRenderObject::isOffScreen() const
{
- ASSERT(m_renderer);
+ if (!m_renderer)
+ return true;
+
IntRect contentRect = snappedIntRect(m_renderer->absoluteClippedOverflowRect());
// FIXME: unclear if we need LegacyIOSDocumentVisibleRect.
IntRect viewRect = m_renderer->view().frameView().visibleContentRect(ScrollableArea::LegacyIOSDocumentVisibleRect);
@@ -1569,6 +1571,9 @@
bool AccessibilityRenderObject::isUnvisited() const
{
+ if (!m_renderer)
+ return true;
+
// FIXME: Is it a privacy violation to expose unvisited information to accessibility APIs?
return m_renderer->style().isLink() && m_renderer->style().insideLink() == InsideUnvisitedLink;
}
@@ -1575,6 +1580,9 @@
bool AccessibilityRenderObject::isVisited() const
{
+ if (!m_renderer)
+ return false;
+
// FIXME: Is it a privacy violation to expose visited information to accessibility APIs?
return m_renderer->style().isLink() && m_renderer->style().insideLink() == InsideVisitedLink;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes