Build fix after r251567.
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Oct 2019 22:57:19 +0000 (22:57 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Oct 2019 22:57:19 +0000 (22:57 +0000)
* page/Page.cpp:
(WebCore::Page::collectDocuments):
* page/Page.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251571 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/page/Page.cpp
Source/WebCore/page/Page.h

index 4edc28b..6c277f9 100644 (file)
@@ -1,3 +1,11 @@
+2019-10-24  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Build fix after r251567.
+
+        * page/Page.cpp:
+        (WebCore::Page::collectDocuments):
+        * page/Page.h:
+
 2019-10-24  Matt Lewis  <jlewis3@apple.com>
 
         Unreviewed, rolling out r251558.
index 4e09699..7b6e489 100644 (file)
@@ -2874,6 +2874,18 @@ void Page::forEachDocument(const Function<void(Document&)>& functor)
     }
 }
 
+Vector<Ref<Document>> Page::collectDocuments()
+{
+    Vector<Ref<Document>> documents;
+    for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNext()) {
+        auto* document = frame->document();
+        if (!document)
+            continue;
+        documents.append(*document);
+    }
+    return documents;
+}
+
 void Page::applicationWillResignActive()
 {
     forEachDocument([&] (Document& document) {
index 831f0a0..3462741 100644 (file)
@@ -750,6 +750,7 @@ private:
     void handleLowModePowerChange(bool);
 
     void forEachDocument(const WTF::Function<void(Document&)>&);
+    Vector<Ref<Document>> collectDocuments();
 
     enum class TimerThrottlingState { Disabled, Enabled, EnabledIncreasing };
     void hiddenPageDOMTimerThrottlingStateChanged();