Title: [149690] trunk/Source/WebCore
Revision
149690
Author
[email protected]
Date
2013-05-07 14:09:48 -0700 (Tue, 07 May 2013)

Log Message

Bug 115694 - Fix bad cast to RenderHTMLCanvas
https://bugs.webkit.org/show_bug.cgi?id=115694

Reviewed by Ryosuke Niwa.

Don't cast to RenderHTML until we check what kind of object it is.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (149689 => 149690)


--- trunk/Source/WebCore/ChangeLog	2013-05-07 20:30:02 UTC (rev 149689)
+++ trunk/Source/WebCore/ChangeLog	2013-05-07 21:09:48 UTC (rev 149690)
@@ -1,3 +1,15 @@
+2013-05-07  Chris Fleizach  <[email protected]>
+
+        Bug 115694 - Fix bad cast to RenderHTMLCanvas
+        https://bugs.webkit.org/show_bug.cgi?id=115694
+
+        Reviewed by Ryosuke Niwa.
+
+        Don't cast to RenderHTML until we check what kind of object it is.
+
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
+
 2013-05-07  Anders Carlsson  <[email protected]>
 
         The storage database tracker should know when databases come and go

Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (149689 => 149690)


--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp	2013-05-07 20:30:02 UTC (rev 149689)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp	2013-05-07 21:09:48 UTC (rev 149690)
@@ -1274,9 +1274,12 @@
     if (isCanvas()) {
         if (canvasHasFallbackContent())
             return false;
-        RenderHTMLCanvas* canvas = toRenderHTMLCanvas(m_renderer);
-        if (canvas->height() <= 1 || canvas->width() <= 1)
-            return true;
+
+        if (m_renderer->isBox()) {
+            RenderBox* canvasBox = toRenderBox(m_renderer);
+            if (canvasBox->height() <= 1 || canvasBox->width() <= 1)
+                return true;
+        }
         // Otherwise fall through; use presence of help text, title, or description to decide.
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to