1. 21 Nov, 2013 3 commits
    • commit-queue@webkit.org's avatar
      Remove ENABLE_WORKERS · f0eff209
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105784
      
      .:
      
      Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-11-21
      Reviewed by Darin Adler.
      
      * Source/autotools/SetupWebKitFeatures.m4:
      * Source/cmake/WebKitFeatures.cmake:
      * Source/cmakeconfig.h.cmake:
      
      Source/WebCore:
      
      Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-11-21
      Reviewed by Darin Adler.
      
      Source/WebKit:
      
      Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-11-21
      Reviewed by Darin Adler.
      
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
      
      Source/WebKit/efl:
      
      Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-11-21
      Reviewed by Darin Adler.
      
      * ewk/ewk_settings.cpp:
      (ewk_settings_memory_cache_clear):
      
      Source/WebKit/win:
      
      Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-11-21
      Reviewed by Darin Adler.
      
      * WebWorkersPrivate.cpp:
      (WebWorkersPrivate::workerThreadCount):
      
      Source/WTF:
      
      Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-11-21
      Reviewed by Darin Adler.
      
      * wtf/FeatureDefines.h:
      * wtf/nix/FeatureDefinesNix.h:
      
      Tools:
      
      Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-11-21
      Reviewed by Darin Adler.
      
      * Scripts/webkitperl/FeatureList.pm:
      
      WebKitLibraries:
      
      Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-11-21
      Reviewed by Darin Adler.
      
      * win/tools/vsprops/FeatureDefines.props:
      * win/tools/vsprops/FeatureDefinesCairo.props:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159679 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f0eff209
    • dbates@webkit.org's avatar
      [iOS] Build fix; export symbol for WebCore::provideDeviceOrientationTo() · dfbf4350
      dbates@webkit.org authored
      Add the symbol __ZN7WebCore26provideDeviceOrientationToEPNS_4PageEPNS_23DeviceOrientationClientE.
      
      * WebCore.exp.in:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dfbf4350
    • beidson@apple.com's avatar
      Add more infrastructure for ServerConnection communication between Web and Database processes · 09bfc131
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124693
      
      Reviewed by Anders Carlsson.
      
      Source/WebCore:
      
      * WebCore.exp.in:
      
      Source/WebKit2:
      
      * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
      (WebKit::DatabaseToWebProcessConnection::establishIDBConnection):
      (WebKit::DatabaseToWebProcessConnection::removeDatabaseProcessIDBConnection): Added for WebProcess to be able
        to invalidate the DatabaseProcess side of a server connection.
      * DatabaseProcess/DatabaseToWebProcessConnection.h:
      * DatabaseProcess/DatabaseToWebProcessConnection.messages.in:
      
      * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
      (WebKit::DatabaseProcessIDBConnection::DatabaseProcessIDBConnection):
      (WebKit::DatabaseProcessIDBConnection::disconnectedFromWebProcess): Added for future cleanup.
      (WebKit::DatabaseProcessIDBConnection::establishConnection):
      (WebKit::DatabaseProcessIDBConnection::getOrEstablishIDBDatabaseMetadata): Callback to the WebProcess, even if
        it is just dummy data for now.
      * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
      (WebKit::DatabaseProcessIDBConnection::create):
      
      * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
      (WebKit::WebIDBServerConnection::create): Register the new object with the WebToDatabaseProcessConnection.
      (WebKit::WebIDBServerConnection::~WebIDBServerConnection): Remove from the WebToDatabaseProcessConnection.
      (WebKit::WebIDBServerConnection::getOrEstablishIDBDatabaseMetadata):
      (WebKit::WebIDBServerConnection::didGetOrEstablishIDBDatabaseMetadata): Callback from the DatabaseProcess,
        a no-op for now.
      * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
      * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in: Copied from Source/WebKit2/DatabaseProcess/DatabaseToWebProcessConnection.messages.in.
      
      * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
      (WebKit::WebToDatabaseProcessConnection::didReceiveMessage):
      (WebKit::WebToDatabaseProcessConnection::didClose):
      (WebKit::WebToDatabaseProcessConnection::registerWebIDBServerConnection): Hold a collection of all
        server connections for messaging.
      (WebKit::WebToDatabaseProcessConnection::removeWebIDBServerConnection): Remove a connection from the collection,
        and also message the DatabaseProcess that it’s gone away.
      * WebProcess/Databases/WebToDatabaseProcessConnection.h:
      
      Project files, etc etc:
      * DerivedSources.make:
      * Scripts/webkit2/messages.py:
      (struct_or_class):
      * WebKit2.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159611 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      09bfc131
  2. 19 Nov, 2013 3 commits
    • mark.lam@apple.com's avatar
      Add tracking of endColumn for Executables. · fa35e785
      mark.lam@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124245.
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore: 
      
      1. Fixed computation of columns to take into account the startColumn from
         <script> tags. Previously, we were only computing the column relative
         to the char after the <script> tag. Now, the column number that JSC
         computes is always the column number you'll see when viewing the source
         in a text editor (assuming the first column position is 1, not 0).
      
      2. Previously, unlinkedExecutables kept the a base-1 startColumn for
         ProgramExecutables and EvalExecutables, but uses base-0 columns for
         FunctionExecutables. This has been fixed so that they all use base-0
         columns. When the executable gets linked, the column is adjusted into
         a base-1 value.
      
      3. In the UnlinkedFunctionExecutable, renamed m_functionStartOffset to
         m_unlinkedFunctionNameStart because it actually points to the start
         column in the name part of the function declaration.
      
         Similarly, renamed m_functionStartColumn to m_unlinkedBodyStartColumn
         because it points to the first character in the function body. This is
         usually '{' except for functions created from "global code" which
         excludes its braces. See FunctionExecutable::fromGlobalCode().
      
             The exclusion of braces for the global code case is needed so that
         computed start and end columns will more readily map to what a JS
         developer would expect them to be. Otherwise, the first column of the
         function source will not be 1 (includes prepended characters added in
         constructFunctionSkippingEvalEnabledCheck()).
      
         Also, similarly, a m_unlinkedBodyEndColumn has been added to track the
         end column of the UnlinkedFunctionExecutable.
      
      4. For unlinked executables, end column values are either:
         a. Relative to the start of the last line if (last line != first line).
         b. Relative to the start column position if (last line == first line).
      
         The second case is needed so that we can add an appropriate adjustment
         to the end column value (just like we do for the start column) when we
         link the executable.
      
      5. This is not new to this patch, but it worth noting that the lineCount
         values used through this patch has the following meaning:
         - a lineCount of 0 means the source for this code block is on 1 line.
         - a lineCount of N means there are N + l lines of source.
      
         This interpretation is janky, but was present before this patch. We can
         clean that up later in another patch.
      
      
      * JavaScriptCore.xcodeproj/project.pbxproj:
      - In order to implement WebCore::Internals::parserMetaData(), we need to
        move some seemingly unrelated header files from the Project section to
        the Private section so that they can be #include'd by the forwarding
        CodeBlock.h from WebCore.
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::sourceCodeForTools):
      (JSC::CodeBlock::CodeBlock):
      * bytecode/UnlinkedCodeBlock.cpp:
      (JSC::generateFunctionCodeBlock):
      (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
      - m_isFromGlobalCode is needed to support the exclusion of the open brace /
        prepended code for functions created from "global code".
      (JSC::UnlinkedFunctionExecutable::link):
      (JSC::UnlinkedFunctionExecutable::fromGlobalCode):
      (JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
      * bytecode/UnlinkedCodeBlock.h:
      (JSC::UnlinkedFunctionExecutable::create):
      (JSC::UnlinkedFunctionExecutable::unlinkedFunctionNameStart):
      (JSC::UnlinkedFunctionExecutable::unlinkedBodyStartColumn):
      (JSC::UnlinkedFunctionExecutable::unlinkedBodyEndColumn):
      (JSC::UnlinkedFunctionExecutable::recordParse):
      (JSC::UnlinkedCodeBlock::recordParse):
      (JSC::UnlinkedCodeBlock::endColumn):
      * bytecompiler/NodesCodegen.cpp:
      (JSC::FunctionBodyNode::emitBytecode):
      * parser/ASTBuilder.h:
      (JSC::ASTBuilder::createFunctionBody):
      (JSC::ASTBuilder::setFunctionNameStart):
      * parser/Lexer.cpp:
      (JSC::::shiftLineTerminator):
      - Removed an unused SourceCode Lexer<T>::sourceCode() function.
      * parser/Lexer.h:
      (JSC::Lexer::positionBeforeLastNewline):
      (JSC::Lexer::prevTerminator):
      - Added tracking of m_positionBeforeLastNewline in the Lexer to enable us
        to exclude the close brace / appended code for functions created from "global
        code".
      * parser/Nodes.cpp:
      (JSC::ProgramNode::ProgramNode):
      (JSC::ProgramNode::create):
      (JSC::EvalNode::EvalNode):
      (JSC::EvalNode::create):
      (JSC::FunctionBodyNode::FunctionBodyNode):
      (JSC::FunctionBodyNode::create):
      (JSC::FunctionBodyNode::setEndPosition):
      - setEndPosition() is needed to fixed up the end position so that we can
        exclude the close brace / appended code for functions created from "global
        code".
      * parser/Nodes.h:
      (JSC::ProgramNode::startColumn):
      (JSC::ProgramNode::endColumn):
      (JSC::EvalNode::startColumn):
      (JSC::EvalNode::endColumn):
      (JSC::FunctionBodyNode::setFunctionNameStart):
      (JSC::FunctionBodyNode::functionNameStart):
      (JSC::FunctionBodyNode::endColumn):
      * parser/Parser.cpp:
      (JSC::::parseFunctionBody):
      (JSC::::parseFunctionInfo):
      * parser/Parser.h:
      (JSC::Parser::positionBeforeLastNewline):
      (JSC::::parse):
      - Subtracted 1 from startColumn here to keep the node column values consistently
        base-0. See note 2 above.
      (JSC::parse):
      * parser/SourceProviderCacheItem.h:
      (JSC::SourceProviderCacheItem::SourceProviderCacheItem):
      * parser/SyntaxChecker.h:
      (JSC::SyntaxChecker::createFunctionBody):
      (JSC::SyntaxChecker::setFunctionNameStart):
      * runtime/CodeCache.cpp:
      (JSC::CodeCache::getGlobalCodeBlock):
      (JSC::CodeCache::getProgramCodeBlock):
      (JSC::CodeCache::getEvalCodeBlock):
      (JSC::CodeCache::getFunctionExecutableFromGlobalCode):
      * runtime/CodeCache.h:
      * runtime/Executable.cpp:
      (JSC::ScriptExecutable::newCodeBlockFor):
      (JSC::FunctionExecutable::FunctionExecutable):
      (JSC::ProgramExecutable::initializeGlobalProperties):
      (JSC::FunctionExecutable::fromGlobalCode):
      * runtime/Executable.h:
      (JSC::ExecutableBase::isEvalExecutable):
      (JSC::ExecutableBase::isProgramExecutable):
      (JSC::ScriptExecutable::ScriptExecutable):
      (JSC::ScriptExecutable::endColumn):
      (JSC::ScriptExecutable::recordParse):
      (JSC::FunctionExecutable::create):
      (JSC::FunctionExecutable::bodyIncludesBraces):
      * runtime/FunctionConstructor.cpp:
      (JSC::constructFunctionSkippingEvalEnabledCheck):
      * runtime/FunctionPrototype.cpp:
      (JSC::insertSemicolonIfNeeded):
      (JSC::functionProtoFuncToString):
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::createProgramCodeBlock):
      (JSC::JSGlobalObject::createEvalCodeBlock):
      
      Source/WebCore: 
      
      Test: js/dom/script-start-end-locations.html
      
      * ForwardingHeaders/bytecode: Added.
      * ForwardingHeaders/bytecode/CodeBlock.h: Added.
      * WebCore.exp.in:
      * testing/Internals.cpp:
      (WebCore::GetCallerCodeBlockFunctor::GetCallerCodeBlockFunctor):
      (WebCore::GetCallerCodeBlockFunctor::operator()):
      (WebCore::GetCallerCodeBlockFunctor::codeBlock):
      (WebCore::Internals::parserMetaData):
      * testing/Internals.h:
      * testing/Internals.idl:
      
      Source/WebKit: 
      
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
      - Added an exported symbol to make the Win32 build happy. The Win64 symbol
        is currently a copy of the Win32 one. It'll need to be updated if the
        mangled symbol is different for Win64.
      
      LayoutTests: 
      
      * fast/events/window-onerror2-expected.txt:
      * inspector-protocol/debugger/setBreakpoint-actions-expected.txt:
      * js/dom/script-start-end-locations-expected.txt: Added.
      * js/dom/script-start-end-locations.html: Added.
      * js/dom/script-tests/script-start-end-locations.js: Added.
      * js/dom/stack-trace-expected.txt:
      * js/dom/stack-trace.html:
      - Changed tabs to spaces. The tabs were making it hard to visually confirm
        the exected column values for 2 functions.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159520 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fa35e785
    • beidson@apple.com's avatar
      Add WebIDBServerConnection and DatabaseProcessIDBConnection stubs · 81575a51
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124562
      
      Reviewed by Alexey Proskuryakov.
      
      Source/WebCore:
      
      Export some more symbols and headers for WK2 to use.
      
      * WebCore.exp.in:
      * WebCore.xcodeproj/project.pbxproj:
      
      Source/WebKit2:
      
      Also remove Web/DatabaseProcessDatabaseBackend stubs, as that is no longer the abstraction layer.
      
      * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
      (WebKit::DatabaseToWebProcessConnection::didReceiveMessage):
      (WebKit::DatabaseToWebProcessConnection::establishIDBConnection):
      * DatabaseProcess/DatabaseToWebProcessConnection.h:
      * DatabaseProcess/DatabaseToWebProcessConnection.messages.in:
      
      * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp: Renamed from Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBDatabaseBackend.cpp.
      (WebKit::DatabaseProcessIDBConnection::DatabaseProcessIDBConnection):
      (WebKit::DatabaseProcessIDBConnection::~DatabaseProcessIDBConnection):
      (WebKit::DatabaseProcessIDBConnection::establishConnection):
      (WebKit::DatabaseProcessIDBConnection::messageSenderConnection):
      * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h: Renamed from Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBDatabaseBackend.h.
      (WebKit::DatabaseProcessIDBConnection::create):
      * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in: Renamed from Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBDatabaseBackend.messages.in.
      
      * Shared/Databases/IndexedDB/IDBUtilities.cpp:
      (WebKit::uniqueDatabaseIdentifier): Modified to take two security origin arguments.
      * Shared/Databases/IndexedDB/IDBUtilities.h:
      
      * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
      (WebKit::WebIDBFactoryBackend::open):
      
      * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp: Added. Stubbed out all the pure virtual methods.
      (WebKit::generateBackendIdentifier):
      (WebKit::WebIDBServerConnection::WebIDBServerConnection):
      (WebKit::WebIDBServerConnection::~WebIDBServerConnection):
      (WebKit::WebIDBServerConnection::isClosed):
      (WebKit::WebIDBServerConnection::getOrEstablishIDBDatabaseMetadata):
      (WebKit::WebIDBServerConnection::deleteDatabase):
      (WebKit::WebIDBServerConnection::close):
      (WebKit::WebIDBServerConnection::openTransaction):
      (WebKit::WebIDBServerConnection::beginTransaction):
      (WebKit::WebIDBServerConnection::commitTransaction):
      (WebKit::WebIDBServerConnection::resetTransaction):
      (WebKit::WebIDBServerConnection::rollbackTransaction):
      (WebKit::WebIDBServerConnection::setIndexKeys):
      (WebKit::WebIDBServerConnection::createObjectStore):
      (WebKit::WebIDBServerConnection::createIndex):
      (WebKit::WebIDBServerConnection::deleteIndex):
      (WebKit::WebIDBServerConnection::get):
      (WebKit::WebIDBServerConnection::put):
      (WebKit::WebIDBServerConnection::openCursor):
      (WebKit::WebIDBServerConnection::count):
      (WebKit::WebIDBServerConnection::deleteRange):
      (WebKit::WebIDBServerConnection::clearObjectStore):
      (WebKit::WebIDBServerConnection::deleteObjectStore):
      (WebKit::WebIDBServerConnection::changeDatabaseVersion):
      (WebKit::WebIDBServerConnection::cursorAdvance):
      (WebKit::WebIDBServerConnection::cursorIterate):
      (WebKit::WebIDBServerConnection::cursorPrefetchIteration):
      (WebKit::WebIDBServerConnection::cursorPrefetchReset):
      (WebKit::WebIDBServerConnection::messageSenderConnection):
      * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h: Added.
      
      * WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.cpp: Removed.
      * WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.h: Removed.
      
      * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
      
      * DerivedSources.make:
      * WebKit2.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159511 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      81575a51
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r159455. · dd9a046c
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/159455
      https://bugs.webkit.org/show_bug.cgi?id=124568
      
      broke two api tests (see bug 124564) (Requested by thorton on
      #webkit).
      
      Source/WebCore:
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * WebCore.exp.in:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/objc/DOM.mm:
      (-[DOMNode renderedImage]):
      (-[DOMRange renderedImageForcingBlackText:]):
      * dom/Clipboard.cpp:
      (WebCore::Clipboard::createDragImage):
      * dom/ClipboardMac.mm:
      (WebCore::Clipboard::createDragImage):
      * page/DragController.cpp:
      (WebCore::DragController::startDrag):
      * page/Frame.cpp:
      (WebCore::ScopedFramePaintingState::ScopedFramePaintingState):
      (WebCore::ScopedFramePaintingState::~ScopedFramePaintingState):
      (WebCore::Frame::nodeImage):
      (WebCore::Frame::dragImageForSelection):
      * page/Frame.h:
      * page/FrameSnapshotting.cpp: Removed.
      * page/FrameSnapshotting.h: Removed.
      * page/mac/FrameMac.mm: Copied from Source/WebCore/page/win/FrameWin.h.
      (WebCore::Frame::nodeImage):
      (WebCore::Frame::dragImageForSelection):
      * page/mac/FrameSnapshottingMac.h: Copied from Source/WebCore/page/win/FrameWin.h.
      * page/mac/FrameSnapshottingMac.mm: Added.
      (WebCore::imageFromRect):
      (WebCore::selectionImage):
      (WebCore::rangeImage):
      (WebCore::snapshotDragImage):
      * page/win/FrameWin.cpp:
      (WebCore::Frame::dragImageForSelection):
      (WebCore::Frame::nodeImage):
      * page/win/FrameWin.h:
      * platform/DragImage.cpp:
      (WebCore::fitDragImageToMaxSize):
      (WebCore::createDragImageForLink):
      * platform/DragImage.h:
      
      Source/WebKit/ios:
      
      * WebCoreSupport/WebFrameIOS.mm:
      
      Source/WebKit/mac:
      
      * WebView/WebHTMLView.mm:
      (-[WebHTMLView _selectionDraggingImage]):
      (-[WebHTMLView selectionImageForcingBlackText:]):
      
      Source/WebKit/win:
      
      * DOMCoreClasses.cpp:
      (DOMElement::renderedImage):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dd9a046c
  3. 18 Nov, 2013 1 commit
    • commit-queue@webkit.org's avatar
      Consolidate various frame snapshot capabilities. · 6978d8ed
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=124325
      
      Patch by Brian J. Burg <burg@cs.washington.edu> on 2013-11-18
      Reviewed by Timothy Hatcher.
      
      Source/WebCore:
      
      Various snapshot creation methods had duplicated code and were split
      between Frame, DragImage, and platform-specific implementationss.
      This patch puts WebCore snapshot methods into FrameSnapshotting
      and removes platform implementations where possible.
      
      DragImage methods reuse snapshot methods where possible. Inspector
      will be able to take snapshots without using drag images.
      
      No new tests, this is a refactoring.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * WebCore.exp.in:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/objc/DOM.mm:
      (-[DOMNode renderedImage]):
      (-[DOMRange renderedImageForcingBlackText:]):
      * dom/Clipboard.cpp:
      (WebCore::Clipboard::createDragImage):
      * dom/ClipboardMac.mm:
      (WebCore::Clipboard::createDragImage):
      * page/DragController.cpp:
      (WebCore::DragController::startDrag):
      * page/Frame.cpp:
      * page/Frame.h:
      * page/FrameSnapshotting.cpp: Added.
      (WebCore::ScopedFramePaintingState::ScopedFramePaintingState):
      (WebCore::ScopedFramePaintingState::~ScopedFramePaintingState):
      (WebCore::snapshotFrameRect): Move most buffer logic to here.
      (WebCore::snapshotSelection): Moved from Frame.
      (WebCore::snapshotNode): Moved from Frame.
      * page/FrameSnapshotting.h: Added.
      * page/mac/FrameMac.mm: Removed.
      * page/mac/FrameSnapshottingMac.h: Removed.
      * page/mac/FrameSnapshottingMac.mm: Removed.
      * page/win/FrameWin.cpp: remove duplicate implementation.
      * page/win/FrameWin.h: Fix an incorrect parameter name.
      * platform/DragImage.cpp:
      (WebCore::ScopedNodeDragState::ScopedNodeDragState):
      (WebCore::ScopedNodeDragState::~ScopedNodeDragState):
      (WebCore::createDragImageFromSnapshot): Boilerplate buffer conversion.
      (WebCore::createDragImageForNode):
      (WebCore::createDragImageForSelection):
      (WebCore::ScopedFrameSelectionState::ScopedFrameSelectionState):
      (WebCore::ScopedFrameSelectionState::~ScopedFrameSelectionState):
      (WebCore::createDragImageForRange): Moved from Frame.
      (WebCore::createDragImageForImage): Moved from FrameSnapshottingMac.
      (WebCore::createDragImageForLink): use nullptr.
      
      Source/WebKit/ios:
      
      * WebCoreSupport/WebFrameIOS.mm: use new header file.
      
      Source/WebKit/mac:
      
      Use new platform-independent methods instead of Mac methods.
      
      * WebView/WebHTMLView.mm:
      (-[WebHTMLView _selectionDraggingImage]):
      (-[WebHTMLView selectionImageForcingBlackText:]):
      
      Source/WebKit/win:
      
      * DOMCoreClasses.cpp:
      (DOMElement::renderedImage): use createDragImageForNode.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159455 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6978d8ed
  4. 13 Nov, 2013 1 commit
  5. 11 Nov, 2013 1 commit
  6. 09 Nov, 2013 1 commit
    • paroga@webkit.org's avatar
      Move RunLoop from WebCore to WTF · f8108ef5
      paroga@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=116606
      
      Reviewed by Anders Carlsson.
      
      Source/WebCore:
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * PlatformBlackBerry.cmake:
      * PlatformEfl.cmake:
      * PlatformGTK.cmake:
      * PlatformWin.cmake:
      * WebCore.exp.in:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.xcodeproj/project.pbxproj:
      * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
      * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
      
      Source/WebKit/mac:
      
      * Carbon/CarbonWindowAdapter.mm:
      (+[CarbonWindowAdapter initialize]):
      * History/WebBackForwardList.mm:
      (+[WebBackForwardList initialize]):
      * History/WebHistoryItem.mm:
      (+[WebHistoryItem initialize]):
      * Misc/WebCache.mm:
      (+[WebCache initialize]):
      * Misc/WebElementDictionary.mm:
      (+[WebElementDictionary initialize]):
      * Misc/WebIconDatabase.mm:
      (+[WebIconDatabase initialize]):
      * Plugins/Hosted/WebHostedNetscapePluginView.mm:
      (+[WebHostedNetscapePluginView initialize]):
      * Plugins/WebBaseNetscapePluginView.mm:
      * Plugins/WebBasePluginPackage.mm:
      * Plugins/WebNetscapePluginView.mm:
      (+[WebNetscapePluginView initialize]):
      * WebCoreSupport/WebEditorClient.mm:
      (+[WebUndoStep initialize]):
      * WebCoreSupport/WebFrameLoaderClient.mm:
      * WebView/WebArchive.mm:
      (+[WebArchivePrivate initialize]):
      * WebView/WebDataSource.mm:
      (+[WebDataSource initialize]):
      * WebView/WebHTMLView.mm:
      (+[WebHTMLViewPrivate initialize]):
      (+[WebHTMLView initialize]):
      * WebView/WebPreferences.mm:
      (+[WebPreferences initialize]):
      * WebView/WebResource.mm:
      (+[WebResourcePrivate initialize]):
      * WebView/WebTextIterator.mm:
      (+[WebTextIteratorPrivate initialize]):
      * WebView/WebView.mm:
      (+[WebView initialize]):
      * WebView/WebViewData.mm:
      (+[WebViewPrivate initialize]):
      
      Source/WebKit2:
      
      * DatabaseProcess/DatabaseProcess.cpp:
      * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
      * NetworkProcess/NetworkConnectionToWebProcess.cpp:
      * NetworkProcess/NetworkProcess.cpp:
      * NetworkProcess/NetworkProcess.h:
      * NetworkProcess/NetworkResourceLoader.h:
      * NetworkProcess/mac/DiskCacheMonitor.h:
      * NetworkProcess/unix/NetworkProcessMainUnix.cpp:
      * Platform/CoreIPC/Connection.cpp:
      * Platform/CoreIPC/Connection.h:
      * Platform/CoreIPC/mac/ConnectionMac.cpp:
      * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
      * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
      * PluginProcess/PluginControllerProxy.h:
      * PluginProcess/PluginProcess.cpp:
      * PluginProcess/PluginProcess.h:
      * PluginProcess/WebProcessConnection.cpp:
      * PluginProcess/unix/PluginProcessMainUnix.cpp:
      * Shared/ChildProcess.cpp:
      * Shared/ChildProcess.h:
      * Shared/ChildProcessProxy.cpp:
      * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.h:
      * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.mm:
      * Shared/Plugins/NPObjectProxy.cpp:
      * Shared/WebKit2Initialize.cpp:
      (WebKit::InitializeWebKit2):
      * UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
      * UIProcess/API/mac/FindIndicatorWindow.h:
      * UIProcess/API/mac/WKPrintingView.mm:
      * UIProcess/API/mac/WKView.mm:
      * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.h:
      * UIProcess/DrawingAreaProxyImpl.h:
      * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
      * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
      * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
      * UIProcess/Network/NetworkProcessProxy.cpp:
      * UIProcess/Plugins/PluginProcessProxy.cpp:
      * UIProcess/ResponsivenessTimer.cpp:
      * UIProcess/ResponsivenessTimer.h:
      * UIProcess/VisitedLinkProvider.h:
      * UIProcess/WebContext.cpp:
      * UIProcess/WebProcessProxy.cpp:
      * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
      * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
      * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
      * WebProcess/Network/WebResourceLoadScheduler.h:
      * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
      * WebProcess/Plugins/Netscape/NetscapePlugin.h:
      * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
      * WebProcess/Plugins/PluginView.h:
      * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
      * WebProcess/WebPage/DrawingAreaImpl.h:
      * WebProcess/WebPage/EventDispatcher.cpp:
      * WebProcess/WebPage/PageOverlay.h:
      * WebProcess/WebPage/WebPage.cpp:
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebProcess.cpp:
      * WebProcess/efl/WebProcessMainEfl.cpp:
      * WebProcess/gtk/WebProcessMainGtk.cpp:
      
      Source/WTF:
      
      With this change RunLoop can be used in JavaScriptCore too.
      
      * GNUmakefile.list.am:
      * WTF.vcxproj/WTF.vcxproj:
      * WTF.xcodeproj/project.pbxproj:
      * wtf/CMakeLists.txt:
      * wtf/PlatformBlackBerry.cmake:
      * wtf/PlatformEfl.cmake:
      * wtf/PlatformGTK.cmake:
      * wtf/PlatformWin.cmake:
      * wtf/RunLoop.cpp: Renamed from Source/WebCore/platform/RunLoop.cpp.
      (WTF::RunLoop::Holder::Holder):
      (WTF::RunLoop::Holder::runLoop):
      (WTF::RunLoop::initializeMainRunLoop):
      (WTF::RunLoop::current):
      (WTF::RunLoop::main):
      (WTF::RunLoop::isMain):
      (WTF::RunLoop::performWork):
      (WTF::RunLoop::dispatch):
      * wtf/RunLoop.h: Renamed from Source/WebCore/platform/RunLoop.h.
      (WTF::RunLoop::TimerBase::startRepeating):
      (WTF::RunLoop::TimerBase::startOneShot):
      (WTF::RunLoop::TimerBase::isRepeating):
      (WTF::RunLoop::Timer::Timer):
      (WTF::RunLoop::Timer::fired):
      * wtf/blackberry/RunLoopBlackBerry.cpp: Renamed from Source/WebCore/platform/blackberry/RunLoopBlackBerry.cpp.
      (WTF::RunLoop::RunLoop):
      (WTF::RunLoop::~RunLoop):
      (WTF::RunLoop::wakeUp):
      * wtf/cf/RunLoopCF.cpp: Renamed from Source/WebCore/platform/cf/RunLoopCF.cpp.
      (WTF::RunLoop::performWork):
      (WTF::RunLoop::RunLoop):
      (WTF::RunLoop::~RunLoop):
      (WTF::RunLoop::runForDuration):
      (WTF::RunLoop::wakeUp):
      (WTF::RunLoop::run):
      (WTF::RunLoop::stop):
      (WTF::RunLoop::TimerBase::timerFired):
      (WTF::RunLoop::TimerBase::TimerBase):
      (WTF::RunLoop::TimerBase::~TimerBase):
      (WTF::RunLoop::TimerBase::start):
      (WTF::RunLoop::TimerBase::stop):
      (WTF::RunLoop::TimerBase::isActive):
      * wtf/efl/RunLoopEfl.cpp: Renamed from Source/WebCore/platform/efl/RunLoopEfl.cpp.
      (WTF::RunLoop::RunLoop):
      (WTF::RunLoop::~RunLoop):
      (WTF::RunLoop::run):
      (WTF::RunLoop::stop):
      (WTF::RunLoop::wakeUpEvent):
      (WTF::RunLoop::wakeUp):
      (WTF::RunLoop::TimerBase::TimerBase):
      (WTF::RunLoop::TimerBase::~TimerBase):
      (WTF::RunLoop::TimerBase::timerFired):
      (WTF::RunLoop::TimerBase::start):
      (WTF::RunLoop::TimerBase::stop):
      (WTF::RunLoop::TimerBase::isActive):
      * wtf/gtk/RunLoopGtk.cpp: Renamed from Source/WebCore/platform/gtk/RunLoopGtk.cpp.
      (WTF::RunLoop::RunLoop):
      (WTF::RunLoop::~RunLoop):
      (WTF::RunLoop::run):
      (WTF::RunLoop::innermostLoop):
      (WTF::RunLoop::pushNestedMainLoop):
      (WTF::RunLoop::popNestedMainLoop):
      (WTF::RunLoop::stop):
      (WTF::RunLoop::queueWork):
      (WTF::RunLoop::wakeUp):
      (WTF::RunLoop::TimerBase::TimerBase):
      (WTF::RunLoop::TimerBase::~TimerBase):
      (WTF::RunLoop::TimerBase::clearTimerSource):
      (WTF::RunLoop::TimerBase::timerFiredCallback):
      (WTF::RunLoop::TimerBase::start):
      (WTF::RunLoop::TimerBase::stop):
      (WTF::RunLoop::TimerBase::isActive):
      * wtf/win/RunLoopWin.cpp: Renamed from Source/WebCore/platform/win/RunLoopWin.cpp.
      (WTF::RunLoop::RunLoopWndProc):
      (WTF::RunLoop::wndProc):
      (WTF::RunLoop::run):
      (WTF::RunLoop::stop):
      (WTF::RunLoop::registerRunLoopMessageWindowClass):
      (WTF::RunLoop::RunLoop):
      (WTF::RunLoop::~RunLoop):
      (WTF::RunLoop::wakeUp):
      (WTF::RunLoop::TimerBase::timerFired):
      (WTF::generateTimerID):
      (WTF::RunLoop::TimerBase::TimerBase):
      (WTF::RunLoop::TimerBase::~TimerBase):
      (WTF::RunLoop::TimerBase::start):
      (WTF::RunLoop::TimerBase::stop):
      (WTF::RunLoop::TimerBase::isActive):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159001 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f8108ef5
  7. 08 Nov, 2013 2 commits
    • timothy_horton@apple.com's avatar
      Remote Layer Tree: RemoteLayerBackingStore partial repaint is broken for the tile cache · c016bd71
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123944
      
      Reviewed by Simon Fraser.
      
      Ensure that the tile cache retrieves repaint rects from the tile layer,
      not from the tiled backing layer.
      
      Rework RemoteLayerBackingStore painting to fix some rounding issues
      that would cause pixel cracks upon repaint, and to speed it up a bit.
      
      * Shared/mac/RemoteLayerBackingStore.h:
      Redefine RepaintRectList because we can't include WebLayer.h here yet.
      Remove createBackingStore, which was never implemented.
      Remove mapToContentCoordinates, because we don't need it on Mac.
      
      (WebKit::RemoteLayerBackingStore::paintingRects): Added.
      
      * Shared/mac/RemoteLayerBackingStore.mm:
      (RemoteLayerBackingStore::setNeedsDisplay):
      (RemoteLayerBackingStore::display):
      Stop using mapToContentCoordinates.
      
      (RemoteLayerBackingStore::drawInContext):
      Use clipping instead of painting the image multiple times.
      Never repaint more than the dirty region's bounds.
      Don't waste time with all of the drawNativeImage code, just use CG.
      Unindent the switch's cases.
      Store the rects we're painting so that enumerateRectsBeingDrawn can get them.
      Pixel-snap the rects we're painting.
      Clip the context before going to paint.
      
      * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
      (PlatformCALayerRemote::enumerateRectsBeingDrawn):
      * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
      Retrieve the rects currently being painted from our backing store, and
      transform them (mostly) according to the CTM, to match the transformation
      that will have occurred underneath wkCALayerEnumerateRectsBeingDrawnWithBlock.
      
      * platform/graphics/ca/PlatformCALayer.h:
      * platform/graphics/ca/mac/PlatformCALayerMac.h:
      * platform/graphics/ca/mac/PlatformCALayerMac.mm:
      (PlatformCALayerMac::enumerateRectsBeingDrawn):
      Allow the PlatformCALayer to decide how to enumerate rects to paint.
      
      * WebCore.exp.in:
      * platform/graphics/mac/WebLayer.h:
      Add RepaintRectList, remove some unnecessary WebCore::s.
      
      * platform/graphics/mac/WebLayer.mm:
      (WebCore::collectRectsToPaint):
      Factor collectRectsToPaint out; it just grabs the rects from
      the layer and makes the decision whether to repaint the bounds
      of the dirty region or just the subregions.
      
      Move calls to collectRectsToPaint() to callers of drawLayerContents(),
      so that TileController can collect rects from the appropriate source
      (the Tile layer) and other layers just continue grabbing them from
      their relevant layers.
      
      Make sure that the list that comes from collectRectsToPaint() always
      has at least one rect in it (appending the clip bounds if we don't
      want to repaint subregions) so we can simplify logic in drawLayerContents.
      
      (WebCore::drawLayerContents):
      Remove code to support CompositingCoordinatesBottomUp, as it's only
      used on Windows, so this Mac-specific code doesn't need to support it.
      
      Simplify logic given that dirtyRects will always be non-empty.
      
      (-[WebLayer drawInContext:]):
      (-[WebSimpleLayer setNeedsDisplayInRect:]):
      * platform/graphics/ca/mac/TileController.mm:
      (WebCore::TileController::platformCALayerPaintContents):
      Adopt collectRectsToPaint.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158982 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c016bd71
    • andersca@apple.com's avatar
      Begin stubbing out a KeyedEncoder class in WebCore · 0a62cead
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124079
      
      Reviewed by Sam Weinig.
      
      Source/WebCore:
      
      * WebCore.exp.in:
      Add symbol needed by WebCore.
      
      * WebCore.xcodeproj/project.pbxproj:
      Add new header file.
      
      * history/HistoryItem.cpp:
      (WebCore::HistoryItem::encodeBackForwardTree):
      * history/HistoryItem.h:
      Add an encodeBackForwardTree overload that takes a KeyedEncoder object. Encode the version.
      
      * platform/KeyedCoding.h:
      Add a KeyedEncoder class that just has a single encodeUInt32 member function for now.
      
      Source/WebKit2:
      
      * Shared/KeyedEncoder.h: Removed.
      * Shared/cf/KeyedCodingValueCF.cpp: Removed.
      * Shared/cf/KeyedEncoder.cpp: Added.
      Remove old keyed encoders.
      
      (WebKit::createDictionary):
      Helper function to create a mutable dictionary.
      (WebKit::KeyedEncoder::KeyedEncoder):
      Create the root dictionary.
      
      (WebKit::KeyedEncoder::encodeUInt32):
      Create a CFNumberRef and add it to the dictionary.
      
      * Shared/cf/KeyedEncoder.h: Added.
      * WebKit2.xcodeproj/project.pbxproj:
      Add new files.
      
      * WebProcess/WebPage/WebBackForwardListProxy.cpp:
      (WebKit::updateBackForwardItem):
      Create a KeyedEncoder and encode the history tree.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158971 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0a62cead
  8. 07 Nov, 2013 3 commits
    • simon.fraser@apple.com's avatar
      Attempt to fix the 32-bit build. Virtual thunks seem to have different · a0399bb3
      simon.fraser@apple.com authored
      symbol names between 32- and 64-bit.
      
      * WebCore.exp.in:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158873 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a0399bb3
    • simon.fraser@apple.com's avatar
      Allow customization of the contentsScale of TileController tiles · c529da06
      simon.fraser@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124004
      
      Reviewed by Tim Horton.
      
      On some platorms, zooming out on pages with TiledBacking compositing
      layers can cause very high memory use, because the TiledBacking retains
      the original page scale while the zoom is in flight, but can be asked
      to cover a large area.
      
      Make it possible to reduce memory use in this case by allowing RenderLayerCompositor
      to provide an additional scale factor for newly created tiles. Platforms can
      then customize this to create low-res tiles when necessary.
      
      * WebCore.exp.in:
      * platform/graphics/GraphicsLayerClient.h:
      (WebCore::GraphicsLayerClient::contentsScaleMultiplierForNewTiles):
      * platform/graphics/ca/GraphicsLayerCA.cpp:
      (WebCore::GraphicsLayerCA::platformCALayerContentsScaleMultiplierForNewTiles):
      * platform/graphics/ca/GraphicsLayerCA.h:
      * platform/graphics/ca/PlatformCALayerClient.h:
      (WebCore::PlatformCALayerClient::platformCALayerContentsScaleMultiplierForNewTiles):
      * platform/graphics/ca/mac/TileController.h:
      * platform/graphics/ca/mac/TileController.mm:
      (WebCore::TileController::TileController):
      (WebCore::TileController::setScale):
      (WebCore::TileController::createTileLayer):
      * rendering/RenderLayerBacking.cpp:
      (WebCore::RenderLayerBacking::contentsScaleMultiplierForNewTiles):
      * rendering/RenderLayerBacking.h:
      * rendering/RenderLayerCompositor.cpp:
      (WebCore::RenderLayerCompositor::contentsScaleMultiplierForNewTiles):
      * rendering/RenderLayerCompositor.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158859 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c529da06
    • jer.noble@apple.com's avatar
      [MSE] Add mock MediaSource classes for testing. · a74247b8
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123322
      
      Reviewed by Eric Carlson.
      
      Source/WebCore:
      
      Tests: media/media-source/media-source-addsourcebuffer.html
             media/media-source/media-source-append-buffer.html
             media/media-source/media-source-canplaythrough.html
             media/media-source/media-source-closed.html
             media/media-source/media-source-play.html
             media/media-source/media-source-track-enabled.html
             media/media-source/media-source-tracks.html
      
      Add mock implementation of platform MediaSource classes, allowing ports to test the
      MediaSource API without having a platform implementation.
      
      The MockMediaSource will support a byteformat defined in MockBox.h: a simple box-style media
      format with an initialization segment containing a number of tracks, followed by a list of
      samples.
      
      Add a means to insert a new media engine factory at runtime, so the internals object can add
      a MockMediaSourceMediaPlayer:
      * platform/graphics/MediaPlayer.cpp:
      (WebCore::MediaPlayerFactorySupport::callRegisterMediaEngine):
      * platform/graphics/MediaPlayer.h:
      * testing/Internals.cpp:
      (WebCore::Internals::initializeMockMediaSource):
      * testing/Internals.h:
      * testing/Internals.idl:
      
      For non-media-source supporting media engines, fail immediately when asked to load a media
      source, so that the MockMediaSourceMediaPlayer will be instantiated as a fall-back:
      * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
      (WebCore::MediaPlayerPrivateAVFoundation::load):
      * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
      (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
      * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
      * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
      (WebCore::MediaPlayerPrivateQTKit::load):
      (WebCore::MediaPlayerPrivateQTKit::supportsType):
      
      Add new files to the project:
      * WebCore.xcodeproj/project.pbxproj:
      * Source/WebCore/WebCore.exp.in:
      
      Update the MediaSource implementation:
      * Modules/mediasource/MediaSource.cpp:
      (WebCore::MediaSource::monitorSourceBuffers): Add a link to the spec.
      * Modules/mediasource/SourceBuffer.cpp:
      (WebCore::SourceBuffer::buffered): Ditto.
      (WebCore::SourceBuffer::setTimestampOffset): Ditto.
      (WebCore::SourceBuffer::validateInitializationSegment): Ditto.
      (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): Ditto. Also,
          bring the implementation up to date with part of the spec.
      (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Remove "Predicate" from
          SampleIsRandomAccessPredicate.
      
      Add utility classes to parse and represent the bytestream supported by the MockMediaSource:
      * platform/mock/mediasource/MockBox.cpp: Added.
      (WebCore::MockBox::MockBox):
      (WebCore::MockBox::peekType):
      (WebCore::MockBox::peekLength):
      (WebCore::MockTrackBox::MockTrackBox):
      (WebCore::MockTrackBox::type):
      (WebCore::MockInitializationBox::MockInitializationBox):
      (WebCore::MockInitializationBox::type):
      (WebCore::MockSampleBox::MockSampleBox):
      (WebCore::MockSampleBox::type):
      * platform/mock/mediasource/MockBox.h: Added.
      (WebCore::MockBox::length):
      (WebCore::MockBox::type):
      (WebCore::MockTrackBox::trackID):
      (WebCore::MockTrackBox::codec):
      (WebCore::MockTrackBox::kind):
      (WebCore::MockInitializationBox::duration):
      (WebCore::MockInitializationBox::tracks):
      (WebCore::MockSampleBox::presentationTimestamp):
      (WebCore::MockSampleBox::decodeTimestamp):
      (WebCore::MockSampleBox::duration):
      (WebCore::MockSampleBox::trackID):
      (WebCore::MockSampleBox::flags):
      (WebCore::MockSampleBox::isSync):
      
      Add a MediaPlayerPrivate implementation which uses MockMediaSource:
      * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp: Added.
      (WebCore::MockMediaPlayerMediaSource::registerMediaEngine):
      (WebCore::MockMediaPlayerMediaSource::create):
      (WebCore::mimeTypeCache):
      (WebCore::MockMediaPlayerMediaSource::getSupportedTypes):
      (WebCore::MockMediaPlayerMediaSource::supportsType):
      (WebCore::MockMediaPlayerMediaSource::MockMediaPlayerMediaSource):
      (WebCore::MockMediaPlayerMediaSource::~MockMediaPlayerMediaSource):
      (WebCore::MockMediaPlayerMediaSource::load):
      (WebCore::MockMediaPlayerMediaSource::cancelLoad):
      (WebCore::MockMediaPlayerMediaSource::play):
      (WebCore::MockMediaPlayerMediaSource::pause):
      (WebCore::MockMediaPlayerMediaSource::naturalSize):
      (WebCore::MockMediaPlayerMediaSource::hasVideo):
      (WebCore::MockMediaPlayerMediaSource::hasAudio):
      (WebCore::MockMediaPlayerMediaSource::setVisible):
      (WebCore::MockMediaPlayerMediaSource::seeking):
      (WebCore::MockMediaPlayerMediaSource::paused):
      (WebCore::MockMediaPlayerMediaSource::networkState):
      (WebCore::MockMediaPlayerMediaSource::readyState):
      (WebCore::MockMediaPlayerMediaSource::buffered):
      (WebCore::MockMediaPlayerMediaSource::didLoadingProgress):
      (WebCore::MockMediaPlayerMediaSource::setSize):
      (WebCore::MockMediaPlayerMediaSource::paint):
      (WebCore::MockMediaPlayerMediaSource::currentTimeDouble):
      (WebCore::MockMediaPlayerMediaSource::durationDouble):
      (WebCore::MockMediaPlayerMediaSource::seekDouble):
      (WebCore::MockMediaPlayerMediaSource::advanceCurrentTime):
      (WebCore::MockMediaPlayerMediaSource::updateDuration):
      (WebCore::MockMediaPlayerMediaSource::setReadyState):
      * platform/mock/mediasource/MockMediaPlayerMediaSource.h: Added.
      
      Add a mock implementation of MediaSourcePrivate, which uses MockSourceBuffer:
      * platform/mock/mediasource/MockMediaSourcePrivate.cpp: Added.
      (WebCore::MockMediaSourcePrivate::create):
      (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate):
      (WebCore::MockMediaSourcePrivate::~MockMediaSourcePrivate):
      (WebCore::MockMediaSourcePrivate::addSourceBuffer):
      (WebCore::MockMediaSourcePrivate::removeSourceBuffer):
      (WebCore::MockMediaSourcePrivate::duration):
      (WebCore::MockMediaSourcePrivate::setDuration):
      (WebCore::MockMediaSourcePrivate::markEndOfStream):
      (WebCore::MockMediaSourcePrivate::unmarkEndOfStream):
      (WebCore::MockMediaSourcePrivate::readyState):
      (WebCore::MockMediaSourcePrivate::setReadyState):
      (WebCore::MockMediaSourcePrivate::sourceBufferPrivateDidChangeActiveState):
      (WebCore::MockSourceBufferPrivateHasAudio):
      (WebCore::MockMediaSourcePrivate::hasAudio):
      (WebCore::MockSourceBufferPrivateHasVideo):
      (WebCore::MockMediaSourcePrivate::hasVideo):
      * platform/mock/mediasource/MockMediaSourcePrivate.h: Added.
      (WebCore::MockMediaSourcePrivate::activeSourceBuffers):
      (WebCore::MockMediaSourcePrivate::player):
      
      Add a mock implementation of SourceBufferPrivate, which uses MockBoxes to parse the
      bytestream provided by SourceBuffer:
      * platform/mock/mediasource/MockSourceBufferPrivate.cpp: Added.
      (WebCore::MockMediaSample::create):
      (WebCore::MockMediaSample::~MockMediaSample):
      (WebCore::MockMediaSample::MockMediaSample):
      (WebCore::MockMediaSample::platformSample):
      (WebCore::MockMediaDescription::create):
      (WebCore::MockMediaDescription::~MockMediaDescription):
      (WebCore::MockMediaDescription::MockMediaDescription):
      (WebCore::MockSourceBufferPrivate::create):
      (WebCore::MockSourceBufferPrivate::MockSourceBufferPrivate):
      (WebCore::MockSourceBufferPrivate::~MockSourceBufferPrivate):
      (WebCore::MockSourceBufferPrivate::setClient):
      (WebCore::MockSourceBufferPrivate::append):
      (WebCore::MockSourceBufferPrivate::didReceiveInitializationSegment):
      (WebCore::MockSourceBufferPrivate::didReceiveSample):
      (WebCore::MockSourceBufferPrivate::abort):
      (WebCore::MockSourceBufferPrivate::removedFromMediaSource):
      (WebCore::MockSourceBufferPrivate::readyState):
      (WebCore::MockSourceBufferPrivate::setReadyState):
      (WebCore::MockSourceBufferPrivate::hasVideo):
      (WebCore::MockSourceBufferPrivate::hasAudio):
      * platform/mock/mediasource/MockSourceBufferPrivate.h: Added.
      
      Create mock implementations of AudioTrackPrivate, VideoTrackPrivate, and TextTrackPrivate
      which wrap the MockTrackBox class:
      * platform/mock/mediasource/MockTracks.cpp: Added.
      * platform/mock/mediasource/MockTracks.h: Added.
      (WebCore::MockAudioTrackPrivate::create):
      (WebCore::MockAudioTrackPrivate::~MockAudioTrackPrivate):
      (WebCore::MockAudioTrackPrivate::id):
      (WebCore::MockAudioTrackPrivate::MockAudioTrackPrivate):
      (WebCore::MockTextTrackPrivate::create):
      (WebCore::MockTextTrackPrivate::~MockTextTrackPrivate):
      (WebCore::MockTextTrackPrivate::id):
      (WebCore::MockTextTrackPrivate::MockTextTrackPrivate):
      (WebCore::MockVideoTrackPrivate::create):
      (WebCore::MockVideoTrackPrivate::~MockVideoTrackPrivate):
      (WebCore::MockVideoTrackPrivate::id):
      (WebCore::MockVideoTrackPrivate::MockVideoTrackPrivate):
      
      LayoutTests:
      
      * media/media-source/media-source-addsourcebuffer-expected.txt: Added.
      * media/media-source/media-source-addsourcebuffer.html: Added.
      * media/media-source/media-source-append-buffer-expected.txt: Added.
      * media/media-source/media-source-append-buffer.html: Added.
      * media/media-source/media-source-canplaythrough-expected.txt: Added.
      * media/media-source/media-source-canplaythrough.html: Added.
      * media/media-source/media-source-closed-expected.txt: Added.
      * media/media-source/media-source-closed.html: Added.
      * media/media-source/media-source-play-expected.txt: Added.
      * media/media-source/media-source-play.html: Added.
      * media/media-source/mock-media-source.js: Added.
      * media/video-test.js:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158853 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a74247b8
  9. 06 Nov, 2013 2 commits
  10. 05 Nov, 2013 2 commits
  11. 04 Nov, 2013 2 commits
    • jer.noble@apple.com's avatar
      [PluginProxy] Add a setting to disable video plugin proxy support in HTMLMediaElement. · bff8689a
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123621
      
      Reviewed by Eric Carlson.
      
      Source/WebCore:
      
      Add a new Setting which will disable the video plugin proxy. Enable support for AVFoundation
      in iOS (which requries fixing a few compile errors resulting from classes and methods which
      are not available on iOS.
      
      * WebCore.exp.in: Export wkAVAssetResolvedURL.
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::canShareStyleWithElement): Make conditional upon
          new isVideoPluginProxyEnabled() setting.
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::parseAttribute): Ditto.
      * html/HTMLMediaElement.h:
      * html/HTMLVideoElement.cpp:
      (WebCore::HTMLVideoElement::createRenderer): Ditto.
      (WebCore::HTMLVideoElement::attach): Ditto.
      (WebCore::HTMLVideoElement::parseAttribute): Ditto.
      (HTMLVideoElement::setDisplayMode): Ditto.
      * html/HTMLVideoElement.h:
      * page/Settings.cpp:
      (WebCore::Settings::setVideoPluginProxyEnabled): Simple setter.
      * page/Settings.h:
      (WebCore::Settings::isVideoPluginProxyEnabled): Simple getter.
      * platform/graphics/MediaPlayer.cpp:
      (WebCore::installedMediaEngines): Conditionally add MediaPlayerPrivateIOS and always add
          MediaPlayerPriateAVFoundationObjC.
      * platform/graphics/MediaPlayerPrivate.h:
      (WebCore::MediaPlayerPrivateInterface::deliverNotification): Add default implementation.
      (WebCore::MediaPlayerPrivateInterface::setMediaPlayerProxy): Ditto.
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
      (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Use new
          HAS_ and USE_ macros instead of __MAC_OS_MIN_VERNSION_REQUIRED.
      (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC): Ditto.
      (WebCore::MediaPlayerPrivateAVFoundationObjC::hasContextRenderer): Ditto.
      (WebCore::MediaPlayerPrivateAVFoundationObjC::createContextVideoRenderer): Ditto.
      (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyContextVideoRenderer): Ditto.
      (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Ditto.
      (WebCore::MediaPlayerPrivateAVFoundationObjC::paint): Ditto.
      (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer): Use cachedCGColor instead
          of CGColorGetConstantColor.
      (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput): Use CVPixelBuffer pixel
          format constant instead of QuickDraw constant.
      (WebCore::MediaPlayerPrivateAVFoundationObjC::createPixelBuffer): Ditto.
      (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput): Draw to intermediary
          CGImage on iOS.
      * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:
      * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
      * platform/ios/WebCoreSystemInterfaceIOS.mm:
      * platform/mac/WebCoreSystemInterface.h:
      
      Source/WebKit/mac:
      
      Add a new isVideoPluginProxyEnabled setting.
      
      * WebView/WebPreferenceKeysPrivate.h:
      * WebView/WebPreferences.mm:
      (+[WebPreferences initialize]): Set isVideoPluginProxyEnabled preference.
      (-[WebPreferences isVideoPluginProxyEnabled]): Pass through to Settings.
      * WebView/WebPreferencesPrivate.h:
      * WebView/WebView.mm:
      (-[WebView _preferencesChanged:]): Set isVideoPluginProxyEnabled preference.
      
      Source/WebKit2:
      
      Add WebKit2 functions for setting then new isVideoPluginProxyEnabled preference.
      
      * Shared/WebPreferencesStore.h:
      * UIProcess/API/C/WKPreferences.cpp:
      (WKPreferencesSetVideoPluginProxyEnabled):
      (WKPreferencesGetVideoPluginProxyEnabled):
      * UIProcess/API/C/WKPreferences.h:
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::updatePreferences):
      
      Source/WTF:
      
      Enable WTF_USE_AVFOUNDATION and add some HAVE_AVFOUNDATION_* defines
      to replace the existing __MAC_OS_X_VERSION_MIN_REQUIRED macros in
      MediaPlayerPrivateAVFoundationObjC.mm.
      
      * wtf/Platform.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bff8689a
    • antti@apple.com's avatar
      Make LiveNodeListBase use Elements instead of Nodes · 2f62d603
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123745
      
      Reviewed by Anders Carlsson.
      
      * WebCore.exp.in:
      * dom/Element.cpp:
      (WebCore::Element::firstElementChild):
      (WebCore::Element::lastElementChild):
              
          Switch to correct calls. ElementTraversal::previous and previousChild are no longer equivalent.
      
      * dom/ElementTraversal.h:
      (WebCore::::lastWithinTemplate):
      (WebCore::::previousTemplate):
              
          Fix ElementTraversal::lastWithin and previous. They had no real clients and didn't work correctly.
          With LiveNodeListBase starting to use these they get excellent test coverage.
      
      * dom/LiveNodeList.cpp:
      (WebCore::LiveNodeListBase::invalidateCache):
      * dom/LiveNodeList.h:
      (WebCore::LiveNodeListBase::LiveNodeListBase):
      (WebCore::LiveNodeListBase::isElementCacheValid):
      (WebCore::LiveNodeListBase::cachedElement):
      (WebCore::LiveNodeListBase::cachedElementOffset):
      (WebCore::LiveNodeListBase::setCachedElement):
              
          Make the cache Element based.
          Switch to Elements in all helpers.
          Rename item -> element for clarity.
      
      * dom/NodeIterator.cpp:
      (WebCore::NodeIterator::NodePointer::moveToPrevious):
      (WebCore::NodeIterator::updateForNodeRemoval):
              
          This code expected the old inconsistent NodeTraversal::previous behavior where the traversal includes
          the root as the last item. Drop the stayWithin parameter and handle the one case where it is needed here.
      
      * dom/NodeTraversal.cpp:
      (WebCore::NodeTraversal::last):
      (WebCore::NodeTraversal::deepLastChild):
      * dom/NodeTraversal.h:
              
          Support ElementTraversal::previous/lastWithin.
      
      (WebCore::NodeTraversal::previous):
              
          This was slightly wrong too.
      
      * html/HTMLCollection.cpp:
      (WebCore::previousElement):
      (WebCore::lastElement):
      (WebCore::LiveNodeListBase::iterateForPreviousElement):
      (WebCore::LiveNodeListBase::itemBefore):
      (WebCore::LiveNodeListBase::isLastItemCloserThanLastOrCachedItem):
      (WebCore::LiveNodeListBase::isFirstItemCloserThanCachedItem):
      (WebCore::LiveNodeListBase::setCachedElement):
      (WebCore::LiveNodeListBase::item):
      (WebCore::LiveNodeListBase::elementBeforeOrAfterCachedElement):
      * html/HTMLCollection.h:
      (WebCore::HTMLCollection::isEmpty):
      (WebCore::HTMLCollection::hasExactlyOneItem):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2f62d603
  12. 02 Nov, 2013 1 commit
    • ch.dumez@samsung.com's avatar
      EnforceRange doesn't enforce range of a short · f025915b
      ch.dumez@samsung.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123661
      
      Reviewed by Alexey Proskuryakov.
      
      Source/WebCore:
      
      Handle Web IDL short / unsigned short types as per the
      specification:
      - http://www.w3.org/TR/WebIDL/#es-short
      - http://www.w3.org/TR/WebIDL/#es-unsigned-short
      
      Specifically, we used to treat short / unsigned short as 32bit
      integers, which was wrong. We now properly handle them as 16bit
      integers.
      
      No new tests, added test cases to js/dom/webidl-type-mapping.html.
      
      * WebCore.exp.in:
      * bindings/js/JSDOMBinding.cpp:
      (WebCore::toSmallerInt):
      (WebCore::toSmallerUInt):
      (WebCore::toInt8):
      (WebCore::toUInt8):
      (WebCore::toInt16):
      (WebCore::toUInt16):
      * bindings/js/JSDOMBinding.h:
      * bindings/scripts/CodeGeneratorJS.pm:
      (JSValueToNative):
      * bindings/scripts/test/JS/JSTestObj.cpp:
      (WebCore::setJSTestObjShortAttr):
      (WebCore::setJSTestObjUnsignedShortAttr):
      * testing/TypeConversions.h:
      (WebCore::TypeConversions::testShort):
      (WebCore::TypeConversions::setTestShort):
      (WebCore::TypeConversions::testEnforceRangeShort):
      (WebCore::TypeConversions::setTestEnforceRangeShort):
      (WebCore::TypeConversions::testUnsignedShort):
      (WebCore::TypeConversions::setTestUnsignedShort):
      (WebCore::TypeConversions::testEnforceRangeUnsignedShort):
      (WebCore::TypeConversions::setTestEnforceRangeUnsignedShort):
      * testing/TypeConversions.idl:
      
      Source/WebKit:
      
      Export symbols to fix Windows build.
      
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
      
      LayoutTests:
      
      Extend js/dom/webidl-type-mapping.html layout test to validate
      Web IDL type mapping for short / unsigned short.
      
      * js/dom/webidl-type-mapping-expected.txt:
      * js/dom/webidl-type-mapping.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158521 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f025915b
  13. 31 Oct, 2013 2 commits
    • commit-queue@webkit.org's avatar
      Web Inspector: Clean up a few Inspector interfaces · 01814294
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=123594
      
      Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-10-31
      Reviewed by Timothy Hatcher.
      
      * WebCore.exp.in:
      * inspector/InjectedScriptHost.cpp:
      * inspector/InspectorBaseAgent.h:
      (WebCore::InspectorBaseAgentInterface::name):
      * inspector/InspectorConsoleAgent.cpp:
      * inspector/InspectorConsoleAgent.h:
      (WebCore::InspectorConsoleAgent::enabled):
      * inspector/InspectorController.cpp:
      (WebCore::InspectorController::profilerEnabled):
      * inspector/InspectorController.h:
      * inspector/InspectorDebuggerAgent.cpp:
      * inspector/InspectorDebuggerAgent.h:
      (WebCore::InspectorDebuggerAgent::enabled):
      * inspector/InspectorRuntimeAgent.h:
      (WebCore::InspectorRuntimeAgent::enabled):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158421 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      01814294
    • timothy_horton@apple.com's avatar
      Remote Layer Tree: Vend layer contents via IOSurfaces · 6e192604
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123600
      
      Reviewed by Anders Carlsson.
      
      * Configurations/WebKit2.xcconfig:
      Link WebKit2 against IOSurface.
      
      * Shared/mac/RemoteLayerTreeTransaction.mm:
      (WebKit::dumpChangedLayers):
      Dump the size of the backing store instead of the pointer of its
      SharedBitmap, because that's slightly more useful.
      
      * UIProcess/mac/RemoteLayerTreeHost.mm:
      (WebKit::RemoteLayerTreeHost::commit):
      If a layer's backing store uses accelerated drawing, hand the IOSurface
      to the CALayer for display.
      
      * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
      (PlatformCALayerRemote::PlatformCALayerRemote):
      Initialize contentsScale to 1 to match CA. Other properties will follow.
      
      (PlatformCALayerRemote::ensureBackingStore):
      Instead of replacing the RemoteLayerBackingStore when its properties
      change, allow it to update them on the fly. Replacing them caused
      us to throw away repaint rects when the accelerated drawing
      flag was flipped.
      
      (PlatformCALayerRemote::acceleratesDrawing):
      (PlatformCALayerRemote::setAcceleratesDrawing):
      Store the accelerated drawing flag and mark it dirty when it changes.
      
      * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
      * WebProcess/WebPage/mac/RemoteLayerBackingStore.h:
      (WebKit::RemoteLayerBackingStore::image):
      Rename bitmap() to image() and have it create a CGImageRef from
      the ShareableBitmap, ready for direct application to a CALayer.
      
      (WebKit::RemoteLayerBackingStore::surface):
      Return a IOSurface ready for direct application to a CALayer.
      
      (WebKit::RemoteLayerBackingStore::acceleratesDrawing):
      (WebKit::RemoteLayerBackingStore::hasFrontBuffer):
      Return whether or not we have a front buffer/surface.
      
      * WebProcess/WebPage/mac/RemoteLayerBackingStore.mm:
      Forward-declare some CGIOSurface SPI.
      
      (RemoteLayerBackingStore::RemoteLayerBackingStore):
      (RemoteLayerBackingStore::ensureBackingStore):
      Throw away our front image and reset flags if needed.
      
      (RemoteLayerBackingStore::encode):
      (RemoteLayerBackingStore::decode):
      En/decode the front surface instead of the ShareableBitmap if needed,
      using CoreIPC::MachPort. Destroy the port on receipt.
      
      (createIOSurfaceContext):
      Create a CGIOSurfaceContext from an IOSurface.
      
      (createIOSurface):
      Create an IOSurface of the given size.
      
      (RemoteLayerBackingStore::image):
      Return a CGImageRef, if we're not using accelerated drawing.
      Moved from the header.
      
      (RemoteLayerBackingStore::display):
      (RemoteLayerBackingStore::drawInContext):
      If using accelerated drawing, create and paint into an IOSurface.
      Reorganize some code to make the copying-from-the-front-image code
      work for both software and IOSurfaces.
      Flush the context when completed, to ensure that any asynchronous
      painting is complete before we vend the surface to the UI process.
      
      * WebCore.exp.in:
      Export sRGBColorSpaceRef.
      
      * WebCore.xcodeproj/project.pbxproj:
      Expose GraphicsContextCG.h.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158417 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6e192604
  14. 30 Oct, 2013 2 commits
    • akling@apple.com's avatar
      Take line boxes out of the arena. · 31dd4f43
      akling@apple.com authored
      <https://webkit.org/b/123533>
      
      Stop arena-allocating line boxes so we can move forward on improving
      render tree memory management. This will also allow more rendering
      code to take advantage of malloc optimizations.
      
      This will likely regress performance on some micro-benchmarks, but
      it's something we want to do sooner rather than later so we have time
      to restabilize it. All improvements to the simple line layout's
      coverage will help with recouping whatever is regressed.
      
      BiDi runs are the only remaining user of the arena now.
      
      Reviewed by Antti Koivisto
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158321 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      31dd4f43
    • antti@apple.com's avatar
      Add debug settings for simple line layout · 2ec05012
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123514
      
      Source/WebCore: 
      
      Reviewed by Andreas Kling.
      
      * WebCore.exp.in:
      * page/Settings.in:
              
          Add simpleLineLayoutEnabled and simpleLineLayoutDebugBordersEnabled.
      
      * rendering/SimpleLineLayout.cpp:
      (WebCore::SimpleLineLayout::canUseFor):
      * rendering/SimpleLineLayoutFunctions.cpp:
      (WebCore::SimpleLineLayout::paintDebugBorders):
      (WebCore::SimpleLineLayout::paintFlow):
      
      Source/WebKit2: 
      
      Reviewed by Andreas Kling.
              
      Expose debug settings.
      
      * Shared/WebPreferencesStore.h:
      * UIProcess/API/C/WKPreferences.cpp:
      (WKPreferencesSetSimpleLineLayoutEnabled):
      (WKPreferencesGetSimpleLineLayoutEnabled):
      (WKPreferencesSetSimpleLineLayoutDebugBordersEnabled):
      (WKPreferencesGetSimpleLineLayoutDebugBordersEnabled):
      * UIProcess/API/C/WKPreferencesPrivate.h:
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::updatePreferences):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158279 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2ec05012
  15. 29 Oct, 2013 5 commits
    • timothy_horton@apple.com's avatar
      Build fix after 158223; make TileController use float for scales. · dadc1b29
      timothy_horton@apple.com authored
      This matches what we do in other places, and fixes the constant
      issue with exporting symbols that include CGFloat.
      
      * WebCore.exp.in:
      * platform/graphics/ca/mac/TileController.h:
      (WebCore::TileController::scale):
      * platform/graphics/ca/mac/TileController.mm:
      (WebCore::TileController::setScale):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158230 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dadc1b29
    • timothy_horton@apple.com's avatar
      More correct build fix after 158223. · 41e174b4
      timothy_horton@apple.com authored
      Only fails in release because it's inline.
      
      * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
      * WebCore.exp.in:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158226 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      41e174b4
    • timothy_horton@apple.com's avatar
      Try fixing the Mac build (though I have no idea why · 42bff622
      timothy_horton@apple.com authored
      this wouldn't fail locally)...
      
      * WebCore.exp.in:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158224 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      42bff622
    • timothy_horton@apple.com's avatar
      Remote Layer Tree: Support tiled drawing and use it for the main frame · a2e32c53
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123422
      
      Reviewed by Simon Fraser.
      
      Add a PlatformCALayerRemote subclass that behaves similarly to
      WebTiledBackingLayer, forwarding relevant things (setNeedsDisplay, etc.)
      to the TileController which it owns.
      
      Teach the remote layer tree code enough to proxy these layers across,
      and paint them in a manner similar to WebSimpleLayer (just calling
      straight back to the TileController to paint).
      
      * Shared/mac/RemoteLayerTreeTransaction.h:
      * Shared/mac/RemoteLayerTreeTransaction.mm:
      (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
      (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
      (WebKit::dumpChangedLayers):
      * UIProcess/mac/RemoteLayerTreeHost.mm:
      (WebKit::RemoteLayerTreeHost::commit):
      * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
      (PlatformCALayerRemote::setEdgeAntialiasingMask):
      Add support for adjusting/encoding/decoding/dumping/applying edgeAntialiasingMask.
      
      (WebKit::RemoteLayerTreeTransaction::dump):
      Drive-by fix dumping of created layers to have one layer per line.
      
      * UIProcess/mac/RemoteLayerTreeHost.mm:
      (WebKit::RemoteLayerTreeHost::createLayer):
      Create CALayers for Simple, TiledBacking, PageTiledBacking, and TiledBackingTile layers.
      
      * WebKit2.xcodeproj/project.pbxproj:
      Add PlatformCALayerRemoteTiledBacking.{h, cpp}.
      
      * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
      (PlatformCALayerRemote::create):
      Create a PlatformCALayerRemoteTiledBacking for TiledBacking and PageTiledBacking layers.
      
      (PlatformCALayerRemote::removeAllSublayers):
      Fix removeAllSublayers to make a copy of the PlatformCALayerList before
      mutating it, to avoid crashes when iterating a mutated list.
      
      * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
      Definalize PlatformCALayerRemote so we can have PlatformCALayerRemoteTiledBacking.
      Note that we will use a tiled backing layer in some cases.
      Make the constructor protected, not private, so our subclass can use it.
      
      * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp: Added.
      (PlatformCALayerRemoteTiledBacking::PlatformCALayerRemoteTiledBacking):
      (PlatformCALayerRemoteTiledBacking::~PlatformCALayerRemoteTiledBacking):
      (PlatformCALayerRemoteTiledBacking::setNeedsDisplay):
      (PlatformCALayerRemoteTiledBacking::customSublayers):
      (PlatformCALayerRemoteTiledBacking::setBounds):
      (PlatformCALayerRemoteTiledBacking::isOpaque):
      (PlatformCALayerRemoteTiledBacking::setOpaque):
      (PlatformCALayerRemoteTiledBacking::acceleratesDrawing):
      (PlatformCALayerRemoteTiledBacking::setAcceleratesDrawing):
      (PlatformCALayerRemoteTiledBacking::setContentsScale):
      (PlatformCALayerRemoteTiledBacking::setBorderWidth):
      (PlatformCALayerRemoteTiledBacking::setBorderColor):
      * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h: Added.
      Add a subclass of PlatformCALayerRemote which forwards operations
      to TileController, very similar to what WebTiledBackingLayer does.
      It also owns the TileController, and overrides customSublayers() and
      tiledBacking() to return the right thing.
      
      * WebProcess/WebPage/mac/RemoteLayerBackingStore.mm:
      (RemoteLayerBackingStore::display):
      Teach RemoteLayerBackingStore about how to paint different kinds of layers.
      Simple layers and Tile layers will call paintContents directly,
      WebLayers will do what WebLayer does and use drawLayerContents.
      Other kinds of layers won't paint at all right now.
      I would like to centralize this behavior (and get rid of our CALayer
      subclasses entirely, moving all that behavior to be shared between Mac,
      Windows, and the remote layer tree), but that is a patch for another day.
      
      * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
      * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
      (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
      (WebKit::RemoteLayerTreeDrawingArea::shouldUseTiledBackingForFrameView):
      Force accelerated compositing on always when using the remote layer tree.
      Use a TiledBacking for the main frame.
      
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
      Drive-by OVERRIDE.
      
      * WebCore.exp.in:
      * WebCore.xcodeproj/project.pbxproj:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158223 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a2e32c53
    • zandobersek@gmail.com's avatar
      Unreviewed, follow-up to r158185. Export the required symbol. · 6a599723
      zandobersek@gmail.com authored
      This should fix the Mac debug build.
      
      * WebCore.exp.in:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158187 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6a599723
  16. 28 Oct, 2013 3 commits
    • beidson@apple.com's avatar
      Refactor IDB factory creation. · 3c2faae5
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123347
      
      Reviewed by Andreas Kling.
      
      - Rework how database directory location is passed around.
      - Make (some) SecurityOrigin arguments be references instead of pointers.
      - Add two SecurityOrigin arguments to opening databases for future use.
      
      Source/WebCore:
      
      * Modules/indexeddb/IDBFactory.cpp:
      (WebCore::IDBFactory::openInternal):
      
      * Modules/indexeddb/IDBFactoryBackendInterface.cpp:
      (WebCore::IDBFactoryBackendInterface::create):
      * Modules/indexeddb/IDBFactoryBackendInterface.h:
      
      * Modules/indexeddb/PageGroupIndexedDatabase.cpp:
      (WebCore::PageGroupIndexedDatabase::PageGroupIndexedDatabase):
      (WebCore::PageGroupIndexedDatabase::from):
      (WebCore::PageGroupIndexedDatabase::factoryBackend):
      * Modules/indexeddb/PageGroupIndexedDatabase.h:
      
      * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp:
      (WebCore::WorkerGlobalScopeIndexedDatabase::WorkerGlobalScopeIndexedDatabase):
      (WebCore::WorkerGlobalScopeIndexedDatabase::from):
      (WebCore::WorkerGlobalScopeIndexedDatabase::indexedDB):
      * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h:
      
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
      (WebCore::IDBBackingStoreLevelDB::open):
      (WebCore::IDBBackingStoreLevelDB::openInMemory):
      * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
      
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
      (WebCore::computeFileIdentifier):
      (WebCore::computeUniqueIdentifier):
      (WebCore::IDBFactoryBackendLevelDB::IDBFactoryBackendLevelDB):
      (WebCore::IDBFactoryBackendLevelDB::getDatabaseNames):
      (WebCore::IDBFactoryBackendLevelDB::deleteDatabase):
      (WebCore::IDBFactoryBackendLevelDB::openBackingStore):
      (WebCore::IDBFactoryBackendLevelDB::open):
      * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
      (WebCore::IDBFactoryBackendLevelDB::create):
      
      * WebCore.exp.in:
      
      * platform/DatabaseStrategy.cpp:
      (WebCore::DatabaseStrategy::createIDBFactoryBackend):
      * platform/DatabaseStrategy.h:
      
      Source/WebKit2:
      
      * Shared/Databases/IndexedDB/IDBUtilities.cpp:
      (WebKit::uniqueDatabaseIdentifier):
      * Shared/Databases/IndexedDB/IDBUtilities.h:
      
      * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
      (WebKit::WebIDBFactoryBackend::WebIDBFactoryBackend):
      (WebKit::WebIDBFactoryBackend::open):
      * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
      (WebKit::WebIDBFactoryBackend::create):
      
      * WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.cpp:
      (WebKit::WebProcessIDBDatabaseBackend::WebProcessIDBDatabaseBackend):
      * WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.h:
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::createIDBFactoryBackend):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158170 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3c2faae5
    • andersca@apple.com's avatar
      RunLoop::dispatch should take an std::function · 706feea9
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123407
      
      Reviewed by Andreas Kling.
      
      Source/WebCore:
      
      * WebCore.exp.in:
      * platform/RunLoop.cpp:
      (WebCore::RunLoop::performWork):
      (WebCore::RunLoop::dispatch):
      * platform/RunLoop.h:
      
      Source/WTF:
      
      * wtf/FunctionDispatcher.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      706feea9
    • timothy_horton@apple.com's avatar
      Make TileController manipulate PlatformCALayers instead of CALayers · dca7a0af
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123279
      
      Reviewed by Simon Fraser.
      
      In the interest of making TileController more platform-independent
      (so that it can be used with the remote layer tree, and maybe Windows),
      move TileController onto our PlatformCALayer abstraction instead of
      direct manipulation of CALayers.
      
      Some fallout from this includes getting rid of special Mac-specific
      TileController-specific CALayer subclasses, and reworking tile
      painting to work in a more generic way.
      
      This is a first step, and doesn't get us all the way to a platform independent
      TileController, but more patches are forthcoming.
      
      No new tests, just a (largeish) refactor.
      
      * WebCore.exp.in:
      The signature of some methods has changed.
      
      * WebCore.xcodeproj/project.pbxproj:
      Remove WebTileLayer.*
      
      * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
      (WebCore::ScrollingTreeScrollingNodeMac::logExposedUnfilledArea):
      Use the "isTile" key on the CALayer dictionary instead of the layer's
      class to determine if it's a tile. TileController will set this on a tile
      when it is created, for now.
      
      * platform/graphics/TiledBacking.h:
      tiledScrollingIndicatorLayer() should return a PlatformCALayer.
      
      * platform/graphics/ca/GraphicsLayerCA.cpp:
      (WebCore::GraphicsLayerCA::platformCALayerPaintContents):
      * platform/graphics/ca/GraphicsLayerCA.h:
      (WebCore::GraphicsLayerCA::platformCALayerIncrementRepaintCount):
      * platform/graphics/ca/PlatformCALayerClient.h:
      The PlatformCALayerClient paintContents and incrementRepaintCount callbacks
      should include the platformCALayer that caused the callback.
      
      * platform/graphics/ca/PlatformCALayer.h:
      Add LayerTypeSimpleLayer, which is similar to LayerTypeWebLayer
      except it just calls back its client to paint, instead of doing
      complicated things with repaint rects. This is so that TileController
      doesn't re-enter drawLayerContents when asking its GraphicsLayer
      to paint for each PlatformCALayer (it will be entering drawLayerContents
      for the first time for each layer). It also happens to be useful
      for things like the tile controller overlay, which don't need
      all that complication.
      
      Add LayerTypeTiledBackingTileLayer, which is used simply to distinguish
      TileController Tile layers from other LayerTypeSimpleLayers.
      
      * platform/graphics/ca/mac/LayerPool.h:
      * platform/graphics/ca/mac/LayerPool.mm:
      (WebCore::LayerPool::addLayer):
      (WebCore::LayerPool::takeLayerWithSize):
      LayerPool should operate on PlatformCALayers now.
      
      * platform/graphics/ca/mac/PlatformCALayerMac.h:
      * platform/graphics/ca/mac/PlatformCALayerMac.mm:
      (PlatformCALayerMac::PlatformCALayerMac):
      Set the "isTile" key on the CALayer to true for TiledBackingTileLayers,
      so that the scrolling performance logging can tell a tile apart from
      any other layer, on the scrolling thread, without touching PlatformCALayers
      or the TileController or any other main-thread data structures.
      
      (PlatformCALayerMac::setEdgeAntialiasingMask): Added.
      * platform/graphics/ca/mac/TileController.h:
      Remove references to Objective-C classes; instead use PlatformCALayer everywhere.
      TileController is now a PlatformCALayerClient, and the layers it owns are
      all PlatformCALayers (and it is constructed with a PlatformCALayer, etc.).
      Hand in the tile debug border color as a WebCore color, instead of a CGColorRef.
      blankPixelCountForTiles() now operates on a list of PlatformLayers instead of
      WebTileLayers specifically, since WebTileLayer is gone.
      Make drawTileMapContents private because WebTileCacheMapLayer no longer exists.
      
      (WebCore::TileController::platformCALayerDrawsContent):
      All of the layers who have TileController as their client paint their contents.
      
      (WebCore::TileController::platformCALayerContentsOpaque):
      This will only be called for layers which paint via drawLayerContents,
      so it's OK that we don't special-case the debugging overlay here.
      
      (WebCore::TileController::owningGraphicsLayer):
      Return the GraphicsLayer that owns the TileController's main
      layer, via its conformance to PlatformCALayerClient. This is
      a bit strange (because it's not strictly a GraphicsLayer, despite
      always being so at the moment), but is done for clarity inside
      TileController itself.
      
      * platform/graphics/ca/mac/TileController.mm:
      Remove CALayer (WebCALayerDetails), WebTiledScrollingIndicatorLayer,
      and a bunch of includes that we don't need anymore.
      
      (WebCore::TileController::create):
      (WebCore::TileController::TileController):
      TileController is passed a PlatformCALayer for the tile cache root layer,
      instead of a WebTiledBackingLayer. It also creates a PlatformCALayer with
      LayerTypeLayer instead of a bare CALayer for the container layer.
      It's OK to remove the transaction because it was only used to stop
      the implicit animation, which PlatformCALayer will do for us.
      
      (WebCore::TileController::~TileController):
      Clear the owner of the PlatformCALayers which the TileController previously owned,
      so they don't try to call back a destroyed TileController.
      
      (WebCore::TileController::tileCacheLayerBoundsChanged):
      (WebCore::TileController::setNeedsDisplay):
      Straightforward adjustments towards use of PlatformCALayer.
      
      (WebCore::TileController::setTileNeedsDisplayInRect):
      Adjustments towards use of PlatformCALayer; we need FloatRects so we can
      pass pointers to PlatformCALayer::setNeedsDisplay.
      
      (WebCore::TileController::platformCALayerPaintContents):
      Replace drawLayer with platformCALayerPaintContents, which will be called
      back from our various WebSimpleLayers. If the PlatformCALayer is our
      tiled scrolling debug indicator, paint that. Otherwise, it's a tile.
      Make use of drawLayerContents() to paint the tile contents.
      Make use of drawRepaintIndicator() to paint the repaint indicator if needed.
      Move scrolling performance logging code that used to be in WebTileLayer here.
      
      (WebCore::TileController::platformCALayerDeviceScaleFactor):
      (WebCore::TileController::platformCALayerShowDebugBorders):
      (WebCore::TileController::platformCALayerShowRepaintCounter):
      Forward these to the owning GraphicsLayerCA, because it will have the right answers.
      
      (WebCore::TileController::setScale):
      Adjustments towards use of PlatformCALayer; remove some code that Simon
      caused to be unused in 156291 but did not remove.
      
      (WebCore::TileController::setAcceleratesDrawing):
      (WebCore::TileController::setTilesOpaque):
      (WebCore::TileController::setVisibleRect):
      (WebCore::TileController::revalidateTiles):
      (WebCore::TileController::setTileDebugBorderWidth):
      (WebCore::TileController::setTileDebugBorderColor):
      (WebCore::TileController::bounds):
      (WebCore::TileController::blankPixelCount):
      (WebCore::TileController::blankPixelCountForTiles):
      (WebCore::queueTileForRemoval):
      (WebCore::TileController::setNeedsRevalidateTiles):
      (WebCore::TileController::ensureTilesForRect):
      (WebCore::TileController::retainedTileBackingStoreMemory):
      Straightforward adjustments towards use of PlatformCALayer.
      
      (WebCore::TileController::updateTileCoverageMap):
      Adjustments towards use of PlatformCALayer; rename backgroundColor
      to visibleRectIndicatorColor, since it's actually a border, not a background.
      
      (WebCore::TileController::tiledScrollingIndicatorLayer):
      Create a LayerTypeSimpleLayer PlatformCALayer for the tiled scrolling indicator.
      It will be asked to paint straightforwardly, like a CALayer would.
      Create a LayerTypeLayer PlatformCALayer for the visible rect indicator.
      It doesn't need to paint anything, so it doesn't get an owner.
      
      (WebCore::TileController::createTileLayer):
      When creating a new tile layer, adopt it by setting its owner.
      Otherwise, straightforward adjustments towards use of PlatformCALayer.
      
      (WebCore::TileController::platformCALayerIncrementRepaintCount):
      Manage repaint counts for tiles in TileController now.
      
      (WebCore::TileController::drawTileMapContents):
      Adjustments towards use of PlatformCALayer.
      
      * platform/graphics/ca/mac/WebTileLayer.h: Removed.
      * platform/graphics/ca/mac/WebTileLayer.mm: Removed.
      We don't need WebTileLayer anymore, tiles are now just WebSimpleLayers
      owned by TileController. Its behavior has been moved into TileController.
      
      * platform/graphics/ca/mac/WebTiledBackingLayer.h:
      * platform/graphics/ca/mac/WebTiledBackingLayer.mm:
      (-[WebTiledBackingLayer createTileController:]):
      Add createTileController: so that the WebTiledBackingLayer's owner can
      hand the TileController the PlatformCALayer for the WebTiledBackingLayer
      without propagating additional usage of PlatformCALayer::platformCALayer(),
      which we need to remove in light of the remote layer tree work.
      
      (-[WebTiledBackingLayer setBorderColor:]):
      
      * platform/graphics/ca/win/PlatformCALayerWin.h:
      Add an empty implementation of setEdgeAntialiasingMask.
      We'll probably want to implement it before adopting TileController on Windows.
      
      * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
      (PlatformCALayerWinInternal::displayCallback):
      * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
      (WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerPaintContents):
      (WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerIncrementRepaintCount):
      * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
      (WebCore::LayerClient::platformCALayerPaintContents):
      (WebCore::LayerClient::platformCALayerIncrementRepaintCount):
      Adjust for new parameters on PlatformCALayerClient callbacks.
      
      * platform/graphics/mac/WebLayer.h:
      Add WebSimpleLayer, which inherits directly from CALayer, and make
      our standard WebLayer (which is used for compositing layers in web content)
      inherit from that.
      
      * platform/graphics/mac/WebLayer.mm:
      Move most of the behavior of WebLayer onto WebSimpleLayer, except for its
      complex painting code. That stays as an override on WebLayer.
      
      (WebCore::drawLayerContents):
      Use the PlatformCALayer's PlatformLayer - if it exists - to extract
      fine-grained repaint rects. If it doesn't, we'll just use the CGContext's
      clip rect as our single repaint rect.
      Rename platformLayer to platformCALayer for accuracy.
      Remove special code for CATiledLayer since we ought not use it on Mac anymore.
      
      (WebCore::drawRepaintIndicator):
      Factor repaint indicator code out into its own function so that TileController
      can use it. It can't be called from drawLayerContents for TileController, since
      the PlatformCALayer that TileController passes in to drawLayerContents is actually
      that of the tile cache's root layer, not the tile itself.
      Also, add a custom background color parameter so TileController can override
      the default green color with its own standard purple.
      
      (-[WebLayer drawInContext:]):
      (-[WebSimpleLayer drawInContext:]):
      * platform/graphics/mac/WebTiledLayer.mm:
      (-[WebTiledLayer drawInContext:]):
      Removed a param from drawLayerContents because it's trivially acquirable
      from the PlatformCALayer.
      
      * FullscreenVideoController.cpp:
      (FullscreenVideoController::LayerClient::platformCALayerPaintContents):
      (FullscreenVideoController::LayerClient::platformCALayerIncrementRepaintCount):
      Adjust for new parameters on PlatformCALayerClient callbacks.
      
      * Shared/mac/RemoteLayerTreeTransaction.mm:
      (WebKit::RemoteLayerTreeTransaction::dump):
      Support the new LayerTypes.
      
      * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
      (PlatformCALayerRemote::setEdgeAntialiasingMask):
      * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
      Add an empty implementation of setEdgeAntialiasingMask.
      
      * WebProcess/WebPage/mac/RemoteLayerBackingStore.mm:
      (RemoteLayerBackingStore::display):
      Removed a parameter from drawLayerContents.
      
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
      (WebKit::TiledCoreAnimationDrawingArea::updateDebugInfoLayer):
      TiledCoreAnimationDrawingArea still operates in terms of CALayers, so
      grab the PlatformLayer out from TileController's indicator.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dca7a0af
  17. 25 Oct, 2013 1 commit
    • joepeck@webkit.org's avatar
      Upstream ENABLE(REMOTE_INSPECTOR) and enable on iOS and Mac · 1367d77a
      joepeck@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=123111
      
      Reviewed by Timothy Hatcher.
      
      Source/JavaScriptCore:
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WebCore:
      
      * Configurations/FeatureDefines.xcconfig:
      * WebCore.exp.in:
      
      Source/WebKit:
      
      * WebKit.xcodeproj/project.pbxproj:
      
      Source/WebKit/cf:
      
      * WebCoreSupport/WebInspectorClientCF.cpp:
      
      Source/WebKit/ios:
      
      iOS does not have a local inspector, only remote. So give it a custom
      implementation separate from the WebKit/mac WebInspectorClient
      implementation which handles an attaching/detaching local inspector.
      
      * WebKit.xcodeproj/project.pbxproj:
      * ios/WebCoreSupport/WebInspectorClientIOS.mm: Added.
      (WebInspectorClient::WebInspectorClient):
      (WebInspectorClient::inspectorDestroyed):
      (WebInspectorClient::openInspectorFrontend):
      (WebInspectorClient::bringFrontendToFront):
      (WebInspectorClient::closeInspectorFrontend):
      (WebInspectorClient::didResizeMainFrame):
      (WebInspectorClient::highlight):
      (WebInspectorClient::hideHighlight):
      (WebInspectorClient::didSetSearchingForNode):
      (WebInspectorClient::sendMessageToFrontend):
      (WebInspectorClient::sendMessageToBackend):
      (WebInspectorClient::setupRemoteConnection):
      (WebInspectorClient::teardownRemoteConnection):
      (WebInspectorClient::hasLocalSession):
      (WebInspectorClient::canBeRemotelyInspected):
      (WebInspectorClient::inspectedWebView):
      (WebInspectorFrontendClient::WebInspectorFrontendClient):
      (WebInspectorFrontendClient::attachAvailabilityChanged):
      (WebInspectorFrontendClient::frontendLoaded):
      (WebInspectorFrontendClient::localizedStringsURL):
      (WebInspectorFrontendClient::bringToFront):
      (WebInspectorFrontendClient::closeWindow):
      (WebInspectorFrontendClient::disconnectFromBackend):
      (WebInspectorFrontendClient::attachWindow):
      (WebInspectorFrontendClient::detachWindow):
      (WebInspectorFrontendClient::setAttachedWindowHeight):
      (WebInspectorFrontendClient::setAttachedWindowWidth):
      (WebInspectorFrontendClient::setToolbarHeight):
      (WebInspectorFrontendClient::inspectedURLChanged):
      (WebInspectorFrontendClient::updateWindowTitle):
      (WebInspectorFrontendClient::save):
      (WebInspectorFrontendClient::append):
      
      Source/WebKit/mac:
      
      The actual implementation at the WebCoreSupport/WebInspectorClient level
      is the same as INSPECTOR_SERVER. Give debuggable pages a pageIdentifer.
      
      * Configurations/FeatureDefines.xcconfig:
      * Misc/WebKitLogging.h:
      Misc.
      
      * WebCoreSupport/WebInspectorClient.h:
      (WebInspectorClient::pageId):
      (WebInspectorClient::setPageId):
      Give WebInspectorClient's a page identifier.
      
      * WebCoreSupport/WebInspectorClient.mm:
      (WebInspectorClient::WebInspectorClient):
      (WebInspectorClient::inspectorDestroyed):
      (WebInspectorClient::sendMessageToFrontend):
      (WebInspectorClient::sendMessageToBackend):
      (WebInspectorClient::setupRemoteConnection):
      (WebInspectorClient::teardownRemoteConnection):
      (WebInspectorClient::hasLocalSession):
      (WebInspectorClient::canBeRemotelyInspected):
      (WebInspectorClient::inspectedWebView):
      A WebInspectorClient can be either local or remote. Add handling
      for remote connections.
      
      * WebInspector/remote/WebInspectorClientRegistry.h: Added.
      * WebInspector/remote/WebInspectorClientRegistry.mm: Added.
      (+[WebInspectorClientRegistry sharedRegistry]):
      (-[WebInspectorClientRegistry init]):
      (-[WebInspectorClientRegistry _getNextAvailablePageId]):
      (-[WebInspectorClientRegistry registerClient:]):
      (-[WebInspectorClientRegistry unregisterClient:]):
      (-[WebInspectorClientRegistry clientForPageId:]):
      (-[WebInspectorClientRegistry inspectableWebViews]):
      Registry for all potentially debuggable pages. All WebInspectorClient instances.
      
      * WebInspector/remote/WebInspectorRelayDefinitions.h: Added.
      Constants (message keys) shared between WebKit and the XPC process.
      
      * WebInspector/remote/WebInspectorServer.h: Added.
      * WebInspector/remote/WebInspectorServer.mm: Added.
      (-[WebInspectorServer init]):
      (-[WebInspectorServer dealloc]):
      (-[WebInspectorServer start]):
      (-[WebInspectorServer stop]):
      (-[WebInspectorServer isEnabled]):
      (-[WebInspectorServer xpcConnection]):
      (-[WebInspectorServer setupXPCConnectionIfNeeded]):
      (-[WebInspectorServer pushListing]):
      (-[WebInspectorServer hasActiveDebugSession]):
      (-[WebInspectorServer setHasActiveDebugSession:]):
      (-[WebInspectorServer xpcConnection:receivedMessage:userInfo:]):
      (-[WebInspectorServer xpcConnectionFailed:]):
      (-[WebInspectorServer didRegisterClient:]):
      (-[WebInspectorServer didUnregisterClient:]):
      Singleton to start/stop remote inspection. Handles the connection to the XPC
      and hands off connections to the connection controller.
      
      * WebInspector/remote/WebInspectorServerWebViewConnection.h: Added.
      * WebInspector/remote/WebInspectorServerWebViewConnection.mm: Added.
      (-[WebInspectorServerWebViewConnection initWithController:connectionIdentifier:destination:identifier:]):
      (-[WebInspectorServerWebViewConnection setupChannel]):
      (-[WebInspectorServerWebViewConnection dealloc]):
      (-[WebInspectorServerWebViewConnection connectionIdentifier]):
      (-[WebInspectorServerWebViewConnection identifier]):
      (-[WebInspectorServerWebViewConnection clearChannel]):
      (-[WebInspectorServerWebViewConnection sendMessageToFrontend:]):
      (-[WebInspectorServerWebViewConnection sendMessageToBackend:]):
      (-[WebInspectorServerWebViewConnection receivedData:]):
      (-[WebInspectorServerWebViewConnection receivedDidClose:]):
      An individual remote debug session connection.
      
      * WebInspector/remote/WebInspectorServerWebViewConnectionController.h: Added.
      * WebInspector/remote/WebInspectorServerWebViewConnectionController.mm: Added.
      (-[WebInspectorServerWebViewConnectionController initWithServer:]):
      (-[WebInspectorServerWebViewConnectionController dealloc]):
      (-[WebInspectorServerWebViewConnectionController closeAllConnections]):
      (-[WebInspectorServerWebViewConnectionController _listingForWebView:pageId:registry:]):
      (-[WebInspectorServerWebViewConnectionController _pushListing:]):
      (-[WebInspectorServerWebViewConnectionController pushListing:]):
      (-[WebInspectorServerWebViewConnectionController pushListing]):
      (-[WebInspectorServerWebViewConnectionController _receivedSetup:]):
      (-[WebInspectorServerWebViewConnectionController _receivedData:]):
      (-[WebInspectorServerWebViewConnectionController _receivedDidClose:]):
      (-[WebInspectorServerWebViewConnectionController _receivedGetListing:]):
      (-[WebInspectorServerWebViewConnectionController _receivedIndicate:]):
      (-[WebInspectorServerWebViewConnectionController _receivedConnectionDied:]):
      (-[WebInspectorServerWebViewConnectionController receivedMessage:userInfo:]):
      (-[WebInspectorServerWebViewConnectionController connectionClosing:]):
      (-[WebInspectorServerWebViewConnectionController sendMessageToFrontend:userInfo:]):
      ConnectionController:
        - Holds all the current ongoing remote debug connections.
        - Simplifies multi-threaded work on iOS.
        - Dispatches incoming messages from the remote connection.
      
      * WebInspector/remote/WebInspectorRemoteChannel.h: Added.
      * WebInspector/remote/WebInspectorRemoteChannel.mm: Added.
      (+[WebInspectorRemoteChannel createChannelForPageId:connection:]):
      (-[WebInspectorRemoteChannel initWithRemote:local:]):
      (-[WebInspectorRemoteChannel closeFromLocalSide]):
      (-[WebInspectorRemoteChannel closeFromRemoteSide]):
      (-[WebInspectorRemoteChannel sendMessageToFrontend:]):
      (-[WebInspectorRemoteChannel sendMessageToBackend:]):
      Thin interface between the remote connection and web inspector client.
      This simplifies breaking the connection from either side, e.g. the
      page closing, or the remote connection disconnecting.
      
      * WebInspector/remote/WebInspectorXPCWrapper.h: Added.
      * WebInspector/remote/WebInspectorXPCWrapper.m: Added.
      (-[WebInspectorXPCWrapper initWithConnection:]):
      (-[WebInspectorXPCWrapper close]):
      (-[WebInspectorXPCWrapper dealloc]):
      (-[WebInspectorXPCWrapper _deserializeMessage:]):
      (-[WebInspectorXPCWrapper _handleEvent:]):
      (-[WebInspectorXPCWrapper sendMessage:userInfo:]):
      (-[WebInspectorXPCWrapper available]):
      * WebKit.exp:
      XPC Connection wrapper handling a simple message format.
      
      * WebView/WebViewData.h:
      * WebView/WebViewData.mm:
      (-[WebViewPrivate init]):
      (-[WebViewPrivate dealloc]):
      * WebView/WebViewInternal.h:
      * WebView/WebViewPrivate.h:
      * WebView/WebView.mm:
      (-[WebView _commonInitializationWithFrameName:groupName:]):
      (+[WebView sharedWebInspectorServer]):
      (+[WebView _enableRemoteInspector]):
      (+[WebView _disableRemoteInspector]):
      (+[WebView _disableAutoStartRemoteInspector]):
      (+[WebView _isRemoteInspectorEnabled]):
      (+[WebView _hasRemoteInspectorSession]):
      (-[WebView canBeRemotelyInspected]):
      (-[WebView allowsRemoteInspection]):
      (-[WebView setAllowsRemoteInspection:]):
      (-[WebView setIndicatingForRemoteInspector:]):
      (-[WebView setRemoteInspectorUserInfo:]):
      (-[WebView remoteInspectorUserInfo]):
      Remote inspector private API.
        - Enable / disable globally
        - Allow / disallow per webview
        - Optionally attach a userInfo dictionary on the WebView that is published with listing.
        - Indicate a WebView (implementation to land later)
      
      (-[WebView _didCommitLoadForFrame:]):
      * WebCoreSupport/WebFrameLoaderClient.mm:
      (WebFrameLoaderClient::dispatchDidReceiveTitle):
      Pages changed, pushed page listing.
      
      Source/WebKit2:
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WTF:
      
      * wtf/FeatureDefines.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158050 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1367d77a
  18. 22 Oct, 2013 2 commits
    • andersca@apple.com's avatar
      Revert r157445 since it broke certificates on Mac. · 0443222f
      andersca@apple.com authored
      <rdar://problem/15246926&15254017&15269117>
      
      Source/WebCore:
      
      * GNUmakefile.list.am:
      * PlatformEfl.cmake:
      * WebCore.exp.in:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * platform/network/ResourceErrorBase.h:
      * platform/network/ResourceResponseBase.h:
      * platform/network/cf/CertificateInfoCFNet.cpp: Removed.
      * platform/network/cf/ResourceResponse.h:
      * platform/network/mac/ResourceResponseMac.mm:
      (WebCore::ResourceResponse::setCertificateChain):
      (WebCore::ResourceResponse::certificateChain):
      * platform/network/soup/ResourceError.h:
      (WebCore::ResourceError::ResourceError):
      (WebCore::ResourceError::tlsErrors):
      (WebCore::ResourceError::setTLSErrors):
      (WebCore::ResourceError::certificate):
      (WebCore::ResourceError::setCertificate):
      * platform/network/soup/ResourceErrorSoup.cpp:
      (WebCore::ResourceError::tlsError):
      (WebCore::ResourceError::platformCopy):
      (WebCore::ResourceError::platformCompare):
      * platform/network/soup/ResourceResponse.h:
      (WebCore::ResourceResponse::ResourceResponse):
      (WebCore::ResourceResponse::soupMessageCertificate):
      (WebCore::ResourceResponse::setSoupMessageCertificate):
      (WebCore::ResourceResponse::soupMessageTLSErrors):
      (WebCore::ResourceResponse::setSoupMessageTLSErrors):
      * platform/network/soup/ResourceResponseSoup.cpp:
      (WebCore::ResourceResponse::toSoupMessage):
      (WebCore::ResourceResponse::updateFromSoupMessage):
      
      Source/WebKit2:
      
      * GNUmakefile.list.am:
      * NetworkProcess/AsynchronousNetworkLoaderClient.cpp:
      (WebKit::AsynchronousNetworkLoaderClient::didReceiveResponse):
      * NetworkProcess/NetworkProcess.h:
      * NetworkProcess/NetworkProcess.messages.in:
      * NetworkProcess/NetworkResourceLoader.cpp:
      * NetworkProcess/mac/NetworkProcessMac.mm:
      (WebKit::NetworkProcess::allowSpecificHTTPSCertificateForHost):
      * PlatformEfl.cmake:
      * PlatformGTK.cmake:
      * Shared/API/c/mac/WKCertificateInfoMac.mm:
      (WKCertificateInfoCreateWithCertficateChain):
      (WKCertificateInfoGetCertificateChain):
      * Shared/Authentication/AuthenticationManager.cpp:
      (WebKit::AuthenticationManager::tryUsePlatformCertificateInfoForChallenge):
      (WebKit::AuthenticationManager::useCredentialForChallenge):
      * Shared/Authentication/AuthenticationManager.h:
      * Shared/Authentication/AuthenticationManager.messages.in:
      * Shared/Authentication/mac/AuthenticationManager.mac.mm:
      (WebKit::AuthenticationManager::tryUsePlatformCertificateInfoForChallenge):
      * Shared/UserMessageCoders.h:
      (WebKit::UserMessageEncoder::baseEncode):
      (WebKit::UserMessageDecoder::baseDecode):
      * Shared/WebCertificateInfo.h:
      (WebKit::WebCertificateInfo::create):
      (WebKit::WebCertificateInfo::platformCertificateInfo):
      (WebKit::WebCertificateInfo::WebCertificateInfo):
      * Shared/WebCoreArgumentCoders.cpp:
      * Shared/WebCoreArgumentCoders.h:
      * Shared/mac/PlatformCertificateInfo.h: Renamed from Source/WebCore/platform/network/soup/CertificateInfoSoup.cpp.
      (WebKit::PlatformCertificateInfo::certificateChain):
      * Shared/mac/PlatformCertificateInfo.mm: Renamed from Source/WebCore/platform/network/mac/CertificateInfoMac.mm.
      (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
      (WebKit::PlatformCertificateInfo::encode):
      (WebKit::PlatformCertificateInfo::decode):
      (WebKit::PlatformCertificateInfo::dump):
      * Shared/mac/WebCoreArgumentCodersMac.mm:
      (CoreIPC::::encodePlatformData):
      (CoreIPC::::decodePlatformData):
      * Shared/soup/PlatformCertificateInfo.cpp: Added.
      (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
      (WebKit::PlatformCertificateInfo::~PlatformCertificateInfo):
      (WebKit::PlatformCertificateInfo::encode):
      (WebKit::PlatformCertificateInfo::decode):
      * Shared/soup/PlatformCertificateInfo.h: Renamed from Source/WebCore/platform/network/CertificateInfo.h.
      (WebKit::PlatformCertificateInfo::certificate):
      (WebKit::PlatformCertificateInfo::tlsErrors):
      * Shared/soup/WebCoreArgumentCodersSoup.cpp:
      (CoreIPC::::encodePlatformData):
      (CoreIPC::::decodePlatformData):
      * UIProcess/API/gtk/WebKitWebView.cpp:
      (webkit_web_view_get_tls_info):
      * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
      (WebKit::AuthenticationChallengeProxy::useCredential):
      * UIProcess/WebContext.cpp:
      (WebKit::WebContext::allowSpecificHTTPSCertificateForHost):
      * UIProcess/WebFrameProxy.cpp:
      (WebKit::WebFrameProxy::didCommitLoad):
      * UIProcess/WebFrameProxy.h:
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::didCommitLoadForFrame):
      * UIProcess/WebPageProxy.h:
      * UIProcess/WebPageProxy.messages.in:
      * WebKit2.xcodeproj/project.pbxproj:
      * WebProcess/Network/WebResourceLoader.cpp:
      (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
      * WebProcess/Network/WebResourceLoader.h:
      * WebProcess/Network/WebResourceLoader.messages.in:
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157842 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0443222f
    • timothy_horton@apple.com's avatar
      Remote Layer Tree: Support hardware accelerated filters · 28a2fccd
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123139
      
      Reviewed by Anders Carlsson.
      
      * Shared/WebCoreArgumentCoders.cpp:
      (CoreIPC::ArgumentCoder<Length>::encode):
      (CoreIPC::ArgumentCoder<Length>::decode):
      Add simple coders for Length.
      
      (CoreIPC::encodeFilterOperation):
      (CoreIPC::decodeFilterOperation):
      Serialize and deserialize FilterOperations, except for CUSTOM and VALIDATED_CUSTOM.
      
      (CoreIPC::ArgumentCoder<Length>::encode):
      (CoreIPC::ArgumentCoder<Length>::decode):
      Add coders for FilterOperations that delegate to {en,de}codeFilterOperation
      for each operation in the list.
      
      * Shared/WebCoreArgumentCoders.h:
      Drive-by fix indentation.
      Expose the Length and FilterOperations coders.
      
      * Shared/mac/RemoteLayerTreeTransaction.h:
      Add FiltersChanged and LayerProperties::filters.
      
      * Shared/mac/RemoteLayerTreeTransaction.mm:
      (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
      (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
      Encode and decode our FilterOperations.
      
      (WebKit::dumpChangedLayers):
      Dump information about the layers' filters.
      
      * UIProcess/mac/RemoteLayerTreeHost.mm:
      (WebKit::RemoteLayerTreeHost::commit):
      Use PlatformCAFilters code to apply a FilterOperations object to our CALayer.
      
      * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
      (PlatformCALayerRemote::setFilters):
      Replace existing filters with our new set, and note that they've changed.
      
      (PlatformCALayerRemote::copyFiltersFrom):
      Not yet implemented. Not critical for this feature, either.
      
      (PlatformCALayerRemote::filtersCanBeComposited):
      For now, this is the same as the Mac version.
      
      * WebCore.exp.in:
      Export a variety of filter-related things.
      
      * platform/graphics/ca/PlatformCAFilters.h:
      * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
      * platform/graphics/ca/mac/PlatformCALayerMac.mm:
      (PlatformCALayerMac::setFilters):
      * platform/graphics/ca/win/PlatformCAFiltersWin.cpp:
      (PlatformCAFilters::setFiltersOnLayer):
      setFiltersOnLayer should take a PlatformLayer instead of a PlatformCALayer
      as its argument, because it doesn't need a PlatformCALayer, and this way
      we can share code with the RemoteLayerTreeHost, which only has PlatformLayers
      and not PlatformCALayers.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157803 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      28a2fccd
  19. 21 Oct, 2013 2 commits
    • timothy_horton@apple.com's avatar
      Remote Layer Tree: Clean up transaction logging · 29f07c10
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123116
      
      Reviewed by Anders Carlsson.
      
      * Shared/mac/RemoteLayerTreeTransaction.mm:
      (WebKit::RemoteLayerTreeTextStream::RemoteLayerTreeTextStream):
      (WebKit::RemoteLayerTreeTextStream::increaseIndent):
      (WebKit::RemoteLayerTreeTextStream::decreaseIndent):
      (WebKit::RemoteLayerTreeTextStream::writeIndent):
      (WebKit::RemoteLayerTreeTextStream::operator<<):
      Add some stream operator overrides for various types we need to dump.
      Add a notion of current indent to our TextStream subclass to make it
      easy to keep track of where we are.
      
      (WebKit::dumpProperty):
      Added, hand any arbitrary type to RemoteLayerTreeTransaction.
      
      (WebKit::dumpChangedLayers):
      (WebKit::RemoteLayerTreeTransaction::dump):
      Make use of TextStream.
      
      * WebCore.exp.in:
      Export some TextStream functions.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      29f07c10
    • timothy_horton@apple.com's avatar
      Remote Layer Tree: Backing store should take contentsScale into account · 101b27bd
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123106
      
      Reviewed by Simon Fraser.
      
      * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
      (PlatformCALayerRemote::ensureBackingStore):
      (PlatformCALayerRemote::setNeedsDisplay):
      (PlatformCALayerRemote::setContentsScale):
      Inform the backing store of the contentsScale, and when it changes.
      
      * WebProcess/WebPage/mac/RemoteLayerBackingStore.h:
      (WebKit::RemoteLayerBackingStore::scale): Added.
      (WebKit::RemoteLayerBackingStore::mapToContentCoordinates): Added.
      * WebProcess/WebPage/mac/RemoteLayerBackingStore.mm:
      (RemoteLayerBackingStore::RemoteLayerBackingStore):
      (RemoteLayerBackingStore::encode):
      (RemoteLayerBackingStore::decode):
      (RemoteLayerBackingStore::mapToContentCoordinates):
      Factor out flipping so we can use it for repaints in multiple places.
      
      (RemoteLayerBackingStore::setNeedsDisplay):
      (RemoteLayerBackingStore::display):
      Create a buffer scaled up by contentsScale, take the scale into account
      when copying clean bits from the front buffer, and apply the scale before
      painting into the back buffer.
      
      * WebCore.exp.in:
      Export FloatRect::scale.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      101b27bd
  20. 20 Oct, 2013 1 commit