[Webkit-unassigned] [Bug 121558] [ATK] Protect entry points in the ATK wrapper against outdated render trees

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 25 08:27:33 PDT 2013


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


Mario Sanchez Prada <mario at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #212171|0                           |1
        is obsolete|                            |
 Attachment #212582|                            |review?
               Flag|                            |




--- Comment #19 from Mario Sanchez Prada <mario at webkit.org>  2013-09-25 08:26:32 PST ---
Created an attachment (id=212582)
 --> (https://bugs.webkit.org/attachment.cgi?id=212582&action=review)
Patch proposal plus new Layout test

Attaching a new patch for review now. As it's explained in the ChangeLog, it not only adds the new test to check that we no longer get that crash, but also helps us to pass a new one and get other two to print the right results (which were overlooked before, because of a wrong expectations file).

About the code, it's all changes in the ATK code with the exception of two asserts I added in AccessibilityNodeObject::textUnderElement(). Please Chris double check that's right also for the Mac:

    [...]
    // The render tree should be stable before going ahead. Otherwise, further uses of the
    // TextIterator will force a layout update, potentially altering the accessibility tree
    // and leading to crashes in the loop that computes the result text from the children.
    ASSERT(!document()->renderView()->layoutState());
    ASSERT(!document()->childNeedsStyleRecalc());
    [...]

It definitely works fine for GTK after the changes done here, but I'm not that sure about the mac. Also, besides your suggestion of asserting !document()->renderView()->layoutState(), I added the other one to make sure not only that an update is not currently in progress, but also that the render tree is not in the state of needing a new layout update, since that would be triggered when using the TextIterator.

Last, after some considerations, I think asserting here only should be enough, but feel free to point other places where you think it might be useful too (did not want to clutter all the code if not strictly needed).

Thanks!

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