[webkit-changes] [WebKit/WebKit] c69e4c: AX: AXObjectCache::performDeferredCacheUpdate can ...

Tyler Wilcock noreply at github.com
Thu Mar 7 08:14:17 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c69e4c0caaf5368db791652eee3a057ed2751144
      https://github.com/WebKit/WebKit/commit/c69e4c0caaf5368db791652eee3a057ed2751144
  Author: Tyler Wilcock <tyler_w at apple.com>
  Date:   2024-03-07 (Thu, 07 Mar 2024)

  Changed paths:
    A LayoutTests/accessibility/iframe-tree-update-with-dirty-layout-expected.txt
    A LayoutTests/accessibility/iframe-tree-update-with-dirty-layout.html
    M LayoutTests/platform/glib/TestExpectations
    M LayoutTests/platform/ios/TestExpectations
    A LayoutTests/platform/ios/accessibility/iframe-tree-update-with-dirty-layout-expected.txt
    A LayoutTests/platform/mac-wk1/accessibility/iframe-tree-update-with-dirty-layout-expected.txt
    M Source/WebCore/accessibility/AXObjectCache.cpp
    M Source/WebCore/accessibility/AXObjectCache.h
    M Source/WebCore/testing/Internals.cpp
    M Source/WebCore/testing/Internals.h
    M Source/WebCore/testing/Internals.idl

  Log Message:
  -----------
  AX: AXObjectCache::performDeferredCacheUpdate can run with dirty sub-frame layout, causing incorrect tree updates
https://bugs.webkit.org/show_bug.cgi?id=270593
rdar://103616732

Reviewed by Andres Gonzalez.

In https://bugs.webkit.org/show_bug.cgi?id=268239, we made AXObjectCache::performDeferredCacheUpdate
detect when layout is dirty, and either wait another layout cycle to trigger a cache update, or
force it if necessary. This is important because processing cache updates with dirty layout
can cause incorrect behavior, like objects being ignored incorrectly.

This change was effective, but did not handle the case where a sub-frame had dirty layout, meaning
we can still run into this bug. This patch addresses the issue by forcing all sub-frames to lay out
if necessary.

* LayoutTests/platform/glib/TestExpectations: Skip new test.
* LayoutTests/platform/ios/TestExpectations: Enable new test.
* LayoutTests/platform/ios/accessibility/iframe-tree-update-with-dirty-layout-expected.txt: Added.
* LayoutTests/platform/mac-wk1/accessibility/iframe-tree-update-with-dirty-layout-expected.txt: Added.
* LayoutTests/accessibility/iframe-tree-update-with-dirty-layout-expected.txt: Added.
* LayoutTests/accessibility/iframe-tree-update-with-dirty-layout.html: Added.

* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::performDeferredCacheUpdate):
* Source/WebCore/accessibility/AXObjectCache.h:
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::forceAXObjectCacheUpdate const):
* Source/WebCore/testing/Internals.h:
* Source/WebCore/testing/Internals.idl:

Canonical link: https://commits.webkit.org/275791@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list