Diff
Modified: branches/safari-601.1.32-branch/Source/WebCore/ChangeLog (184234 => 184235)
--- branches/safari-601.1.32-branch/Source/WebCore/ChangeLog 2015-05-13 03:08:50 UTC (rev 184234)
+++ branches/safari-601.1.32-branch/Source/WebCore/ChangeLog 2015-05-13 03:15:49 UTC (rev 184235)
@@ -1,35 +1,35 @@
2015-05-12 Dana Burkart
-Dana Burkart <dburk...@apple.com>
+Dana Burkart <dburk...@apple.com
+dburk...@apple.com>
- Merge r183942. rdar://problem/20049088
+ Merge r183909. rdar://problem/18894598
- 2015-05-06 Dean Jackson <d...@apple.com>
+ 2015-05-06 Daniel Bates <daba...@apple.com>
- Handle backdrop views that have to tile
- https://bugs.webkit.org/show_bug.cgi?id=142317
- <rdar://problem/20049088>
+ [iOS][WK2] Pause/resume database thread when UIProcess enters/leaves the background
+ https://bugs.webkit.org/show_bug.cgi?id=144657
+ <rdar://problem/18894598>
- Reviewed by Simon Fraser.
+ Reviewed by Andy Estes.
- Take 2 - this was rolled out because Mavericks was crashing.
+ Export WebCore functionality to pause and resume the database thread so that we can
+ make use of this functionality from WebKit2.
- Make sure backdrop layers don't tile. If they are big
- enough, we'll leave it to the platform compositor to handle.
+ * Modules/webdatabase/AbstractDatabaseServer.h:
+ * Modules/webdatabase/DatabaseManager.cpp:
+ (WebCore::DatabaseManager::setPauseAllDatabases): Added; turns around and calls DatabaseServer::setPauseAllDatabases().
+ * Modules/webdatabase/DatabaseManager.h:
+ * Modules/webdatabase/DatabaseServer.cpp:
+ (WebCore::DatabaseServer::setPauseAllDatabases): Added; turns around and calls
+ DatabaseTracker::tracker().setDatabasesPaused() to pause or resume the database thread.
+ For now, we guard this call with PLATFORM(IOS). We'll look to remove this guard once
+ we fix <https://bugs.webkit.org/show_bug.cgi?id=144660>.
+ * Modules/webdatabase/DatabaseServer.h:
- This also fixes a bug where if a layer changed from a backdrop
- type to a tiled type, it would still retain its custom appearance
- and we'd try to add children to the wrong layer.
-
- Test: compositing/media-controls-bar-appearance-big.html
-
- * platform/graphics/ca/GraphicsLayerCA.cpp:
- (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Check if
- a layer needs a backdrop before checking if it needs to tile.
-
2015-05-12 Dana Burkart
Dana Burkart <dburk...@apple.com>
- Merge r183894. rdar://problem/20049088
+ Merge r183942. rdar://problem/20049088
2015-05-06 Dean Jackson <d...@apple.com>
@@ -39,6 +39,8 @@
Reviewed by Simon Fraser.
+ Take 2 - this was rolled out because Mavericks was crashing.
+
Make sure backdrop layers don't tile. If they are big
enough, we'll leave it to the platform compositor to handle.
@@ -52,6 +54,32 @@
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Check if
a layer needs a backdrop before checking if it needs to tile.
+ 2015-05-12 Dana Burkart
+ Dana Burkart <dburk...@apple.com>
+
+ Merge r183894. rdar://problem/20049088
+
+ 2015-05-06 Dean Jackson <d...@apple.com>
+
+ Handle backdrop views that have to tile
+ https://bugs.webkit.org/show_bug.cgi?id=142317
+ <rdar://problem/20049088>
+
+ Reviewed by Simon Fraser.
+
+ Make sure backdrop layers don't tile. If they are big
+ enough, we'll leave it to the platform compositor to handle.
+
+ This also fixes a bug where if a layer changed from a backdrop
+ type to a tiled type, it would still retain its custom appearance
+ and we'd try to add children to the wrong layer.
+
+ Test: compositing/media-controls-bar-appearance-big.html
+
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Check if
+ a layer needs a backdrop before checking if it needs to tile.
+
2015-05-06 Brent Fulgham <bfulg...@apple.com>
Scroll-snap points do not handle margins and padding propertly
Modified: branches/safari-601.1.32-branch/Source/WebCore/Modules/webdatabase/AbstractDatabaseServer.h (184234 => 184235)
--- branches/safari-601.1.32-branch/Source/WebCore/Modules/webdatabase/AbstractDatabaseServer.h 2015-05-13 03:08:50 UTC (rev 184234)
+++ branches/safari-601.1.32-branch/Source/WebCore/Modules/webdatabase/AbstractDatabaseServer.h 2015-05-13 03:15:49 UTC (rev 184235)
@@ -71,6 +71,8 @@
virtual bool deleteOrigin(SecurityOrigin*) = 0;
virtual bool deleteDatabase(SecurityOrigin*, const String& name) = 0;
+ virtual void setPauseAllDatabases(bool) = 0;
+
virtual void interruptAllDatabasesForContext(const DatabaseContext*) = 0;
protected:
Modified: branches/safari-601.1.32-branch/Source/WebCore/Modules/webdatabase/DatabaseManager.cpp (184234 => 184235)
--- branches/safari-601.1.32-branch/Source/WebCore/Modules/webdatabase/DatabaseManager.cpp 2015-05-13 03:08:50 UTC (rev 184234)
+++ branches/safari-601.1.32-branch/Source/WebCore/Modules/webdatabase/DatabaseManager.cpp 2015-05-13 03:15:49 UTC (rev 184235)
@@ -397,6 +397,11 @@
return m_server->deleteDatabase(origin, name);
}
+void DatabaseManager::setPauseAllDatabases(bool pauseAllDatabases)
+{
+ m_server->setPauseAllDatabases(pauseAllDatabases);
+}
+
void DatabaseManager::interruptAllDatabasesForContext(ScriptExecutionContext* context)
{
RefPtr<DatabaseContext> databaseContext = existingDatabaseContextFor(context);
Modified: branches/safari-601.1.32-branch/Source/WebCore/Modules/webdatabase/DatabaseManager.h (184234 => 184235)
--- branches/safari-601.1.32-branch/Source/WebCore/Modules/webdatabase/DatabaseManager.h 2015-05-13 03:08:50 UTC (rev 184234)
+++ branches/safari-601.1.32-branch/Source/WebCore/Modules/webdatabase/DatabaseManager.h 2015-05-13 03:15:49 UTC (rev 184235)
@@ -103,6 +103,8 @@
WEBCORE_EXPORT bool deleteOrigin(SecurityOrigin*);
WEBCORE_EXPORT bool deleteDatabase(SecurityOrigin*, const String& name);
+ WEBCORE_EXPORT void setPauseAllDatabases(bool);
+
void interruptAllDatabasesForContext(ScriptExecutionContext*);
private:
Modified: branches/safari-601.1.32-branch/Source/WebCore/Modules/webdatabase/DatabaseServer.cpp (184234 => 184235)
--- branches/safari-601.1.32-branch/Source/WebCore/Modules/webdatabase/DatabaseServer.cpp 2015-05-13 03:08:50 UTC (rev 184234)
+++ branches/safari-601.1.32-branch/Source/WebCore/Modules/webdatabase/DatabaseServer.cpp 2015-05-13 03:15:49 UTC (rev 184235)
@@ -108,6 +108,15 @@
return DatabaseTracker::tracker().deleteDatabase(origin, name);
}
+void DatabaseServer::setPauseAllDatabases(bool pauseAllDatabases)
+{
+#if PLATFORM(IOS)
+ DatabaseTracker::tracker().setDatabasesPaused(pauseAllDatabases);
+#else
+ UNUSED_PARAM(pauseAllDatabases);
+#endif
+}
+
void DatabaseServer::interruptAllDatabasesForContext(const DatabaseContext* context)
{
DatabaseTracker::tracker().interruptAllDatabasesForContext(context);
Modified: branches/safari-601.1.32-branch/Source/WebCore/Modules/webdatabase/DatabaseServer.h (184234 => 184235)
--- branches/safari-601.1.32-branch/Source/WebCore/Modules/webdatabase/DatabaseServer.h 2015-05-13 03:08:50 UTC (rev 184234)
+++ branches/safari-601.1.32-branch/Source/WebCore/Modules/webdatabase/DatabaseServer.h 2015-05-13 03:15:49 UTC (rev 184235)
@@ -60,6 +60,8 @@
virtual bool deleteOrigin(SecurityOrigin*);
virtual bool deleteDatabase(SecurityOrigin*, const String& name);
+ void setPauseAllDatabases(bool) override;
+
virtual void interruptAllDatabasesForContext(const DatabaseContext*);
protected:
Modified: branches/safari-601.1.32-branch/Source/WebKit2/ChangeLog (184234 => 184235)
--- branches/safari-601.1.32-branch/Source/WebKit2/ChangeLog 2015-05-13 03:08:50 UTC (rev 184234)
+++ branches/safari-601.1.32-branch/Source/WebKit2/ChangeLog 2015-05-13 03:15:49 UTC (rev 184235)
@@ -1,27 +1,46 @@
2015-05-12 Dana Burkart
-Dana Burkart <dburk...@apple.com>
+Dana Burkart <dburk...@apple.com
+dburk...@apple.com>
- Merge r183942. rdar://problem/20049088
+ Merge r183909. rdar://problem/18894598
- 2015-05-06 Dean Jackson <d...@apple.com>
+ 2015-05-06 Daniel Bates <daba...@apple.com>
- Handle backdrop views that have to tile
- https://bugs.webkit.org/show_bug.cgi?id=142317
- <rdar://problem/20049088>
+ [iOS][WK2] Pause/resume database thread when UIProcess enters/leaves the background
+ https://bugs.webkit.org/show_bug.cgi?id=144657
+ <rdar://problem/18894598>
- Reviewed by Simon Fraser.
+ Reviewed by Andy Estes.
- Take 2 - this was rolled out because Mavericks was crashing.
+ Pause and resume the database thread when the UIProcess enters and leaves the background,
+ respectively, so that we avoid WebProcess termination due to holding a locked SQLite
+ database file when the WebProcess is suspended. This behavior matches the analagous
+ behavior in Legacy WebKit.
- Add some better logging for custom appearance.
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/ios/WKContentView.mm:
+ (-[WKContentView _applicationDidEnterBackground:]): Call WebPageProxy::applicationDidEnterBackground()
+ when the UIProcess enters the background.
+ * UIProcess/ios/WebPageProxyIOS.mm:
+ (WebKit::WebPageProxy::applicationDidEnterBackground): Added; notify the WebProcess to pause the database thread.
+ We temporarily take out background assertion on the WebProcess before sending this notification to ensure that the
+ WebProcess is running to receive it. We'll release this assertion when the WebProcess replies that it received the
+ notification.
+ * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
+ (WebKit::WebDatabaseManager::setPauseAllDatabases): Added; turns around and calls DatabaseManager::setPauseAllDatabases().
+ * WebProcess/WebCoreSupport/WebDatabaseManager.h:
+ * WebProcess/WebPage/WebPage.h:
+ * WebProcess/WebPage/WebPage.messages.in: Add message ApplicationDidEnterBackground(). Also,
+ add empty lines to help demarcate this message and the other UIKit application lifecycle-related
+ messages from the rest of the list of messages.
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::applicationWillEnterForeground): Resume the database thread.
+ (WebKit::WebPage::applicationDidEnterBackground): Pause the database thread.
- * Shared/mac/RemoteLayerTreeTransaction.mm:
- (WebKit::RemoteLayerTreeTextStream::operator<<):
-
2015-05-12 Dana Burkart
Dana Burkart <dburk...@apple.com>
- Merge r183894. rdar://problem/20049088
+ Merge r183942. rdar://problem/20049088
2015-05-06 Dean Jackson <d...@apple.com>
@@ -31,11 +50,31 @@
Reviewed by Simon Fraser.
+ Take 2 - this was rolled out because Mavericks was crashing.
+
Add some better logging for custom appearance.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTextStream::operator<<):
+ 2015-05-12 Dana Burkart
+ Dana Burkart <dburk...@apple.com>
+
+ Merge r183894. rdar://problem/20049088
+
+ 2015-05-06 Dean Jackson <d...@apple.com>
+
+ Handle backdrop views that have to tile
+ https://bugs.webkit.org/show_bug.cgi?id=142317
+ <rdar://problem/20049088>
+
+ Reviewed by Simon Fraser.
+
+ Add some better logging for custom appearance.
+
+ * Shared/mac/RemoteLayerTreeTransaction.mm:
+ (WebKit::RemoteLayerTreeTextStream::operator<<):
+
2015-05-11 Babak Shafiei <bshaf...@apple.com>
Merge r184004.
Modified: branches/safari-601.1.32-branch/Source/WebKit2/UIProcess/WebPageProxy.h (184234 => 184235)
--- branches/safari-601.1.32-branch/Source/WebKit2/UIProcess/WebPageProxy.h 2015-05-13 03:08:50 UTC (rev 184234)
+++ branches/safari-601.1.32-branch/Source/WebKit2/UIProcess/WebPageProxy.h 2015-05-13 03:15:49 UTC (rev 184235)
@@ -493,9 +493,12 @@
void setAssistedNodeValue(const String&);
void setAssistedNodeValueAsNumber(double);
void setAssistedNodeSelectedIndex(uint32_t index, bool allowMultipleSelection = false);
+
void applicationWillEnterForeground();
+ void applicationDidEnterBackground();
void applicationWillResignActive();
void applicationDidBecomeActive();
+
void zoomToRect(WebCore::FloatRect, double minimumScale, double maximumScale);
void commitPotentialTapFailed();
void didNotHandleTapAsClick(const WebCore::IntPoint&);
Modified: branches/safari-601.1.32-branch/Source/WebKit2/UIProcess/ios/WKContentView.mm (184234 => 184235)
--- branches/safari-601.1.32-branch/Source/WebKit2/UIProcess/ios/WKContentView.mm 2015-05-13 03:08:50 UTC (rev 184234)
+++ branches/safari-601.1.32-branch/Source/WebKit2/UIProcess/ios/WKContentView.mm 2015-05-13 03:15:49 UTC (rev 184235)
@@ -551,6 +551,7 @@
- (void)_applicationDidEnterBackground:(NSNotification*)notification
{
_isBackground = YES;
+ _page->applicationDidEnterBackground();
_page->viewStateDidChange(ViewState::AllFlags & ~ViewState::IsInWindow);
}
Modified: branches/safari-601.1.32-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm (184234 => 184235)
--- branches/safari-601.1.32-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm 2015-05-13 03:08:50 UTC (rev 184234)
+++ branches/safari-601.1.32-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm 2015-05-13 03:15:49 UTC (rev 184235)
@@ -598,6 +598,12 @@
m_process->send(Messages::WebPage::ApplicationWillEnterForeground(), m_pageID);
}
+void WebPageProxy::applicationDidEnterBackground()
+{
+ uint64_t callbackID = m_callbacks.put(VoidCallback::create([](CallbackBase::Error) { }, m_process->throttler().backgroundActivityToken()));
+ m_process->send(Messages::WebPage::ApplicationDidEnterBackground(callbackID), m_pageID);
+}
+
void WebPageProxy::applicationWillResignActive()
{
m_process->send(Messages::WebPage::ApplicationWillResignActive(), m_pageID);
Modified: branches/safari-601.1.32-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebDatabaseManager.cpp (184234 => 184235)
--- branches/safari-601.1.32-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebDatabaseManager.cpp 2015-05-13 03:08:50 UTC (rev 184234)
+++ branches/safari-601.1.32-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebDatabaseManager.cpp 2015-05-13 03:15:49 UTC (rev 184235)
@@ -137,6 +137,11 @@
DatabaseManager::singleton().deleteAllDatabases();
}
+void WebDatabaseManager::setPauseAllDatabases(bool pauseAllDatabases)
+{
+ DatabaseManager::singleton().setPauseAllDatabases(pauseAllDatabases);
+}
+
void WebDatabaseManager::setQuotaForOrigin(const String& originIdentifier, unsigned long long quota) const
{
// If the quota is set to a value lower than the current usage, that quota will
Modified: branches/safari-601.1.32-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebDatabaseManager.h (184234 => 184235)
--- branches/safari-601.1.32-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebDatabaseManager.h 2015-05-13 03:08:50 UTC (rev 184234)
+++ branches/safari-601.1.32-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebDatabaseManager.h 2015-05-13 03:15:49 UTC (rev 184235)
@@ -46,6 +46,8 @@
void setQuotaForOrigin(const String& originIdentifier, unsigned long long quota) const;
void deleteAllDatabases() const;
+ void setPauseAllDatabases(bool);
+
private:
// WebProcessSupplement
virtual void initialize(const WebProcessCreationParameters&) override;
Modified: branches/safari-601.1.32-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h (184234 => 184235)
--- branches/safari-601.1.32-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h 2015-05-13 03:08:50 UTC (rev 184234)
+++ branches/safari-601.1.32-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h 2015-05-13 03:15:49 UTC (rev 184235)
@@ -786,9 +786,12 @@
void updateVisibleContentRects(const VisibleContentRectUpdateInfo&, double oldestTimestamp);
bool scaleWasSetByUIProcess() const { return m_scaleWasSetByUIProcess; }
void willStartUserTriggeredZooming();
+
void applicationWillResignActive();
void applicationWillEnterForeground();
+ void applicationDidEnterBackground(uint64_t callbackID);
void applicationDidBecomeActive();
+
void zoomToRect(WebCore::FloatRect, double minimumScale, double maximumScale);
void completePendingSyntheticClickForContentChangeObserver();
#endif
Modified: branches/safari-601.1.32-branch/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (184234 => 184235)
--- branches/safari-601.1.32-branch/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in 2015-05-13 03:08:50 UTC (rev 184234)
+++ branches/safari-601.1.32-branch/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in 2015-05-13 03:15:49 UTC (rev 184235)
@@ -87,9 +87,12 @@
SetAssistedNodeValue(String value)
SetAssistedNodeValueAsNumber(double value)
SetAssistedNodeSelectedIndex(uint32_t index, bool allowMultipleSelection)
+
ApplicationWillResignActive()
ApplicationWillEnterForeground()
+ ApplicationDidEnterBackground(uint64_t callbackID)
ApplicationDidBecomeActive()
+
ContentSizeCategoryDidChange(String contentSizeCategory)
ExecuteEditCommandWithCallback(String name, uint64_t callbackID)
GetLookupContextAtPoint(WebCore::IntPoint point, uint64_t callbackID)
Modified: branches/safari-601.1.32-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (184234 => 184235)
--- branches/safari-601.1.32-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2015-05-13 03:08:50 UTC (rev 184234)
+++ branches/safari-601.1.32-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2015-05-13 03:15:49 UTC (rev 184235)
@@ -42,6 +42,7 @@
#import "WKAccessibilityWebPageObjectIOS.h"
#import "WebChromeClient.h"
#import "WebCoreArgumentCoders.h"
+#import "WebDatabaseManager.h"
#import "WebFrame.h"
#import "WebImage.h"
#import "WebKitSystemInterface.h"
@@ -2720,9 +2721,16 @@
void WebPage::applicationWillEnterForeground()
{
+ WebProcess::singleton().supplement<WebDatabaseManager>()->setPauseAllDatabases(false);
[[NSNotificationCenter defaultCenter] postNotificationName:WebUIApplicationWillEnterForegroundNotification object:nil];
}
+void WebPage::applicationDidEnterBackground(uint64_t callbackID)
+{
+ WebProcess::singleton().supplement<WebDatabaseManager>()->setPauseAllDatabases(true);
+ send(Messages::WebPageProxy::VoidCallback(callbackID));
+}
+
void WebPage::applicationDidBecomeActive()
{
[[NSNotificationCenter defaultCenter] postNotificationName:WebUIApplicationDidBecomeActiveNotification object:nil];