Changeset 250754 in webkit


Ignore:
Timestamp:
Oct 4, 2019 4:12:45 PM (4 years ago)
Author:
Chris Dumez
Message:

Allow pages using IDBIndex to enter the PageCache
https://bugs.webkit.org/show_bug.cgi?id=202430
<rdar://problem/55887918>

Reviewed by Geoffrey Garen.

Source/WebCore:

There is no reason to prevent PageCaching when an IDBIndex object is alive.
No events are fired by IDBIndex and its API returns IDBRequest objects, which
are already PageCache-aware.

I have seen Yahoo.com failing to enter the back/forward cache because of this.

No new tests, updated existing test.

  • Modules/indexeddb/IDBIndex.cpp:

(WebCore::IDBIndex::canSuspendForDocumentSuspension const):

LayoutTests:

Extend layout test coverage.

  • storage/indexeddb/IDBTransaction-page-cache-expected.txt:
  • storage/indexeddb/IDBTransaction-page-cache.html:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r250741 r250754  
     12019-10-04  Chris Dumez  <cdumez@apple.com>
     2
     3        Allow pages using IDBIndex to enter the PageCache
     4        https://bugs.webkit.org/show_bug.cgi?id=202430
     5        <rdar://problem/55887918>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        Extend layout test coverage.
     10
     11        * storage/indexeddb/IDBTransaction-page-cache-expected.txt:
     12        * storage/indexeddb/IDBTransaction-page-cache.html:
     13
    1142019-10-04  Truitt Savell  <tsavell@apple.com>
    215
  • trunk/LayoutTests/storage/indexeddb/IDBTransaction-page-cache-expected.txt

    r250531 r250754  
    1 Tests that an IDBRequest does not prevent page caching.
     1Tests that an IDBRequest & IDBIndex does not prevent page caching.
    22
    33On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
     
    55
    66pageshow - not from page cache
     7PASS !!myIndex is true
    78pagehide - entering page cache
    89pageshow - from page cache
  • trunk/LayoutTests/storage/indexeddb/IDBTransaction-page-cache.html

    r250531 r250754  
    55<script src="../../resources/js-test.js"></script>
    66<script>
    7 description("Tests that an IDBRequest does not prevent page caching.");
     7description("Tests that an IDBRequest & IDBIndex does not prevent page caching.");
    88jsTestIsAsync = true;
    99
     
    3636             transaction = objectStore.transaction;
    3737
     38             myIndex = objectStore.createIndex('index', 'x', {unique: true});
     39             shouldBeTrue("!!myIndex");
     40
    3841             window.location = "../../fast/history/resources/page-cache-helper.html";
    3942         };
  • trunk/Source/WebCore/ChangeLog

    r250747 r250754  
     12019-10-04  Chris Dumez  <cdumez@apple.com>
     2
     3        Allow pages using IDBIndex to enter the PageCache
     4        https://bugs.webkit.org/show_bug.cgi?id=202430
     5        <rdar://problem/55887918>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        There is no reason to prevent PageCaching when an IDBIndex object is alive.
     10        No events are fired by IDBIndex and its API returns IDBRequest objects, which
     11        are already PageCache-aware.
     12
     13        I have seen Yahoo.com failing to enter the back/forward cache because of this.
     14
     15        No new tests, updated existing test.
     16
     17        * Modules/indexeddb/IDBIndex.cpp:
     18        (WebCore::IDBIndex::canSuspendForDocumentSuspension const):
     19
    1202019-10-04  Heiko Becker  <heirecka@exherbo.org>
    221
  • trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp

    r243039 r250754  
    6565bool IDBIndex::canSuspendForDocumentSuspension() const
    6666{
    67     return false;
     67    return true;
    6868}
    6969
Note: See TracChangeset for help on using the changeset viewer.