<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>256403</bug_id>
          
          <creation_ts>2023-05-05 17:56:13 -0700</creation_ts>
          <short_desc>Defer AX object cache update as an event loop task instead of a post layout task</short_desc>
          <delta_ts>2023-05-08 16:35:42 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Accessibility</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>256354</blocked>
    
    <blocked>256383</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Ryosuke Niwa">rniwa</reporter>
          <assigned_to name="Ryosuke Niwa">rniwa</assigned_to>
          <cc>andresg_22</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1953339</commentid>
    <comment_count>0</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2023-05-05 17:56:13 -0700</bug_when>
    <thetext>We currently update AX caches as a post layout task.
This is problematic because it can lead to arbitrary script execution:
e.g.

3   0x2836d4250 WebCore::EventDispatcher::dispatchEvent(WebCore::Node&amp;, WebCore::Event&amp;)
4   0x28376d6ac WebCore::Node::dispatchEvent(WebCore::Event&amp;)
5   0x283699750 WebCore::Element::dispatchFocusEvent(WTF::RefPtr&lt;WebCore::Element, WTF::RawPtrTraits&lt;WebCore::Element&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::Element&gt;&gt;&amp;&amp;, WebCore::FocusOptions const&amp;)
6   0x2835c477c WebCore::Document::setFocusedElement(WebCore::Element*, WebCore::FocusOptions const&amp;)
7   0x2843b3b48 WebCore::FocusController::setFocusedElement(WebCore::Element*, WebCore::LocalFrame&amp;, WebCore::FocusOptions const&amp;)
8   0x283698d64 WebCore::Element::focus(WebCore::FocusOptions const&amp;)
9   0x282b8b80c WebCore::AccessibilityNodeObject::setFocused(bool)
10  0x282af3d4c WebCore::AXObjectCache::focusCurrentModal()
11  0x282afeda4 WebCore::AXObjectCache::performDeferredCacheUpdate()
12  0x28441f0c4 WebCore::LocalFrameView::performPostLayoutTasks()
13  0x28442a760 WebCore::LocalFrameViewLayoutContext::runAsynchronousTasks()
14  0x28442b7e8 WebCore::LocalFrameViewLayoutContext::runOrScheduleAsynchronousTasks()
15  0x28442b110 WebCore::LocalFrameViewLayoutContext::performLayout()
16  0x28440969c WebCore::LocalFrameViewLayoutContext::layout()
17  0x28441cbb0 WebCore::LocalFrameView::updateContentsSize()
18  0x2846a2f90 WebCore::ScrollView::updateScrollbars(WebCore::IntPoint const&amp;)
19  0x2846a4858 WebCore::ScrollView::setContentsSize(WebCore::IntSize const&amp;)
20  0x28440cafc WebCore::LocalFrameView::setContentsSize(WebCore::IntSize const&amp;)
21  0x284406f7c WebCore::LocalFrameView::adjustViewSize()
22  0x28442afc0 WebCore::LocalFrameViewLayoutContext::performLayout()
23  0x28440969c WebCore::LocalFrameViewLayoutContext::layout()
24  0x2835adde8 WebCore::Document::updateLayout()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1953340</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-05-05 17:56:28 -0700</bug_when>
    <thetext>&lt;rdar://problem/108974696&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1953341</commentid>
    <comment_count>2</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2023-05-05 18:06:20 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/13528</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1953863</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-05-08 15:46:11 -0700</bug_when>
    <thetext>Committed 263832@main (e8027f0de539): &lt;https://commits.webkit.org/263832@main&gt;

Reviewed commits have been landed. Closing PR #13528 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>