1. 12 Aug, 2010 3 commits
    • aa@chromium.org's avatar
      2010-08-12 Aaron Boodman <aa@chromium.org> · c150aba7
      aa@chromium.org authored
              Reviewed by David Hyatt.
      
              Make the cascade level of "user" styles configurable
              https://bugs.webkit.org/show_bug.cgi?id=43457
      
              * WebCore.exp.in:
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::CSSStyleSelector):
              * dom/Document.cpp:
              (WebCore::Document::pageGroupUserSheets):
              * page/PageGroup.cpp:
              (WebCore::PageGroup::addUserStyleSheetToWorld):
              * page/PageGroup.h:
              * page/UserStyleSheet.h:
              (WebCore::UserStyleSheet::):
              (WebCore::UserStyleSheet::UserStyleSheet):
              (WebCore::UserStyleSheet::level):
      2010-08-12  Aaron Boodman  <aa@chromium.org>
      
              Reviewed by David Hyatt.
      
              Make the cascade level of "user" styles configurable
              https://bugs.webkit.org/show_bug.cgi?id=43457
      
              * src/WebViewImpl.cpp:
              (WebKit::WebView::addUserStyleSheet):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65273 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c150aba7
    • jorlow@chromium.org's avatar
      2010-08-12 Jeremy Orlow <jorlow@chromium.org> · 4b65837e
      jorlow@chromium.org authored
              Revert for now
              https://bugs.webkit.org/show_bug.cgi?id=43794
      
              * Android.mk:
              * CMakeLists.txt:
              * GNUmakefile.am:
              * WebCore.exp.in:
              * WebCore.gypi:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * page/GroupSettings.cpp: Removed.
              * page/GroupSettings.h: Removed.
              * page/PageGroup.cpp:
              (WebCore::PageGroup::PageGroup):
              (WebCore::PageGroup::localStorage):
              * page/PageGroup.h:
              * page/Settings.cpp:
              (WebCore::Settings::Settings):
              (WebCore::Settings::setLocalStorageQuota):
              (WebCore::Settings::setLocalStorageDatabasePath):
              * page/Settings.h:
              (WebCore::Settings::localStorageQuota):
              (WebCore::Settings::localStorageDatabasePath):
      2010-08-12  Jeremy Orlow  <jorlow@chromium.org>
      
              Revert for now
              https://bugs.webkit.org/show_bug.cgi?id=43794
      
              * WebView/WebView.mm:
              (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
              (-[WebView _preferencesChangedNotification:]):
      2010-08-12  Jeremy Orlow  <jorlow@chromium.org>
      
              Revert for now
              https://bugs.webkit.org/show_bug.cgi?id=43794
      
              * Api/qwebsettings.cpp:
              (QWebSettingsPrivate::apply):
      2010-08-12  Jeremy Orlow  <jorlow@chromium.org>
      
              Revert for now
              https://bugs.webkit.org/show_bug.cgi?id=43794
      
              * WebView.cpp:
              (WebView::initWithFrame):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65234 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4b65837e
    • jorlow@chromium.org's avatar
      2010-08-10 Jeremy Orlow <jorlow@chromium.org> · 09d1bc4d
      jorlow@chromium.org authored
              Reviewed by Adam Barth.
      
              Some settings are linked to the PageGroup not the Page.  Create a new class for those.
              https://bugs.webkit.org/show_bug.cgi?id=43794
      
              Since persistient storage is shared between pages, there's no way to modify
              some settings related to it on a per page basis.  As such, it's not technically
              correct for these settings to be on the Page's settings.  Create a new class
              called GroupSettings, move the 2 group-wide local storage settings there, and
              add a new setting for IndexedDB's path (which is prompting this change).
      
              No behavior has changed, so no tests.
      
              * Android.mk:
              * CMakeLists.txt:
              * GNUmakefile.am:
              * WebCore.exp.in:
              * WebCore.gypi:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * page/PageGroup.cpp:
              (WebCore::PageGroup::PageGroup):
              (WebCore::PageGroup::localStorage):
              * page/PageGroup.h:
              (WebCore::PageGroup::groupSettings):
              * page/Settings.cpp:
              (WebCore::Settings::Settings):
              (WebCore::Settings::setSessionStorageQuota):
              * page/Settings.h:
      2010-08-10  Jeremy Orlow  <jorlow@chromium.org>
      
              Reviewed by Adam Barth.
      
              Some settings are linked to the PageGroup not the Page.  Create a new class for those.
              https://bugs.webkit.org/show_bug.cgi?id=43794
      
              Change WebView to use the new GroupSettings class rather than Settings for the
              settings that moved.  This is sub-optimal since the settings aren't really
              per-view, but we can't really change the API at this point.
      
              * WebView/WebView.mm:
              (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
              (-[WebView _preferencesChangedNotification:]):
      2010-08-11  Jeremy Orlow  <jorlow@chromium.org>
      
              Reviewed by Adam Barth.
      
              Some settings are linked to the PageGroup not the Page.  Create a new class for those.
              https://bugs.webkit.org/show_bug.cgi?id=43794
      
              Change WebSettings to use the new GroupSettings class rather than Settings for the
              settings that moved.  This is sub-optimal since the settings aren't really
              per-view, but I don't see how we can change the API at this point.
      
              * Api/qwebsettings.cpp:
              (QWebSettingsPrivate::apply):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65228 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      09d1bc4d
  2. 11 Aug, 2010 2 commits
    • aa@chromium.org's avatar
      2010-08-11 Kenneth Russell <kbr@google.com> · 815a156a
      aa@chromium.org authored
              Reviewed by Dimitri Glazkov.
      
              Remove obsolete texImage2D and texSubImage2D entry points
              https://bugs.webkit.org/show_bug.cgi?id=40320
      
              No new tests; covered by existing WebGL tests.
      
              * html/canvas/WebGLRenderingContext.cpp:
              * html/canvas/WebGLRenderingContext.h:
              * html/canvas/WebGLRenderingContext.idl:
      2010-08-11  James Hawkins  <jhawkins@chromium.org>
      
              Reviewed by Dmitry Titov.
      
              [Chromium] Notify the WebFrameClient when the frame is detached from
              the view. This is used to clear the cached frame in the FormManager.
              Eventually this will be removed once handling forms is moved into
              WebCore.
              https://bugs.webkit.org/show_bug.cgi?id=43648
      
              * public/WebFrameClient.h:
              (WebKit::WebFrameClient::frameDetached):
              * src/FrameLoaderClientImpl.cpp:
              (WebKit::FrameLoaderClientImpl::detachedFromParent3):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65193 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      815a156a
    • aa@chromium.org's avatar
      2010-08-10 Aaron Boodman <aa@chromium.org> · 482b9633
      aa@chromium.org authored
              Reviewed by David Hyatt.
      
              Make the cascade level of "user" styles configurable
              https://bugs.webkit.org/show_bug.cgi?id=43457
      
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::CSSStyleSelector): Handle the case where user styles might have author level. Minor refactor.
              * dom/Document.cpp:
              (WebCore::Document::pageGroupUserSheets): Set isUserStyle on created stylesheet objects appropriately.
              * page/PageGroup.cpp:
              (WebCore::PageGroup::addUserStyleSheetToWorld): Add new optional "level" argument.
              * page/PageGroup.h: Ditto.
              * page/UserStyleSheet.h: Add level property.
              (WebCore::UserStyleSheet::):
              (WebCore::UserStyleSheet::UserStyleSheet):
              (WebCore::UserStyleSheet::setLevel):
              (WebCore::UserStyleSheet::level):
      2010-08-10  Aaron Boodman  <aa@chromium.org>
      
              Reviewed by David Hyatt.
      
              Make the cascade level of "user" styles configurable
              https://bugs.webkit.org/show_bug.cgi?id=43457
      
              * src/WebViewImpl.cpp:
              (WebKit::WebView::addUserStyleSheet): Send "author" for the css level of user styles.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65183 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      482b9633
  3. 03 Aug, 2010 1 commit
    • ap@apple.com's avatar
      Unreviewed (emergency test fix). · 85bfa4b2
      ap@apple.com authored
              REGRESSION (r64518): Most regression tests fail on ASSERT(shouldTrackVisitedLinks)
              on Snow Leopard.
      
              Platforms that use strategies now use a different code path than others, and that code path
              lacks necessary checks. We don't have a Snow Leopard debug buildbot.
      
              * page/PageGroup.cpp: (WebCore::PageGroup::addVisitedLinkHash): The private version of
              addVisitedLink() must not be called when we're not tracking visited links.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64535 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      85bfa4b2
  4. 02 Aug, 2010 1 commit
    • beidson@apple.com's avatar
      2010-08-02 Brady Eidson <beidson@apple.com> · 4a633ad7
      beidson@apple.com authored
              Reviewed by Anders Carlsson.
      
              Basic WK2 visited link coloring
              https://bugs.webkit.org/show_bug.cgi?id=43377
      
              No new tests. (No change in behavior)
      
              * WebCore.exp.in:
              
              * page/PageGroup.cpp:
              (WebCore::PageGroup::addVisitedLinkHash):
              * page/PageGroup.h:
      2010-08-02  Brady Eidson  <beidson@apple.com>
      
              Reviewed by Anders Carlsson.
      
              Basic WK2 visited link coloring
              https://bugs.webkit.org/show_bug.cgi?id=43377
      
              Add simple API that allows the WK2 app to add 1 visited link at a time.
              For now, this just pipes each individual LinkHash down to WebCore.
              
              * Shared/CoreIPCSupport/WebProcessMessageKinds.h:
              (WebProcessMessage::):
      
              * UIProcess/API/C/WKContext.cpp:
              (WKContextAddVisitedLink):
              * UIProcess/API/C/WKContext.h:
      
              * UIProcess/WebContext.cpp:
              (WebKit::WebContext::addVisitedLink):
              * UIProcess/WebContext.h:
      
              * WebProcess/WebProcess.cpp:
              (WebKit::WebProcess::addVisitedLinkHash):
              (WebKit::WebProcess::didReceiveMessage):
              * WebProcess/WebProcess.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64492 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4a633ad7
  5. 30 Jul, 2010 1 commit
    • andreip@google.com's avatar
      2010-07-26 Andrei Popescu <andreip@google.com> · f9fe235a
      andreip@google.com authored
              Reviewed by Jeremy Orlow.
      
              [IndexedDB] IndexedDatabase should be called IDBFactory.
              https://bugs.webkit.org/show_bug.cgi?id=42967
      
              Rename IndexedDatabase to IDBFactory to match the specification.
      
              Also implement the following new naming convention:
              IDBFoo IDL interfaces are implemented using IDBFoo C++ classes.
              IDBFoo objects have pointers to IDBFooBackendInterface objects.
              IDBFooBackendInterface is implemented by IDBFooBackendImpl and
              IDBFooBackendProxy (for Chromium).
      
              No new tests needed, just renaming.
      
              * Android.derived.jscbindings.mk:
              * Android.derived.v8bindings.mk:
              * Android.mk:
              * CMakeLists.txt:
              * DerivedSources.cpp:
              * DerivedSources.make:
              * GNUmakefile.am:
              * WebCore.gyp/WebCore.gyp:
              * WebCore.gypi:
              * WebCore.pri:
              * WebCore.pro:
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/js/JSIDBAnyCustom.cpp:
              (WebCore::toJS):
              * bindings/v8/custom/V8IDBAnyCustom.cpp:
              (WebCore::toV8):
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::clear):
              (WebCore::DOMWindow::indexedDB):
              * page/DOMWindow.h:
              * page/DOMWindow.idl:
              * page/PageGroup.cpp:
              (WebCore::PageGroup::idbFactory):
              * page/PageGroup.h:
              * platform/chromium/ChromiumBridge.h:
              * storage/IDBAny.cpp:
              (WebCore::IDBAny::idbFactory):
              (WebCore::IDBAny::set):
              * storage/IDBAny.h:
              (WebCore::IDBAny::):
              * storage/IDBDatabaseRequest.cpp:
              * storage/IDBFactory.cpp: Added.
              (WebCore::IDBFactory::IDBFactory):
              (WebCore::IDBFactory::~IDBFactory):
              (WebCore::IDBFactory::open):
              * storage/IDBFactory.h: Added.
              (WebCore::IDBFactory::create):
              * storage/IDBFactory.idl: Added.
              * storage/IDBFactoryBackendInterface.cpp: Added.
              (WebCore::IDBFactoryBackendInterface::create):
              * storage/IDBFactoryBackendInterface.h: Added.
              (WebCore::IDBFactoryBackendInterface::~IDBFactoryBackendInterface):
              * storage/IDBFactoryBackendImpl.cpp: Added.
              (WebCore::IDBFactoryBackendImpl::create):
              (WebCore::IDBFactoryBackendImpl::IDBFactoryBackendImpl):
              (WebCore::IDBFactoryBackendImpl::~IDBFactoryBackendImpl):
              (WebCore::IDBFactoryBackendImpl::open):
              * storage/IDBFactoryBackendImpl.h: Added.
              * storage/IDBKeyRange.cpp:
              (WebCore::IDBKeyRange::only):
              (WebCore::IDBKeyRange::leftBound):
              (WebCore::IDBKeyRange::rightBound):
              (WebCore::IDBKeyRange::bound):
              * storage/IDBKeyRange.h:
              * storage/IDBKeyRange.idl:
              * storage/IndexedDatabase.cpp: Removed.
              * storage/IndexedDatabase.h: Removed.
              * storage/IndexedDatabaseImpl.cpp: Removed.
              * storage/IndexedDatabaseImpl.h: Removed.
              * storage/IndexedDatabaseRequest.cpp: Removed.
              * storage/IndexedDatabaseRequest.h: Removed.
              * storage/IndexedDatabaseRequest.idl: Removed.
              * storage/chromium/IDBFactoryBackendInterface.cpp: Added.
              (WebCore::IDBFactoryBackendInterface::create):
              * storage/chromium/IndexedDatabase.cpp: Removed.
      2010-07-26  Andrei Popescu  <andreip@google.com>
      
              Reviewed by Jeremy Orlow.
      
              [IndexedDB] IndexedDatabase should be called IDBFactory.
              https://bugs.webkit.org/show_bug.cgi?id=42967
      
              * WebKit.gyp:
              * public/WebIDBFactory.h: Added.
              (WebKit::WebIDBFactory::~WebIDBFactory):
              (WebKit::WebIDBFactory::databases):
              (WebKit::WebIDBFactory::open):
              * public/WebIndexedDatabase.h: Removed.
              * public/WebKitClient.h:
              (WebKit::WebKitClient::idbFactory):
              * src/ChromiumBridge.cpp:
              (WebCore::ChromiumBridge::idbFactory):
              * src/IDBFactoryBackendProxy.cpp: Added.
              (WebCore::IDBFactoryBackendProxy::create):
              (WebCore::IDBFactoryBackendProxy::IDBFactoryBackendProxy):
              (WebCore::IDBFactoryBackendProxy::~IDBFactoryBackendProxy):
              (WebCore::IDBFactoryBackendProxy::open):
              * src/IDBFactoryBackendProxy.h: Added.
              * src/IndexedDatabaseProxy.cpp: Removed.
              * src/IndexedDatabaseProxy.h: Removed.
              * src/WebIDBFactoryImpl.cpp: Added.
              (WebKit::WebIDBFactory::create):
              (WebKit::WebIDBFactoryImpl::WebIDBFactoryImpl):
              (WebKit::WebIDBFactoryImpl::~WebIDBFactoryImpl):
              (WebKit::WebIDBFactoryImpl::open):
              * src/WebIDBFactoryImpl.h: Added.
              * src/WebIndexedDatabaseImpl.cpp: Removed.
              * src/WebIndexedDatabaseImpl.h: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64344 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f9fe235a
  6. 13 Jul, 2010 1 commit
  7. 08 Jul, 2010 1 commit
    • aa@chromium.org's avatar
      2010-07-08 Aaron Boodman <aa@chromium.org> · 509c1c3d
      aa@chromium.org authored
              Reviewed by Timothy Hatcher.
      
              Add the ability for user scripts and user styles to affect just the top frame.
      
              https://bugs.webkit.org/show_bug.cgi?id=41529
      
              * platform/win/Skipped: Skipped test because WebKit API needs updating.
              * userscripts/mixed-case-stylesheet.html: Added new allFrames param.
              * userscripts/resources/frame1.html: Added.
              * userscripts/resources/frame2.html: Added.
              * userscripts/script-not-run-for-fragments.html: Added new allFrames param.
              * userscripts/script-run-at-end.html: Ditto.
              * userscripts/script-run-at-start.html: Ditto.
              * userscripts/simple-stylesheet.html: Ditto.
              * userscripts/user-script-all-frames-expected.txt: Added.
              * userscripts/user-script-all-frames.html: Added.
              * userscripts/user-script-top-frame-only-expected.txt: Added.
              * userscripts/user-script-top-frame-only.html: Added.
              * userscripts/user-style-all-frames-expected.txt: Added.
              * userscripts/user-style-all-frames.html: Added.
              * userscripts/user-style-top-frame-only-expected.txt: Added.
              * userscripts/user-style-top-frame-only.html: Added.
      2010-07-08  Aaron Boodman  <aa@chromium.org>
      
              Reviewed by Timothy Hatcher.
      
              Add the ability for user scripts and user styles to affect just the top frame.
      
              https://bugs.webkit.org/show_bug.cgi?id=41529
      
              Tests: userscripts/user-script-all-frames.html
                     userscripts/user-script-top-frame-only.html
                     userscripts/user-style-all-frames.html
                     userscripts/user-style-top-frame-only.html
      
              * WebCore.base.exp: Update PageGroup method signatures.
              * dom/Document.cpp:
              (WebCore::Document::pageGroupUserSheets): Check allFrames before injecting.
              * page/Frame.cpp:
              (WebCore::Frame::injectUserScriptsForWorld): Ditto.
              * page/PageGroup.cpp:
              (WebCore::PageGroup::addUserScriptToWorld):
              (WebCore::PageGroup::addUserStyleSheetToWorld):
              * page/PageGroup.h:
              * page/UserScript.h:
              (WebCore::UserScript::UserScript):
              (WebCore::UserScript::injectedFrames):
              * page/UserScriptTypes.h:
              (WebCore::):
              * page/UserStyleSheet.h:
              (WebCore::UserStyleSheet::UserStyleSheet):
              (WebCore::UserStyleSheet::injectedFrames):
      2010-07-08  Aaron Boodman  <aa@chromium.org>
      
              Reviewed by Timothy Hatcher.
      
              Add the ability for user scripts and user styles to affect just the top frame.
      
              https://bugs.webkit.org/show_bug.cgi?id=41529
      
              * public/WebView.h:
              (WebKit::WebView::):
              (WebKit::WebView::addUserScript):
              (WebKit::WebView::addUserStyleSheet):
              * src/AssertMatchingEnums.cpp:
              * src/WebViewImpl.cpp:
              (WebKit::WebView::addUserScript):
              (WebKit::WebView::addUserStyleSheet):
      2010-07-08  Aaron Boodman  <aa@chromium.org>
      
              Reviewed by Timothy Hatcher.
      
              Add the ability for user scripts and user styles to affect just the top frame.
      
              https://bugs.webkit.org/show_bug.cgi?id=41529
      
              * WebView/WebView.mm:
              (+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:]):
              (+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:injectedFrames:]):
              (+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:]):
              (+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:injectedFrames:]):
              * WebView/WebViewPrivate.h:
      2010-07-08  Aaron Boodman  <aa@chromium.org>
      
              Reviewed by Timothy Hatcher.
      
              Add the ability for user scripts and user styles to affect just the top frame.
      
              https://bugs.webkit.org/show_bug.cgi?id=41529
      
              * WebView.cpp:
              (WebView::addUserScriptToGroup):
              (WebView::addUserStyleSheetToGroup):
      2010-07-08  Aaron Boodman  <aa@chromium.org>
      
              Reviewed by Timothy Hatcher.
      
              Add the ability for user scripts and user styles to affect just the top frame.
      
              https://bugs.webkit.org/show_bug.cgi?id=41529
      
              * DumpRenderTree/LayoutTestController.h: Added new allFrames param.
              * DumpRenderTree/LayoutTestController.cpp: Ditto.
              (addUserScriptCallback):
              (addUserStyleSheetCallback):
              * DumpRenderTree/chromium/LayoutTestController.cpp: Ditto.
              (LayoutTestController::addUserScript):
              (LayoutTestController::addUserStyleSheet):
              * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: Ditto.
              (LayoutTestController::addUserScript):
              (LayoutTestController::addUserStyleSheet):
              * DumpRenderTree/mac/LayoutTestControllerMac.mm: Ditto.
              (LayoutTestController::addUserScript):
              (LayoutTestController::addUserStyleSheet):
              * DumpRenderTree/win/LayoutTestControllerWin.cpp: Ditto.
              (LayoutTestController::addUserScript):
              (LayoutTestController::addUserStyleSheet):
              * DumpRenderTree/wx/LayoutTestControllerWx.cpp: Ditto.
              (LayoutTestController::addUserScript):
              (LayoutTestController::addUserStyleSheet):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62876 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      509c1c3d
  8. 30 Mar, 2010 1 commit
    • jorlow@chromium.org's avatar
      2010-03-29 Jeremy Orlow <jorlow@chromium.org> · 2087744b
      jorlow@chromium.org authored
              Reviewed by Darin Fisher.
      
              More IndexedDB work
              https://bugs.webkit.org/show_bug.cgi?id=36770
      
              Add the "singleton" IndexedDatabase object to PageGroup
              IndexedDatabase now has a create() method since PageGroup can own the instance (at least for now)
              Rip out the IDBRequest stuff (now obsolete).
              DOMWindow now can instantiate indexedDatabase objects on demand.
      
              New layout tests starting with the next patch (which should make indexedDB.open() "work").
      
              * WebCore.gypi:
              * bindings/v8/custom/V8IDBRequestCustom.cpp: Removed.
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::indexedDB):
              * page/DOMWindow.h:
              * page/PageGroup.cpp:
              (WebCore::PageGroup::indexedDatabase):
              * page/PageGroup.h:
              * storage/IDBDatabase.cpp:
              * storage/IDBDatabaseRequest.h:
              (WebCore::IDBDatabaseRequest::createObjectStore):
              * storage/IDBDatabaseRequest.idl:
              * storage/IDBRequest.cpp: Removed.
              * storage/IDBRequest.h: Removed.
              * storage/IDBRequest.idl: Removed.
              * storage/IndexedDatabase.cpp:
              (WebCore::IndexedDatabase::create):
              * storage/IndexedDatabase.h:
              * storage/IndexedDatabaseImpl.cpp:
              (WebCore::IndexedDatabaseImpl::create):
              (WebCore::IndexedDatabaseImpl::IndexedDatabaseImpl):
              (WebCore::IndexedDatabaseImpl::~IndexedDatabaseImpl):
              * storage/IndexedDatabaseImpl.h:
              * storage/IndexedDatabaseRequest.cpp:
              (WebCore::IndexedDatabaseRequest::IndexedDatabaseRequest):
              * storage/IndexedDatabaseRequest.h:
              (WebCore::IndexedDatabaseRequest::create):
              * storage/IndexedDatabaseRequest.idl:
              * storage/chromium/IndexedDatabase.cpp:
              (WebCore::IndexedDatabase::create):
      2010-03-29  Jeremy Orlow  <jorlow@chromium.org>
      
              Reviewed by Darin Fisher.
      
              More IndexedDB work
              https://bugs.webkit.org/show_bug.cgi?id=36770
      
              Start the implementation of WebIndexedDatabase (for entrance back into WebKit).
      
              * WebKit.gyp:
              * public/WebIndexedDatabase.h:
              * src/WebIndexedDatabaseImpl.cpp: Added.
              (WebKit::WebIndexedDatabase::create):
              (WebKit::WebIndexedDatabaseImpl::~WebIndexedDatabaseImpl):
              (WebKit::WebIndexedDatabaseImpl::open):
              * src/WebIndexedDatabaseImpl.h: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@56777 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2087744b
  9. 03 Feb, 2010 2 commits
  10. 18 Dec, 2009 1 commit
    • aroben@apple.com's avatar
      Reduce #includes in a few high-use headers · a7c639a8
      aroben@apple.com authored
      Removed unnecessary #includes in these headers:
        - Frame.h
        - FrameWin.h
        - Node.h
        - Page.h
        - StringImpl.h
      
      The rest of the patch is all adding #includes to source files that now
      require them.
      
      Fixes <http://webkit.org/b/32718>.
      
      Rubber-stamped by Anders Carlsson.
      
      WebCore:
      
      * dom/Node.h:
      * page/Frame.h:
      * page/Page.h:
      * page/win/FrameWin.h:
      * platform/text/StringImpl.h:
      Removed unnecessary #includes.
      
      * accessibility/win/AXObjectCacheWin.cpp:
      * bindings/js/JSDOMWindowBase.cpp:
      * bindings/js/JSDOMWindowCustom.cpp:
      * dom/Document.cpp:
      * dom/InputElement.cpp:
      * dom/Node.cpp:
      * dom/SelectElement.cpp:
      * editing/EditorCommand.cpp:
      * html/HTMLFormControlElement.cpp:
      * html/HTMLFormElement.cpp:
      * html/HTMLMediaElement.cpp:
      * html/HTMLParser.cpp:
      * html/HTMLTextAreaElement.cpp:
      * html/HTMLVideoElement.cpp:
      * inspector/InspectorController.cpp:
      * loader/FrameLoader.cpp:
      * loader/HistoryController.cpp:
      * loader/appcache/ApplicationCacheGroup.cpp:
      * page/Console.cpp:
      * page/EventHandler.cpp:
      * page/Frame.cpp:
      * page/FrameView.cpp:
      * page/Navigator.cpp:
      * page/PageGroup.cpp:
      * page/Settings.cpp:
      * page/mac/EventHandlerMac.mm:
      * platform/KURL.h:
      * platform/ScrollbarThemeComposite.cpp:
      * platform/cf/BinaryPropertyList.cpp:
      * platform/graphics/mac/GraphicsLayerCA.h:
      * platform/graphics/win/WKCACFLayerRenderer.cpp:
      * platform/mac/PopupMenuMac.mm:
      * platform/mac/WidgetMac.mm:
      * platform/network/cf/DNSCFNet.cpp:
      * platform/text/StringImpl.cpp:
      * platform/win/FileSystemWin.cpp:
      * platform/win/PlatformScreenWin.cpp:
      * platform/win/PopupMenuWin.cpp:
      * platform/win/WidgetWin.cpp:
      * plugins/PluginView.cpp:
      * plugins/win/PluginViewWin.cpp:
      * rendering/InlineTextBox.cpp:
      * rendering/RenderBox.cpp:
      * rendering/RenderFileUploadControl.cpp:
      * rendering/RenderInline.cpp:
      * rendering/RenderLayerCompositor.cpp:
      * rendering/RenderObject.cpp:
      * rendering/RootInlineBox.cpp:
      * storage/DatabaseTracker.cpp:
      * storage/DatabaseTracker.h:
      * storage/SQLTransactionClient.cpp:
      * svg/graphics/SVGImage.cpp:
      Added now-needed #includes.
      
      WebKit/mac:
      
      Add #includes needed after WebCore clean-up
      
      * WebView/WebFrame.mm:
      * WebView/WebFrameView.mm:
      * WebView/WebView.mm:
      
      WebKit/win:
      
      Add #includes needed after WebCore clean-up
      
      * WebCoreSupport/WebContextMenuClient.cpp:
      * WebDataSource.cpp:
      * WebHTMLRepresentation.cpp:
      * WebView.cpp:
      * WebView.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a7c639a8
  11. 12 Nov, 2009 1 commit
    • aroben@apple.com's avatar
      Replace worldIDs with world objects · f6cbb76a
      aroben@apple.com authored
      Part of <http://webkit.org/b/31414> Implement new SPI for dealing with
      user scripts/stylesheets and isolated worlds
      
      Reviewed by Sam Weinig.
      
      WebCore:
      
      Covered by existing tests.
      
      * WebCore.base.exp: Update exported symbols to match what now exists
      and is needed by WebKit.
      
      * bindings/js/ScheduledAction.cpp:
      (WebCore::ScheduledAction::execute): Updated for function rename.
      
      * bindings/js/ScriptController.cpp: Removed code that dealt with
      worldIDs.
      (WebCore::ScriptController::createWorld): Added. Returns a new world
      suitable for use on the main thread.
      (WebCore::ScriptController::executeScriptInWorld): Renamed from
      executeScriptInIsolatedWorld, since this works just fine with a
      "normal" world.
      
      * bindings/js/ScriptController.h: Added createWorld, removed functions
      that took worldIDs, renamed executeScriptInIsolatedWorld to
      executeScriptInWorld.
      
      * page/Frame.cpp:
      (WebCore::Frame::injectUserScripts):
      (WebCore::Frame::injectUserScriptsForWorld):
      Updated for changes to UserScriptMap and ScriptController.
      
      * page/Frame.h: Changed injectUserScriptsForWorld to take a
      DOMWrapperWorld* instead of a worldID.
      
      * page/PageGroup.cpp:
      (WebCore::PageGroup::addUserScriptToWorld):
      (WebCore::PageGroup::addUserStyleSheetToWorld):
      (WebCore::PageGroup::removeUserScriptFromWorld):
      (WebCore::PageGroup::removeUserStyleSheetFromWorld):
      (WebCore::PageGroup::removeUserScriptsFromWorld):
      (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
      * page/PageGroup.h:
      Changed these functions to take a DOMWrapperWorld* instead of a
      worldID. Also updated for changes to UserScript and UserStyleSheet.
      
      * page/UserScript.h:
      * page/UserStyleSheet.h: Changed not to hold a worldID, since it was
      never used.
      
      * page/UserScriptTypes.h:
      * page/UserStyleSheetTypes.h: Changed UserScriptMap and
      UserStyleSheetMap to use a RefPtr<DOMWrapperWorld> instead of a
      worldID as their key type.
      
      WebKit:
      
      * WebKit.xcodeproj/project.pbxproj: Added WebScriptWorld to the project.
      
      WebKit/mac:
      
      WebScriptWorld is the new object that represents a world.  The only
      place worldID is still used is in -[WebFrame
      _stringByEvaluatingJavaScriptInIsolatedWorld:WithGlobalObject:FromString:],
      but that will change soon.
      
      * WebKit.exp: Export WebScriptWorld.
      
      * WebView/WebFrame.mm:
      (-[WebFrame _stringByEvaluatingJavaScriptInIsolatedWorld:WithGlobalObject:FromString:]):
      Moved the bizarre world caching/creation logic that DRT depends on
      here from the findWorld function in ScriptController.cpp. Updated to
      use ScriptController::executeScriptInWorld instead of
      ScriptController::executeScriptInIsolatedWorld.
      (-[WebFrame _contextForWorld:]): Renamed from contextForWorldID:. Now
      takes a WebScriptWorld.
      
      * WebView/WebFramePrivate.h: Replaced contextForWorldID: with
      _contextForWorld:.
      
      * WebView/WebScriptWorld.h: Added.
      * WebView/WebScriptWorld.mm: Added.
      (-[WebScriptWorld initWithWorld:]): Store the passed-in world in our
      _private member.
      (-[WebScriptWorld init]): Create a new DOMWrapperWorld and pass it to
      -initWithWorld:.
      (-[WebScriptWorld dealloc]): Release _private.
      (+[WebScriptWorld standardWorld]): Returns a shared instance that
      represents WebCore's mainThreadNormalWorld().
      (+[WebScriptWorld world]): Returns a new instance.
      (core): Returns the DOMWrapperWorld for this WebScriptWorld.
      
      * WebView/WebScriptWorldInternal.h: Added.
      
      * WebView/WebView.mm:
      (+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:]):
      (+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:]):
      (+[WebView _removeUserScriptFromGroup:world:url:]):
      (+[WebView _removeUserStyleSheetFromGroup:world:url:]):
      (+[WebView _removeUserScriptsFromGroup:world:]):
      (+[WebView _removeUserStyleSheetsFromGroup:world:]):
      * WebView/WebViewPrivate.h:
      Changed these functions to take a WebScriptWorld instead of a worldID.
      
      WebKit/win:
      
      WebScriptWorld is the new object that represents a world.  The only
      place worldID is still used is in
      IWebFramePrivate::stringByEvaluatingJavaScriptInIsolatedWorld, but
      that will change soon.
      
      * ForEachCoClass.h: Added WebScriptWorld.
      
      * Interfaces/IWebFramePrivate.idl: Replaced contextForWorldID with
      contextForWorld.
      
      * Interfaces/IWebScriptWorld.idl: Added.
      
      * Interfaces/IWebViewPrivate.idl: Changed the user script/stylesheet
      functions to take an IWebScriptWorld instead of a worldID.
      
      * Interfaces/WebKit.idl: Added WebScriptWorld.
      
      * WebFrame.cpp:
      (WebFrame::contextForWorld): Renamed from contextForWorldID. Now takes
      an IWebScriptWorld.
      (WebFrame::stringByEvaluatingJavaScriptInIsolatedWorld): Moved the
      bizarre world caching/creation logic that DRT depends on here from the
      findWorld function in ScriptController.cpp. Updated to use
      ScriptController::executeScriptInWorld instead of
      ScriptController::executeScriptInIsolatedWorld.
      
      * WebFrame.h: Replaced contextForWorldID with contextForWorld.
      
      * WebScriptWorld.cpp: Added.
      (WebScriptWorld::WebScriptWorld):
      (WebScriptWorld::~WebScriptWorld):
      (WebScriptWorld::createInstance):
      (WebScriptWorld::AddRef):
      (WebScriptWorld::Release):
      (WebScriptWorld::QueryInterface):
      Standard COM class implementations.
      
      (WebScriptWorld::standardWorld): Returns a shared instance that represents
      WebCore's mainThreadNormalWorld().
      
      * WebScriptWorld.h: Added.
      (WebScriptWorld::world): Simple getter.
      
      * WebKit.vcproj/Interfaces.vcproj: Added IWebScriptWorld.idl.
      
      * WebKit.vcproj/WebKit.vcproj: Added WebScriptWorld.
      
      * WebKitClassFactory.cpp: Added WebScriptWorld.
      
      * WebView.cpp:
      (WebView::addUserScriptToGroup):
      (WebView::addUserStyleSheetToGroup):
      (WebView::removeUserScriptFromGroup):
      (WebView::removeUserStyleSheetFromGroup):
      (WebView::removeUserScriptsFromGroup):
      (WebView::removeUserStyleSheetsFromGroup):
      * WebView.h:
      Changed these functions to take an IWebScriptWorld instead of a worldID.
      
      WebKitTools:
      
      * DumpRenderTree/mac/LayoutTestControllerMac.mm:
      (LayoutTestController::addUserScript):
      (LayoutTestController::addUserStyleSheet):
      * DumpRenderTree/win/LayoutTestControllerWin.cpp:
      (LayoutTestController::addUserScript):
      (LayoutTestController::addUserStyleSheet):
      Changed these functions to create a new WebJSWorld each time they're
      called and to pass that world to WebKit.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f6cbb76a
  12. 13 Oct, 2009 1 commit
    • hyatt@apple.com's avatar
      WebCore: Change the order of arguments on some of the user stylesheet/script... · 844f6fef
      hyatt@apple.com authored
      WebCore: Change the order of arguments on some of the user stylesheet/script functions.  Split the removal functions
      out into separate ones for scripts and stylesheets.
      
      Reviewed by Adam Roben.
      
      * WebCore.base.exp:
      * page/PageGroup.cpp:
      (WebCore::PageGroup::addUserScriptToWorld):
      (WebCore::PageGroup::addUserStyleSheetToWorld):
      (WebCore::PageGroup::removeUserScriptFromWorld):
      (WebCore::PageGroup::removeUserStyleSheetFromWorld):
      (WebCore::PageGroup::removeUserScriptsFromWorld):
      (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
      * page/PageGroup.h:
      (WebCore::PageGroup::userScripts):
      (WebCore::PageGroup::userStyleSheets):
      
      WebKit/mac: Change the order of arguments on some methods.  Split removal for user stylesheets and script into
      separate functions based off the type of object being removed.
      
      Reviewed by Adam Roben.
      
      * WebView/WebView.mm:
      (+[WebView _addUserScriptToGroup:worldID:source:url:whitelist:blacklist:injectionTime:]):
      (+[WebView _addUserStyleSheetToGroup:worldID:source:url:whitelist:blacklist:]):
      (+[WebView _removeUserScriptFromGroup:worldID:url:]):
      (+[WebView _removeUserStyleSheetFromGroup:worldID:url:]):
      (+[WebView _removeUserScriptsFromGroup:worldID:]):
      (+[WebView _removeUserStyleSheetsFromGroup:worldID:]):
      * WebView/WebViewPrivate.h:
      
      WebKit/win: Split removal functions for user scripts and stylehseets based on type.
      
      Reviewed by Adam Roben..
      
      * Interfaces/IWebViewPrivate.idl:
      * WebView.cpp:
      (WebView::removeUserScriptFromGroup):
      (WebView::removeUserStyleSheetFromGroup):
      * WebView.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49541 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      844f6fef
  13. 02 Oct, 2009 2 commits
    • jorlow@chromium.org's avatar
      2009-10-02 Jeremy Orlow <jorlow@chromium.org> · f9c57a32
      jorlow@chromium.org authored
              Reviewed by Dimitri Glazkov.
      
              Implement per-storage-area quotas for LocalStorage
              https://bugs.webkit.org/show_bug.cgi?id=29991
      
              I put 90% of the code in StorageMap since the decision to allow an update is
              closely tied to quota tracking.  The quota is set via a page's Settings class.
              Like with the local storage path and whether it's enabled, it's assumed that
              all pages in the same group will have the same settings.  The setting defaults
              to 5mb which is what the spec suggests, but it can easily be changed to
              anything else--including StorageMap::noQuota.  Any values in LocalStorage are
              grandfathered in regarudless of quota, so importItem only tracks (and will
              never block) imports.
      
              I believe this change is a good transition to more complex quota management.
              For example, if we wanted to track quotas in the SQLite DB, then we'd just add
              a function to the StorageMap that sets the quota.  This would be fine since all
              use of LocalStorage is blocked on the import completing, so you'd never hit a
              quota error in the mean time.  Also, if embedders wanted to ask the user
              whether to expand the quota whenever it's hit (before deciding whether or not
              to raise an exception), a callback via the chrome client should be fairly easy.
              That said, I think it's best to add these features in steps rather than one
              huge patch.  (Both of these are on my TODO list, btw.)
      
              Included is a layout test that verifies the behavior.  It assumes the default
              quota is 5mb (since that's what Settings defaults to).
      
              Test: storage/domstorage/localstorage/quota.html
      
              * page/PageGroup.cpp:
              (WebCore::PageGroup::localStorage):
              * page/Settings.cpp:
              (WebCore::Settings::Settings):
              (WebCore::Settings::setLocalStorageQuota):
              * page/Settings.h:
              (WebCore::Settings::localStorageQuota):
              * storage/StorageAreaImpl.cpp:
              (WebCore::StorageAreaImpl::create):
              (WebCore::StorageAreaImpl::StorageAreaImpl):
              (WebCore::StorageAreaImpl::setItem):
              (WebCore::StorageAreaImpl::clear):
              * storage/StorageAreaImpl.h:
              * storage/StorageMap.cpp:
              (WebCore::StorageMap::create):
              (WebCore::StorageMap::StorageMap):
              (WebCore::StorageMap::copy):
              (WebCore::StorageMap::setItem):
              (WebCore::StorageMap::removeItem):
              (WebCore::StorageMap::importItem):
              * storage/StorageMap.h:
              (WebCore::StorageMap::quota):
              * storage/StorageNamespace.cpp:
              (WebCore::StorageNamespace::localStorageNamespace):
              * storage/StorageNamespace.h:
              * storage/StorageNamespaceImpl.cpp:
              (WebCore::StorageNamespaceImpl::localStorageNamespace):
              (WebCore::StorageNamespaceImpl::sessionStorageNamespace):
              (WebCore::StorageNamespaceImpl::StorageNamespaceImpl):
              (WebCore::StorageNamespaceImpl::copy):
              (WebCore::StorageNamespaceImpl::storageArea):
              * storage/StorageNamespaceImpl.h:
      2009-10-02  Jeremy Orlow  <jorlow@chromium.org>
      
              Reviewed by Dimitri Glazkov.
      
              Implement per-storage-area quotas for LocalStorage
              https://bugs.webkit.org/show_bug.cgi?id=29991
      
              I put 90% of the code in StorageMap since the decision to allow an update is
              closely tied to quota tracking.  The quota is set via a page's Settings class. 
              Like with the local storage path and whether it's enabled, it's assumed that
              all pages in the same group will have the same settings.  The setting defaults
              to 5mb which is what the spec suggests, but it can easily be changed to
              anything else--including StorageMap::noQuota.  Any values in LocalStorage are
              grandfathered in regarudless of quota, so importItem only tracks (and will
              never block) imports.
      
              I believe this change is a good transition to more complex quota management. 
              For example, if we wanted to track quotas in the SQLite DB, then we'd just add
              a function to the StorageMap that sets the quota.  This would be fine since all
              use of LocalStorage is blocked on the import completing, so you'd never hit a
              quota error in the mean time.  Also, if embedders wanted to ask the user
              whether to expand the quota whenever it's hit (before deciding whether or not
              to raise an exception), a callback via the chrome client should be fairly easy.
              That said, I think it's best to add these features in steps rather than one
              huge patch.  (Both of these are on my TODO list, btw.)
      
              Included is a layout test that verifies the behavior.  It assumes the default
              quota is 5mb (since that's what Settings defaults to).
      
              * storage/domstorage/localstorage/quota-expected.txt: Added.
              * storage/domstorage/localstorage/quota.html: Added.
              * storage/domstorage/script-tests/quota.js: Added.
              (runTest):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49040 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f9c57a32
    • hyatt@apple.com's avatar
      Add support for blacklist patterns to user stylesheets and scripts in addition... · 19fd5912
      hyatt@apple.com authored
      Add support for blacklist patterns to user stylesheets and scripts in addition to whitelist patterns.
      
      Reviewed by Adam Roben.
      
      WebCore: 
      
      * WebCore.base.exp:
      * dom/Document.cpp:
      (WebCore::Document::pageGroupUserSheets):
      * page/Frame.cpp:
      (WebCore::Frame::injectUserScriptsForWorld):
      * page/PageGroup.cpp:
      (WebCore::PageGroup::addUserScript):
      (WebCore::PageGroup::addUserStyleSheet):
      (WebCore::PageGroup::removeUserContentWithURLForWorld):
      (WebCore::PageGroup::removeUserContentForWorld):
      * page/PageGroup.h:
      * page/UserContentURLPattern.cpp:
      (WebCore::UserContentURLPattern::matchesPatterns):
      * page/UserContentURLPattern.h:
      * page/UserScript.h:
      (WebCore::UserScript::UserScript):
      (WebCore::UserScript::whitelist):
      (WebCore::UserScript::blacklist):
      * page/UserStyleSheet.h:
      (WebCore::UserStyleSheet::UserStyleSheet):
      (WebCore::UserStyleSheet::whitelist):
      (WebCore::UserStyleSheet::blacklist):
      
      WebKit/mac: 
      
      * WebView/WebView.mm:
      (toStringVector):
      (+[WebView _addUserScriptToGroup:source:url:worldID:whitelist:blacklist:injectionTime:]):
      (+[WebView _addUserStyleSheetToGroup:source:url:worldID:whitelist:blacklist:]):
      * WebView/WebViewPrivate.h:
      
      WebKit/win: 
      
      * Interfaces/IWebViewPrivate.idl:
      * WebView.cpp:
      (toStringVector):
      (WebView::addUserScriptToGroup):
      (WebView::addUserStyleSheetToGroup):
      * WebView.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49033 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      19fd5912
  14. 30 Sep, 2009 2 commits
  15. 09 Sep, 2009 1 commit
    • hyatt@apple.com's avatar
      WebCore: https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user... · 63e0ac2f
      hyatt@apple.com authored
      WebCore: https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user stylesheet injection.  This is similar
      to user script injection but allows for user stylesheets to be added.  The stylesheets are applied immediately
      to all Frames in the PageGroup.
      
      Reviewed by Adam Roben.
      
      Added userscripts/simple-stylesheet.html test case.
      
      * WebCore.base.exp:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * css/CSSStyleSelector.cpp:
      (WebCore::CSSStyleSelector::CSSStyleSelector):
      * css/CSSStyleSelector.h:
      * dom/Document.cpp:
      (WebCore::Document::Document):
      (WebCore::Document::attach):
      (WebCore::Document::pageGroupUserSheets):
      (WebCore::Document::clearPageGroupUserSheets):
      (WebCore::Document::recalcStyleSelector):
      * dom/Document.h:
      * loader/PlaceholderDocument.cpp:
      (WebCore::PlaceholderDocument::attach):
      * page/PageGroup.cpp:
      (WebCore::PageGroup::addUserStyleSheet):
      (WebCore::PageGroup::removeUserContentForWorld):
      (WebCore::PageGroup::removeAllUserContent):
      * page/PageGroup.h:
      (WebCore::PageGroup::userStyleSheets):
      * page/UserStyleSheet.h: Added.
      (WebCore::UserStyleSheet::UserStyleSheet):
      (WebCore::UserStyleSheet::source):
      (WebCore::UserStyleSheet::url):
      (WebCore::UserStyleSheet::patterns):
      (WebCore::UserStyleSheet::worldID):
      * page/UserStyleSheetTypes.h: Added.
      
      WebKit/mac: https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user stylesheet injection.  This is similar
      to user script injection but allows for user stylesheets to be added.  The stylesheets are applied immediately
      to all Frames in the PageGroup.
      
      Reviewed by Adam Roben.
      
      Added userscripts/simple-stylesheet.html test case.
      
      * WebView/WebView.mm:
      (+[WebView _addUserStyleSheetToGroup:source:url:worldID:patterns:]):
      * WebView/WebViewPrivate.h:
      
      LayoutTests: https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user stylesheet injection.  This is similar
      to user script injection but allows for user stylesheets to be added.  The stylesheets are applied immediately
      to all Frames in the PageGroup.
      
      Reviewed by Adam Roben.
      
      Added userscripts/simple-stylesheet.html test case.
      
      * platform/mac/userscripts/simple-stylesheet-expected.checksum: Added.
      * platform/mac/userscripts/simple-stylesheet-expected.png: Added.
      * platform/mac/userscripts/simple-stylesheet-expected.txt: Added.
      * userscripts/simple-stylesheet.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      63e0ac2f
  16. 04 Sep, 2009 1 commit
    • hyatt@apple.com's avatar
      WebCore: https://bugs.webkit.org/show_bug.cgi?id=28890, make simple user script injection work. · 71960d78
      hyatt@apple.com authored
              
      Reviewed by Adam Roben.
      
      This patch adds new API for adding and removing user scripts from page groups.  User scripts
      are bundled together in isolated worlds (you can have multiple scripts together in the same
      world).
      
      Added userscripts/ directory for holding new tests (along with a simple test of script injection).
      
      * WebCore.base.exp:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/ScriptController.cpp:
      (WebCore::ScriptController::evaluateInIsolatedWorld):
      * bindings/js/ScriptController.h:
      * bindings/v8/ScriptController.cpp:
      (WebCore::ScriptController::evaluateInIsolatedWorld):
      * bindings/v8/ScriptController.h:
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::finishedParsing):
      (WebCore::FrameLoader::dispatchDocumentElementAvailable):
      * page/Frame.cpp:
      (WebCore::Frame::injectUserScripts):
      (WebCore::Frame::injectUserScriptsForWorld):
      * page/Frame.h:
      * page/PageGroup.cpp:
      (WebCore::PageGroup::~PageGroup):
      (WebCore::PageGroup::addUserScript):
      (WebCore::PageGroup::removeUserContentForWorld):
      (WebCore::PageGroup::removeAllUserContent):
      * page/PageGroup.h:
      (WebCore::PageGroup::userScripts):
      * page/UserScript.h: Added.
      (WebCore::UserScript::UserScript):
      (WebCore::UserScript::source):
      (WebCore::UserScript::url):
      (WebCore::UserScript::patterns):
      (WebCore::UserScript::worldID):
      (WebCore::UserScript::injectionTime):
      * page/UserScriptTypes.h: Added.
      (WebCore::):
      
      WebKit/mac: https://bugs.webkit.org/show_bug.cgi?id=28890, make simple user script injection work.
              
      Reviewed by Adam Roben.
      
      This patch adds new API for adding and removing user scripts from page groups.  User scripts
      are bundled together in isolated worlds (you can have multiple scripts together in the same
      world).
      
      Added userscripts/ directory for holding new tests (along with a simple test of script injection).
      
      * WebView/WebView.mm:
      (+[WebView _addUserScriptToGroup:source:url:worldID:patterns:injectionTime:]):
      (+[WebView _removeUserContentFromGroup:worldID:]):
      (+[WebView _removeAllUserContentFromGroup:]):
      * WebView/WebViewPrivate.h:
      
      LayoutTests: https://bugs.webkit.org/show_bug.cgi?id=28890, make simple user script injection work.
              
      Reviewed by Adam Roben.
      
      This patch adds new API for adding and removing user scripts from page groups.  User scripts
      are bundled together in isolated worlds (you can have multiple scripts together in the same
      world).
      
      Added userscripts/ directory for holding new tests (along with a simple test of script injection).
      
      * platform/mac/userscripts: Added.
      * platform/mac/userscripts/script-run-at-end-expected.txt: Added.
      * userscripts: Added.
      * userscripts/script-run-at-end.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      71960d78
  17. 26 Jun, 2009 1 commit
    • dglazkov@chromium.org's avatar
      2009-06-26 Jeremy Orlow <jorlow@chromium.org> · 5626dd64
      dglazkov@chromium.org authored
              Reviewed by Darin Fisher.
      
              https://bugs.webkit.org/show_bug.cgi?id=26732
      
              For the final step of https://bugs.webkit.org/show_bug.cgi?id=25376,
              combine LocalStorage and SessionStorage into StorageNamespace. The
              synching code (for LocalStorage) has already been removed, so these
              classes are now very similar.  All they do is essentially contain a
              logical grouping of origins that are attached to specific contexts
              (be it PageGroups for LocalStorage and Page for SessionStorage).
      
              * GNUmakefile.am:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * page/Chrome.cpp:
              (WebCore::Chrome::createWindow):
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::localStorage):
              * page/DOMWindow.h:
              * page/Page.cpp:
              (WebCore::Page::sessionStorage):
              (WebCore::Page::setSessionStorage):
              * page/Page.h:
              * page/PageGroup.cpp:
              (WebCore::PageGroup::localStorage):
              * page/PageGroup.h:
              * storage/LocalStorage.cpp: Removed.
              * storage/LocalStorage.h: Removed.
              * storage/LocalStorageTask.cpp:
              * storage/LocalStorageThread.cpp:
              * storage/SessionStorage.cpp: Removed.
              * storage/SessionStorage.h: Removed.
              * storage/StorageArea.cpp:
              (WebCore::StorageArea::create):
              (WebCore::StorageArea::StorageArea):
              (WebCore::StorageArea::copy):
              (WebCore::StorageArea::length):
              (WebCore::StorageArea::key):
              (WebCore::StorageArea::getItem):
              (WebCore::StorageArea::setItem):
              (WebCore::StorageArea::removeItem):
              (WebCore::StorageArea::clear):
              (WebCore::StorageArea::contains):
              (WebCore::StorageArea::importItem):
              (WebCore::StorageArea::close):
              (WebCore::StorageArea::dispatchStorageEvent):
              * storage/StorageArea.h:
              (WebCore::):
              * storage/StorageAreaSync.cpp:
              (WebCore::StorageAreaSync::scheduleFinalSync):
              * storage/StorageNamespace.cpp: Copied from WebCore/storage/LocalStorage.cpp.
              (WebCore::localStorageNamespaceMap):
              (WebCore::StorageNamespace::localStorageNamespace):
              (WebCore::StorageNamespace::sessionStorageNamespace):
              (WebCore::StorageNamespace::StorageNamespace):
              (WebCore::StorageNamespace::~StorageNamespace):
              (WebCore::StorageNamespace::copy):
              (WebCore::StorageNamespace::storageArea):
              (WebCore::StorageNamespace::close):
              * storage/StorageNamespace.h: Copied from WebCore/storage/LocalStorage.h.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45290 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5626dd64
  18. 13 Jun, 2009 1 commit
    • abarth@webkit.org's avatar
      2009-06-13 Ben Murdoch <benm@google.com> · ea665a21
      abarth@webkit.org authored
              Reviewed by David Kilzer.  Landed by Adam Barth.
      
              https://bugs.webkit.org/show_bug.cgi?id=26189
      
              This patch changes the way PageGroups create their localStorage
              objects. Rather than creating a local storage object for the page group
              when a page is added to the group, the local storage object is now
              created lazily when the local storage object is requested by the
              DOMWindow.
      
              * page/PageGroup.cpp:
              (WebCore::PageGroup::closeLocalStorage): Before attempting to close a local storage object for a page group, ensure one has been created.
              (WebCore::PageGroup::addPage): Do not automatically try to create a local storage object when a page is added to the group.
              (WebCore::PageGroup::localStorage): Create a local storage object if one does not exist and return it.
              * page/PageGroup.h: Add private hasLocalStorage method to PageGroup.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44663 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ea665a21
  19. 05 Dec, 2008 1 commit
    • brettw@chromium.org's avatar
      Reviewed by Darin Adler. · 6af05ad4
      brettw@chromium.org authored
      Make the page group use the proper link hashing functions rather than
      calling the string hash functions directly. Add Chromium-specfic ifdefs
      in the visited link computation functions to allow integration.
      
      * page/PageGroup.cpp:
      (WebCore::PageGroup::isLinkVisited):
      (WebCore::PageGroup::addVisitedLink):
      * platform/LinkHash.cpp:
      (WebCore::visitedLinkHash):
      * platform/LinkHash.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39060 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6af05ad4
  20. 21 Nov, 2008 1 commit
  21. 06 Aug, 2008 1 commit
    • beidson@apple.com's avatar
      2008-08-06 Brady Eidson <beidson@apple.com> · df1fd513
      beidson@apple.com authored
              Reviewed by MitzPettel
      
              <rdar://problem/6078543> - Many LocalStorageThreads may be started
      
              The original decision to key LocalStorage sets to PageGroups was a poor one.
      
              It seems a much better solution is to key them to the actual path of on-disk storage,
              which also solves all of the avenues that could lead to a boundless number of threads.
      
              In this patch, I am not attempting to completely sever the attachment of LocalStorage
              to PageGroups as that would require a more substantial re-working of the lifetime
              between pages, groups, and local storage threads.
      
              * page/PageGroup.cpp:
              (WebCore::PageGroup::addPage):
      
              * storage/LocalStorage.cpp:
              (WebCore::localStorageMap):  Map paths to LocalStorage objects here.
              (WebCore::LocalStorage::localStorage): Return the shared LocalStorage object for this path,
                or create a new one if it doesn't yet exist.
              (WebCore::LocalStorage::LocalStorage):
              (WebCore::LocalStorage::~LocalStorage):  Add to remove the path->LocalStorage mapping
              * storage/LocalStorage.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@35614 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      df1fd513
  22. 10 May, 2008 1 commit
  23. 07 May, 2008 1 commit
  24. 06 May, 2008 1 commit
    • beidson@apple.com's avatar
      WebCore: · 18ed1cdf
      beidson@apple.com authored
      2008-05-06  Brady Eidson  <beidson@apple.com>
      
              Reviewed by Darin Adler
      
              Preparation for upcoming work making LocalStorage persistent.
      
              When the application terminates, all pending local storage writes need to be
              sync'ed out to disk.
              This works n combination with platform specific code in WebKit that calls it.
      
              * WebCore.base.exp:
      
              * page/PageGroup.cpp:
              (WebCore::PageGroup::closeLocalStorage): Close all open LocalStorage objects
              * page/PageGroup.h:
      
              * storage/LocalStorage.cpp:
              (WebCore::LocalStorage::close): Placeholder for what will sync and terminate the
                local storage thread in the future.
              * storage/LocalStorage.h:
      
      WebKit/mac:
      
      2008-05-06  Brady Eidson  <beidson@apple.com>
      
              Reviewed by Darin Adler
      
              Preparation for upcoming work making LocalStorage persistent.
      
              When the application terminates, all LocalStorage areas must be sync'ed out to disk first.
      
              * WebView/WebView.mm:
              (+[WebView _applicationWillTerminate]):  Close all LocalStorage areas before quitting.
      
      WebKit/win:
      
      2008-05-06  Brady Eidson  <beidson@apple.com>
      
              Reviewed by Darin Adler
      
              Preparation for upcoming work making LocalStorage persistent.
      
              When the application terminates, all LocalStorage areas must be sync'ed out to disk first.
      
              * WebKitDLL.cpp:
              (shutDownWebKit): Close all LocalStorage areas before quitting.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32906 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      18ed1cdf
  25. 05 May, 2008 1 commit
    • beidson@apple.com's avatar
      2008-05-05 Brady Eidson <beidson@apple.com> · 06c8e74b
      beidson@apple.com authored
              Reviewed by Mitz Pettel RTL
      
              Preparation for upcoming work making LocalStorage persistent.
      
              - Create the LocalStorage object for a PageGroup the moment the first Page is added to it
                The Settings of the first Page define what persistent path the LocalStorage will use
              - Add a Frame argument for the LocalStorageArea request - this will allow a client object
                to be queried before the LocalStorageArea is established
      
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::localStorage):
      
              * page/PageGroup.cpp:
              (WebCore::PageGroup::addPage):
              (WebCore::PageGroup::localStorage):
      
              * storage/LocalStorage.cpp:
              (WebCore::LocalStorage::LocalStorage): Take the path as a constructor argument.  Deep copy
                the path as it will be used from another thread.
              (WebCore::LocalStorage::storageArea):
              * storage/LocalStorage.h:
              (WebCore::LocalStorage::create):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32899 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      06c8e74b
  26. 24 Apr, 2008 2 commits
    • beidson@apple.com's avatar
      2008-04-24 Brady Eidson <beidson@apple.com> · ab528fba
      beidson@apple.com authored
              Reviewed by Teh Mitzpettel
      
              Make it so PageGroups know what their own name is.
      
              * WebCore.base.exp:
      
              * page/Page.cpp:
              (WebCore::Page::setGroupName):
              (WebCore::Page::groupName):
              * page/Page.h:
      
              * page/PageGroup.cpp: Move the PageGroupMap into the PageGroup class.
              (WebCore::PageGroup::PageGroup): Added a c'tor that takes the group name as an argument instead of
                the initial Page.
              (WebCore::PageGroup::pageGroup): Handles creating and mapping names to groups
              * page/PageGroup.h:
              (WebCore::PageGroup::name):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32524 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ab528fba
    • kmccullough@apple.com's avatar
      JavaScriptCore: · d9e61e09
      kmccullough@apple.com authored
      2008-04-24  Kevin McCullough  <kmccullough@apple.com>
      
              Reviewed by Adam and Sam.
      
              -<rdar://problem/5770054> JavaScript profiler (10928)
              -Only profile the page group that starts profiling to avoid profiling
              tools that shouldn't be profiled unless explicitly requested to.
      
              * JavaScriptCore.exp: Export new signature.
              * kjs/JSGlobalObject.cpp: Add unique identifiers to the JSGlobalObject.
              (KJS::JSGlobalObject::init):
              * kjs/JSGlobalObject.h: Ditto.
              (KJS::JSGlobalObject::setPageGroupIdentifier):
              (KJS::JSGlobalObject::pageGroupIdentifier):
              * profiler/Profiler.cpp: Check the identifier of the page group of the
              lexical global exec state and only profile if it matches the given page
              group identifier.
              (KJS::Profiler::startProfiling):
              (KJS::Profiler::willExecute):
              (KJS::Profiler::didExecute):
              * profiler/Profiler.h: Ditto.
              (KJS::Profiler::Profiler):
      
      WebCore:
      
      2008-04-24  Kevin McCullough  <kmccullough@apple.com>
      
              Reviewed by Adam and Sam.
      
              -<rdar://problem/5770054> JavaScript profiler (10928)
              -Only profile the page group that starts profiling to avoid profiling
              tools that shouldn't be profiled unless explicitly requested to.
      
              * bindings/js/kjs_proxy.cpp: When a new global object is created set its
              page group identifier.
              (WebCore::KJSProxy::clear):
              (WebCore::KJSProxy::initScript):
              * page/Console.cpp: When calling console.profile set the identifier of
              the page group being profiled.
              (WebCore::Console::profile):
              * page/PageGroup.cpp: Implement unique identifiers.
              (WebCore::getUniqueIdentifier):
              (WebCore::PageGroup::PageGroup):
              * page/PageGroup.h: Ditto.
              (WebCore::PageGroup::identifier):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32495 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d9e61e09
  27. 18 Apr, 2008 3 commits
  28. 17 Apr, 2008 1 commit
    • beidson@apple.com's avatar
      2008-04-17 Brady Eidson <beidson@apple.com> · 653985c6
      beidson@apple.com authored
              Reviewed by the Mitzpettel
      
              Before things get much more intertwined, move away from a global LocalStorage model
              to a per-PageGroup LocalStorage model.
      
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::localStorage): Get it from the current PageGroup, not the global
                LocalStorage (which doesn't exist anymore).
      
              * page/Page.cpp:
              * page/PageGroup.cpp:
              (WebCore::PageGroup::localStorage): Create a LocalStorage object on demand.
              * page/PageGroup.h:
      
              * storage/LocalStorage.cpp:
              (WebCore::LocalStorage::LocalStorage): Hold a back pointer to the owning PageGroup.
              (WebCore::LocalStorage::storageArea):
              * storage/LocalStorage.h:
              (WebCore::LocalStorage::create):
      
              * storage/LocalStorageArea.cpp:
              (WebCore::LocalStorageArea::LocalStorageArea): Hold a back pointer to the owning LocalStorage.
              * storage/LocalStorageArea.h:
              (WebCore::LocalStorageArea::create):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32020 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      653985c6
  29. 10 Mar, 2008 1 commit
    • darin@apple.com's avatar
      Reviewed by Antti. · d69216d5
      darin@apple.com authored
              - fix <rdar://problem/3059610> VIP: links opened in new frame, window, or tab
                should be redrawn as visited immediately
              - fix <rdar://problem/4382809> Going "back" a page doesn't change the color of
                the visited URL at directory.umi
              - fix http://bugs.webkit.org/show_bug.cgi?id=4941
                Visited links should be marked as visited
              - fix http://bugs.webkit.org/show_bug.cgi?id=7960
                REGRESSION: Visited link color doesn't displayed after loading page from cache
      
              We now mark all links on a page as "changed" at the appropriate times.
      
              * WebCore.base.exp: Update since I made completeURL be a const member function.
      
              * css/CSSStyleSelector.cpp: Got rid of some unneeded globals that could be turned
              into locals. Also changed some static data members to file-scoped globals with
              internal linkage. Renamed the globals to get rid of the m_ prefix. Changed the
              prefix on m_styleNotYetAvailable to s_styleNotYetAvailable.
              (WebCore::CSSStyleSelector::CSSStyleSelector): Updated for name changes.
              (WebCore::parseUASheet): Tweak the comment.
              (WebCore::CSSStyleSelector::loadDefaultStyle): Updated for name changes and to
              use local variables instead of globals where possible.
              (WebCore::CSSStyleSelector::checkPseudoState): Made this a member function so
              it can store the link in a hash. Also changed it to have a return value instead
              of having it modify a global variable. Added code to put the hash into a set so
              we can tell later if this is one of the links that affects this page.
              (WebCore::CSSStyleSelector::canShareStyleWithElement): Updated for the change to
              checkPseudoState.
              (WebCore::CSSStyleSelector::matchUARules): Updated for name changes.
              (WebCore::CSSStyleSelector::styleForElement): Ditto.
              (WebCore::CSSStyleSelector::adjustRenderStyle): Ditto.
              (WebCore::CSSStyleSelector::pseudoStyleRulesForElement): Changed code to read
              the SVG style sheet to use a boolean global and put it right here in the function
              since this is the only code that needs to know about it.
              (WebCore::CSSStyleSelector::checkOneSelector): Updated for name changes.
              (WebCore::colorForCSSValue): Moved code inside the function that is not needed
              anywhere else.
              (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Updaed for the change
              to checkPseudoState.
              (WebCore::CSSStyleSelector::allVisitedStateChanged): Added. Calls setChanged on
              all links if there were any in the set.
              (WebCore::CSSStyleSelector::visitedStateChanged): Added. Calls setChanged on all
              links if the one that changed is in the set.
      
              * css/CSSStyleSelector.h: Removed unused StyleSelector class and State enum. Made
              CSSStyleSelector derive from Noncopyable. Made lots of member functions private that
              didn't need to be public, and removed others that could be made into non-member
              functions. Changed pseudoStyleRulesForElement to take a const String& instead of
              a StringImpl*. Added new allVisitedStateChanged and visitedStateChanged functions.
              Got rid of unneeded friend declarations.
      
              * dom/Document.cpp:
              (WebCore::Document::completeURL): Made const.
              (WebCore::findSlashDotDotSlash): Moved here from PageGroup.
              (WebCore::findSlashSlash): Ditto.
              (WebCore::findSlashDotSlash): Ditto.
              (WebCore::containsColonSlashSlash):
              (WebCore::cleanPath): Ditto.
              (WebCore::matchLetter): Ditto.
              (WebCore::needsTrailingSlash): Ditto.
              (WebCore::Document::visitedLinkHash): Moved this here from PageGroup. This is
              the poor-man's completeURL function. The idea of putting it here is that this
              way it can be alongside the real completeURL function. Later we should figure out
              a way to make this function share more code with the real thing and match behavior.
      
              * dom/Document.h: Marked completeURL function const. Added visitedLinkHash function.
      
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::getMatchedCSSRules): Updated for change to CSSStyleSelector.
      
              * page/Page.cpp:
              (WebCore::Page::allVisitedStateChanged): Added. Calls allVisitedStateChanged on all
              style selectors.
              (WebCore::Page::visitedStateChanged): Ditto.
              * page/Page.h: Added the above functions.
      
              * page/PageGroup.cpp:
              (WebCore::PageGroup::isLinkVisited): Changed to take a visitedLinkHash parameter.
              The CSSStyleSelector now handles actually computing the hash, and it does so by
              calling code in Document.
              (WebCore::PageGroup::addVisitedLink): Refactored so the two overloaded copies share
              a bit more code. Added code that calls visitedStateChanged if a new link was added.
              (WebCore::PageGroup::removeVisitedLinks): Added code to call allVisitedStateChanged
              if any visited links are removed.
              * page/PageGroup.h: Include StringHash.h instead of having the AlreadyHashed struct
              definition here.
      
              * platform/text/StringHash.h:
              (WebCore::CaseFoldingHash::hash): Tweaked to make this a bit more consistent with
              the StringImpl::computeHash function, using the same technique for avoiding 0.
              (WebCore::AlreadyHashed::hash): Added. Was formerly in PageGroup.h.
              (WebCore::AlreadyHashed::avoidDeletedValue): Added. Was formerly in PageGroup.cpp.
      
              * rendering/RenderStyle.cpp:
              (WebCore::RenderStyle::isStyleAvailable): Changed to use an inline function instead
              of getting directly at a data member so the data member could be made private.
      
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::scrollToAnchor): Added call to updateHistoryForAnchorScroll.
              (WebCore::FrameLoader::updateHistoryForAnchorScroll): Added.
              * loader/FrameLoader.h: Added updateHistoryForAnchorScroll.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30949 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d69216d5
  30. 07 Mar, 2008 1 commit
    • darin@apple.com's avatar
      Reviewed by Brady. · fbeddf3e
      darin@apple.com authored
              - fix a theoretical problem with the visited-link hash table by avoiding collision
                with the special "deleted" value
              - improve efficiency of with the visited-link hash table by not hashing twice
      
              * page/PageGroup.cpp:
              (WebCore::avoidDeletedValue): Added. Makes sure we never try to use the "all ones"
              value, since the hash table uses that for deleted hash table entries.
              (WebCore::PageGroup::isLinkVisited): Call avoidDeletedValue before using the hash
              value with the HashSet.
              (WebCore::PageGroup::addVisitedLink): Ditto.
      
              * page/PageGroup.h: Added a new hash function, AlreadyHashed, for unsigned integer
              values. This assumes that the value is already a hash value, and doesn't try to
              hash it again. Used this for m_visitedLinkHashes.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30873 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fbeddf3e
  31. 06 Mar, 2008 1 commit
    • darin@apple.com's avatar
      WebCore: · 62cb9c58
      darin@apple.com authored
              Reviewed by Mitz.
      
              - fix regression test failures from the visited-link change
      
              * WebCore.base.exp: Export PageGroup::setShouldTrackVisitedLinks.
              * page/PageGroup.cpp:
              (WebCore::PageGroup::addVisitedLink): Do nothing and return early
              if shouldTrackVisitedLinks is false.
              (WebCore::PageGroup::removeVisitedLinks): Reset m_visitedLinksPopulated
              so the next time a link is queried this will be populated from history.
              (WebCore::PageGroup::setShouldTrackVisitedLinks): Added.
              * page/PageGroup.h: Added setShouldTrackVisitedLinks. This is global
              for now, but it would be better if it was per-page-group instead.
      
      WebKit/mac:
      
              Reviewed by Mitz.
      
              - fix regression test failures from the visited-link change
      
              * History/WebHistory.mm:
              (+[WebHistory setOptionalSharedHistory:]): Call PageGroup::setShouldTrackVisitedLinks
              to turn off visited links if there is no history object. Also call
              removeAllVisitedLinks so we can start over from scratch with the new history.
      
      WebKit/win:
      
              Reviewed by Mitz.
      
              - fix regression test failures and crashes from the visited-link change
      
              * WebCoreSupport/WebChromeClient.cpp:
              (WebChromeClient::populateVisitedLinks): Check for null before calling
              addVisitedLinksToPageGroup.
              * WebCoreSupport/WebFrameLoaderClient.cpp:
              (WebFrameLoaderClient::updateGlobalHistory): Ditto.
              * WebHistory.cpp:
              (WebHistory::setOptionalSharedHistory): Call PageGroup::setShouldTrackVisitedLinks
              to turn off visited links if there is no history object. Also call
              removeAllVisitedLinks so we can start over from scratch with the new history.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30867 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      62cb9c58