2010-08-17 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
authorcommit-queue <commit-queue@webkit.org>
Tue, 17 Aug 2010 16:54:23 +0000 (16:54 +0000)
committerSimon Hausmann <simon.hausmann@nokia.com>
Wed, 25 Aug 2010 10:13:04 +0000 (12:13 +0200)
commite3bec9eeccf5d1ebcc6d4c3ddd23df19fc9f7595
treec7c2091c98a9be59efbaecfe708e8b56ef4944e4
parentb294d94283bc9aecea980e693c7ff88476f70cfd
2010-08-17  Mahesh Kulkarni  <mahesh.kulkarni@nokia.com>

        Reviewed by Steve Block.

        Geolocation preemptive permissions policy is buggy
        https://bugs.webkit.org/show_bug.cgi?id=42811

        Adds cases where permission is niether denied or granted immediately and multiple
        requests are waiting.

        * fast/dom/Geolocation/delayed-permission-allowed-for-multiple-requests-expected.txt: Added.
        * fast/dom/Geolocation/delayed-permission-allowed-for-multiple-requests.html: Added.
        * fast/dom/Geolocation/delayed-permission-denied-for-multiple-requests-expected.txt: Added.
        * fast/dom/Geolocation/delayed-permission-denied-for-multiple-requests.html: Added.
        * fast/dom/Geolocation/script-tests/delayed-permission-allowed-for-multiple-requests.js: Added.
        (allowPermission):
        ():
        (maybeFinishTest):
        * fast/dom/Geolocation/script-tests/delayed-permission-denied-for-multiple-requests.js: Added.
        (denyPermission):
        (maybeFinishTest):
        * platform/gtk/Skipped:
        * platform/qt/Skipped:
2010-08-17  Mahesh Kulkarni  <mahesh.kulkarni@nokia.com>

        Reviewed by Steve Block.

        Geolocation preemptive permissions policy is buggy
        https://bugs.webkit.org/show_bug.cgi?id=42811

        While waiting for permission, m_startRequestPermissionNotifier was
        used to consider only one pending request. This patch implements a set
        m_pendingForPermissionNotifiers to maintain set of pending requests.
        When user grants/denies permission all listeners will be notified.
        Also fixed issue with hasZeroTimeout() where startTimerIfNeeded() has
        to start irrespective of permission state

        Tests: fast/dom/Geolocation/delayed-permission-allowed-for-multiple-requests.html
               fast/dom/Geolocation/delayed-permission-denied-for-multiple-requests.html

        * WebCore.pro:
        * page/Geolocation.cpp:
        (WebCore::Geolocation::startRequest):
        (WebCore::Geolocation::setIsAllowed):
        (WebCore::Geolocation::startUpdating):
        (WebCore::Geolocation::handlePendingPermissionNotifiers):
        * page/Geolocation.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65511 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/Geolocation/delayed-permission-allowed-for-multiple-requests-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/Geolocation/delayed-permission-allowed-for-multiple-requests.html [new file with mode: 0644]
LayoutTests/fast/dom/Geolocation/delayed-permission-denied-for-multiple-requests-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/Geolocation/delayed-permission-denied-for-multiple-requests.html [new file with mode: 0644]
LayoutTests/fast/dom/Geolocation/script-tests/delayed-permission-allowed-for-multiple-requests.js [new file with mode: 0644]
LayoutTests/fast/dom/Geolocation/script-tests/delayed-permission-denied-for-multiple-requests.js [new file with mode: 0644]
LayoutTests/platform/gtk/Skipped
LayoutTests/platform/qt/Skipped
WebCore/ChangeLog
WebCore/page/Geolocation.cpp
WebCore/page/Geolocation.h