1. 07 May, 2008 22 commits
  2. 06 May, 2008 18 commits
    • alice.liu@apple.com's avatar
      WebCore: · b4a81ff8
      alice.liu@apple.com authored
      2008-05-06  Alice Liu  <alice.liu@apple.com>
      
              Reviewed by Adele Peterson and John Sullivan.
      
              changes needed to build on Windows after r32911 and r32927
      
              * WebCore.vcproj/WebCore.vcproj:
              * page/AXObjectCache.cpp:
              (WebCore::AXObjectCache::selectedChildrenChanged):
              * page/AccessibilityObject.h:
              (WebCore::AccessibilityObject::document):
              (WebCore::AccessibilityObject::topDocumentFrameView):
              (WebCore::AccessibilityObject::documentFrameView):
              * page/AccessibilityRenderObject.cpp:
              (WebCore::AccessibilityRenderObject::document):
              (WebCore::AccessibilityRenderObject::topDocumentFrameView):
              (WebCore::AccessibilityRenderObject::documentFrameView):
              * page/AccessibilityRenderObject.h:
              * page/mac/AXObjectCacheMac.mm:
              * page/mac/AccessibilityObjectWrapper.mm:
              (-[AccessibilityObjectWrapper position]):
              (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
      
      WebKit/win:
      
      2008-05-06  Alice Liu  <alice.liu@apple.com>
      
              Reviewed by Adele Peterson and John Sullivan.
      
              changes needed to build on Windows after r32911 and r32927
      
              * AccessibleBase.cpp:
              (AccessibleBase::get_accParent):
              * AccessibleDocument.cpp:
              (AccessibleDocument::document):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32943 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b4a81ff8
    • beidson@apple.com's avatar
      2008-05-06 Brady Eidson <beidson@apple.com> · 5eb92b21
      beidson@apple.com authored
              Reviewed by Sam Weinig
      
              Fix a few bugs with the final sync'ing of LocalStorageAreas when the thread is shut down.
              1 - A sync task actually needs to be scheduled for each LocalStorageArea when the shut down occurs.
              2 - Pending sync timers all need to be cancelled.
      
              * storage/LocalStorage.cpp:
              (WebCore::LocalStorage::storageArea):
              (WebCore::LocalStorage::close): Tell each LocalStorageArea to schedule it's final sync before scheduling
                thread termination.
              * storage/LocalStorage.h:  Change the map to be of LocalStorageAreas instead of StorageAreas
      
              * storage/LocalStorageArea.cpp:
              (WebCore::LocalStorageArea::LocalStorageArea):
              (WebCore::LocalStorageArea::~LocalStorageArea): ASSERT the timer has been cancelled, but make SURE it is
                in release builds.
              (WebCore::LocalStorageArea::scheduleFinalSync): Cancel the sync timer, schedule the final sync, and set the
                "final sync scheduled" flag
              (WebCore::LocalStorageArea::scheduleItemForSync): ASSERT that the final sync hasn't already been scheduled
              (WebCore::LocalStorageArea::scheduleClear): Ditto
              * storage/LocalStorageArea.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32942 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5eb92b21
    • kevino@webkit.org's avatar
      wx build fix. Adding files added in r32925 to the bakefiles. · f8726c7b
      kevino@webkit.org authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32941 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f8726c7b
    • alp@webkit.org's avatar
      2008-05-06 Alp Toker <alp@nuanti.com> · d5431eaa
      alp@webkit.org authored
              GTK+ build fix. Add empty stub to keep non-accessible ports building.
      
              * page/AXObjectCache.h:
              (WebCore::AXObjectCache::selectedChildrenChanged):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32936 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d5431eaa
    • bdakin@apple.com's avatar
      2008-05-06 Beth Dakin <bdakin@apple.com> · 9a53a5fb
      bdakin@apple.com authored
              Reviewed by Darin.
      
              Fix for <rdar://problem/5907916> Implement 'aria-labeledby' and 
              'aria-describedby' attributes.
      
              * html/HTMLAttributeNames.in: Added new attributes. Added both the 
              British spelling (since that is what is specified in the spec), and 
              the American spelling (since the bug filer and I are two Americans 
              who keep spelling it the American way by accident). 
              * page/AccessibilityObject.cpp: Added empty wrappers. These 
              functions can't do anything meaningful without a renderer.
              (WebCore::AccessibilityObject::ariaAccessiblityName):
              (WebCore::AccessibilityObject::ariaLabeledByAttribute):
              (WebCore::AccessibilityObject::ariaDescribedByAttribute):
              * page/AccessibilityObject.h:
      
              Here is where the real work is done.
              * page/AccessibilityRenderObject.h:
              * page/AccessibilityRenderObject.cpp:
              (WebCore::accessibleNameForNode): Takes a node and finds its 
              contribution to the accessible name, as defined by the Mozilla ARIA 
              Implementer's Guide. 
              (WebCore::AccessibilityRenderObject::ariaAccessiblityName): Takes a 
              string of space-separated IDs, fetches the corresponding element 
              for each ID, and concatenates an accessible name based on the 
              elements.
              (WebCore::AccessibilityRenderObject::ariaLabeledByAttribute): 
              Retrieve the labeledby attribute and send its contents to 
              ariaAccessibilityName().
              (WebCore::AccessibilityRenderObject::title): Return the ARIA 
              labeledby value if one exists.
              (WebCore::AccessibilityRenderObject::ariaDescribedByAttribute): 
              Retrieve the describedby attribute and send its contents to 
              ariaAccessibilityName().
              (WebCore::AccessibilityRenderObject::accessibilityDescription): 
              Return the ARIA describedby attribute if one exists. 
      
              These are two bugs I spotted. 
              (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): Don't 
              ignore anything with an ARIA role.
              (WebCore::AccessibilityRenderObject::roleValue): Button tags maps 
              to ButtonRole.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9a53a5fb
    • andersca@apple.com's avatar
      Fix tyop · 9fb050e8
      andersca@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32934 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9fb050e8
    • andersca@apple.com's avatar
      2008-05-06 Anders Carlsson <andersca@apple.com> · 8f26ae45
      andersca@apple.com authored
              Reviewed by Brady.
      
              Support reading back app caches from the datbase.
          
              * loader/appcache/ApplicationCache.cpp:
              (WebCore::ApplicationCache::ApplicationCache):
              Initialize m_storageID to 0.
              
              * loader/appcache/ApplicationCacheGroup.cpp:
              (WebCore::ApplicationCacheGroup::cacheDestroyed):
              If the cache being destroyed is not the newest cache, it should no longer be 
              stored in the database. Remove it.
              
              (WebCore::ApplicationCacheGroup::setNewestCache):
              Don't store the cache here.
              
              (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
              Store it here instead.
              
              * loader/appcache/ApplicationCacheStorage.cpp:
              (WebCore::ApplicationCacheStorage::loadCacheGroup):
              New method that loads a cache group with a given manifest URL (or returns 0 if the load fails).
              
              (WebCore::ApplicationCacheStorage::findOrCreateCacheGroup):
              Search for the group in the database.
              
              (WebCore::ApplicationCacheStorage::loadManifestHostHashes):
              New method that loads the host hashes from the database.
              
              (WebCore::ApplicationCacheStorage::cacheGroupForURL):
              Search in the database for a cache that contains the resource.
              
              (WebCore::ApplicationCacheStorage::loadCache):
              New method that loads a cache with a given ID.
              
              (WebCore::ApplicationCacheStorage::remove):
              New method that removes a cache.
              
              * loader/appcache/ApplicationCacheStorage.h:
              Add definitions.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32933 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8f26ae45
    • alp@webkit.org's avatar
      2008-05-06 Alp Toker <alp@nuanti.com> · 848f7317
      alp@webkit.org authored
              Partial GTK+ build fix. Add files from r32925 to the build and replace
              'nil' return with 0.
      
              * GNUmakefile.am:
              * page/AccessibilityListBoxOption.cpp:
              (WebCore::AccessibilityListBoxOption::parentObject):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32932 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      848f7317
    • andersca@apple.com's avatar
      2008-05-06 Anders Carlsson <andersca@apple.com> · e13bca40
      andersca@apple.com authored
              Reviewed by Mitz.
      
              Add NPN_PopUpContextMenu example.
              
              * NetscapeCocoaPlugin/MenuHandler.h: Added.
              * NetscapeCocoaPlugin/MenuHandler.m: Added.
              (-[MenuHandler _openURL:]):
              (-[MenuHandler _disabledItem:]):
              (-[MenuHandler validateUserInterfaceItem:]):
              (-[MenuHandler initWithBrowserFuncs:instance:]):
              (-[MenuHandler dealloc]):
              (-[MenuHandler menu]):
              * NetscapeCocoaPlugin/NetscapeCocoaPlugin.xcodeproj/project.pbxproj:
              * NetscapeCocoaPlugin/main.m:
              (NPP_Destroy):
              (handleMouseEvent):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32931 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e13bca40
    • beidson@apple.com's avatar
      2008-05-06 Brady Eidson <beidson@apple.com> · 9b084d6d
      beidson@apple.com authored
              Reviewed by Anders
      
              Make LocalStorage persistent using a SQLite database.
      
              There's a few things going on here.  Whenever an item is changed, we add it to a set of
              "items to be sync'ed."  Instead of immediately scheduling the sync'ing on the background
              thread, we set a "sync timer" instead.  This is to shield against a series of rapid changes
              to avoid thread churn.
      
              When the sync timer fires, we move the "items to be sync'ed" set to a background thread set
              and schedule the sync task which is where the items are actually committed to disk.
      
              Current design for reading items back in from disk is to be as aggressive as possible.
              When a page first accesses it's LocalStorage area, we begin to import all items in from disk so
              they are immediately available.  A future enhancement will be to being this pre-fetching the
              moment we start loading a page when we know that page has LocalStorage.
      
              * storage/LocalStorageArea.cpp:
              (WebCore::LocalStorageArea::LocalStorageArea):
              (WebCore::LocalStorageArea::length): Return the length, or wait for the import to complete then return it.
              (WebCore::LocalStorageArea::key): Return the key, or wait for the import to complete then return it.
              (WebCore::LocalStorageArea::getItem): Return the item, or wait for the import to complete then return it.
              (WebCore::LocalStorageArea::setItem): Set the item, or hold the import lock and set it.  The second case is
                because if the item is set while the import is still in progress, the new value should override whatever
                the imported value is.
              (WebCore::LocalStorageArea::removeItem): Remove the item, or hold the import lock and remove it.  See the 
                explanation for setItem()
              (WebCore::LocalStorageArea::contains): Return whether or not the item is contained.  Do the same dance with
                the import flag, import lock, and import condition that the above methods do.
      
              (WebCore::LocalStorageArea::itemChanged): Schedule the item for sync'ing
              (WebCore::LocalStorageArea::itemRemoved): Schedule the removal of the item for sync'ing
              (WebCore::LocalStorageArea::areaCleared): Schedule the clear for sync'ing, and clear all previously 
                scheduled items.
      
              (WebCore::LocalStorageArea::scheduleItemForSync): Add an item to the sync set.
              (WebCore::LocalStorageArea::scheduleClear): Set a bool flag denoting "All items removed."  If any
                items are later set before the actual removal takes place, they will be written *after* the removal.
              (WebCore::LocalStorageArea::syncTimerFired): Move the current sync-set to the background thread sync set, then 
                schedule a sync task.  Also transfer the "items cleared" flag to the "background thread items cleared" flag
              (WebCore::LocalStorageArea::performImport): Import all items from disk, then signal the import complete.
              (WebCore::LocalStorageArea::markImported): Set the imported flag and signal the import complete
              (WebCore::LocalStorageArea::performSync): If the clear flag is set then drop all items.  Then update or delete 
                each item waiting to be sync'ed
              * storage/LocalStorageArea.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32930 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9b084d6d
    • beidson@apple.com's avatar
      2008-05-06 Brady Eidson <beidson@apple.com> · 34ce1a56
      beidson@apple.com authored
              Rubberstamped by Mitz Pettel RTL
      
              * storage/LocalStorage.cpp:
              (WebCore::LocalStorage::fullDatabaseFilename): Filename extensions for localstorage = all lowercase
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32929 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      34ce1a56
    • beidson@apple.com's avatar
      2008-05-06 Brady Eidson <beidson@apple.com> · 826f416a
      beidson@apple.com authored
              Reviewed by Darin, Sam Weinig, and Anders
      
              Preparation for upcoming work making LocalStorage persistent.
      
              The final step before code that actually does storage and retrieval of LocalStorage items.
      
              The LocalStorage set is responsible for controlling the path and filenames that individual
              LocalStorageAreas will use for their persistent store.  This adds the ability to return that
              filename.
      
              Also, add the scheduling methods that LocalStorageArea will use for importing and syncing 
              it's persistent items.
      
              * storage/LocalStorage.cpp:
              (WebCore::LocalStorage::storageArea):  Add some comments re: the future direction of this
                method once we actually do quota tracking.
              (WebCore::LocalStorage::fullDatabaseFilename):
              (WebCore::LocalStorage::scheduleImport):
              (WebCore::LocalStorage::scheduleSync):
              * storage/LocalStorage.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32928 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      826f416a
    • cfleizach@apple.com's avatar
    • cfleizach@apple.com's avatar
      <rdar://problem/5455287> AXWebArea should include AXURL · e5f4130c
      cfleizach@apple.com authored
      Now it does
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32926 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e5f4130c
    • alice.liu@apple.com's avatar
      2008-05-06 Alice Liu <alice.liu@apple.com> · d5e7aef8
      alice.liu@apple.com authored
              Rubber-stamped by Beth
              
              stab-in-the-dark attempt at fixing non-mac builds.
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCoreSources.bkl:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32925 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d5e7aef8
    • andersca@apple.com's avatar
      Whoops, I did not intend to commit this right now. · 47c2aab9
      andersca@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32924 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      47c2aab9
    • andersca@apple.com's avatar
      2008-05-06 Anders Carlsson <andersca@apple.com> · 41e5f292
      andersca@apple.com authored
              Reviewed by Adam.
      
              Only use the toplevel application cache when loading subframes.
      
              * loader/MainResourceLoader.cpp:
              (WebCore::MainResourceLoader::load):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32923 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      41e5f292
    • weinig@apple.com's avatar
      WebCore: · a184230c
      weinig@apple.com authored
      2008-05-06  Adam Barth  <abarth-webkit@adambarth.com>
      
              Reviewed by Sam Weinig.
      
              https://bugs.webkit.org/show_bug.cgi?id=18725
              Implement asynchronous postMessage.
              MessageEvent no longer bubbles as per r1237 in the HTML 5 working draft.
      
              Collin Jackson <collinj-webkit@collinjackson.com> also contributed to this patch.
      
              Test: http/tests/security/postMessage/delivery-order.html
      
              * dom/MessageEvent.cpp:
              (WebCore::MessageEvent::MessageEvent):
              * page/DOMWindow.cpp:
              (WebCore::PostMessageTimer::PostMessageTimer):
              (WebCore::PostMessageTimer::event):
              (WebCore::PostMessageTimer::targetOrigin):
              (WebCore::PostMessageTimer::fired):
              (WebCore::DOMWindow::postMessage):
              (WebCore::DOMWindow::postMessageTimerFired):
              * page/DOMWindow.h:
              * page/DOMWindow.idl:
      
      LayoutTests:
      
      2008-05-06  Adam Barth  <abarth-webkit@adambarth.com>
      
              Reviewed by Sam Weinig.
      
              https://bugs.webkit.org/show_bug.cgi?id=18725
              Update tests for asynchronous postMessage.
      
              Collin Jackson <collinj-webkit@collinjackson.com> also contributed to this patch.
      
              * http/tests/messaging/cross-domain-message-send.html:
              * http/tests/messaging/resources/cross-domain-message-receive.html:
              * http/tests/security/cross-frame-access-delete.html:
              * http/tests/security/cross-frame-access-history-put.html:
              * http/tests/security/cross-frame-access-location-put.html:
              * http/tests/security/postMessage/delivery-order-expected.txt: Added.
              * http/tests/security/postMessage/delivery-order.html: Added.
              * http/tests/security/postMessage/invalid-origin-throws-exception-expected.txt:
              * http/tests/security/postMessage/invalid-origin-throws-exception.html:
              * http/tests/security/postMessage/origin-unaffected-by-base-tag-expected.txt:
              * http/tests/security/postMessage/origin-unaffected-by-base-tag.html:
              * http/tests/security/postMessage/origin-unaffected-by-document-domain-expected.txt:
              * http/tests/security/postMessage/origin-unaffected-by-document-domain.html:
              * http/tests/security/postMessage/resources/javascript-post-message-sender.html:
              * http/tests/security/postMessage/resources/post-message-listener.html:
              * http/tests/security/postMessage/resources/recv.js: Added.
              * http/tests/security/postMessage/target-origin-expected.txt:
              * http/tests/security/postMessage/target-origin.html:
              * http/tests/security/resources/cross-frame-iframe-for-delete-test.html:
              * http/tests/security/resources/cross-frame-iframe-for-history-put-test.html:
              * http/tests/security/resources/cross-frame-iframe-for-location-put-test.html:
              * http/tests/security/resources/xss-eval3.html:
              * http/tests/security/xss-eval.html:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32922 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a184230c