Changeset 290047 in webkit
- Timestamp:
- Feb 17, 2022 12:05:29 PM (5 months ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
inspector/agents/InspectorDOMAgent.cpp (modified) (4 diffs)
-
inspector/agents/InspectorDOMAgent.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r290046 r290047 1 2022-02-17 Patrick Angle <pangle@apple.com> 2 3 Web Inspector: [Flexbox] Gaps and free space do not have pattern fills when navigating to a page with Web Inspector already open 4 https://bugs.webkit.org/show_bug.cgi?id=236741 5 6 Reviewed by Devin Rousso. 7 8 Because calls to `getDocument` actually resets the `InspectorDOMAgent`, we don't want to clear cached layout 9 information inside `reset`. The cached layout information is in a WeakHashMap, we aren't going to end up keeping 10 stale references around anyways, and the under most circumstances the map will clean itself up as it is used. 11 We should, however go ahead and clear the cached layout information when we are forcing a re-layout to collect 12 the information again for a new document. 13 14 Additionally, if a new document is set, we want to trigger a layout just like we did for a fresh 15 `InspectorDOMAgent`. 16 17 * inspector/agents/InspectorDOMAgent.cpp: 18 (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend): 19 (WebCore::InspectorDOMAgent::reset): 20 (WebCore::InspectorDOMAgent::setDocument): 21 (WebCore::InspectorDOMAgent::relayoutDocument): 22 * inspector/agents/InspectorDOMAgent.h: 23 1 24 2022-02-17 Aditya Keerthi <akeerthi@apple.com> 2 25 -
trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
r289698 r290047 310 310 311 311 // Force a layout so that we can collect additional information from the layout process. 312 if (m_document) 313 m_document->updateLayout(); 312 relayoutDocument(); 314 313 315 314 #if ENABLE(VIDEO) … … 363 362 m_revalidateStyleAttrTask->reset(); 364 363 m_document = nullptr; 365 m_flexibleBoxRendererCachedItemsAtStartOfLine.clear();366 364 367 365 m_destroyedDetachedNodeIdentifiers.clear(); … … 380 378 m_document = document; 381 379 380 // Force a layout so that we can collect additional information from the layout process. 381 relayoutDocument(); 382 382 383 if (!m_documentRequested) 383 384 return; … … 386 387 if (!document || !document->parsing()) 387 388 m_frontendDispatcher->documentUpdated(); 389 } 390 391 void InspectorDOMAgent::relayoutDocument() 392 { 393 if (!m_document) 394 return; 395 396 m_flexibleBoxRendererCachedItemsAtStartOfLine.clear(); 397 398 m_document->updateLayout(); 388 399 } 389 400 -
trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.h
r289698 r290047 255 255 void destroyedNodesTimerFired(); 256 256 257 void relayoutDocument(); 258 257 259 Inspector::InjectedScriptManager& m_injectedScriptManager; 258 260 std::unique_ptr<Inspector::DOMFrontendDispatcher> m_frontendDispatcher;
Note: See TracChangeset
for help on using the changeset viewer.