[webkit-reviews] review denied: [Bug 128904] [GTK] ASSERTION FAILED: hasClass() : [Attachment 224493] Patch.txt

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 18 07:53:30 PST 2014


Anders Carlsson <andersca at apple.com> has denied Piotr Grad
<p.grad at samsung.com>'s request for review:
Bug 128904: [GTK] ASSERTION FAILED: hasClass()
https://bugs.webkit.org/show_bug.cgi?id=128904

Attachment 224493: Patch.txt
https://bugs.webkit.org/attachment.cgi?id=224493&action=review

------- Additional Comments from Anders Carlsson <andersca at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=224493&action=review


> Source/WebCore/platform/gtk/RenderThemeGtk.cpp:122
> +    if (!toElement(&node)->hasClass())
> +	   return false;
> +
> +    return toElement(&node)->classNames().contains(className);

As I suggested, please put the element in a local variable here to avoid
calling toElement twice (since toElement is a virtual call):

const Element& element = toElement(node);
(or *toElement(*node) if there's no version that takes references).


More information about the webkit-reviews mailing list