Title: [164277] trunk/Source/WebCore
- Revision
- 164277
- Author
- [email protected]
- Date
- 2014-02-18 01:49:16 -0800 (Tue, 18 Feb 2014)
Log Message
[GTK] Fix hitting hasClass() assertion in debug with the new JS media controls
https://bugs.webkit.org/show_bug.cgi?id=128820
Reviewed by Martin Robinson.
The code introduced at r164024 caused the hit of hasClass()
assertion when getting the classNames() of an element with no
class. Now we check for it to avoid the assertion.
No new tests, current set detects the crash in many tests.
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::nodeHasClass): Check for hasClass() in order not to hit
the assertion when getting the classNames() in debug mode.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (164276 => 164277)
--- trunk/Source/WebCore/ChangeLog 2014-02-18 09:42:44 UTC (rev 164276)
+++ trunk/Source/WebCore/ChangeLog 2014-02-18 09:49:16 UTC (rev 164277)
@@ -1,3 +1,20 @@
+2014-02-18 Xabier Rodriguez Calvar <[email protected]>
+
+ [GTK] Fix hitting hasClass() assertion in debug with the new JS media controls
+ https://bugs.webkit.org/show_bug.cgi?id=128820
+
+ Reviewed by Martin Robinson.
+
+ The code introduced at r164024 caused the hit of hasClass()
+ assertion when getting the classNames() of an element with no
+ class. Now we check for it to avoid the assertion.
+
+ No new tests, current set detects the crash in many tests.
+
+ * platform/gtk/RenderThemeGtk.cpp:
+ (WebCore::nodeHasClass): Check for hasClass() in order not to hit
+ the assertion when getting the classNames() in debug mode.
+
2014-02-18 Gyuyoung Kim <[email protected]>
Refactor SVGPreserveAspectRatio::parse()
Modified: trunk/Source/WebCore/platform/gtk/RenderThemeGtk.cpp (164276 => 164277)
--- trunk/Source/WebCore/platform/gtk/RenderThemeGtk.cpp 2014-02-18 09:42:44 UTC (rev 164276)
+++ trunk/Source/WebCore/platform/gtk/RenderThemeGtk.cpp 2014-02-18 09:49:16 UTC (rev 164277)
@@ -113,7 +113,15 @@
static bool nodeHasClass(Node* node, const char* className)
{
- return node->isElementNode() ? toElement(node)->classNames().contains(className) : false;
+ if (!node->isElementNode())
+ return false;
+
+ Element* element = toElement(node);
+
+ if (!element->hasClass())
+ return false;
+
+ return element->classNames().contains(className);
}
PassRefPtr<RenderTheme> RenderThemeGtk::create()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes