WebKit Bugzilla
Attachment 346775 Details for
Bug 188411
: Add a WebKit2 logging channel for ActivityState
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188411-20180808104957.patch (text/plain), 20.38 KB, created by
Simon Fraser (smfr)
on 2018-08-08 10:49:58 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2018-08-08 10:49:58 PDT
Size:
20.38 KB
patch
obsolete
>Subversion Revision: 234692 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 61c2db15b8b8ca5d9c8b2d3f66b75b3b98f1b39c..2cc446e8a7f9210aaedd5802c786d3ddf130c7ad 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,18 @@ >+2018-08-08 Simon Fraser <simon.fraser@apple.com> >+ >+ Add a WebKit2 logging channel for ActivityState >+ https://bugs.webkit.org/show_bug.cgi?id=188411 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add logging for ActivityState changes and the entrypoints that affect ActivityState. >+ >+ * Sources.txt: >+ * WebCore.xcodeproj/project.pbxproj: >+ * page/ActivityState.cpp: Added. >+ (WebCore::activityStateFlagsToString): >+ * page/ActivityState.h: >+ > 2018-08-08 Sihui Liu <sihui_liu@apple.com> > > Assertion failed in Webcore::Process::setIdentifier() >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index a8463f581e6dc46dbaeef030ce65bea97cc066d4..1559df3f2c50bc9d625a81a99aa110d55404a8d4 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,29 @@ >+2018-08-08 Simon Fraser <simon.fraser@apple.com> >+ >+ Add a WebKit2 logging channel for ActivityState >+ https://bugs.webkit.org/show_bug.cgi?id=188411 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add logging for ActivityState changes and the entrypoints that affect ActivityState. >+ >+ * Platform/Logging.h: >+ * UIProcess/Cocoa/WebViewImpl.mm: >+ (WebKit::WebViewImpl::windowDidOrderOffScreen): >+ (WebKit::WebViewImpl::windowDidOrderOnScreen): >+ (WebKit::WebViewImpl::windowDidChangeOcclusionState): >+ (WebKit::WebViewImpl::viewDidMoveToWindow): >+ (WebKit::WebViewImpl::viewDidHide): >+ (WebKit::WebViewImpl::viewDidUnhide): >+ (WebKit::WebViewImpl::activeSpaceDidChange): >+ * UIProcess/WebPageProxy.cpp: >+ (WebKit::WebPageProxy::activityStateDidChange): >+ (WebKit::WebPageProxy::dispatchActivityStateChange): >+ * UIProcess/mac/PageClientImplMac.mm: >+ (WebKit::PageClientImpl::isViewVisible): >+ * WebProcess/WebPage/WebPage.cpp: >+ (WebKit::WebPage::setActivityState): >+ > 2018-08-05 Darin Adler <darin@apple.com> > > [Cocoa] More tweaks and refactoring to prepare for ARC >diff --git a/Source/WebCore/Sources.txt b/Source/WebCore/Sources.txt >index 7941575e476a7b5782c67cbc7acb354e49991f60..379275fff22049211764641d4374c554bff17843 100644 >--- a/Source/WebCore/Sources.txt >+++ b/Source/WebCore/Sources.txt >@@ -1349,6 +1349,7 @@ mathml/MathMLUnknownElement.cpp > > page/AbstractDOMWindow.cpp > page/AbstractFrame.cpp >+page/ActivityState.cpp > page/AutoscrollController.cpp > page/BarProp.cpp > page/Base64Utilities.cpp >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index 68116d7213853f208c65cd1e2de906d64eca15e7..8f3a91741ea1015071784ffb600490846a7370a1 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -5645,6 +5645,7 @@ > 0F6383DC18615B29003E5DB5 /* ThreadedScrollingTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadedScrollingTree.h; sourceTree = "<group>"; }; > 0F6A12BB1A00923700C6DE72 /* DebugPageOverlays.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DebugPageOverlays.cpp; sourceTree = "<group>"; }; > 0F6A12BC1A00923700C6DE72 /* DebugPageOverlays.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DebugPageOverlays.h; sourceTree = "<group>"; }; >+ 0F70495D211B524200369968 /* ActivityState.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ActivityState.cpp; sourceTree = "<group>"; }; > 0F7DF1471E2BF1A60095951B /* WebCoreJSClientData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebCoreJSClientData.cpp; sourceTree = "<group>"; }; > 0F850FE21ED7C18300FB77A7 /* PerformanceLoggingClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PerformanceLoggingClient.h; sourceTree = "<group>"; }; > 0F87166D1C869D83004FF0DE /* LengthPoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LengthPoint.cpp; sourceTree = "<group>"; }; >@@ -5813,6 +5814,7 @@ > 11EA57FB20FFAFB600311EBB /* SimpleTextRunGenerator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SimpleTextRunGenerator.cpp; sourceTree = "<group>"; }; > 11EA57FC20FFAFB700311EBB /* SimpleTextRunGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleTextRunGenerator.h; sourceTree = "<group>"; }; > 11FF02D520BA3C810083F25B /* Verification.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Verification.cpp; sourceTree = "<group>"; }; >+ 12F75A9A86EA03DAF24B7971 /* ISOProtectionSystemSpecificHeaderBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISOProtectionSystemSpecificHeaderBox.h; sourceTree = "<group>"; }; > 1400D7A717136EA70077CE05 /* ScriptWrappableInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptWrappableInlines.h; sourceTree = "<group>"; }; > 1402645D0AFDC19B005919E2 /* LoggingMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = LoggingMac.mm; sourceTree = "<group>"; }; > 1403B90C09EB124500797C7F /* DOMWindow.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMWindow.idl; sourceTree = "<group>"; }; >@@ -7519,6 +7521,7 @@ > 450CEBEF15073BBE002BB149 /* LabelableElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LabelableElement.h; sourceTree = "<group>"; }; > 4512502015DCE37D002F84E2 /* SpinButtonElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpinButtonElement.cpp; sourceTree = "<group>"; }; > 4512502115DCE37D002F84E2 /* SpinButtonElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpinButtonElement.h; sourceTree = "<group>"; }; >+ 451A49F8F8726BE071518BE2 /* ISOProtectionSystemSpecificHeaderBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ISOProtectionSystemSpecificHeaderBox.cpp; sourceTree = "<group>"; }; > 453EB635159C570400001BB7 /* DateTimeFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DateTimeFormat.h; sourceTree = "<group>"; }; > 45830D4B1679B4F800ACF8C3 /* AutoscrollController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AutoscrollController.cpp; sourceTree = "<group>"; }; > 45830D4C1679B4F800ACF8C3 /* AutoscrollController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AutoscrollController.h; sourceTree = "<group>"; }; >@@ -13280,8 +13283,6 @@ > CD871C621FB52B6500F0B965 /* ISOBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISOBox.h; sourceTree = "<group>"; }; > CD871C631FB52B6600F0B965 /* ISOSchemeInformationBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ISOSchemeInformationBox.cpp; sourceTree = "<group>"; }; > CD871C641FB52B6700F0B965 /* ISOSchemeInformationBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISOSchemeInformationBox.h; sourceTree = "<group>"; }; >- 451A49F8F8726BE071518BE2 /* ISOProtectionSystemSpecificHeaderBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ISOProtectionSystemSpecificHeaderBox.cpp; sourceTree = "<group>"; }; >- 12F75A9A86EA03DAF24B7971 /* ISOProtectionSystemSpecificHeaderBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISOProtectionSystemSpecificHeaderBox.h; sourceTree = "<group>"; }; > CD871C651FB52B6700F0B965 /* ISOVTTCue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISOVTTCue.h; sourceTree = "<group>"; }; > CD871C661FB52B6800F0B965 /* ISOTrackEncryptionBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISOTrackEncryptionBox.h; sourceTree = "<group>"; }; > CD871C671FB52B6800F0B965 /* ISOOriginalFormatBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISOOriginalFormatBox.h; sourceTree = "<group>"; }; >@@ -19265,6 +19266,7 @@ > 46B9518A207D632800A7D2DD /* AbstractDOMWindow.h */, > 46B95194207D633000A7D2DD /* AbstractFrame.cpp */, > 46B9518F207D632B00A7D2DD /* AbstractFrame.h */, >+ 0F70495D211B524200369968 /* ActivityState.cpp */, > 724EE54E1DC7F25B00A91FFB /* ActivityState.h */, > 724EE54F1DC7F25B00A91FFB /* ActivityStateChangeObserver.h */, > BCF48CE61370D114004E87D6 /* AdjustViewSizeOrNot.h */, >diff --git a/Source/WebCore/page/ActivityState.cpp b/Source/WebCore/page/ActivityState.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..609aa1ec273afb7052aee0d610927a6f808fcee2 >--- /dev/null >+++ b/Source/WebCore/page/ActivityState.cpp >@@ -0,0 +1,90 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "ActivityState.h" >+ >+#include <wtf/text/StringBuilder.h> >+ >+namespace WebCore { >+ >+String activityStateFlagsToString(ActivityState::Flags flags) >+{ >+ StringBuilder builder; >+ >+ auto appendCommaIfNecessary = [&]() { >+ if (!builder.isEmpty()) >+ builder.append(", "); >+ }; >+ >+ if (flags & WebCore::ActivityState::WindowIsActive) { >+ appendCommaIfNecessary(); >+ builder.append("active window"); >+ } >+ >+ if (flags & WebCore::ActivityState::IsFocused) { >+ appendCommaIfNecessary(); >+ builder.append("focused"); >+ } >+ >+ if (flags & WebCore::ActivityState::IsVisible) { >+ appendCommaIfNecessary(); >+ builder.append("visible"); >+ } >+ >+ if (flags & WebCore::ActivityState::IsVisibleOrOccluded) { >+ appendCommaIfNecessary(); >+ builder.append("visible or occluded"); >+ } >+ >+ if (flags & WebCore::ActivityState::IsInWindow) { >+ appendCommaIfNecessary(); >+ builder.append("in-window"); >+ } >+ >+ if (flags & WebCore::ActivityState::IsVisuallyIdle) { >+ appendCommaIfNecessary(); >+ builder.append("visually idle"); >+ } >+ >+ if (flags & WebCore::ActivityState::IsAudible) { >+ appendCommaIfNecessary(); >+ builder.append("audible"); >+ } >+ >+ if (flags & WebCore::ActivityState::IsLoading) { >+ appendCommaIfNecessary(); >+ builder.append("loading"); >+ } >+ >+ if (flags & WebCore::ActivityState::IsCapturingMedia) { >+ appendCommaIfNecessary(); >+ builder.append("capturing media"); >+ } >+ >+ return builder.toString(); >+} >+ >+} // namespace WebCore >diff --git a/Source/WebCore/page/ActivityState.h b/Source/WebCore/page/ActivityState.h >index 72035dc1fcc99096a7356b59d6aae34d0811f155..dea40320821143584aa9ca18e8d8a091e93db8d0 100644 >--- a/Source/WebCore/page/ActivityState.h >+++ b/Source/WebCore/page/ActivityState.h >@@ -25,6 +25,10 @@ > > #pragma once > >+namespace WTF { >+class String; >+} >+ > namespace WebCore { > > struct ActivityState { >@@ -52,4 +56,7 @@ enum class ActivityStateForCPUSampling { > VisibleAndActive > }; > >+// Ideally this would be operator<<(WTF::TextStream&, ActivityState::Flags) but ActivityState::Flags needs to be strongly typed to avoid ambiguous overloads. >+WEBCORE_EXPORT WTF::String activityStateFlagsToString(ActivityState::Flags); >+ > } // namespace WebCore >diff --git a/Source/WebKit/Platform/Logging.h b/Source/WebKit/Platform/Logging.h >index b9765d866bc9612fe68e90188fdaa3d019d11498..da7ca58b124e32017991779d4f87f2ad478a1ad1 100644 >--- a/Source/WebKit/Platform/Logging.h >+++ b/Source/WebKit/Platform/Logging.h >@@ -40,6 +40,7 @@ extern "C" { > #endif > > #define WEBKIT2_LOG_CHANNELS(M) \ >+ M(ActivityState) \ > M(BackForward) \ > M(CacheStorage) \ > M(ContextMenu) \ >diff --git a/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm b/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >index 35a14ef3071e6f8b412a64dafb91994029c52988..180989d7bd0d51978cc33a77bc7c2c4ddf89164a 100644 >--- a/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >+++ b/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >@@ -1890,11 +1890,13 @@ float WebViewImpl::intrinsicDeviceScaleFactor() const > > void WebViewImpl::windowDidOrderOffScreen() > { >+ LOG(ActivityState, "WebViewImpl %p (page %llu) windowDidOrderOffScreen", this, m_page->pageID()); > m_page->activityStateDidChange(WebCore::ActivityState::IsVisible | WebCore::ActivityState::WindowIsActive); > } > > void WebViewImpl::windowDidOrderOnScreen() > { >+ LOG(ActivityState, "WebViewImpl %p (page %llu) windowDidOrderOnScreen", this, m_page->pageID()); > m_page->activityStateDidChange(WebCore::ActivityState::IsVisible | WebCore::ActivityState::WindowIsActive); > } > >@@ -1962,6 +1964,7 @@ void WebViewImpl::windowDidChangeLayerHosting() > > void WebViewImpl::windowDidChangeOcclusionState() > { >+ LOG(ActivityState, "WebViewImpl %p (page %llu) windowDidChangeOcclusionState", this, m_page->pageID()); > m_page->activityStateDidChange(WebCore::ActivityState::IsVisible); > } > >@@ -2055,6 +2058,8 @@ void WebViewImpl::viewDidMoveToWindow() > { > NSWindow *window = m_targetWindowForMovePreparation ? m_targetWindowForMovePreparation : [m_view window]; > >+ LOG(ActivityState, "WebViewImpl %p viewDidMoveToWindow %p", this, window); >+ > if (window) { > windowDidChangeScreen(); > >@@ -2119,16 +2124,19 @@ void WebViewImpl::viewDidChangeBackingProperties() > > void WebViewImpl::viewDidHide() > { >+ LOG(ActivityState, "WebViewImpl %p (page %llu) viewDidHide", this, m_page->pageID()); > m_page->activityStateDidChange(WebCore::ActivityState::IsVisible); > } > > void WebViewImpl::viewDidUnhide() > { >+ LOG(ActivityState, "WebViewImpl %p (page %llu) viewDidUnhide", this, m_page->pageID()); > m_page->activityStateDidChange(WebCore::ActivityState::IsVisible); > } > > void WebViewImpl::activeSpaceDidChange() > { >+ LOG(ActivityState, "WebViewImpl %p (page %llu) activeSpaceDidChange", this, m_page->pageID()); > m_page->activityStateDidChange(WebCore::ActivityState::IsVisible); > } > >diff --git a/Source/WebKit/UIProcess/WebPageProxy.cpp b/Source/WebKit/UIProcess/WebPageProxy.cpp >index ee5f25a3c2f73beb5f4b30266dc397566cc9b4ca..7a6f27532f6033914d783c06492e9df7c2ec91a0 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.cpp >+++ b/Source/WebKit/UIProcess/WebPageProxy.cpp >@@ -157,6 +157,7 @@ > #include <wtf/NeverDestroyed.h> > #include <wtf/SystemTracing.h> > #include <wtf/text/StringView.h> >+#include <wtf/text/TextStream.h> > > #if ENABLE(APPLICATION_MANIFEST) > #include "APIApplicationManifest.h" >@@ -1516,6 +1517,8 @@ void WebPageProxy::updateActivityState(ActivityState::Flags flagsToUpdate) > > void WebPageProxy::activityStateDidChange(ActivityState::Flags mayHaveChanged, bool wantsSynchronousReply, ActivityStateChangeDispatchMode dispatchMode) > { >+ LOG_WITH_STREAM(ActivityState, stream << "WebPageProxy " << pageID() << " activityStateDidChange - mayHaveChanged " << activityStateFlagsToString(mayHaveChanged)); >+ > m_potentiallyChangedActivityStateFlags |= mayHaveChanged; > m_activityStateChangeWantsSynchronousReply = m_activityStateChangeWantsSynchronousReply || wantsSynchronousReply; > >@@ -1563,6 +1566,8 @@ void WebPageProxy::dispatchActivityStateChange() > if (!isValid()) > return; > >+ LOG_WITH_STREAM(ActivityState, stream << "WebPageProxy " << pageID() << " dispatchActivityStateChange - potentiallyChangedActivityStateFlags " << activityStateFlagsToString(m_potentiallyChangedActivityStateFlags)); >+ > // If the visibility state may have changed, then so may the visually idle & occluded agnostic state. > if (m_potentiallyChangedActivityStateFlags & ActivityState::IsVisible) > m_potentiallyChangedActivityStateFlags |= ActivityState::IsVisibleOrOccluded | ActivityState::IsVisuallyIdle; >@@ -1573,6 +1578,9 @@ void WebPageProxy::dispatchActivityStateChange() > updateActivityState(m_potentiallyChangedActivityStateFlags); > ActivityState::Flags changed = m_activityState ^ previousActivityState; > >+ if (changed) >+ LOG_WITH_STREAM(ActivityState, stream << "WebPageProxy " << pageID() << " dispatchActivityStateChange: state changed from " << activityStateFlagsToString(previousActivityState) << " to " << activityStateFlagsToString(m_activityState)); >+ > if ((m_potentiallyChangedActivityStateFlags & ActivityState::IsVisible) && isViewVisible()) > viewIsBecomingVisible(); > >diff --git a/Source/WebKit/UIProcess/mac/PageClientImplMac.mm b/Source/WebKit/UIProcess/mac/PageClientImplMac.mm >index 452f58009036835437ea4e114d4ca1054d8c6082..4798271161852319f770ed07c01f2ab65bdac895 100644 >--- a/Source/WebKit/UIProcess/mac/PageClientImplMac.mm >+++ b/Source/WebKit/UIProcess/mac/PageClientImplMac.mm >@@ -33,6 +33,7 @@ > #import "DataReference.h" > #import "DownloadProxy.h" > #import "DrawingAreaProxy.h" >+#import "Logging.h" > #import "NativeWebGestureEvent.h" > #import "NativeWebKeyboardEvent.h" > #import "NativeWebMouseEvent.h" >@@ -198,6 +199,13 @@ bool PageClientImpl::isViewVisible() > NSView *activeView = this->activeView(); > NSWindow *activeViewWindow = activeWindow(); > >+ auto windowIsOccluded = [&]()->bool { >+ return m_impl && m_impl->windowOcclusionDetectionEnabled() && (activeViewWindow.occlusionState & NSWindowOcclusionStateVisible) != NSWindowOcclusionStateVisible; >+ }; >+ >+ LOG_WITH_STREAM(ActivityState, stream << "PageClientImpl " << this << " isViewVisible(): activeViewWindow " << activeViewWindow >+ << " (window visible " << activeViewWindow.isVisible << ", view hidden " << activeView.isHiddenOrHasHiddenAncestor << ", window occluded " << windowIsOccluded() << ")"); >+ > if (!activeViewWindow) > return false; > >@@ -207,7 +215,7 @@ bool PageClientImpl::isViewVisible() > if (activeView.isHiddenOrHasHiddenAncestor) > return false; > >- if (m_impl->windowOcclusionDetectionEnabled() && (activeViewWindow.occlusionState & NSWindowOcclusionStateVisible) != NSWindowOcclusionStateVisible) >+ if (windowIsOccluded()) > return false; > > return true; >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.cpp b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >index 9024dfd6e21bd4803ce3c70846728857cb20b3a5..d6b96556866d98560b0b2ef4e3da85e5573933ea 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.cpp >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >@@ -2796,6 +2796,8 @@ void WebPage::visibilityDidChange() > > void WebPage::setActivityState(ActivityState::Flags activityState, ActivityStateChangeID activityStateChangeID, const Vector<CallbackID>& callbackIDs) > { >+ LOG_WITH_STREAM(ActivityState, stream << "WebPage " << pageID() << " setActivityState to " << activityStateFlagsToString(activityState)); >+ > ActivityState::Flags changed = m_activityState ^ activityState; > m_activityState = activityState; >
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 188411
: 346775 |
346777