Changeset 288492 in webkit for trunk/Source/JavaScriptCore


Ignore:
Timestamp:
Jan 24, 2022, 5:11:15 PM (3 years ago)
Author:
Patrick Angle
Message:

Web Inspector: [Flexbox] Add instrumentation/protocol bits for flex layout containers
https://bugs.webkit.org/show_bug.cgi?id=235454

Reviewed by Devin Rousso.

Source/JavaScriptCore:

  • inspector/protocol/CSS.json:

Source/WebCore:

Added tests in inspector/css/nodeLayoutContextTypeChanged.html.

Add instrumentation to RenderFlexibleBox to observe elements becoming/ceasing to be flex containers. We only
instrument RenderFlexibleBox created with an Element, not a Document, since all anonymous nodes will have their
document passed, which means we would attempt to track multiple different nodes against the same document,
resulting in unexpected results. Conversely, we only instrument in the destructor for non-anonymous nodes.

  • inspector/agents/InspectorCSSAgent.cpp:

(WebCore::InspectorCSSAgent::layoutContextTypeForRenderer):

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::RenderFlexibleBox):
(WebCore::RenderFlexibleBox::~RenderFlexibleBox):

Source/WebInspectorUI:

  • UserInterface/Models/DOMNode.js:

LayoutTests:

  • inspector/css/nodeLayoutContextTypeChanged-expected.txt:
  • inspector/css/nodeLayoutContextTypeChanged.html:
Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r288476 r288492  
     12022-01-24  Patrick Angle  <[email protected]>
     2
     3        Web Inspector: [Flexbox] Add instrumentation/protocol bits for flex layout containers
     4        https://bugs.webkit.org/show_bug.cgi?id=235454
     5
     6        Reviewed by Devin Rousso.
     7
     8        * inspector/protocol/CSS.json:
     9
    1102022-01-24  Mikhail R. Gadelha  <[email protected]>
    211
  • trunk/Source/JavaScriptCore/inspector/protocol/CSS.json

    r286558 r288492  
    258258            "id": "LayoutContextType",
    259259            "type": "string",
    260             "enum": ["grid"],
     260            "enum": ["flex", "grid"],
    261261            "description": "The layout context type of a node."
    262262        },
Note: See TracChangeset for help on using the changeset viewer.