RESOLVED FIXED74367
WebCore has two (disconnected) ways to keep track of updated widgets, should be unified
https://bugs.webkit.org/show_bug.cgi?id=74367
Summary WebCore has two (disconnected) ways to keep track of updated widgets, should ...
Eric Seidel (no email)
Reported 2011-12-12 16:09:31 PST
WebCore has two (disconnected) ways to keep track of updated widgets, should be unified I added a comment about this a while back, but finally looking at fixing it: void HTMLObjectElement::updateWidget(PluginCreationOption pluginCreationOption) { ASSERT(!renderEmbeddedObject()->pluginCrashedOrWasMissing()); // FIXME: We should ASSERT(needsWidgetUpdate()), but currently // FrameView::updateWidget() calls updateWidget(false) without checking if // the widget actually needs updating! setNeedsWidgetUpdate(false); void HTMLEmbedElement::updateWidget(PluginCreationOption pluginCreationOption) { ASSERT(!renderEmbeddedObject()->pluginCrashedOrWasMissing()); // FIXME: We should ASSERT(needsWidgetUpdate()), but currently // FrameView::updateWidget() calls updateWidget(false) without checking if // the widget actually needs updating! The comment is slightly out of date since updateWidget now takes an enum (yay!) but the point is the same. The DOM-based "is this widget dirty" bool has been with us since the original kde import: http://trac.webkit.org/browser/trunk/WebCore/khtml/html/html_objectimpl.h?annotate=blame&rev=8844#L140 The FrameView "dirty widgets" list was added by bdakin in: http://trac.webkit.org/changeset/25726 (in a sekret radar). The FrameView need makes sense. So maybe what should happen is that void FrameView::addWidgetToUpdate(RenderEmbeddedObject* object) should just also call setNeedsWidgetUpdate() and that updateWidgets() should check to make sure that the update is still needed when its run. It's unclear if this list makes sense on FrameView long-term, as we move more plugin stuff out of the renderers and onto DOM objects like HTMLPluginElement/HTMLPluginImageElement, etc.
Attachments
Patch (6.06 KB, patch)
2011-12-12 17:06 PST, Eric Seidel (no email)
no flags
Eric Seidel (no email)
Comment 1 2011-12-12 17:06:11 PST
WebKit Review Bot
Comment 2 2011-12-15 14:00:28 PST
Comment on attachment 118912 [details] Patch Clearing flags on attachment: 118912 Committed r102983: <http://trac.webkit.org/changeset/102983>
WebKit Review Bot
Comment 3 2011-12-15 14:00:32 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.