1. 31 May, 2012 2 commits
    • commit-queue@webkit.org's avatar
      [Blackberry] WebKit's fullscreen mode needs to notify page client. · ccd39940
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=87337
      
      Patch by Chris Guan <chris.guan@torchmobile.com.cn> on 2012-05-31
      Reviewed by Antonio Gomes.
      
      Move "fullScreenVideoCapable" into webpagePrivate to make code
      clean for "fullScreenForElement/Node" of cromeClientBlackberry,
      All Video checks and code path selections are in webpagePrivate now.
      For some UX and secure reasons, we could not apply fullscreen capacity
      for all elements, So we use client's fullscreenStart/Stop only for
      those video elements and those elements containing video tags.
      
      * Api/WebPage.cpp:
      (BlackBerry::WebKit::WebPagePrivate::webContext):
      (BlackBerry::WebKit::WebPage::notifyFullScreenVideoExited):
      (WebKit):
      (BlackBerry::WebKit::containsVideoTags):
      (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
      (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
      * Api/WebPageClient.h:
      * Api/WebPage_p.h:
      (WebCore):
      (WebPagePrivate):
      * WebCoreSupport/ChromeClientBlackBerry.cpp:
      (WebCore::ChromeClientBlackBerry::enterFullScreenForElement):
      (WebCore::ChromeClientBlackBerry::exitFullScreenForElement):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119119 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ccd39940
    • commit-queue@webkit.org's avatar
      [BlackBerry] Crash when closing web page if selection is active · 2775206e
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=87962
      
      Patch by Arvid Nilsson <anilsson@rim.com> on 2012-05-31
      Reviewed by Antonio Gomes.
      
      The embedder may try to remove a layer from the compositor at a stage
      where the compositor has been set to 0.
      
      * Api/WebPage.cpp:
      (BlackBerry::WebKit::WebPage::addCompositingThreadOverlay):
      (BlackBerry::WebKit::WebPage::removeCompositingThreadOverlay):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2775206e
  2. 30 May, 2012 4 commits
    • commit-queue@webkit.org's avatar
      [BlackBerry] Add an Accelerated Compositing layer for Web Inspector DOM highlight. · f94b94cd
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=81001
      
      Source/WebKit:
      
      Patch by Konrad Piascik <kpiascik@rim.com> on 2012-05-30
      Reviewed by Antonio Gomes
      
      Added new InspectorOverlay class
      
      * PlatformBlackBerry.cmake:
      
      Source/WebKit/blackberry:
      
      Patch by Konrad Piascik <kpiascik@rim.com> on 2012-05-30
      Reviewed by Antonio Gomes.
      
      Implemented InspectorOverlay using WebOverlayAPI.
      
      * Api/BackingStore.cpp:
      (BlackBerry::WebKit::BackingStorePrivate::renderContents):
      * Api/WebPage.cpp:
      (BlackBerry::WebKit::WebPagePrivate::updateDelegatedOverlays):
      (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
      (BlackBerry::WebKit::WebPagePrivate::setInspectorOverlayClient):
      (WebKit):
      * Api/WebPage_p.h:
      (WebCore):
      (WebPagePrivate):
      * WebCoreSupport/InspectorClientBlackBerry.cpp:
      (WebCore::InspectorClientBlackBerry::highlight):
      (WebCore::InspectorClientBlackBerry::hideHighlight):
      (WebCore::InspectorClientBlackBerry::paintInspectorOverlay):
      (WebCore):
      * WebCoreSupport/InspectorClientBlackBerry.h:
      (InspectorClientBlackBerry):
      * WebCoreSupport/InspectorOverlay.cpp: Added.
      (WebCore):
      (WebCore::InspectorOverlay::create):
      (WebCore::InspectorOverlay::InspectorOverlay):
      (WebCore::InspectorOverlay::notifySyncRequired):
      (WebCore::InspectorOverlay::paintContents):
      (WebCore::InspectorOverlay::showDebugBorders):
      (WebCore::InspectorOverlay::showRepaintCounter):
      (WebCore::InspectorOverlay::contentsVisible):
      (WebCore::InspectorOverlay::~InspectorOverlay):
      (WebCore::InspectorOverlay::clear):
      (WebCore::InspectorOverlay::update):
      (WebCore::InspectorOverlay::paintWebFrame):
      (WebCore::InspectorOverlay::invalidateWebFrame):
      * WebCoreSupport/InspectorOverlay.h: Added.
      (WebKit):
      (WebCore):
      (InspectorOverlay):
      (InspectorOverlayClient):
      (WebCore::InspectorOverlay::setClient):
      (WebCore::InspectorOverlay::notifyAnimationStarted):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119046 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f94b94cd
    • commit-queue@webkit.org's avatar
      [BlackBerry] Browser crashed when selecting in textarea · f3ccf122
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=87484
      
      The function FatFingers::checkForText() uses host node's whole text
      to checkFingerIntersection(). We should not give the text of shadow
      nodes to it.
      
      Patch by Sean Wang <Xuewen.Wang@torchmobile.com.cn> on 2012-05-30
      Reviewed by Antonio Gomes.
      
      * WebKitSupport/FatFingers.cpp:
      (BlackBerry::WebKit::FatFingers::getNodesFromRect): Avoid returning
      shadow nodes when the context is Text node.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118912 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f3ccf122
    • zoltan@webkit.org's avatar
      [Qt] Set WebCore imagedecoders as default and add fallback to QImageDecoder · 891b02a4
      zoltan@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=80400
      
      Source/WebCore:
      
      This change modifies the default ImageDecoder for Qt-port from QImageDecoder to WebCore ImageDecoder.
      The new behavior is to use QImageDecoder only if WebCoreImageDecoder - and the platform - doesn't support
      the requested image type.
      The WTF_USE_QT_IMAGE_DECODER macro has been removed, since it is no longer needed.
      
      This change adds build depedency (except Qt-MAC and Qt-WIN platform) for libpng-dev and libjpeg-dev packages,
      because PNG and JPEG imagedecoders need not only these libraries, but their headers also. Qmake-config
      tests for these libraries were introduced in r110045.
      
      Notice: with using libjpeg-turbo as a system library I measured 10% performance improvement on Methanol benchmark
      (collection of popular sites, page-loading benchmark) with this patch.
      
      Reviewed by Simon Hausmann.
      
      No new tests needed.
      
      * Target.pri: Move WebCore ImageDecoder files out of guards. Remove ImageFrameQt.cpp from sources.
      * WebCore.pri: Move WebCore ImageDecoder include paths out of guards.
      * platform/MIMETypeRegistry.cpp:
      (WebCore::initializeSupportedImageMIMETypes): Add WebCore supported and Qt supported MIME types.
      (WebCore::initializeSupportedImageMIMETypesForEncoding): Use Qt supported MIME types.
      * platform/graphics/ImageSource.cpp: Remove unnecessary includes.
      * platform/graphics/ImageSource.h: Remove unnecessary typedefs.
      (WebCore):
      * platform/graphics/qt/ImageDecoderQt.cpp: Remove ImageDecoder::create, since it is no longer needed.
      (WebCore::ImageDecoderQt::filenameExtension): Remove unnecessary semicolon.
      (WebCore::ImageDecoderQt::internalHandleCurrentImage): Use QImage and ImageFrame instead of QPixmap.
      (WebCore):
      (WebCore::ImageFrame::asNewNativeImage): Moved here from removed ImageFrameQt.cpp.
      * platform/image-decoders/ImageDecoder.cpp: Reorganize the includes of the header.
      (WebCore::ImageDecoder::create): Add platform macro guarded fallback case for QImageDecoder. Add guards
      for JPEG, PNG, ICO decoder for Qt-MAC and Qt-WIN platform.
      * platform/image-decoders/ImageDecoder.h: Remove Qt-specific codes.
      (WebCore::ImageFrame::getAddr): Remove Qt-specific case, since it is no longer needed.
      (ImageFrame):
      * platform/image-decoders/qt/ImageFrameQt.cpp: Removed. Dead code, other code has been moved to
      ImageDecoderQt.cpp.
      
      Source/WebKit/blackberry:
      
      Get rid of QT_IMAGE_DECODER flag.
      
      Reviewed by Simon Hausmann.
      
      * WebCoreSupport/AboutDataEnableFeatures.in:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118909 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      891b02a4
    • commit-queue@webkit.org's avatar
      [BlackBerry] The Page's deviceScaleFactor() is not being properly maintained · c7043e7c
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=87817
      
      Patch by Max Feil <mfeil@rim.com> on 2012-05-29
      Reviewed by Antonio Gomes.
      
      This bug fix in WebKit/blackberry is needed by the changes for
      fullscreen media control sizing in WebCore (bug 87551). The sizing
      of controls depends on the page's deviceScaleFactor(), which was
      not being maintained properly due to errors in logic. Viewport
      changes from non-default to default were being erroneously
      thrown out. Also, when the viewport did change back to default
      the deviceScaleFactor was not being updated.
      
      * Api/WebPage.cpp:
      (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
      (BlackBerry::WebKit::WebPagePrivate::dispatchViewportPropertiesDidChange):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118895 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c7043e7c
  3. 29 May, 2012 5 commits
    • commit-queue@webkit.org's avatar
      [BlackBerry] WebOverlay build fixes and bug fixes · e4ecf697
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=87780
      
      Patch by Arvid Nilsson <anilsson@rim.com> on 2012-05-29
      Reviewed by Rob Buis.
      
      Fix build when accelerated compositing disabled, or debug build.
      
      Also fix a bug where the selection overlay would not disappear properly
      because of a typo in WebPage::removeOverlay(). Also convert said method
      to early return style.
      
      Debug build fixes contributed by Ming Xie.
      
      * Api/WebOverlay.cpp:
      (BlackBerry::WebKit::WebOverlay::addAnimation):
      (BlackBerry::WebKit::WebOverlay::setContentsToImage):
      (WebKit):
      (BlackBerry::WebKit::WebOverlay::setContentsToColor):
      (BlackBerry::WebKit::WebOverlay::setDrawsContent):
      (BlackBerry::WebKit::WebOverlay::invalidate):
      (BlackBerry::WebKit::WebOverlay::setClient):
      (BlackBerry::WebKit::WebOverlay::override):
      (BlackBerry::WebKit::WebOverlay::resetOverrides):
      * Api/WebOverlayOverride.cpp:
      (BlackBerry::WebKit::WebOverlayOverride::WebOverlayOverride):
      * Api/WebOverlay_p.h:
      (BlackBerry::WebKit::WebOverlayPrivate::~WebOverlayPrivate):
      * Api/WebPage.cpp:
      (BlackBerry::WebKit::WebPage::removeOverlay):
      (BlackBerry::WebKit::WebPage::addCompositingThreadOverlay):
      (BlackBerry::WebKit::WebPage::removeCompositingThreadOverlay):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118850 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e4ecf697
    • commit-queue@webkit.org's avatar
      [BlackBerry] Add malloc info to about:memory page · 7733b379
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=87676
      
      Patch by Yong Li <yoli@rim.com> on 2012-05-29
      Reviewed by Rob Buis.
      
      Detailed malloc info can tell us how much memory
      in the heaps is being in use.
      
      * WebCoreSupport/AboutData.cpp:
      (WebCore::memoryPage):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118847 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7733b379
    • commit-queue@webkit.org's avatar
      [BlackBerry] Make DefaultTapHighlight use the new WebOverlay API · fc8e979f
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=87604
      
      Patch by Arvid Nilsson <anilsson@rim.com> on 2012-05-29
      Reviewed by Antonio Gomes.
      
      Also add a new method to allow the embedder to use the default tap
      highlight instead of replacing it with a custom one just to keep track
      of the "shouldHideAfterScroll" flag.
      
      PR #160262.
      
      * Api/WebTapHighlight.h:
      * WebKitSupport/DefaultTapHighlight.cpp:
      (BlackBerry::WebKit::DefaultTapHighlight::DefaultTapHighlight):
      (BlackBerry::WebKit::DefaultTapHighlight::draw):
      (BlackBerry::WebKit::DefaultTapHighlight::hide):
      (BlackBerry::WebKit::DefaultTapHighlight::paintContents):
      * WebKitSupport/DefaultTapHighlight.h:
      (BlackBerry::WebKit::DefaultTapHighlight::shouldHideAfterScroll):
      (DefaultTapHighlight):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fc8e979f
    • commit-queue@webkit.org's avatar
      [BlackBerry] WebKit-side implementation of SelectionOverlay · b198650a
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=87605
      
      Patch by Arvid Nilsson <anilsson@rim.com> on 2012-05-29
      Reviewed by Rob Buis.
      
      Source/WebKit:
      
      Add SelectionOverlay to the build system.
      
      PR #160263
      
      * PlatformBlackBerry.cmake:
      
      Source/WebKit/blackberry:
      
      Leverage the new WebOverlay API to move SelectionOverlay to the WebKit
      library, so we always draw selection regardless of which embedder is
      integrating WebKit.
      
      PR #160263
      
      * Api/WebPage.cpp:
      (BlackBerry::WebKit::WebPagePrivate::init):
      (BlackBerry::WebKit::WebPage::selectionOverlay):
      (WebKit):
      * Api/WebPage.h:
      (WebKit):
      * Api/WebPage_p.h:
      (WebPagePrivate):
      * Api/WebSelectionOverlay.h: Added.
      (WebKit):
      * WebKitSupport/SelectionHandler.cpp:
      (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
      * WebKitSupport/SelectionOverlay.cpp: Added.
      (WebKit):
      (BlackBerry::WebKit::SelectionOverlay::SelectionOverlay):
      (BlackBerry::WebKit::SelectionOverlay::~SelectionOverlay):
      (BlackBerry::WebKit::SelectionOverlay::draw):
      (BlackBerry::WebKit::SelectionOverlay::hide):
      (BlackBerry::WebKit::SelectionOverlay::notifySyncRequired):
      (BlackBerry::WebKit::SelectionOverlay::paintContents):
      * WebKitSupport/SelectionOverlay.h: Added.
      (WebKit):
      (SelectionOverlay):
      (BlackBerry::WebKit::SelectionOverlay::create):
      (BlackBerry::WebKit::SelectionOverlay::notifyAnimationStarted):
      (BlackBerry::WebKit::SelectionOverlay::showDebugBorders):
      (BlackBerry::WebKit::SelectionOverlay::showRepaintCounter):
      (BlackBerry::WebKit::SelectionOverlay::contentsVisible):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118785 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b198650a
    • commit-queue@webkit.org's avatar
      [BlackBerry] WebOverlay API · 3331a7f1
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=87603
      
      Patch by Arvid Nilsson <anilsson@rim.com> on 2012-05-29
      Reviewed by Rob Buis.
      
      Source/WebKit:
      
      Add WebOverlay related files to the build system.
      
      PR #156812
      
      * PlatformBlackBerry.cmake:
      
      Source/WebKit/blackberry:
      
      This new API makes it possible to leverage the BlackBerry accelerated
      compositing implementation to draw, transform and fluidly animate
      overlays in the embedding library or application.
      
      A WebOverlay has an affinity for the thread where it was created. If
      the current thread is the WebKit thread, use WebPage::addOverlay() to
      add it to the page, and manipulate it only from the WebKit thread, with
      exception of the "override" functionality which can be used from the
      compositing thread. If the current thread is the compositing thread,
      use WebPage::addCompositingThreadOverlay() to add it to the page, and
      only manipulate it on the compositing thread.
      
      A WebOverlay can be painted using Skia, or its contents can be set to
      an image or a solid color.
      
      PR #156812
      
      * Api/WebAnimation.cpp: Added.
      (WebKit):
      (BlackBerry::WebKit::WebAnimation::fadeAnimation):
      (BlackBerry::WebKit::WebAnimation::name):
      (BlackBerry::WebKit::WebAnimation::WebAnimation):
      (BlackBerry::WebKit::WebAnimation::~WebAnimation):
      (BlackBerry::WebKit::WebAnimation::operator=):
      * Api/WebAnimation.h: Added.
      (WebKit):
      * Api/WebAnimation_p.h: Added.
      (WebKit):
      (WebAnimationPrivate):
      (BlackBerry::WebKit::WebAnimationPrivate::WebAnimationPrivate):
      * Api/WebOverlay.cpp: Added.
      (WebKit):
      (BlackBerry::WebKit::WebOverlay::WebOverlay):
      (BlackBerry::WebKit::WebOverlay::~WebOverlay):
      (BlackBerry::WebKit::WebOverlay::position):
      (BlackBerry::WebKit::WebOverlay::setPosition):
      (BlackBerry::WebKit::WebOverlay::anchorPoint):
      (BlackBerry::WebKit::WebOverlay::setAnchorPoint):
      (BlackBerry::WebKit::WebOverlay::size):
      (BlackBerry::WebKit::WebOverlay::setSize):
      (BlackBerry::WebKit::WebOverlay::sizeIsScaleInvariant):
      (BlackBerry::WebKit::WebOverlay::setSizeIsScaleInvariant):
      (BlackBerry::WebKit::WebOverlay::transform):
      (BlackBerry::WebKit::WebOverlay::setTransform):
      (BlackBerry::WebKit::WebOverlay::opacity):
      (BlackBerry::WebKit::WebOverlay::setOpacity):
      (BlackBerry::WebKit::WebOverlay::addAnimation):
      (BlackBerry::WebKit::WebOverlay::removeAnimation):
      (BlackBerry::WebKit::WebOverlay::parent):
      (BlackBerry::WebKit::WebOverlay::addChild):
      (BlackBerry::WebKit::WebOverlay::removeFromParent):
      (BlackBerry::WebKit::WebOverlay::setContentsToImage):
      (BlackBerry::WebKit::WebOverlay::setContentsToColor):
      (BlackBerry::WebKit::WebOverlay::setDrawsContent):
      (BlackBerry::WebKit::WebOverlay::invalidate):
      (BlackBerry::WebKit::WebOverlay::setClient):
      (BlackBerry::WebKit::WebOverlay::override):
      (BlackBerry::WebKit::WebOverlay::resetOverrides):
      (BlackBerry::WebKit::WebOverlayPrivate::page):
      (BlackBerry::WebKit::WebOverlayPrivate::override):
      (BlackBerry::WebKit::WebOverlayPrivate::drawContents):
      (BlackBerry::WebKit::WebOverlayPrivate::scheduleCompositingRun):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::WebOverlayPrivateWebKitThread):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::override):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::position):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setPosition):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::anchorPoint):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setAnchorPoint):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::size):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setSize):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::sizeIsScaleInvariant):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setSizeIsScaleInvariant):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::transform):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setTransform):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::opacity):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setOpacity):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::addAnimation):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::removeAnimation):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::addChild):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::removeFromParent):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setContentsToImage):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setContentsToColor):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setDrawsContent):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::clear):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::invalidate):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::resetOverrides):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::notifySyncRequired):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::paintContents):
      (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::WebOverlayLayerCompositingThreadClient):
      (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::~WebOverlayLayerCompositingThreadClient):
      (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::setDrawsContent):
      (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::invalidate):
      (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::setContents):
      (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::setContentsToColor):
      (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::layerCompositingThreadDestroyed):
      (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::layerVisibilityChanged):
      (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded):
      (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::drawTextures):
      (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::deleteTextures):
      (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::WebOverlayPrivateCompositingThread):
      (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::~WebOverlayPrivateCompositingThread):
      (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setClient):
      (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::override):
      (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::position):
      (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setPosition):
      (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::anchorPoint):
      (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setAnchorPoint):
      (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::size):
      (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setSize):
      (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::sizeIsScaleInvariant):
      (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setSizeIsScaleInvariant):
      (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::transform):
      (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setTransform):
      (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::opacity):
      (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setOpacity):
      (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::addAnimation):
      (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::removeAnimation):
      (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::addChild):
      (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::removeFromParent):
      (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setContentsToImage):
      (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setContentsToColor):
      (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setDrawsContent):
      (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::clear):
      (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::invalidate):
      (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::resetOverrides):
      * Api/WebOverlay.h: Added.
      (WebCore):
      (WebKit):
      * Api/WebOverlayClient.h: Added.
      (WebKit):
      * Api/WebOverlayOverride.cpp: Added.
      (WebKit):
      (BlackBerry::WebKit::WebOverlayOverride::WebOverlayOverride):
      (BlackBerry::WebKit::WebOverlayOverride::~WebOverlayOverride):
      (BlackBerry::WebKit::WebOverlayOverride::setPosition):
      (BlackBerry::WebKit::WebOverlayOverride::setAnchorPoint):
      (BlackBerry::WebKit::WebOverlayOverride::setSize):
      (BlackBerry::WebKit::WebOverlayOverride::setTransform):
      (BlackBerry::WebKit::WebOverlayOverride::setOpacity):
      (BlackBerry::WebKit::WebOverlayOverride::addAnimation):
      (BlackBerry::WebKit::WebOverlayOverride::removeAnimation):
      * Api/WebOverlayOverride.h: Added.
      (WebKit):
      * Api/WebOverlay_p.h: Added.
      (WTF):
      (WebCore):
      (WebKit):
      (WebOverlayPrivate):
      (BlackBerry::WebKit::WebOverlayPrivate::WebOverlayPrivate):
      (BlackBerry::WebKit::WebOverlayPrivate::~WebOverlayPrivate):
      (BlackBerry::WebKit::WebOverlayPrivate::setPage):
      (BlackBerry::WebKit::WebOverlayPrivate::setClient):
      (BlackBerry::WebKit::WebOverlayPrivate::layerCompositingThread):
      (BlackBerry::WebKit::WebOverlayPrivate::graphicsLayer):
      (WebOverlayPrivateWebKitThread):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::graphicsLayer):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::notifyAnimationStarted):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::showDebugBorders):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::showRepaintCounter):
      (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::contentsVisible):
      (WebOverlayLayerCompositingThreadClient):
      (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::setLayer):
      (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::setClient):
      (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::drawsContent):
      (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::contents):
      (WebOverlayPrivateCompositingThread):
      * Api/WebPage.cpp:
      (BlackBerry::WebKit::WebPage::addOverlay):
      (WebKit):
      (BlackBerry::WebKit::WebPage::removeOverlay):
      (BlackBerry::WebKit::WebPage::addCompositingThreadOverlay):
      (BlackBerry::WebKit::WebPage::removeCompositingThreadOverlay):
      * Api/WebPage.h:
      (WebKit):
      * Api/WebPageCompositor.cpp:
      (BlackBerry::WebKit::WebPageCompositorPrivate::prepareFrame):
      (BlackBerry::WebKit::WebPageCompositorPrivate::render):
      (WebKit):
      (BlackBerry::WebKit::WebPageCompositorPrivate::compositeLayers):
      (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
      (BlackBerry::WebKit::WebPageCompositorPrivate::addOverlay):
      (BlackBerry::WebKit::WebPageCompositorPrivate::removeOverlay):
      * Api/WebPageCompositor_p.h:
      (BlackBerry::WebKit::WebPageCompositorPrivate::compositingThreadOverlayLayer):
      (WebPageCompositorPrivate):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3331a7f1
  4. 28 May, 2012 7 commits
    • commit-queue@webkit.org's avatar
      [BlackBerry] http authenticate dialog popup only once no matter authentication pass or fail · 1a7c3e81
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=80135
      
      Patch by Jonathan Dong <jonathan.dong@torchmobile.com.cn> on 2012-05-28
      Reviewed by Rob Buis.
      
      Source/WebCore:
      
      RIM PR: 145660
      Fixed a regression introduced by r111810, we should cancel the new
      request when user press cancel button in http authentication challenge
      dialog, and we should also allow sending empty username and password
      with the request.
      Also removed redundant codes which checked the existence of the
      FrameLoaderClient pointer, as we've already moved authenticationChallenge()
      out of class FrameLoaderClient, it is not needed.
      
      Manual test added. Testing http authentication dialog relies on user interaction.
      
      Resubmit the patch reverted by r115104 after the digest infinite loop
      issue for BlackBerry porting get identified and fixed.
      
      Internally reviewed by Joe Mason <jmason@rim.com>
      
      * platform/blackberry/PageClientBlackBerry.h:
      * platform/network/blackberry/NetworkJob.cpp:
      (WebCore::NetworkJob::sendRequestWithCredentials):
      
      Source/WebKit/blackberry:
      
      RIM PR: 145660
      Fixed a regression introduced by r111810, which used the wrong
      credential object.
      
      Added the interface function didReceivedAuthenticaitonChallenge()
      in interface class DumpRenderTreeClient;
      Called m_dumpRenderTree->didReceiveAuthenticationChallenge() in
      WebPagePrivate::authenticationChallenge() when DRT is enabled.
      
      Test: reuse existing test cases:
      http/tests/loading/basic-credentials-sent-automatically.html
      http/tests/loading/basic-auth-resend-wrong-credentials.html
      
      Resubmit the patch reverted by r115104 after the digest infinite loop
      issue for BlackBerry porting get identified and fixed.
      
      Internally reviewed by Joe Mason <jmason@rim.com>
      
      * Api/DumpRenderTreeClient.h:
      (WebCore):
      * Api/WebPage.cpp:
      (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
      * Api/WebPageClient.h:
      * Api/WebPage_p.h:
      (WebPagePrivate):
      
      Tools:
      
      Implemented interface function didReceiveAuthenticationChallenge in class
      DumpRenderTree.
      
      Resubmit the patch reverted by r115104 after the digest infinite loop
      issue for BlackBerry porting get identified and fixed.
      
      Internally reviewed by Joe Mason <jmason@rim.com>
      
      * DumpRenderTree/blackberry/DumpRenderTree.cpp:
      (drtCredentialDescription):
      (BlackBerry::WebKit::DumpRenderTree::didReceiveAuthenticationChallenge):
      (WebKit):
      * DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h:
      (WebCore):
      (DumpRenderTree):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118719 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1a7c3e81
    • commit-queue@webkit.org's avatar
      [BlackBerry] Always create a compositor · 52fa1543
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=87598
      
      Patch by Arvid Nilsson <anilsson@rim.com> on 2012-05-28
      Reviewed by Rob Buis.
      
      There will likely be compositing layers either due to web content or
      due to overlays.
      
      Defer initialization of OpenGL objects (i.e., delay creation of the
      LayerRenderer object) until we actually need to draw and there are such
      layers, to avoid initializing OpenGL in the unlikely case that there
      are no compositing layers or overlay layers.
      
      PR #156811
      
      * Api/WebPage.cpp:
      (BlackBerry::WebKit::WebPagePrivate::init):
      (BlackBerry::WebKit::WebPagePrivate::createCompositor):
      * Api/WebPageCompositor.cpp:
      (BlackBerry::WebKit::WebPageCompositorPrivate::setContext):
      (BlackBerry::WebKit::WebPageCompositorPrivate::prepareFrame):
      (BlackBerry::WebKit::WebPageCompositorPrivate::render):
      (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
      * Api/WebPageCompositor_p.h:
      (WebPageCompositorPrivate):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118704 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      52fa1543
    • commit-queue@webkit.org's avatar
      [BlackBerry] Dangling pointer in WebPagePrivate::setCompositor() message · 9ccf1231
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=87590
      
      Patch by Arvid Nilsson <anilsson@rim.com> on 2012-05-28
      Reviewed by Rob Buis.
      
      A crash would be seen in GuardedPointerBase::getWithGuardLocked when
      attempting to unpickle and execute serialized call to setCompositor.
      
      The problem was that the message had been created with a dangling
      pointer as the target. The web page failed to inform its compositor
      that it was being destroyed due to an early return in
      WebPagePrivate::destroyCompositor.
      
      The root cause was that a method called "destroyCompositor" was being
      called in two situations, when navigating to a new page as well as when
      actually deleting the web page. And in one case, we really only wanted
      to free up some memory by clearing textures, while in the other case we
      really did want to destroy the compositor.
      
      Fixed by calling a method to release textures when that's what we want
      to do, and calling a method to destroy the compositor when that's what
      we want to do, and making that latter method unconditional.
      
      Reviewed internally by Jeff Rogers.
      
      PR #156765
      
      * Api/WebPage.cpp:
      (BlackBerry::WebKit::WebPagePrivate::setLoadState):
      (BlackBerry::WebKit::WebPagePrivate::destroyCompositor):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9ccf1231
    • commit-queue@webkit.org's avatar
      [BlackBerry] Add a default tap highlight · 7c3c1cfd
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=87569
      
      Patch by Arvid Nilsson <anilsson@rim.com> on 2012-05-28
      Reviewed by Rob Buis.
      
      Source/WebKit:
      
      Add DefaultTapHighlight to the build system
      
      Reviewed internally by Mike Lattanzio and Mike Fenton.
      
      PR #154329
      
      * PlatformBlackBerry.cmake:
      
      Source/WebKit/blackberry:
      
      We used to require the embedder to implement tap highlight drawing.
      Now, a default tap highlight, implemented using the recently added
      accelerated compositing overlay layer support, can be used instead.
      
      The tap highlight appears instantly but fades out when hidden.
      
      The default tap highlight can be overridden using the new
      WebPage::setTapHighlight() method.
      
      Reviewed internally by Mike Lattanzio and Mike Fenton.
      
      PR #154329
      
      * Api/WebPage.cpp:
      (BlackBerry::WebKit::WebPagePrivate::init):
      (BlackBerry::WebKit::WebPage::tapHighlight):
      (WebKit):
      (BlackBerry::WebKit::WebPage::setTapHighlight):
      * Api/WebPage.h:
      (WebKit):
      * Api/WebPageClient.h:
      * Api/WebPage_p.h:
      (WebCore):
      (WebPagePrivate):
      * Api/WebTapHighlight.h: Added.
      (WebKit):
      * WebKitSupport/DefaultTapHighlight.cpp: Added.
      (WebKit):
      (BlackBerry::WebKit::fadeAnimationName):
      (BlackBerry::WebKit::DefaultTapHighlight::DefaultTapHighlight):
      (BlackBerry::WebKit::DefaultTapHighlight::~DefaultTapHighlight):
      (BlackBerry::WebKit::DefaultTapHighlight::draw):
      (BlackBerry::WebKit::DefaultTapHighlight::hide):
      (BlackBerry::WebKit::DefaultTapHighlight::notifySyncRequired):
      (BlackBerry::WebKit::DefaultTapHighlight::paintContents):
      * WebKitSupport/DefaultTapHighlight.h: Added.
      (WebKit):
      (DefaultTapHighlight):
      (BlackBerry::WebKit::DefaultTapHighlight::create):
      (BlackBerry::WebKit::DefaultTapHighlight::notifyAnimationStarted):
      (BlackBerry::WebKit::DefaultTapHighlight::showDebugBorders):
      (BlackBerry::WebKit::DefaultTapHighlight::showRepaintCounter):
      (BlackBerry::WebKit::DefaultTapHighlight::contentsVisible):
      * WebKitSupport/TouchEventHandler.cpp:
      (BlackBerry::WebKit::TouchEventHandler::drawTapHighlight):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7c3c1cfd
    • commit-queue@webkit.org's avatar
      [BlackBerry] Add an overlay layer · e7381707
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=87567
      
      Patch by Arvid Nilsson <anilsson@rim.com> on 2012-05-28
      Reviewed by Antonio Gomes.
      
      The overlay layer allows us to have compositing layers even though the
      web page is not currently using accelerated compositing.
      
      These layers can be used to implement tap highlight, inspector overlay
      and more.
      
      Source/WebCore:
      
      The WebCore changes support the overlay layer functionality in WebKit
      by making it possible to add animations from the compositing thread
      without them being instantly overwritten during the next commit.
      
      Also a new custom layer type is added, which allow an overlay layer to
      draw itself using raw OpenGL calls. An instance of a custom subclass of
      LayerCompositingThread must be provided when creating the
      LayerWebKitThread. Then, the custom layer can be used as the content
      layer of a GraphicsLayer, or by itself.
      
      Reviewed internally by Filip Spacek.
      
      PR #154335
      
      * platform/graphics/blackberry/LayerCompositingThread.cpp:
      (WebCore::LayerCompositingThread::~LayerCompositingThread):
      (WebCore::LayerCompositingThread::deleteTextures):
      (WebCore::LayerCompositingThread::drawTextures):
      (WebCore::LayerCompositingThread::drawMissingTextures):
      (WebCore::LayerCompositingThread::updateTextureContentsIfNeeded):
      (WebCore::LayerCompositingThread::setVisible):
      (WebCore::LayerCompositingThread::scheduleCommit):
      * platform/graphics/blackberry/LayerCompositingThread.h:
      (WebCore::LayerCompositingThread::addAnimation):
      (WebCore::LayerCompositingThread::setRunningAnimations):
      (WebCore::LayerCompositingThread::setSuspendedAnimations):
      (LayerCompositingThread):
      (WebCore::LayerCompositingThread::drawCustom):
      * platform/graphics/blackberry/LayerData.h:
      (LayerData):
      * platform/graphics/blackberry/LayerWebKitThread.cpp:
      (WebCore::LayerWebKitThread::LayerWebKitThread):
      (WebCore):
      (WebCore::LayerWebKitThread::~LayerWebKitThread):
      (WebCore::LayerWebKitThread::updateTextureContentsIfNeeded):
      (WebCore::LayerWebKitThread::startAnimations):
      (WebCore::LayerWebKitThread::commitOnCompositingThread):
      (WebCore::LayerWebKitThread::setNeedsDisplayInRect):
      (WebCore::LayerWebKitThread::setNeedsDisplay):
      (WebCore::LayerWebKitThread::setIsMask):
      (WebCore::LayerWebKitThread::setRunningAnimations):
      (WebCore::LayerWebKitThread::setSuspendedAnimations):
      * platform/graphics/blackberry/LayerWebKitThread.h:
      (LayerWebKitThread):
      
      Source/WebKit/blackberry:
      
      Reviewed internally by Filip Spacek.
      
      PR #154335
      
      * Api/WebPage.cpp:
      (BlackBerry::WebKit::WebPagePrivate::scheduleRootLayerCommit):
      (BlackBerry::WebKit::WebPagePrivate::overlayLayer):
      (WebKit):
      (BlackBerry::WebKit::WebPagePrivate::commitRootLayer):
      (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
      * Api/WebPageCompositor.cpp:
      (BlackBerry::WebKit::WebPageCompositorPrivate::setOverlayLayer):
      (WebKit):
      (BlackBerry::WebKit::WebPageCompositorPrivate::prepareFrame):
      (BlackBerry::WebKit::WebPageCompositorPrivate::render):
      (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
      * Api/WebPageCompositor_p.h:
      (BlackBerry::WebKit::WebPageCompositorPrivate::overlayLayer):
      (WebPageCompositorPrivate):
      * Api/WebPage_p.h:
      (WebPagePrivate):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118699 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e7381707
    • commit-queue@webkit.org's avatar
      [BlackBerry] Update WebPageCompositor::render() API · 6e668482
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=87565
      
      Patch by Arvid Nilsson <anilsson@rim.com> on 2012-05-28
      Reviewed by Rob Buis.
      
      Source/WebCore:
      
      The new API allows the embedder to specify the root transform and many
      OpenGL related parameters.
      
      Also refactor the code to allow several sets of layers to be rendered,
      and to allow interleaving the rendering of layers with rendering of
      buffers and checkerboard.
      
      Reviewed internally by Filip Spacek.
      
      PR #154334
      
      * platform/graphics/blackberry/LayerCompositingThread.cpp:
      (WebCore::LayerCompositingThread::drawTextures):
      (WebCore::LayerCompositingThread::drawSurface):
      * platform/graphics/blackberry/LayerRenderer.cpp:
      (WebCore::LayerRenderer::orthoMatrix):
      (WebCore::LayerRenderer::LayerRenderer):
      (WebCore::LayerRenderer::prepareFrame):
      (WebCore):
      (WebCore::LayerRenderer::setViewport):
      (WebCore::LayerRenderer::compositeLayers):
      (WebCore::LayerRenderer::compositeBuffer):
      (WebCore::LayerRenderer::drawCheckerboardPattern):
      (WebCore::LayerRenderer::drawLayersOnSurfaces):
      (WebCore::LayerRenderer::prepareFrameRecursive):
      (WebCore::LayerRenderer::updateLayersRecursive):
      (WebCore::LayerRenderer::compositeLayersRecursive):
      (WebCore::LayerRenderer::updateScissorIfNeeded):
      (WebCore::LayerRenderingResults::addHolePunchRect):
      * platform/graphics/blackberry/LayerRenderer.h:
      (LayerRenderer):
      
      Source/WebKit/blackberry:
      
      The new API allows the embedder to specify the root transform and many
      OpenGL related parameters to be used when rendering the web page.
      
      To honor the transform, we have to implement a way to composite the
      BackingStore output using a generic transform. This method,
      BackingStorePrivate::compositeContents(), uses a strategy that differs
      from blitContents(), because that one is optimized for software
      blitting, while this one is optimized for GPU rendering. Specifically,
      instead of drawing the checkerboard first, and the rendered subregions
      of the tile afterward, we draw the whole tile in one call, and then
      draw checkered regions on top, if any.
      
      Removed the blit generation condvar from the new code paths for drawing
      BackingStore output using a transform, since the condvar is ineffective
      in preventing flicker when we're not in charge of swapping the window.
      Instead, another synchronization solution will be implemented in the
      future.
      
      Reviewed internally by Filip Spacek.
      Some parts reviewed internally by Jacky Jiang and others by
      Mike Lattanzio.
      
      PR #151887, #154334
      
      * Api/BackingStore.cpp:
      (BlackBerry::WebKit::BackingStorePrivate::render):
      (BlackBerry::WebKit::BackingStorePrivate::blitContents):
      (WebKit):
      (BlackBerry::WebKit::BackingStorePrivate::compositeContents):
      * Api/BackingStore_p.h:
      (WebCore):
      (BackingStorePrivate):
      * Api/WebPageCompositor.cpp:
      (BlackBerry::WebKit::WebPageCompositorPrivate::setContext):
      (BlackBerry::WebKit::WebPageCompositorPrivate::setRootLayer):
      (BlackBerry::WebKit::WebPageCompositorPrivate::prepareFrame):
      (BlackBerry::WebKit::WebPageCompositorPrivate::render):
      (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
      (BlackBerry::WebKit::WebPageCompositor::prepareFrame):
      (BlackBerry::WebKit::WebPageCompositor::render):
      * Api/WebPageCompositor.h:
      * Api/WebPageCompositorClient.h:
      * Api/WebPageCompositor_p.h:
      (WebPageCompositorPrivate):
      * WebCoreSupport/ChromeClientBlackBerry.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6e668482
    • commit-queue@webkit.org's avatar
      [BlackBerry] Plumb through the return value of makeCurrent to caller · de3f773c
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=87564
      
      Patch by Arvid Nilsson <anilsson@rim.com> on 2012-05-28
      Reviewed by Rob Buis.
      
      This way the caller can take appropriate action if makeCurrent fails,
      for example because we're running out of memory.
      
      Reviewed internally by George Staikos.
      
      PR #149721
      
      * WebKitSupport/GLES2Context.cpp:
      (BlackBerry::WebKit::GLES2Context::makeCurrent):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118689 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      de3f773c
  5. 27 May, 2012 3 commits
    • commit-queue@webkit.org's avatar
      [BlackBerry] Crash when deleting WebPageCompositor · 645e22e6
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=87589
      
      Patch by Arvid Nilsson <anilsson@rim.com> on 2012-05-27
      Reviewed by Rob Buis.
      
      The WebPageCompositorPrivate is reference counted, so it may outlive
      either the WebPage or the WebPageCompositor, depending on who releases
      its reference first.
      
      Fixed by disconnecting the objects properly, regardless of who goes
      away first.
      
      Reviewed internally by Mike Lattanzio.
      
      PR #156444
      
      * Api/WebPage.cpp:
      (BlackBerry::WebKit::WebPagePrivate::setCompositor):
      (BlackBerry::WebKit::WebPagePrivate::destroyCompositor):
      * Api/WebPageCompositor.cpp:
      (BlackBerry::WebKit::WebPageCompositor::~WebPageCompositor):
      (BlackBerry::WebKit::WebPageCompositor::client):
      * Api/WebPageCompositor_p.h:
      (BlackBerry::WebKit::WebPageCompositorPrivate::setPage):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118627 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      645e22e6
    • commit-queue@webkit.org's avatar
      [BlackBerry] BackingStore accesses tiles even though it's not active · 9095a2fe
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=87563
      
      Patch by Arvid Nilsson <anilsson@rim.com> on 2012-04-18
      Reviewed by Antonio Gomes.
      
      There are many scenarios that can call render and cause tile access,
      and they used to be rerouted to the direct rendering code when the
      backing store was not active. This was thanks to an implicit check for
      isActive() by virtue of calling shouldDirectRenderingToWindow() from
      render().
      
      If we're using OpenGL for compositing the backing store contents
      however, direct rendering is always disabled and we jump right into the
      tile based rendering code.
      
      Fixed by adding an explicit check for isActive() in render(), now that
      the implicit check in shouldDirectRenderingToWindow() is conditional on
      having raster usage.
      
      Since PR136381/bug83131, when OpenGL compositing is used, and the
      backing store is not active, it is not in charge of drawing the root
      layer. Instead, we switch off the paintingGoesToWindow flag on the root
      RenderLayer so no invalidates will reach the ChromeClient or the
      BackingStore any more. Instead, invalidations will cause the root
      accelerated compositing layer to be repainted. Any BackingStore render
      calls while in this state are pointless, and can safely do an early
      return.
      
      Reviewed internally by Jakob Petsovits.
      
      PR #150403
      
      * Api/BackingStore.cpp:
      (BlackBerry::WebKit::BackingStorePrivate::render):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118626 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9095a2fe
    • commit-queue@webkit.org's avatar
      [BlackBerry] Web page fails to render after clicking link with target=_blank · a5e0050b
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=87562
      
      Patch by Arvid Nilsson <anilsson@rim.com> on 2012-04-12
      Reviewed by Antonio Gomes.
      
      Clicking such a link opens a new tab. The compositor was briefly in
      charge of drawing the root layer while the backing store was inactive
      and the user was looking at the other tab. The problem was that the
      compositor believed it was still painting the root layer even after the
      backing store became active again. The flag was not properly cleared
      when turning off compositing.
      
      Fixed by returning false from drawsRootLayer() if we don't have a root
      layer.
      
      Reviewed internally by Filip Spacek.
      
      PR #149342
      
      * Api/WebPageCompositor.cpp:
      (BlackBerry::WebKit::WebPageCompositorPrivate::drawsRootLayer):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a5e0050b
  6. 25 May, 2012 2 commits
  7. 24 May, 2012 5 commits
  8. 23 May, 2012 1 commit
  9. 22 May, 2012 2 commits
  10. 18 May, 2012 2 commits
    • mifenton@rim.com's avatar
      [BlackBerry] Validation of Last Fat Finger result is needed for selection. · 59d52bf8
      mifenton@rim.com authored
      https://bugs.webkit.org/show_bug.cgi?id=86888
      
      Reviewed by Antonio Gomes.
      
      PR 128393.
      
      Cached FatFingersResults must be validatible against
      the desired request to ensure the result is both for
      the same point and of the same type.
      
      * WebKitSupport/FatFingers.h:
      (WebKit):
      (FatFingersResult):
      (BlackBerry::WebKit::FatFingersResult::FatFingersResult):
      (BlackBerry::WebKit::FatFingersResult::reset):
      (BlackBerry::WebKit::FatFingersResult::resultMatches):
      (BlackBerry::WebKit::FatFingersResult::originPosition):
      (BlackBerry::WebKit::FatFingersResult::adjustedPosition):
      (BlackBerry::WebKit::FatFingersResult::positionWasAdjusted):
      (BlackBerry::WebKit::FatFingersResult::isTextInput):
      (BlackBerry::WebKit::FatFingersResult::isValid):
      (BlackBerry::WebKit::FatFingersResult::node):
      (BlackBerry::WebKit::FatFingersResult::nodeAsElementIfApplicable):
      * WebKitSupport/SelectionHandler.cpp:
      (BlackBerry::WebKit::SelectionHandler::selectAtPoint):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117638 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      59d52bf8
    • morrita@google.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=85515 · 9da7b7cc
      morrita@google.com authored
      Stale frame in WebCore::SpellChecker::didCheckSucceeded
      
      Source/WebCore:
      
      Reviewed by Ryosuke Niwa.
      
      Added EditorClient::frameWillDetachPage() notification to give a
      change to invalidate pending spellcheck requests on the client.
      
      Test: editing/spelling/spellcheck-async-remove-frame.html
      
      * editing/Editor.cpp:
      (WebCore::Editor::Editor):
      * editing/Editor.h:
      (Editor):
      * loader/EmptyClients.h:
      (WebCore::EmptyEditorClient::frameWillDetachPage):
      * page/EditorClient.h:
      (EditorClient):
      
      Source/WebKit/blackberry:
      
      Reviewed by Ryosuke Niwa.
      
      * WebCoreSupport/EditorClientBlackBerry.h:
      (WebCore::EditorClientBlackBerry::frameWillDetachPage):
      
      Source/WebKit/chromium:
      
      Added WebTextCheckingCompletionImpl::invalidate() to mark
      pending spellcheck request as invalid, and added frameWillDetachPage()
      to fire it.
      
      Reviewed by Ryosuke Niwa.
      
      * src/EditorClientImpl.cpp:
      (WebKit::EditorClientImpl::frameWillDetachPage):
      (WebKit):
      (WebKit::EditorClientImpl::requestCheckingOfString):
      (WebKit::EditorClientImpl::didCheckString):
      * src/EditorClientImpl.h:
      (WebKit):
      (EditorClientImpl):
      * src/WebTextCheckingCompletionImpl.cpp:
      (WebKit::WebTextCheckingCompletionImpl::didFinishCheckingText):
      (WebKit::WebTextCheckingCompletionImpl::didCancelCheckingText):
      (WebKit::WebTextCheckingCompletionImpl::invalidate):
      (WebKit):
      * src/WebTextCheckingCompletionImpl.h:
      (WebKit):
      (WebKit::WebTextCheckingCompletionImpl::WebTextCheckingCompletionImpl):
      (WebTextCheckingCompletionImpl):
      (WebKit::WebTextCheckingCompletionImpl::spellChecker):
      
      Source/WebKit/efl:
      
      Reviewed by Ryosuke Niwa.
      
      * WebCoreSupport/EditorClientEfl.h:
      (WebCore::EditorClientEfl::frameWillDetachPage):
      
      Source/WebKit/gtk:
      
      Reviewed by Ryosuke Niwa.
      
      * WebCoreSupport/EditorClientGtk.h:
      (WebKit::EditorClient::frameWillDetachPage):
      
      Source/WebKit/mac:
      
      Reviewed by Ryosuke Niwa.
      
      * WebCoreSupport/WebEditorClient.h:
      
      Source/WebKit/qt:
      
      Reviewed by Ryosuke Niwa.
      
      * WebCoreSupport/EditorClientQt.h:
      (WebCore::EditorClientQt::frameWillDetachPage):
      
      Source/WebKit/win:
      
      Reviewed by Ryosuke Niwa.
      
      * WebCoreSupport/WebEditorClient.h:
      (WebEditorClient::frameWillDetachPage):
      
      Source/WebKit/wince:
      
      Reviewed by Ryosuke Niwa.
      
      * WebCoreSupport/EditorClientWinCE.h:
      (WebKit::EditorClientWinCE::frameWillDetachPage):
      
      Source/WebKit/wx:
      
      Reviewed by Ryosuke Niwa.
      
      * WebKitSupport/EditorClientWx.h:
      (WebCore::EditorClientWx::frameWillDetachPage):
      
      LayoutTests:
      
      Reviewed by Ryosuke Niwa.
      
      * editing/spelling/spellcheck-async-remove-frame-expected.txt: Added.
      * editing/spelling/spellcheck-async-remove-frame.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117572 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9da7b7cc
  11. 17 May, 2012 5 commits
    • zhajiang@rim.com's avatar
      [BlackBerry] www.thestar.com/iphone Viewport Weirdness · 8c59b30b
      zhajiang@rim.com authored
      https://bugs.webkit.org/show_bug.cgi?id=86756
      
      Reviewed by George Staikos.
      
      PR 156710
      On high DPI devices, the virtual viewport size of this page was smaller
      than screen size. During the refreshing of the page, we reset the scale
      when the state was Committed, then layouted and rendered contents based
      on the virtual viewport size and default scale 1, which caused a small
      size thumbnail before we restored the previous view state.
      Fixed it by keeping the previous scale, user scalable and
      m_userViewportArguments during the Committed state of refreshing.
      
      * Api/WebPage.cpp:
      (BlackBerry::WebKit::WebPagePrivate::setLoadState):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117511 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8c59b30b
    • mifenton@rim.com's avatar
      [BlackBerry] Cleanup headers in SelectionHandler.cpp · abf38d70
      mifenton@rim.com authored
      https://bugs.webkit.org/show_bug.cgi?id=86760
      
      Reviewed by Antonio Gomes.
      
      Clean up includes in SelectionHandler.cpp.
      
      * WebKitSupport/SelectionHandler.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      abf38d70
    • mifenton@rim.com's avatar
      [BlackBerry] expandSelectionToGranularity should only use VisibleSelection and not range. · 223c08e5
      mifenton@rim.com authored
      https://bugs.webkit.org/show_bug.cgi?id=86759
      
      Reviewed by Antonio Gomes.
      
      expandSelectionToGranularity unnecesarily converted the
      selection to range and back. Using the selection
      directly is preferred.
      
      * WebKitSupport/SelectionHandler.cpp:
      (BlackBerry::WebKit::expandSelectionToGranularity):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      223c08e5
    • hbono@chromium.org's avatar
      [Refactoring] Move platform-specific code in Editor::respondToChangedSelection to the WebKit layer · 3b71ba04
      hbono@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=86591
      
      Reviewed by Ryosuke Niwa.
      
      This change adds a TextCheckerClient::shouldEraseMarkersAfterChangeSelection
      function to remove platform-specific code from Editor::respondToChangedSelection
      function.
      
      No new tests, no change in behavior.
      
      Source/WebCore:
      
      * editing/Editor.cpp:
      (WebCore::Editor::respondToChangedSelection):
      * loader/EmptyClients.h:
      (WebCore::EmptyTextCheckerClient::shouldEraseMarkersAfterChangeSelection):
      * platform/text/TextCheckerClient.h:
      (TextCheckerClient):
      
      Source/WebKit/blackberry:
      
      * WebCoreSupport/EditorClientBlackBerry.cpp:
      (WebCore::EditorClientBlackBerry::shouldEraseMarkersAfterChangeSelection):
      (WebCore):
      * WebCoreSupport/EditorClientBlackBerry.h:
      (EditorClientBlackBerry):
      
      Source/WebKit/chromium:
      
      * src/EditorClientImpl.cpp:
      (WebKit::EditorClientImpl::shouldEraseMarkersAfterChangeSelection):
      (WebKit):
      * src/EditorClientImpl.h:
      (EditorClientImpl):
      
      Source/WebKit/efl:
      
      * WebCoreSupport/EditorClientEfl.cpp:
      (WebCore::EditorClientEfl::shouldEraseMarkersAfterChangeSelection):
      (WebCore):
      * WebCoreSupport/EditorClientEfl.h:
      (EditorClientEfl):
      
      Source/WebKit/gtk:
      
      * WebCoreSupport/TextCheckerClientGtk.cpp:
      (WebKit::TextCheckerClientGtk::shouldEraseMarkersAfterChangeSelection):
      (WebKit):
      * WebCoreSupport/TextCheckerClientGtk.h:
      (TextCheckerClientGtk):
      
      Source/WebKit/mac:
      
      * WebCoreSupport/WebEditorClient.h:
      * WebCoreSupport/WebEditorClient.mm:
      (WebEditorClient::shouldEraseMarkersAfterChangeSelection):
      
      Source/WebKit/qt:
      
      * WebCoreSupport/TextCheckerClientQt.cpp:
      (WebCore::TextCheckerClientQt::shouldEraseMarkersAfterChangeSelection):
      (WebCore):
      * WebCoreSupport/TextCheckerClientQt.h:
      (TextCheckerClientQt):
      
      Source/WebKit/win:
      
      * WebCoreSupport/WebEditorClient.cpp:
      (WebEditorClient::shouldEraseMarkersAfterChangeSelection):
      * WebCoreSupport/WebEditorClient.h:
      (WebEditorClient):
      
      Source/WebKit/wince:
      
      * WebCoreSupport/EditorClientWinCE.cpp:
      (WebKit::EditorClientWinCE::shouldEraseMarkersAfterChangeSelection):
      (WebKit):
      * WebCoreSupport/EditorClientWinCE.h:
      (EditorClientWinCE):
      
      Source/WebKit/wx:
      
      * WebKitSupport/EditorClientWx.cpp:
      (WebCore::EditorClientWx::shouldEraseMarkersAfterChangeSelection):
      (WebCore):
      * WebKitSupport/EditorClientWx.h:
      (EditorClientWx):
      
      Source/WebKit2:
      
      * WebProcess/WebCoreSupport/WebEditorClient.cpp:
      (WebKit::WebEditorClient::shouldEraseMarkersAfterChangeSelection):
      (WebKit):
      * WebProcess/WebCoreSupport/WebEditorClient.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117470 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3b71ba04
    • mifenton@rim.com's avatar
      [BlackBerry] Build fix, SelectionHandler extra debug logs · acb2fd35
      mifenton@rim.com authored
      https://bugs.webkit.org/show_bug.cgi?id=86743
      
      Reviewed by Antonio Gomes.
      
      Add include for BlackBerryPlatformLog to SelectionHandler.cpp
      
      * WebKitSupport/SelectionHandler.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117458 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      acb2fd35
  12. 16 May, 2012 2 commits