1. 07 Apr, 2013 1 commit
    • ddkilzer@apple.com's avatar
      Remove the rest of SVG_DOM_OBJC_BINDINGS · 0cd46787
      ddkilzer@apple.com authored
      <http://webkit.org/b/114112>
      
      Reviewed by Geoffrey Garen.
      
      .:
      
      * Source/autotools/SetupWebKitFeatures.m4:
      * Source/cmake/WebKitFeatures.cmake:
      * Source/cmakeconfig.h.cmake:
      - Remove references to ENABLE_SVG_DOM_OBJC_BINDINGS.
      
      Source/JavaScriptCore:
      
      * Configurations/FeatureDefines.xcconfig:
      - Remove ENABLE_SVG_DOM_OBJC_BINDINGS macro.
      
      Source/WebCore:
      
      * Configurations/WebCore.xcconfig:
      - Remove EXCLUDED_SOURCE_FILE_NAMES_SVG_DOM_OBJC_BINDINGS.  Note
        that DOMHTMLIFrameElementPrivate.h should not have been in
        this list because the class contained methods other than just
        -getSVGDocument.
      
      * WebCore.xcodeproj/project.pbxproj:
      - Remove DOMHTMLFrameElementPrivate.h since the only method it
        contained was -[DOMHTMLFrameElement getSVGDocument], which was
        part of the SVG DOM Objective-C bindings.
      
      * bindings/objc/DOM.mm:
      (kitClass):
      * bindings/objc/DOMEvents.mm:
      (kitClass):
      * bindings/objc/ExceptionHandlers.mm:
      (WebCore::raiseDOMException):
      - Remove code in ENABLE(SVG_DOM_OBJC_BINDINGS).
      
      Source/WebKit/blackberry:
      
      * WebCoreSupport/AboutDataEnableFeatures.in:
      - Remove reference to SVG_DOM_OBJC_BINDINGS.
      
      Source/WebKit2:
      
      * Configurations/FeatureDefines.xcconfig:
      - Remove ENABLE_SVG_DOM_OBJC_BINDINGS macro.
      
      Source/WTF:
      
      * wtf/FeatureDefines.h:
      - Remove ENABLE_SVG_DOM_OBJC_BINDINGS macro.
      
      Tools:
      
      * Scripts/webkitperl/FeatureList.pm:
      - Remove --svg-dom-objc-bindings switch.
      * qmake/mkspecs/features/features.pri:
      - Remove reference to ENABLE_SVG_DOM_OBJC_BINDINGS.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0cd46787
  2. 06 Apr, 2013 5 commits
    • weinig@apple.com's avatar
      Removed v8 bindings hooks from IDL files · 007c2427
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114091
      
      Patch by Geoffrey Garen <ggaren@apple.com> on 2013-04-06
      Reviewed by Anders Carlsson and Sam Weinig.
      
      Source/JavaScriptCore: 
      
      * heap/HeapStatistics.h:
      
      Source/WebCore: 
      
      * Modules/encryptedmedia/MediaKeySession.idl:
      * Modules/filesystem/DOMWindowFileSystem.idl:
      * Modules/filesystem/WorkerContextFileSystem.idl:
      * Modules/gamepad/NavigatorGamepad.idl:
      * Modules/geolocation/NavigatorGeolocation.idl:
      * Modules/indexeddb/DOMWindowIndexedDatabase.idl:
      * Modules/indexeddb/WorkerContextIndexedDatabase.idl:
      * Modules/mediastream/DOMWindowMediaStream.idl:
      * Modules/mediastream/NavigatorMediaStream.idl:
      * Modules/notifications/DOMWindowNotifications.idl:
      * Modules/notifications/NotificationCenter.idl:
      * Modules/notifications/WorkerContextNotifications.idl:
      * Modules/quota/DOMWindowQuota.idl:
      * Modules/speech/DOMWindowSpeech.idl:
      * Modules/webaudio/AudioBufferSourceNode.idl:
      * Modules/webaudio/AudioContext.idl:
      * Modules/webaudio/AudioParam.idl:
      * Modules/webaudio/DOMWindowWebAudio.idl:
      * Modules/webdatabase/DOMWindowWebDatabase.idl:
      * Modules/webdatabase/WorkerContextWebDatabase.idl:
      * Modules/websockets/DOMWindowWebSocket.idl:
      * Modules/websockets/WorkerContextWebSocket.idl:
      * bindings/js/JSDOMBinding.cpp:
      * bindings/js/ScriptController.h:
      (ScriptController):
      * bindings/scripts/test/TestNode.idl:
      * bindings/scripts/test/TestObj.idl:
      * css/CSSFontFaceLoadEvent.idl:
      * css/CSSHostRule.idl:
      * css/CSSRule.idl:
      * css/CSSRuleList.idl:
      * css/CSSStyleDeclaration.idl:
      * css/CSSStyleSheet.idl:
      * css/CSSValue.idl:
      * css/FontLoader.idl:
      * css/StyleSheet.idl:
      * css/WebKitCSSRegionRule.idl:
      * dom/Clipboard.idl:
      * dom/CustomElementConstructor.idl:
      * dom/CustomEvent.idl:
      * dom/DOMNamedFlowCollection.idl:
      * dom/DOMStringMap.idl:
      * dom/DataTransferItemList.idl:
      * dom/Document.idl:
      * dom/DocumentFragment.idl:
      * dom/Element.idl:
      * dom/Event.idl:
      * dom/EventTarget.idl:
      * dom/MessageChannel.idl:
      * dom/MouseEvent.idl:
      * dom/MutationRecord.idl:
      * dom/NamedNodeMap.idl:
      * dom/Node.idl:
      * dom/NodeList.idl:
      * dom/RequestAnimationFrameCallback.idl:
      * dom/ShadowRoot.idl:
      * dom/Text.idl:
      * history/HistoryItem.cpp:
      (WebCore::HistoryItem::encodeBackForwardTreeNode):
      (WebCore::HistoryItem::decodeBackForwardTree):
      * html/DOMSettableTokenList.idl:
      * html/DOMTokenList.idl:
      * html/HTMLAllCollection.idl:
      * html/HTMLAppletElement.idl:
      * html/HTMLCollection.idl:
      * html/HTMLDialogElement.idl:
      * html/HTMLDivElement.idl:
      * html/HTMLDocument.idl:
      * html/HTMLElement.idl:
      * html/HTMLEmbedElement.idl:
      * html/HTMLFormControlsCollection.idl:
      * html/HTMLFormElement.idl:
      * html/HTMLImageElement.idl:
      * html/HTMLInputElement.idl:
      * html/HTMLMediaElement.idl:
      * html/HTMLObjectElement.idl:
      * html/HTMLOptionsCollection.idl:
      * html/HTMLSelectElement.idl:
      * html/HTMLSpanElement.idl:
      * html/HTMLStyleElement.idl:
      * html/HTMLTemplateElement.idl:
      * html/HTMLTrackElement.idl:
      * html/HTMLUnknownElement.idl:
      * html/MediaKeyError.idl:
      * html/MediaKeyEvent.idl:
      * html/MicroDataItemValue.idl:
      * html/canvas/CanvasRenderingContext2D.idl:
      * html/canvas/DOMPath.idl:
      * html/shadow/HTMLContentElement.idl:
      * html/shadow/HTMLShadowElement.idl:
      * html/track/TextTrack.idl:
      * inspector/InjectedScriptHost.idl:
      * inspector/InspectorIndexedDBAgent.cpp:
      (WebCore::InspectorIndexedDBAgent::requestDatabaseNames):
      (WebCore::InspectorIndexedDBAgent::requestDatabase):
      (WebCore::InspectorIndexedDBAgent::requestData):
      (WebCore::InspectorIndexedDBAgent::clearObjectStore):
      (WebCore):
      * loader/EmptyClients.h:
      (EmptyFrameLoaderClient):
      * loader/FrameLoaderClient.h:
      (FrameLoaderClient):
      * page/Console.idl:
      * page/DOMWindow.idl:
      * page/DOMWindowPagePopup.idl:
      * page/History.idl:
      * page/Location.idl:
      * platform/graphics/skia/PatternSkia.cpp:
      (WebCore::Pattern::platformDestroy):
      (WebCore::Pattern::platformPattern):
      * testing/Internals.cpp:
      (WebCore::Internals::serializeObject):
      (WebCore::Internals::deserializeBuffer):
      
      Source/WTF: 
      
      * wtf/ArrayBuffer.h:
      (WTF):
      (WTF::ArrayBufferContents::ArrayBufferContents):
      (WTF::ArrayBufferContents::transfer):
      (ArrayBufferContents):
      (ArrayBuffer):
      (WTF::ArrayBufferContents::~ArrayBufferContents):
      * wtf/Platform.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147857 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      007c2427
    • andersca@apple.com's avatar
      Remove VisitedLinks.{cpp|h} · b929df99
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114095
      
      Reviewed by Geoffrey Garen.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * platform/VisitedLinks.cpp: Removed.
      * platform/VisitedLinks.h: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b929df99
    • andersca@apple.com's avatar
      Fix build. · c0be7fd4
      andersca@apple.com authored
      ThreadableLoaderClientWrapper was still calling didReceiveCachedMetadata; I didn't notice it
      because the file was not in the Xcode project so I went ahead and added it.
      
      * WebCore.xcodeproj/project.pbxproj:
      * loader/ThreadableLoaderClientWrapper.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147840 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c0be7fd4
    • andersca@apple.com's avatar
      Remove dead CachedMetadata code · aaa40dd2
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114093
      
      Reviewed by Geoffrey Garen.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * loader/CachedMetadata.cpp: Removed.
      * loader/CachedMetadata.h: Removed.
      * loader/ResourceLoader.h:
      (ResourceLoader):
      * loader/SubresourceLoader.cpp:
      * loader/SubresourceLoader.h:
      (SubresourceLoader):
      * loader/ThreadableLoaderClient.h:
      * loader/WorkerThreadableLoader.cpp:
      * loader/WorkerThreadableLoader.h:
      (MainThreadBridge):
      * loader/cache/CachedResource.cpp:
      (WebCore::CachedResource::reportMemoryUsage):
      * loader/cache/CachedResource.h:
      (WebCore):
      (CachedResource):
      * platform/network/ResourceHandle.cpp:
      * platform/network/ResourceHandle.h:
      (ResourceHandle):
      * platform/network/ResourceHandleClient.h:
      (ResourceHandleClient):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147839 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aaa40dd2
    • andersca@apple.com's avatar
      Remove more dead Chromium code · 5fb14b6d
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114090
      
      Reviewed by Alp Toker.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.xcodeproj/project.pbxproj:
      * platform/StatsCounter.cpp: Removed.
      * platform/StatsCounter.h: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147838 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5fb14b6d
  3. 05 Apr, 2013 3 commits
    • andersca@apple.com's avatar
      Stop building Objective-C bindings for the SVG DOM · 8b914b1d
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114076
      
      Reviewed by Geoffrey Garen.
      
      The DOM SVG Objective-C bindings have never been exposed as API, and not building them cuts WebCore build by 10%.
      
      Source/WebCore:
      
      * Configurations/FeatureDefines.xcconfig:
      * Configurations/WebCore.xcconfig:
      * WebCore.exp.in:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/objc/DOM.mm:
      (WebCore::createElementClassMap):
      (kitClass):
      * bindings/objc/DOMCSS.mm:
      (kitClass):
      * bindings/objc/DOMEvents.mm:
      * bindings/objc/DOMSVG.h: Removed.
      * bindings/objc/DOMSVGException.h: Removed.
      * bindings/objc/DOMSVGPathSegInternal.mm: Removed.
      * bindings/objc/ExceptionHandlers.mm:
      * html/HTMLEmbedElement.idl:
      * html/HTMLFrameElement.idl:
      * html/HTMLIFrameElement.idl:
      * html/HTMLObjectElement.idl:
      
      Source/WebKit/mac:
      
      * Configurations/FeatureDefines.xcconfig:
      * MigrateHeaders.make:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147822 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8b914b1d
    • benjamin@webkit.org's avatar
      Remove WTFURL from WebKit · fee685df
      benjamin@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=113994
      
      Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-04-05
      Reviewed by Ryosuke Niwa.
      
      .: 
      
      * Source/cmake/WebKitFeatures.cmake:
      * Source/cmakeconfig.h.cmake:
      
      Source/WebCore: 
      
      * GNUmakefile.list.am:
      * WebCore.exp.in:
      * WebCore.xcodeproj/project.pbxproj:
      * platform/KURL.cpp:
      (WebCore):
      (WebCore::KURL::reportMemoryUsage):
      (WebCore::KURL::isSafeToSendToAnotherThread):
      * platform/KURL.h:
      (KURL):
      (WebCore):
      * platform/KURLWTFURL.cpp: Removed.
      * platform/KURLWTFURLImpl.h: Removed.
      * platform/cf/KURLCFNet.cpp:
      (WebCore::KURL::KURL):
      (WebCore::KURL::createCFURL):
      (WebCore):
      * platform/mac/KURLMac.mm:
      (WebCore::KURL::KURL):
      (WebCore::KURL::createCFURL):
      
      Source/WebKit/blackberry: 
      
      * WebCoreSupport/AboutDataUseFeatures.in:
      
      Source/WTF: 
      
      Painful, but that is for the best now :(
      
      * GNUmakefile.list.am:
      * WTF.xcodeproj/project.pbxproj:
      * wtf/MemoryInstrumentationParsedURL.h: Removed.
      * wtf/url/api/ParsedURL.cpp: Removed.
      * wtf/url/api/ParsedURL.h: Removed.
      * wtf/url/api/URLBuffer.h: Removed.
      * wtf/url/api/URLQueryCharsetConverter.h: Removed.
      * wtf/url/api/URLString.cpp: Removed.
      * wtf/url/api/URLString.h: Removed.
      * wtf/url/src/RawURLBuffer.h: Removed.
      * wtf/url/src/URLCanon.h: Removed.
      * wtf/url/src/URLCanonEtc.cpp: Removed.
      * wtf/url/src/URLCanonFilesystemurl.cpp: Removed.
      * wtf/url/src/URLCanonFileurl.cpp: Removed.
      * wtf/url/src/URLCanonHost.cpp: Removed.
      * wtf/url/src/URLCanonICU.cpp: Removed.
      * wtf/url/src/URLCanonIP.cpp: Removed.
      * wtf/url/src/URLCanonInternal.cpp: Removed.
      * wtf/url/src/URLCanonInternal.h: Removed.
      * wtf/url/src/URLCanonMailto.cpp: Removed.
      * wtf/url/src/URLCanonPath.cpp: Removed.
      * wtf/url/src/URLCanonPathurl.cpp: Removed.
      * wtf/url/src/URLCanonQuery.cpp: Removed.
      * wtf/url/src/URLCanonRelative.cpp: Removed.
      * wtf/url/src/URLCanonStdURL.cpp: Removed.
      * wtf/url/src/URLCharacterTypes.cpp: Removed.
      * wtf/url/src/URLCharacterTypes.h: Removed.
      * wtf/url/src/URLComponent.h: Removed.
      * wtf/url/src/URLFile.h: Removed.
      * wtf/url/src/URLParse.cpp: Removed.
      * wtf/url/src/URLParse.h: Removed.
      * wtf/url/src/URLParseFile.cpp: Removed.
      * wtf/url/src/URLParseInternal.h: Removed.
      * wtf/url/src/URLSegments.cpp: Removed.
      * wtf/url/src/URLSegments.h: Removed.
      * wtf/url/src/URLUtil.cpp: Removed.
      * wtf/url/src/URLUtil.h: Removed.
      * wtf/url/src/URLUtilInternal.h: Removed.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147715 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fee685df
    • rniwa@webkit.org's avatar
      Remove code for 10.5 and earlier from Source/WebCore · 6690896b
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=113754
      
      Reviewed by Benjamin Poulain.
      
      Removed the code for 10.5 and removed if-def for 10.6.
      
      * WebCore.xcodeproj/project.pbxproj:
      * page/ContextMenuController.cpp:
      (WebCore::ContextMenuController::populate):
      * platform/LocalizedStrings.cpp:
      (WebCore::imageTitle):
      * platform/graphics/cg/GraphicsContextCG.cpp:
      (WebCore::GraphicsContext::setAllowsFontSmoothing):
      * platform/graphics/cg/ImageCG.cpp:
      (WebCore::Image::drawPattern):
      * platform/graphics/cg/ImageSourceCG.cpp:
      (WebCore::ImageSource::clear):
      * platform/graphics/cg/PathCG.cpp:
      (WebCore::Path::boundingRect):
      * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
      (WebCore):
      (WebCore::FontPlatformData::ctFont):
      * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
      (WebCore::MediaPlayerPrivateGStreamerBase::supportsFullscreen):
      * platform/graphics/mac/ComplexTextControllerCoreText.mm:
      * platform/graphics/mac/FontCacheMac.mm:
      (WebCore):
      (WebCore::fontCacheRegisteredFontsChangedNotificationCallback):
      (WebCore::FontCache::platformInit):
      * platform/graphics/mac/FontCustomPlatformData.cpp:
      (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
      (WebCore::createFontCustomPlatformData):
      * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
      (WebCore::MediaPlayerPrivateQTKit::createQTMovie):
      (WebCore::MediaPlayerPrivateQTKit::supportsFullscreen):
      (WebCore::MediaPlayerPrivateQTKit::setClosedCaptionsVisible):
      (WebCore::MediaPlayerPrivateQTKit::cacheMovieScale):
      * platform/graphics/mac/SimpleFontDataMac.mm:
      (WebCore::SimpleFontData::platformInit):
      * platform/graphics/mac/WebLayer.h:
      * platform/mac/CursorMac.mm:
      (WebCore::Cursor::ensurePlatformCursor):
      * platform/mac/DisplaySleepDisabler.cpp:
      (WebCore::DisplaySleepDisabler::DisplaySleepDisabler):
      (WebCore):
      * platform/mac/DisplaySleepDisabler.h:
      (DisplaySleepDisabler):
      * platform/mac/EmptyProtocolDefinitions.h:
      * platform/mac/HTMLConverter.h:
      * platform/mac/HTMLConverter.mm:
      * platform/mac/PopupMenuMac.mm:
      (WebCore::PopupMenuMac::populate):
      * platform/mac/ScrollElasticityController.mm:
      (systemUptime):
      * platform/mac/SharedTimerMac.mm:
      (PowerObserver):
      (WebCore::PowerObserver::PowerObserver):
      (WebCore::PowerObserver::~PowerObserver):
      (WebCore::PowerObserver::didReceiveSystemPowerNotification):
      * platform/mac/SuddenTermination.mm:
      * platform/mac/WebCoreFullScreenWindow.mm:
      (-[WebCoreFullScreenWindow initWithContentRect:styleMask:backing:defer:]):
      * platform/mac/WebFontCache.mm:
      (+[WebFontCache getTraits:inFamily:]):
      (+[WebFontCache internalFontWithFamily:traits:weight:size:]):
      * platform/mac/WebVideoFullscreenController.mm:
      (SOFT_LINK_POINTER):
      (-[WebVideoFullscreenController updateMenuAndDockForFullscreen]):
      * platform/mac/WebVideoFullscreenHUDWindowController.mm:
      (createControlWithMediaUIControlType):
      (-[WebVideoFullscreenHUDWindowController windowDidLoad]):
      * platform/network/Credential.h:
      * platform/network/cf/DNSCFNet.cpp:
      (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
      * platform/network/cf/ProxyServerCFNet.cpp:
      (WebCore):
      (WebCore::proxyServersForURL):
      * platform/network/cf/SocketStreamHandleCFNet.cpp:
      (WebCore::SocketStreamHandle::chooseProxy):
      * platform/network/mac/AuthenticationMac.mm:
      (WebCore):
      * platform/network/mac/WebCoreURLResponse.mm:
      (WebCore::adjustMIMETypeIfNecessary):
      * platform/text/TextChecking.h:
      (WebCore):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6690896b
  4. 04 Apr, 2013 4 commits
    • andersca@apple.com's avatar
      Work around a bug in the bindings generation script. · 80ef3f52
      andersca@apple.com authored
      * WebCore.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      80ef3f52
    • andersca@apple.com's avatar
      Fix build. · 4b213c90
      andersca@apple.com authored
      * WebCore.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147688 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4b213c90
    • ggaren@apple.com's avatar
      Removed empty files from the build · ac8d2fa7
      ggaren@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=113978
      
      Reviewed by Anders Carlsson.
      
      Anders made a list of all the empty files that are slowing down the Mac
      build, and I grepped them away.
      
      * WebCore.xcodeproj/project.pbxproj:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147686 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ac8d2fa7
    • andersca@apple.com's avatar
      Prune unneeded header #includes · 0920f1b1
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=113973
      
      Reviewed by Geoffrey Garen.
      
      Reduce the amount of headers included by other headers by:
      - Moving implicit and explicit constructors and destructors into .cpp files so member variable constructors/destructors
        don't have to be declared.
      - Move CachedResourceClient subclasses out into separate headers so that their respective CachedResource subclasses don't
        have to be included by the classes that derive from those subclasses.
      - Remove headers that were never needed in the first place.
      
      * Modules/webaudio/AudioContext.h:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/JSDOMWindowCustom.cpp:
      * css/CSSFontFaceSource.h:
      * html/canvas/CanvasPattern.cpp:
      (WebCore::CanvasPattern::create):
      (WebCore::CanvasPattern::CanvasPattern):
      (WebCore::CanvasPattern::~CanvasPattern):
      * html/canvas/CanvasPattern.h:
      (WebCore::CanvasPattern::pattern):
      (WebCore::CanvasPattern::originClean):
      * html/parser/HTMLScriptRunner.h:
      * loader/ImageLoader.h:
      * loader/LinkLoader.h:
      * loader/TextTrackLoader.h:
      * loader/cache/CachedFont.cpp:
      * loader/cache/CachedFont.h:
      * loader/cache/CachedFontClient.h: Added.
      (WebCore::CachedFontClient::~CachedFontClient):
      (WebCore::CachedFontClient::expectedType):
      (WebCore::CachedFontClient::resourceClientType):
      (WebCore::CachedFontClient::fontLoaded):
      * loader/cache/CachedResourceHandle.cpp:
      (WebCore::CachedResourceHandleBase::CachedResourceHandleBase):
      (WebCore::CachedResourceHandleBase::~CachedResourceHandleBase):
      (WebCore::CachedResourceHandleBase::setResource):
      * loader/cache/CachedResourceHandle.h:
      (WebCore::CachedResourceHandleBase::get):
      (WebCore::CachedResourceHandleBase::operator!):
      (WebCore::CachedResourceHandleBase::operator UnspecifiedBoolType):
      (WebCore::CachedResourceHandleBase::operator=):
      (WebCore::CachedResourceHandle::CachedResourceHandle):
      (WebCore::CachedResourceHandle::get):
      (WebCore::CachedResourceHandle::operator->):
      (WebCore::CachedResourceHandle::operator=):
      (WebCore::CachedResourceHandle::operator==):
      (WebCore::CachedResourceHandle::operator!=):
      (WebCore::operator==):
      (WebCore::operator!=):
      * loader/cache/CachedSVGDocument.h:
      * loader/cache/CachedSVGDocumentReference.h:
      * loader/cache/CachedSVGDocumentClient.h: Added.
      (WebCore::CachedSVGDocumentClient::~CachedSVGDocumentClient):
      (WebCore::CachedSVGDocumentClient::expectedType):
      (WebCore::CachedSVGDocumentClient::resourceClientType):
      * loader/cache/CachedStyleSheetClient.h:
      * platform/PlatformScreen.h:
      * platform/audio/HRTFElevation.cpp:
      * platform/audio/HRTFKernel.cpp:
      (WebCore::HRTFKernel::fftSize):
      * platform/audio/HRTFKernel.h:
      * platform/audio/ReverbConvolverStage.cpp:
      (WebCore::ReverbConvolverStage::~ReverbConvolverStage):
      * platform/audio/ReverbConvolverStage.h:
      * platform/graphics/FontPlatformData.h:
      * platform/graphics/GraphicsContext3D.h:
      * platform/graphics/Path.cpp:
      * platform/graphics/Path.h:
      * platform/graphics/Pattern.cpp:
      * platform/graphics/Pattern.h:
      * platform/graphics/filters/FilterOperation.cpp:
      (WebCore::ReferenceFilterOperation::ReferenceFilterOperation):
      (WebCore::ReferenceFilterOperation::~ReferenceFilterOperation):
      (WebCore::ReferenceFilterOperation::setCachedSVGDocumentReference):
      * platform/graphics/filters/FilterOperation.h:
      * platform/graphics/transforms/AffineTransform.h:
      * plugins/DOMMimeType.h:
      * rendering/RenderLayerFilterInfo.h:
      * rendering/style/StyleCachedShader.h:
      * svg/SVGFEImageElement.h:
      * svg/SVGFontFaceUriElement.h:
      * svg/SVGUseElement.h:
      * xml/parser/XMLDocumentParser.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147684 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0920f1b1
  5. 02 Apr, 2013 2 commits
    • jer.noble@apple.com's avatar
      Add platform AudioSession and iOS platform-specific code. · 3521f9da
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=113813
      <rdar://problem/11701792>
      
      Reviewed by Eric Carlson.
      
      Replace the deprecated AudioToolbox AudioSession APIs with the new AVAudioSession API.
      To protect against exposing platform specific intrinsics to cross-platform code, add a
      platform generic class AudioSession, with port-specific implementations. A default
      implementation is provided.
      
      Add a new listener interface to receive interruption notifications:
      * platform/audio/AudioSessionListener.h: Added.
      (WebCore::AudioSessionListener::AudioSessionListener):
      (WebCore::AudioSessionListener::~AudioSessionListener):
      
      Add a platform generic AudioSession class:
      * platform/audio/AudioSession.cpp: Added.
      (AudioSession::sharedSession): AudioSession is a singleton object, and this is its accessor.
      (AudioSession::addListener): Add the parameter to the listeners set.
      (AudioSession::removeListener): Remove the parameter from the listers set.
      (AudioSession::beganAudioInterruption): Iterate over the parameters.
      (AudioSession::endedAudioInterruption): Ditto.
      (AudioSession::AudioSession): Empty stub.
      (AudioSession::~AudioSession): Ditto.
      (AudioSession::setCategory): Ditto.
      (AudioSession::category): Ditto.
      (AudioSession::sampleRate): Ditto.
      (AudioSession::numberOfOutputChannels): Ditto.
      (AudioSession::setActive): Ditto.
      (AudioSession::preferredBufferDuration): Ditto.
      (AudioSession::setPreferredBufferDuration): Ditto.
      * platform/audio/AudioSession.h: Added.
      
      Add IOS-specific AudioSession implementation:
      * platform/audio/ios/AudioSessionIOS.mm: Added.
      (-[WebAudioSessionHelper initWithCallback:WebCore::]): Register for interruption notifications.
      (-[WebAudioSessionHelper dealloc]): Unregister for interruption notifications.
      (-[WebAudioSessionHelper interruption:]): Pass to AudioSession.
      (WebCore::AudioSessionPrivate::AudioSessionPrivate): Private storage for AudioSessionIOS.
      (WebCore::AudioSession::AudioSession): Create AudioSessionPrivate and WebAudioSessionHelper.
      (WebCore::AudioSession::~AudioSession): Simple destructor.
      (WebCore::AudioSession::setCategory): Check the current categoryOverride, and refuse to overwrite
          "MediaPlayback" with "AmbientSound".
      (WebCore::AudioSession::setCategoryOverride): Simple setter.
      (WebCore::AudioSession::categoryOverride): Simple getter.
      (WebCore::AudioSession::category): Pass to AVAudioSession.
      (WebCore::AudioSession::sampleRate): Ditto.
      (WebCore::AudioSession::numberOfOutputChannels): Ditto.
      (WebCore::AudioSession::setActive): Ditto.
      (WebCore::AudioSession::preferredBufferDuration): Ditto.
      (WebCore::AudioSession::setPreferredBufferDuration): Ditto.
      
      Use the new AudioSession class in place of explicit AudioToolbox or AVAudioSession calls:
      * platform/audio/ios/AudioDestinationIOS.cpp:
      (WebCore::AudioDestination::hardwareSampleRate): Pass to AudioSession.
      (WebCore::AudioDestination::maxChannelCount): Ditto.
      (WebCore::AudioDestinationIOS::AudioDestinationIOS): Register for listeners and activate.
      (WebCore::AudioDestinationIOS::~AudioDestinationIOS): Unregister and deactivate.
      (WebCore::AudioDestinationIOS::configure): Use AudioSession to set the buffer length.
      * platform/audio/ios/AudioDestinationIOS.h:
      
      Add the new files to the project:
      * WebCore.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147494 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3521f9da
    • jer.noble@apple.com's avatar
      Upstream AudioDestinationIOS. · c1691f38
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=113806
      
      Reviewed by Eric Carlson.
      
      Upstream AudioDestinationIOS from the iOS repository.
      
      * WebCore.xcodeproj/project.pbxproj:
      * platform/audio/ios/AudioDestinationIOS.cpp: Added.
      (WebCore::audioDestinations):
      (WebCore::AudioDestination::create):
      (WebCore::AudioDestination::hardwareSampleRate):
      (WebCore::AudioDestination::maxChannelCount):
      (WebCore::AudioDestinationIOS::AudioDestinationIOS):
      (WebCore::AudioDestinationIOS::~AudioDestinationIOS):
      (WebCore::AudioDestinationIOS::configure):
      (WebCore::AudioDestinationIOS::audioDestinationInterruptionListener):
      (WebCore::AudioDestinationIOS::initializeAudioSession):
      (WebCore::AudioDestinationIOS::start):
      (WebCore::AudioDestinationIOS::stop):
      (WebCore::AudioDestinationIOS::beganAudioInterruption):
      (WebCore::AudioDestinationIOS::endedAudioInterruption):
      (WebCore::AudioDestinationIOS::render):
      (WebCore::AudioDestinationIOS::inputProc):
      (WebCore::AudioDestinationIOS::frameSizeChangedProc):
      * platform/audio/ios/AudioDestinationIOS.h: Added.
      (AudioDestinationIOS):
      (WebCore::AudioDestinationIOS::isPlaying):
      (WebCore::AudioDestinationIOS::sampleRate):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147493 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c1691f38
  6. 29 Mar, 2013 1 commit
    • commit-queue@webkit.org's avatar
      When releasing a CGImage, we should also remove it from the subimage cache. · 3abaf74f
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=102453
      
      Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2013-03-29
      Reviewed by Simon Fraser.
      
      When we release an image(CGImageRef) from BitmapImage's cachedFrames, if the image was already
      cached in subimage cache, it's ref count won't drop to 0 and the image won't be deleted.  Usually,
      the subimage cache will clear the whole cache in a timer with 1 sec delay.  However, if WebCore has
      to paint another subimage (not necessarily from the same CGImageRef) before this timer fires, we
      will restart the timer and images inside the cache will stay longer than they should.
      
      This patch does two things:
          - move SubimageCacheWithTimer and related helper struct into a separate file.
          - remove the image from subimage cache when we releasing the CGImageRef, this prevent subimage
      cache holding the image after we released it.
      
      No new tests, manually verified the CGImageRef is also removed from subimage cache
      when we releasing the image from FrameData::clear.
      
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * platform/graphics/cg/BitmapImageCG.cpp:
      (WebCore::FrameData::clear): remove the image from subimage cache before we releasing it.
      * platform/graphics/cg/GraphicsContextCG.cpp:
      (WebCore):
      (WebCore::GraphicsContext::drawNativeImage):
      * platform/graphics/cg/SubimageCacheWithTimer.cpp: Added.
      (WebCore):
      (SubimageRequest):
      (WebCore::SubimageRequest::SubimageRequest):
      (WebCore::SubimageCacheAdder::hash):
      (SubimageCacheAdder):
      (WebCore::SubimageCacheAdder::equal):
      (WebCore::SubimageCacheAdder::translate):
      (WebCore::SubimageCacheWithTimer::SubimageCacheWithTimer):
      (WebCore::SubimageCacheWithTimer::invalidateCacheTimerFired):
      (WebCore::SubimageCacheWithTimer::getSubimage):
      (WebCore::SubimageCacheWithTimer::clearImage):
      (WebCore::subimageCache):
      * platform/graphics/cg/SubimageCacheWithTimer.h: Added.
      (WebCore):
      (SubimageCacheWithTimer): Added a data member m_images to record which image and its subimages are cached.
      (SubimageCacheEntry):
      (SubimageCacheEntryTraits):
      (WebCore::SubimageCacheWithTimer::SubimageCacheEntryTraits::isEmptyValue):
      (WebCore::SubimageCacheWithTimer::SubimageCacheEntryTraits::constructDeletedValue):
      (WebCore::SubimageCacheWithTimer::SubimageCacheEntryTraits::isDeletedValue):
      (WebCore::SubimageCacheWithTimer::SubimageCacheHash::hash):
      (WebCore::SubimageCacheWithTimer::SubimageCacheHash::equal):
      (SubimageCacheHash):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3abaf74f
  7. 26 Mar, 2013 2 commits
    • ap@apple.com's avatar
      <rdar://problem/13194263> Crashes in NetworkProcess due to threading issues · cd1fa45e
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=113256
      
              Reviewed by Brady Eidson.
      
              Added a new code path in ResourceHandle/ResourceHandleClient that doesn't need
              blocking calls. Implemented it for NSURLConnection by changing NSOperationQueue
              version to forward calls to main thread.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146929 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cd1fa45e
    • ch.dumez@sisa.samsung.com's avatar
      Code duplication between HTTPParsers and HTTPValidation · 3855a916
      ch.dumez@sisa.samsung.com authored
      https://bugs.webkit.org/show_bug.cgi?id=113283
      
      Reviewed by Alexey Proskuryakov.
      
      Source/WebCore:
      
      Merged isValidHTTPToken() from HTTPValidation.h and isRFC2616Token() from
      HTTPParsers.h. They were doing exactly the same thing and their
      implementation was almost the same.
      
      Removed HTTPValidation.* and moved remaining code to HTTPParsers.* as this
      seems like the proper place and it seems odd to keep HTTPValidation for
      just one function.
      
      No new tests, no behavior change for layout tests.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * platform/network/HTTPParsers.cpp:
      (WebCore::isValidHTTPHeaderValue):
      (WebCore):
      (WebCore::isValidHTTPToken): Implementation is slightly simplified based on
      isValidHTTPToken() from HTTPValidation.cpp. (c >= 0x80 || c == 0x7F) is
      replaced by (c >= 0x7F). (c <= 0x1F ||  c == ' ' || c == '\t') is replaced
      by (c <= 0x20). Those expressions are shorter but equivalent.
      (WebCore::contentDispositionType):
      * platform/network/HTTPParsers.h:
      * platform/network/HTTPValidation.cpp: Removed.
      * platform/network/HTTPValidation.h: Removed.
      * xml/XMLHttpRequest.cpp: Stop including HTTPValidation.h.
      
      Source/WebKit/chromium:
      
      * src/AssociatedURLLoader.cpp: Include HTTPParsers.h instead
      of HTTPValidation.h to use isValidHTTPToken().
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146908 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3855a916
  8. 25 Mar, 2013 2 commits
    • dino@apple.com's avatar
      Remove autostart hashing code from WebCore · 5b6c0f9e
      dino@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=113242
      
      Reviewed by Tim Horton.
      
      Remove PlugInOriginHash and all the related build entries.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * html/HTMLPlugInImageElement.cpp:
      * plugins/PlugInOriginHash.cpp: Removed.
      * plugins/PlugInOriginHash.h: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146833 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5b6c0f9e
    • commit-queue@webkit.org's avatar
      WEBGL_compressed_texture_pvrtc needs implementation · 1c667438
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=110497
      
      Patch by Brandon Jones <bajones@google.com> on 2013-03-25
      Reviewed by Kenneth Russell.
      
      Source/WebCore:
      
      Test: webgl/conformance/extensions/webgl-compressed-texture-pvrtc.html
      
      Exposes the WEBGL_compressed_texture_pvrtc extension, but is unverified since no desktop hardware supports
      the format that I am aware of. Should enable mobile ports to expose the format, however.
      
      * CMakeLists.txt:
      * DerivedSources.make:
      * DerivedSources.pri:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.gypi:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/JSWebGLRenderingContextCustom.cpp:
      (WebCore::toJS):
      * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
      (WebCore::toV8Object):
      * html/canvas/WebGLCompressedTexturePVRTC.cpp: Copied from Source/WebCore/html/canvas/WebGLExtension.h.
      (WebCore):
      (WebCore::WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC):
      (WebCore::WebGLCompressedTexturePVRTC::~WebGLCompressedTexturePVRTC):
      (WebCore::WebGLCompressedTexturePVRTC::getName):
      (WebCore::WebGLCompressedTexturePVRTC::create):
      (WebCore::WebGLCompressedTexturePVRTC::supported):
      * html/canvas/WebGLCompressedTexturePVRTC.h: Copied from Source/WebCore/html/canvas/WebGLExtension.h.
      (WebCore):
      (WebGLCompressedTexturePVRTC):
      * html/canvas/WebGLCompressedTexturePVRTC.idl: Copied from Source/WebCore/html/canvas/WebGLExtension.h.
      * html/canvas/WebGLExtension.h:
      * html/canvas/WebGLRenderingContext.cpp:
      (WebCore):
      (WebCore::WebGLRenderingContext::paintRenderingResultsToCanvas):
      (WebCore::WebGLRenderingContext::getExtension):
      (WebCore::WebGLRenderingContext::getSupportedExtensions):
      (WebCore::WebGLRenderingContext::validateCompressedTexFuncData):
      * html/canvas/WebGLRenderingContext.h:
      (WebCore):
      (WebGLRenderingContext):
      
      LayoutTests:
      
      * webgl/conformance/extensions/webgl-compressed-texture-pvrtc-expected.txt: Added.
      * webgl/conformance/extensions/webgl-compressed-texture-pvrtc.html: Added.
      * webgl/resources/webgl_test_files/conformance/extensions/webgl-compressed-texture-pvrtc.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146820 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1c667438
  9. 22 Mar, 2013 4 commits
    • ap@apple.com's avatar
      Split ResourceHandleMac into multiple files · 6366a11b
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=113100
      
              Reviewed by Geoff Garen.
      
              It's grown too big to navigate, and I'm going to make WebCoreResourceHandleAsDelegate
              substantially more complicated yet.
      
              1. Mechanically moved WebCoreResourceHandleAsDelegate into separate files.
              2. Refactored WebCoreSynchronousLoaderClient to be cross-platform, and moved it into
              separate files.
      
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.vcxproj/WebCore.vcxproj:
              * WebCore.vcxproj/WebCore.vcxproj.filters:
              * WebCore.xcodeproj/project.pbxproj:
              * platform/network/SynchronousLoaderClient.cpp: Added.
              * platform/network/SynchronousLoaderClient.h: Added.
              * platform/network/cf/ResourceHandleCFNet.cpp:
              * platform/network/mac/SynchronousLoaderClient.mm: Added.
              * platform/network/mac/WebCoreResourceHandleAsDelegate.h: Added.
              * platform/network/mac/WebCoreResourceHandleAsDelegate.mm: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146667 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6366a11b
    • commit-queue@webkit.org's avatar
      Use generated bindings for the Coordinates type used by Geolocation · e25524f8
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112975
      
      Patch by Steve Block <steveblock@chromium.org> on 2013-03-22
      Reviewed by Kentaro Hara.
      
      No new tests, refactoring only.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Modules/geolocation/Coordinates.cpp: Renamed from Source/WebCore/bindings/js/JSCoordinatesCustom.cpp.
      (WebCore):
      (WebCore::Coordinates::altitude):
      (WebCore::Coordinates::altitudeAccuracy):
      (WebCore::Coordinates::heading):
      (WebCore::Coordinates::speed):
      * Modules/geolocation/Coordinates.h:
      (Coordinates):
      * Modules/geolocation/Coordinates.idl:
      * Target.pri:
      * UseJSC.cmake:
      * UseV8.cmake:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/JSBindingsAllInOne.cpp:
      * bindings/v8/custom/V8CoordinatesCustom.cpp: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e25524f8
    • commit-queue@webkit.org's avatar
      Move GeolocationClient.h to Modules/geolocation/ · aceea69d
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112997
      
      Patch by Steve Block <steveblock@chromium.org> on 2013-03-22
      Reviewed by Kentaro Hara.
      
      No new tests, no functional change.
      
      * GNUmakefile.list.am:
      * Modules/geolocation/GeolocationClient.h: Renamed from Source/WebCore/page/GeolocationClient.h.
      (WebCore):
      (GeolocationClient):
      (WebCore::GeolocationClient::~GeolocationClient):
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146575 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aceea69d
    • commit-queue@webkit.org's avatar
      Move page/Coordinates.[h|idl] to Modules/geolocation/ · 1a06ddd9
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112945
      
      Patch by Steve Block <steveblock@chromium.org> on 2013-03-22
      Reviewed by Kentaro Hara.
      
      No new tests, no functional change.
      
      * CMakeLists.txt:
      * DerivedSources.make:
      * DerivedSources.pri:
      * GNUmakefile.list.am:
      * Modules/geolocation/Coordinates.h: Renamed from Source/WebCore/page/Coordinates.h.
      (WebCore):
      (Coordinates):
      (WebCore::Coordinates::create):
      (WebCore::Coordinates::isolatedCopy):
      (WebCore::Coordinates::latitude):
      (WebCore::Coordinates::longitude):
      (WebCore::Coordinates::altitude):
      (WebCore::Coordinates::accuracy):
      (WebCore::Coordinates::altitudeAccuracy):
      (WebCore::Coordinates::heading):
      (WebCore::Coordinates::speed):
      (WebCore::Coordinates::canProvideAltitude):
      (WebCore::Coordinates::canProvideAltitudeAccuracy):
      (WebCore::Coordinates::canProvideHeading):
      (WebCore::Coordinates::canProvideSpeed):
      (WebCore::Coordinates::Coordinates):
      * Modules/geolocation/Coordinates.idl: Renamed from Source/WebCore/page/Coordinates.idl.
      * Target.pri:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1a06ddd9
  10. 21 Mar, 2013 5 commits
    • achicu@adobe.com's avatar
      [CSS Shaders] Implement a StyleCustomFilterProgram cache · 2be2dfce
      achicu@adobe.com authored
      https://bugs.webkit.org/show_bug.cgi?id=112602
      
      Reviewed by Dean Jackson.
      
      Source/WebCore:
      
      When the style is recalculated, the new computed RenderStyle is saved as the m_style of the
      RenderObject, even if the style was not different.
      
      In the case of Custom Filters, a new StyleCustomFilterProgram was created at all times, but the
      actual equality check was done by comparing the pair of cached shaders from inside the StyleCustomFilterProgram.
      
      Because of that the RenderLayer::styleChanged was not called when the new StyleCustomFilterProgram was created, so it
      will end up still knowing only about the previous StyleCustomFilterProgram.
      
      The RenderLayer sets itself as a client of the StyleCustomFilterProgram, so that it can repaint itself
      when the program is loaded, but because RenderLayer::styleChanged is not called, it will not add itself as a client of the new
      StyleCustomFilterProgram.
      
      StyleCustomFilterProgram waits until the first client to load the programs, so in this case it will just remain unloaded.
      
      There was no crash, but just an assert in debug mode. Also, as a visible side-effect some frames were rendered using blank shaders,
      resulting in a pass-through filter.
      
      The fix would be to actually make the RenderStyle::diff detect the change of the StyleCustomFilterProgram
      using the pointer value and not the values. However, that will always invalidate the "filter" property because
      of the StyleCustomFilterProgram that always gets created during the recalculation time.
      
      I've added StyleCustomFilterProgramCache to cache all the instances of the StyleCustomFilterPrograms that a
      StyleResolver allocates. This way, next time it will try to reuse previously allocated StyleCustomFilterPrograms.
      The key of the cache is the CustomFilterProgramInfo, that combines the URLs to the shaders and a couple of other program settings.
      
      StyleCustomFilterProgramCache is owned by the StyleResovler and StyleCustomFilterPrograms are responsible with
      removing themselves from the cache when the last reference goes away.
      
      This change makes the previous "platform level" program cache obsolete and I will remove that in a future patch.
      https://bugs.webkit.org/show_bug.cgi?id=112844
      
      Test: css3/filters/custom/custom-filter-reload.html
      
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::lookupCustomFilterProgram): Lookup any similar programs in the cache. It will create a new pending
      StyleCustomFilterProgram if there is no pre-cached version of the program.
      if no program is found. loadPendingShaders is responsible for adding the program in the cache if it is actually going to be used.
      (WebCore::StyleResolver::loadPendingShaders): At this point the program is final, so it's safe to add it to the cache.
      (WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
      * css/StyleResolver.h:
      (StyleResolver):
      * css/WebKitCSSShaderValue.cpp:
      (WebCore::WebKitCSSShaderValue::completeURL): Factored out the function to compute the complete URL of the resource.
      (WebCore::WebKitCSSShaderValue::cachedShader):
      * css/WebKitCSSShaderValue.h:
      (WebCore::toWebKitCSSShaderValue):
      (WebKitCSSShaderValue):
      * platform/graphics/filters/CustomFilterOperation.cpp:
      (WebCore::CustomFilterOperation::blend):
      * platform/graphics/filters/CustomFilterOperation.h:
      (WebCore::CustomFilterOperation::operator==): Removed. Programs should now compare by pointer. Kept it as
      private to catch any potential use of it.
      * rendering/style/StyleCustomFilterProgram.cpp: Copied from Source/WebCore/css/WebKitCSSShaderValue.h.
      (WebCore::StyleCustomFilterProgram::~StyleCustomFilterProgram): Destructor removes the program from the cache.
      * rendering/style/StyleCustomFilterProgram.h:
      (WebCore::StyleCustomFilterProgram::setVertexShader): Added an assert to check that the shader is not in the
      cache while the mutation happens. Otherwise the cache might have the wrong key.
      (WebCore::StyleCustomFilterProgram::setFragmentShader): Ditto.
      (WebCore::StyleCustomFilterProgram::isLoaded): Added more asserts to catch cases when the program is used with no clients.
      (StyleCustomFilterProgram):
      (WebCore::StyleCustomFilterProgram::hasPendingShaders):
      (WebCore::StyleCustomFilterProgram::inCache):
      (WebCore::StyleCustomFilterProgram::setCache): Function called when a program is added to / removed from the cache.
      (WebCore::StyleCustomFilterProgram::vertexShaderURL): Added methods to store the KURL that we used as keys in the cache.
      The same KURLs will be used to lookup and remove the filter at the end.
      (WebCore::StyleCustomFilterProgram::setVertexShaderURL):
      (WebCore::StyleCustomFilterProgram::fragmentShaderURL):
      (WebCore::StyleCustomFilterProgram::setFragmentShaderURL):
      (WebCore::StyleCustomFilterProgram::StyleCustomFilterProgram):
      * rendering/style/StyleCustomFilterProgramCache.cpp: Added.
      (WebCore::StyleCustomFilterProgramCache::programCacheKey):
      (WebCore::StyleCustomFilterProgramCache::StyleCustomFilterProgramCache):
      (WebCore::StyleCustomFilterProgramCache::~StyleCustomFilterProgramCache): Destructor removes itself from all the
      referenced StyleCustomFilterPrograms. This is to avoid issues with different destruction orders.
      (WebCore::StyleCustomFilterProgramCache::lookup):
      (WebCore::StyleCustomFilterProgramCache::add):
      (WebCore::StyleCustomFilterProgramCache::remove):
      * rendering/style/StyleCustomFilterProgramCache.h:
      (StyleCustomFilterProgramCache):
      * platform/graphics/texmap/coordinated/CoordinatedCustomFilterProgram.h:
      (WebCore::CoordinatedCustomFilterProgram::operator==: Removed. Programs should now compare by pointer.
      
      LayoutTests:
      
      Added a new test to check for the case when the style is recalculated but the
      filter property is not changed. All the other cases for the new StyleCustomFilterProgramCache
      class should be tested by existing tests.
      
      * css3/filters/custom/custom-filter-reload-expected.txt: Added.
      * css3/filters/custom/custom-filter-reload.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146529 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2be2dfce
    • ap@apple.com's avatar
      Move non-trivial virtual functions out of ResourceHandleClient.h · 47ed39b0
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=112950
      
              Reviewed by Brady Eidson.
      
              * CMakeLists.txt:
              * GNUmakefile.list.am:
              * Target.pri:
              * WebCore.exp.in:
              * WebCore.gypi:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.vcxproj/WebCore.vcxproj:
              * WebCore.vcxproj/WebCore.vcxproj.filters:
              * WebCore.xcodeproj/project.pbxproj:
              * platform/network/ResourceHandleClient.cpp: Added.
              (WebCore::ResourceHandleClient::ResourceHandleClient):
              (WebCore::ResourceHandleClient::~ResourceHandleClient):
              (WebCore::ResourceHandleClient::didReceiveBuffer):
              (WebCore::ResourceHandleClient::getBuffer):
              * platform/network/ResourceHandleClient.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146508 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      47ed39b0
    • fmalita@chromium.org's avatar
      [SVG] Remove explicit LightSource dispatchers · 96b9c2db
      fmalita@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112827
      
      Reviewed by Stephen Chenney.
      
      Convert LightSource setters to dynamic dispatch. This allows us to remove LightSource.cpp
      altogether.
      
      No new tests: refactoring only.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * platform/graphics/filters/DistantLightSource.h:
      (DistantLightSource):
      * platform/graphics/filters/LightSource.cpp: Removed.
      * platform/graphics/filters/LightSource.h:
      (WebCore::LightSource::setAzimuth):
      (WebCore::LightSource::setElevation):
      (WebCore::LightSource::setX):
      (WebCore::LightSource::setY):
      (WebCore::LightSource::setZ):
      (WebCore::LightSource::setPointsAtX):
      (WebCore::LightSource::setPointsAtY):
      (WebCore::LightSource::setPointsAtZ):
      (WebCore::LightSource::setSpecularExponent):
      (WebCore::LightSource::setLimitingConeAngle):
      * platform/graphics/filters/PointLightSource.h:
      (PointLightSource):
      * platform/graphics/filters/SpotLightSource.h:
      (SpotLightSource):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146503 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      96b9c2db
    • commit-queue@webkit.org's avatar
      Remove AudioGain.idl from compilation. · a8e2d43b
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112650
      
      Patch by Praveen R Jadhav <praveen.j@samsung.com> on 2013-03-21
      Reviewed by Chris Rogers.
      
      Source/WebCore:
      
      Spec: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#GainNode
            https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBufferSourceNode
      
      AudioParam serves the same purpose as AudioGain. Infact, AudioGain inherits
      AudioParam class and doesn't have its own member functions/parameters. Also,
      AudioGain is not part of WebAudio W3C specifications.
      
      Test: webaudio/gain-basic.html
      
      * CMakeLists.txt:
      * DerivedSources.make:
      * DerivedSources.pri:
      * GNUmakefile.list.am:
      * Modules/webaudio/AudioBufferSourceNode.cpp:
      (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
      * Modules/webaudio/AudioBufferSourceNode.h:
      (AudioBufferSourceNode):
      (WebCore::AudioBufferSourceNode::gain):
      * Modules/webaudio/AudioBufferSourceNode.idl:
      * Modules/webaudio/AudioGain.h: Removed.
      * Modules/webaudio/AudioGain.idl: Removed.
      * Modules/webaudio/GainNode.cpp:
      (WebCore::GainNode::GainNode):
      * Modules/webaudio/GainNode.h:
      (WebCore):
      (WebCore::GainNode::create):
      (GainNode):
      (WebCore::GainNode::gain):
      * Modules/webaudio/GainNode.idl:
      * Modules/webaudio/PannerNode.cpp:
      (WebCore::PannerNode::PannerNode):
      * Modules/webaudio/PannerNode.h:
      (WebCore::PannerNode::distanceGain):
      (WebCore::PannerNode::coneGain):
      * Target.pri:
      * WebCore.gypi:
      * WebCore.xcodeproj/project.pbxproj:
      
      LayoutTests:
      
      Test to verify GainNode attributes.
      
      * webaudio/gain-basic-expected.txt: Added.
      * webaudio/gain-basic.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146486 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a8e2d43b
    • rniwa@webkit.org's avatar
      Merge MainResourceLoader into DocumentLoader · b1242489
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=104969
      
      Patch by Nate Chapin <japhet@chromium.org> on 2013-03-21
      Reviewed by Adam Barth.
      
      No new tests, refactor only.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.exp.in:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * loader/DocumentLoader.cpp:
      (WebCore::DocumentLoader::DocumentLoader):
      (WebCore::DocumentLoader::mainResourceLoader):
      (WebCore::DocumentLoader::~DocumentLoader): Move main resource clearing from
          ~MainResourceLoader.
      (WebCore::DocumentLoader::mainResourceData):
      (WebCore::DocumentLoader::stopLoading):
      (WebCore::DocumentLoader::notifyFinished): Moved from MainResourceLoader::notifyFinished.
      (WebCore):
      (WebCore::DocumentLoader::finishedLoading):
      (WebCore::DocumentLoader::handleSubstituteDataLoadNow):
      (WebCore::DocumentLoader::redirectReceived):
      (WebCore::DocumentLoader::continueAfterNavigationPolicy):
      (WebCore::DocumentLoader::responseReceived):
      (WebCore::DocumentLoader::continueAfterContentPolicy):
      (WebCore::DocumentLoader::reportMemoryUsage):
      (WebCore::DocumentLoader::dataReceived):
      (WebCore::DocumentLoader::clearMainResourceLoader):
      (WebCore::DocumentLoader::setDefersLoading):
      (WebCore::DocumentLoader::setMainResourceDataBufferingPolicy):
      (WebCore::DocumentLoader::addSubresourceLoader):
      (WebCore::DocumentLoader::maybeLoadEmpty):
      (WebCore::DocumentLoader::startLoadingMainResource): Don't keep separate checks
           for normal and empty loads, just use a single boolean.
      * loader/DocumentLoader.h:
      (WebCore::DocumentLoader::isLoadingMainResource):
      * loader/MainResourceLoader.cpp: Removed.
      * loader/MainResourceLoader.h: Removed.
      * loader/mac/DocumentLoaderMac.cpp:
      (WebCore::DocumentLoader::schedule):
      (WebCore::DocumentLoader::unschedule):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146449 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b1242489
  11. 20 Mar, 2013 2 commits
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r146301. · 12613f59
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/146301
      https://bugs.webkit.org/show_bug.cgi?id=112776
      
      Caused hundreds of tests to hit assertions on Windows debug
      bots (Requested by rniwa on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-03-19
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.exp.in:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * loader/DocumentLoader.cpp:
      (WebCore::DocumentLoader::DocumentLoader):
      (WebCore::DocumentLoader::mainResourceLoader):
      (WebCore::DocumentLoader::~DocumentLoader):
      (WebCore::DocumentLoader::mainResourceData):
      (WebCore::DocumentLoader::stopLoading):
      (WebCore::DocumentLoader::finishedLoading):
      (WebCore::DocumentLoader::handleSubstituteDataLoadNow):
      (WebCore::DocumentLoader::continueAfterNavigationPolicy):
      (WebCore::DocumentLoader::responseReceived):
      (WebCore::DocumentLoader::continueAfterContentPolicy):
      (WebCore::DocumentLoader::reportMemoryUsage):
      (WebCore::DocumentLoader::receivedData):
      (WebCore::DocumentLoader::clearMainResourceLoader):
      (WebCore::DocumentLoader::setDefersLoading):
      (WebCore::DocumentLoader::setMainResourceDataBufferingPolicy):
      (WebCore::DocumentLoader::addSubresourceLoader):
      (WebCore::DocumentLoader::isLoadingMainResource):
      (WebCore):
      (WebCore::DocumentLoader::maybeLoadEmpty):
      (WebCore::DocumentLoader::startLoadingMainResource):
      * loader/DocumentLoader.h:
      (WebCore):
      (DocumentLoader):
      * loader/MainResourceLoader.cpp: Added.
      (WebCore):
      (WebCore::MainResourceLoader::MainResourceLoader):
      (WebCore::MainResourceLoader::~MainResourceLoader):
      (WebCore::MainResourceLoader::create):
      (WebCore::MainResourceLoader::clearResource):
      (WebCore::MainResourceLoader::frameLoader):
      (WebCore::MainResourceLoader::request):
      (WebCore::MainResourceLoader::resourceData):
      (WebCore::MainResourceLoader::redirectReceived):
      (WebCore::MainResourceLoader::responseReceived):
      (WebCore::MainResourceLoader::dataReceived):
      (WebCore::MainResourceLoader::notifyFinished):
      (WebCore::MainResourceLoader::reportMemoryUsage):
      (WebCore::MainResourceLoader::load):
      (WebCore::MainResourceLoader::setDefersLoading):
      (WebCore::MainResourceLoader::defersLoading):
      (WebCore::MainResourceLoader::setDataBufferingPolicy):
      (WebCore::MainResourceLoader::loader):
      (WebCore::MainResourceLoader::identifier):
      * loader/MainResourceLoader.h: Added.
      (WebCore):
      (MainResourceLoader):
      (WebCore::MainResourceLoader::cachedMainResource):
      (WebCore::MainResourceLoader::documentLoader):
      * loader/mac/DocumentLoaderMac.cpp:
      (WebCore::DocumentLoader::schedule):
      (WebCore::DocumentLoader::unschedule):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146306 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      12613f59
    • mkwst@chromium.org's avatar
      CSP 1.1: Stub out SecurityPolicyViolationEvent interface. · 5bcd6dde
      mkwst@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112681
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      A first pass at a SecurityPolicyViolationEvent interface is defined in
      CSP 1.1's editor's draft[1]. This patch puts the big components into
      place so that we can start getting some implementation experience with
      the new event interface as it's defined, and feed that back into the
      working group.
      
      Here, we're only defining the interface, and creating a listener on the
      Document. Events aren't yet being fired when Content Security Policy
      violations occur. I'll tackle that in a future patch; adding files is
      a big enough annoyance to do it separately.
      
      This patch has only two web-visible impacts:
      
      - Document objects now have an 'onsecuritypolicyviolation' attribute.
      - A SecurityPolicyViolationEvent constructor is accessible on the Window object.
      
      Ports that have not enabled the CSP_NEXT flag should experience no change.
      
      [1]: https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#securitypolicyviolationevent-events
      
      Test: http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-basics.html
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
          Wow! A new file! This is so exciting! I'm going to tell ALL my build
          systems about this!
      * dom/Document.h:
      * dom/Document.idl:
          Define an 'onsecuritypolicyviolation' event handler on Document objects.
      * dom/EventNames.h:
      * dom/EventNames.in:
          Define a 'securitypolicyviolation' event type.
      * dom/SecurityPolicyViolationEvent.h: Added.
      (WebCore::SecurityPolicyViolationEventInit::SecurityPolicyViolationEventInit):
      (SecurityPolicyViolationEventInit):
      (SecurityPolicyViolationEvent):
      (WebCore::SecurityPolicyViolationEvent::create):
      (WebCore::SecurityPolicyViolationEvent::documentURI):
      (WebCore::SecurityPolicyViolationEvent::referrer):
      (WebCore::SecurityPolicyViolationEvent::blockedURI):
      (WebCore::SecurityPolicyViolationEvent::violatedDirective):
      (WebCore::SecurityPolicyViolationEvent::effectiveDirective):
      (WebCore::SecurityPolicyViolationEvent::originalPolicy):
      (WebCore::SecurityPolicyViolationEvent::sourceURL):
      (WebCore::SecurityPolicyViolationEvent::lineNumber):
      (WebCore::SecurityPolicyViolationEvent::interfaceName):
      (WebCore::SecurityPolicyViolationEvent::SecurityPolicyViolationEvent):
      * dom/SecurityPolicyViolationEvent.idl: Added.
          Define the SecurityPolicyViolationEvent's IDL, and then create all the
          boilerplate necessary to properly initialize a SecurityPolicyViolationEvent
          object with the relevant properties.
      * page/DOMWindow.idl:
          Add the new SecurityPolicyViolationEvent constructor to the Window object
          so it's available on a page.
      
      LayoutTests:
      
      * http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-basics-expected.txt: Added.
      * http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-basics.html: Added.
          Simple test which checks only that events are created correctly,
          and that the event handler exists on Document. We'll test the
          real functionality once we wire the event up to the handler.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146305 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5bcd6dde
  12. 19 Mar, 2013 2 commits
    • japhet@chromium.org's avatar
      Merge MainResourceLoader into DocumentLoader · 939359fc
      japhet@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=104969
      
      Reviewed by Adam Barth.
      
      No new tests, refactor only.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.exp.in:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * loader/DocumentLoader.cpp:
      (WebCore::DocumentLoader::DocumentLoader):
      (WebCore::DocumentLoader::mainResourceLoader):
      (WebCore::DocumentLoader::~DocumentLoader): Move main resource clearing from
          ~MainResourceLoader.
      (WebCore::DocumentLoader::mainResourceData):
      (WebCore::DocumentLoader::stopLoading):
      (WebCore::DocumentLoader::notifyFinished): Moved from MainResourceLoader::notifyFinished.
      (WebCore):
      (WebCore::DocumentLoader::finishedLoading):
      (WebCore::DocumentLoader::handleSubstituteDataLoadNow):
      (WebCore::DocumentLoader::redirectReceived):
      (WebCore::DocumentLoader::continueAfterNavigationPolicy):
      (WebCore::DocumentLoader::responseReceived):
      (WebCore::DocumentLoader::continueAfterContentPolicy):
      (WebCore::DocumentLoader::reportMemoryUsage):
      (WebCore::DocumentLoader::dataReceived):
      (WebCore::DocumentLoader::clearMainResourceLoader):
      (WebCore::DocumentLoader::setDefersLoading):
      (WebCore::DocumentLoader::setMainResourceDataBufferingPolicy):
      (WebCore::DocumentLoader::addSubresourceLoader):
      (WebCore::DocumentLoader::maybeLoadEmpty):
      (WebCore::DocumentLoader::startLoadingMainResource): Don't keep separate checks
           for normal and empty loads, just use a single boolean.
      * loader/DocumentLoader.h:
      (WebCore::DocumentLoader::isLoadingMainResource):
      * loader/MainResourceLoader.cpp: Removed.
      * loader/MainResourceLoader.h: Removed.
      * loader/mac/DocumentLoaderMac.cpp:
      (WebCore::DocumentLoader::schedule):
      (WebCore::DocumentLoader::unschedule):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146301 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      939359fc
    • commit-queue@webkit.org's avatar
      Web Inspector: split Console into two entities, a web-facing bound object and page console. · 7195ba53
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=111578
      
      Patch by Sergey Ryazanov <serya@chromium.org> on 2013-03-19
      Reviewed by Vsevolod Vlasov.
      
      Otherwise, a lot of logging in WebCore needs to go through the DOMWindow which is unnecessary.
      
      Source/WebCore:
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.exp.in:
      * WebCore.gypi:
      * WebCore.order:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/JSCustomXPathNSResolver.cpp:
      (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
      * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
      (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
      * dom/Document.cpp:
      (WebCore::Document::addConsoleMessage):
      (WebCore::Document::addMessage):
      * inspector/PageDebuggerAgent.cpp:
      (WebCore::PageDebuggerAgent::muteConsole):
      (WebCore::PageDebuggerAgent::unmuteConsole):
      * inspector/PageRuntimeAgent.cpp:
      (WebCore::PageRuntimeAgent::muteConsole):
      (WebCore::PageRuntimeAgent::unmuteConsole):
      * page/Console.cpp:
      (WebCore::internalAddMessage):
      * page/Console.h:
      (WebCore):
      (Console):
      * page/DOMWindow.cpp:
      (WebCore::DOMWindow::pageConsole):
      (WebCore):
      (WebCore::DOMWindow::dispatchMessageEventWithOriginCheck):
      (WebCore::DOMWindow::printErrorMessage):
      * page/DOMWindow.h:
      (WebCore):
      (DOMWindow):
      * page/Page.cpp:
      (WebCore::Page::Page):
      * page/Page.h:
      (WebCore):
      (WebCore::Page::console):
      (Page):
      * page/PageConsole.cpp: Added.
      (WebCore::PageConsole::PageConsole):
      (WebCore):
      (WebCore::PageConsole::~PageConsole):
      (WebCore::PageConsole::printSourceURLAndLine):
      (WebCore::PageConsole::printMessageSourceAndLevelPrefix):
      (WebCore::PageConsole::addMessage):
      (WebCore::PageConsole::mute):
      (WebCore::PageConsole::unmute):
      (WebCore::PageConsole::shouldPrintExceptions):
      (WebCore::PageConsole::setShouldPrintExceptions):
      * page/PageConsole.h: Copied from Source/WebCore/page/Console.h.
      (WebCore):
      (PageConsole):
      (WebCore::PageConsole::create):
      (WebCore::PageConsole::page):
      * xml/XSLStyleSheetLibxslt.cpp:
      (WebCore::XSLStyleSheet::parseString):
      * xml/XSLTProcessorLibxslt.cpp:
      (WebCore::XSLTProcessor::parseErrorFunc):
      (WebCore::docLoaderFunc):
      
      Source/WebKit/mac:
      
      * Misc/WebCoreStatistics.mm:
      (+[WebCoreStatistics shouldPrintExceptions]):
      (+[WebCoreStatistics setShouldPrintExceptions:]):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146208 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7195ba53
  13. 15 Mar, 2013 1 commit
  14. 13 Mar, 2013 4 commits
    • commit-queue@webkit.org's avatar
      Implement FontLoader interface · d7e6fa24
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=98395
      
      Patch by Kunihiko Sakamoto <ksakamoto@chromium.org> on 2013-03-13
      Reviewed by Eric Seidel.
      
      Source/WebCore:
      
      This patch implements the FontLoader interface defined in CSS Font
      Load Events Module Level 3.[1] It adds fontloader attribute to
      Document, and adds two interfaces, FontLoader and
      CSSFontFaceLoadEvent to WebCore.
      
      [1]: http://dev.w3.org/csswg/css-font-load-events-3/
      
      This feature is guarded by FONT_LOAD_EVENTS compiler flag and
      RuntimeEnabledFeatures::fontLoadEventsEnabled() runtime flag.
      
      Tests: fast/css/fontloader-download-error.html
             fast/css/fontloader-events.html
             fast/css/fontloader-loadingdone.html
             fast/css/fontloader-multiple-faces-download-error.html
             fast/css/fontloader-multiple-faces.html
             fast/css/fontloader-multiple-families.html
             http/tests/webfont/fontloader-loading-attribute.html
      
      * CMakeLists.txt: Adding FontLoader/CSSFontFaceLoadEvent files.
      * DerivedSources.cpp: Ditto.
      * DerivedSources.make: Ditto.
      * DerivedSources.pri: Ditto.
      * GNUmakefile.list.am: Ditto.
      * Target.pri: Ditto.
      * WebCore.gypi: Ditto.
      * WebCore.vcproj/WebCore.vcproj: Ditto.
      * WebCore.vcxproj/WebCore.vcxproj: Ditto.
      * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
      * WebCore.xcodeproj/project.pbxproj: Ditto.
      * bindings/js/JSDictionary.cpp:
      (WebCore::JSDictionary::convertValue): Add convertValue() for CSSFontFaceRule, DOMError, and VoidCallback.
      * bindings/js/JSDictionary.h: Ditto.
      * bindings/v8/Dictionary.cpp: Add get() for CSSFontFaceRule, DOMError, and VoidCallback.
      (WebCore::Dictionary::get):
      * bindings/v8/Dictionary.h: Ditto.
      (Dictionary):
      * css/CSSFontFace.cpp: Notifies FontLoader as load progresses.
      (WebCore::CSSFontFace::fontLoaded):
      (WebCore::CSSFontFace::getFontData):
      (WebCore::CSSFontFace::notifyFontLoader):
      (WebCore::CSSFontFace::notifyLoadingDone):
      * css/CSSFontFace.h: Add two member variables. m_rule stores CSSFontFaceRule for the fontface. m_loadState holds current state of the fontface in terms of FontLoader.
      (WebCore::CSSFontFace::create): Takes additional parameter of type CSSFontFaceRule.
      (WebCore::CSSFontFace::loadState):
      (WebCore::CSSFontFace::CSSFontFace):
      * css/CSSFontFaceLoadEvent.cpp: Added.
      (WebCore::CSSFontFaceLoadEvent::CSSFontFaceLoadEvent):
      (WebCore::CSSFontFaceLoadEvent::~CSSFontFaceLoadEvent):
      (WebCore::CSSFontFaceLoadEvent::interfaceName):
      * css/CSSFontFaceLoadEvent.h: Added.
      (CSSFontFaceLoadEventInit):
      (CSSFontFaceLoadEvent):
      (WebCore::CSSFontFaceLoadEvent::create):
      (WebCore::CSSFontFaceLoadEvent::createForFontFaceRule):
      (WebCore::CSSFontFaceLoadEvent::createForError):
      (WebCore::CSSFontFaceLoadEvent::fontface):
      (WebCore::CSSFontFaceLoadEvent::error):
      * css/CSSFontFaceLoadEvent.idl: Added.
      * css/CSSFontFaceRule.idl: Add JSGenerateToJSObject and JSGenerateToNativeObject as JSC binding needs them.
      * css/CSSFontFaceSource.cpp:
      (WebCore::CSSFontFaceSource::isDecodeError): Added.
      (WebCore::CSSFontFaceSource::ensureFontData): Added.
      * css/CSSFontFaceSource.h:
      (CSSFontFaceSource):
      * css/CSSFontSelector.cpp:
      (WebCore::CSSFontSelector::addFontFaceRule): Pass a CSSFontFaceRule to CSSFontFace::create().
      (WebCore::CSSFontSelector::getFontData): Moved logic for creating a CSSSegmentedFontFace to a helper function getFontFace().
      (WebCore::CSSFontSelector::getFontFace): Added.
      * css/CSSFontSelector.h:
      * css/CSSSegmentedFontFace.cpp:
      (WebCore::CSSSegmentedFontFace::fontLoaded): Fires callbacks when load is completed.
      (WebCore::CSSSegmentedFontFace::isLoading): Returns true if any fonts are still loading.
      (WebCore::CSSSegmentedFontFace::checkFont): Returns true if all fonts are loaded.
      (WebCore::CSSSegmentedFontFace::loadFont): Starts load by calling getFontData().
      * css/CSSSegmentedFontFace.h:
      (CSSSegmentedFontFace): Declares new functions and a vector to store callbacks.
      (LoadFontCallback):
      (WebCore::CSSSegmentedFontFace::LoadFontCallback::~LoadFontCallback):
      * css/FontLoader.cpp: Added.
      (LoadFontCallback): Holds callback functions of FontLoader.loadFont().
      (WebCore::LoadFontCallback::create):
      (WebCore::LoadFontCallback::createFromParams):
      (WebCore::LoadFontCallback::LoadFontCallback):
      (WebCore::LoadFontCallback::notifyLoaded):
      (WebCore::LoadFontCallback::notifyError):
      (WebCore::FontLoader::FontLoader):
      (WebCore::FontLoader::~FontLoader):
      (WebCore::FontLoader::eventTargetData):
      (WebCore::FontLoader::ensureEventTargetData):
      (WebCore::FontLoader::interfaceName):
      (WebCore::FontLoader::scriptExecutionContext):
      (WebCore::FontLoader::didLayout): Fires pending events and callbacks. This is called when layout have completed.
      (WebCore::FontLoader::scheduleEvent): Defers event dispatching until layout completes.
      (WebCore::FontLoader::firePendingEvents): Dispatches pending events.
      (WebCore::FontLoader::beginFontLoading): Schedules loading/loadstart events. This is called from CSSFontFace.
      (WebCore::FontLoader::fontLoaded): Schedules load/loadingdone events. This is called from CSSFontFace.
      (WebCore::FontLoader::loadError): Schedules error/loadingdone events. This is called from CSSFontFace.
      (WebCore::FontLoader::notifyWhenFontsReady): Implements fontloader.notifyWhenFontsReady().
      (WebCore::FontLoader::loadingDone): Fires callbacks of notifyWhenFontsReady.
      (WebCore::FontLoader::loadFont): Implements fontloader.loadFont().
      (WebCore::FontLoader::checkFont): Implements fontloader.checkFont().
      (WebCore::FontLoader::resolveFontStyle): Parses the given font parameter using the syntax of CSS 'font' property and creates Font object. The logic is taken from CanvasRenderingContext2D::setFont().
      * css/FontLoader.h: Added.
      (FontLoader):
      (WebCore::FontLoader::create):
      (WebCore::FontLoader::loading):
      (WebCore::FontLoader::document):
      (WebCore::FontLoader::refEventTarget):
      (WebCore::FontLoader::derefEventTarget):
      * css/FontLoader.idl: Added.
      * dom/Document.cpp:
      (WebCore::Document::Document):
      (WebCore::Document::fontloader): Added.
      * dom/Document.h:
      (Document): Add m_fontloader and fontloader().
      * dom/Document.idl: Add fontloader attribute.
      * dom/EventNames.h: Add loading and loadingdone events.
      * dom/EventNames.in: Add CSSFontFaceLoadEvent.
      * dom/EventTargetFactory.in: Add FontLoader.
      * page/FrameView.cpp:
      (WebCore::FrameView::performPostLayoutTasks): Calls FontLoader::didLayout().
      
      Tools:
      
      Enable FontLoadEvents runtime flag for TestShell.
      
      * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
      (WebTestRunner::TestInterfaces::TestInterfaces):
      
      LayoutTests:
      
      Add tests for document.fontloader. Since the feature is currently enabled
      only for chromium, the tests are expected to fail on the other ports.
      
      * fast/css/fontloader-download-error-expected.txt: Added.
      * fast/css/fontloader-download-error.html: Added.
      * fast/css/fontloader-events-expected.txt: Added.
      * fast/css/fontloader-events.html: Added.
      * fast/css/fontloader-loadingdone-expected.txt: Added.
      * fast/css/fontloader-loadingdone.html: Added.
      * fast/css/fontloader-multiple-faces-download-error-expected.txt: Added.
      * fast/css/fontloader-multiple-faces-download-error.html: Added.
      * fast/css/fontloader-multiple-faces-expected.txt: Added.
      * fast/css/fontloader-multiple-faces.html: Added.
      * fast/css/fontloader-multiple-families-expected.txt: Added.
      * fast/css/fontloader-multiple-families.html: Added.
      * http/tests/webfont/fontloader-loading-attribute-expected.txt: Added.
      * http/tests/webfont/fontloader-loading-attribute.html: Added.
      * platform/chromium/fast/css/fontloader-download-error-expected.txt: Added.
      * platform/chromium/fast/css/fontloader-events-expected.txt: Added.
      * platform/chromium/fast/css/fontloader-loadingdone-expected.txt: Added.
      * platform/chromium/fast/css/fontloader-multiple-faces-download-error-expected.txt: Added.
      * platform/chromium/fast/css/fontloader-multiple-faces-expected.txt: Added.
      * platform/chromium/fast/css/fontloader-multiple-families-expected.txt: Added.
      * platform/chromium/http/tests/webfont/fontloader-loading-attribute-expected.txt: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145787 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d7e6fa24
    • kinuko@chromium.org's avatar
      Quota API: Update IDL to make it match the latest WD · 5c3424aa
      kinuko@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=88396
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      Add a new interface object (navigator.StorageQuota) and deprecate the old one (window.StorageInfo)
      to make the code match with the latest Quota API WD:
      http://www.w3.org/TR/quota-api/
      
      Tests: storage/storagequota-query-usage.html
             storage/storagequota-request-quota.html
      
      * CMakeLists.txt:
      * DerivedSources.cpp:
      * DerivedSources.make:
      * DerivedSources.pri:
      * GNUmakefile.list.am:
      * Modules/quota/DOMWindowQuota.cpp:
      (WebCore::DOMWindowQuota::webkitStorageInfo): Added a deprecate warning message for the old interface.
      * Modules/quota/NavigatorStorageQuota.cpp: Added for the new interface.
      * Modules/quota/NavigatorStorageQuota.h: Added for the new interface.
      * Modules/quota/NavigatorStorageQuota.idl: Added for the new interface.
      * Modules/quota/StorageErrorCallback.cpp:
      (WebCore::StorageErrorCallback::CallbackTask::CallbackTask):
      (WebCore::StorageErrorCallback::CallbackTask::performTask):
      * Modules/quota/StorageErrorCallback.h: Renamed from Source/WebCore/Modules/quota/StorageInfoErrorCallback.h.
      (WebCore):
      (StorageErrorCallback):
      (WebCore::StorageErrorCallback::~StorageErrorCallback):
      (WebCore::StorageErrorCallback::CallbackTask::create):
      * Modules/quota/StorageErrorCallback.idl: Renamed from Source/WebCore/Modules/quota/StorageInfoErrorCallback.idl.
      * Modules/quota/StorageInfo.cpp: Added code to relay requests to the new StorageQuota implementation.
      * Modules/quota/StorageInfo.h:
      * Modules/quota/StorageInfo.idl:
      * Modules/quota/StorageQuota.cpp: Added for the new interface.
      * Modules/quota/StorageQuota.h:
      (WebCore::StorageQuota::create):
      * Modules/quota/StorageQuota.idl: Copied from Source/WebCore/Modules/quota/StorageInfo.idl.
      * Modules/quota/StorageQuotaCallback.h: Renamed from Source/WebCore/Modules/quota/StorageInfoQuotaCallback.h.
      * Modules/quota/StorageQuotaCallback.idl: Renamed from Source/WebCore/Modules/quota/StorageInfoQuotaCallback.idl.
      * Modules/quota/StorageUsageCallback.h: Renamed from Source/WebCore/Modules/quota/StorageInfoUsageCallback.h.
      * Modules/quota/StorageUsageCallback.idl: Renamed from Source/WebCore/Modules/quota/StorageInfoUsageCallback.idl.
      * Target.pri:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * page/FeatureObserver.h:
      
      Source/WebKit/chromium:
      
      Add a new interface object (navigator.StorageQuota) and deprecate the old one (window.StorageInfo)
      to make the code match with the latest Quota API WD:
      http://www.w3.org/TR/quota-api/
      
      * WebKit.gyp:
      * src/AssertMatchingEnums.cpp:
      * src/StorageQuotaChromium.cpp: Renamed from Source/WebKit/chromium/src/StorageInfoChromium.cpp.
      (WebCore):
      (WebCore::StorageQuota::queryUsageAndQuota):
      (WebCore::StorageQuota::requestQuota):
      * src/WebStorageQuotaCallbacksImpl.cpp:
      (WebKit::WebStorageQuotaCallbacksImpl::WebStorageQuotaCallbacksImpl):
      * src/WebStorageQuotaCallbacksImpl.h:
      (WebCore):
      (WebStorageQuotaCallbacksImpl):
      
      LayoutTests:
      
      * platform/chromium/TestExpectations:
      * storage/storagequota-query-usage-expected.txt: Added.
      * storage/storagequota-query-usage.html: Added.
      * storage/storagequota-request-quota-expected.txt: Added.
      * storage/storagequota-request-quota.html: Added.
      
      Rebaselines:
      * platform/chromium/fast/dom/everything-to-string-expected.txt: Added.
      * platform/chromium/fast/dom/navigator-detached-no-crash-expected.txt:
      * platform/chromium/fast/js/global-constructors-expected.txt:
      * platform/chromium/http/tests/security/isolatedWorld/all-window-properties-expected.txt: Added.
      * platform/chromium/http/tests/security/isolatedWorld/all-window-prototypes-expected.txt: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145782 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5c3424aa
    • rniwa@webkit.org's avatar
      Unreviewed. Sort the Xcode project file. · 74c8d92b
      rniwa@webkit.org authored
      * WebCore.xcodeproj/project.pbxproj:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145781 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      74c8d92b
    • beidson@apple.com's avatar
      Small ResourceLoader cleanups. · c289a14d
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=112279
      
      Reviewed by Geoff Garen.
      
      Source/WebCore:
      
      No new tests (Refactor with no behavior change).
      
      1 - Add "OVERRIDE" to virtual methods in subclasses of ResourceLoader to catch future mistakes.
      2 - Replace the "bool allAtOnce" flag with a descriptive enum to make reading code easier.
      
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      
      * loader/DocumentLoader.cpp:
      (WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
      
      * loader/NetscapePlugInStreamLoader.cpp:
      (WebCore::NetscapePlugInStreamLoader::didReceiveData):
      * loader/NetscapePlugInStreamLoader.h:
      
      * loader/ResourceLoader.cpp:
      (WebCore::ResourceLoader::addData):
      (WebCore::ResourceLoader::didReceiveData):
      * loader/ResourceLoader.h:
      * loader/ResourceLoaderTypes.h: Added.
      
      * loader/SubresourceLoader.cpp:
      (WebCore::SubresourceLoader::didReceiveData):
      * loader/SubresourceLoader.h:
      
      Source/WebKit2:
      
      Replace the "bool allAtOnce" flag with a descriptive enum to make reading code easier.
      
      * NetworkProcess/NetworkResourceLoader.cpp:
      (WebKit::NetworkResourceLoader::didReceiveData):
      
      * WebProcess/Network/WebResourceLoader.cpp:
      (WebKit::WebResourceLoader::didReceiveData):
      (WebKit::WebResourceLoader::didReceiveResource):
      * WebProcess/Network/WebResourceLoader.h:
      * WebProcess/Network/WebResourceLoader.messages.in: Get rid of the "allAtOnce" flag since it was always false.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c289a14d
  15. 12 Mar, 2013 2 commits
    • ggaren@apple.com's avatar
      Moved RunLoopTimer and SchedulePair to WTF · b1a2984e
      ggaren@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=112171
      
      Reviewed by Oliver Hunt.
      
      This will allow us to use timers in lower level primitives without
      duplicating all the code.
      
      ../WebCore: 
      
      * WebCore.exp.in:
      * WebCore.xcodeproj/project.pbxproj:
      * loader/DocumentLoader.h:
      (WTF):
      (WebCore):
      (DocumentLoader):
      * loader/MainResourceLoader.h:
      * page/Page.h:
      * platform/AutodrainedPool.h: Removed.
      * platform/cf/RunLoopTimerCF.cpp: Removed.
      * platform/cf/SchedulePair.cpp: Removed.
      * platform/cf/SchedulePair.h: Removed.
      * platform/mac/AutodrainedPool.mm: Removed.
      * platform/mac/SchedulePairMac.mm: Removed.
      * platform/network/NetworkingContext.h:
      * platform/network/ResourceHandle.h:
      (WTF):
      (WebCore):
      (ResourceHandle):
      * platform/network/cf/FormDataStreamCFNet.cpp:
      * platform/network/mac/ResourceHandleMac.mm:
      
      ../WebKit/mac: 
      
      * WebCoreSupport/WebFrameNetworkingContext.h:
      (WebFrameNetworkingContext):
      
      ../WebKit2: 
      
      * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
      (WebFrameNetworkingContext):
      
      ../WTF: 
      
      * WTF.xcodeproj/project.pbxproj:
      * wtf/AutodrainedPool.h: Copied from Source/WebCore/platform/AutodrainedPool.h.
      (AutodrainedPool):
      * wtf/AutodrainedPoolMac.mm: Copied from Source/WebCore/platform/mac/AutodrainedPool.mm.
      * wtf/RunLoopTimer.h: Copied from Source/WebCore/platform/RunLoopTimer.h.
      * wtf/RunLoopTimerCF.cpp: Copied from Source/WebCore/platform/cf/RunLoopTimerCF.cpp.
      * wtf/SchedulePair.cpp: Copied from Source/WebCore/platform/cf/SchedulePair.cpp.
      * wtf/SchedulePair.h: Copied from Source/WebCore/platform/cf/SchedulePair.h.
      (SchedulePair):
      * wtf/SchedulePairMac.mm: Copied from Source/WebCore/platform/mac/SchedulePairMac.mm.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145592 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b1a2984e
    • tasak@google.com's avatar
      [Refactoring] Implement RuleCollector · 9dd0d042
      tasak@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=109916
      
      Reviewed by Antti Koivisto.
      
      Implemented rule collector for an element and collector for a page.
      Not all members in class State are required entire while resolving
      a style.
      
      No new tests, because just refactoring.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.gypi:
      * WebCore.xcodeproj/project.pbxproj:
      * css/CSSAllInOne.cpp:
      Added ElementRuleCollector and PageRuleCollector.
      * css/DocumentRuleSets.cpp:
      (WebCore::ShadowDistributedRules::collectMatchRequests):
      Since behaviorAtBoundary is a state owned by ElementRuleCollector,
      removed from here.
      * css/DocumentRuleSets.h:
      (WebCore::ShadowDistributedRules::isEmpty):
      Added to quickly check whether there exist any ShadowDistributedRules
      or not.
      * css/ElementRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
      (WebCore):
      (WebCore::ElementRuleCollector::matchedResult):
      (WebCore::ElementRuleCollector::matchedRuleList):
      (WebCore::ElementRuleCollector::addMatchedRule):
      (WebCore::ElementRuleCollector::clearMatchedRules):
      (WebCore::ElementRuleCollector::ensureRuleList):
      (WebCore::ElementRuleCollector::addElementStyleProperties):
      (WebCore::ElementRuleCollector::collectMatchingRules):
      (WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
      (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
      (WebCore::ElementRuleCollector::matchScopedAuthorRules):
      (WebCore::ElementRuleCollector::matchHostRules):
      (WebCore::ElementRuleCollector::matchShadowDistributedRules):
      (WebCore::ElementRuleCollector::matchAuthorRules):
      (WebCore::ElementRuleCollector::matchUserRules):
      (WebCore::ElementRuleCollector::matchUARules):
      (WebCore::ElementRuleCollector::ruleMatches):
      (WebCore::ElementRuleCollector::collectMatchingRulesForList):
      (WebCore::ElementRuleCollector::sortMatchedRules):
      (WebCore::ElementRuleCollector::matchAllRules):
      Moved these methods from StyleResolver to this class.
      (WebCore::ElementRuleCollector::hasAnyMatchingRules):
      This method is used for checking whether a given element can share
      a cache.
      * css/ElementRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h.
      (WebCore):
      (WebCore::ElementRuleCollector::ElementRuleCollector):
      Use styleResolver instance to initialize its member variables, i.e.
      SelectorFilter, RuleSets, InspectorCSSOMWrappers, and
      StyleScopedResolver.
      (ElementRuleCollector):
      (WebCore::ElementRuleCollector::setMode):
      (WebCore::ElementRuleCollector::setPseudoStyleRequest):
      (WebCore::ElementRuleCollector::setSameOriginOnly):
      (WebCore::ElementRuleCollector::setRegionForStyling):
      Mode, SameOriginOnly, RegionForStyling are only used while collecting
      matched rules.
      (WebCore::ElementRuleCollector::setMedium):
      Need to know which default stylesheet should be looked up.
      (WebCore::ElementRuleCollector::document):
      * css/PageRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
      (WebCore::comparePageRules):
      (WebCore::PageRuleCollector::isLeftPage):
      (WebCore::PageRuleCollector::isFirstPage):
      (WebCore::PageRuleCollector::pageName):
      (WebCore::PageRuleCollector::matchAllPageRules):
      (WebCore::PageRuleCollector::matchPageRules):
      (WebCore::checkPageSelectorComponents):
      (WebCore::PageRuleCollector::matchPageRulesForList):
      Moved from StyleResolver.
      * css/PageRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h.
      (WebCore):
      (WebCore::PageRuleCollector::PageRuleCollector):
      (PageRuleCollector):
      (WebCore::PageRuleCollector::matchedResult):
      * css/StyleResolver.cpp:
      (WebCore):
      (WebCore::StyleResolver::State::clear):
      (WebCore::StyleResolver::MatchResult::addMatchedProperties):
      (WebCore::StyleResolver::State::initForStyleResolve):
      (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
      (WebCore::StyleResolver::styleForElement):
      (WebCore::StyleResolver::styleForKeyframe):
      (WebCore::StyleResolver::pseudoStyleForElement):
      (WebCore::StyleResolver::styleForPage):
      (WebCore::StyleResolver::pseudoStyleRulesForElement):
      (WebCore::StyleResolver::applyMatchedProperties):
      * css/StyleResolver.h:
      (WebCore::MatchRequest::MatchRequest):
      Removed behaviorAtBoundary. Instead, ElementRuleCollector have the
      state.
      (MatchRequest):
      (WebCore::StyleResolver::selectorFilter):
      Added to obtain SelectorFilter in ElementRuleCollector's constructor.
      (StyleResolver):
      (MatchResult):
      (WebCore::StyleResolver::State::State):
      To pass ASSERT in StyleResolver::applyProperties, need to keep
      m_regionForStyling.
      (State):
      (WebCore::StyleResolver::State::regionForStyling):
      (WebCore::StyleResolver::State::useSVGZoomRules):
      (WebCore::StyleResolver::hasSelectorForId):
      (WebCore):
      (WebCore::checkRegionSelector):
      * inspector/InspectorCSSAgent.cpp:
      (WebCore::InspectorCSSAgent::willMatchRule):
      Removed StyleResolver from its parameter list. Instead, added
      InspectorCSSOMWrappers and DocumentStyleSheetCollection.
      * inspector/InspectorCSSAgent.h:
      (WebCore):
      (InspectorCSSAgent):
      * inspector/InspectorInstrumentation.cpp:
      (WebCore):
      (WebCore::InspectorInstrumentation::willMatchRuleImpl):
      * inspector/InspectorInstrumentation.h:
      (WebCore):
      (InspectorInstrumentation):
      (WebCore::InspectorInstrumentation::willMatchRule):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145510 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9dd0d042