[Webkit-unassigned] [Bug 78290] New: Implement end-of-task delivery for MutationObservers for non-Chromium platforms

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 9 15:23:50 PST 2012


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

           Summary: Implement end-of-task delivery for MutationObservers
                    for non-Chromium platforms
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: adamk at chromium.org
                CC: ojan at chromium.org, rafaelw at chromium.org,
                    rniwa at webkit.org
            Blocks: 68729


For a wide swathe of DOM mutations, end-of-microtask delivery (when the JS stack winds down to zero) is sufficient, since it will handle any DOM mutation made from JavaScript.

But DOM can also be changed through, e.g., user input in a contentEditable element. The layout test fast/mutation/end-of-task-delivery.html exercises just such a case. It passes in Chromium and fails elsewhere, because Chromium delivers mutations not just at the end of every microtask, but also at the end of every run through its main event loop.  From Source/WebKit/chromium/src/WebKit.cpp:

class EndOfTaskRunner : public WebThread::TaskObserver {
public:
    virtual void didProcessTask()
    {
        WebCore::WebKitMutationObserver::deliverAllMutations();
    }
};

...

void initialize(...)
{
    ... 
    s_endOfTaskRunner = new EndOfTaskRunner;
    currentThread->addTaskObserver(s_endOfTaskRunner);
    ...
}

This is "easy" for Chromium because it has its own custom event loop implementation.  This bug is asking for something similar (in behavior, at least) on non-Chromium platforms.

The chief requirement is that, if DOM is mutated in a given task, any mutation observers are notified of that mutation before the next task (e.g., a paint, or a timer scheduled with setTimeout) gets a chance to run.

-- 
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