1. 27 Sep, 2013 1 commit
    • darin@apple.com's avatar
      rename KURL to URL · 5ffbb5c7
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=16214
      
      Reviewed by Andreas Kling.
      
      Source/WebCore:
      
      * many files: Renamed, using script.
      
      Source/WebKit:
      
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
      Let the script to try to rename here.
      
      Source/WebKit/blackberry:
      
      * many files: Renamed, using script.
      
      Source/WebKit/efl:
      
      * many files: Renamed, using script.
      
      Source/WebKit/gtk:
      
      * many files: Renamed, using script.
      
      Source/WebKit/mac:
      
      * many files: Renamed, using script.
      
      Source/WebKit/qt:
      
      * many files: Renamed, using script.
      
      Source/WebKit/win:
      
      * many files: Renamed, using script.
      
      Source/WebKit/wince:
      
      * many files: Renamed, using script.
      
      Source/WebKit2:
      
      * many files: Renamed, using script.
      
      Tools:
      
      * many files: Renamed, using script.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156550 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5ffbb5c7
  2. 22 May, 2013 1 commit
    • aestes@apple.com's avatar
      Allow session storage for third-party origins even if third-party data access is blocked. · 16141c97
      aestes@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=116532
      
      Reviewed by Anders Carlsson.
      
      Source/WebCore:
      
      In http://trac.webkit.org/changeset/149326 we relaxed our policy for
      localStorage when third-party data blocking is enabled to create a
      transient, session-scoped storage area for the third-party origin
      instead of throwing an exception. Since this gives essentially the same
      behavior as sessionStorage, we might as well also allow sessionStorage
      for third-party origins.
      
      Test: http/tests/security/cross-origin-session-storage-third-party-blocked.html
      
      * WebCore.exp.in: Updated the symbol for
      SecurityOrigin::canAccessStorage.
      * page/DOMWindow.cpp:
      (WebCore::DOMWindow::sessionStorage): Called canAccessSessionStorage()
      rather than canAccessLocalStorage().
      * page/SecurityOrigin.cpp:
      (WebCore::SecurityOrigin::canAccessStorage): Passed in an enum
      indicating if access should be allowed from third-party origins.
      * page/SecurityOrigin.h:
      (WebCore::SecurityOrigin::canAccessSessionStorage): Called
      canAccessStorage() with AlwaysAllowFromThirdParty.
      (SecurityOrigin):
      
      LayoutTests:
      
      * http/tests/security/cross-origin-session-storage-third-party-blocked-expected.txt: Renamed from LayoutTests/http/tests/security/cross-origin-session-storage-expected.txt.
      * http/tests/security/cross-origin-session-storage-third-party-blocked.html: Renamed from LayoutTests/http/tests/security/cross-origin-session-storage.html.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150490 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      16141c97
  3. 10 May, 2013 2 commits
    • andersca@apple.com's avatar
      Unreviewed, rolling out r149866. · 7c4df494
      andersca@apple.com authored
      http://trac.webkit.org/changeset/149866
      https://bugs.webkit.org/show_bug.cgi?id=115898
      
      Broke tests
      
      * dom/Document.cpp:
      (WebCore::Document::setDomain):
      (WebCore::Document::initSecurityContext):
      * page/SecurityOrigin.cpp:
      (WebCore::SecurityOrigin::SecurityOrigin):
      (WebCore::SecurityOrigin::isolatedCopy):
      (WebCore::SecurityOrigin::setDomainFromDOM):
      (WebCore::SecurityOrigin::grantUniversalAccess):
      * page/SecurityOrigin.h:
      (SecurityOrigin):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149869 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7c4df494
    • andersca@apple.com's avatar
      Begin making SecurityOrigin immutable · dfff6ca2
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=115898
      
      Reviewed by Andreas Kling.
      
      Replace SecurityOrigin::setDomainFromDOM and SecurityOrigin::grantUniversalAccess with
      member functions that return new SecurityOrigin objects.
      
      * dom/Document.cpp:
      (WebCore::Document::setDomain):
      Update the security origin to one returned by copyWithDomainSetFromDOM.
      
      (WebCore::Document::initSecurityContext):
      Set the security origin to one returned by copyWithUniversalAccessGranted().
      
      * page/SecurityOrigin.cpp:
      (WebCore::SecurityOrigin::SecurityOrigin):
      Add a new constructor that takes all the member variables as parameters. This is a little unwieldy at the moment,
      but all the boolean parameters could be replaced by a bitmask of flags.
      
      (WebCore::SecurityOrigin::isolatedCopy):
      Call the new constructor.
      
      (WebCore::SecurityOrigin::copyWithDomainSetFromDOM):
      Return a new security origin with m_domainWasSetInDOM set to true and the domain updated.
      
      (WebCore::SecurityOrigin::copyWithUniversalAccessGranted):
      Return a new security origin with m_universalAccess set to true.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149866 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dfff6ca2
  4. 09 May, 2013 2 commits
  5. 03 Apr, 2013 1 commit
  6. 18 Mar, 2013 1 commit
    • jpfau@apple.com's avatar
      Allow blocking of application cache in third-party contexts · 398b1b59
      jpfau@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=112288
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      Return early if we can't access the application cache due to security
      restrictions.
      
      Tests: http/tests/security/cross-origin-appcache-allowed.html
             http/tests/security/cross-origin-appcache.html
             http/tests/security/same-origin-appcache-blocked.html
      
      * loader/appcache/ApplicationCacheGroup.cpp:
      (WebCore::ApplicationCacheGroup::selectCache):
      (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
      * page/SecurityOrigin.h:
      (WebCore::SecurityOrigin::canAccessApplicationCache):
      
      LayoutTests:
      
      * http/tests/security/cross-origin-appcache-allowed-expected.txt: Added.
      * http/tests/security/cross-origin-appcache-allowed.html: Added.
      * http/tests/security/cross-origin-appcache-expected.txt: Added.
      * http/tests/security/cross-origin-appcache.html: Added.
      * http/tests/security/resources/cross-origin-iframe-for-appcache-allowed.html: Added.
      * http/tests/security/resources/cross-origin-iframe-for-appcache.html: Added.
      * http/tests/security/resources/manifest-for-appcache-allowed.manifest: Added.
      * http/tests/security/resources/manifest-for-appcache-blocked.manifest: Added.
      * http/tests/security/resources/manifest-for-appcache.manifest: Added.
      * http/tests/security/resources/same-origin-iframe-for-appcache-blocked.html: Added.
      * http/tests/security/same-origin-appcache-blocked-expected.txt: Added.
      * http/tests/security/same-origin-appcache-blocked.html: Added.
      * platform/chromium/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146115 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      398b1b59
  7. 26 Feb, 2013 1 commit
    • jpfau@apple.com's avatar
      Optionally partition cache to prevent using cache for tracking · 97c6a7f9
      jpfau@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=110269
      
      Reviewed by Maciej Stachowiak.
      
      Source/JavaScriptCore:
      
      * Configurations/FeatureDefines.xcconfig: Add defines for cache partitioning and public suffix list usage
      
      Source/WebCore:
      
      Implement memory cache partitioning by passing the cache name through
      resource requests into a new version of resourceForURL.
      
      Test: http/tests/cache/partitioned-cache.html
      
      * Configurations/FeatureDefines.xcconfig: Add defines for cache partitioning and public suffix list usage
      * WebCore.exp.in: Export new functions for WKSI and test suite
      * WebCore.xcodeproj/project.pbxproj:
      * html/DOMURL.cpp:
      (WebCore::DOMURL::revokeObjectURL): Retrofit for new resourceForRequest function
      * inspector/InspectorPageAgent.cpp:
      (WebCore::InspectorPageAgent::cachedResource): Retrofit for new resourceForRequest function
      * inspector/InspectorResourceAgent.cpp:
      (WebCore::InspectorResourceAgent::replayXHR): Retrofit for new resourceForRequest function
      * loader/DocumentLoader.h:
      (DocumentLoader):
      (WebCore::DocumentLoader::recordMemoryCacheLoadForFutureClientNotification): Retrofit for new resourceForRequest function
      (WebCore::DocumentLoader::takeMemoryCacheLoadsForClientNotification): Retrofit for new resourceForRequest function
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::loadedResourceFromMemoryCache): Retrofit for new resourceForRequest function
      (WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads): Retrofit for new resourceForRequest function
      * loader/archive/cf/LegacyWebArchive.cpp:
      (WebCore::LegacyWebArchive::create): Retrofit for new resourceForRequest function
      * loader/cache/CachedResource.cpp:
      (WebCore::CachedResource::~CachedResource):
      * loader/cache/CachedResource.h: Retrofit for new resourceForRequest function
      (CachedResource):
      (WebCore::CachedResource::cachePartition):
      * loader/cache/CachedResourceLoader.cpp:
      (WebCore::CachedResourceLoader::requestUserCSSStyleSheet): Retrofit for new resourceForRequest function
      (WebCore::CachedResourceLoader::requestResource): Retrofit for new resourceForRequest function
      (WebCore::CachedResourceLoader::loadResource): Retrofit for new resourceForRequest function
      * loader/cache/MemoryCache.cpp:
      (WebCore):
      (WebCore::partitionName): Add function for determining absolute partition name
      (WebCore::MemoryCache::add): Retrofit for partition mapping
      (WebCore::MemoryCache::revalidationSucceeded): Retrofit for partition mapping
      (WebCore::MemoryCache::resourceForURL): Call into new resourceForRequest
      (WebCore::MemoryCache::resourceForRequest): Retrofit for partition mapping
      (WebCore::MemoryCache::evict): Retrofit for partition mapping
      (WebCore::MemoryCache::removeResourcesWithOrigin): Retrofit for partition mapping
      (WebCore::MemoryCache::getOriginsWithCache): Retrofit for partition mapping
      (WebCore::MemoryCache::removeUrlFromCache): Retrofit for partition mapping
      (WebCore::MemoryCache::removeRequestFromCache): Retrofit for partition mapping
      (WebCore::MemoryCache::removeRequestFromCacheImpl): Retrofit for partition mapping
      (WebCore::MemoryCache::crossThreadRemoveRequestFromCache): Add function for calling removeRequestFromCacheImpl that takes a CrossThreadResourceRequestData
      (WebCore::MemoryCache::getStatistics): Retrofit for partition mapping
      (WebCore::MemoryCache::setDisabled): Retrofit for partition mapping
      * loader/cache/MemoryCache.h:
      (MemoryCache):
      * page/SecurityOrigin.cpp:
      (WebCore):
      (WebCore::SecurityOrigin::cachePartition): Add function for determining the cache partition name
      * page/SecurityOrigin.h:
      (SecurityOrigin):
      * platform/PublicSuffix.h: Added.
      (WebCore):
      * platform/mac/PublicSuffixMac.mm: Added.
      (WebCore):
      (WebCore::isPublicSuffix):
      (WebCore::topPrivatelyControlledDomain):
      * platform/mac/WebCoreSystemInterface.h:
      * platform/mac/WebCoreSystemInterface.mm:
      * platform/network/cf/ResourceRequest.h:
      (ResourceRequest):
      (WebCore::ResourceRequest::cachePartition):
      (WebCore::ResourceRequest::setCachePartition):
      (CrossThreadResourceRequestData):
      * platform/network/cf/ResourceRequestCFNet.cpp:
      (WebCore::ResourceRequest::doPlatformCopyData): Pass through cache partition name
      (WebCore):
      (WebCore::ResourceRequest::doPlatformAdopt): Pass through cache partition name
      * platform/network/mac/ResourceRequestMac.mm:
      (WebCore::ResourceRequest::doUpdateResourceRequest): Pass through cache partition name
      (WebCore::ResourceRequest::doUpdatePlatformRequest): Pass through cache partition name
      
      Source/WebKit/mac:
      
      Update WKSI bindings and add feature defines.
      
      * Configurations/FeatureDefines.xcconfig: Add defines for cache partitioning and public suffix list usage
      * WebCoreSupport/WebSystemInterface.mm:
      (InitWebCoreSystemInterface):
      
      Source/WebKit2:
      
      Update WKSI bindings and add feature defines.
      
      * Configurations/FeatureDefines.xcconfig: Add defines for cache partitioning and public suffix list usage
      * WebCoreSupport/WebSystemInterface.mm:
      (InitWebCoreSystemInterface):
      
      Tools:
      
      Add test suite for public suffix functions on Mac.
      
      * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
      * TestWebKitAPI/Tests/mac/PublicSuffix.mm: Added.
      (TestWebKitAPI):
      (TestWebKitAPI::TEST_F):
      
      WebKitLibraries:
      
      Update WKSI bindings.
      
      * WebKitSystemInterface.h:
      * libWebKitSystemInterfaceLion.a:
      * libWebKitSystemInterfaceMountainLion.a:
      
      LayoutTests:
      
      Added tests for ensuring the cache partitioning functions
      
      * http/tests/cache/partitioned-cache-expected.txt: Added.
      * http/tests/cache/partitioned-cache.html: Added.
      * http/tests/cache/resources/echo-cookie.cgi: Added.
      * http/tests/cache/resources/partitioned-cache-loader.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      97c6a7f9
  8. 08 Sep, 2012 1 commit
    • jpfau@apple.com's avatar
      Extend third-party storage blocking API to optionally allow blocking all storage · d5a0fa0d
      jpfau@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=95915
      
      Reviewed by Brady Eidson.
      
      Source/WebCore:
      
      Replace boolean API with tri-state API that allows for blocking no, third-party, or all storage.
      
      Tests: http/tests/security/same-origin-shared-worker-blocked.html
             http/tests/security/same-origin-storage-blocked.html
             http/tests/security/same-origin-websql-blocked.html
      
      * dom/Document.cpp:
      (WebCore::Document::initSecurityContext):
      * page/SecurityOrigin.cpp:
      (WebCore::SecurityOrigin::SecurityOrigin):
      (WebCore::SecurityOrigin::canAccessStorage):
      * page/SecurityOrigin.h:
      (WebCore::SecurityOrigin::setStorageBlockingPolicy):
      (SecurityOrigin):
      * page/Settings.cpp:
      (WebCore::Settings::Settings):
      * page/Settings.h:
      (WebCore::Settings::setStorageBlockingPolicy):
      (WebCore::Settings::storageBlockingPolicy):
      (Settings):
      * testing/InternalSettings.cpp:
      (WebCore::InternalSettings::setStorageBlockingPolicy):
      * testing/InternalSettings.h:
      (InternalSettings):
      * testing/InternalSettings.idl:
      
      Source/WebKit2:
      
      Update WK2 API to use revised Settings API.
      
      * Shared/WebPreferencesStore.h:
      (WebKit):
      * UIProcess/API/C/WKAPICast.h:
      (WebKit::toStorageBlockingPolicy):
      (WebKit):
      (WebKit::toAPI):
      * UIProcess/API/C/WKPreferences.cpp:
      (WKPreferencesSetStorageBlockingPolicy):
      (WKPreferencesGetStorageBlockingPolicy):
      * UIProcess/API/C/WKPreferences.h:
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::updatePreferences):
      
      Tools:
      
      Modified API test to use new revised API.
      
      * TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp:
      (TestWebKitAPI::TEST):
      
      LayoutTests:
      
      Update tests to use revised API.
      
      * http/tests/security/cross-origin-local-storage.html:
      * http/tests/security/cross-origin-plugin-private-browsing-toggled.html:
      * http/tests/security/cross-origin-plugin.html:
      * http/tests/security/cross-origin-session-storage.html:
      * http/tests/security/cross-origin-shared-worker.html:
      * http/tests/security/cross-origin-websql.html:
      * http/tests/security/cross-origin-worker-websql.html:
      * http/tests/security/resources/document-for-cross-origin-worker-websql.html:
      * http/tests/security/same-origin-document-domain-storage-allowed.html:
      * http/tests/security/same-origin-shared-worker-blocked-expected.txt: Added.
      * http/tests/security/same-origin-shared-worker-blocked.html: Added.
      * http/tests/security/same-origin-storage-blocked-expected.txt: Added.
      * http/tests/security/same-origin-storage-blocked.html: Added.
      * http/tests/security/same-origin-websql-blocked-expected.txt: Added.
      * http/tests/security/same-origin-websql-blocked.html: Added.
      * platform/chromium/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127956 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d5a0fa0d
  9. 06 Sep, 2012 1 commit
    • weinig@apple.com's avatar
      Part 2 of removing PlatformString.h, remove PlatformString.h · 3f5ab024
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=95931
      
      Reviewed by Adam Barth.
      
      Remove PlatformString.h
      
      Source/WebCore:
      
      * GNUmakefile.list.am:
      * Modules/filesystem/AsyncFileWriter.h:
      * Modules/filesystem/DOMFilePath.h:
      * Modules/filesystem/DOMFileSystemBase.h:
      * Modules/filesystem/DirectoryEntry.h:
      * Modules/filesystem/DirectoryEntrySync.h:
      * Modules/filesystem/DirectoryReader.h:
      * Modules/filesystem/DirectoryReaderBase.h:
      * Modules/filesystem/DirectoryReaderSync.h:
      * Modules/filesystem/EntryBase.cpp:
      * Modules/filesystem/EntrySync.h:
      * Modules/filesystem/FileEntrySync.h:
      * Modules/filesystem/FileSystemCallbacks.h:
      * Modules/filesystem/LocalFileSystem.h:
      * Modules/geolocation/GeolocationError.h:
      * Modules/geolocation/Geoposition.h:
      * Modules/geolocation/PositionError.h:
      * Modules/indexeddb/IDBAny.h:
      * Modules/indexeddb/IDBDatabaseBackendInterface.h:
      * Modules/indexeddb/IDBDatabaseCallbacks.h:
      * Modules/indexeddb/IDBDatabaseCallbacksImpl.h:
      * Modules/indexeddb/IDBDatabaseError.h:
      * Modules/indexeddb/IDBFactory.h:
      * Modules/indexeddb/IDBFactoryBackendInterface.h:
      * Modules/indexeddb/IDBIndex.h:
      * Modules/indexeddb/IDBIndexBackendInterface.h:
      * Modules/indexeddb/IDBKey.h:
      * Modules/indexeddb/IDBKeyPath.h:
      * Modules/indexeddb/IDBMetadata.h:
      * Modules/indexeddb/IDBObjectStore.h:
      * Modules/indexeddb/IDBObjectStoreBackendInterface.h:
      * Modules/indexeddb/IDBTransactionBackendInterface.h:
      * Modules/indexeddb/IDBUpgradeNeededEvent.h:
      * Modules/indexeddb/IDBVersionChangeEvent.h:
      * Modules/mediastream/MediaStreamTrack.h:
      * Modules/networkinfo/NetworkInfoConnection.h:
      * Modules/notifications/DOMWindowNotifications.h:
      * Modules/speech/SpeechGrammar.h:
      * Modules/speech/SpeechRecognition.h:
      * Modules/speech/SpeechRecognitionAlternative.h:
      * Modules/speech/SpeechRecognitionClient.h:
      * Modules/speech/SpeechRecognitionError.h:
      * Modules/webaudio/AudioContext.cpp:
      * Modules/webaudio/AudioParam.h:
      * Modules/webdatabase/AbstractDatabase.h:
      * Modules/webdatabase/ChangeVersionWrapper.h:
      * Modules/webdatabase/DOMWindowWebDatabase.h:
      * Modules/webdatabase/Database.h:
      * Modules/webdatabase/DatabaseAuthorizer.cpp:
      * Modules/webdatabase/DatabaseAuthorizer.h:
      * Modules/webdatabase/DatabaseDetails.h:
      * Modules/webdatabase/DatabaseSync.h:
      * Modules/webdatabase/DatabaseTask.h:
      * Modules/webdatabase/DatabaseTracker.h:
      * Modules/webdatabase/OriginUsageRecord.h:
      * Modules/webdatabase/SQLError.h:
      * Modules/webdatabase/SQLStatement.h:
      * Modules/webdatabase/SQLStatementSync.h:
      * Modules/webdatabase/SQLTransaction.cpp:
      * Modules/webdatabase/SQLTransactionSync.cpp:
      * Modules/webdatabase/SQLTransactionSync.h:
      * Modules/webdatabase/WorkerContextWebDatabase.h:
      * Modules/webdatabase/chromium/DatabaseTrackerChromium.cpp:
      * Modules/webdatabase/chromium/QuotaTracker.h:
      * Modules/websockets/ThreadableWebSocketChannel.cpp:
      * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
      * Modules/websockets/WebSocketHandshake.h:
      * Modules/websockets/WebSocketHandshakeResponse.h:
      * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
      * Modules/websockets/WorkerThreadableWebSocketChannel.h:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/gobject/ConvertToUTF8String.cpp:
      * bindings/js/JSCSSStyleDeclarationCustom.cpp:
      * bindings/js/JSClipboardCustom.cpp:
      * bindings/js/JSImageDataCustom.cpp:
      * bindings/js/JSInspectorFrontendHostCustom.cpp:
      * bindings/js/JSLazyEventListener.h:
      * bindings/js/JSStorageCustom.cpp:
      * bindings/js/JSXSLTProcessorCustom.cpp:
      * bindings/js/JavaScriptCallFrame.cpp:
      * bindings/js/ScheduledAction.h:
      * bindings/js/ScriptDebugServer.h:
      * bindings/js/ScriptHeapSnapshot.h:
      * bindings/js/ScriptValue.h:
      * bindings/js/SerializedScriptValue.h:
      * bindings/objc/DOMCustomXPathNSResolver.mm:
      * bindings/objc/DOMXPath.mm:
      * bindings/objc/WebScriptObject.mm:
      * bindings/scripts/CodeGeneratorJS.pm:
      (AddIncludesForTypeInImpl):
      (AddIncludesForSVGAnimatedType):
      * bindings/scripts/CodeGeneratorV8.pm:
      (AddIncludesForType):
      * bindings/v8/Dictionary.h:
      * bindings/v8/JavaScriptCallFrame.h:
      * bindings/v8/NPV8Object.cpp:
      * bindings/v8/ScriptDebugServer.h:
      * bindings/v8/ScriptFunctionCall.h:
      * bindings/v8/ScriptHeapSnapshot.h:
      * bindings/v8/ScriptProfile.h:
      * bindings/v8/ScriptProfileNode.h:
      * bindings/v8/ScriptProfiler.h:
      * bindings/v8/ScriptSourceCode.h:
      * bindings/v8/V8Binding.cpp:
      * bindings/v8/V8DOMWrapper.h:
      * bindings/v8/V8LazyEventListener.h:
      * bindings/v8/V8NPUtils.cpp:
      * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
      * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
      * bindings/v8/custom/V8LocationCustom.cpp:
      * bridge/IdentifierRep.cpp:
      * bridge/NP_jsobject.cpp:
      * bridge/c/c_utility.cpp:
      * css/CSSBasicShapes.h:
      * css/CSSBorderImageSliceValue.cpp:
      * css/CSSCharsetRule.h:
      * css/CSSCursorImageValue.cpp:
      * css/CSSFontFaceSrcValue.h:
      * css/CSSGradientValue.cpp:
      * css/CSSInheritedValue.cpp:
      * css/CSSInitialValue.cpp:
      * css/CSSLineBoxContainValue.cpp:
      * css/CSSMediaRule.h:
      * css/CSSProperty.cpp:
      * css/CSSPropertySourceData.cpp:
      * css/CSSPropertySourceData.h:
      * css/CSSReflectValue.cpp:
      * css/CSSTimingFunctionValue.cpp:
      * css/CSSUnicodeRangeValue.cpp:
      * css/CSSValueList.cpp:
      * css/Counter.h:
      * css/FontFeatureValue.h:
      * css/FontValue.cpp:
      * css/MediaQuery.h:
      * css/MediaQueryEvaluator.h:
      * css/MediaQueryListListener.h:
      * css/ShadowValue.cpp:
      * css/StyleMedia.h:
      * css/StyleSheet.h:
      * css/StyleSheetList.cpp:
      * css/WebKitCSSMatrix.h:
      * css/WebKitCSSTransformValue.cpp:
      * dom/DOMStringList.h:
      * dom/DOMStringMap.h:
      * dom/DocumentMarker.h:
      * dom/ErrorEvent.h:
      * dom/ExceptionBase.h:
      * dom/MessagePortChannel.h:
      * dom/MutationRecord.h:
      * dom/TransformSource.h:
      * dom/ViewportArguments.cpp:
      * editing/DOMTransactionStep.h:
      * editing/EditingStyle.h:
      * editing/MarkupAccumulator.h:
      * editing/SmartReplaceICU.cpp:
      * editing/SpellChecker.h:
      * editing/SurroundingText.h:
      * fileapi/AsyncFileStream.cpp:
      * fileapi/Blob.h:
      * fileapi/BlobURL.cpp:
      * fileapi/File.h:
      * history/HistoryItem.h:
      * history/blackberry/HistoryItemViewState.h:
      * history/cf/HistoryPropertyList.h:
      * html/DOMFormData.cpp:
      * html/DOMURL.h:
      * html/MicroDataItemValue.h:
      * html/PublicURLManager.h:
      * html/canvas/CanvasPattern.cpp:
      * html/canvas/CanvasRenderingContext2D.h:
      * html/canvas/CanvasStyle.h:
      * html/canvas/WebGLActiveInfo.h:
      * html/canvas/WebGLGetInfo.h:
      * html/canvas/WebGLRenderingContext.h:
      * html/parser/CSSPreloadScanner.h:
      * html/parser/HTMLEntitySearch.h:
      * html/parser/HTMLEntityTable.h:
      * html/parser/HTMLMetaCharsetParser.cpp:
      * inspector/CodeGeneratorInspector.py:
      (InspectorFrontend_h):
      * inspector/ContentSearchUtils.h:
      * inspector/InjectedScript.cpp:
      * inspector/InjectedScriptBase.cpp:
      * inspector/InjectedScriptManager.h:
      * inspector/InjectedScriptModule.h:
      * inspector/InjectedScriptWebGLModule.h:
      * inspector/InspectorAgent.h:
      * inspector/InspectorCSSAgent.h:
      * inspector/InspectorController.h:
      * inspector/InspectorDOMDebuggerAgent.h:
      * inspector/InspectorDOMStorageAgent.h:
      * inspector/InspectorDatabaseAgent.h:
      * inspector/InspectorDatabaseResource.h:
      * inspector/InspectorFrontendClientLocal.cpp:
      * inspector/InspectorFrontendClientLocal.h:
      * inspector/InspectorFrontendHost.h:
      * inspector/InspectorIndexedDBAgent.h:
      * inspector/InspectorPageAgent.h:
      * inspector/InspectorProfilerAgent.h:
      * inspector/InspectorResourceAgent.h:
      * inspector/InspectorState.h:
      * inspector/InspectorStyleSheet.h:
      * inspector/InspectorStyleTextEditor.h:
      * inspector/InspectorValues.h:
      * inspector/InspectorWebGLAgent.h:
      * inspector/InspectorWorkerResource.h:
      * inspector/ScriptArguments.h:
      * inspector/ScriptBreakpoint.h:
      * inspector/ScriptCallFrame.h:
      * inspector/ScriptDebugListener.h:
      * inspector/TimelineRecordFactory.h:
      * inspector/generate-inspector-protocol-version:
      (main):
      * loader/DocumentLoader.cpp:
      * loader/DocumentWriter.h:
      * loader/FTPDirectoryParser.h:
      * loader/FormState.h:
      * loader/HistoryController.h:
      * loader/PolicyChecker.h:
      * loader/ResourceLoadScheduler.h:
      * loader/SubframeLoader.h:
      * loader/SubstituteData.h:
      * loader/WorkerThreadableLoader.h:
      * loader/appcache/ApplicationCache.h:
      * loader/appcache/ApplicationCacheGroup.h:
      * loader/archive/ArchiveFactory.cpp:
      * loader/archive/ArchiveResourceCollection.h:
      * loader/cache/CachedResource.h:
      * loader/cache/MemoryCache.h:
      * loader/icon/IconRecord.h:
      * loader/icon/PageURLRecord.h:
      * loader/mac/LoaderNSURLExtras.mm:
      * loader/win/DocumentLoaderWin.cpp:
      * page/Console.cpp:
      * page/Coordinates.h:
      * page/DOMSelection.cpp:
      * page/EventSource.cpp:
      * page/GroupSettings.h:
      * page/NavigatorBase.cpp:
      * page/OriginAccessEntry.h:
      * page/Page.h:
      * page/SecurityOrigin.h:
      * page/SpeechInputResult.h:
      * page/UserContentURLPattern.h:
      * page/WindowFeatures.cpp:
      * page/WindowFeatures.h:
      * page/WorkerNavigator.h:
      * page/animation/AnimationControllerPrivate.h:
      * platform/AsyncFileSystem.h:
      * platform/AsyncFileSystemCallbacks.h:
      * platform/ContentType.h:
      * platform/ContextMenu.h:
      * platform/ContextMenuItem.h:
      * platform/Cookie.h:
      * platform/CrossThreadCopier.cpp:
      * platform/DateComponents.cpp:
      * platform/FileChooser.h:
      * platform/FileStream.cpp:
      * platform/FileSystem.h:
      * platform/KURL.cpp:
      (WebCore):
      * platform/KURL.h:
      * platform/KURLHash.h:
      * platform/KillRing.h:
      * platform/Language.cpp:
      * platform/Length.cpp:
      * platform/LinkHash.cpp:
      * platform/Logging.cpp:
      * platform/MIMETypeRegistry.h:
      * platform/SSLKeyGenerator.h:
      * platform/SchemeRegistry.h:
      * platform/SharedBuffer.h:
      * platform/Theme.h:
      * platform/UUID.h:
      * platform/animation/Animation.h:
      * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.h:
      * platform/blackberry/CookieManager.h:
      * platform/blackberry/CookieMap.h:
      * platform/blackberry/DragDataBlackBerry.cpp:
      * platform/blackberry/KURLBlackBerry.cpp:
      * platform/blackberry/LocalizedStringsBlackBerry.cpp:
      * platform/blackberry/SSLKeyGeneratorBlackBerry.cpp:
      * platform/blackberry/TemporaryLinkStubs.cpp:
      * platform/cf/FileSystemCF.cpp:
      * platform/cf/SchedulePair.h:
      * platform/chromium/ChromiumDataObject.h:
      * platform/chromium/ClipboardUtilitiesChromium.cpp:
      * platform/chromium/DragDataChromium.cpp:
      * platform/chromium/FileSystemChromium.cpp:
      * platform/chromium/FileSystemChromiumMac.mm:
      * platform/chromium/LanguageChromium.cpp:
      * platform/chromium/SSLKeyGeneratorChromium.cpp:
      * platform/cocoa/KeyEventCocoa.mm:
      * platform/efl/ErrorsEfl.h:
      * platform/efl/LanguageEfl.cpp:
      * platform/efl/LocalizedStringsEfl.cpp:
      * platform/efl/LoggingEfl.cpp:
      * platform/efl/PasteboardEfl.cpp:
      * platform/efl/PlatformScreenEfl.cpp:
      * platform/graphics/ANGLEWebKitBridge.h:
      * platform/graphics/BitmapImage.cpp:
      * platform/graphics/FontPlatformData.cpp:
      * platform/graphics/GlyphPageTreeNode.cpp:
      * platform/graphics/GraphicsContext3D.h:
      * platform/graphics/GraphicsTypes.cpp:
      * platform/graphics/SegmentedFontData.cpp:
      * platform/graphics/blackberry/IconBlackBerry.cpp:
      * platform/graphics/blackberry/LayerData.h:
      * platform/graphics/blackberry/LayerFilterRenderer.cpp:
      * platform/graphics/blackberry/LayerRenderer.cpp:
      * platform/graphics/blackberry/skia/PlatformSupport.h:
      * platform/graphics/ca/PlatformCALayer.h:
      * platform/graphics/ca/PlatformCALayerClient.h:
      * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
      * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
      * platform/graphics/cairo/ImageBufferCairo.cpp:
      * platform/graphics/cairo/PathCairo.cpp:
      * platform/graphics/cg/ImageSourceCGMac.mm:
      * platform/graphics/cg/PathCG.cpp:
      * platform/graphics/chromium/FontUtilsChromiumWin.cpp:
      * platform/graphics/chromium/GraphicsLayerChromium.cpp:
      * platform/graphics/chromium/IconChromium.cpp:
      * platform/graphics/chromium/IconChromiumAndroid.cpp:
      * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
      * platform/graphics/efl/IconEfl.cpp:
      * platform/graphics/filters/FEComposite.h:
      * platform/graphics/filters/FEDisplacementMap.h:
      * platform/graphics/filters/SourceAlpha.cpp:
      * platform/graphics/filters/SourceAlpha.h:
      * platform/graphics/filters/SourceGraphic.cpp:
      * platform/graphics/filters/SourceGraphic.h:
      * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
      * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
      * platform/graphics/mac/IconMac.mm:
      * platform/graphics/mac/ImageMac.mm:
      * platform/graphics/opentype/OpenTypeUtilities.h:
      * platform/graphics/openvg/PathOpenVG.cpp:
      * platform/graphics/pango/FontPlatformDataPango.cpp:
      * platform/graphics/qt/FontCacheQt.cpp:
      * platform/graphics/qt/FontPlatformDataQt.cpp:
      * platform/graphics/qt/IconQt.cpp:
      * platform/graphics/qt/ImageQt.cpp:
      * platform/graphics/qt/PathQt.cpp:
      * platform/graphics/skia/FontCustomPlatformData.h:
      * platform/graphics/skia/ImageSkia.cpp:
      * platform/graphics/win/FontCustomPlatformData.h:
      * platform/graphics/win/FontPlatformDataCGWin.cpp:
      * platform/graphics/win/FontPlatformDataCairoWin.cpp:
      * platform/graphics/win/FontPlatformDataWin.cpp:
      * platform/graphics/win/IconWin.cpp:
      * platform/graphics/win/ImageCGWin.cpp:
      * platform/graphics/win/ImageCairoWin.cpp:
      * platform/graphics/win/SimpleFontDataCGWin.cpp:
      * platform/graphics/wince/FontCustomPlatformData.h:
      * platform/graphics/wince/FontPlatformData.cpp:
      * platform/graphics/wince/ImageWinCE.cpp:
      * platform/graphics/wince/MediaPlayerProxy.cpp:
      * platform/graphics/wince/PathWinCE.cpp:
      * platform/graphics/wince/PlatformPathWinCE.cpp:
      * platform/graphics/wx/FontCacheWx.cpp:
      * platform/graphics/wx/FontPlatformDataWx.cpp:
      * platform/graphics/wx/IconWx.cpp:
      * platform/graphics/wx/PathWx.cpp:
      * platform/gtk/ErrorsGtk.h:
      * platform/gtk/FileSystemGtk.cpp:
      * platform/gtk/GtkPopupMenu.h:
      * platform/gtk/KeyBindingTranslator.h:
      * platform/gtk/LanguageGtk.cpp:
      * platform/gtk/LocalizedStringsGtk.cpp:
      * platform/gtk/LoggingGtk.cpp:
      * platform/gtk/PasteboardGtk.cpp:
      * platform/image-decoders/ImageDecoder.h:
      * platform/leveldb/LevelDBSlice.h:
      * platform/mac/FileSystemMac.mm:
      * platform/mediastream/MediaStreamSource.h:
      * platform/mock/GeolocationClientMock.h:
      * platform/network/BlobData.h:
      * platform/network/BlobRegistryImpl.h:
      * platform/network/BlobResourceHandle.h:
      * platform/network/Credential.h:
      * platform/network/FormData.h:
      * platform/network/FormDataBuilder.h:
      * platform/network/HTTPParsers.cpp:
      * platform/network/HTTPRequest.h:
      * platform/network/HTTPValidation.cpp:
      * platform/network/ProtectionSpace.h:
      * platform/network/ResourceErrorBase.h:
      * platform/network/SocketStreamErrorBase.h:
      * platform/network/blackberry/DNSBlackBerry.cpp:
      * platform/network/blackberry/DeferredData.h:
      * platform/network/blackberry/NetworkJob.h:
      * platform/network/cf/CookieJarCFNet.cpp:
      * platform/network/curl/CookieJarCurl.cpp:
      * platform/network/curl/ResourceHandleManager.h:
      * platform/network/qt/DnsPrefetchHelper.cpp:
      * platform/network/soup/ResourceRequestSoup.cpp:
      * platform/network/soup/ResourceResponseSoup.cpp:
      * platform/network/win/CookieJarWin.cpp:
      * platform/posix/FileSystemPOSIX.cpp:
      * platform/qt/ClipboardQt.cpp:
      * platform/qt/CookieJarQt.cpp:
      * platform/qt/FileSystemQt.cpp:
      * platform/qt/LanguageQt.cpp:
      * platform/qt/LocalizedStringsQt.cpp:
      * platform/qt/LoggingQt.cpp:
      * platform/qt/PlatformSupport.h:
      * platform/sql/SQLValue.h:
      * platform/sql/SQLiteDatabase.h:
      * platform/sql/SQLiteFileSystem.h:
      * platform/text/DecodeEscapeSequences.h:
      * platform/text/LineEnding.cpp:
      * platform/text/ParserUtilities.h:
      * platform/text/PlatformString.h: Removed.
      * platform/text/RegularExpression.h:
      * platform/text/SegmentedString.h:
      * platform/text/StringWithDirection.h:
      * platform/text/SuffixTree.h:
      * platform/text/TextBreakIteratorICU.cpp:
      * platform/text/TextCodec.cpp:
      * platform/text/TextCodec.h:
      * platform/text/TextCodecLatin1.cpp:
      * platform/text/TextCodecUTF16.cpp:
      * platform/text/TextCodecUserDefined.cpp:
      * platform/text/TextEncoding.cpp:
      * platform/text/blackberry/StringBlackBerry.cpp:
      * platform/text/cf/StringCF.cpp:
      * platform/text/chromium/TextBreakIteratorInternalICUChromium.cpp:
      * platform/text/gtk/TextCodecGtk.cpp:
      * platform/text/mac/StringMac.mm:
      * platform/text/mac/TextCodecMac.cpp:
      * platform/text/qt/TextCodecQt.cpp:
      * platform/text/win/TextCodecWin.h:
      * platform/text/wince/TextBreakIteratorWinCE.cpp:
      * platform/win/BString.cpp:
      * platform/win/DragDataWin.cpp:
      * platform/win/GDIObjectCounter.h:
      * platform/win/LoggingWin.cpp:
      * platform/win/WCDataObject.cpp:
      * platform/wince/DragDataWinCE.cpp:
      * platform/wx/ClipboardWx.cpp:
      * platform/wx/FileSystemWx.cpp:
      * platform/wx/LanguageWx.cpp:
      * platform/wx/LocalizedStringsWx.cpp:
      * platform/wx/LoggingWx.cpp:
      * platform/wx/PasteboardWx.cpp:
      * platform/wx/PopupMenuWx.cpp:
      * plugins/PluginData.h:
      * plugins/PluginDatabase.h:
      * plugins/PluginDebug.cpp:
      * plugins/PluginPackage.h:
      * plugins/PluginStream.h:
      * rendering/style/StyleDashboardRegion.h:
      * storage/Storage.cpp:
      * storage/StorageArea.h:
      * storage/StorageEvent.h:
      * storage/StorageEventDispatcher.h:
      * storage/StorageMap.h:
      * storage/StorageNamespace.h:
      * storage/StorageNamespaceImpl.h:
      * storage/StorageSyncManager.h:
      * storage/StorageTask.h:
      * storage/StorageTracker.h:
      * svg/SVGPathByteStreamBuilder.h:
      * svg/SVGPathParser.h:
      * svg/SVGPathStringSource.h:
      * svg/SVGStyledElement.cpp:
      * svg/animation/SMILTimeContainer.h:
      * svg/graphics/filters/SVGFilterBuilder.cpp:
      * svg/graphics/filters/SVGFilterBuilder.h:
      * testing/Internals.h:
      * workers/DefaultSharedWorkerRepository.cpp:
      * workers/WorkerLocation.cpp:
      * workers/WorkerThread.cpp:
      * xml/DOMParser.cpp:
      * xml/NativeXPathNSResolver.cpp:
      * xml/XMLSerializer.cpp:
      * xml/XMLSerializer.h:
      * xml/XPathExpression.cpp:
      * xml/XPathValue.h:
      * xml/XSLTUnicodeSort.cpp:
      
      Source/WebKit/blackberry:
      
      * Api/DumpRenderTreeClient.h:
      * WebCoreSupport/ChromeClientBlackBerry.cpp:
      * WebCoreSupport/InspectorClientBlackBerry.h:
      * WebCoreSupport/JavaScriptDebuggerBlackBerry.cpp:
      * WebKitSupport/AboutData.h:
      
      Source/WebKit/cf:
      
      * WebCoreSupport/WebInspectorClientCF.cpp:
      (WebInspectorClient::createFrontendSettings):
      
      Source/WebKit/chromium:
      
      * src/ContextMenuClientImpl.cpp:
      * src/EditorClientImpl.cpp:
      * src/InspectorFrontendClientImpl.cpp:
      * src/LocalFileSystemChromium.cpp:
      * src/SpeechInputClientImpl.cpp:
      * src/SpeechRecognitionClientProxy.h:
      * src/WebDevToolsAgentImpl.cpp:
      * src/WebDevToolsFrontendImpl.cpp:
      * src/WebDevToolsFrontendImpl.h:
      * src/WebEntities.h:
      * src/WebFrameImpl.h:
      * src/WorkerFileSystemCallbacksBridge.h:
      * tests/UniscribeHelperTest.cpp:
      
      Source/WebKit/efl:
      
      * WebCoreSupport/ChromeClientEfl.cpp:
      * WebCoreSupport/InspectorClientEfl.cpp:
      
      Source/WebKit/gtk:
      
      * WebCoreSupport/ChromeClientGtk.cpp:
      * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
      * WebCoreSupport/InspectorClientGtk.cpp:
      * gdom/ConvertToGCharPrivate.h:
      * webkit/webkitsecurityorigin.cpp:
      * webkit/webkitwebdatasource.cpp:
      * webkit/webkitwebhistoryitem.cpp:
      * webkit/webkitwebresource.cpp:
      
      Source/WebKit/mac:
      
      * History/WebHistoryItem.mm:
      * Misc/WebStringTruncator.mm:
      * Plugins/Hosted/NetscapePluginHostManager.h:
      (NetscapePluginHostManager):
      * Plugins/WebPluginController.mm:
      * Storage/WebStorageTrackerClient.mm:
      * WebCoreSupport/WebChromeClient.mm:
      * WebCoreSupport/WebEditorClient.mm:
      * WebCoreSupport/WebFrameLoaderClient.mm:
      * WebCoreSupport/WebIconDatabaseClient.mm:
      * WebCoreSupport/WebInspectorClient.h:
      (WebInspectorClient):
      (WebInspectorFrontendClient):
      * WebView/WebRenderLayer.mm:
      * WebView/WebViewData.h:
      
      Source/WebKit/qt:
      
      * Api/qwebdatabase_p.h:
      * Api/qwebframe_p.h:
      * Api/qwebhistory.cpp:
      * Api/qwebhistoryinterface.cpp:
      * Api/qwebpage_p.h:
      * Api/qwebsettings.cpp:
      * WebCoreSupport/ChromeClientQt.h:
      * WebCoreSupport/InspectorClientQt.cpp:
      
      Source/WebKit/win:
      
      * DOMCSSClasses.cpp:
      * DefaultPolicyDelegate.cpp:
      * MarshallingHelpers.cpp:
      * WebCoreSupport/WebInspectorClient.h:
      * WebDownload.h:
      * WebFrame.h:
      * WebHistoryItem.h:
      * WebIconDatabase.cpp:
      * WebKitDLL.h:
      * WebKitGraphics.cpp:
      * WebKitSystemBits.cpp:
      * WebLocalizableStrings.cpp:
      * WebNotificationCenter.cpp:
      * WebResource.h:
      
      Source/WebKit/wx:
      
      * WebFrame.cpp:
      * WebKitSupport/ChromeClientWx.cpp:
      * WebKitSupport/EditorClientWx.cpp:
      * WebKitSupport/FrameLoaderClientWx.cpp:
      * WebKitSupport/InspectorClientWx.cpp:
      * WebSettings.cpp:
      * WebView.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3f5ab024
  10. 04 Sep, 2012 1 commit
    • jpfau@apple.com's avatar
      Make plugins respect third-party storage blocking setting · 45aa6587
      jpfau@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=94888
      
      Reviewed by Brady Eidson.
      
      Source/WebCore:
      
      Added functions for discerning if a plugin should be able to access its storage in its current origin.
      
      Tests: http/tests/security/cross-origin-plugin-allowed.html
             http/tests/security/cross-origin-plugin.html
      
      * WebCore.exp.in: Export FrameTree::top and SecurityOrigin::canAccessStorage
      * page/SecurityOrigin.h: Added canAccessPluginStorage
      (WebCore::SecurityOrigin::canAccessPluginStorage):
      
      Source/WebKit2:
      
      Plugins that are in a third-party context should be put into private browsing mode so their storage is temporary.
      
      * WebProcess/Plugins/PluginView.cpp:
      (WebKit::PluginView::isPrivateBrowsingEnabled): Put the plugin into private browsing mode if it is in a third-party context.
      (WebKit::PluginView::privateBrowsingStateChanged): Make sure a plugin doesn't leave private browsing mode if it's in a third-party context.
      
      LayoutTests:
      
      Created tests for plugins in a third party and first party context when third-party blocking is on and off.
      
      * http/tests/security/cross-origin-plugin-allowed-expected.txt: Added.
      * http/tests/security/cross-origin-plugin-allowed.html: Added.
      * http/tests/security/cross-origin-plugin-expected.txt: Added.
      * http/tests/security/cross-origin-plugin-private-browsing-toggled-allowed-expected.txt: Added.
      * http/tests/security/cross-origin-plugin-private-browsing-toggled-allowed.html: Added.
      * http/tests/security/cross-origin-plugin-private-browsing-toggled-expected.txt: Added.
      * http/tests/security/cross-origin-plugin-private-browsing-toggled.html: Added.
      * http/tests/security/cross-origin-plugin.html: Added.
      * http/tests/security/resources/cross-origin-iframe-for-plugin.html: Added.
      * http/tests/security/resources/cross-origin-iframe-for-plugin-async.html: Added.
      * platform/mac-wk2/http/tests/security/cross-origin-plugin-expected.txt: Added.
      * platform/mac-wk2/http/tests/security/cross-origin-plugin-private-browsing-toggled-expected.txt: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      45aa6587
  11. 28 Aug, 2012 1 commit
    • jpfau@apple.com's avatar
      Make shared workers respect third-party storage blocking setting · 215fa47f
      jpfau@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=94559
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      Shared workers can fundamentally leak information between pages in
      different contexts if the workers can be accessed from a third-party
      context. Thus, if third-party storage blocking is enabled, shared
      workers should be disallowed in third-party contexts.
      
      Tests: http/tests/security/cross-origin-shared-worker-allowed.html
             http/tests/security/cross-origin-shared-worker.html
      
      * page/SecurityOrigin.h: Add canAccessSharedWorkers function
      (WebCore::SecurityOrigin::canAccessSharedWorkers):
      * workers/SharedWorker.cpp:
      (WebCore::SharedWorker::create): Ensure that we can access shared workers before creating the worker.
      
      LayoutTests:
      
      Created tests for accessing shared workers from a third party and first party when third-party blocking is on and off.
      
      * http/tests/security/cross-origin-shared-worker-allowed-expected.txt: Added.
      * http/tests/security/cross-origin-shared-worker-allowed.html: Added.
      * http/tests/security/cross-origin-shared-worker-expected.txt: Added.
      * http/tests/security/cross-origin-shared-worker.html: Added.
      * http/tests/security/resources/cross-origin-iframe-for-shared-worker.html: Added.
      * http/tests/security/resources/shared-worker.js: Added.
      (self.addEventListener):
      * platform/chromium/TestExpectations: Shared workers are not supported in chromium DRT
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126912 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      215fa47f
  12. 27 Aug, 2012 1 commit
    • commit-queue@webkit.org's avatar
      'self' in a CSP directive should match blob: and filesystem: URLs. · 3fde8622
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=94918
      
      Patch by Mike West <mkwst@chromium.org> on 2012-08-27
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      'blob:' and 'filesystem:' URLs are same-origin with the page on which
      they were created. Currently, we're using the wrong URL for comparison
      when matching against CSP directive source lists. This patch adjusts the
      matching logic to compare against the blob's inner URL, rather than
      directly against the blob itself.
      
      Tests: http/tests/security/contentSecurityPolicy/blob-urls-match-self.html
             http/tests/security/contentSecurityPolicy/filesystem-urls-match-self.html
             http/tests/security/contentSecurityPolicy/source-list-parsing-08.html
      
      * page/ContentSecurityPolicy.cpp:
      (WebCore::CSPSourceList::matches):
          If we should use the inner URL of a given resource, extract it into
          a local variable, and pass that into CSPSource for comparison.
      * page/SecurityOrigin.cpp:
      (WebCore::SecurityOrigin::shouldUseInnerURL):
      (WebCore::SecurityOrigin::extractInnerURL):
          Move shouldUseInnerURL and extractInnerURL to SecurityOrigin's
          public signature.
      (WebCore::shouldTreatAsUniqueOrigin):
      (WebCore::SecurityOrigin::create):
      (WebCore::SecurityOrigin::isSecure):
          shouldUseInnerURL and extractInnerURL are now static methods of
          SecurityOrigin: updating calls to mathc.
      * page/SecurityOrigin.h:
      
      LayoutTests:
      
      * http/tests/security/contentSecurityPolicy/blob-urls-match-self-expected.txt: Added.
      * http/tests/security/contentSecurityPolicy/blob-urls-match-self.html: Added.
      * http/tests/security/contentSecurityPolicy/filesystem-urls-match-self-expected.txt: Added.
      * http/tests/security/contentSecurityPolicy/filesystem-urls-match-self.html: Added.
          Test the new functionality.
      * http/tests/security/contentSecurityPolicy/resources/multiple-iframe-test.js:
      (test):
          Adding support for data: URLs.
      * http/tests/security/contentSecurityPolicy/source-list-parsing-08-expected.txt: Added.
      * http/tests/security/contentSecurityPolicy/source-list-parsing-08.html: Added.
          Adding data: URL tests to ensure that grabbing the inner URL of the
          URL to test doesn't inadvertently regress that behavior.
      * platform/efl/Skipped:
      * platform/mac/Skipped:
      * platform/qt/Skipped:
      * platform/win/Skipped:
          Skipping filessytem test on ports where it's not enabled.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126785 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3fde8622
  13. 22 Aug, 2012 1 commit
    • jpfau@apple.com's avatar
      Allow blocking of Web SQL databases in third-party web workers · bcbbf661
      jpfau@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=94170
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      Web workers did not previously know anything about the document that
      spawned them. This is undefined for shared workers, but for dedicated
      workers, we now pipe the information through.
      
      Tests: http/tests/security/cross-origin-worker-websql-allowed.html
             http/tests/security/cross-origin-worker-websql.html
      
      * Modules/webdatabase/WorkerContextWebDatabase.cpp: Pass information about the top origin to canAccessDatabase
      (WebCore::WorkerContextWebDatabase::openDatabase):
      (WebCore::WorkerContextWebDatabase::openDatabaseSync):
      * WebCore.exp.in: Make SecurityOrigin::isolatedCopy const
      * page/SecurityOrigin.cpp:
      (WebCore::SecurityOrigin::isolatedCopy):
      (WebCore::SecurityOrigin::canAccessStorage):
      * page/SecurityOrigin.h:
      * workers/DedicatedWorkerContext.cpp: Pass topOrigin
      (WebCore::DedicatedWorkerContext::create):
      (WebCore::DedicatedWorkerContext::DedicatedWorkerContext):
      * workers/DedicatedWorkerContext.h:
      (DedicatedWorkerContext):
      * workers/DedicatedWorkerThread.cpp: Pass topOrigin
      (WebCore::DedicatedWorkerThread::create):
      (WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
      (WebCore::DedicatedWorkerThread::createWorkerContext):
      * workers/DedicatedWorkerThread.h:
      (DedicatedWorkerThread):
      * workers/SharedWorkerContext.cpp: Pass topOrigin
      (WebCore::SharedWorkerContext::SharedWorkerContext):
      * workers/SharedWorkerThread.cpp:
      (WebCore::SharedWorkerThread::SharedWorkerThread):
      (WebCore::SharedWorkerThread::createWorkerContext):
      * workers/SharedWorkerThread.h:
      (SharedWorkerThread): Pass topOrigin
      * workers/WorkerContext.cpp:
      (WebCore::WorkerContext::WorkerContext):
      * workers/WorkerContext.h:
      (WebCore::WorkerContext::topOrigin):
      (WorkerContext):
      * workers/WorkerMessagingProxy.cpp: Pass topOrigin
      (WebCore::WorkerMessagingProxy::startWorkerContext):
      * workers/WorkerThread.cpp:
      (WebCore::WorkerThreadStartupData::create):
      (WorkerThreadStartupData):
      (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
      (WebCore::WorkerThread::WorkerThread):
      (WebCore::WorkerThread::workerThread):
      * workers/WorkerThread.h:
      (WorkerThread):
      
      Source/WebKit/chromium:
      
      Web workers did not previously know anything about the document that
      spawned them. This is undefined for shared workers, but for dedicated
      workers, we now pipe the information through.
      
      * src/WebWorkerClientImpl.cpp:
      (WebKit::WebWorkerClientImpl::startWorkerContext): Pass top document's origin
      
      LayoutTests:
      
      Created tests for accessing openDatabase from a third party and first party dedicated workers when third-party blocking is on and off.
      
      * http/tests/security/cross-origin-worker-websql-allowed-expected.txt: Added.
      * http/tests/security/cross-origin-worker-websql-allowed.html: Added.
      * http/tests/security/cross-origin-worker-websql-expected.txt: Added.
      * http/tests/security/cross-origin-worker-websql.html: Added.
      * http/tests/security/resources/cross-origin-iframe-for-worker-websql.html: Added.
      * http/tests/security/resources/document-for-cross-origin-worker-websql.html: Added.
      * http/tests/security/resources/worker-for-websql.js: Added.
      (self.onmessage):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126365 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bcbbf661
  14. 16 Aug, 2012 1 commit
    • jpfau@apple.com's avatar
      Allow blocking of Web SQL databases in third-party documents · 5a0c1173
      jpfau@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=94057
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      Add a check for pages in third-party pages to allow third-party storage blocking of Web SQL databases.
      
      Tests: http/tests/security/cross-origin-websql-allowed.html
             http/tests/security/cross-origin-websql.html
      
      * Modules/webdatabase/DOMWindowWebDatabase.cpp:
      (WebCore::DOMWindowWebDatabase::openDatabase): Pass top origin to canAccessDatabase
      * page/SecurityOrigin.cpp:
      (WebCore::SecurityOrigin::canAccessStorage): Common method for various types of storage that use the same criteria
      * page/SecurityOrigin.h:
      (WebCore::SecurityOrigin::canAccessDatabase): Use canAccessStorage
      (WebCore::SecurityOrigin::canAccessLocalStorage): Change to using canAccessStorage
      (SecurityOrigin):
      
      LayoutTests:
      
      Created tests for accessing openDatabase from a third party and first party context when third-party blocking is on and off.
      
      * http/tests/security/cross-origin-websql-allowed-expected.txt: Added.
      * http/tests/security/cross-origin-websql-allowed.html: Added.
      * http/tests/security/cross-origin-websql-expected.txt: Added.
      * http/tests/security/cross-origin-websql.html: Added.
      * http/tests/security/resources/cross-origin-iframe-for-websql.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125736 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5a0c1173
  15. 10 Aug, 2012 1 commit
    • jpfau@apple.com's avatar
      Allow blocking of third-party localStorage and sessionStorage · d9930b31
      jpfau@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=93390
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      Add checks for if a page is third-party and third-party storage blocking is enabled while accessing storage.
      
      Tests: http/tests/security/cross-origin-local-storage-allowed.html
             http/tests/security/cross-origin-local-storage.html
             http/tests/security/cross-origin-session-storage-allowed.html
             http/tests/security/cross-origin-session-storage.html
             http/tests/security/same-origin-document-domain-storage-allowed.html
      
      * dom/Document.cpp:
      (WebCore::Document::initSecurityContext): Initialize securityOrigin with knowledge of if we should block third-party storage.
      * page/DOMWindow.cpp: Check if the origin trying to access storage is third-party relative to the top document.
      (WebCore::DOMWindow::sessionStorage):
      (WebCore::DOMWindow::localStorage):
      * page/SecurityOrigin.cpp: Add a call in Security origin to see if another origin counts as a third-party.
      (WebCore::SecurityOrigin::SecurityOrigin):
      (WebCore::SecurityOrigin::canAccessLocalStorage):
      (WebCore):
      (WebCore::SecurityOrigin::isThirdParty):
      * page/SecurityOrigin.h:
      (WebCore::SecurityOrigin::blockThirdPartyStorage):
      (SecurityOrigin):
      * testing/InternalSettings.cpp: Add an internals.settings hook for setting third-party storage blocking enabled.
      (WebCore::InternalSettings::setThirdPartyStorageBlockingEnabled):
      (WebCore):
      * testing/InternalSettings.h:
      (InternalSettings):
      * testing/InternalSettings.idl:
      
      LayoutTests:
      
      Created tests for testing accessing localStorage and selfStorage from a third party and first party when third-party blocking is on and off.
      
      * http/tests/security/cross-origin-local-storage-allowed-expected.txt: Added.
      * http/tests/security/cross-origin-local-storage-allowed.html: Added.
      * http/tests/security/cross-origin-local-storage-expected.txt: Added.
      * http/tests/security/cross-origin-local-storage.html: Added.
      * http/tests/security/cross-origin-session-storage-allowed-expected.txt: Added.
      * http/tests/security/cross-origin-session-storage-allowed.html: Added.
      * http/tests/security/cross-origin-session-storage-expected.txt: Added.
      * http/tests/security/cross-origin-session-storage.html: Added.
      * http/tests/security/same-origin-document-domain-storage-allowed-expected.html: Added.
      * http/tests/security/same-origin-document-domain-storage-allowed.html: Added.
      * http/tests/security/resources/document-domain-iframe-for-local-storage.html: Added.
      * http/tests/security/resources/cross-origin-iframe-for-local-storage.html: Added.
      * http/tests/security/resources/cross-origin-iframe-for-session-storage.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125335 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d9930b31
  16. 09 Jun, 2012 1 commit
    • commit-queue@webkit.org's avatar
      Source/WebCore: Treat blob: and filesystem: URLs generated via secure origins as secure. · 55e5bfb0
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=84054
      
      Loading a blob: or filesystem: URL into an iframe or image that's
      contained on an HTTPS page shouldn't generate a mixed content warning.
      This change adds a SecurityOrigin::isSecure to check both against a
      URLs protocol, and the protocol of it's so-called "inner URL" if it's
      the type of URL that has such a thing. These sorts of URLs which are
      generated from secure sources will themselves be treated as secure.
      
      Patch by Mike West <mkwst@chromium.org> on 2012-06-08
      Reviewed by Adam Barth.
      
      Tests: http/tests/security/mixedContent/blob-url-in-iframe.html
             http/tests/security/mixedContent/filesystem-url-in-iframe.html
      
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::isMixedContent):
      * page/SecurityOrigin.cpp:
      (WebCore):
      (WebCore::SecurityOrigin::isSecure):
      * page/SecurityOrigin.h:
      (SecurityOrigin):
      
      LayoutTests: Excluding blob: and filesystem: schemes from the mixed content check.
      https://bugs.webkit.org/show_bug.cgi?id=84054
      
      Patch by Mike West <mkwst@chromium.org> on 2012-06-08
      Reviewed by Adam Barth.
      
      * http/tests/security/mixedContent/blob-url-in-iframe-expected.txt: Added.
      * http/tests/security/mixedContent/blob-url-in-iframe.html: Added.
      * http/tests/security/mixedContent/filesystem-url-in-iframe-expected.txt: Added.
      * http/tests/security/mixedContent/filesystem-url-in-iframe.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119883 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      55e5bfb0
  17. 21 Mar, 2012 1 commit
    • jonlee@apple.com's avatar
      Restrict access to notifications for unique origins and file URLs with no local file access · d4ac1bd7
      jonlee@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=79704
      <rdar://problem/10912430>
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      Before checking or requesting permissions, we look at whether we can show notifications based on
      the security context. If not, we short circuit and do not forward the request to the client.
      
      * notifications/Notification.cpp:
      (WebCore::Notification::Notification): Fix a bug where creating a notification goes through slightly
      different logic for checking permissions than when checking permissions through the
      notification center.
      * notifications/NotificationCenter.cpp:
      (WebCore::NotificationCenter::checkPermission): Check to see if the origin can show notifications.
      (WebCore::NotificationCenter::requestPermission): If we know whether an origin can show notifications,
      we asynchronously call the callback with that decision. Otherwise we ask the client.
      
      Add new variable in the notification center to keep track of pending callbacks when we short-circuit
      requestPermission().
      * notifications/NotificationCenter.h:
      (NotificationRequestCallback): Add new private class encapsulating the callback.
      * notifications/NotificationCenter.cpp:
      (WebCore::NotificationCenter::requestTimedOut): Remove the request from the set of pending callbacks.
      (WebCore::NotificationCenter::NotificationRequest::createAndStartTimer): Because this is used when we already
      know the decision, and are not asking the client to decide, we can immediately trigger a one-shot timer
      to invoke the callback.
      (WebCore::NotificationCenter::NotificationRequest::NotificationRequest):
      (WebCore::NotificationCenter::NotificationRequest::startTimer):
      (WebCore::NotificationCenter::NotificationRequest::timerFired): Invoke the callback and tell the notification
      center.
      * page/SecurityOrigin.h: Add new toRawString() method to return the string representation of the origin,
      regardless of any restrictions that might otherwise cause toString() to return "null".
      * page/SecurityOrigin.cpp:
      (WebCore::SecurityOrigin::canShowNotifications): Added to return a tri-state regarding whether we know
      the origin can show notifications. If the origin is unique, we never let it show. If the origin has
      universal access, we always let it show. Otherwise the client should be asked.
      (WebCore::SecurityOrigin::toString): Refactor to use toRawString().
      (WebCore::SecurityOrigin::toRawString):
      
      Added FIXME's regarding the naming of enforceFilePathSeparation().
      * dom/Document.cpp:
      (WebCore::Document::initSecurityContext): Also, tab reformatting.
      
      * WebCore.exp.in: Export toRawString().
      
      Source/WebKit2:
      
      In the specific case where a file URL has restricted file access and is denied universal access,
      SecurityOrigin::canShowNotifications() returns Ask, since it is not considered a unique origin.
      The cached table of permissions held by the notification manager will typically not have an entry for
      the toString() representation of these file URLs, which is "null", since that can also cover unique
      origins, and it is possible that the client will want different permissions between the two types.
      
      It is reasonable, however, for there to be an entry for "file://", so we use toRawString() to do the lookup.
      
      * WebProcess/Notifications/WebNotificationManager.cpp:
      (WebKit::WebNotificationManager::policyForOrigin):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d4ac1bd7
  18. 20 Mar, 2012 2 commits
    • ossy@webkit.org's avatar
      Unreviewed, rolling out r111445 and r111446. · a77092f2
      ossy@webkit.org authored
      http://trac.webkit.org/changeset/111445
      http://trac.webkit.org/changeset/111446
      https://bugs.webkit.org/show_bug.cgi?id=81708
      
      It broke Qt and GTK build intentionally (Requested by Ossy on
      #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-03-20
      
      Source/WebCore:
      
      * WebCore.exp.in:
      * dom/Document.cpp:
      (WebCore::Document::initSecurityContext):
      * notifications/Notification.cpp:
      (WebCore::Notification::Notification):
      * notifications/NotificationCenter.cpp:
      (WebCore::NotificationCenter::checkPermission):
      (WebCore::NotificationCenter::requestPermission):
      * notifications/NotificationCenter.h:
      (NotificationCenter):
      * page/SecurityOrigin.cpp:
      (WebCore::SecurityOrigin::toString):
      * page/SecurityOrigin.h:
      (SecurityOrigin):
      
      Source/WebKit2:
      
      * WebProcess/Notifications/WebNotificationManager.cpp:
      (WebKit::WebNotificationManager::policyForOrigin):
      
      LayoutTests:
      
      * platform/chromium/test_expectations.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111455 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a77092f2
    • jonlee@apple.com's avatar
      Restrict access to notifications for unique origins and file URLs with no local file access · c09383c6
      jonlee@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=79704
      <rdar://problem/10912430>
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      Before checking or requesting permissions, we look at whether we can show notifications based on
      the security context. If not, we short circuit and do not forward the request to the client.
      
      * notifications/Notification.cpp:
      (WebCore::Notification::Notification): Fix a bug where creating a notification goes through slightly
      different logic for checking permissions than when checking permissions through the
      notification center.
      * notifications/NotificationCenter.cpp:
      (WebCore::NotificationCenter::checkPermission): Check to see if the origin can show notifications.
      (WebCore::NotificationCenter::requestPermission): If we know whether an origin can show notifications,
      we asynchronously call the callback with that decision. Otherwise we ask the client.
      
      Add new variable in the notification center to keep track of pending callbacks when we short-circuit
      requestPermission().
      * notifications/NotificationCenter.h:
      (NotificationRequestCallback): Add new private class encapsulating the callback.
      * notifications/NotificationCenter.cpp:
      (WebCore::NotificationCenter::requestTimedOut): Remove the request from the set of pending callbacks.
      (WebCore::NotificationCenter::NotificationRequest::createAndStartTimer): Because this is used when we already
      know the decision, and are not asking the client to decide, we can immediately trigger a one-shot timer
      to invoke the callback.
      (WebCore::NotificationCenter::NotificationRequest::NotificationRequest):
      (WebCore::NotificationCenter::NotificationRequest::startTimer):
      (WebCore::NotificationCenter::NotificationRequest::timerFired): Invoke the callback and tell the notification
      center.
      * page/SecurityOrigin.h: Add new toRawString() method to return the string representation of the origin,
      regardless of any restrictions that might otherwise cause toString() to return "null".
      * page/SecurityOrigin.cpp:
      (WebCore::SecurityOrigin::canShowNotifications): Added to return a tri-state regarding whether we know
      the origin can show notifications. If the origin is unique, we never let it show. If the origin has
      universal access, we always let it show. Otherwise the client should be asked.
      (WebCore::SecurityOrigin::toString): Refactor to use toRawString().
      (WebCore::SecurityOrigin::toRawString):
      
      Added FIXME's regarding the naming of enforceFilePathSeparation().
      * dom/Document.cpp:
      (WebCore::Document::initSecurityContext): Also, tab reformatting.
      
      * WebCore.exp.in: Export toRawString().
      
      Source/WebKit2:
      
      In the specific case where a file URL has restricted file access and is denied universal access,
      SecurityOrigin::canShowNotifications() returns Ask, since it is not considered a unique origin.
      The cached table of permissions held by the notification manager will typically not have an entry for
      the toString() representation of these file URLs, which is "null", since that can also cover unique
      origins, and it is possible that the client will want different permissions between the two types.
      
      It is reasonable, however, for there to be an entry for "file://", so we use toRawString() to do the lookup.
      
      * WebProcess/Notifications/WebNotificationManager.cpp:
      (WebKit::WebNotificationManager::policyForOrigin):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111445 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c09383c6
  19. 18 Nov, 2011 1 commit
    • abarth@webkit.org's avatar
      Unique SecurityOrigins shouldn't remember their old schemes and hosts · 435c7597
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=71745
      
      Reviewed by Darin Adler.
      
      This is the final step in this series of patches.
      
      This patch removes the forceUnique flag from SecurityOrigin::create.
      Now, we create unique origins without passing in the document's URL,
      preventing information from the document's URL from leaking into the
      unique origin.
      
      * WebCore.exp.in:
      * dom/Document.cpp:
      (WebCore::Document::setIsViewSource):
      (WebCore::Document::initSecurityContext):
      * loader/cache/MemoryCache.cpp:
      (WebCore::MemoryCache::getOriginsWithCache):
          - Update this callsite to use createFromString, which does exactly
            what this code is doing manually.
      * page/SecurityOrigin.cpp:
      (WebCore::SecurityOrigin::create):
      * page/SecurityOrigin.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@100716 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      435c7597
  20. 17 Nov, 2011 2 commits
    • abarth@webkit.org's avatar
      Refactor SecurityOrigin::create to be easier to understand · 916250e3
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=72342
      
      Reviewed by Eric Seidel.
      
      Over time, the SecurityOrigin constructor has grown a bit out of
      control.  This patch attempts to separate the different concerns into
      free functions.  The general approach is to put more logic in the
      "create" function and introduce a simple constructor for unique
      origins.
      
      This patch shouldn't change any behavior.
      
      * page/SecurityOrigin.cpp:
      (WebCore::schemeRequiresAuthority):
      (WebCore::shouldUseInnerURL):
      (WebCore::extractInnerURL):
      (WebCore::isDirectory):
      (WebCore::shouldTreatAsUniqueOrigin):
      (WebCore::SecurityOrigin::SecurityOrigin):
      (WebCore::SecurityOrigin::create):
      (WebCore::SecurityOrigin::createUnique):
      (WebCore::SecurityOrigin::databaseIdentifier):
      * page/SecurityOrigin.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@100691 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      916250e3
    • abarth@webkit.org's avatar
      Unique origins shouldn't remember their scheme, host, or port · e864323f
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=72308
      
      Reviewed by Eric Seidel.
      
      Source/WebCore: 
      
      This patch contains the bulk (all?) of the behavior differences in this
      patch series.  Unique origins shouldn't remember their schemes.  Doing
      so causes some privileges (e.g., local access) to leak into unique
      origins.
      
      * page/SecurityOrigin.cpp:
      (WebCore::SecurityOrigin::SecurityOrigin):
          - Explicitly clear out the protocol, host, and port for unique
            origins.  A future patch will refactor all this code to be more
            elegant.
      * platform/SchemeRegistry.cpp:
      (WebCore::schemesWithUniqueOrigins):
          - Merge "about" and "javascript" in with the general case now that
            we don't have a separate notion of an empty origin.
      
      LayoutTests: 
      
      * fast/frames/resources/sandboxed-iframe-storage-disallowed.html:
          - Inline script because the sandbox iframe isn't allowed to load
            local resources.
      * fast/frames/sandboxed-iframe-attribute-parsing.html:
      * fast/frames/sandboxed-iframe-forms-dynamic.html:
      * fast/frames/sandboxed-iframe-forms.html:
      * fast/frames/sandboxed-iframe-navigation-top-by-constant-name.html:
      * fast/frames/sandboxed-iframe-navigation-top-by-constant-name2.html:
      * fast/frames/sandboxed-iframe-navigation-top-by-name.html:
      * fast/frames/sandboxed-iframe-navigation-top.html:
      * media/video-controls-no-scripting.html:
          - Previously sandboxed local iframes still got universal access
            when we're running with universal access for file URLs!  Now that
            they correctly get unique origins, we need to update these tests
            to allow-same-origin access in order for them to function
            properly.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@100663 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e864323f
  21. 14 Nov, 2011 2 commits
  22. 09 Nov, 2011 1 commit
    • abarth@webkit.org's avatar
      Move static "policy" state from SecurityOrigin.cpp to SecurityPolicy.cpp · eea9066c
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=71755
      
      Reviewed by Eric Seidel.
      
      Source/WebCore: 
      
      The SecurityOrigin class should be focused on representing a web
      security origin rather than being a dumping ground for all
      security-related state.  This patch moves a bunch of static "policy"
      state into its own SecurityPolicy class.
      
      * WebCore.exp.in:
      * WebCore.gypi:
      * dom/Document.cpp:
      (WebCore::Document::initSecurityContext):
      * html/HTMLAnchorElement.cpp:
      (WebCore::HTMLAnchorElement::handleClick):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::loadFrameRequest):
      (WebCore::FrameLoader::loadResourceSynchronously):
      * loader/PingLoader.cpp:
      (WebCore::PingLoader::loadImage):
      (WebCore::PingLoader::sendPing):
      (WebCore::PingLoader::reportContentSecurityPolicyViolation):
      * loader/SubframeLoader.cpp:
      (WebCore::SubframeLoader::loadSubframe):
      * loader/SubresourceLoader.cpp:
      (WebCore::SubresourceLoader::create):
      * page/SecurityOrigin.cpp:
      (WebCore::SecurityOrigin::canRequest):
      (WebCore::SecurityOrigin::canDisplay):
      (WebCore::SecurityOrigin::grantLoadLocalResources):
      * page/SecurityOrigin.h:
      
      Source/WebKit/chromium: 
      
      * src/WebFrameImpl.cpp:
      (WebKit::WebFrameImpl::setReferrerForRequest):
      * src/WebSecurityPolicy.cpp:
      (WebKit::WebSecurityPolicy::addOriginAccessWhitelistEntry):
      (WebKit::WebSecurityPolicy::removeOriginAccessWhitelistEntry):
      (WebKit::WebSecurityPolicy::resetOriginAccessWhitelists):
      (WebKit::WebSecurityPolicy::shouldHideReferrer):
      * src/WebViewImpl.cpp:
      (WebKit::WebViewImpl::initializeMainFrame):
      
      Source/WebKit/gtk: 
      
      * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
      (DumpRenderTreeSupportGtk::whiteListAccessFromOrigin):
      (DumpRenderTreeSupportGtk::resetOriginAccessWhiteLists):
      
      Source/WebKit/mac: 
      
      * Plugins/Hosted/HostedNetscapePluginStream.mm:
      (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream):
      * Plugins/WebNetscapePluginStream.mm:
      (WebNetscapePluginStream::WebNetscapePluginStream):
      * WebView/WebView.mm:
      (-[WebView _commonInitializationWithFrameName:groupName:]):
      (+[WebView _addOriginAccessWhitelistEntryWithSourceOrigin:destinationProtocol:destinationHost:allowDestinationSubdomains:]):
      (+[WebView _removeOriginAccessWhitelistEntryWithSourceOrigin:destinationProtocol:destinationHost:allowDestinationSubdomains:]):
      (+[WebView _resetOriginAccessWhitelists]):
      
      Source/WebKit/qt: 
      
      * Api/qwebpage.cpp:
      (QWebPagePrivate::QWebPagePrivate):
      * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
      (DumpRenderTreeSupportQt::whiteListAccessFromOrigin):
      (DumpRenderTreeSupportQt::removeWhiteListAccessFromOrigin):
      (DumpRenderTreeSupportQt::resetOriginAccessWhiteLists):
      
      Source/WebKit/win: 
      
      * WebView.cpp:
      (WebView::addOriginAccessWhitelistEntry):
      (WebView::removeOriginAccessWhitelistEntry):
      (WebView::resetOriginAccessWhitelists):
      
      Source/WebKit2: 
      
      * WebProcess/InjectedBundle/InjectedBundle.cpp:
      (WebKit::InjectedBundle::addOriginAccessWhitelistEntry):
      (WebKit::InjectedBundle::removeOriginAccessWhitelistEntry):
      (WebKit::InjectedBundle::resetOriginAccessWhitelists):
      * WebProcess/Plugins/PluginView.cpp:
      (WebKit::PluginView::loadURL):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      eea9066c
  23. 08 Nov, 2011 1 commit
    • abarth@webkit.org's avatar
      Move DomainRelaxationForbidden scheme registry to SchemeRegistry · 8e056b03
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=71750
      
      Reviewed by Eric Seidel.
      
      Source/WebCore:
      
      As stated in the FIXME, scheme registries belong in SchemeRegistry, not
      in SecurityOrigin.
      
      * WebCore.exp.in:
      * dom/Document.cpp:
      (WebCore::Document::setDomain):
      * page/SecurityOrigin.cpp:
      * page/SecurityOrigin.h:
      * platform/SchemeRegistry.cpp:
      (WebCore::schemesForbiddenFromDomainRelaxation):
      (WebCore::SchemeRegistry::setDomainRelaxationForbiddenForURLScheme):
      (WebCore::SchemeRegistry::isDomainRelaxationForbiddenForURLScheme):
      * platform/SchemeRegistry.h:
      
      Source/WebKit/chromium:
      
      * src/WebViewImpl.cpp:
      (WebKit::WebViewImpl::setDomainRelaxationForbidden):
      
      Source/WebKit/mac:
      
      * WebView/WebView.mm:
      (+[WebView _setDomainRelaxationForbidden:forURLScheme:]):
      
      Source/WebKit/qt:
      
      * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
      (DumpRenderTreeSupportQt::setDomainRelaxationForbiddenForURLScheme):
      
      Source/WebKit/win:
      
      * WebView.cpp:
      (WebView::setDomainRelaxationForbiddenForURLScheme):
      
      Source/WebKit2:
      
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::setDomainRelaxationForbiddenForURLScheme):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99509 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8e056b03
  24. 07 Nov, 2011 2 commits
    • abarth@webkit.org's avatar
      Move parseSandboxPolicy to SecurityContext · 63b48a34
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=71732
      
      Reviewed by Eric Seidel.
      
      As requested by Eric, this patch resolves a layering inversion.  Now
      that we have SecurityContext to hold the sandbox bits and the origin,
      it's a logical place to put the parser for sandbox policies.
      
      * dom/SecurityContext.cpp:
      (WebCore::SecurityContext::parseSandboxPolicy):
      * dom/SecurityContext.h:
      * html/HTMLIFrameElement.cpp:
      (WebCore::HTMLIFrameElement::parseMappedAttribute):
      * page/ContentSecurityPolicy.cpp:
      (WebCore::ContentSecurityPolicy::applySandboxPolicy):
      * page/SecurityOrigin.cpp:
      * page/SecurityOrigin.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      63b48a34
    • abarth@webkit.org's avatar
      Factor SecurityContext out of ScriptExecutionContext · 43ef0fda
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=71721
      
      Reviewed by Eric Seidel.
      
      The new SecurityContext object lets us tightly scope control of
      the security-critical information in ScriptExecutionContext.
      Originally I had hoped to put all this state on SecurityOrigin, but
      SecurityOrigin gets shared between documents in some corner cases, so
      it's not a good fit for state like the sandbox flags and the CSP policy
      that really needs to be per-document.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * dom/DOMAllInOne.cpp:
      * dom/ScriptExecutionContext.cpp:
      (WebCore::ScriptExecutionContext::ScriptExecutionContext):
      * dom/ScriptExecutionContext.h:
      * loader/FrameLoader.h:
      * loader/FrameLoaderTypes.h:
      * page/SecurityOrigin.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99464 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      43ef0fda
  25. 05 Nov, 2011 1 commit
    • abarth@webkit.org's avatar
      JavaScript URLs execute in sandboxed iframes · 29f0c1ad
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=71599
      
      Reviewed by Eric Seidel.
      
      Source/WebCore: 
      
      This patch fixes the intentional regression I introduced earlier today
      by moving the sandbox bits from SecurityOrigin to Document. In the
      process, I renamed SecurityOrigin::createEmpty to
      SecurityOrigin::createUnique to better align with HTML5 terminology.
      
      * WebCore.exp.in:
      * bindings/ScriptControllerBase.cpp:
      (WebCore::ScriptController::canExecuteScripts):
      * dom/Document.cpp:
      (WebCore::Document::setIsViewSource):
      (WebCore::Document::initSecurityContext):
      * dom/ScriptExecutionContext.cpp:
      (WebCore::ScriptExecutionContext::ScriptExecutionContext):
      * dom/ScriptExecutionContext.h:
      (WebCore::ScriptExecutionContext::sandboxFlags):
      (WebCore::ScriptExecutionContext::enforceSandboxFlags):
      (WebCore::ScriptExecutionContext::isSandboxed):
      * html/HTMLAppletElement.cpp:
      (WebCore::HTMLAppletElement::canEmbedJava):
      * loader/DocumentWriter.cpp:
      (WebCore::DocumentWriter::begin):
      * loader/FrameLoader.cpp:
      (WebCore::isDocumentSandboxed):
      (WebCore::FrameLoader::addHTTPOriginIfNeeded):
      * loader/PolicyChecker.cpp:
      (WebCore::PolicyChecker::checkNewWindowPolicy):
      * loader/SubframeLoader.cpp:
      (WebCore::SubframeLoader::requestPlugin):
      * page/SecurityOrigin.cpp:
      (WebCore::SecurityOrigin::SecurityOrigin):
      (WebCore::SecurityOrigin::create):
      (WebCore::SecurityOrigin::createUnique):
      * page/SecurityOrigin.h:
      
      LayoutTests: 
      
      Update results to show progression.
      
      * fast/frames/sandboxed-iframe-scripting-expected.txt:
      * fast/frames/sandboxed-iframe-scripting.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99347 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      29f0c1ad
  26. 03 Nov, 2011 3 commits
    • abarth@webkit.org's avatar
      Implement allow-popups for iframe@sandbox · 82d25a44
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=66505
      
      Reviewed by Eric Seidel.
      
      Source/WebCore: 
      
      There's been some discussion in the HTML working group about adding an
      allow-popups directive to the iframe sandbox.  Microsoft has added it
      to IE10 platform preview and is fairly adamant about this feature
      because it's needed by one or their products that's planning to use
      iframe sandbox.  Hixie says he'll add it to the spec once we implement
      it, so here's our implementation.  (See discussion in the W3C linked in
      the bug for more details.)
      
      This patch lands most of the infrastructure for this feature, but it
      doesn't actually enable the feature.  I'll enable it in a follow-up
      patch.
      
      Tests: http/tests/security/popup-allowed-by-sandbox-is-sandboxed-control.html
             http/tests/security/popup-allowed-by-sandbox-is-sandboxed.html
             http/tests/security/popup-allowed-by-sandbox-when-allowed.html
      
      * html/HTMLIFrameElement.cpp:
      (WebCore::HTMLIFrameElement::parseMappedAttribute):
      * loader/FrameLoader.h:
      (WebCore::FrameLoader::forceSandboxFlags):
      * loader/FrameLoaderTypes.h:
      * page/SecurityOrigin.cpp:
      (WebCore::SecurityOrigin::parseSandboxPolicy):
      * page/SecurityOrigin.h:
      (WebCore::SecurityOrigin::sandboxFlags):
      * svg/graphics/SVGImage.cpp:
      (WebCore::SVGImage::dataChanged):
      
      LayoutTests: 
      
      Test that the allow-popups directive works as expected.  Note:
      no-popup-from-sandbox.html verifies that we still block popups without
      the directive.
      
      These tests currently have expected.txt results that show failures, but
      they will pass once this feature is enabled.
      
      * http/tests/security/popup-allowed-by-sandbox-is-sandboxed-control-expected.txt: Added.
      * http/tests/security/popup-allowed-by-sandbox-is-sandboxed-control.html: Added.
      * http/tests/security/popup-allowed-by-sandbox-is-sandboxed-expected.txt: Added.
      * http/tests/security/popup-allowed-by-sandbox-is-sandboxed.html: Added.
      * http/tests/security/popup-allowed-by-sandbox-when-allowed-expected.txt: Added.
      * http/tests/security/popup-allowed-by-sandbox-when-allowed.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99228 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      82d25a44
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r99138. · 6ee40756
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/99138
      https://bugs.webkit.org/show_bug.cgi?id=71455
      
      It made 200+ tests flakey on SL and on Qt (Requested by Ossy
      on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-11-03
      
      Source/WebCore:
      
      * html/HTMLIFrameElement.cpp:
      (WebCore::parseSandboxAttribute):
      (WebCore::HTMLIFrameElement::parseMappedAttribute):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::setOpener):
      (WebCore::createWindow):
      * loader/FrameLoader.h:
      (WebCore::FrameLoader::setForcedSandboxFlags):
      * loader/FrameLoaderTypes.h:
      * loader/PolicyChecker.cpp:
      (WebCore::PolicyChecker::checkNewWindowPolicy):
      * page/SecurityOrigin.cpp:
      * page/SecurityOrigin.h:
      * svg/graphics/SVGImage.cpp:
      (WebCore::SVGImage::dataChanged):
      
      LayoutTests:
      
      * http/tests/security/popup-allowed-by-sandbox-is-sandboxed-control-expected.txt: Removed.
      * http/tests/security/popup-allowed-by-sandbox-is-sandboxed-control.html: Removed.
      * http/tests/security/popup-allowed-by-sandbox-is-sandboxed-expected.txt: Removed.
      * http/tests/security/popup-allowed-by-sandbox-is-sandboxed.html: Removed.
      * http/tests/security/popup-allowed-by-sandbox-when-allowed-expected.txt: Removed.
      * http/tests/security/popup-allowed-by-sandbox-when-allowed.html: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99162 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6ee40756
    • abarth@webkit.org's avatar
      Implement allow-popups for iframe@sandbox · 3eaba4d0
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=66505
      
      Reviewed by Eric Seidel.
      
      Source/WebCore: 
      
      There's been some discussion in the HTML working group about adding an
      allow-popups directive to the iframe sandbox.  Microsoft has added it
      to IE10 platform preview and is fairly adamant about this feature
      because it's needed by one or their products that's planning to use
      iframe sandbox.  Hixie says he'll add it to the spec once we implement
      it, so here's our implementation.  (See discussion in the W3C linked in
      the bug for more details.)
      
      Tests: http/tests/security/popup-allowed-by-sandbox-is-sandboxed-control.html
             http/tests/security/popup-allowed-by-sandbox-is-sandboxed.html
             http/tests/security/popup-allowed-by-sandbox-when-allowed.html
      
      * html/HTMLIFrameElement.cpp:
      (WebCore::HTMLIFrameElement::parseMappedAttribute):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::setOpener):
      (WebCore::createWindow):
      * loader/FrameLoader.h:
      (WebCore::FrameLoader::forceSandboxFlags):
      * loader/FrameLoaderTypes.h:
      * loader/PolicyChecker.cpp:
      (WebCore::PolicyChecker::checkNewWindowPolicy):
      * page/SecurityOrigin.cpp:
      (WebCore::SecurityOrigin::parseSandboxPolicy):
      * page/SecurityOrigin.h:
      (WebCore::SecurityOrigin::sandboxFlags):
      * svg/graphics/SVGImage.cpp:
      (WebCore::SVGImage::dataChanged):
      
      LayoutTests: 
      
      Test that the allow-popups directive works as expected.  Note:
      no-popup-from-sandbox.html verifies that we still block popups without
      the directive.
      
      * http/tests/security/popup-allowed-by-sandbox-is-sandboxed-control-expected.txt: Added.
      * http/tests/security/popup-allowed-by-sandbox-is-sandboxed-control.html: Added.
      * http/tests/security/popup-allowed-by-sandbox-is-sandboxed-expected.txt: Added.
      * http/tests/security/popup-allowed-by-sandbox-is-sandboxed.html: Added.
      * http/tests/security/popup-allowed-by-sandbox-when-allowed-expected.txt: Added.
      * http/tests/security/popup-allowed-by-sandbox-when-allowed.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99138 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3eaba4d0
  27. 25 Oct, 2011 1 commit
    • ggaren@apple.com's avatar
      Removed SharedUChar and tightened language around its previous uses · 9894f0b6
      ggaren@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=70698
      
      Reviewed by David Levin.
      
      Source/JavaScriptCore: 
      
      - Removed SharedUChar because most of its functionality has moved into
      other abstraction layers, and we want remaining clients to choose their
      abstractions explicitly instead of relying on StringImpl to provide this
      behavior implicitly, since we think they can sometimes make more efficient
      choices.
      
      - Renamed "threadSafeCopy" and "crossThreadCopy" to "isolatedCopy" because
      the former names could give the impression that the resulting object was
      thread-safe, but actually it's just an isolated copy, which is not
      thread-safe by itself, but can be used to implement a thread-safe
      algorithm through isolation.
      
      * wtf/CrossThreadRefCounted.h: Removed.
      
      * JavaScriptCore.exp: Export!
      
      * wtf/text/StringImpl.cpp:
      (WTF::StringImpl::~StringImpl): Removed the stuff mentioned above.
      
      * wtf/text/StringImpl.h:
      (WTF::StringImpl::length): Ditto.
      
      (WTF::StringImpl::isolatedCopy): Inlined this, since it's now trivial.
      
      * wtf/text/WTFString.cpp:
      (WTF::String::isolatedCopy):
      * wtf/text/WTFString.h: Updated for StringImpl changes.
      
      * API/OpaqueJSString.h:
      * GNUmakefile.list.am:
      * JavaScriptCore.exp:
      * JavaScriptCore.gypi:
      * JavaScriptCore.order:
      * JavaScriptCore.vcproj/WTF/WTF.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * wtf/CMakeLists.txt:
      * wtf/OwnFastMallocPtr.h:
      * wtf/RefCounted.h:
      * wtf/SizeLimits.cpp:
      * wtf/ThreadSafeRefCounted.h:
      * wtf/wtf.pri:
      * yarr/YarrPattern.h: Updated these files to accomodate removal of
      CrossThreadRefCounted.h.
      
      Source/WebCore: 
      
      - Renamed "threadSafeCopy" and "crossThreadCopy" to "isolatedCopy" because
      the former names gave the dangerous misimpression that the resulting object
      was thread-safe, which is not true.
              
      - Updated a bunch of files for header dependency changes, now that
      CrossThreadRefCounted is gone.
      
      * ForwardingHeaders/wtf/CrossThreadRefCounted.h: Removed.
      * WebCore.exp.in:
      * bindings/js/ScriptHeapSnapshot.h:
      * bindings/v8/SerializedScriptValue.cpp:
      (WebCore::SerializedScriptValue::release):
      (WebCore::SerializedScriptValue::SerializedScriptValue):
      * css/CSSPropertySourceData.h:
      * css/CSSValue.h:
      * css/StyleMedia.h:
      * css/WebKitCSSMatrix.h:
      * dom/QualifiedName.h:
      * fileapi/LocalFileSystem.h:
      (WebCore::LocalFileSystem::SystemBasePath::operator String):
      * history/CachedFrame.h:
      * history/CachedPage.h:
      * history/HistoryItem.h:
      * html/canvas/CanvasStyle.h:
      * inspector/InspectorResourceAgent.h:
      * loader/FormState.h:
      * loader/TextResourceDecoder.h:
      * loader/WorkerThreadableLoader.cpp:
      (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
      * loader/icon/IconDatabase.cpp:
      (WebCore::IconDatabase::open):
      (WebCore::IconDatabase::synchronousIconForPageURL):
      (WebCore::IconDatabase::synchronousIconURLForPageURL):
      (WebCore::IconDatabase::retainIconForPageURL):
      (WebCore::IconDatabase::releaseIconForPageURL):
      (WebCore::IconDatabase::setIconDataForIconURL):
      (WebCore::IconDatabase::setIconURLForPageURL):
      (WebCore::IconDatabase::databasePath):
      (WebCore::IconDatabase::defaultDatabaseFilename):
      (WebCore::ImportedIconURLForPageURLWorkItem::ImportedIconURLForPageURLWorkItem):
      (WebCore::ImportedIconDataForPageURLWorkItem::ImportedIconDataForPageURLWorkItem):
      * page/ContentSecurityPolicy.h:
      * page/Coordinates.h:
      (WebCore::Coordinates::isolatedCopy):
      * page/Geoposition.h:
      (WebCore::Geoposition::isolatedCopy):
      * page/SecurityOrigin.cpp:
      (WebCore::SecurityOrigin::SecurityOrigin):
      (WebCore::SecurityOrigin::isolatedCopy):
      * page/SecurityOrigin.h:
      * page/animation/AnimationBase.h:
      * platform/CrossThreadCopier.cpp:
      (WebCore::::copy):
      * platform/FileChooser.h:
      * platform/KURL.cpp:
      (WebCore::KURL::copy):
      * platform/cf/SchedulePair.h:
      * platform/network/BlobData.cpp:
      (WebCore::BlobDataItem::detachFromCurrentThread):
      (WebCore::BlobData::detachFromCurrentThread):
      * platform/network/HTTPHeaderMap.cpp:
      (WebCore::HTTPHeaderMap::copyData):
      * platform/network/MIMEHeader.h:
      * platform/network/ResourceErrorBase.cpp:
      (WebCore::ResourceErrorBase::copy):
      * platform/network/ResourceLoadInfo.h:
      * platform/network/ResourceRequestBase.cpp:
      (WebCore::ResourceRequestBase::copyData):
      * platform/network/ResourceResponseBase.cpp:
      (WebCore::ResourceResponseBase::copyData):
      * platform/sql/SQLValue.cpp:
      (WebCore::SQLValue::SQLValue):
      (WebCore::SQLValue::string):
      * rendering/style/QuotesData.h:
      * storage/AbstractDatabase.cpp:
      (WebCore::updateGuidVersionMap):
      (WebCore::AbstractDatabase::AbstractDatabase):
      (WebCore::AbstractDatabase::performOpenAndVerify):
      (WebCore::AbstractDatabase::stringIdentifier):
      (WebCore::AbstractDatabase::displayName):
      (WebCore::AbstractDatabase::fileName):
      (WebCore::AbstractDatabase::setExpectedVersion):
      (WebCore::AbstractDatabase::getCachedVersion):
      * storage/ChangeVersionWrapper.cpp:
      (WebCore::ChangeVersionWrapper::ChangeVersionWrapper):
      * storage/Database.cpp:
      (WebCore::Database::Database):
      (WebCore::Database::tableNames):
      * storage/DatabaseDetails.h:
      * storage/DatabaseTracker.cpp:
      (WebCore::DatabaseTracker::setDatabaseDirectoryPath):
      (WebCore::DatabaseTracker::databaseDirectoryPath):
      (WebCore::DatabaseTracker::trackerDatabasePath):
      (WebCore::DatabaseTracker::canEstablishDatabase):
      (WebCore::DatabaseTracker::originPath):
      (WebCore::DatabaseTracker::fullPathForDatabase):
      (WebCore::DatabaseTracker::populateOrigins):
      (WebCore::DatabaseTracker::databaseNamesForOrigin):
      (WebCore::DatabaseTracker::addOpenDatabase):
      (WebCore::DatabaseTracker::setQuota):
      (WebCore::DatabaseTracker::recordCreatingDatabase):
      (WebCore::DatabaseTracker::recordDeletingDatabase):
      (WebCore::DatabaseTracker::recordDeletingOrigin):
      (WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged):
      * storage/OriginQuotaManager.cpp:
      (WebCore::OriginQuotaManager::trackOrigin):
      (WebCore::OriginQuotaManager::addDatabase):
      * storage/SQLError.h:
      (WebCore::SQLError::message):
      (WebCore::SQLError::SQLError):
      * storage/SQLResultSetRowList.h:
      * storage/SQLStatement.cpp:
      (WebCore::SQLStatement::SQLStatement):
      * storage/StorageAreaSync.cpp:
      (WebCore::StorageAreaSync::StorageAreaSync):
      (WebCore::StorageAreaSync::syncTimerFired):
      * storage/StorageAreaSync.h:
      * storage/StorageMap.cpp:
      (WebCore::StorageMap::importItem):
      * storage/StorageNamespaceImpl.cpp:
      (WebCore::StorageNamespaceImpl::StorageNamespaceImpl):
      * storage/StorageSyncManager.cpp:
      (WebCore::StorageSyncManager::StorageSyncManager):
      * storage/StorageTracker.cpp:
      (WebCore::StorageTracker::StorageTracker):
      (WebCore::StorageTracker::syncImportOriginIdentifiers):
      (WebCore::StorageTracker::syncFileSystemAndTrackerDatabase):
      (WebCore::StorageTracker::setOriginDetails):
      (WebCore::StorageTracker::willDeleteAllOrigins):
      * svg/SVGPathSeg.h:
      * workers/DefaultSharedWorkerRepository.cpp:
      (WebCore::SharedWorkerProxy::url):
      (WebCore::SharedWorkerProxy::name):
      (WebCore::SharedWorkerProxy::SharedWorkerProxy):
      (WebCore::DefaultSharedWorkerRepository::getProxy):
      * workers/SharedWorkerThread.cpp:
      (WebCore::SharedWorkerThread::SharedWorkerThread):
      * workers/WorkerMessagingProxy.cpp:
      (WebCore::WorkerExceptionTask::WorkerExceptionTask):
      (WebCore::PostMessageToPageInspectorTask::PostMessageToPageInspectorTask):
      * workers/WorkerRunLoop.cpp:
      (WebCore::WorkerRunLoop::postTaskForMode):
      (WebCore::WorkerRunLoop::Task::Task):
      * workers/WorkerThread.cpp:
      (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
      
      Source/WebKit/chromium: 
      
      - Renamed "threadSafeCopy" and "crossThreadCopy" to "isolatedCopy" because
      the former names gave the dangerous misimpression that the resulting object
      was thread-safe, which is not true.
      
      
      * src/WorkerFileSystemCallbacksBridge.cpp:
      
      Source/WebKit/mac: 
      
      - Renamed "threadSafeCopy" and "crossThreadCopy" to "isolatedCopy" because
      the former names gave the dangerous misimpression that the resulting object
      was thread-safe, which is not true.
      
      * Storage/WebDatabaseTrackerClient.mm:
      (DidModifyOriginData::dispatchToMainThread):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98316 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9894f0b6
  28. 27 May, 2011 1 commit
    • mihaip@chromium.org's avatar
      2011-05-26 Mihai Parparita <mihaip@chromium.org> · 2849ddcd
      mihaip@chromium.org authored
              Reviewed by Adam Barth.
      
              Fix worldID and destinationDomain argument names
              https://bugs.webkit.org/show_bug.cgi?id=61571
      
              As part of working on r87423, I noticed a couple of inconsistencies in
              argument names:
              - We would use worldId in .h files but worldID in .cpp files.
                Standardize on the latter
              - SecurityOrigin::addOriginAccessWhitelistEntry would take a
                destinationDomains argument, even though the actual parameter was for
                a single domain (renamed to be singular).
      
              * bindings/v8/ScriptController.h:
              * bindings/v8/V8Proxy.h:
              * page/SecurityOrigin.cpp:
              (WebCore::SecurityOrigin::addOriginAccessWhitelistEntry):
              (WebCore::SecurityOrigin::removeOriginAccessWhitelistEntry):
              * page/SecurityOrigin.h:
      2011-05-26  Mihai Parparita  <mihaip@chromium.org>
      
              Reviewed by Adam Barth.
      
              Fix worldID and destinationDomain argument names
              https://bugs.webkit.org/show_bug.cgi?id=61571
      
              As part of working on r87423, I noticed a couple of inconsistencies in
              argument names:
              - We would use worldId in .h files but worldID in .cpp files.
                Standardize on the latter
              - SecurityOrigin::addOriginAccessWhitelistEntry would take a
                destinationDomains argument, even though the actual parameter was for
                a single domain (renamed to be singular).
      
              * public/WebFrame.h:
              * src/WebFrameImpl.cpp:
              (WebKit::WebFrameImpl::executeScriptInIsolatedWorld):
              (WebKit::WebFrameImpl::setIsolatedWorldSecurityOrigin):
              * src/WebFrameImpl.h:
      2011-05-26  Mihai Parparita  <mihaip@chromium.org>
      
              Reviewed by Adam Barth.
      
              Fix worldID and destinationDomain argument names
              https://bugs.webkit.org/show_bug.cgi?id=61571
      
              As part of working on r87423, I noticed a couple of inconsistencies in
              argument names:
              - We would use worldId in .h files but worldID in .cpp files.
                Standardize on the latter
              - SecurityOrigin::addOriginAccessWhitelistEntry would take a
                destinationDomains argument, even though the actual parameter was for
                a single domain (renamed to be singular).
      
              * DumpRenderTree/LayoutTestController.h:
              * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
              (LayoutTestController::evaluateScriptInIsolatedWorld):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@87469 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2849ddcd
  29. 17 Apr, 2011 1 commit
  30. 20 Mar, 2011 1 commit
    • levin@chromium.org's avatar
      2011-03-20 Bill Budge <bbudge@chromium.org> · e24a9bad
      levin@chromium.org authored
              Reviewed by Adam Barth.
      
              Rename ThreadSafeShared to ThreadSafeRefCounted
              https://bugs.webkit.org/show_bug.cgi?id=56714
      
              No new tests. Exposes no new functionality.
      
              * API/JSClassRef.h:
              * API/OpaqueJSString.h:
              * GNUmakefile.am:
              * JavaScriptCore.gypi:
              * JavaScriptCore.vcproj/WTF/WTF.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * wtf/Atomics.h:
              * wtf/CMakeLists.txt:
              * wtf/CrossThreadRefCounted.h:
              (WTF::CrossThreadRefCounted::CrossThreadRefCounted):
              (WTF::::crossThreadCopy):
              * wtf/ThreadSafeRefCounted.h: Copied from wtf/ThreadSafeShared.h.
              (WTF::ThreadSafeRefCountedBase::ThreadSafeRefCountedBase):
              (WTF::ThreadSafeRefCountedBase::ref):
              (WTF::ThreadSafeRefCountedBase::refCount):
              (WTF::ThreadSafeRefCountedBase::derefBase):
              (WTF::ThreadSafeRefCounted::ThreadSafeRefCounted):
              * wtf/ThreadSafeShared.h: Removed.
              * wtf/Threading.h:
      
      2011-03-20  Bill Budge  <bbudge@chromium.org>
      
              Reviewed by Adam Barth.
      
              Rename ThreadSafeShared to ThreadSafeRefCounted
              https://bugs.webkit.org/show_bug.cgi?id=56714
      
              No new tests. Exposes no new functionality.
      
              * ForwardingHeaders/wtf/ThreadSafeRefCounted.h: Copied from ForwardingHeaders/wtf/ThreadSafeShared.h.
              * ForwardingHeaders/wtf/ThreadSafeShared.h: Removed.
              * gyp/JavaScriptGlue.gypi:
      
      2011-03-20  Bill Budge  <bbudge@chromium.org>
      
              Reviewed by Adam Barth.
      
              Rename ThreadSafeShared to ThreadSafeRefCounted
              https://bugs.webkit.org/show_bug.cgi?id=56714
      
              No new tests. Exposes no new functionality.
      
              * ForwardingHeaders/wtf/ThreadSafeRefCounted.h: Copied from ForwardingHeaders/wtf/ThreadSafeShared.h.
              * ForwardingHeaders/wtf/ThreadSafeShared.h: Removed.
              * bindings/v8/SerializedScriptValue.h:
              * dom/Document.cpp:
              * dom/default/PlatformMessagePortChannel.h:
              * fileapi/FileThread.h:
              * loader/ThreadableLoaderClientWrapper.h:
              (WebCore::ThreadableLoaderClientWrapper::create):
              (WebCore::ThreadableLoaderClientWrapper::clearClient):
              (WebCore::ThreadableLoaderClientWrapper::done):
              (WebCore::ThreadableLoaderClientWrapper::didSendData):
              (WebCore::ThreadableLoaderClientWrapper::didReceiveResponse):
              (WebCore::ThreadableLoaderClientWrapper::didReceiveData):
              (WebCore::ThreadableLoaderClientWrapper::didReceiveCachedMetadata):
              (WebCore::ThreadableLoaderClientWrapper::didFinishLoading):
              (WebCore::ThreadableLoaderClientWrapper::didFail):
              (WebCore::ThreadableLoaderClientWrapper::didFailRedirectCheck):
              (WebCore::ThreadableLoaderClientWrapper::didReceiveAuthenticationCancellation):
              (WebCore::ThreadableLoaderClientWrapper::ThreadableLoaderClientWrapper):
              * page/SecurityOrigin.h:
              * platform/CrossThreadCopier.h:
              * platform/network/BlobData.h:
              * platform/network/cf/SocketStreamHandle.h:
              * storage/AbstractDatabase.h:
              * storage/DatabaseAuthorizer.h:
              * storage/DatabaseCallback.h:
              * storage/DatabaseThread.h:
              * storage/IDBCallbacks.h:
              * storage/IDBCursorBackendInterface.h:
              * storage/IDBDatabaseBackendInterface.h:
              * storage/IDBFactoryBackendInterface.h:
              * storage/IDBIndexBackendInterface.h:
              * storage/IDBKey.h:
              * storage/IDBKeyRange.h:
              * storage/IDBObjectStoreBackendInterface.h:
              * storage/IDBRequest.h:
              * storage/IDBTransactionBackendInterface.h:
              * storage/SQLError.h:
              * storage/SQLResultSet.h:
              * storage/SQLStatement.h:
              * storage/SQLStatementCallback.h:
              * storage/SQLStatementErrorCallback.h:
              * storage/SQLTransaction.h:
              * storage/SQLTransactionCallback.h:
              * storage/SQLTransactionErrorCallback.h:
              * websockets/ThreadableWebSocketChannelClientWrapper.h:
              * workers/DefaultSharedWorkerRepository.cpp:
      
      2011-03-20  Bill Budge  <bbudge@chromium.org>
      
              Reviewed by Adam Barth.
      
              Rename ThreadSafeShared to ThreadSafeRefCounted
              https://bugs.webkit.org/show_bug.cgi?id=56714
      
              No new tests. Exposes no new functionality.
      
              * Platform/CoreIPC/Connection.h:
              * Platform/WorkQueue.h:
              * Platform/win/WorkQueueWin.cpp:
              * UIProcess/Launcher/ProcessLauncher.h:
              * UIProcess/Launcher/ThreadLauncher.h:
      
      2011-03-20  Bill Budge  <bbudge@chromium.org>
      
              Reviewed by Adam Barth.
      
              Rename ThreadSafeShared to ThreadSafeRefCounted
              https://bugs.webkit.org/show_bug.cgi?id=56714
      
              No new tests. Exposes no new functionality.
      
              * src/PlatformMessagePortChannel.h:
              * src/WebWorkerBase.cpp:
              * src/WorkerFileSystemCallbacksBridge.h:
              * src/WorkerFileWriterCallbacksBridge.h:
      
      2011-03-20  Bill Budge  <bbudge@chromium.org>
      
              Reviewed by Adam Barth.
      
              Rename ThreadSafeShared to ThreadSafeRefCounted
              https://bugs.webkit.org/show_bug.cgi?id=56714
      
              No new tests. Exposes no new functionality.
      
              * DumpRenderTree/ForwardingHeaders/wtf/ThreadSafeRefCounted.h: Copied from DumpRenderTree/ForwardingHeaders/wtf/ThreadSafeShared.h.
              * DumpRenderTree/ForwardingHeaders/wtf/ThreadSafeShared.h: Removed.
              * Scripts/do-webcore-rename:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81567 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e24a9bad
  31. 11 Jan, 2011 1 commit
    • abarth@webkit.org's avatar
      2011-01-11 Adam Barth <abarth@webkit.org> · 75a12a2b
      abarth@webkit.org authored
              Reviewed by Eric Seidel.
      
              Introduce the notion of a "display-isolated" URL scheme for use by
              Chrome-internal URLs
              https://bugs.webkit.org/show_bug.cgi?id=50182
      
              This patch actually makes the display-isolated schemes display
              isolated.  The behavior should be the same as the previous iteration of
              this patch, but re-organized a bit because reading the access white
              list is expensive.
      
              * page/SecurityOrigin.cpp:
              (WebCore::SecurityOrigin::isAccessToURLWhiteListed):
              (WebCore::SecurityOrigin::canDisplay):
              * page/SecurityOrigin.h:
              * platform/SchemeRegistry.cpp:
              * platform/SchemeRegistry.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75557 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      75a12a2b
  32. 08 Jan, 2011 1 commit