WebKit Bugzilla
Attachment 371214 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-20190603144218.patch (text/plain), 8.00 KB, created by
Said Abou-Hallawa
on 2019-06-03 14:42:19 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Said Abou-Hallawa
Created:
2019-06-03 14:42:19 PDT
Size:
8.00 KB
patch
obsolete
>Subversion Revision: 245667 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 18955cf57d9e224035c5658c020b1356e4b6a0c6..cf5e2a80f83374a2b62a463531394bbcb0951bdd 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -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-05-22 Antti Koivisto <antti@apple.com> > > Subselectors not searched when determining property whitelist for selector >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index aaf592599604e4571c936340da1f3e25fc200a5a..50746e7b6ca23e6b3f283627777a6189e7300280 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -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-05-22 Ryosuke Niwa <rniwa@webkit.org> > > REGRESSION(r245148): Removing inputmode="none" does not bring up software keyboard >diff --git a/Source/WebCore/inspector/InspectorController.cpp b/Source/WebCore/inspector/InspectorController.cpp >index 71a07612e7581acfc5c46324b03c6fd39233a567..e0693a850a7d8e06658ab102b16a2fd081a70e6c 100644 >--- a/Source/WebCore/inspector/InspectorController.cpp >+++ b/Source/WebCore/inspector/InspectorController.cpp >@@ -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); >diff --git a/Source/WebCore/inspector/InspectorController.h b/Source/WebCore/inspector/InspectorController.h >index a511ec5bb1c67c0a1bb314573ee7dafb2ad74d74..4bea43263da7037f188659662da8dbf6d831596d 100644 >--- a/Source/WebCore/inspector/InspectorController.h >+++ b/Source/WebCore/inspector/InspectorController.h >@@ -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; } >diff --git a/Source/WebCore/inspector/agents/InspectorTimelineAgent.cpp b/Source/WebCore/inspector/agents/InspectorTimelineAgent.cpp >index a1d3d9144a5212cd94e79345109c2de7dffb8436..e2088a7ec8efdf658b86543df80eb1da6bc3be80 100644 >--- a/Source/WebCore/inspector/agents/InspectorTimelineAgent.cpp >+++ b/Source/WebCore/inspector/agents/InspectorTimelineAgent.cpp >@@ -188,7 +188,7 @@ void InspectorTimelineAgent::internalStart(const int* maxCallStackDepth) > if (m_runLoopNestingLevel) > return; > >- if (m_startedComposite) >+ if (m_startedComposites) > didComposite(); > > didCompleteCurrentRecord(TimelineRecordType::RenderingFrame); >@@ -229,7 +229,7 @@ void InspectorTimelineAgent::internalStop() > clearRecordStack(); > > m_enabled = false; >- m_startedComposite = false; >+ m_startedComposites = 0; > m_autoCapturePhase = AutoCapturePhase::None; > > m_frontendDispatcher->recordingStopped(timestamp()); >@@ -357,16 +357,15 @@ void InspectorTimelineAgent::didRecalculateStyle() > > 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) >diff --git a/Source/WebCore/inspector/agents/InspectorTimelineAgent.h b/Source/WebCore/inspector/agents/InspectorTimelineAgent.h >index aac38ff9224f75cfd786e8863490a0af88ec8ffe..46a87c427ef908f0cd6f6a0d4777b37625f9d714 100644 >--- a/Source/WebCore/inspector/agents/InspectorTimelineAgent.h >+++ b/Source/WebCore/inspector/agents/InspectorTimelineAgent.h >@@ -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 >diff --git a/Source/WebCore/page/FrameView.cpp b/Source/WebCore/page/FrameView.cpp >index fcdef0cce2ffef75abdfd39f976f3f64a3f2942e..e4a44017ecba3fbccbd99c36e0e18d7d5de1984a 100644 >--- a/Source/WebCore/page/FrameView.cpp >+++ b/Source/WebCore/page/FrameView.cpp >@@ -1147,10 +1147,6 @@ bool FrameView::isEnclosedInCompositingLayer() const > > 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())) { >diff --git a/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm b/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm >index 8095e67d8f6dff21bac6a1e04706bb1aacfaf07e..8ae6d36063257c196623919719b1376257f0319d 100644 >--- a/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm >+++ b/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm >@@ -455,8 +455,15 @@ void TiledCoreAnimationDrawingArea::flushLayers(FlushType flushType) > 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