Title: [119838] trunk/Source/WebCore
Revision
119838
Author
[email protected]
Date
2012-06-08 09:54:24 -0700 (Fri, 08 Jun 2012)

Log Message

[BlackBerry] Fix assertion failure introduced by bug 87551
https://bugs.webkit.org/show_bug.cgi?id=88659

Patch by Max Feil <[email protected]> on 2012-06-08
Reviewed by Antonio Gomes.

The determineRenderSlider() convenience function added in bug
87551 made an assumption that wasn't always true. This didn't
cause a functional error but it caused an assertion failure,
which indicates a problem with the code. PR164142.

No new tests because this case is already covered by ASSERT's.

* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::determineRenderSlider):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (119837 => 119838)


--- trunk/Source/WebCore/ChangeLog	2012-06-08 16:37:48 UTC (rev 119837)
+++ trunk/Source/WebCore/ChangeLog	2012-06-08 16:54:24 UTC (rev 119838)
@@ -1,3 +1,20 @@
+2012-06-08  Max Feil  <[email protected]>
+
+        [BlackBerry] Fix assertion failure introduced by bug 87551
+        https://bugs.webkit.org/show_bug.cgi?id=88659
+
+        Reviewed by Antonio Gomes.
+
+        The determineRenderSlider() convenience function added in bug
+        87551 made an assumption that wasn't always true. This didn't
+        cause a functional error but it caused an assertion failure,
+        which indicates a problem with the code. PR164142.
+
+        No new tests because this case is already covered by ASSERT's.
+
+        * platform/blackberry/RenderThemeBlackBerry.cpp:
+        (WebCore::determineRenderSlider):
+
 2012-06-08  Ion Rosca  <[email protected]>
 
         Some overlay scrollbar API calls in ScrollAnimatorMac can lead to an assertion in RenderBox::mapAbsoluteToLocalPoint

Modified: trunk/Source/WebCore/platform/blackberry/RenderThemeBlackBerry.cpp (119837 => 119838)


--- trunk/Source/WebCore/platform/blackberry/RenderThemeBlackBerry.cpp	2012-06-08 16:37:48 UTC (rev 119837)
+++ trunk/Source/WebCore/platform/blackberry/RenderThemeBlackBerry.cpp	2012-06-08 16:54:24 UTC (rev 119838)
@@ -152,8 +152,8 @@
 static RenderSlider* determineRenderSlider(RenderObject* object)
 {
     ASSERT(object->isSliderThumb());
-    // The RenderSlider is 3 parent levels above the slider thumb.
-    for (int i = 1; object && i <= 3; i++)
+    // The RenderSlider is an ancestor of the slider thumb.
+    while (object && !object->isSlider())
         object = object->parent();
     return toRenderSlider(object);
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to