[webkit-changes] [WebKit/WebKit] 33d4b1: REGRESSION(253727 at main): [ macOS wk2 ] inspector/c...

Patrick Angle noreply at github.com
Thu Jan 12 16:15:27 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 33d4b1c48279e35925acc9a0351e480975499feb
      https://github.com/WebKit/WebKit/commit/33d4b1c48279e35925acc9a0351e480975499feb
  Author: Patrick Angle <pangle at apple.com>
  Date:   2023-01-12 (Thu, 12 Jan 2023)

  Changed paths:
    M LayoutTests/inspector/css/setLayoutContextTypeChangedMode.html
    M LayoutTests/platform/mac-wk2/TestExpectations
    M Source/WebCore/inspector/agents/InspectorCSSAgent.cpp

  Log Message:
  -----------
  REGRESSION(253727 at main): [ macOS wk2 ] inspector/css/setLayoutContextTypeChangedMode.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=244846
rdar://99599308

Reviewed by Devin Rousso.

Two issues exist making this test flakey. The first was that we incorrectly would send a layout information twice for
previously unobserved nodes, once with the new node and then again. This meant the test would wait for the first
"change" when the node was added, and the next await for a change could sometimes happen quickly enough that it would be
satisfied by the errant second notifcation of changed layout context.

The second issue is the result of other new flags causing all nodes to have a layout flags, including the output element
for the test. We can't explicitly add an event listener to the node we want to observe though because that would cause
the node to be sent to the frontend, which is the behavior we are trying to test. To combat this, we now use a special
observer that looks at the ID of elements with layout flag changes to ensure we are observing the change for the node we
actually care about.

* LayoutTests/inspector/css/setLayoutContextTypeChangedMode.html:
- Ensure we observe flags changing only for the node we care about, even if we can't yet know if we have a WI.DOMNode.

* LayoutTests/platform/mac-wk2/TestExpectations:

* Source/WebCore/inspector/agents/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::nodesWithPendingLayoutFlagsChangeDispatchTimerFired):
- If we get a nodeId back for a node that didn't previously have a nodeId, we know that the latest layout flags have
just been sent to the frontend.

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




More information about the webkit-changes mailing list