[Webkit-unassigned] [Bug 74367] New: WebCore has two (disconnected) ways to keep track of updated widgets, should be unified

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 12 16:09:31 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=74367

           Summary: WebCore has two (disconnected) ways to keep track of
                    updated widgets, should be unified
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: eric at webkit.org
                CC: andersca at apple.com, bdakin at apple.com,
                    abarth at webkit.org


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.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list