WebKit Bugzilla
Attachment 371235 Details for
Bug 198497
: [Cocoa] REGRESSION(r244182): Inspector thinks CA commits can be nested
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198497-20190603181823.patch (text/plain), 7.48 KB, created by
Said Abou-Hallawa
on 2019-06-03 18:18:24 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Said Abou-Hallawa
Created:
2019-06-03 18:18:24 PDT
Size:
7.48 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 246052) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,29 @@ >+2019-06-03 Said Abou-Hallawa <sabouhallawa@apple.com> >+ >+ [Cocoa] REGRESSION(r244182): Inspector thinks CA commits can be nested >+ https://bugs.webkit.org/show_bug.cgi?id=198497 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ WebInspecter should coalesce nested composites as one recorded composite. >+ This can be done by making InspectorTimelineAgent::m_startedComposite >+ unsigned instead of bool. When its value is zero, pushCurrentRecord(..., >+ TimelineRecordType::Composite, ...) is called. And when it becomes zero, >+ call didCompleteCurrentRecord(TimelineRecordType::Composite). >+ >+ * inspector/InspectorController.cpp: >+ (WebCore::InspectorController::willComposite): >+ * inspector/InspectorController.h: >+ * inspector/agents/InspectorTimelineAgent.cpp: >+ (WebCore::InspectorTimelineAgent::internalStop): >+ (WebCore::InspectorTimelineAgent::willComposite): >+ (WebCore::InspectorTimelineAgent::didComposite): >+ * inspector/agents/InspectorTimelineAgent.h: >+ * page/FrameView.cpp: >+ (WebCore::FrameView::flushCompositingStateIncludingSubframes): >+ Move the call to "willComposite()" to the preCommit handler in >+ TiledCoreAnimationDrawingArea::flushLayers(). >+ > 2019-06-03 Robin Morisset <rmorisset@apple.com> > > [WHLSL] Parsing and lexing the standard library is slow >Index: Source/WebCore/inspector/InspectorController.cpp >=================================================================== >--- Source/WebCore/inspector/InspectorController.cpp (revision 246052) >+++ Source/WebCore/inspector/InspectorController.cpp (working copy) >@@ -507,6 +507,11 @@ JSC::VM& InspectorController::vm() > return commonVM(); > } > >+void InspectorController::willComposite(Frame& frame) >+{ >+ InspectorInstrumentation::willComposite(frame); >+} >+ > void InspectorController::didComposite(Frame& frame) > { > InspectorInstrumentation::didComposite(frame); >Index: Source/WebCore/inspector/InspectorController.h >=================================================================== >--- Source/WebCore/inspector/InspectorController.h (revision 246052) >+++ Source/WebCore/inspector/InspectorController.h (working copy) >@@ -97,6 +97,7 @@ public: > > WEBCORE_EXPORT void setIndicating(bool); > >+ WEBCORE_EXPORT void willComposite(Frame&); > WEBCORE_EXPORT void didComposite(Frame&); > > bool isUnderTest() const { return m_isUnderTest; } >Index: Source/WebCore/inspector/agents/InspectorTimelineAgent.cpp >=================================================================== >--- Source/WebCore/inspector/agents/InspectorTimelineAgent.cpp (revision 246052) >+++ Source/WebCore/inspector/agents/InspectorTimelineAgent.cpp (working copy) >@@ -188,7 +188,7 @@ void InspectorTimelineAgent::internalSta > if (m_runLoopNestingLevel) > return; > >- if (m_startedComposite) >+ if (m_startedComposites) > didComposite(); > > didCompleteCurrentRecord(TimelineRecordType::RenderingFrame); >@@ -229,7 +229,7 @@ void InspectorTimelineAgent::internalSto > clearRecordStack(); > > m_enabled = false; >- m_startedComposite = false; >+ m_startedComposites = 0; > m_autoCapturePhase = AutoCapturePhase::None; > > m_frontendDispatcher->recordingStopped(timestamp()); >@@ -357,16 +357,15 @@ void InspectorTimelineAgent::didRecalcul > > void InspectorTimelineAgent::willComposite(Frame& frame) > { >- ASSERT(!m_startedComposite); >- pushCurrentRecord(JSON::Object::create(), TimelineRecordType::Composite, true, &frame); >- m_startedComposite = true; >+ if (!m_startedComposites++) >+ pushCurrentRecord(JSON::Object::create(), TimelineRecordType::Composite, true, &frame); > } > > void InspectorTimelineAgent::didComposite() > { >- ASSERT(m_startedComposite); >- didCompleteCurrentRecord(TimelineRecordType::Composite); >- m_startedComposite = false; >+ ASSERT(m_startedComposites); >+ if (!--m_startedComposites) >+ didCompleteCurrentRecord(TimelineRecordType::Composite); > } > > void InspectorTimelineAgent::willPaint(Frame& frame) >Index: Source/WebCore/inspector/agents/InspectorTimelineAgent.h >=================================================================== >--- Source/WebCore/inspector/agents/InspectorTimelineAgent.h (revision 246052) >+++ Source/WebCore/inspector/agents/InspectorTimelineAgent.h (working copy) >@@ -227,7 +227,7 @@ private: > std::unique_ptr<WebCore::RunLoopObserver> m_frameStopObserver; > #endif > int m_runLoopNestingLevel { 0 }; >- bool m_startedComposite { false }; >+ unsigned m_startedComposites { 0 }; > }; > > } // namespace WebCore >Index: Source/WebCore/page/FrameView.cpp >=================================================================== >--- Source/WebCore/page/FrameView.cpp (revision 246052) >+++ Source/WebCore/page/FrameView.cpp (working copy) >@@ -1148,10 +1148,6 @@ bool FrameView::isEnclosedInCompositingL > > bool FrameView::flushCompositingStateIncludingSubframes() > { >-#if PLATFORM(COCOA) >- InspectorInstrumentation::willComposite(frame()); >-#endif >- > bool allFramesFlushed = flushCompositingStateForThisFrame(frame()); > > for (Frame* child = frame().tree().firstRenderedChild(); child; child = child->tree().traverseNextRendered(m_frame.ptr())) { >Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 246052) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,16 @@ >+2019-06-03 Said Abou-Hallawa <sabouhallawa@apple.com> >+ >+ [Cocoa] REGRESSION(r244182): Inspector thinks CA commits can be nested >+ https://bugs.webkit.org/show_bug.cgi?id=198497 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Call 'willComposite()' from the CA preCommit handler similar to the call >+ to 'didComposite()' in the CA postCommit handler. >+ >+ * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: >+ (WebKit::TiledCoreAnimationDrawingArea::flushLayers): >+ > 2019-06-03 Wenson Hsieh <wenson_hsieh@apple.com> > > Implement an internal switch to turn idempotent text autosizing and viewport rules off >Index: Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm >=================================================================== >--- Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (revision 246052) >+++ Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (working copy) >@@ -455,8 +455,15 @@ void TiledCoreAnimationDrawingArea::flus > if (m_viewOverlayRootLayer) > m_viewOverlayRootLayer->flushCompositingState(visibleRect); > >- RefPtr<WebPage> retainedPage = &m_webPage; >- [CATransaction addCommitHandler:[retainedPage] { >+ >+ [CATransaction addCommitHandler:[retainedPage = makeRefPtr(&m_webPage)] { >+ if (Page* corePage = retainedPage->corePage()) { >+ if (Frame* coreFrame = retainedPage->mainFrame()) >+ corePage->inspectorController().willComposite(*coreFrame); >+ } >+ } forPhase:kCATransactionPhasePreCommit]; >+ >+ [CATransaction addCommitHandler:[retainedPage = makeRefPtr(&m_webPage)] { > if (Page* corePage = retainedPage->corePage()) { > if (Frame* coreFrame = retainedPage->mainFrame()) > corePage->inspectorController().didComposite(*coreFrame);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198497
:
371214
|
371235
|
371378
|
371441