Changeset 222546 in webkit


Ignore:
Timestamp:
Sep 26, 2017 7:54:16 PM (7 years ago)
Author:
Alan Bujtas
Message:

AX: Defer RenderImage's imageChanged event until after layout is done.
https://bugs.webkit.org/show_bug.cgi?id=177446

Reviewed by Dean Jackson.

Source/WebCore:

This is to avoid unintentional tree mutation during layout.

Covered by existing tests.

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::imageChanged):

LayoutTests:

  • accessibility/image-load-on-delay.html:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r222544 r222546  
     12017-09-26  Zalan Bujtas  <zalan@apple.com>
     2
     3        AX: Defer RenderImage's imageChanged event until after layout is done.
     4        https://bugs.webkit.org/show_bug.cgi?id=177446
     5
     6        Reviewed by Dean Jackson.
     7
     8        * accessibility/image-load-on-delay.html:
     9
    1102017-09-26  Joanmarie Diggs  <jdiggs@igalia.com>
    211
  • trunk/LayoutTests/accessibility/image-load-on-delay.html

    r202841 r222546  
    1919
    2020    if (window.accessibilityController) {
     21          document.body.offsetHeight;
    2122          window.jsTestIsAsync = true;
    2223          var content = accessibilityController.accessibleElementById("content");
     
    2425
    2526          document.getElementById("image").onload = function() {
     27              document.body.offsetHeight;
    2628              debug("AFTER: Group count: " + content.childrenCount);
    2729              finishJSTest();
     
    3032          setTimeout(function() {
    3133              document.getElementById("image").src = "resources/cake.png";
    32           }, 1000);
     34          }, 100);
    3335    }
    3436
  • trunk/LayoutTests/platform/mac/TestExpectations

    r222486 r222546  
    17711771
    17721772webkit.org/b/177323 imported/w3c/web-platform-tests/fetch/security/embedded-credentials.tentative.sub.html [ Pass Failure ]
     1773
     1774webkit.org/b/177520 accessibility/image-load-on-delay.html [ Pass Failure ]
  • trunk/Source/WebCore/ChangeLog

    r222544 r222546  
     12017-09-26  Zalan Bujtas  <zalan@apple.com>
     2
     3        AX: Defer RenderImage's imageChanged event until after layout is done.
     4        https://bugs.webkit.org/show_bug.cgi?id=177446
     5
     6        Reviewed by Dean Jackson.
     7
     8        This is to avoid unintentional tree mutation during layout.
     9
     10        Covered by existing tests.
     11
     12        * rendering/RenderImage.cpp:
     13        (WebCore::RenderImage::imageChanged):
     14
    1152017-09-26  Joanmarie Diggs  <jdiggs@igalia.com>
    216
  • trunk/Source/WebCore/rendering/RenderImage.cpp

    r221377 r222546  
    269269    if (UNLIKELY(AXObjectCache::accessibilityEnabled())) {
    270270        if (AXObjectCache* cache = document().existingAXObjectCache())
    271             cache->recomputeIsIgnored(this);
     271            cache->deferRecomputeIsIgnored(element());
    272272    }
    273273
Note: See TracChangeset for help on using the changeset viewer.