Title: [271743] trunk/Source/WebCore
Revision
271743
Author
[email protected]
Date
2021-01-22 04:11:37 -0800 (Fri, 22 Jan 2021)

Log Message

Remove individual settings accessors from WorkerGlobalScope and add Settings::Values accessor
https://bugs.webkit.org/show_bug.cgi?id=220854

Reviewed by Youenn Fablet.

Remove individual settings accessors from WorkerGlobalScope and make
Settings::Values accessor public.

No new tests, no behavior change.

* html/OffscreenCanvas.cpp:
(WebCore::OffscreenCanvas::createContextWebGL):
* workers/WorkerAnimationController.cpp:
(WebCore::WorkerAnimationController::scheduleAnimation):
(WebCore::WorkerAnimationController::serviceRequestAnimationFrameCallbacks):
* workers/WorkerGlobalScope.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (271742 => 271743)


--- trunk/Source/WebCore/ChangeLog	2021-01-22 10:59:50 UTC (rev 271742)
+++ trunk/Source/WebCore/ChangeLog	2021-01-22 12:11:37 UTC (rev 271743)
@@ -1,5 +1,24 @@
 2021-01-22  Chris Lord  <[email protected]>
 
+        Remove individual settings accessors from WorkerGlobalScope and add Settings::Values accessor
+        https://bugs.webkit.org/show_bug.cgi?id=220854
+
+        Reviewed by Youenn Fablet.
+
+        Remove individual settings accessors from WorkerGlobalScope and make
+        Settings::Values accessor public.
+
+        No new tests, no behavior change.
+
+        * html/OffscreenCanvas.cpp:
+        (WebCore::OffscreenCanvas::createContextWebGL):
+        * workers/WorkerAnimationController.cpp:
+        (WebCore::WorkerAnimationController::scheduleAnimation):
+        (WebCore::WorkerAnimationController::serviceRequestAnimationFrameCallbacks):
+        * workers/WorkerGlobalScope.h:
+
+2021-01-22  Chris Lord  <[email protected]>
+
         Move FontGenericFamilies storage from SettingsBase to Settings::Values
         https://bugs.webkit.org/show_bug.cgi?id=220801
 

Modified: trunk/Source/WebCore/html/OffscreenCanvas.cpp (271742 => 271743)


--- trunk/Source/WebCore/html/OffscreenCanvas.cpp	2021-01-22 10:59:50 UTC (rev 271742)
+++ trunk/Source/WebCore/html/OffscreenCanvas.cpp	2021-01-22 12:11:37 UTC (rev 271743)
@@ -182,7 +182,7 @@
     auto scriptExecutionContext = this->scriptExecutionContext();
     if (scriptExecutionContext->isWorkerGlobalScope()) {
         WorkerGlobalScope& workerGlobalScope = downcast<WorkerGlobalScope>(*scriptExecutionContext);
-        if (!shouldEnableWebGL(workerGlobalScope.webGLEnabled(), workerGlobalScope.acceleratedCompositingEnabled()))
+        if (!shouldEnableWebGL(workerGlobalScope.settingsValues().webGLEnabled, workerGlobalScope.settingsValues().acceleratedCompositingEnabled))
             return;
     } else if (scriptExecutionContext->isDocument()) {
         auto& settings = downcast<Document>(*scriptExecutionContext).settings();

Modified: trunk/Source/WebCore/workers/WorkerAnimationController.cpp (271742 => 271743)


--- trunk/Source/WebCore/workers/WorkerAnimationController.cpp	2021-01-22 10:59:50 UTC (rev 271742)
+++ trunk/Source/WebCore/workers/WorkerAnimationController.cpp	2021-01-22 12:11:37 UTC (rev 271743)
@@ -111,7 +111,7 @@
 
 void WorkerAnimationController::scheduleAnimation()
 {
-    if (!m_workerGlobalScope.requestAnimationFrameEnabled())
+    if (!m_workerGlobalScope.settingsValues().requestAnimationFrameEnabled)
         return;
 
     if (m_animationTimer.isActive())
@@ -131,7 +131,7 @@
 
 void WorkerAnimationController::serviceRequestAnimationFrameCallbacks(DOMHighResTimeStamp timestamp)
 {
-    if (!m_animationCallbacks.size() || !m_workerGlobalScope.requestAnimationFrameEnabled())
+    if (!m_animationCallbacks.size() || !m_workerGlobalScope.settingsValues().requestAnimationFrameEnabled)
         return;
 
     // First, generate a list of callbacks to consider. Callbacks registered from this point

Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.h (271742 => 271743)


--- trunk/Source/WebCore/workers/WorkerGlobalScope.h	2021-01-22 10:59:50 UTC (rev 271742)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.h	2021-01-22 12:11:37 UTC (rev 271743)
@@ -121,9 +121,7 @@
 
     ReferrerPolicy referrerPolicy() const final;
 
-    bool requestAnimationFrameEnabled() const { return m_settingsValues.requestAnimationFrameEnabled; }
-    bool acceleratedCompositingEnabled() const { return m_settingsValues.acceleratedCompositingEnabled; }
-    bool webGLEnabled() const { return m_settingsValues.webGLEnabled; }
+    const Settings::Values& settingsValues() const final { return m_settingsValues; }
 
 protected:
     WorkerGlobalScope(WorkerThreadType, const WorkerParameters&, Ref<SecurityOrigin>&&, WorkerThread&, Ref<SecurityOrigin>&& topOrigin, IDBClient::IDBConnectionProxy*, SocketProvider*);
@@ -142,7 +140,6 @@
 
     URL completeURL(const String&, ForceUTF8 = ForceUTF8::No) const final;
     String userAgent(const URL&) const final;
-    const Settings::Values& settingsValues() const final { return m_settingsValues; }
 
     EventTarget* errorEventTarget() final;
     String resourceRequestIdentifier() const final { return m_identifier; }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to