2013-04-23 Carlos Garcia Campos [BlackBerry] Invalid assert in InputHandler::requestCheckingOfString() https://bugs.webkit.org/show_bug.cgi?id=114952 Reviewed by Rob Buis. Do not assume that Batch requests are only created whe input field is focused, the Editor can also create Batch requests when pasting a selection. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::requestCheckingOfString): Remove invalid assert. 2013-04-23 Xan Lopez [BlackBerry] Simplify BackForwardListBlackBerry::clear https://bugs.webkit.org/show_bug.cgi?id=115029 Reviewed by Carlos Garcia Campos. Simplify the implementation of the clear method. Instead of asking the WebCore implementation to search each item and delete it, set the capacity of the list to zero directly, which will do the same thing but more efficiently. No change in behavior, no new tests. * WebCoreSupport/BackForwardListBlackBerry.cpp: (WebCore::BackForwardListBlackBerry::clear): 2013-04-23 Xan Lopez [BlackBerry] Do not access BackForwardListImpl from DRT https://bugs.webkit.org/show_bug.cgi?id=115041 Reviewed by Carlos Garcia Campos. Export the necessary functionality in our BackForwardList port client in order for DRT to work. * WebCoreSupport/BackForwardListBlackBerry.cpp: (WebCore::BackForwardListBlackBerry::backListWithLimit): (WebCore): (WebCore::BackForwardListBlackBerry::forwardListWithLimit): (WebCore::BackForwardListBlackBerry::capacity): * WebCoreSupport/BackForwardListBlackBerry.h: (BackForwardListBlackBerry): 2013-04-23 Charles Wei [BlackBerry] Need to send out change event for date/color picker https://bugs.webkit.org/show_bug.cgi?id=114942 Reviewed by Carlos Garcia Campos. We need to instruct the FormControlElements to send out 'change' event when the user makes the selection and closes the PagePopup for date/color. * WebCoreSupport/ColorPickerClient.cpp: (WebCore::ColorPickerClient::setValueAndClosePopup): * WebCoreSupport/DatePickerClient.cpp: (WebCore::DatePickerClient::setValueAndClosePopup): 2013-04-22 Eli Fidler [BlackBerry] Update about:config lists https://bugs.webkit.org/show_bug.cgi?id=114967 Reviewed by Rob Buis. * WebCoreSupport/AboutDataEnableFeatures.in: * WebCoreSupport/AboutDataHaveFeatures.in: * WebCoreSupport/AboutDataUseFeatures.in: 2013-04-22 Otto Derek Cheung [BlackBerry] Update BatteryClientBlackBerry to use our port's new listener interface https://bugs.webkit.org/show_bug.cgi?id=114892 Reviewed by Rob Buis. PR 328147 Modify the client so we only have one listener for battery change events. The dispatch of different event listeners are handled by BatteryController. * WebCoreSupport/BatteryClientBlackBerry.cpp: (WebCore::BatteryClientBlackBerry::BatteryClientBlackBerry): (WebCore::BatteryClientBlackBerry::startUpdating): (WebCore::BatteryClientBlackBerry::stopUpdating): (WebCore::BatteryClientBlackBerry::onStatusChange): * WebCoreSupport/BatteryClientBlackBerry.h: (BatteryClientBlackBerry): 2013-04-22 Xuefei Ren fix build warning(unused parameter) https://bugs.webkit.org/show_bug.cgi?id=114855 Reviewed by Rob Buis. remove warning(unused parameter) in Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::extractedTextRequest): 2013-04-22 Xan Lopez [BlackBerry] ASSERT in FrameLoaderClient::convertMainResourceLoadToDownload https://bugs.webkit.org/show_bug.cgi?id=114741 Reviewed by George Staikos. Consider the case where a ResourceHandle won't have a FilterStream object associated (for example, Blob objects) instead of ASSERTing pointlessly when asking our network layer for such an object. This partially fixes fast/dom/HTMLAnchorElement/anchor-nodownload-set.html * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::convertMainResourceLoadToDownload): 2013-04-22 Mike Fenton [BlackBerry] Add additional datalist support. https://bugs.webkit.org/show_bug.cgi?id=114883 Reviewed by Rob Buis. PR 210083. Properly set state when opening a Date/Time popup and simplify the logic for showing datalist options. Internally Reviewed by Otto Cheung. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::openDatePopup): (BlackBerry::WebKit::InputHandler::showTextInputTypeSuggestionBox): 2013-04-19 Andy Chen [BlackBerry] Find-on-page should do the scoping again when highlight policy changed https://bugs.webkit.org/show_bug.cgi?id=114885 Reviewed by Rob Buis. PR 195773 Internally reviewed by Mike Fenton. For find on page, we need to treat it as a new search if highlightAllMatches changes but the text is not changed. * WebKitSupport/InPageSearchManager.cpp: (BlackBerry::WebKit::InPageSearchManager::findNextString): (BlackBerry::WebKit::InPageSearchManager::findAndMarkText): 2013-04-19 Xuefei Ren fixed debug broken from previous patch https://bugs.webkit.org/show_bug.cgi?id=114844 Reviewed by Rob Buis. * WebKitSupport/RenderQueue.cpp: (BlackBerry::WebKit::RenderQueue::scrollZoomJobsCompleted): Add the parameter outstandingJobs which is used in ASSERT(),it was removed in the r148677 by misstake.now I need to fix it. 2013-04-19 Alberto Garcia [BlackBerry] EditorClientBlackBerry: Fix parameter name https://bugs.webkit.org/show_bug.cgi?id=114856 Reviewed by Carlos Garcia Campos. Build fix due to a typo in a parameter name. * WebCoreSupport/EditorClientBlackBerry.cpp: (WebCore::EditorClientBlackBerry::requestCheckingOfString): 2013-04-18 Nima Ghanavatian [BlackBerry] Invalidate spell checking requests in platform code https://bugs.webkit.org/show_bug.cgi?id=114830 Reviewed by Rob Buis. Internally reviewed by Mike Fenton. Cache the value of the last requested sequence id at focus change. All requests prior to this point will be rejected upon processing. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::InputHandler): (BlackBerry::WebKit::InputHandler::requestCheckingOfString): (BlackBerry::WebKit::InputHandler::stopPendingSpellCheckRequests): * WebKitSupport/InputHandler.h: (InputHandler): 2013-04-17 Geoffrey Garen Renamed JSGlobalData to VM https://bugs.webkit.org/show_bug.cgi?id=114777 Reviewed by Phil Pizlo. * Api/BlackBerryGlobal.cpp: (BlackBerry::WebKit::clearMemoryCaches): * WebKitSupport/AboutData.cpp: * WebKitSupport/DumpRenderTreeSupport.cpp: (DumpRenderTreeSupport::javaScriptObjectsCount): 2013-04-18 Ed Baker [BlackBerry] Should pass through an actual error code when calling notifyLoadFinished https://bugs.webkit.org/show_bug.cgi?id=114815 Reviewed by Rob Buis. PR #318079 * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::postProgressFinishedNotification): 2013-04-18 Xuefei Ren remove build warning(unused parameter) https://bugs.webkit.org/show_bug.cgi?id=114670 Reviewed by Rob Buis. remove builde warning (unused parameter) in Source/WebKit/blackberry * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::spellCheckingRequestCancelled): (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed): (BlackBerry::WebKit::InputHandler::spannableTextInRange): * WebKitSupport/RenderQueue.cpp: (BlackBerry::WebKit::RenderQueue::backingStoreRectChanging): (BlackBerry::WebKit::RenderQueue::scrollZoomJobsCompleted): * WebKitSupport/SurfacePool.cpp: (BlackBerry::WebKit::SurfacePool::destroyPlatformGraphicsContext): (BlackBerry::WebKit::SurfacePool::waitForBuffer): (BlackBerry::WebKit::SurfacePool::notifyBuffersComposited): (BlackBerry::WebKit::SurfacePool::destroyPlatformSync): 2013-04-18 Xuefei Ren remove build warning(unused parameter) https://bugs.webkit.org/show_bug.cgi?id=114670 Reviewed by Rob Buis. remove build warning in Source/WebKit/blackberry/Api * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::scroll): (BlackBerry::WebKit::BackingStorePrivate::clearAndUpdateTileOfNotRenderedRegion): (BlackBerry::WebKit::BackingStorePrivate::paintDefaultBackground): (BlackBerry::WebKit::BackingStorePrivate::blitTileRect): (BlackBerry::WebKit::BackingStorePrivate::actualVisibleSizeChanged): * Api/BlackBerryGlobal.cpp: (BlackBerry::WebKit::clearAppCache): (BlackBerry::WebKit::clearDatabase): * Api/WebOverlay.cpp: (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setContentsToImage): (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::layerVisibilityChanged): (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::drawTextures): (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setContentsToImage): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::setCaretHighlightStyle): * Api/WebPageCompositor.cpp: (BlackBerry::WebKit::WebPageCompositor::cleanup): 2013-04-18 Xuefei Ren removei build warning (unused parameter ) https://bugs.webkit.org/show_bug.cgi?id=114670 Reviewed by Rob Buis. remove warning (unused parameter ) in Source/WebKit/blackberry/WebCoreSupport * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::mouseDidMoveOverElement): (WebCore::ChromeClientBlackBerry::needTouchEvents): (WebCore::ChromeClientBlackBerry::reachedMaxAppCacheSize): * WebCoreSupport/DatePickerClient.cpp: (WebCore::DatePickerClient::setValue): * WebCoreSupport/EditorClientBlackBerry.cpp: (WebCore::EditorClientBlackBerry::checkSpellingOfString): (WebCore::EditorClientBlackBerry::getAutoCorrectSuggestionForMisspelledWord): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNewWindowAction): (WebCore::FrameLoaderClientBlackBerry::dispatchDidReceiveResponse): (WebCore::FrameLoaderClientBlackBerry::shouldUseCredentialStorage): * WebCoreSupport/InspectorClientBlackBerry.cpp: (WebCore::InspectorClientBlackBerry::updateInspectorStateCookie): * WebCoreSupport/NetworkInfoClientBlackBerry.cpp: (WebCore::NetworkInfoClientBlackBerry::onCurrentNetworkTypeChange): (WebCore::NetworkInfoClientBlackBerry::onCurrentCellularTypeChange): * WebCoreSupport/SelectPopupClient.cpp: (WebCore::SelectPopupClient::generateHTML): * WebCoreSupport/UserMediaClientImpl.cpp: (WebCore::UserMediaClientImpl::requestUserMedia): 2013-04-17 Nima Ghanavatian Clean up spellcheck state when changing focus. https://bugs.webkit.org/show_bug.cgi?id=114758 Reviewed by Rob Buis. Internally reviewed by Mike Fenton and Gen Mak. PR325941 If we lose focus while waiting for a spellcheck request to return, we will never see the reply and continue to queue up future requests. By clearing the queue we ensure that all requests being processed and waiting to fire are valid. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::setElementUnfocused): * WebKitSupport/SpellingHandler.cpp: (BlackBerry::WebKit::SpellingHandler::spellCheckTextBlock): 2013-04-17 Tiancheng Jiang [BlackBerry] Check image node with usemap attribute isLink failed https://bugs.webkit.org/show_bug.cgi?id=114751 Reviewed by Rob Buis. PR 326780 Internally Reviewed by Liam Quinn. An image node with usemap will crash when call isLink. If the node is linkNode, bring up the CCM(eg. linked image). Also use toElement method as agomes suggested in pr 113957. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::webContext): * WebKitSupport/FatFingers.cpp: (BlackBerry::WebKit::FatFingers::findBestPoint): 2013-04-16 Nima Ghanavatian Redo spellchecking of a field if the layout has changed https://bugs.webkit.org/show_bug.cgi?id=114700 Reviewed by Rob Buis. Internally reviewed by Mike Fenton. PR258637 If we insert a child node during spellchecking, the current request along with the requests in queue become stale. The offsets were calculated when they were created are no longer valid. We clear the queue by setting sequence id to -1 and trigger spell checking again. We only trigger re-checking if the layout change occurred during processing of a request. This is maintained with the m_request pointer as it should be cleared after use. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::layoutFinished): * WebCoreSupport/EditorClientBlackBerry.cpp: (WebCore::EditorClientBlackBerry::requestCheckingOfString): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::requestCheckingOfString): (BlackBerry::WebKit::InputHandler::spellCheckingRequestCancelled): (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed): (BlackBerry::WebKit::InputHandler::setElementFocused): (BlackBerry::WebKit::InputHandler::spellCheckTextBlock): (WebKit): (BlackBerry::WebKit::InputHandler::stopPendingSpellCheckRequests): * WebKitSupport/InputHandler.h: (InputHandler): 2013-04-16 Jacky Jiang [BlackBerry] Viewport not rendered correctly https://bugs.webkit.org/show_bug.cgi?id=114704 Reviewed by Rob Buis. Internally reviewed by Konrad Piascik. PR: 326260 The applyDeviceScaleFactorInCompositor setting is now generated from Settings.in after rebase, the setter should be setApplyDeviceScaleFactorInCompositor() instead of setApplyPageScaleFactorInCompositor(). The setting can be removed from WebSettings and use a simpler way instead in the future if there are no issues when TextAutoSizer is enabled. Just keep it for now. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::didChangeSettings): * Api/WebSettings.cpp: (BlackBerry::WebKit::WebSettings::setApplyDeviceScaleFactorInCompositor): * Api/WebSettings.h: 2013-04-16 Leo Yang [BlackBerry] Update WebPage.{h, cpp} for supporting web filesystem https://bugs.webkit.org/show_bug.cgi?id=114698 Reviewed by Rob Buis. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::init): (BlackBerry::WebKit::WebPage::clearBrowsingData): (BlackBerry::WebKit::WebPage::clearWebFileSystem): (WebKit): * Api/WebPage.h: 2013-04-16 Arvid Nilsson [BlackBerry] Accelerated animation regression with GL renderer https://bugs.webkit.org/show_bug.cgi?id=114685 Reviewed by Rob Buis. Internally reviewed by Filip Spacek. GL renderer changed the assumption made in accelerated animation code that rendering the contents of AC layer tiles would be the slow operation. By starting animations after the slow operation, the appearance of the animation could be made smooth. Rendering tiles may still be slow, but now something else can be slow too: drawing display lists to backing. And it's running on the compositing thread, can happen at any time and will interrupt accelerated animations. Improved the situation by calling an API for updating backing to schedule the delay at a convenient time. We try to update backing before starting animations. However, future backing updates can still interrupt the running animation and cause dropped frames. Further improvements to animation smoothness will probably require optimizations in the GL renderer. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::commitRootLayer): (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded): * Api/WebPage_p.h: (WebPagePrivate): * WebKitSupport/FrameLayers.cpp: (BlackBerry::WebKit::FrameLayers::notifyAnimationsStarted): (WebKit): * WebKitSupport/FrameLayers.h: (FrameLayers): 2013-04-15 Liam Quinn [BlackBerry] Crash from null m_webSettings in WebPagePrivate https://bugs.webkit.org/show_bug.cgi?id=114633 RIM PR 303745 Reviewed by Rob Buis. Internally reviewed by Leo Yang. Speculative fix suggested by George Staikos--initialize m_webSettings first thing in the init() method. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::init): 2013-04-15 Andy Chen [BlackBerry] Forward userGesture when creating a new window https://bugs.webkit.org/show_bug.cgi?id=114622 Reviewed by Rob Buis. Client could use this info to decide whether the popup should be blocked. PR 291898 Reviewed internally by Mike Fenton * Api/WebPageClient.h: * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::createWindow): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchCreatePage): 2013-04-15 Xan Lopez [BlackBerry] ASSERT in StyleResolver::ensureScopeResolver() https://bugs.webkit.org/show_bug.cgi?id=114615 Reviewed by Carlos Garcia Campos. Add a method to enable the style scoped feature to our DumpRenderTreeSupport class. * WebKitSupport/DumpRenderTreeSupport.cpp: (DumpRenderTreeSupport::setStyleScopedEnabled): * WebKitSupport/DumpRenderTreeSupport.h: (DumpRenderTreeSupport): 2013-04-12 Yongxin Dai [BlackBerry] Enable selecting text in single line input field without selection point being actually on the targeted text vertically https://bugs.webkit.org/show_bug.cgi?id=114515 Reviewed by Rob Buis. PR #317924. Internally reviewed by Mike Fenton. It was still hard to select text in URL bar with an inverted selection handle. We improve the issue by replacing the Y coordinate of selection point with Y coordinate of start caret for single line input filed. Thus, the Y coordinate is always valid regardless of the actual location of the selection handle. * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::setSelection): (BlackBerry::WebKit::SelectionHandler::startCaretViewportRect): (WebKit): (BlackBerry::WebKit::SelectionHandler::caretPositionChanged): * WebKitSupport/SelectionHandler.h: (SelectionHandler): 2013-04-12 Carlos Garcia Campos [BlackBerry] Crash running layout tests https://bugs.webkit.org/show_bug.cgi?id=114503 Reviewed by Xan Lopez. Hit an assertion in ~GuardedPointerBase when DRT is deleted. DumpRenderTree class derives from BlackBerry::Platform::LayoutTestClient that derives from BlackBerry::Platform::GuardedPointerBase, so the DRT pointer should no be released with delete but with BlackBerry::Platform::deleteGuardedObject(). * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate): 2013-04-12 Carlos Garcia Campos [BlackBerry] Crash running layout tests when WebPage is destroyed https://bugs.webkit.org/show_bug.cgi?id=114497 Reviewed by Xan Lopez. PR 324649 Internally reviewed by Konrad Piascik and Rob Buis. Use a bool member to keep track of whether the inspector is enabled or not instead of relaying on the enable developer extras setting, that can be set in other places than enableWebInspector(). * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): Initialize m_inspectorEnabled. (BlackBerry::WebKit::WebPage::enableWebInspector): Return early if inspector is already enabled and set m_inspectorEnabled to true. (BlackBerry::WebKit::WebPage::disableWebInspector): Return early if inspector is not enabled and set m_inspectorEnabled to false. (BlackBerry::WebKit::WebPage::isWebInspectorEnabled): Check the current value of m_inspectorEnabled instead of the developer extras setting. * Api/WebPage_p.h: (WebPagePrivate): Add m_inspectorEnabled. 2013-04-11 Jacky Jiang [BlackBerry] Initial scale changes depending on the order of page navigations https://bugs.webkit.org/show_bug.cgi?id=114448 Reviewed by Rob Buis. PR: 323941 During page transitions, absoluteVisibleOverflowSize() and contentsSize() in fixedLayoutSize() were based on the old page when we just started or committed provisinal load. In that case, fixedLayoutSize() is very old page dependent and can cause inconsistent behaviors. For example, if the old page contents width is 4000, we will get DEFAULT_MAX_LAYOUT_WIDTH 1024 as the new page's fixedLayoutSize; however, we will get 768 if we navigate to the new page directly. To fix that, return default layout size if the page doesn't have virtual viewport and m_loadState is Provisional. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize): 2013-04-11 Arvid Nilsson [BlackBerry] LayerTexture refactoring https://bugs.webkit.org/show_bug.cgi?id=114276 Reviewed by Carlos Garcia Campos. Adapt to the LayerTexture refactoring down in WebCore. PR 322882 * Api/WebOverlay.cpp: (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded): (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::drawTextures): 2013-04-10 Arvid Nilsson [BlackBerry] Rename BlackBerry specific Texture class https://bugs.webkit.org/show_bug.cgi?id=95781 Reviewed by Rob Buis. Texture was a bit too generic and prone to name conflicts. Renamed it to LayerTexture. PR 322882 * Api/WebOverlay.cpp: (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded): * Api/WebOverlay_p.h: (WebOverlayLayerCompositingThreadClient): 2013-04-08 Anders Carlsson Remove unneeded headers from FrameLoader.h https://bugs.webkit.org/show_bug.cgi?id=114223 Reviewed by Geoffrey Garen. Include HistoryController.h from WebCore. * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: 2013-04-09 Geoffrey Garen Removed bitrotted TimeoutChecker code https://bugs.webkit.org/show_bug.cgi?id=114336 Reviewed by Alexey Proskuryakov. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::setTimeoutForJavaScriptExecution): 2013-04-09 Jacky Jiang [BlackBerry] Main page is rendered at wrong large scale after back from any zooming article at read.thestar.com https://bugs.webkit.org/show_bug.cgi?id=114296 Reviewed by Rob Buis. PR: 308655 We were relying on the load state Committed to reset m_userPerformedManualZoom and m_userPerformedManualScroll; however, the main resources of the articles on read.thestar.com were preloaded and the WebPage didn't get any load state change callbacks when going back to the main page from the articles. Therefore, m_userPerformedManualZoom had never been reset in this case and we picked up the wrong scale when restoring the main page. Rset m_userPerformedManualScroll and m_userPerformedManualScroll when we are going back or forward. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::goBackOrForward): 2013-04-09 Alberto Garcia [BlackBerry] InputHandler: fix calls to HTMLInputElement methods https://bugs.webkit.org/show_bug.cgi?id=114283 Reviewed by Rob Buis. Fix calls with wrong names. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::convertInputType): 2013-04-08 Benjamin Poulain Remove HTML Notification https://bugs.webkit.org/show_bug.cgi?id=114231 Reviewed by Ryosuke Niwa. * WebCoreSupport/AboutDataEnableFeatures.in: 2013-04-08 Alberto Garcia [BlackBerry] WebPage: fix build due to type mismatches https://bugs.webkit.org/show_bug.cgi?id=114148 Reviewed by Darin Adler. Add explicit conversions between LayoutUnit and int, and between LayoutRect and IntRect. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::rectForNode): 2013-04-08 Jeff Rogers [BlackBerry] Update BlackBerry JavaScript API https://bugs.webkit.org/show_bug.cgi?id=114065 Reviewed by Rob Buis. Internal PR 317350 Add new API for determining if user gesture is being processed. Remove obsolete files. Properly expose JSC global context. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPage::executeJavaScriptFunction): (BlackBerry::WebKit::WebPage::globalContext): (BlackBerry::WebKit::WebPage::isProcessingUserGesture): (WebKit): * Api/WebPage.h: * Api/WebPageClient.h: * Api/WebPage_p.h: (WebPagePrivate): * WebCoreSupport/ChromeClientBlackBerry.cpp: * WebCoreSupport/ChromeClientBlackBerry.h: (ChromeClientBlackBerry): * WebCoreSupport/ClientExtension.cpp: Removed. * WebCoreSupport/ClientExtension.h: Removed. * WebCoreSupport/ExternalExtension.cpp: Removed. * WebCoreSupport/ExternalExtension.h: Removed. * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchDidClearWindowObjectInWorld): 2013-04-08 Jakob Petsovits [BlackBerry] More null checks for m_mainFrame https://bugs.webkit.org/show_bug.cgi?id=114172 Reviewed by Rob Buis. After r147744, some unit tests were crashing on WebPage shutdown, because BackingStorePrivate::repaint() now uses pixelContentsRect() (accessing m_webPage->contentsRect()) instead of BackingStoreClient::contentsRect(). In m_webPage, m_mainFrame had already been set to 0. Make us more robust against these errors by checking the existence of m_mainFrame more diligently. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::shouldZoomAboutPoint): (BlackBerry::WebKit::WebPagePrivate::shouldSendResizeEvent): (BlackBerry::WebKit::WebPagePrivate::contentsSize): (BlackBerry::WebKit::WebPagePrivate::absoluteVisibleOverflowSize): (BlackBerry::WebKit::WebPagePrivate::setViewMode): 2013-04-08 Iris Wu [BlackBerry] Force horizontal list to be horizontal scrollable. https://bugs.webkit.org/show_bug.cgi?id=114173 Reviewed by Rob Buis. Force content to be horizontal/vertical overscrollable if it scrolls in horizontal/vertical way. PR 237440 Internally Reviewed by Arvid Nilsson. * WebKitSupport/InRegionScrollableArea.cpp: (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea): 2013-04-08 Alberto Garcia [BlackBerry] WebPage: misc build fixes https://bugs.webkit.org/show_bug.cgi?id=114152 Reviewed by Carlos Garcia Campos. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::shouldPluginEnterFullScreen): (BlackBerry::WebKit::WebPagePrivate::didPluginExitFullScreen): (BlackBerry::WebKit::WebPagePrivate::onPluginStartBackgroundPlay): (BlackBerry::WebKit::WebPagePrivate::onPluginStopBackgroundPlay): Remove unused parameters. (BlackBerry::WebKit::WebPagePrivate::zoomAnimationFinished): (BlackBerry::WebKit::WebPage::blockZoom): Replace TAAUTO with TASTART (this changed in r120495). (BlackBerry::WebKit::WebPagePrivate::setViewportSize): Rename m_fullscreenVideoNode to m_fullscreenNode (this changed in r142220). (BlackBerry::WebKit::WebPagePrivate::compositorDrawsRootLayer): Rename paintingGoesToWindow() to paintsIntoWindow() (this changed in r113514). 2013-04-07 David Kilzer Remove the rest of SVG_DOM_OBJC_BINDINGS Reviewed by Geoffrey Garen. * WebCoreSupport/AboutDataEnableFeatures.in: - Remove reference to SVG_DOM_OBJC_BINDINGS. 2013-04-06 Zan Dobersek Remove the USE(SKIA_ON_MAC_CHROMIUM) guards https://bugs.webkit.org/show_bug.cgi?id=114084 Reviewed by Ryosuke Niwa. * WebCoreSupport/AboutDataUseFeatures.in: Remove the SKIA_ON_MAC_(CHROME|CHROMIUM) reference. 2013-04-05 Tiancheng Jiang [BlackBerry] FatFingers Don't check the shadow tree for all elements. https://bugs.webkit.org/show_bug.cgi?id=114066 Reviewed by Rob Buis. BlackBerry PR 263078 Internally reviewed by Genevieve Mak. No need to check shadow tree since sliders use touch events. * WebKitSupport/FatFingers.cpp: (BlackBerry::WebKit::FatFingers::isElementClickable): 2013-04-05 Zan Dobersek Remove WTF_USE_GOOGLEURL-guarded code https://bugs.webkit.org/show_bug.cgi?id=114028 Reviewed by Ryosuke Niwa. * WebCoreSupport/AboutDataUseFeatures.in: Remove GOOGLEURL from the list. 2013-04-04 Jacky Jiang [BlackBerry] Blitting wrong rect during history navigations https://bugs.webkit.org/show_bug.cgi?id=113963 Reviewed by Rob Buis. Internally reviewed by Jakob Petsovits. On www.bbc.com/news, we blit wrong rect during the second restoration of the view states when we navigate back from stories to the main page. Update the contents size and scroll position before we render and blit if we failed to zoomAboutPoint so that UI thread can still get the correct rect during blit. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::restoreHistoryViewState): 2013-04-05 Jakob Petsovits [BlackBerry] Replace map{From,To}Transformed() with ViewportAccessor https://bugs.webkit.org/show_bug.cgi?id=113449 Reviewed by Rob Buis. This removes the WebPage/BackingStoreClient family of coordinate transformation functions, which were widely disliked for their naming, with ViewportAccessor API that had previously been introduced for limited use cases. This commit takes care of the remaining call sites and leaves us with a single API to use. No new tests, only a clean-up/refactor of existing code & functionality. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::repaint): (BlackBerry::WebKit::BackingStorePrivate::slowScroll): (BlackBerry::WebKit::BackingStorePrivate::visibleContentsRect): (BlackBerry::WebKit::BackingStorePrivate::unclippedVisibleContentsRect): (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents): (BlackBerry::WebKit::BackingStorePrivate::expandedContentsSize): * Api/InRegionScroller.cpp: (BlackBerry::WebKit::InRegionScrollerPrivate::clipToRect): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::init): (BlackBerry::WebKit::WebPagePrivate::scrollPosition): (BlackBerry::WebKit::WebPagePrivate::maximumScrollPosition): (BlackBerry::WebKit::WebPagePrivate::setScrollPosition): (BlackBerry::WebKit::WebPagePrivate::viewportSize): (BlackBerry::WebKit::WebPagePrivate::actualVisibleSize): (BlackBerry::WebKit::WebPagePrivate::layoutFinished): (BlackBerry::WebKit::WebPagePrivate::notifyTransformedContentsSizeChanged): (BlackBerry::WebKit::WebPagePrivate::updateCursor): (BlackBerry::WebKit::WebPagePrivate::focusNodeRect): (BlackBerry::WebKit::WebPagePrivate::contextNode): (BlackBerry::WebKit::WebPagePrivate::blockZoomRectForNode): (BlackBerry::WebKit::WebPagePrivate::zoomAnimationFinished): (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent): (BlackBerry::WebKit::WebPage::blockZoom): * Api/WebPage_p.h: (WebPagePrivate): * WebKitSupport/BackingStoreClient.cpp: (BlackBerry::WebKit::BackingStoreClient::transformedScrollPosition): (BlackBerry::WebKit::BackingStoreClient::transformedMaximumScrollPosition): (BlackBerry::WebKit::BackingStoreClient::actualVisibleSize): (BlackBerry::WebKit::BackingStoreClient::transformedActualVisibleSize): * WebKitSupport/BackingStoreClient.h: (BackingStoreClient): * WebKitSupport/FatFingers.cpp: (BlackBerry::WebKit::FatFingers::fingerRectForPoint): (BlackBerry::WebKit::FatFingers::FatFingers): (BlackBerry::WebKit::FatFingers::findBestPoint): (BlackBerry::WebKit::FatFingers::findIntersectingRegions): (BlackBerry::WebKit::FatFingers::getNodesFromRect): * WebKitSupport/InRegionScrollableArea.cpp: (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible): * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::sendClickAtFatFingersPoint): (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint): (BlackBerry::WebKit::TouchEventHandler::handleFatFingerPressed): * WebKitSupport/WebKitThreadViewportAccessor.cpp: (BlackBerry::WebKit::WebKitThreadViewportAccessor::pixelContentsSize): (BlackBerry::WebKit::WebKitThreadViewportAccessor::pixelScrollPosition): (BlackBerry::WebKit::WebKitThreadViewportAccessor::documentViewportSize): 2013-04-05 Alberto Garcia [BlackBerry] Remove unused parameters from notifyAnimationStarted() and paintContents() https://bugs.webkit.org/show_bug.cgi?id=114022 Reviewed by Carlos Garcia Campos. Naming the 'time' and 'inClip' unused parameters only produces compiler warnings. * Api/WebOverlay_p.h: (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::notifyAnimationStarted): (WebOverlayPrivateWebKitThread): * Api/WebPage_p.h: (BlackBerry::WebKit::WebPagePrivate::notifyAnimationStarted): (BlackBerry::WebKit::WebPagePrivate::paintContents): * WebKitSupport/DefaultTapHighlight.h: (BlackBerry::WebKit::DefaultTapHighlight::notifyAnimationStarted): * WebKitSupport/InspectorOverlayBlackBerry.cpp: (BlackBerry::WebKit::InspectorOverlay::paintContents): * WebKitSupport/InspectorOverlayBlackBerry.h: (BlackBerry::WebKit::InspectorOverlay::notifyAnimationStarted): (InspectorOverlay): * WebKitSupport/SelectionOverlay.h: (BlackBerry::WebKit::SelectionOverlay::notifyAnimationStarted): 2013-04-05 Alberto Garcia [BlackBerry] WebOverlay: fix access to m_client https://bugs.webkit.org/show_bug.cgi?id=114003 Reviewed by Rob Buis. m_client was replace by m_overlay in r146058. * Api/WebOverlay.cpp: (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded): 2013-04-05 Alberto Garcia [BlackBerry] WebOverlayPrivate: remove showDebugBorders() and showRepaintCounter() https://bugs.webkit.org/show_bug.cgi?id=114009 Reviewed by Carlos Garcia Campos. These methods were removed in r133517 but were accidentally introduced again in r145968. The previous patch didn't remove them all. * WebKitSupport/DefaultTapHighlight.cpp: * WebKitSupport/DefaultTapHighlight.h: (DefaultTapHighlight): * WebKitSupport/InspectorOverlayBlackBerry.cpp: * WebKitSupport/InspectorOverlayBlackBerry.h: (InspectorOverlay): * WebKitSupport/SelectionOverlay.cpp: * WebKitSupport/SelectionOverlay.h: (SelectionOverlay): 2013-04-05 Alberto Garcia [BlackBerry] WebOverlayPrivate: remove showDebugBorders() and showRepaintCounter() https://bugs.webkit.org/show_bug.cgi?id=114009 Reviewed by Carlos Garcia Campos. These methods were removed in r133517 but were accidentally introduced again in r145968. * Api/WebOverlay_p.h: (WebOverlayPrivateWebKitThread): 2013-04-05 Anthony Scian [BlackBerry] WebOverlay: check if platformContext is null https://bugs.webkit.org/show_bug.cgi?id=114005 Reviewed by Carlos Garcia Campos. RIM PR 256522 Internally reviewed by Mike Lattanzio. The pointer returned by lockBufferDrawable can be null, so it needs to be checked first before being used. * Api/WebOverlay.cpp: (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded): 2013-04-05 Benjamin Poulain Remove WTFURL from WebKit https://bugs.webkit.org/show_bug.cgi?id=113994 Reviewed by Ryosuke Niwa. * WebCoreSupport/AboutDataUseFeatures.in: 2013-04-04 Andrew Lo [BlackBerry] DOMSupport::isFixedPositionOrHasFixedPositionAncestor stops traversing render tree when it hits an iframe element https://bugs.webkit.org/show_bug.cgi?id=113944 Reviewed by Rob Buis. Internally reviewed by Mike Fenton. Internal PR 320732. When checking whether a RenderObject is fixed position or has a fixed position ancestor, we traverse the render tree upwards. When we reach the root of the tree, check whether the root is an iframe and has an element owner. If so, we also need to continue iterating up the tree from the owner to see if the iframe is a descendant of a fixed position element. * WebKitSupport/DOMSupport.cpp: (BlackBerry::WebKit::DOMSupport::isFixedPositionOrHasFixedPositionAncestor): 2013-04-04 Tiancheng Jiang [BlackBerry] Adjust fatfinger result priority https://bugs.webkit.org/show_bug.cgi?id=113957 Reviewed by Rob Buis. RIM PR 224781 Internally Reviewed by Genevieve Mak. Change fatfigner algorithm, return the clickable element rather than its parent anchor. Modify taphighlight and context menu node selection accordingly. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::webContext): * WebKitSupport/FatFingers.cpp: (BlackBerry::WebKit::FatFingers::findBestPoint): * WebKitSupport/FatFingers.h: * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::elementForTapHighlight): 2013-04-03 Arvid Nilsson [BlackBerry] Remove defaultViewportArguments check from call site of recomputeVirtualViewportFromViewportArguments https://bugs.webkit.org/show_bug.cgi?id=113872 Reviewed by Carlos Garcia Campos. Carlos pointed out that recomputeVirtualViewportFromViewportArguments already contains the check, and returns an empty IntSize if it fails. So pick up on that to make the code a bit more DRY. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setViewportSize): 2013-04-03 Arvid Nilsson [BlackBerry] Decouple layout viewport from visual viewport https://bugs.webkit.org/show_bug.cgi?id=113829 Reviewed by Carlos Garcia Campos. Setting the visual viewport would force the layout viewport equal to the visual viewport. Decouple the viewports by allowing the user to specify a layout viewport when setting the viewport(s). The layout viewport could be the exact same value passed for visual viewport, if the old behavior is desired. Also reevaluate any viewport arguments when (only) the layout viewport changes in WebPage::setDefaultLayoutSize() since the layout viewport is used as input to the calculation. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setScreenOrientation): (BlackBerry::WebKit::WebPagePrivate::setViewportSize): (BlackBerry::WebKit::WebPage::setViewportSize): (WebKit): (BlackBerry::WebKit::WebPagePrivate::setDefaultLayoutSize): (BlackBerry::WebKit::WebPage::defaultLayoutSize): * Api/WebPage.h: * Api/WebPage_p.h: (WebPagePrivate): 2013-04-02 Maxim Mogilnitsky [BlackBerry] API update for IntRect https://bugs.webkit.org/show_bug.cgi?id=113824 Reviewed by Rob Buis. Modifing IntRect and FloatRect API. * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::regionForTextQuads): 2013-04-02 Nima Ghanavatian [BlackBerry] Create a selection from two points irregardless of the caret position. https://bugs.webkit.org/show_bug.cgi?id=113795 Reviewed by Rob Buis. Internally reviewed by Mike Fenton. PR276577 If we are to set both the base and extent of a selection, we should maintain the base upon setting the extent. This prevents us from overwriting the previous calculation when setting extent. Further, instead of setting and manipulating the selection, simply set up start and end VisiblePositions and create a new directional selection so as to set the base and extent simultaneously. * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::setSelection): 2013-04-01 Konrad Piascik [BlackBerry] Move Path into it's own header https://bugs.webkit.org/show_bug.cgi?id=113724 Reviewed by Rob Buis. * WebKitSupport/DefaultTapHighlight.cpp: 2013-03-29 Charles Wei [BlackBerry] Cleanup the CONTEXT_MENUS in BlackBerry porting https://bugs.webkit.org/show_bug.cgi?id=113562 Reviewed by George Staikos. Internally reviewed by Mike Fenton and Gen Mak. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::init): * WebCoreSupport/ContextMenuClientBlackBerry.cpp: * WebCoreSupport/ContextMenuClientBlackBerry.h: 2013-03-29 Charles Wei [BlackBerry] Context menu doesn't showup anymore after rebase. https://bugs.webkit.org/show_bug.cgi?id=113570 Reviewed by George Staikos. The upstreaming patch for bug: 103058, reverses the return value of Node::dispatchMouseEvent() to be consistent with Node::dispatchEvent(), so we should reverse our logic in webkit part that calls it also. This only applys to master_41 which is a new rebase, don't apply it to master_40. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::webContext): 2013-03-28 Iris Wu [BlackBerry] Don't cross editing boundary when touch hold selection expands https://bugs.webkit.org/show_bug.cgi?id=113537 Reviewed by Rob Buis. Set editing boundary crossing rule to make sure it won't cross editing boundary when selection expands. Reviewed Internally By Genevieve Mak and Mike Fenton. * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::selectNextParagraph): (BlackBerry::WebKit::SelectionHandler::findNextAnimationOverlayRegion): 2013-03-28 Jakob Petsovits [BlackBerry] Don't use WebKit thread scale information in WebPageCompositor. https://bugs.webkit.org/show_bug.cgi?id=113447 Internal PR 313452 Reviewed by Rob Buis. Potential threading problems are avoided by moving from WebPage members and mapToTransformed() to the web page client's userInterfaceViewportAccessor(). As part of this cleaning effort, the WebPageCompositor's render() method is changed to now take document instead of pixel coordinates. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::compositeContents): * Api/WebPageCompositor.cpp: (BlackBerry::WebKit::WebPageCompositorPrivate::render): (BlackBerry::WebKit::WebPageCompositor::render): * Api/WebPageCompositor.h: * Api/WebPageCompositor_p.h: (WebPageCompositorPrivate): 2013-03-28 Matt Falkenhagen Refactoring: Replace Element::disabled and isEnabledFormControl with isDisabledFormControl https://bugs.webkit.org/show_bug.cgi?id=113273 Reviewed by Kent Tamura. Element::disabled is about form controls and Element::isEnabledFormControl is redundant with it, so replace them with a single function Element::isDisabledFormControl. * WebCoreSupport/CredentialTransformData.cpp: (WebCore::CredentialTransformData::findPasswordFormFields): * WebKitSupport/DOMSupport.cpp: (BlackBerry::WebKit::DOMSupport::isTextBasedContentEditableElement): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::openSelectPopup): 2013-03-27 Eli Fidler [BlackBerry] Show compositing on the Inspector timeline properly https://bugs.webkit.org/show_bug.cgi?id=113416 Reviewed by Rob Buis. The call to willComposite was too early and encompased the paint calls as well. Moving it lower will no longer encompass the paints. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded): 2013-03-27 Arvid Nilsson [BlackBerry] Populate the mime type of the WebContext for images https://bugs.webkit.org/show_bug.cgi?id=113272 Reviewed by George Staikos. PR 278967 Populate the mime type using the file extension reported by the image decoder. This way we benefit from file type sniffing, instead of relying on the mime type reported by the resource response. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::webContext): 2013-03-26 Hayato Ito Allow ShadowContents in HitTests by default. https://bugs.webkit.org/show_bug.cgi?id=113171 Reviewed by Dimitri Glazkov. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::hitTestResult): * WebKitSupport/FatFingers.cpp: (BlackBerry::WebKit::FatFingers::getNodesFromRect): * WebKitSupport/ProximityDetector.cpp: (BlackBerry::WebKit::ProximityDetector::findBestPoint): * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::visiblePositionForPointIgnoringClipping): 2013-03-26 Xiaobo Wang [BlackBerry] Memory leak in WebPagePrivate.cpp - NavigatorContentUtilsClientBlackBerry https://bugs.webkit.org/show_bug.cgi?id=112996 Reviewed by Rob Buis. PR 312552 Internally Reviewed by Anthony Scian. NavigatorContentUtilsClientBlackBerry is new'ed in WebPagePrivate::init(), but not deleted anywhere. Fixed by creating an OwnPtr for it. Also fixed some webkit-style errors. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::init): * Api/WebPage_p.h: (WebCore): (WebPagePrivate): 2013-03-26 Mike Lattanzio [BlackBerry] Include accelerated compositing layers in screen captures. https://bugs.webkit.org/show_bug.cgi?id=113335 Reviewed by Rob Buis. PR# 280374 Include accelerated compositing layers in screen captures. Reviewed Internally By: Jakob Petsovits * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::render): (BlackBerry::WebKit::BackingStorePrivate::renderContents): (BlackBerry::WebKit::BackingStore::drawContents): * Api/BackingStore_p.h: 2013-03-26 Tiancheng Jiang [BlackBerry] Set mouse document position for mouse event in updateCursor https://bugs.webkit.org/show_bug.cgi?id=109094 Reviewed by Rob Buis. Internally Reviewed by Jakob Petsovits. Mouse content position should be in document coordinate. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::updateCursor): 2013-03-26 Arvid Nilsson [BlackBerry] Scrolling up and down can cause the screen to flash black https://bugs.webkit.org/show_bug.cgi?id=113269 Reviewed by Rob Buis. PR 296106 Various flaws in the code could conspire to make the screen cleared to black before rendering the web page. This only happened when the BackingStore was inactive, and the LayerTiler takes on the job of drawing the root layer. When tiles are missing, this made the "checkerboard" effect especially noticeable since black color was seen where the tile should have been. It would be better to clear to the web page background color. This was actually the intent of the code, but when the document background color was invalid, we would still use it instead of the background color from settings. Also, the LayerRenderer would clear to black when WebPageCompositorPrivate::drawsRootLayer() was true. Fixed by falling back to the settings background color when the document background color is invalid, and removing the clearing code from the LayerRenderer entirely. The appropriate clear already happens near the beginning of BackingStorePrivate::blitVisibleContents(). Also slightly cleaned up the code for managing the background color. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setLoadState): (BlackBerry::WebKit::WebPagePrivate::didChangeSettings): (BlackBerry::WebKit::WebPagePrivate::updateBackgroundColor): (WebKit): (BlackBerry::WebKit::WebPagePrivate::documentBackgroundColor): * Api/WebPageCompositor.cpp: * Api/WebPageCompositor_p.h: (WebPageCompositorPrivate): * Api/WebPage_p.h: (WebPagePrivate): 2013-03-26 Arvid Nilsson [BlackBerry] WebOverlay::pixelViewportRect() should return pixel viewport coordinates https://bugs.webkit.org/show_bug.cgi?id=113263 Reviewed by Rob Buis. PR 312404 Fixed by returning pixel viewport coordinates instead of window coordinates. * Api/WebOverlay.cpp: (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::pixelViewportRect): 2013-03-26 Xiaobo Wang [BlackBerry] Memory leak in UserMediaClientImpl https://bugs.webkit.org/show_bug.cgi?id=112998 Reviewed by Rob Buis. PR 312559 Internally Reviewed by Anthony Scian. Should destroy itself in UserMediaClientImpl::pageDestroyed(), as other XXClientBlackBerry did, like GeolocationClientBlackBerry::geolocationDestroyed(). * WebCoreSupport/UserMediaClientImpl.cpp: (WebCore::UserMediaClientImpl::pageDestroyed): 2013-03-25 Kent Tamura Rename ENABLE_INPUT_TYPE_DATETIME https://bugs.webkit.org/show_bug.cgi?id=113254 Reviewed by Kentaro Hara. Rename ENABLE_INPUT_TYPE_DATETIME to ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE. Actually I'd like to remove the code, but we shouldn't remove it yet because we shipped products with it on some platforms. * WebCoreSupport/AboutDataEnableFeatures.in: 2013-03-25 Mary Wu [BlackBerry] add needReferer in WebPage load() api https://bugs.webkit.org/show_bug.cgi?id=113167 Reviewed by Rob Buis. PR310175, internally reviewed by Joe Mason. Sometimes when client load request, it need to add referer with current frame like save link/image in option menu, so we add needRef in load() interface in webpage. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::load): (BlackBerry::WebKit::WebPage::load): (BlackBerry::WebKit::WebPage::loadExtended): (BlackBerry::WebKit::WebPage::loadFile): (BlackBerry::WebKit::WebPage::download): * Api/WebPage.h: * Api/WebPage_p.h: (WebPagePrivate): 2013-03-22 Nima Ghanavatian [BlackBerry] Build fix in InputHandler https://bugs.webkit.org/show_bug.cgi?id=113092 Reviewed by Rob Buis. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::setElementUnfocused): 2013-03-22 Nima Ghanavatian Check focused node reference when traversing through history https://bugs.webkit.org/show_bug.cgi?id=113082 Reviewed by Rob Buis. PR312101 Check if we have a valid node and document before attempting to access its frame and frame selection. This is causing issues when going back to a page after a redirect where a stale pointer is used. Further, the focused node should be changed after the frame is fully loaded. * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchDidFinishLoad): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::setElementUnfocused): (BlackBerry::WebKit::InputHandler::restoreViewState): 2013-03-22 Genevieve Mak [BlackBerry] Hit Test doesn't need to be active https://bugs.webkit.org/show_bug.cgi?id=113072 Reviewed by Rob Buis. Reviewed Internally By Mike Lattanzio. PR #306074 * WebKitSupport/ProximityDetector.cpp: (BlackBerry::WebKit::ProximityDetector::findBestPoint): 2013-03-22 Andrew Lo [BlackBerry] Selection overlay clipped incorrectly https://bugs.webkit.org/show_bug.cgi?id=113069 Reviewed by George Staikos. Internally reviewed by Arvid Nilsson. As a follow-up to r146278, the clip rect also needs to be adjusted by the parent's offset when drawing the selection overlay. * WebKitSupport/SelectionOverlay.cpp: (BlackBerry::WebKit::SelectionOverlay::paintContents): 2013-03-22 Carlos Garcia Campos [BlackBerry] Add custom BackForwardList client implementation https://bugs.webkit.org/show_bug.cgi?id=113024 Reviewed by Rob Buis. PR 310030 Internally reviewed by Joe Mason. Adds a new class BackForwardListBlackBerry that implements BackForwardList client and wraps the BackForwardListImpl including the BlackBerry specific changes to notify the API layer when the BackForwardList changes. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::init): Create a BackForwardListBlackBerry. (BlackBerry::WebKit::WebPage::getBackForwardList): Use BackForwardListBlackBerry instead of BackForwardListImpl. (BlackBerry::WebKit::WebPage::clearBackForwardList): Ditto. * WebCoreSupport/BackForwardListBlackBerry.cpp: Added. (WebCore): (WebCore::BackForwardListBlackBerry::BackForwardListBlackBerry): (WebCore::BackForwardListBlackBerry::~BackForwardListBlackBerry): (WebCore::BackForwardListBlackBerry::current): (WebCore::BackForwardListBlackBerry::notifyBackForwardListChanged): (WebCore::BackForwardListBlackBerry::addItem): (WebCore::BackForwardListBlackBerry::goToItem): (WebCore::BackForwardListBlackBerry::itemAtIndex): (WebCore::BackForwardListBlackBerry::backListCount): (WebCore::BackForwardListBlackBerry::forwardListCount): (WebCore::BackForwardListBlackBerry::isActive): (WebCore::BackForwardListBlackBerry::close): (WebCore::BackForwardListBlackBerry::clear): (WebCore::BackForwardListBlackBerry::entries): (WebCore::BackForwardListBlackBerry::currentItem): * WebCoreSupport/BackForwardListBlackBerry.h: Added. (WebKit): (WebCore): (BackForwardListBlackBerry): (WebCore::BackForwardListBlackBerry::create): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: * WebCoreSupport/FrameLoaderClientBlackBerry.h: (FrameLoaderClientBlackBerry): 2013-03-21 Iris Wu [BlackBerry] Last paragraph can't be selected by touch hold selection if there is no new line after it in subframe. https://bugs.webkit.org/show_bug.cgi?id=112966 Reviewed by Rob Buis. PR 312044 Reviewed Internally By Genevieve Mak. If selection reaches the bottom of content, ignore scroll margin so the text on the bottom can be selected. Stop expanding selection only if the end of document is selected or touch is released. * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::expandSelection): (BlackBerry::WebKit::SelectionHandler::ensureSelectedTextVisible): 2013-03-21 Otto Derek Cheung [BlackBerry] addSearchProvider shouldn't match the full host, only the server https://bugs.webkit.org/show_bug.cgi?id=112960 Reviewed by Rob Buis. Internally Reviewed by Jeff Rogers. Remove full host matching. only check if domains are from the same server. Also, check user gesture before dispatching the addSearchProvider event to the browser. * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::addSearchProvider): (WebCore::ChromeClientBlackBerry::isSearchProviderInstalled): * WebCoreSupport/ChromeClientBlackBerry.h: (ChromeClientBlackBerry): * WebCoreSupport/ExternalExtension.cpp: (IsSearchProviderInstalledMethod): 2013-03-19 Andrew Lo [BlackBerry] Selection overlay is sometimes in wrong position. https://bugs.webkit.org/show_bug.cgi?id=112748 Reviewed by Rob Buis. Internally reviewed by Arvid Nilsson. Internal PR 305384. Translate by parent's offset when drawing selection overlay. * WebKitSupport/SelectionOverlay.cpp: (BlackBerry::WebKit::SelectionOverlay::paintContents): 2013-03-19 Iris Wu [BlackBerry] Hook up scroll position to proximity detector https://bugs.webkit.org/show_bug.cgi?id=112743 Reviewed by Rob Buis. PR 243385 Reviewed Internally By Genevieve Mak. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate): (BlackBerry::WebKit::WebPage::adjustDocumentScrollPosition): (WebKit): * Api/WebPage.h: * Api/WebPage_p.h: (WebPagePrivate): 2013-03-19 Chris Hutten-Czapski [BlackBerry] Don't handle keyboard scrolling shortcuts in webkit https://bugs.webkit.org/show_bug.cgi?id=112716 Informally Reviewed by Mike Fenton (mifenton@rim.com) Reviewed by Rob Buis. The comment is right, this isn't the correct place to handle keyboard scrolling shortcuts. That's what we have clients for. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::keyEvent): 2013-03-19 Andy Chen [BlackBerry] When selecting an object, assign focus to new node instead of clearing previous focused node https://bugs.webkit.org/show_bug.cgi?id=112707 Reviewed by Rob Buis. In SelectionHandler, when selecting a new object, we should set focus to the anchor node of selection instead of removing it from the old input. In InputHandler, when focusedNodeChanged is called, if the new node is not an Element node, we need to set focus to its Element parent node, instead of removing focus from the old node. PR 304631 Internally reviewed by Mike Fenton. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::focusedNodeChanged): * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::selectObject): 2013-03-18 Alberto Garcia [BlackBerry] Prevent text selection inside Colour and Date/Time input fields https://bugs.webkit.org/show_bug.cgi?id=111733 Reviewed by Rob Buis. Fix missing brace. * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged): 2013-03-18 Alberto Garcia [BlackBerry] Add Proximity Detector. https://bugs.webkit.org/show_bug.cgi?id=112278 Reviewed by Rob Buis. Fix variable names so they actually match the function declarations. Fix call to rectForPoint(), which was moved from HitTestResult to HitTestLocation in r117091 and r126859. * WebKitSupport/ProximityDetector.cpp: (BlackBerry::WebKit::ProximityDetector::findBestPoint): 2013-03-18 Alberto Garcia [BlackBerry] EditorClientBlackBerry: fix access to WebPage attribute https://bugs.webkit.org/show_bug.cgi?id=112556 Reviewed by Rob Buis. This changed in r145849 and broke the BlackBerry build. * WebCoreSupport/EditorClientBlackBerry.cpp: (WebCore::EditorClientBlackBerry::smartInsertDeleteEnabled): (WebCore::EditorClientBlackBerry::isSelectTrailingWhitespaceEnabled): 2013-03-18 Arvid Nilsson [BlackBerry] Detach overlays from page when compositor is detached https://bugs.webkit.org/show_bug.cgi?id=112424 Reviewed by Rob Buis. PR 309160 If not detached properly, the overlays would have a dangling pointer to the page. * Api/WebOverlay.cpp: (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::WebOverlayLayerCompositingThreadClient): (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded): (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::WebOverlayPrivateCompositingThread): (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::~WebOverlayPrivateCompositingThread): * Api/WebOverlay_p.h: (BlackBerry::WebKit::WebOverlayPrivate::setClient): (WebOverlayLayerCompositingThreadClient): (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::overlay): (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::overlayDestroyed): (WebOverlayPrivateCompositingThread): * Api/WebPageCompositor.cpp: (BlackBerry::WebKit::WebPageCompositorPrivate::detach): (BlackBerry::WebKit::WebPageCompositorPrivate::setPage): (WebKit): (BlackBerry::WebKit::WebPageCompositorPrivate::attachOverlays): * Api/WebPageCompositor_p.h: (BlackBerry::WebKit::WebPageCompositorPrivate::attachOverlays): (BlackBerry::WebKit::WebPageCompositorPrivate::detachOverlays): (WebPageCompositorPrivate): 2013-03-18 Alberto Garcia [BlackBerry] BackingStoreClient: remove unnecessary call to toElement() https://bugs.webkit.org/show_bug.cgi?id=112547 Reviewed by Carlos Garcia Campos. * WebKitSupport/BackingStoreClient.cpp: (BlackBerry::WebKit::BackingStoreClient::absoluteRect): 2013-03-15 Arvid Nilsson [BlackBerry] BlackBerry::Platform::Graphics::GraphicsContext integration related changes in Source/WebKit/blackberry https://bugs.webkit.org/show_bug.cgi?id=112467 Reviewed by Rob Buis. PR 293208 This patch contains contributions from many members of the BlackBerry WebKit team: Mike Lattanzio Arvid Nilsson Jakob Petsovits Konrad Piascik Jeff Rogers Filip Spacek * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::render): (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents): (BlackBerry::WebKit::BackingStorePrivate::compositeContents): (BlackBerry::WebKit::BackingStorePrivate::tileSize): * Api/WebOverlay.cpp: (BlackBerry::WebKit::WebOverlayPrivate::drawContents): (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::paintContents): (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::WebOverlayLayerCompositingThreadClient): (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::setContentsToImage): (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::clearUploadedContents): (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::setContentsToColor): (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded): (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::drawTextures): (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::WebOverlayPrivateCompositingThread): (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::removeFromParent): (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setContentsToImage): * Api/WebOverlay.h: * Api/WebOverlayClient.h: * Api/WebOverlay_p.h: (WebOverlayPrivate): (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::showDebugBorders): (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::showRepaintCounter): (WebOverlayLayerCompositingThreadClient): (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::image): (WebOverlayPrivateCompositingThread): * Api/WebPageCompositor.cpp: (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate): * WebKitSupport/BackingStoreTile.cpp: (BlackBerry::WebKit::TileBuffer::~TileBuffer): (BlackBerry::WebKit::TileBuffer::nativeBuffer): (BlackBerry::WebKit::TileBuffer::paintBackground): * WebKitSupport/DefaultTapHighlight.cpp: (BlackBerry::WebKit::DefaultTapHighlight::paintContents): (BlackBerry::WebKit::DefaultTapHighlight::showDebugBorders): (WebKit): (BlackBerry::WebKit::DefaultTapHighlight::showRepaintCounter): * WebKitSupport/DefaultTapHighlight.h: (DefaultTapHighlight): * WebKitSupport/InspectorOverlayBlackBerry.cpp: (BlackBerry::WebKit::InspectorOverlay::showDebugBorders): (WebKit): (BlackBerry::WebKit::InspectorOverlay::showRepaintCounter): * WebKitSupport/InspectorOverlayBlackBerry.h: (InspectorOverlay): * WebKitSupport/SelectionOverlay.cpp: (BlackBerry::WebKit::SelectionOverlay::draw): (BlackBerry::WebKit::SelectionOverlay::hide): (BlackBerry::WebKit::SelectionOverlay::paintContents): (BlackBerry::WebKit::SelectionOverlay::showDebugBorders): (WebKit): (BlackBerry::WebKit::SelectionOverlay::showRepaintCounter): * WebKitSupport/SelectionOverlay.h: (SelectionOverlay): * WebKitSupport/SurfacePool.cpp: (BlackBerry::WebKit::SurfacePool::createPlatformGraphicsContext): (BlackBerry::WebKit::SurfacePool::destroyPlatformGraphicsContext): (BlackBerry::WebKit::SurfacePool::waitForBuffer): (BlackBerry::WebKit::SurfacePool::notifyBuffersComposited): (BlackBerry::WebKit::SurfacePool::destroyPlatformSync): * WebKitSupport/SurfacePool.h: 2013-03-15 Arvid Nilsson [BlackBerry] Expose the compositing thread layer's draw rectangle to aid hit testing https://bugs.webkit.org/show_bug.cgi?id=112255 Reviewed by Rob Buis. PR 308284. Reviewed internally by Yongxin Dai. The cached draw rectangle is useful for hit testing. Add a getter for this compositing thread layer property to the public WebOverlay API. We name this getter using terminology familiar from the ViewportAccessor interface, to clarify which coordinate system the getter uses (pixel coordinates relative to the viewport). Note that WebKit-thread flavor of WebOverlay is not currently used by any API client and is marked obsolete. It is used internally in WebKit, but for that case using GraphicsLayer directly works well. This will allow the complexity of WebOverlay to be significantly reduced in the future, by removing the WebKit-thread flavor entirely. * Api/WebOverlay.cpp: (BlackBerry::WebKit::WebOverlay::pixelViewportRect): (WebKit): (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::pixelViewportRect): (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::pixelViewportRect): * Api/WebOverlay.h: (WebKit): * Api/WebOverlay_p.h: (WebOverlayPrivate): (WebOverlayPrivateWebKitThread): (WebOverlayPrivateCompositingThread): 2013-03-15 Arvid Nilsson [BlackBerry] Allow an embedder to position child windows using window coordinates https://bugs.webkit.org/show_bug.cgi?id=112236 Reviewed by Rob Buis. PR 232752 Child windows used to always be positioned in document coordinates, which requires the BlackBerry::Platform::Graphics::Window::virtualRect() of the parent window to be kept in sync with the document visible content rect. This is easy if there's a one-to-one correspondence between windows and scrollable frames. However, for an embedder that can display an entire scene graph (where the web page is just one of the nodes) in one window, several scrollable nodes may be present in that window, and it's difficult to know which scrollable node to sync the virtualRect with. It could also lead to conflicts, if two scrollable nodes have child windows. For the latter scenario, it makes more sense to use window coordinates to place child windows. The internal default is to use document coordinates, for legacy reasons. When an external WebPageCompositor is attached, we switch to using window coordinates instead of document coordinates by default. The behavior is still configurable using the new public setChildWindowPlacement method. * Api/WebPageCompositor.cpp: (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate): (BlackBerry::WebKit::WebPageCompositorPrivate::setContext): (BlackBerry::WebKit::WebPageCompositorPrivate::prepareFrame): (BlackBerry::WebKit::WebPageCompositorPrivate::render): (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers): (BlackBerry::WebKit::WebPageCompositorPrivate::shouldClearSurfaceBeforeCompositing): (WebKit): (BlackBerry::WebKit::WebPageCompositorPrivate::shouldChildWindowsUseDocumentCoordinates): (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor): (BlackBerry::WebKit::WebPageCompositor::setChildWindowPlacement): * Api/WebPageCompositor.h: * Api/WebPageCompositor_p.h: (BlackBerry::WebKit::WebPageCompositorPrivate::setChildWindowPlacement): (WebPageCompositorPrivate): 2013-03-15 Nate Chapin Hide MainResourceLoader from the outside world https://bugs.webkit.org/show_bug.cgi?id=109971 Reviewed by Adam Barth. * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::convertMainResourceLoadToDownload): * WebCoreSupport/FrameLoaderClientBlackBerry.h: (FrameLoaderClientBlackBerry): 2013-03-15 Abhishek Arya Replace static_casts with to* helper functions. https://bugs.webkit.org/show_bug.cgi?id=112401 Reviewed by Stephen Chenney. to* helper functions are preferred over static_cast calls since they help to catch bad casts easily on the testing infrastructure. * Api/WebPage.cpp: (BlackBerry::WebKit::frameForNode): (BlackBerry::WebKit::needsLayoutRecursive): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::redirectDataToPlugin): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::ensureFocusPluginElementVisible): 2013-03-14 Manuel Rego Casasnovas Add selectTrailingWhitespaceEnabled setting to WebCore::Page https://bugs.webkit.org/show_bug.cgi?id=109404 Reviewed by Tony Chang. Use new settings for smartInsertDeleteEnabled and selectTrailingWhitespaceEnabled. Remove code related to DRT as it is not needed anymore. * Api/DumpRenderTreeClient.h: * WebCoreSupport/EditorClientBlackBerry.cpp: (WebCore::EditorClientBlackBerry::smartInsertDeleteEnabled): (WebCore::EditorClientBlackBerry::isSelectTrailingWhitespaceEnabled): 2013-03-14 Abhishek Arya Replace static_casts with to* helper functions. https://bugs.webkit.org/show_bug.cgi?id=112296 Reviewed by Kentaro Hara. to* helper functions are preferred over static_cast calls since they help to catch bad casts easily on the testing infrastructure. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::webContext): (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent): (BlackBerry::WebKit::WebPage::setNodeFocus): (BlackBerry::WebKit::WebPagePrivate::adjustFullScreenElementDimensionsIfNeeded): * WebCoreSupport/EditorClientBlackBerry.cpp: (WebCore::EditorClientBlackBerry::shouldSpellCheckFocusedField): (WebCore::EditorClientBlackBerry::shouldChangeSelectedRange): * WebKitSupport/BackingStoreClient.cpp: (BlackBerry::WebKit::BackingStoreClient::absoluteRect): * WebKitSupport/DOMSupport.cpp: (BlackBerry::WebKit::DOMSupport::toTextControlElement): (BlackBerry::WebKit::DOMSupport::selectionContainerElement): * WebKitSupport/FatFingers.cpp: (BlackBerry::WebKit::FatFingers::getRelevantInfoFromCachedHitTest): (BlackBerry::WebKit::FatFingers::setSuccessfulFatFingersResult): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::focusedNodeChanged): (BlackBerry::WebKit::InputHandler::willOpenPopupForNode): * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::inputNodeOverridesTouch): * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::elementForTapHighlight): 2013-03-14 Alberto Garcia [BlackBerry] InRegionScrollableArea: fix call to visibleContentRect() https://bugs.webkit.org/show_bug.cgi?id=112244 Reviewed by Rob Buis. Since r143295 visibleContentRect() receives an enum, not a boolean. * WebKitSupport/InRegionScrollableArea.cpp: (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea): 2013-03-13 Iris Wu [BlackBerry] Do not do scroll position adjustment if selecting in a subframe https://bugs.webkit.org/show_bug.cgi?id=112290 Reviewed by Rob Buis. PR 267394 In SelectionHandler::ensureSelectedTextVisible(), scroll position animation is based on main frame. If selecting in a subframe, don't do animation. Internally Reviewed By Genevieve Mak. * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::ensureSelectedTextVisible): 2013-03-13 Genevieve Mak [BlackBerry] Add Proximity Detector. https://bugs.webkit.org/show_bug.cgi?id=112278 Reviewed by Rob Buis. Internally Reviewed by Mike Lattanzio. PR #243385 * WebKitSupport/ProximityDetector.cpp: Added. (WebKit): (BlackBerry::WebKit::getPriorityLevel): (BlackBerry::WebKit::ProximityDetector::ProximityDetector): (BlackBerry::WebKit::ProximityDetector::~ProximityDetector): (BlackBerry::WebKit::ProximityDetector::findBestPoint): * WebKitSupport/ProximityDetector.h: Added. (WebCore): (WebKit): (ProximityDetector): 2013-03-13 Iris Wu [BlackBerry] Touch Hold selection does not scroll text area or other subframe until selection reaches bottom of the page. https://bugs.webkit.org/show_bug.cgi?id=112259 Reviewed by Rob Buis. PR 267394 While selecting in a subframe, check that the selection reaches the bottom of the current subframe instead of the page. Internally Reviewed by Genevieve Mak. * Api/InRegionScroller.cpp: (BlackBerry::WebKit::InRegionScrollerPrivate::updateSelectionScrollView): * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::selectAtPoint): (BlackBerry::WebKit::SelectionHandler::ensureSelectedTextVisible): (BlackBerry::WebKit::SelectionHandler::selectionViewportRect): (WebKit): (BlackBerry::WebKit::SelectionHandler::expandSelectionToGranularity): * WebKitSupport/SelectionHandler.h: (BlackBerry::WebKit::SelectionHandler::setSelectionViewportRect): (SelectionHandler): 2013-03-12 Mike Fenton [BlackBerry] Prevent text selection inside Colour and Date/Time input fields https://bugs.webkit.org/show_bug.cgi?id=111733 Reviewed by Rob Buis. PR 305194. Skip rendering of selection if it is in a popup driven input field. This covers situations where EditorClientBlackBerry::shouldChangeSelectedRange is either not called or focus is not complete when called. Informally reviewed by Gen Mak. * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged): (WebKit): 2013-03-12 Genevieve Mak [BlackBerry] Notify client if the selection is in a subframe when started. https://bugs.webkit.org/show_bug.cgi?id=112065 Reviewed by Rob Buis. PR #278490 Internally Reviewed by Mike Fenton. * Api/InRegionScroller.cpp: (BlackBerry::WebKit::InRegionScrollerPrivate::updateSelectionScrollView): (WebKit): * Api/InRegionScroller_p.h: (InRegionScrollerPrivate): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::updateSelectionScrollView): (WebKit): * Api/WebPageClient.h: * Api/WebPage_p.h: (WebPagePrivate): * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::cancelSelection): (BlackBerry::WebKit::SelectionHandler::setSelection): 2013-03-12 Alberto Garcia [BlackBerry] SelectionHandler: fix truncated line https://bugs.webkit.org/show_bug.cgi?id=112133 Reviewed by Carlos Garcia Campos. One of the calls to fatFingersResult.nodeAsElementIfApplicable() was somehow truncated when the selection start animation was upstreamed in r144640. * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::selectAtPoint): 2013-03-12 Alberto Garcia [BlackBerry] Fix visible_units.h includes https://bugs.webkit.org/show_bug.cgi?id=112131 Reviewed by Carlos Garcia Campos. This file was renamed to VisibleUnits.h in r144911. * WebKitSupport/DOMSupport.cpp: * WebKitSupport/InputHandler.cpp: * WebKitSupport/SelectionHandler.cpp: * WebKitSupport/SpellingHandler.cpp: 2013-03-11 Jochen Eisinger Rename DefinitelyProcessingUserGesture to DefinitelyProcessingNewUserGesture https://bugs.webkit.org/show_bug.cgi?id=111959 Reviewed by Alexey Proskuryakov. * WebKitSupport/NotificationManager.cpp: (BlackBerry::WebKit::NotificationManager::notificationClicked): 2013-03-11 Genevieve Mak [BlackBerry] Add a method to find the ScrollView for a text selection. https://bugs.webkit.org/show_bug.cgi?id=112061 Reviewed by Rob Buis. Internally reviewed by Mike Fenton and Jakob Petsovits. PR #278490 Refactor the code in InRegionScroller so that we can add a method to find the InRegionScrollableArea for a text selection. * Api/InRegionScroller.cpp: (BlackBerry::WebKit::InRegionScrollerPrivate::clipToRect): - Pull out recursive clipping code into its own function. (WebKit): (BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint): (BlackBerry::WebKit::InRegionScrollerPrivate::firstScrollableInRegionForNode): - This new method allows us to get just the first scrollable region instead of looking for more nested ones. We may want to refactor in the future because some of the code is very similar to calculateInRegionScrollableAreasForPoint. (BlackBerry::WebKit::InRegionScrollerPrivate::clipAndCreateInRegionScrollableArea): - Add a convenience method for the previous function * Api/InRegionScroller.h: (WebKit): * Api/InRegionScroller_p.h: (InRegionScrollerPrivate): 2013-03-11 Genevieve Mak [BlackBerry] Set the documentViewportRect and viewport size. https://bugs.webkit.org/show_bug.cgi?id=112056 Reviewed by Rob Buis. Internally reviewed by Mike Fenton and Jakob Petsovits. PR #278490 * WebKitSupport/InRegionScrollableArea.cpp: (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea): 2013-03-11 Alberto Garcia [BlackBerry] SelectionHandler: bring back m_lastSelection attribute https://bugs.webkit.org/show_bug.cgi?id=111972 Reviewed by Rob Buis. This was removed in r144515 but is still needed by SelectionHandler::selectionPositionChanged(). * WebKitSupport/SelectionHandler.h: (SelectionHandler): 2013-03-07 Otto Derek Cheung [BlackBerry] RefCounting ParsedCookie to avoid SegFaults https://bugs.webkit.org/show_bug.cgi?id=111761 Reviewed by Rob Buis. Making necessary changes to ref-count the ParsedCookie object. * Api/WebCookieJar.cpp: (BlackBerry::WebKit::WebCookieJar::cookies): 2013-03-07 Mike Fenton [BlackBerry] Prevent text selection inside Colour and Date/Time input fields https://bugs.webkit.org/show_bug.cgi?id=111733 Reviewed by Rob Buis. PR 305194. Prevent selection for popup input fields as they are buttons. Informally Reviewed Gen Mak. * WebCoreSupport/EditorClientBlackBerry.cpp: (WebCore::EditorClientBlackBerry::shouldChangeSelectedRange): 2013-03-06 Nima Ghanavatian [BlackBerry] Selection handles don't drag to expand correctly for RTL languages https://bugs.webkit.org/show_bug.cgi?id=111618 Reviewed by Rob Buis. PR 303712 If we are using a RTL language, we should ensure that the selection handles are angled the right way. Further, when expanding the selection, the start and end handles should be appropriately set so that expansion in the natural direction is possible. Internally reviewed by Mike Fenton. * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::SelectionHandler): (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged): * WebKitSupport/SelectionHandler.h: (SelectionHandler): 2013-03-06 Carlos Garcia Campos [BlackBerry] Use the new authenticationChallenge API in WebPage https://bugs.webkit.org/show_bug.cgi?id=111542 Reviewed by Rob Buis. Use the new API that expects requestURL and isProxy parameters. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge): * Api/WebPageClient.h: 2013-03-05 Geoffrey Garen Removed some dead code in the page cache https://bugs.webkit.org/show_bug.cgi?id=111525 Reviewed by Alexey Proskuryakov. Page cache autorelease doesn't exist anymore, so there's no need to keep around these olds hacks. * Api/BlackBerryGlobal.cpp: (BlackBerry::WebKit::clearMemoryCaches): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::destroy): 2013-03-06 Carlos Garcia Campos [BlackBerry] Use CachedResource::resourceBuffer() instead of CachedResource::data() https://bugs.webkit.org/show_bug.cgi?id=111555 Reviewed by Rob Buis. CachedResource::data() was renamed to CachedResource::resourceBuffer() in r130947. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::webContext): 2013-03-06 Carlos Garcia Campos [BlackBerry] Remove some unneeded header includes https://bugs.webkit.org/show_bug.cgi?id=111545 Reviewed by Rob Buis. * WebCoreSupport/CredentialTransformData.cpp: * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: 2013-03-06 Carlos Garcia Campos [BlackBerry] Use hasTagName instead of hasLocalName in CredentialTransformData https://bugs.webkit.org/show_bug.cgi?id=111544 Reviewed by Rob Buis. hasLocalName() expects an AtomicString, but we are passing a HTMLName which is a QualifiedName. * WebCoreSupport/CredentialTransformData.cpp: (WebCore::CredentialTransformData::findPasswordFormFields): Use hasTagName() instead of hasLocalName(). 2013-03-05 Otto Derek Cheung [BlackBerry] Authentication credentials lost when opening a new tab https://bugs.webkit.org/show_bug.cgi?id=111445 PR 286627 Reviewed by Rob Buis. Internally Reviewed by Lianghui Chen. Prevent changing the private mode boolean value in didChangeSettings if the value hasn't changed. Setting the private mode value of credentialstorage every time didChangeSettings gets called causes the session credential mapping to be cleared on every tab change in non-private mode. Tested changing tabs after logging into a site using the HTTP Basic Auth protocol to see if the credentials are cleared. Also ensured the functionality of private mode is not changed. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::didChangeSettings): 2013-03-05 Tiancheng Jiang [BlackBerry] FatFinger pairs the wrong element with fatfinger rect part. https://bugs.webkit.org/show_bug.cgi?id=111444 Reviewed by Rob Buis. Internal PR 266214 Internally reviewed by Genevieve Mak. Instead of subtracting with the element region, we should get the remaining rect by find the intersect region of element region and fatfinger detection region. * WebKitSupport/FatFingers.cpp: (BlackBerry::WebKit::FatFingers::checkForClickableElement): 2013-03-05 Andrew Lo [BlackBerry] Clean up animated scroll/zoom code in WebPagePrivate https://bugs.webkit.org/show_bug.cgi?id=111373 Reviewed by Rob Buis. Internally reviewed by Jakob Petsovits. Internal PR 285468. Have WebPageClient pass the final scale and position to WebPage when a zoom/scroll animation finishes, rather than keeping those values as instance variables in WebPagePrivate. Rename some functions & variables to reflect that they are used for both block zoom and generic zoom/scroll animations. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::zoomAnimationFinished): (BlackBerry::WebKit::WebPage::zoomAnimationFinished): (BlackBerry::WebKit::WebPagePrivate::resetBlockZoom): (BlackBerry::WebKit::WebPage::blockZoom): (BlackBerry::WebKit::WebPagePrivate::animateToScaleAndDocumentScrollPosition): * Api/WebPage.h: * Api/WebPageClient.h: * Api/WebPage_p.h: (WebPagePrivate): 2013-03-04 Iris Wu [BlackBerry] Upstream selection start animation. https://bugs.webkit.org/show_bug.cgi?id=111335 Reviewed by Rob Buis. PR 219960 To indicate selection starts, we draw an overlay rect larger than the selected word at the start of selection. Then shrink it down to the actual size. Reviewed Internally by Genevieve Mak and Andrew Lo and Mike Fenton. * Api/WebAnimation.cpp: (BlackBerry::WebKit::WebAnimation::shrinkAnimation): (WebKit): * Api/WebAnimation.h: * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::init): (BlackBerry::WebKit::WebPage::selectionHighlight): (WebKit): * Api/WebPage.h: * Api/WebPage_p.h: (WebPagePrivate): * Api/WebTapHighlight.h: * WebKitSupport/DefaultTapHighlight.cpp: (WebKit): (BlackBerry::WebKit::shrinkAnimationName): (BlackBerry::WebKit::DefaultTapHighlight::draw): * WebKitSupport/DefaultTapHighlight.h: (DefaultTapHighlight): * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::cancelSelection): (BlackBerry::WebKit::textGranularityFromSelectionExpansionType): (WebKit): (BlackBerry::WebKit::SelectionHandler::selectNodeIfFatFingersResultIsLink): (BlackBerry::WebKit::SelectionHandler::selectAtPoint): * WebKitSupport/SelectionHandler.h: (SelectionHandler): * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint): 2013-03-02 Benjamin Poulain Move computedStyleIncludingVisitedInfo from TestRunner to Internals https://bugs.webkit.org/show_bug.cgi?id=109772 Reviewed by Andreas Kling. * WebKitSupport/DumpRenderTreeSupport.cpp: * WebKitSupport/DumpRenderTreeSupport.h: (DumpRenderTreeSupport): 2013-03-01 Iris Wu [BlackBerry] Upstream smart selection https://bugs.webkit.org/show_bug.cgi?id=111226 Reviewed by Rob Buis. 1. Extend the touch hold text selection to next paragraph. 2. Draw and expand overlay over text as touch hold selection expands. Select paragraph when it's entirely covered by overlay. 3. Start scrolling at a constant rate when the end of next pargraph is not in the viewport. Reviewed Internally By Genevieve Mak and Mike Fenton. PR 217897 238485 258279 279042 299779 * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::selectAtDocumentPoint): (BlackBerry::WebKit::WebPage::expandSelection): (WebKit): (BlackBerry::WebKit::WebPage::setOverlayExpansionPixelHeight): (BlackBerry::WebKit::WebPagePrivate::setOverlayExpansionPixelHeight): (BlackBerry::WebKit::WebPage::setParagraphExpansionPixelScrollMargin): * Api/WebPage.h: * Api/WebPageClient.h: * Api/WebPage_p.h: (WebPagePrivate): * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::cancelSelection): (BlackBerry::WebKit::SelectionHandler::selectAtPoint): (BlackBerry::WebKit::isInvalidLine): (WebKit): (BlackBerry::WebKit::isInvalidParagraph): (BlackBerry::WebKit::SelectionHandler::selectNextParagraph): (BlackBerry::WebKit::SelectionHandler::drawOverlay): (BlackBerry::WebKit::SelectionHandler::findNextOverlayRegion): (BlackBerry::WebKit::SelectionHandler::expandSelection): (BlackBerry::WebKit::SelectionHandler::ensureSelectedTextVisible): (BlackBerry::WebKit::SelectionHandler::setParagraphExpansionScrollMargin): (BlackBerry::WebKit::SelectionHandler::expandSelectionToGranularity): * WebKitSupport/SelectionHandler.h: (SelectionHandler): (BlackBerry::WebKit::SelectionHandler::setOverlayExpansionHeight): 2013-03-01 Jacky Jiang [BlackBerry] Screen went black while navigating back/forward on the reddit.com page https://bugs.webkit.org/show_bug.cgi?id=111192 Reviewed by Rob Buis. Internally reviewed by Jakob Petsovits. PR: 299783 When going back to the previous reddit.com page, the actual contents size was much less than the history contents size. However, we expanded the actual contents size to history contents size which caused a huge black area below the actual contents. To fix that, don't restore the contents size from history contents size and scroll back to the valid contents area if we are about to overscroll. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::restoreHistoryViewState): * Api/WebPage_p.h: (WebPagePrivate): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::restoreViewState): 2013-03-01 Mike Fenton [BlackBerry] Improve input bounds clipping for search fields. https://bugs.webkit.org/show_bug.cgi?id=111204 Reviewed by Rob Buis. PR 292673. Use the standardized InputHandler function to get the bounds of an input field so that search fields are truncated smaller to account for the X. Reviewed Internally by Gen Mak. * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::setCaretPosition): 2013-03-01 Nima Ghanavatian [BlackBerry] Reverse the base and extent of a selection when reversing its handles https://bugs.webkit.org/show_bug.cgi?id=111098 Reviewed by Yong Li. PR283969 Swap the base and extent if base does not come first, and set the new selection. Internally reviewed by Mike Fenton * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::setSelection): 2013-03-01 Alberto Garcia Fix definition of DatePickerClient::setValue() https://bugs.webkit.org/show_bug.cgi?id=110336 Reviewed by Carlos Garcia Campos. The definition of DatePickerClient::setValue() introduced in r142987 does not match the prototype. * WebCoreSupport/DatePickerClient.cpp: (WebCore::DatePickerClient::setValue): 2013-02-28 Mike Fenton [BlackBerry] Maintain the directionality of the selection after modifying the selection using key events. https://bugs.webkit.org/show_bug.cgi?id=111078 Reviewed by Yong Li. PR 295224. When using the key navigation to modify the selection, reset the directionality of the selection to the original to prevent changing the anchor. Reviewed Internally by Nima Ghanavatian. * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection): 2013-02-28 Lianghui Chen [BlackBerry] Disable auto-filling password in forms when auto-form-filling is not enabled. https://bugs.webkit.org/show_bug.cgi?id=111006 Internal PR: 295181 Internal reviewed by Joe Mason. Reviewed by Yong Li. Check WebSettings::isFormAutofillEnabled() before doing user credential form fill stuff. * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchDidFinishLoad): (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendSubmitEvent): 2013-02-28 Alberto Garcia [BlackBerry] Misc build fixes https://bugs.webkit.org/show_bug.cgi?id=110448 Reviewed by Rob Buis. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::executeJavaScript): WebString was replaced with BlackBerry::Platform::String in r131316. (BlackBerry::WebKit::WebPagePrivate::didChangeSettings): Some webdatabase APIs are encapuslated in DatabaseManager since r137520. (BlackBerry::WebKit::WebPagePrivate::postponeDocumentStyleRecalc): Document::isPendingStyleRecalc() was renamed to hasPendingStyleRecalc() in r129844. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::updateFormState): Add closing brace that was missing in r142482. 2013-02-28 Xan Lopez [BlackBerry] DumpRenderTreeSupport: update the set position methods https://bugs.webkit.org/show_bug.cgi?id=110578 Reviewed by Rob Buis. TestRunner::setMockGeolocationPosition() changed in r130416: http://trac.webkit.org/changeset/130416/trunk/Tools/DumpRenderTree/TestRunner.h * WebKitSupport/DumpRenderTreeSupport.cpp: (DumpRenderTreeSupport::setMockGeolocationPosition): * WebKitSupport/DumpRenderTreeSupport.h: (DumpRenderTreeSupport): 2013-02-27 Andrew Lo [BlackBerry] Need WebPage API for animating scroll position & zoom changes https://bugs.webkit.org/show_bug.cgi?id=110912 Reviewed by Rob Buis. Internally reviewed by Jakob Petsovits. Internal PR 285468. Add an API to WebPage for animated scroll position & zoom level adjustments. Have InputHandler use the new API. Rename some variables to reflect the fact that they are not only used by block zoom now. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::zoomBlock): (BlackBerry::WebKit::WebPage::blockZoom): (BlackBerry::WebKit::WebPagePrivate::animateToScaleAndDocumentScrollPosition): (WebKit): (BlackBerry::WebKit::WebPage::animateToScaleAndDocumentScrollPosition): * Api/WebPage.h: * Api/WebPage_p.h: (WebPagePrivate): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible): 2013-02-27 Lianghui Chen [BlackBerry] User credentials is not correctly handled https://bugs.webkit.org/show_bug.cgi?id=110994 Reviewed by Yong Li. Following change are made: Remove url from CredentialTransformData, as url is not used anymore. Adapt to updated CredentialBackingStore API about removing url. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge): * WebCoreSupport/CredentialManager.cpp: (WebCore::CredentialManager::autofillPasswordForms): (WebCore::CredentialManager::saveCredentialIfConfirmed): * WebCoreSupport/CredentialTransformData.cpp: (WebCore::CredentialTransformData::CredentialTransformData): * WebCoreSupport/CredentialTransformData.h: (CredentialTransformData): 2013-02-27 John Griggs 2013-02-27 John Griggs Fix bug in HTML5 Fullscreen API implementation that was preventing YouTube HTML5 media controls fullscreen button from working properly. https://bugs.webkit.org/show_bug.cgi?id=110905 Reviewed by Yong Li. Return true from ChromeClientBlackBerry::supportsFullScreenForElement instead of the negation of the boolean flag (withKeyboard) passed in. * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::supportsFullScreenForElement): 2013-02-27 Sean Wang [BlackBerry] Context menu cannot be invoked after doing text selection in landscape mode https://bugs.webkit.org/show_bug.cgi?id=110860 Reviewed by Yong Li. PR 290248 Internally reviewed by Mike Fenton Add a parameter to notify the webpage client which parts of selection have changed in visual or in its selected DOM content. Refactor the selection details parameter to platform repo. The reason of this issue is that when javascript triggers webpage layout, the selection will update its apperance event when the selected content is not changed. We want to hide the context menu only when the selected content is changed not when only its visual is changed. * Api/WebPageClient.h: (Platform): * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::cancelSelection): (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged): * WebKitSupport/SelectionHandler.h: (SelectionHandler): 2013-02-27 Sean Wang [BlackBerry] The virtual keyboard hides part of Signing In dialog https://bugs.webkit.org/show_bug.cgi?id=110836 Reviewed by Yong Li. PR # 283427 Internally reviewed by Mike Fenton. Store form credentials before javascript "onSubmit" event and notify webpage client to save credentials after that event since javascript may check credentials and stop the submission in its event handler. * WebCoreSupport/CredentialTransformData.cpp: (WebCore::CredentialTransformData::CredentialTransformData): (WebCore): * WebCoreSupport/CredentialTransformData.h: (CredentialTransformData): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchWillSubmitForm): (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendSubmitEvent): * WebCoreSupport/FrameLoaderClientBlackBerry.h: (FrameLoaderClientBlackBerry): 2013-02-27 Mike Fenton [BlackBerry] Accept key events even when composing region is active. https://bugs.webkit.org/show_bug.cgi?id=110617 Reviewed by Rob Buis. PR 293598. Fix a regression in the previous patch caused by an unhandled Alt key down being sent through by IMF. Reviewed Internally by Nima Ghanavatian. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::updateFormState): * WebKitSupport/InputHandler.h: (InputHandler): 2013-02-26 Yong Li [BlackBerry] Use APIEntryShim when making JS call https://bugs.webkit.org/show_bug.cgi?id=110787 Reviewed by Rob Buis. PR# 301451. Use APIEntryShim to fix an assert and ensure it is thread-safe. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::executeJavaScriptFunction): 2013-02-26 Alberto Garcia [BlackBerry] Upstream the datalist support UI https://bugs.webkit.org/show_bug.cgi?id=110736 Reviewed by Rob Buis. Original code by Otto Derek Cheung * WebCoreSupport/SuggestionBoxElement.cpp: Added. (WebCore): (WebCore::SuggestionBoxElement::SuggestionBoxElement): (WebCore::SuggestionBoxElement::~SuggestionBoxElement): (WebCore::SuggestionBoxElement::create): (WebCore::SuggestionBoxElement::defaultEventHandler): * WebCoreSupport/SuggestionBoxElement.h: Added. (WebCore): (SuggestionBoxElement): * WebCoreSupport/SuggestionBoxHandler.cpp: Added. (WebCore): (WebCore::SuggestionBoxHandler::SuggestionBoxHandler): (WebCore::SuggestionBoxHandler::~SuggestionBoxHandler): (WebCore::SuggestionBoxHandler::create): (WebCore::SuggestionBoxHandler::setInputElementAndUpdateDisplay): (WebCore::SuggestionBoxHandler::showDropdownBox): (WebCore::SuggestionBoxHandler::hideDropdownBox): (WebCore::SuggestionBoxHandler::changeInputElementInnerTextValue): (WebCore::SuggestionBoxHandler::parseSuggestions): (WebCore::SuggestionBoxHandler::insertSuggestionsToDropdownBox): (WebCore::adjustDropdownBoxPosition): (WebCore::SuggestionBoxHandler::buildDropdownBoxTree): * WebCoreSupport/SuggestionBoxHandler.h: Added. (WebCore): (SuggestionBoxHandler): (WebCore::SuggestionBoxHandler::focusedElement): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::setElementUnfocused): (BlackBerry::WebKit::InputHandler::updateFormState): * WebKitSupport/InputHandler.h: (WebCore): (InputHandler): * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint): 2013-02-25 Yongxin Dai [BlackBerry] Add isInputMode() method to WebPage class. https://bugs.webkit.org/show_bug.cgi?id=110754 Reviewed by Rob Buis. PR #262569. There is a case we need to know if the active node is content editable from TouchHandlerWebKitThread class. WebPage::isInputMode() just delegates InputHandler::isInputMode(). Reviewed Internally by Mike Fenton. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::isInputMode): (WebKit): * Api/WebPage.h: 2013-02-25 Mike Fenton [BlackBerry] Force form submission when implicit submission fails. https://bugs.webkit.org/show_bug.cgi?id=110627 Reviewed by Rob Buis. PR 286023. When implicit form submission does not submit the form do a direct submission of the form. Reviewed Internally by Nima Ghanavatian. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::updateFormState): 2013-02-25 Tiancheng Jiang [BlackBerry]Adjust fatfinger detection rect size. https://bugs.webkit.org/show_bug.cgi?id=108678 Reviewed by Rob Buis. Fix a typo in function names. * WebKitSupport/FatFingers.cpp: (BlackBerry::WebKit::FatFingers::getNodesFromRect): 2013-02-25 Alberto Garcia [BlackBerry] ChromeClientBlackBerry: fix variable names https://bugs.webkit.org/show_bug.cgi?id=110562 Reviewed by Rob Buis. manager was incorrectly renamed back to tracker in r138696: http://trac.webkit.org/changeset/138696/trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::exceededDatabaseQuota): 2013-02-24 Alberto Garcia [BlackBerry] GeolocationClientBlackBerry: add missing headers https://bugs.webkit.org/show_bug.cgi?id=110563 Reviewed by Benjamin Poulain. Frame.h and SecurityOrigin.h are necessary since r136969. GeolocationPosition.h since r132360. * WebCoreSupport/GeolocationClientBlackBerry.cpp: 2013-02-24 Alberto Garcia [BlackBerry] FatFingers: move rectForPoint() from HitTestResult to HitTestLocation https://bugs.webkit.org/show_bug.cgi?id=110570 Reviewed by Allan Sandfeld Jensen. HitTestResult is no longer a HitTestLocation: http://trac.webkit.org/changeset/135710/trunk/Source/WebCore/rendering/HitTestResult.h * WebKitSupport/FatFingers.cpp: (BlackBerry::WebKit::FatFingers::fingerRectForPoint): 2013-02-22 Mike Fenton [BlackBerry] Eliminate invalid clipping for content editable selections https://bugs.webkit.org/show_bug.cgi?id=110630 Reviewed by Rob Buis. PR 284629. Remove selection clipping for content editable fields as the bounds aren't valid and cause clipping based on starting node rather than the union of nodes. Reviewed Internally by Nima Ghanavatian. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::updateFormState): * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::clippingRectForVisibleContent): 2013-02-22 Tiancheng Jiang [BlackBerry]Adjust fatfinger detection rect size https://bugs.webkit.org/show_bug.cgi?id=108678. Reviewed by Antonio Gomes. Changing HitTestRequest::IgnoreClipping does not solve the problem that FatFinger rect detect the element out of the viewport. We have to clip the fatfinger rect according to the current viewport size to avoid picking the element out of the viewport. * WebKitSupport/FatFingers.cpp: (BlackBerry::WebKit::FatFingers::fingerRectForPoint): (BlackBerry::WebKit::FatFingers::findBestPoint): (BlackBerry::WebKit::FatFingers::getAdjustedPaddings): (BlackBerry::WebKit::FatFingers::getNodesFromRect): * WebKitSupport/FatFingers.h: 2013-02-22 Mike Fenton [BlackBerry] Accept key events even when composing region is active. https://bugs.webkit.org/show_bug.cgi?id=110617 Reviewed by Rob Buis. PR 293598. Don't reject key events that arrive when composing region is active, this can prevent navigation events from firing, instead end the composition and process the key. Reviewed Internally by Nima Ghanavatian. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::updateFormState): 2013-02-22 Carlos Garcia Campos [BlackBerry] Rename first/second to key/value in HashMap iterators https://bugs.webkit.org/show_bug.cgi?id=110577 Reviewed by Rob Buis. Iterators were renamed to key/value in r130612. * WebKitSupport/NotificationManager.cpp: (BlackBerry::WebKit::NotificationManager::show): (BlackBerry::WebKit::NotificationManager::clearNotifications): (BlackBerry::WebKit::NotificationManager::removeNotificationFromContextMap): 2013-02-22 Carlos Garcia Campos [BlackBerry] Remove ProtocolHandler methods from ChromeClientBlackBerry https://bugs.webkit.org/show_bug.cgi?id=110567 Reviewed by Rob Buis. They were removed from ChromeClient in r122810 and are now implemented in NavigatorContentUtilsClientBlackBerry since r131056. * WebCoreSupport/ChromeClientBlackBerry.cpp: * WebCoreSupport/ChromeClientBlackBerry.h: (ChromeClientBlackBerry): 2013-02-22 Xan Lopez [BlackBerry] DomSupport: use NodeTraversal APIs https://bugs.webkit.org/show_bug.cgi?id=110467 Reviewed by Antonio Gomes. * WebKitSupport/DOMSupport.cpp: (BlackBerry::WebKit::DOMSupport::visibleTextQuads): 2013-02-21 Grzegorz Czajkowski Allow to retrieve the request data from abstract TextCheckingRequest to be accessible for WK2 https://bugs.webkit.org/show_bug.cgi?id=110208 Reviewed by Hajime Morrita. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::requestCheckingOfString): Extract the request data as it is the member of 'TextCheckingRequest'. 2013-02-21 Andrew Lo [BlackBerry] WebPagePrivate::load should not check new window policy https://bugs.webkit.org/show_bug.cgi?id=110403 Reviewed by Rob Buis. Based on my understanding of changeset 135952, we should not check the new window policy in WebPagePrivate::load. None of the other ports seem to do this, except for plugins. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::load): 2013-02-21 Alberto Garcia [BlackBerry] BackingStore: replace instrument{Begin,Cancel}Frame with did{Begin,Cancel}Frame https://bugs.webkit.org/show_bug.cgi?id=110460 Reviewed by Rob Buis. This was renamed incorrectly in r142879. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::instrumentBeginFrame): (BlackBerry::WebKit::BackingStorePrivate::instrumentCancelFrame): 2013-02-21 Carlos Garcia Campos [BlackBerry] Extra ResourceRequest parameter in FrameLoaderClientBlackBerry::convertMainResourceLoadToDownload https://bugs.webkit.org/show_bug.cgi?id=110451 Reviewed by Rob Buis. Remove the extra ResourceRequest parameter from FrameLoaderClientBlackBerry::convertMainResourceLoadToDownload. * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::convertMainResourceLoadToDownload): * WebCoreSupport/FrameLoaderClientBlackBerry.h: (FrameLoaderClientBlackBerry): 2013-02-21 Xan Lopez [BlackBerry] Adapt to name changes in WebCore::ViewPortArguments https://bugs.webkit.org/show_bug.cgi?id=110469 Reviewed by Rob Buis. This changed in r134765. * Api/WebViewportArguments.cpp: (BlackBerry::WebKit::WebViewportArguments::zoom): (BlackBerry::WebKit::WebViewportArguments::setZoom): (BlackBerry::WebKit::WebViewportArguments::minZoom): (BlackBerry::WebKit::WebViewportArguments::setMinZoom): (BlackBerry::WebKit::WebViewportArguments::maxZoom): (BlackBerry::WebKit::WebViewportArguments::setMaxZoom): (BlackBerry::WebKit::WebViewportArguments::userZoom): (BlackBerry::WebKit::WebViewportArguments::setUserZoom): * Api/WebViewportArguments.h: * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::didSetSVGZoomAndPan): 2013-02-21 Jakob Petsovits [BlackBerry] Move posting and scrollbar updates to the page client. https://bugs.webkit.org/show_bug.cgi?id=110256 Internal PR 297099 Reviewed by Rob Buis. In blitVisibleContents(), we were calling the WebKit thread functions BackingStorePrivate::isScrollingOrZooming() and WebPage::isVisible(). This is not the right spot to do it. Furthermore, we want to move away from direct window access in WebKit and leave that kind of dirtywork to the client. This patch removes invalidateWindow() as well as the two virtual scrollbar drawing functions and replaces it with one new virtual, WebPageClient::postToSurface(). This clears up threading issues and gets us another step further towards pure WebPageCompositor rendering. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents): * Api/BackingStore_p.h: (BackingStorePrivate): * Api/WebPageClient.h: 2013-02-21 Carlos Garcia Campos [BlackBerry] Rename Localizer to Locale https://bugs.webkit.org/show_bug.cgi?id=110449 Reviewed by Rob Buis. * WebCoreSupport/ColorPickerClient.cpp: (WebCore::ColorPickerClient::locale): * WebCoreSupport/ColorPickerClient.h: (ColorPickerClient): * WebCoreSupport/DatePickerClient.cpp: (WebCore::DatePickerClient::locale): * WebCoreSupport/DatePickerClient.h: (DatePickerClient): * WebCoreSupport/SelectPopupClient.cpp: (WebCore::SelectPopupClient::locale): * WebCoreSupport/SelectPopupClient.h: (SelectPopupClient): 2013-02-21 Carlos Garcia Campos [BlackBerry] Invalid use of COMPILE_ASSERT macro in WebKitTextCodec.cpp https://bugs.webkit.org/show_bug.cgi?id=110437 Reviewed by Yong Li. * Api/WebKitTextCodec.cpp: (WebKit): Define COMPILE_ASSERT_MATCHING_ENUM() macro and use it to check enum values match between WebKit and WTF. (BlackBerry::WebKit::base64Decode): Use a static cast directly to convert from WebKit Base64DecodePolicy to WTF. (BlackBerry::WebKit::base64Encode): Use a static cast directly to convert from WebKit Base64EncodePolicy to WTF. 2013-02-21 Alberto Garcia [BlackBerry] Element::getAttributeItem() no longer returns a mutable attribute https://bugs.webkit.org/show_bug.cgi?id=110439 Reviewed by Antonio Gomes. This was changed in r142827. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::webContext): 2013-02-21 Alberto Garcia [BlackBerry] willComposite() and didComposite() are now in InspectorController https://bugs.webkit.org/show_bug.cgi?id=110343 Reviewed by Carlos Garcia Campos. This was changed in r142879. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::willComposite): (BlackBerry::WebKit::WebPagePrivate::didComposite): 2013-02-20 Nima Ghanavatian [BlackBerry] Check offset for initialized value https://bugs.webkit.org/show_bug.cgi?id=110390 Reviewed by Rob Buis. Instead of checking isEmpty, which checks for either point being <= 0, we want to explicitly check for the initialized value of (-1, -1). This would be set in redrawSpellCheckDialogIfRequired, and triggers the restore from cache in requestSpellingCheckingOptions. Internally reviewed by Gen Mak. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions): 2013-02-20 Jakob Petsovits [BlackBerry] Make sure to always sync before reusing backingstore tiles. https://bugs.webkit.org/show_bug.cgi?id=109863 PR 296118 Reviewed by Rob Buis. Internally reviewed by Mike Lattanzio and Konrad Piascik. In SVN r142137, I replaced a syncToCurrentMessage() call with updateSuspendScreenUpdateState() in some cases, which internally calls the same function. Unfortunately, when I optimized updateSuspendScreenUpdateState() to only sync when the state is actually being changed, I omitted an adaptation of adoptAsFrontState() which would rely on this sync but now didn't always perform it. This caused a bad race condition as tile buffers could now be accessed from the WebKit thread and the UI thread at the same time. Fix it by (optionally) letting the caller of updateSuspendScreenUpdateState() know whether a sync was performed, and adapt adoptAsFrontState() accordingly. Also fixes some excessive flicker caused by the same race condition. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::updateSuspendScreenUpdateState): (BlackBerry::WebKit::BackingStorePrivate::adoptAsFrontState): * Api/BackingStore_p.h: 2013-02-20 Yongxin Dai [BlackBerry] Read "data-blackberry-text-selection-handle-position" attribute from element https://bugs.webkit.org/show_bug.cgi?id=110235 Reviewed by Yong Li. PR #257207. Read "data-blackberry-text-selection-handle-position" attribute from element and pass it along with notifySelectionDetailsChanged(). If "data-blackberry-text-selection-handle-position" attribute is specified in the element, the selection handle is always flipped to the required position. along with selected text within element. Reviewed Internally by Mike Fenton. * Api/WebPageClient.h: * WebKitSupport/DOMSupport.cpp: (BlackBerry::WebKit::DOMSupport::selectionContainerElement): (DOMSupport): (BlackBerry::WebKit::DOMSupport::elementHandlePositionAttribute): * WebKitSupport/DOMSupport.h: * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::requestedSelectionHandlePosition): (WebKit): (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged): * WebKitSupport/SelectionHandler.h: (SelectionHandler): 2013-02-20 Alberto Garcia [BlackBerry] Fix usage of HitTestRequest::RequestType https://bugs.webkit.org/show_bug.cgi?id=110342 Reviewed by Carlos Garcia Campos. Rename HitTestResult::* -> HitTestRequest::* This was introduced by mistake in r142977. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::hitTestResult): 2013-02-20 Carlos Garcia Campos Unreviewed BlackBerry build fix. WebPage::download was renamed in the header by mistake to convertMainResourceLoadToDownload in r137845. * Api/WebPage.h: 2013-02-19 Nima Ghanavatian [BlackBerry] Appropriately handle word wrapping in SpellingHandler https://bugs.webkit.org/show_bug.cgi?id=110253 Reviewed by Rob Buis. PR286001 Since we traverse through text by visual lines instead of blocks, word wrapping causes some bad behavior. Changing the way we traverse text to jump by words instead of lines. This will mean it takes longer to finish spellchecking, but the removal of any loops allows webkit processing to continue. This gives priority to user actions while still completing a large paragraph in a reasonable amount of time. Internally reviewed by Mike Fenton * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::requestCheckingOfString): * WebKitSupport/SpellingHandler.cpp: (BlackBerry::WebKit::SpellingHandler::createSpellCheckRequest): (BlackBerry::WebKit::SpellingHandler::parseBlockForSpellChecking): (BlackBerry::WebKit::SpellingHandler::getRangeForSpellCheckWithFineGranularity): (BlackBerry::WebKit::SpellingHandler::startOfNextWord): (WebKit): (BlackBerry::WebKit::SpellingHandler::incrementByWord): (BlackBerry::WebKit::SpellingHandler::doesWordWrap): * WebKitSupport/SpellingHandler.h: (SpellingHandler): 2013-02-18 Simon Fraser Clean up the boolean argument to visibleContentRect https://bugs.webkit.org/show_bug.cgi?id=110167 Reviewed by Simon Fraser. Replace the boolean argument to visibleContentRect() with an enum. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::getRecursiveVisibleWindowRect): * WebKitSupport/InRegionScrollableArea.cpp: (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea): 2013-02-15 Keishi Hattori Add setValue and closePopup methods to PagePopupController https://bugs.webkit.org/show_bug.cgi?id=109897 Reviewed by Kent Tamura. * WebCoreSupport/ColorPickerClient.cpp: (WebCore::ColorPickerClient::setValue): Added empty implementation. (WebCore): * WebCoreSupport/ColorPickerClient.h: (ColorPickerClient): * WebCoreSupport/DatePickerClient.cpp: (WebCore::DatePickerClient::setValue): Ditto. (WebCore): * WebCoreSupport/DatePickerClient.h: (DatePickerClient): * WebCoreSupport/SelectPopupClient.cpp: (WebCore::SelectPopupClient::setValue): Ditto. (WebCore): * WebCoreSupport/SelectPopupClient.h: (SelectPopupClient): 2013-02-15 Allan Sandfeld Jensen Simplify hitTestResultAtPoint and nodesFromRect APIs https://bugs.webkit.org/show_bug.cgi?id=95720 Reviewed by Julien Chaffraix. Update calls to new API. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::contextNode): (BlackBerry::WebKit::WebPagePrivate::nodeForZoomUnderPoint): (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent): (BlackBerry::WebKit::WebPage::nodeAtDocumentPoint): (BlackBerry::WebKit::WebPagePrivate::hitTestResult): * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::visiblePositionForPointIgnoringClipping): 2013-02-14 Mike Fenton [BlackBerry] Update keyboard event details to match platform details. https://bugs.webkit.org/show_bug.cgi?id=109693 Reviewed by Yong Li. PR 220170. When re-creating the Platform::Keyboard event ensure all values are updated. Reviewed Internally by Nima Ghanavatian. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::updateFormState): 2013-02-14 Mike Fenton [BlackBerry] Update keyboard event details to match platform details. https://bugs.webkit.org/show_bug.cgi?id=109693 Reviewed by Yong Li. PR 220170. Update keyboard event details. Reviewed Internally by Nima Ghanavatian and Gen Mak. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::keyEvent): 2013-02-08 Andrey Kosyakov Web Inspector: expose did{Begin,Cancel}Frame() and {will,did}Composite() on WebDebToolsAgent https://bugs.webkit.org/show_bug.cgi?id=109192 Reviewed by Pavel Feldman. - invoke frame instrumentation methods on InspectorController, not on InspectorInstrumentation. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::instrumentBeginFrame): (BlackBerry::WebKit::BackingStorePrivate::instrumentCancelFrame): 2013-02-12 Jakob Petsovits [BlackBerry] Assume setScrollingOrZooming() to be called on the WebKit thread. https://bugs.webkit.org/show_bug.cgi?id=109614 Internal PR 294513 Reviewed by Rob Buis. Internally reviewed by Arvid Nilsson. With this further simplification of threading assumptions, we can get rid of atomic integer access as well as the backing store mutex which was otherwise unused. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate): (BlackBerry::WebKit::BackingStorePrivate::~BackingStorePrivate): (BlackBerry::WebKit::BackingStorePrivate::suspendBackingStoreUpdates): (BlackBerry::WebKit::BackingStorePrivate::resumeBackingStoreUpdates): (BlackBerry::WebKit::BackingStorePrivate::isScrollingOrZooming): (BlackBerry::WebKit::BackingStorePrivate::setScrollingOrZooming): * Api/BackingStore_p.h: (BackingStorePrivate): 2013-02-12 Jakob Petsovits [BlackBerry] Eliminate the direct rendering option. https://bugs.webkit.org/show_bug.cgi?id=109608 RIM PR 293298 Reviewed by Rob Buis. Internally reviewed by Arvid Nilsson. It added a lot of complexity and we're not going to use it anymore. This patch removes direct rendering functionality from WebKit/blackberry together with the assumption that blitting on the WebKit thread is possible or acceptable. It now isn't anymore. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate): (BlackBerry::WebKit::BackingStorePrivate::resumeScreenUpdates): (BlackBerry::WebKit::BackingStorePrivate::updateSuspendScreenUpdateState): (BlackBerry::WebKit::BackingStorePrivate::slowScroll): (BlackBerry::WebKit::BackingStorePrivate::scroll): (BlackBerry::WebKit::BackingStorePrivate::shouldPerformRenderJobs): (BlackBerry::WebKit::BackingStorePrivate::render): (BlackBerry::WebKit::BackingStorePrivate::renderAndBlitImmediately): (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents): (BlackBerry::WebKit::BackingStorePrivate::blitToWindow): (BlackBerry::WebKit::BackingStorePrivate::fillWindow): (BlackBerry::WebKit::BackingStorePrivate::invalidateWindow): (BlackBerry::WebKit::BackingStorePrivate::clearWindow): (BlackBerry::WebKit::BackingStorePrivate::setScrollingOrZooming): (BlackBerry::WebKit::BackingStorePrivate::didRenderContent): * Api/BackingStore.h: * Api/BackingStore_p.h: (BackingStorePrivate): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore): (BlackBerry::WebKit::WebPagePrivate::setViewportSize): (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired): (WebKit): (BlackBerry::WebKit::WebPagePrivate::scheduleCompositingRun): * Api/WebPageCompositor.cpp: (BlackBerry::WebKit::WebPageCompositorPrivate::animationFrameChanged): * Api/WebPage_p.h: (WebPagePrivate): * Api/WebSettings.cpp: (WebKit): * Api/WebSettings.h: * WebKitSupport/RenderQueue.cpp: (BlackBerry::WebKit::RenderQueue::renderRegularRenderJobs): (BlackBerry::WebKit::RenderQueue::renderScrollZoomJobs): * WebKitSupport/SurfacePool.cpp: (BlackBerry::WebKit::SurfacePool::initialize): 2013-02-12 Andrew Lo [BlackBerry] CSS animations stop running during zoom https://bugs.webkit.org/show_bug.cgi?id=109606 Reviewed by Rob Buis. Internally reviewed by Jakob Petsovits. Internal PR 286160. New BackingStore API for suspending/resuming geometry updates. This is needed because we want to allow render jobs to continue during zoom, but we don't want to allow geometry updates during zoom. Prevent scroll/zoom render jobs from being added to the queue if the tile is outside the expanded content rect. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate): (BlackBerry::WebKit::BackingStorePrivate::suspendGeometryUpdates): (WebKit): (BlackBerry::WebKit::BackingStorePrivate::resumeGeometryUpdates): (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect): (BlackBerry::WebKit::BackingStore::suspendGeometryUpdates): (BlackBerry::WebKit::BackingStore::resumeGeometryUpdates): * Api/BackingStore.h: * Api/BackingStore_p.h: (BackingStorePrivate): * WebKitSupport/RenderQueue.cpp: (BlackBerry::WebKit::RenderQueue::addToScrollZoomQueue): 2013-02-12 Christophe Dumez Remove remaining traces of Web Intents https://bugs.webkit.org/show_bug.cgi?id=109586 Reviewed by Eric Seidel. Remove remaining traces of Web Intents from Blackberry port configuration as the functionality was removed in r142549. * WebCoreSupport/AboutDataEnableFeatures.in: 2013-02-12 Zan Dobersek Remove ENABLE_XHR_RESPONSE_BLOB handling from various build systems https://bugs.webkit.org/show_bug.cgi?id=109481 Reviewed by Daniel Bates. The ENABLE_XHR_RESPONSE_BLOB feature define was removed from the code back in r120574. There are still occurrences of it in various build systems which should all be removed as they are useless. * WebCoreSupport/AboutDataEnableFeatures.in: 2013-02-11 Ryosuke Niwa Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface https://bugs.webkit.org/show_bug.cgi?id=109534 Reviewed by Anders Carlsson. * WebCoreSupport/EditorClientBlackBerry.cpp: (WebCore): * WebCoreSupport/EditorClientBlackBerry.h: (EditorClientBlackBerry): 2013-02-11 Mike Fenton [BlackBerry] Add form navigation control state tracking. https://bugs.webkit.org/show_bug.cgi?id=109300 Reviewed by Rob Buis. Add form navigation control state tracking. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::focusNextField): (WebKit): (BlackBerry::WebKit::WebPage::focusPreviousField): (BlackBerry::WebKit::WebPage::submitForm): * Api/WebPage.h: * Api/WebPageClient.h: * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::InputHandler): (BlackBerry::WebKit::InputHandler::setElementUnfocused): (BlackBerry::WebKit::InputHandler::updateFormState): * WebKitSupport/InputHandler.h: (InputHandler): 2013-02-09 Tiancheng Jiang [BlackBerry] Set mouse document position for mouse event in updateCursor. https://bugs.webkit.org/show_bug.cgi?id=109094. Reviewed by Rob Buis. RIM PR 246976 Internally Reviewed by Genevieve Mak. BlackBerry::Platform::MouseEvent have document viewport and document content position as members. When we create the event, we should initial them as well. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::updateCursor): 2013-02-07 Charles Wei webpage needs null check in BackingStore::setCurrentBackingStoreOwner https://bugs.webkit.org/show_bug.cgi?id=109253 Reviewed by George Staikos. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::setCurrentBackingStoreOwner): 2013-02-07 Mary Wu [BlackBerry] Enable non-video element enter/exit fullscreen. https://bugs.webkit.org/show_bug.cgi?id=108314 Reviewed by Antonio Gomes. Webkit support non-video element (like div) to enter/exit fullscreen. We should pass this capability in blackberry porting. RIM PR 256370, internally reviewed by Max Feil. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::clearDocumentData): (BlackBerry::WebKit::WebPagePrivate::setViewportSize): (BlackBerry::WebKit::WebPage::notifyFullScreenVideoExited): (BlackBerry::WebKit::WebPagePrivate::enterFullscreenForNode): (BlackBerry::WebKit::WebPagePrivate::exitFullscreenForNode): (WebKit): (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement): (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement): (BlackBerry::WebKit::WebPagePrivate::adjustFullScreenElementDimensionsIfNeeded): * Api/WebPage_p.h: (WebPagePrivate): 2013-02-07 Jakob Petsovits [BlackBerry] Fix all flicker caused by empty/incomplete geometries. https://bugs.webkit.org/show_bug.cgi?id=108951 RIM PR 286925 Reviewed by Rob Buis. Internally reviewed by Arvid Nilsson. The main idea for this patch is that whenever we adopt a new backingstore geometry that doesn't contain any rendered tiles, or VisibleZoom render jobs that need more tiles to be rendered to be considered complete, we'll then suspend blitting until there is valid content to show. This main idea is codified as checks for empty buffers in adoptAsFrontState(), and checks for the current state of the render queue after rendering content in render(). However, as BackingStore objects with disabled surface pools or pure use of accelerated compositing also swap geometries in some circumstances, the use of suspend counters grows increasingly fragile. To make this patch more resilient against regressions, the current suspend counter is complemented with several explicit conditions for suspending screen updates, and both subsequently combined into a single cached boolean value telling the UI thread whether or not to suspend. In the future, other suspend calls can be migrated to this "state machine" design as well, potentially phasing out the suspend counter altogether. The immediate result is that there will be no flashing of background color between page loads or after discarding tiles on scale changes until the content has been rendered. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate): (BlackBerry::WebKit::BackingStorePrivate::suspendBackingStoreUpdates): (BlackBerry::WebKit::BackingStorePrivate::suspendScreenUpdates): (BlackBerry::WebKit::BackingStorePrivate::resumeBackingStoreUpdates): (BlackBerry::WebKit::BackingStorePrivate::resumeScreenUpdates): (BlackBerry::WebKit::BackingStorePrivate::updateSuspendScreenUpdateState): (WebKit): (BlackBerry::WebKit::BackingStorePrivate::render): (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents): (BlackBerry::WebKit::BackingStorePrivate::adoptAsFrontState): (BlackBerry::WebKit::BackingStorePrivate::setCurrentBackingStoreOwner): (BlackBerry::WebKit::BackingStore::releaseOwnedBackingStoreMemory): * Api/BackingStore_p.h: (BackingStorePrivate): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setVisible): (BlackBerry::WebKit::WebPagePrivate::setCompositorDrawsRootLayer): 2013-02-07 Xiaobo Wang [BlackBerry] CHHW - Characters that are using 32 bits encoding get trunked to 16bits https://bugs.webkit.org/show_bug.cgi?id=109126 PR 292540 Reviewed by Yong Li. Internally reviewed by Mike Fenton. Key char is UTF32 encoded, should be 4 bytes. * Api/WebPage.cpp: (BlackBerry::WebKit::handleScrolling): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::handleKeyboardInput): * WebKitSupport/InputHandler.h: (InputHandler): * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::directionOfPointRelativeToRect): (BlackBerry::WebKit::SelectionHandler::setCaretPosition): (BlackBerry::WebKit::shouldExtendSelectionInDirection): (BlackBerry::WebKit::directionalVisiblePositionAtExtentOfBox): (BlackBerry::WebKit::SelectionHandler::extendSelectionToFieldBoundary): (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection): * WebKitSupport/SelectionHandler.h: (SelectionHandler): 2013-02-07 Sean Wang [BlackBerry] Reader Mode: Opening two links quickly from reader mode causes browser bad state https://bugs.webkit.org/show_bug.cgi?id=109124 Reviewed by Yong Li. RIM BUG 291246 Internally reviewed by YongLi. Move the WebPageGroupLoadDeferrer object from ChromeClientBlackBerry::createWindow() into WebPageClientImpl::createWindow() to make it more close to its protecting place. * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::createWindow): 2013-02-07 Mike Fenton [BlackBerry] Send type details with IMF mask as part of focus gained. https://bugs.webkit.org/show_bug.cgi?id=109086 Reviewed by Yong Li. PR 292609. Add masking options based on VKB type to the IMF mask. Reviewed Internally by Nima Ghanavatian. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::addInputStyleMaskForKeyboardType): (WebKit): (BlackBerry::WebKit::InputHandler::setElementFocused): 2013-02-06 Jakob Petsovits [BlackBerry] Refactor renderContents() for cleaner code. https://bugs.webkit.org/show_bug.cgi?id=109059 RIM PR 280374 Reviewed by Rob Buis. Internally reviewed by Arvid Nilsson. The fact that we've got two renderContents() implementations in BackingStore.cpp, one of which was tailored to just being called from drawContents(), is a major annoyance. With this patch, the regular renderContents() is modified in a way so that drawContents() can make use of it as well. This includes an API change for both functions which makes it more flexible and enables further cleanups and improvements to accuracy. The second, unloved renderContents() is removed. The user-visible changes are improved (float) accuracy for render offsets, clipping to exactly the dstRect that has been specified, and the changed public drawContents() API. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::renderDirectToWindow): (BlackBerry::WebKit::BackingStorePrivate::render): (BlackBerry::WebKit::BackingStorePrivate::renderContents): (BlackBerry::WebKit::BackingStore::drawContents): * Api/BackingStore.h: (Platform): (Graphics): * Api/BackingStore_p.h: (WebCore): (BackingStorePrivate): * WebKitSupport/SurfacePool.cpp: (BlackBerry::WebKit::SurfacePool::SurfacePool): (BlackBerry::WebKit::SurfacePool::initialize): (BlackBerry::WebKit::SurfacePool::destroyPlatformGraphicsContext): * WebKitSupport/SurfacePool.h: (SurfacePool): 2013-02-06 Nima Ghanavatian [BlackBerry] Check range before use in parseBlockForSpellChecking https://bugs.webkit.org/show_bug.cgi?id=109080 Reviewed by Yong Li. PR291394 This was missed during patch webkit/5aea04f6ea625827. Since getRangeForSpellCheckWithFineGranularity now returns null values, we need a check here before using the range object here as well. Internally reviewed by Mike Fenton. * WebKitSupport/SpellingHandler.cpp: (BlackBerry::WebKit::SpellingHandler::parseBlockForSpellChecking): 2013-02-06 Nima Ghanavatian [BlackBerry] Check for a valid range object before using it https://bugs.webkit.org/show_bug.cgi?id=109058 Reviewed by Rob Buis. PR291394 Crash occurs if makeRange returns null, since we are using this value without checking its validity. We had an assert before which I'm replacing with just a check for null. Internally reviewed by Mike Fenton. * WebKitSupport/SpellingHandler.cpp: (BlackBerry::WebKit::SpellingHandler::getRangeForSpellCheckWithFineGranularity): 2013-02-05 Andrew Lo [BlackBerry] Scrolling performance drops doing page load https://bugs.webkit.org/show_bug.cgi?id=108949 Reviewed by Yong Li. Internally reviewed by Jakob Petsovits. Internal PR 291390. The intention of this code was to not update non-visible tiles during page load. Before this patch, the code would update tiles that have already been rendered during page load. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion): 2013-02-04 Tiancheng Jiang [BlackBerry]Adjust fatfinger detection rect size https://bugs.webkit.org/show_bug.cgi?id=108678 Reviewed by Antonio Gomes. RIM Bug 246976 We still need to clip the fatfinger detection rect to the viewport to avoid wrong hitTest result. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::mouseEvent): * WebKitSupport/FatFingers.cpp: (BlackBerry::WebKit::FatFingers::getNodesFromRect): 2013-02-04 Abhishek Arya Add ASSERT_WITH_SECURITY_IMPLICATION to detect bad cast in DOM, CSS, etc. https://bugs.webkit.org/show_bug.cgi?id=108688 Reviewed by Eric Seidel. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent): * WebKitSupport/FatFingers.cpp: (BlackBerry::WebKit::FatFingers::setSuccessfulFatFingersResult): 2013-02-04 Andrew Lo [BlackBerry] Needs one-shot drawing synchronization flag should be set before rendering when resuming the backing store https://bugs.webkit.org/show_bug.cgi?id=108760 Reviewed by Yong Li. Internally reviewed by Arvid Nilsson. Internal PR 286218. When acquiring the backing store ownership in WebPagePrivate::resumeBackingStore we need to set the needs one-shot drawing synchronization flag before rendering, so that when the render is completed we commit the root layer. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore): 2013-02-03 KwangYong Choi Fix build warning after r141473 https://bugs.webkit.org/show_bug.cgi?id=108782 Reviewed by Kentaro Hara. Fix -Wunused-parameter build warning. * WebCoreSupport/EditorClientBlackBerry.cpp: (WebCore::EditorClientBlackBerry::getClientPasteboardDataForRange): 2013-02-01 Jacky Jiang [BlackBerry] Zooming in during page load of non-scalable webpage results in fixed magnification https://bugs.webkit.org/show_bug.cgi?id=108252 Reviewed by Yong Li. Internally reviewed by Konrad Piascik. PR: 284828 We got float layoutSize(342.284122, 521.448467) and m_maximumScale(2.243750) after computing viewport meta based on the device pixel ratio and laid out the contents at IntSize(342, 521). Therefore, zoomToFitScale(2.245681) would be a bit larger than m_maximumScale based on that contents size and resulted in maximumScale()!=minimumScale(), which made the non-scalable page scalable. Return zoomToFitScale for maximumScale() in such kind of case. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::maximumScale): 2013-02-01 Sean Wang [BlackBerry] InputHandler status is not restored when page history goes back https://bugs.webkit.org/show_bug.cgi?id=108448 Reviewed by Yong Li. PR288406 Internally reviewed by Mike Fenton When webpage goes back, it restores the old frame's selection and focused node, but we don't save the InputHandler's status, it becomes non-input mode when page goes back. When it restores the focus, since the new focus node is same as the old document focused node, webcore will not notify client to update the input handler. This patch updates the input handler's status by notifying it focus node changed. * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::restoreViewState): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::restoreViewState): (WebKit): * WebKitSupport/InputHandler.h: (InputHandler): 2013-01-31 Jacky Jiang [BlackBerry] Bing Images viewport causes layout "fun" https://bugs.webkit.org/show_bug.cgi?id=108393 Reviewed by Yong Li. Internally reviewed by Arvid Nilsson and partially reviewed by Konrad Piascik. PR: 277855 Set applyPageScaleFactorInCompositor settting to false by default. Scale down chrome window rect to density-independent pixels. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::didChangeSettings): * Api/WebSettings.cpp: (WebKit): (BlackBerry::WebKit::WebSettings::standardSettings): (BlackBerry::WebKit::WebSettings::applyDeviceScaleFactorInCompositor): (BlackBerry::WebKit::WebSettings::setApplyPageScaleFactorInCompositor): * Api/WebSettings.h: * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::windowRect): 2013-01-31 Enrica Casucci WebKit2: provide new bundle APIs to allow bundle clients to be notified of pasteboard access. https://bugs.webkit.org/show_bug.cgi?id=108396. Reviewed by Alexey Proskuryakov. Adds stub implementation for WebKit of the new EditorClient methods. * WebCoreSupport/EditorClientBlackBerry.cpp: (WebCore::EditorClientBlackBerry::willWriteSelectionToPasteboard): (WebCore::EditorClientBlackBerry::getClientPasteboardDataForRange): * WebCoreSupport/EditorClientBlackBerry.h: 2013-01-30 Ed Baker [BlackBerry] Screenshot is clipped when content is smaller than the desintation size https://bugs.webkit.org/show_bug.cgi?id=107735 Reviewed by Rob Buis. Internal PR #284662 Don't scale the transformed content rect when the content is smaller than the destination size. Scale the graphics context when it has a scale factor that isn't 1.0. Internally reviewed by Andrew Lo * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::renderContents): 2013-01-30 Xiaobo Wang [BlackBerry] Webpage was cut off after rotating to landscape and then rotating back to portrait on specific website https://bugs.webkit.org/show_bug.cgi?id=108281 PR 284985 Reviewed by Rob Buis. Internally reviewed by Jacky Jiang. Return correct fixedLayoutSize when overflow exceeds contents size. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize): 2013-01-30 Simon Hausmann [Qt] Remove QT4_UNICODE related code paths https://bugs.webkit.org/show_bug.cgi?id=108316 Reviewed by Kenneth Rohde Christiansen. * WebCoreSupport/AboutDataUseFeatures.in: The feature macro has been removed. 2013-01-29 Sheriff Bot Unreviewed, rolling out r140983. http://trac.webkit.org/changeset/140983 https://bugs.webkit.org/show_bug.cgi?id=108277 Unfortunately, this API has one last client (Requested by abarth on #webkit). * WebCoreSupport/AboutDataEnableFeatures.in: 2013-01-28 Andrew Lo [BlackBerry] Small animated zoom level adjustments are unnecessary https://bugs.webkit.org/show_bug.cgi?id=108104 Reviewed by Rob Buis. Internally reviewed by Mike Fenton. Internal PR 285861. If the difference between the target scale and current scale is less than a given threshold, don't perform a zoom animation. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible): 2013-01-28 Nima Ghanavatian [BlackBerry] Reduce the region that is spellchecked on keystroke https://bugs.webkit.org/show_bug.cgi?id=108115 Reviewed by Rob Buis. PR288217 Instead of blindly checking text until endOfDocument, we should be honoring the boundaries of the VisibleSelection that is passed into SpellingHandler. Though this results in the same behavior on focus, this dramatically reduces the region that is rechecked when a key is hit. Internally reviewed by Mike Fenton. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::requestCheckingOfString): * WebKitSupport/SpellingHandler.cpp: (BlackBerry::WebKit::SpellingHandler::spellCheckTextBlock): (BlackBerry::WebKit::SpellingHandler::parseBlockForSpellChecking): * WebKitSupport/SpellingHandler.h: (SpellingHandler): 2013-01-28 Adam Barth Remove webkitNotifications.createHTMLNotification https://bugs.webkit.org/show_bug.cgi?id=107598 Reviewed by Benjamin Poulain. * WebCoreSupport/AboutDataEnableFeatures.in: 2013-01-28 Otto Derek Cheung [BlackBerry] SpellingHandler parses and creates spellcheck requests regardless of the system spell check status https://bugs.webkit.org/show_bug.cgi?id=108085 Reviewed by Rob Buis. Fix a merge error that duplicated a function declaration in InputHandler.h. * WebKitSupport/InputHandler.h: 2013-01-28 Otto Derek Cheung [BlackBerry] SpellingHandler parses and creates spellcheck requests regardless of the system spell check status https://bugs.webkit.org/show_bug.cgi?id=108085 PR 286165 Reviewed by Rob Buis. Internally reviewed by Nima Ghanavatian. Adding a check for the system spell check status in InputHandler::shouldSpellCheckElement so we won't bother sending a spellcheck request if system spell check is turned off. However, on a fresh browser start up and on the first setElementFocus, the spellcheck value isn't defined yet. The first spell check request is therefore necessary to connect to imf to determine whether spell check is turned on. If spell check is turned off, we will turn spellinghandler off. Tested the patch using a test site that contains editable text in text-areas and content-editable divs. Also tested on an extreme test case where we try to edit a content-editable div with 30000 characters. Confirmed spell-check requests are being canceled if system spell check is off. In theory, this patch should also fix PR 284229 . However, because of issues with getting the system spell check values from IMF, additional work needs to be done for that PR. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::setSpellCheckingEnabled): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::InputHandler): (BlackBerry::WebKit::InputHandler::shouldSpellCheckElement): (WebKit): (BlackBerry::WebKit::InputHandler::stopPendingSpellCheckRequests): * WebKitSupport/InputHandler.h: (InputHandler): (BlackBerry::WebKit::InputHandler::setSystemSpellCheckStatus): 2013-01-25 Andrew Lo [BlackBerry] Pop-up WebViews should not take ownership of the backing store. https://bugs.webkit.org/show_bug.cgi?id=107957 Reviewed by Rob Buis. Internally reviewed by Jakob Petsovits. Internal PR 274581. Add web setting for whether a WebPage should take the backing store. Prevent pop-up WebView from taking ownership of the backing store when it becomes visible. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::setVisible): * Api/WebSettings.cpp: (WebKit): (BlackBerry::WebKit::WebSettings::standardSettings): (BlackBerry::WebKit::WebSettings::isBackingStoreEnabled): (BlackBerry::WebKit::WebSettings::setBackingStoreEnabled): * Api/WebSettings.h: * WebCoreSupport/PagePopupBlackBerry.cpp: (WebCore::PagePopupBlackBerry::PagePopupBlackBerry): (WebCore::PagePopupBlackBerry::init): 2013-01-25 Arvid Nilsson [BlackBerry] AC layers appear in the wrong place on RTL page https://bugs.webkit.org/show_bug.cgi?id=107930 Reviewed by George Staikos. The public API of the BlackBerry port always reports a minimum scroll position of (0, 0), even on RTL pages with left overflow. We accomplish this by translating the WebCore scroll position by an amount equal in size to the minimum scroll position, to obtain the API scroll position reported to the API client. This means the API client will ask us to render a rect that needs to be corrected for the minimum scroll position, or we'll render the wrong part. This is done for BackingStore, but not for WebPageCompositor. WebPageCompositor was rendering the wrong part of the web page when the minimum scroll position was non-zero. Fixed by communicating the minimum scroll position to the WebPageCompositor, and accounting for it when interpreting the requested content rectangle to render. PR 280229. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::commitRootLayer): (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded): * Api/WebPageCompositor.cpp: (BlackBerry::WebKit::WebPageCompositorPrivate::render): (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers): * Api/WebPageCompositor_p.h: (BlackBerry::WebKit::WebPageCompositorPrivate::layoutRect): (BlackBerry::WebKit::WebPageCompositorPrivate::setLayoutRect): (BlackBerry::WebKit::WebPageCompositorPrivate::documentRect): (BlackBerry::WebKit::WebPageCompositorPrivate::setDocumentRect): (WebPageCompositorPrivate): * Api/WebPage_p.h: (WebPagePrivate): 2013-01-24 Nima Ghanavatian [BlackBerry] Fix crash in SpellingHandler https://bugs.webkit.org/show_bug.cgi?id=107842 Reviewed by Rob Buis. If we have an empty range or one with all spaces, we can simply return 0 instead of still creating a range. Putting in a null check after trimming to catch this case which was causing the crash in some DRT tests. Internally reviewed by Mike Fenton. * WebKitSupport/DOMSupport.cpp: (BlackBerry::WebKit::DOMSupport::trimWhitespaceFromRange): * WebKitSupport/SpellingHandler.cpp: (BlackBerry::WebKit::SpellingHandler::createSpellCheckRequest): 2013-01-24 Sean Wang [BlackBerry] It can't Select texts in main frame when the current focus is in a IFrame https://bugs.webkit.org/show_bug.cgi?id=107773 Reviewed by Antonio Gomes. PR285211 Internally reviewed by Genevieve Mak When touch hold in the unfocused frame, it doesn't switch frame focus. Many places in code depends on the webpage->forcusOrMainFrame(), including the SelectionHandler, so it can't select in an unfocused frame. This patch switchs frame focus when touch starts. * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::doFatFingers): 2013-01-23 Nima Ghanavatian [BlackBerry] Take a better guess as to what text the user wants learned https://bugs.webkit.org/show_bug.cgi?id=107706 Reviewed by Rob Buis. If we still have a valid caret position, use it to give priority to a region of text. We now take the text before the caret, instead of the text at the end of the field. If the caret is not present, we start from the beginning of the field. This helps learning in email where the region of interest is generally at the start, not end of the field. Internally reviewed by Mike Fenton * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::learnText): 2013-01-23 Nima Ghanavatian [BlackBerry] Optimize spellchecking by coalescing messages https://bugs.webkit.org/show_bug.cgi?id=107707 Reviewed by Rob Buis. PR233604 Instead of taking chunks one line at a time, coalesce them together to fire off messages as close to our character limit as possible. This should dramatically reduce the total number of messages in email giving us a little performance bump. Internally reviewed by Mike Fenton and Gen Mak. * WebKitSupport/DOMSupport.cpp: (BlackBerry::WebKit::DOMSupport::trimWhitespaceFromRange): (DOMSupport): * WebKitSupport/DOMSupport.h: * WebKitSupport/InputHandler.cpp: * WebKitSupport/InputHandler.h: (InputHandler): * WebKitSupport/SpellingHandler.cpp: (BlackBerry::WebKit::SpellingHandler::spellCheckTextBlock): (BlackBerry::WebKit::SpellingHandler::createSpellCheckRequest): (BlackBerry::WebKit::SpellingHandler::parseBlockForSpellChecking): (BlackBerry::WebKit::SpellingHandler::getRangeForSpellCheckWithFineGranularity): * WebKitSupport/SpellingHandler.h: 2013-01-23 Shinya Kawanaka shadowAncestorNode() should be renamed to deprecatedShadowAncestorNode() https://bugs.webkit.org/show_bug.cgi?id=107624 Reviewed by Dimitri Glazkov. Since Node::shadowAncestorNode() is deprecated, we would like to rename it to prevent from further use. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::webContext): * WebKitSupport/FatFingers.h: (BlackBerry::WebKit::FatFingersResult::node): * WebKitSupport/InPageSearchManager.cpp: (BlackBerry::WebKit::InPageSearchManager::scopeStringMatches): 2013-01-22 Andrew Lo [BlackBerry] GIF & RAF animations sometimes don't resume after zoom https://bugs.webkit.org/show_bug.cgi?id=107590 Reviewed by Rob Buis. Internally reviewed by Jakob Petsovits. Internal PR 276907. Dispatch render jobs when resuming backing store updates to perform jobs queued when updates were suspended. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::resumeBackingStoreUpdates): 2013-01-21 Nima Ghanavatian [BlackBerry] Skip spell checking on single character strings https://bugs.webkit.org/show_bug.cgi?id=107463 Reviewed by Yong Li. Check for a minimum string length when firing off spellcheck since we don't want to mark single letter words. Internally reviewed by Mike Fenton. * WebKitSupport/InputHandler.cpp: * WebKitSupport/SpellingHandler.cpp: (BlackBerry::WebKit::SpellingHandler::createSpellCheckRequest): (BlackBerry::WebKit::SpellingHandler::parseBlockForSpellChecking): 2013-01-20 Charles Wei [BlackBerry] some websites only takes half of the screen after rotating from landscape to portrait mode. https://bugs.webkit.org/show_bug.cgi?id=107103 Reviewed by George Staikos. Internally reviewed by Jacky Jiang. When the document size changes (by some javascript) which makes it too small to fit the viewport, we should automatically zoom it to fit the viewport. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::layoutFinished): 2013-01-20 Tiancheng Jiang [BlackBerry] Improve Fatfinger phase. https://bugs.webkit.org/show_bug.cgi?id=107403 Reviewed by Rob Buis. RIM PR 219489 Internally reviewd by Mike Fenton & Gen Mak. Treat ClickableByDefault and MadeClickableByTheWebpage elements as same category. Avoid unnecessary nodes check step. * WebKitSupport/FatFingers.cpp: (BlackBerry::WebKit::FatFingers::isElementClickable): (BlackBerry::WebKit::FatFingers::FatFingers): (BlackBerry::WebKit::FatFingers::findBestPoint): (BlackBerry::WebKit::FatFingers::getNodesFromRect): * WebKitSupport/FatFingers.h: 2013-01-18 Andrew Lo [BlackBerry] When acquiring/releasing backing store memory, allow web page client control suspend/resuming of backing store https://bugs.webkit.org/show_bug.cgi?id=107307 Reviewed by Rob Buis. Internally reviewed by Jakob Petsovits. Internal PR276660 Have BackingStore::createBackingStoreMemory & releaseBackingStoreMemory only acquire & release the surface pool. It doesn't matter if either is called redundantly since SurfacePool has internal state to protect against that. Resuming & suspending backing store and screen updates will be handled by the WebPageClient. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStore::acquireBackingStoreMemory): (BlackBerry::WebKit::BackingStore::releaseOwnedBackingStoreMemory): * Api/BackingStore.h: 2013-01-18 Nima Ghanavatian [BlackBerry] Set spellchecking calculations on a timer to free up the WebKit thread https://bugs.webkit.org/show_bug.cgi?id=107284 Reviewed by Rob Buis. PR282351 Firing off spellcheck requests is tieing up the WebKit thread for an extended period of time. In testing with large blocks of text, this can be in the matter of 5-10 seconds. Though we are using asynchronous spellchecking, the process in which we break down blocks of text based on input_service limitations is the issue. Using a timer here which fires with an arbitrary timeout to allow for focus and interaction to maintain at a reasonable level. Further, pulling this code out of InputHandler and into its own class. Internally reviewed by Mike Fenton and Gen Mak. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::InputHandler): (BlackBerry::WebKit::InputHandler::~InputHandler): (BlackBerry::WebKit::InputHandler::callRequestCheckingFor): (WebKit): (BlackBerry::WebKit::InputHandler::requestCheckingOfString): (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed): (BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint): (BlackBerry::WebKit::InputHandler::setElementUnfocused): (BlackBerry::WebKit::InputHandler::setElementFocused): * WebKitSupport/InputHandler.h: (WebCore): (WebKit): (InputHandler): * WebKitSupport/SpellingHandler.cpp: Added. (WebKit): (BlackBerry::WebKit::SpellingHandler::SpellingHandler): (BlackBerry::WebKit::SpellingHandler::~SpellingHandler): (BlackBerry::WebKit::SpellingHandler::spellCheckTextBlock): (BlackBerry::WebKit::SpellingHandler::createSpellCheckRequest): (BlackBerry::WebKit::SpellingHandler::parseBlockForSpellChecking): (BlackBerry::WebKit::SpellingHandler::getRangeForSpellCheckWithFineGranularity): * WebKitSupport/SpellingHandler.h: Added. (WebCore): (WebKit): (SpellingHandler): (BlackBerry::WebKit::SpellingHandler::isSpellCheckActive): (BlackBerry::WebKit::SpellingHandler::setSpellCheckActive): 2013-01-18 Nima Ghanavatian [BlackBerry] Check if continuous spellchecking is enabled before processing a request https://bugs.webkit.org/show_bug.cgi?id=107169 Reviewed by Rob Buis. PR265815 We set this value based on the global settings page. The spellcheck-on-focus codepath did not hit this, so focusing a field would not uphold the setting. Internally reviewed by Mike Fenton and Gen Mak. * WebKitSupport/DOMSupport.cpp: (BlackBerry::WebKit::DOMSupport::elementHasContinuousSpellCheckingEnabled): (DOMSupport): * WebKitSupport/DOMSupport.h: * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed): 2013-01-18 Seokju Kwon Add explicit keyword to constructors in platform-specific InspectorClient https://bugs.webkit.org/show_bug.cgi?id=107255 Reviewed by Kentaro Hara. Add explicit keyword to constructors that take one argument in platform-specific implementation of InspectorClient. * WebCoreSupport/InspectorClientBlackBerry.h: (InspectorClientBlackBerry): 2013-01-18 Andrew Lo [BlackBerry] Assert failing in RenderQueue::renderScrollZoomJobs https://bugs.webkit.org/show_bug.cgi?id=107215 Reviewed by Rob Buis. Internally reviewed by Jakob Petsovits. Internal PR276660 Render jobs should not be performed if the backing store is inactive. This occured when the browser was invoked, causing a web page to be made visible before the surface pool was resumed. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::shouldPerformRenderJobs): 2013-01-17 Yong Li [BlackBerry] InRegionScroller should notify client before it deletes all the scrollables https://bugs.webkit.org/show_bug.cgi?id=107162 Reviewed by Rob Buis. Internally reviewed by Gen Mak and Mike Fenton. Move the notification code from notifyInRegionScrollStopped() to reset() as there are other places where reset() gets called. * Api/InRegionScroller.cpp: (BlackBerry::WebKit::InRegionScrollerPrivate::reset): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::notifyInRegionScrollStopped): 2013-01-17 Mike Fenton [BlackBerry] Fix selection handle appearance for RTL text. https://bugs.webkit.org/show_bug.cgi?id=107043 Reviewed by Rob Buis. PR 263585. Invert the reported selection handle position if to match the visual order instead of the logical order to create the desired appearance for RTL text and directional selections. Reviewed Internally by Gen Mak and Nima Ghanavatian. * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged): 2013-01-16 Charles Wei [BlackBerry] Need to adjust the scale and scroll position after leaving fullscreen mode if there's device rotation in fullscreen mode https://bugs.webkit.org/show_bug.cgi?id=107085 Reviewed by George STaikos. Also internally reviewed by Jacky Jiang. We saved the scale and scroll position before entering full screen mode, so that we can restore them after leaving fullscreen mode, because entering fullscreen mode automatically changes the scale to make the video to fit to the viewport. But if there's device rotation during the fullscreen, the scale and scroll position saved before may or may not apply anymore, we need to adjust the scale and/or scroll position if needed to make sure no over-scale or over-scroll in the new orientation. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setViewportSize): (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement): * Api/WebPage_p.h: (WebPagePrivate): 2013-01-16 Joe Mason [BlackBerry] Remove bogus assert in GeolocationClientBlackBerry https://bugs.webkit.org/show_bug.cgi?id=105651 Reviewed by Darin Adler. GeolocationClientBlackBerry::cancelPermissionRequest contains an ASSERT that the origin is in m_geolocationRequestMap. But it's perfectly valid for the origin to not be in the map - for instance, if GeolocationClientBlackBerry::requestPermission returned immediately, without putting it in the map, because geolocation was disabled. In this case the correct thing to do is just return - there is nothing to be done to cancel the permission. * WebCoreSupport/GeolocationClientBlackBerry.cpp: (GeolocationClientBlackBerry::cancelPermissionRequest): 2013-01-15 Mike Fenton [BlackBerry] Don't overwrite field dir with current locale. https://bugs.webkit.org/show_bug.cgi?id=106932 Reviewed by Yong Li. PR 212267. Remove uncalled onInputLocaleChanged and stop re-writing the dir on input focus which prevented RTL fields from rendering properly. Reviewed Internally by Eli Fidler. * Api/WebPage.cpp: * Api/WebPage.h: * Api/WebPage_p.h: (WebPagePrivate): * WebKitSupport/InputHandler.cpp: * WebKitSupport/InputHandler.h: (InputHandler): 2013-01-15 Jacky Jiang [BlackBerry] Manual zoom propagates to next page load https://bugs.webkit.org/show_bug.cgi?id=106914 Reviewed by Yong Li. Internally reviewed by Eli Fidler and Jakob Petsovits. PR: 280481 During load committed, the web page scale was reset. However, UI thread still kept the old scale in UserInterfaceViewportAccessor so that it blitted the contents at the old scale although WebKit thread could update the UI thread scale later when finished the load. We should update the scale of the UI thread right after we reset it in WebKit thread to keep them in sync. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::resetScales): 2013-01-14 Otto Derek Cheung [BlackBerry] FCC appears when switching search engine providers https://bugs.webkit.org/show_bug.cgi?id=106824 Magnifying glass appears when switching search engine providers PR 279178 Reviewed by Rob Buis. Internal Reviewed by Mike Fenton. We need to make sure fatfinger is touching a textfield when we tell notifyCaretChanged to show the FCC. This behaviour is accidentally regressed in the fix in PR 267177, causing the FCC to show when the user touches an element that is not a textfield and changes the caret in the inputbar.. Tested that the behaviour in 267177 isn't reproducible and the FCC isn't invoked when we switch search engine providers. * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::caretPositionChanged): 2013-01-14 Jacky Jiang [BlackBerry] Zoom is still possible when user-scalable=no https://bugs.webkit.org/show_bug.cgi?id=106809 Reviewed by George Staikos. PR: 274566 On wordpress.com, the contents were rendered at the width 343 which was 1 css pixel larger than the expected device-width 342 so that we didn't respect the viewport. There was a RenderBlock on the page which contained "\n" and an inline-block. "\n" took 0.78 width and the inline-block took 342 width and they were unfortunately placed in the same InlineBox which caused the contents width 1 css pixels larger than the device-width. Allow the contents width to be 1 css pixel larger and still respect the viewport in such a special case. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::respectViewport): 2013-01-13 Xiaobo Wang [BlackBerry] Add a public function WebPage::isLoading() https://bugs.webkit.org/show_bug.cgi?id=106751 PR 274392 Reviewed by George Staikos. Need to get the load state in WebPageClient when resolving PR 274392. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::isLoading): (WebKit): * Api/WebPage.h: 2013-01-11 Andrew Lo [BlackBerry] Focus zoom animation doesn't occur on devices with physical keyboard https://bugs.webkit.org/show_bug.cgi?id=106719 Reviewed by Yong Li. Internally reviewed by Mike Fenton. Internal PR 278687 Always ensureFocusTextElementVisible if an element is focused when the device has a physical keyboard. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::setElementFocused): 2013-01-11 Otto Derek Cheung [BlackBerry] Modifying the databaseQuota call to WebPageClient https://bugs.webkit.org/show_bug.cgi?id=106703 Reviewed by Yong Li. The databaseQuota call in WebPageClientImpl is modified to take in BP:Strings directly. Also, we want to use the origin URL from the security origin. Not the database identifier. * Api/WebPageClient.h: * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::exceededDatabaseQuota): 2013-01-10 Yongxin Dai [BlackBerry] Handle the case that start/end position is out of unclipped selection region https://bugs.webkit.org/show_bug.cgi?id=106486 Reviewed by Rob Buis. PR #270624 Unclipped selection region should cover start/end position of the selection. Since we exclude hidden text when calculating unclipped selection region, the start/end position can be out of unclipped selection region if it is for hidden text. If that is the case, start/end handle will be invisible. To avoid invisible handle, we take unclipped selection region as reference rectangle in the case. Internally reviewed by Genevieve Mak, Mike Fenton * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::referencePoint): 2013-01-09 Genevieve Mak [BlackBerry] Useless if statement check https://bugs.webkit.org/show_bug.cgi?id=106113 Reviewed by Yong Li. Remove stray ! in if statement which was mistakenly left in during refactoring. Since Injected events are checked before they are sent to webkit, it didn't have an effect on behaviour. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::touchEvent): 2013-01-08 Otto Derek Cheung [BlackBerry] Removing the totalusage variable in ChromeClientBB::exceededDatabaseQuota https://bugs.webkit.org/show_bug.cgi?id=106370 Reviewed by Yong Li. Removing totalUsage in ChromeClientBlackBerry as we no longer use that variable. * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::exceededDatabaseQuota): 2013-01-08 Jacky Jiang [Blackberry][FullScreen] Create a helper method to adjust the fullscreen renderer dimensions https://bugs.webkit.org/show_bug.cgi?id=91748 Reviewed by Antonio Gomes. PR: 195524 The was originally from Antonio Gomes on PR195524. Bug 105488 has partially upstreamed that patch. This patch upstreams the rest of it. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::updateViewportSize): (BlackBerry::WebKit::WebPagePrivate::notifyTransformedScrollChanged): * Api/WebPage_p.h: (WebPagePrivate): * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::fullScreenRendererChanged): 2013-01-08 Mark Lam Removed the need for the ProposedDatabase mechanism. https://bugs.webkit.org/show_bug.cgi?id=106292. Reviewed by Sam Weinig. * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::exceededDatabaseQuota): * WebCoreSupport/ChromeClientBlackBerry.h: (ChromeClientBlackBerry): 2013-01-08 Sean Wang [BlackBerry] Can't select text out of current focused input https://bugs.webkit.org/show_bug.cgi?id=106322 Reviewed by Rob Buis. PR270755 Internally reviewed by Mike Fenton When selection changed, the selection handler clips new selection with current focused node's boundary. So we clear focus before selectObject. This patch clear focus when selectObject is at a point but not at a node. * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::selectObject): 2013-01-08 Steve Block Rename 'IntSize toSize(const IntPoint&)' to 'toIntSize' https://bugs.webkit.org/show_bug.cgi?id=106307 This matches other method names which distinguish between sizes and points. See https://bugs.webkit.org/show_bug.cgi?id=105992#c4. Reviewed by Kentaro Hara. * Api/InRegionScroller.cpp: (BlackBerry::WebKit::InRegionScrollerPrivate::setLayerScrollPosition): 2013-01-07 Genevieve Mak [BlackBerry] Touch Events are falling through fullscreen video https://bugs.webkit.org/show_bug.cgi?id=106112 Reviewed by Rob Buis. Reviewed Internally by Jakob Petsovits. PR #274326 Do not do viewport centering calculations if in fullscreen video. The offset should be zero. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setViewportSize): 2013-01-07 Jacky Jiang [BlackBerry] Roll out r136173 as there are alternative approaches from the client sides now https://bugs.webkit.org/show_bug.cgi?id=106236 Unreviewed, rolling out r136173. This becomes unnecessary now as there are alternative approaches to solve the issue from the client sides. * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::createWindow): 2013-01-07 Jakob Petsovits [BlackBerry] Never avoid blitting when one-shot drawing sync is involved. https://bugs.webkit.org/show_bug.cgi?id=106225 RIM PR 274948 Reviewed by George Staikos. Based on a patch by Chris Guan. didRenderContent() has a mechanism to avoid double blits; when scrolling or zooming is enabled then we don't issue blitContents() as the client would (continually) do that already. However, since r138024, didRenderContents() also deals with one-shot drawing synchronization and commits. When these are required, we can't just skip out or the backingstore and overlaying composited layers are likely to get out of sync. The condition also doesn't make much sense for direct rendering as no blit calls are issued at all when it is enabled. Fix the issue by limiting the impact of the scroll/zoom early return to only regular blit operations. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::didRenderContent): 2013-01-05 Andy Chen [BlackBerry] SelectionHandler::selectAtPoint should use last fat finger result when it is a link https://bugs.webkit.org/show_bug.cgi?id=106141 Reviewed by Rob Buis. If last fat finger result is a link, select it directly when SelectionHandler::selectAtPoint is called. PR 263449 Internally reviewed by Mike Fenton and Yongxin Dai. * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::selectNodeIfFatFingersResultIsLink): (WebKit): (BlackBerry::WebKit::SelectionHandler::selectAtPoint): * WebKitSupport/SelectionHandler.h: (WebKit): (SelectionHandler): 2013-01-04 Mike Lattanzio [BlackBerry] Last text input caret left visible when WebView entirely loses focus. https://bugs.webkit.org/show_bug.cgi?id=106124 Reviewed by George Staikos. Internal PR 248834 There are numerous code paths that lead to repainting of the focus node when the focus moves to another node, but none seem to cover the case of focus leaving the document when there are no DocumentMarkers present. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::setElementUnfocused): 2013-01-04 Otto Derek Cheung [BlackBerry] FCC will show up as you type if you tap on the same input bar twice before typing https://bugs.webkit.org/show_bug.cgi?id=106116 Reviewed by Yong Li. Internal reviewed by Gen Mak. PR 267177 FCC is being invoked because the fatfinger result is no longer a reliable source to tell whether the caret change is caused by user touch input. Instead, we recognize all notifyCaretChange calls with userTouchInput as true except when caretPositionChanged is invoked by SelectionHandler:inputHandlerDidFinishProcessingChange. * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::inputHandlerDidFinishProcessingChange): (BlackBerry::WebKit::SelectionHandler::notifyCaretPositionChangedIfNeeded): (BlackBerry::WebKit::SelectionHandler::caretPositionChanged): * WebKitSupport/SelectionHandler.h: (SelectionHandler): 2013-01-04 Yong Li [BlackBerry] Cached frame shouldn't access the page when being destroyed https://bugs.webkit.org/show_bug.cgi?id=105942 Reviewed by George Staikos. Fix regression of previous patch. dispatchDidHandleOnloadEvents() can be called after Frame has been detached. RIM PR# 271237. * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchDidHandleOnloadEvents): 2013-01-04 Nima Ghanavatian [BlackBerry] Allow defaultTabEventHandler to trigger on tab https://bugs.webkit.org/show_bug.cgi?id=106118 Reviewed by Yong Li. In order to support tabbing through input elements, amongst other things, we need to bipass the processing of the tab key as '\t'. This will simply insert 4 spaces in the field. Remove tab support from the key down map so that we don't translate it to an editor command. Internally reviewed by Mike Fenton. * WebCoreSupport/EditorClientBlackBerry.cpp: (WebCore): 2013-01-04 Mike Fenton [BlackBerry] Enable Input Focus when handling touch events for JS https://bugs.webkit.org/show_bug.cgi?id=106109 Reviewed by Yong Li. PR 273325. Toggle input mode active when a touch event is received for JS processing to ensure state is updated even when event is consumed. Reviewed Internally by Gen Mak. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::touchEvent): 2013-01-04 Adam Klein Remove ENABLE_MUTATION_OBSERVERS #define https://bugs.webkit.org/show_bug.cgi?id=105459 Reviewed by Ryosuke Niwa. * WebCoreSupport/AboutDataEnableFeatures.in: 2013-01-04 Anthony Scian [Blackberry] Static code analysis warning fixes https://bugs.webkit.org/show_bug.cgi?id=105679 Reviewed by Rob Buis. Klocwork issue 959: check layer against NULL since it is used in both cases of the subsequent if-stmt * Api/InRegionScroller.cpp: (BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint): 2013-01-02 Jacky Jiang [BlackBerry] file:/// pages don't get correct scales after several rotations and history navigations https://bugs.webkit.org/show_bug.cgi?id=105996 Reviewed by George Staikos. PR: 273541 When navigating back to the previous page on portrait mode, we were trying to set virtual viewport after recalculation. However, we didn't change the fixed layout size so that we still layouted the contents at the old virtual viewport size. In this case, the old virtual viewport was 570 * 293 which was set in landscape mode unfortunately. There would be no chance for such kind of contents size to fit the portrait mode screen size nicely. This was a regression of webkit/cc31d9bad where setViewMode() was removed as a noop. So just get setViewMode() back to apply the fixed layout size with a little bit change as SVG document path was proved invalid in that patch. Thanks to George for the float comparison change. Put a FIXME as we don't have a way to save the scale precisely before the rotation and history navigation currently. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setLoadState): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::saveViewStateToItem): 2013-01-02 Otto Derek Cheung [BlackBerry] Do not determine db quota limit using db file size https://bugs.webkit.org/show_bug.cgi?id=105991 PR 267191 Reviewed by George Staikos. Passing the current quota to WebPageClientImpl::databaseQuota so we can determine a better quota limit without using the db file size. * Api/WebPageClient.h: * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::exceededDatabaseQuota): 2013-01-02 Yong Li [BlackBerry] Cached frame shouldn't access the page when being destroyed https://bugs.webkit.org/show_bug.cgi?id=105942 Reviewed by George Staikos. In order to prevent our FrameLoaderClient from dangling WebPagePrivate object in any case, this patches clear the m_webPagePrivate pointer when the frame is detached or cached. RIM PR# 272137. * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::isMainFrame): (WebCore::FrameLoaderClientBlackBerry::detachedFromParent2): (WebCore::FrameLoaderClientBlackBerry::didSaveToPageCache): (WebCore::FrameLoaderClientBlackBerry::didRestoreFromPageCache): 2013-01-02 Nima Ghanavatian [BlackBerry] Use fatfingers result when checking for misspelled words https://bugs.webkit.org/show_bug.cgi?id=105923 Reviewed by Yong Li. PR270866 Currently we are using the raw touch point when checking to see if spell check is required on a word. When tapping close to a boundary, the raw point can be placed off but fatfingers moves the point onto the word. This causes the caret to be placed on a word but no spell check request triggered. Internally reviewed by Mike Fenton and Tiancheng Jiang * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint): 2012-12-28 Charles Wei [BlackBerry] Remove unused BackingStorePrivate::m_defersBlit https://bugs.webkit.org/show_bug.cgi?id=105811 RIM PR 272067 Reviewed by George Staikos. Internally Reviewed by Jakob Petsovits. BackingStorePrivate::m_defersBlit is not used anywhere, it should be removed to simplify the code and to avoid confusion. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate): (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents): * Api/BackingStore.h: * Api/BackingStore_p.h: (BackingStorePrivate): 2012-12-26 Jakob Petsovits [BlackBerry] Set load state for popups manually, in absence of a loader. https://bugs.webkit.org/show_bug.cgi?id=105708 RIM PR 257216 Reviewed by George Staikos. Internally reviewed by Chris Guan. The WebPage class relies on the load state for various things, among others it will only emit contents size changes after layouts if a load state other than None is set. Given that popups write the web page content itself with no loader that would issue such notifications, the load state should probably just be set manually in this case. * WebCoreSupport/PagePopupBlackBerry.cpp: (WebCore::PagePopupBlackBerry::init): 2012-12-26 Sean Wang [BlackBerry] Caret doesn't update position when scrolling text in Input element https://bugs.webkit.org/show_bug.cgi?id=105757 Reviewed by George Staikos. PR 271627 Internally reviewed by George Staikos. Call FrameSelection's updateAppearence instead of SelectionHandler's selectionPositionChanged to update the caret position. * Api/InRegionScroller.cpp: (BlackBerry::WebKit::InRegionScrollerPrivate::setLayerScrollPosition): 2012-12-25 Charles Wei [BlackBerry] Need to initialize the onLine in the global https://bugs.webkit.org/show_bug.cgi?id=105749 Reviewed by George Staikos. The NetworkStatus is initialized to online in the constructor by default, we need to update it correctly with the network status at startup. * Api/BlackBerryGlobal.cpp: (BlackBerry::WebKit::globalInitialize): 2012-12-24 Jakob Petsovits [BlackBerry] Fix various RenderQueue bugs introduced by r138024. https://bugs.webkit.org/show_bug.cgi?id=105717 RIM PR 269029 Reviewed by George Staikos. Scroll/zoom jobs were pretty solid, but I managed to leave some bugs in the region handling of RenderQueue's renderRegularRenderJobs() function, causing us to skip a desired blit or render operation in cases where the region and tile tracking did not match up. This commit fixes these errors. * WebKitSupport/RenderQueue.cpp: (BlackBerry::WebKit::RenderQueue::renderRegularRenderJobs): 2012-12-24 Charles Wei [BlackBerry] Close page popup when a page becomes invisible. https://bugs.webkit.org/show_bug.cgi?id=105704 Reviewed by George Staikos. Reviewed internally by Jakob Petsovits. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setVisible): 2012-12-23 Mary Wu [BlackBerry] give url when createWindow https://bugs.webkit.org/show_bug.cgi?id=105702 RIM bug# 257329 Reviewed by George Staikos. This is to revert previous commit 575407238c35f1a0fa7ff7dd5dbbf6cc3ece1107 for integration issue of cascade and air, as old app side still use the url to invoke. It would unrevert after resolving the integration issue. * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchCreatePage): 2012-12-23 Jakob Petsovits [BlackBerry] Specify tile usage enum for backingstore tiles. https://bugs.webkit.org/show_bug.cgi?id=105688 RIM PR 262120 Reviewed by George Staikos. This enables us to have separate tile sizes for backingstore / root layer purposes and generic layers. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::tileSize): 2012-12-21 Max Feil [BlackBerry] Fullscreen video fixed position container horizontal position is wrong https://bugs.webkit.org/show_bug.cgi?id=105488 Reviewed by George Staikos. The fix for https://bugs.webkit.org/show_bug.cgi?id=105333 has broken fullscreen video, which was compensating by doing its own positioning in x. My patch fixes things by making vertical and horizontal handling symmetrical. NOTE: This function was not upstreamed before, so you can't actually see my diff. See the bug. * Api/WebPage.cpp: (WebKit): (BlackBerry::WebKit::WebPagePrivate::adjustFullScreenElementDimensionsIfNeeded): 2012-12-18 Nima Ghanavatian [BlackBerry] Calculate correct word offsets for form elements. https://bugs.webkit.org/show_bug.cgi?id=105354 Reviewed by Rob Buis. PR266117 We need to calculate correct offsets for form elements, such as textareas, relative to the start of the field. This allows for correct spell checking of words in a textarea element after line breaks. Internally reviewed by Mike Fenton. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions): 2012-12-18 Genevieve Mak [BlackBerry] Remove extra call to doFatFingers. https://bugs.webkit.org/show_bug.cgi?id=105347 Reviewed by Rob Buis. Reviewed Internally by Mike Fenton. Now that we do fat fingers on touch start, we don't need this anymore. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::touchEvent): 2012-12-18 Genevieve Mak Bug 105344 - [BlackBerry] Make single line text edits touch scrollable. https://bugs.webkit.org/show_bug.cgi?id=105344 Reviewed by Antonio Gomes. Reviewed Internally by Mike Fenton. We don't need to check the overflow for editable layers because there's no need for overflow to be set by the content. PR #231776 * WebKitSupport/InRegionScrollableArea.cpp: (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea): 2012-12-18 Jakob Petsovits [BlackBerry] Build fix for r138024. https://bugs.webkit.org/show_bug.cgi?id=105199 RIM PR 260232 Reviewed by Yong Li. The clearVisibleTiles() function doesn't exist anymore and apparently I fail at merge conflict resolution. * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchDidLayout): 2012-12-18 Jakob Petsovits [BlackBerry] Clean up "frontState" vs. "geometry" naming confusion. https://bugs.webkit.org/show_bug.cgi?id=105331 RIM PR 260232 Reviewed by Adam Treat. The concept of the "front state" is going away or will be marginalized/renamed, but I don't want to clutter upcoming patches with renames. So do the variable renames in here, once, and have future patches focus on actual behavior changes. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::shouldDirectRenderingToWindow): (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect): (BlackBerry::WebKit::BackingStorePrivate::updateTilesAfterBackingStoreRectChange): (BlackBerry::WebKit::BackingStorePrivate::render): (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents): (BlackBerry::WebKit::BackingStorePrivate::compositeContents): (BlackBerry::WebKit::BackingStorePrivate::resetTiles): (BlackBerry::WebKit::BackingStorePrivate::updateTiles): (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion): (BlackBerry::WebKit::BackingStorePrivate::createSurfaces): 2012-12-18 Nima Ghanavatian [BlackBerry] Reduce calls to IMF on return https://bugs.webkit.org/show_bug.cgi?id=105308 Reviewed by Yong Li. PR207743 The extra calls of selection change and most importantly, end composition are sent incorrectly on return. This is causing our state to be reset every time we hit enter. Internally reviewed by Mike Fenton and Gen Mak. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::InputHandler): (BlackBerry::WebKit::InputHandler::nodeTextChanged): (BlackBerry::WebKit::InputHandler::selectionChanged): (BlackBerry::WebKit::InputHandler::handleKeyboardInput): (BlackBerry::WebKit::InputHandler::shouldNotifyWebView): (WebKit): * WebKitSupport/InputHandler.h: (InputHandler): 2012-12-18 Jakob Petsovits [BlackBerry] Remove the visible tile buffer from the BackingStore. https://bugs.webkit.org/show_bug.cgi?id=105302 RIM PR 260232 Reviewed by George Staikos. The visible tile buffer was introduced as an additional buffering solution that was necessary because other buffers would only cover part of the screen and could only be swapped one by one, with long blocking calls between each newly rendered tile. By carrying an old copy of all tiles at once, we were avoiding checkerboard and visual artifacts during load time when much zoom-to-fit action is going on. These days, the visual tile buffer hurts more than it helps, not only taking up lots of memory but also requiring complexity that we'd rather get rid of. Now that multiple buffers are being swapped into the user interface thread at once, the need for the visible tile buffer is no longer there and can be exchanged for standard geometry behavior. This patch simply deletes the visible tile buffer to use existing other code instead. Differences in behavior are non-existent or negligible. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents): (BlackBerry::WebKit::BackingStorePrivate::transformChanged): (BlackBerry::WebKit::BackingStorePrivate::orientationChanged): (BlackBerry::WebKit::BackingStorePrivate::createSurfaces): * Api/BackingStore_p.h: (BackingStorePrivate): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setViewportSize): * WebKitSupport/SurfacePool.cpp: (BlackBerry::WebKit::SurfacePool::SurfacePool): (BlackBerry::WebKit::SurfacePool::initialize): (BlackBerry::WebKit::SurfacePool::createBuffers): (BlackBerry::WebKit::SurfacePool::releaseBuffers): * WebKitSupport/SurfacePool.h: (SurfacePool): 2012-12-18 Jakob Petsovits [BlackBerry] Restructure the render queue to process multiple tiles at once. https://bugs.webkit.org/show_bug.cgi?id=105199 RIM PR 260232 Reviewed by George Staikos. Internally reviewed by Arvid Nilsson. Since my last big commit, r136442, the BackingStore's render() function is able to fetch multiple back buffers and swap them into the user interface thread in one go. However, it turns out that this is not enough to actually render to all of the available back buffers at once. The RenderQueue class was still working with a model based on processing one rectangle after another. This commit rewrites large parts of RenderQueue to issue render() calls for multiple tiles at once. As WebCore painting gets cheaper and blocking becomes more of an issue, this commit does away with paints smaller than tile size and always renders whole tiles at once. This means the demise of RenderRect. As an additional benefit, this means we can remove the copyPreviousContentsToTileBuffer() function which caused potential threading issues as it was accessing a buffer now owned by the UI thread from the WebKit thread. RenderQueue is also smarter than before in assigning batches, it now takes into account the number of available back buffers for rendering as well as excludes tiles outside contents boundaries. Regular render jobs continue being tracked as regions (and are being issued to didRenderContent()) with only the changed content regions. Everything else switches over to tile index lists from previously lists of rectangles. By default, we render as many tiles at once as we can grab back buffers, or until a given set of jobs is done. For high-priority jobs, render() will be called in a loop. To allow for the necessary changes in render() and improve reliability in the same go, we now call render() almost exclusively through RenderQueue. Other places would often call renderVisibleContents() in situations where rendering is not possible, geometries don't get updated, or content rendered notifications would not get issued to the client. By replacing renderVisibleContents() with a scheduled high-priority queue that's immediately being processed (but only if possible), these problems go away. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::resumeScreenUpdates): (BlackBerry::WebKit::BackingStorePrivate::repaint): (BlackBerry::WebKit::BackingStorePrivate::slowScroll): (BlackBerry::WebKit::BackingStorePrivate::renderJob): (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect): (BlackBerry::WebKit::BackingStorePrivate::updateTilesAfterBackingStoreRectChange): (BlackBerry::WebKit::BackingStorePrivate::indexesForBackingStoreRect): (BlackBerry::WebKit::BackingStorePrivate::clearAndUpdateTileOfNotRenderedRegion): (BlackBerry::WebKit::BackingStorePrivate::isCurrentVisibleJob): (BlackBerry::WebKit::BackingStorePrivate::renderDirectToWindow): (BlackBerry::WebKit::BackingStorePrivate::render): (BlackBerry::WebKit::BackingStorePrivate::renderAndBlitVisibleContentsImmediately): (BlackBerry::WebKit::BackingStorePrivate::renderAndBlitImmediately): (BlackBerry::WebKit::BackingStorePrivate::paintDefaultBackground): (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents): (BlackBerry::WebKit::BackingStorePrivate::compositeContents): (BlackBerry::WebKit::BackingStorePrivate::visibleTileIndexes): (BlackBerry::WebKit::BackingStorePrivate::resetTiles): (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion): (BlackBerry::WebKit::BackingStorePrivate::updateTile): (BlackBerry::WebKit::BackingStorePrivate::transformChanged): (BlackBerry::WebKit::BackingStorePrivate::didRenderContent): * Api/BackingStore_p.h: (BackingStorePrivate): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setLoadState): (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint): (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore): * Api/WebPageCompositor.cpp: (BlackBerry::WebKit::WebPageCompositorPrivate::animationFrameChanged): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchDidLayout): * WebKitSupport/RenderQueue.cpp: (BlackBerry::WebKit::compareRectOneDirection): (BlackBerry::WebKit::tileIndexIsLessThan): (WebKit): (BlackBerry::WebKit::tileIndexLessThanFunction): (BlackBerry::WebKit::TileIndexLessThan::TileIndexLessThan): (BlackBerry::WebKit::TileIndexLessThan::operator()): (TileIndexLessThan): (BlackBerry::WebKit::RenderQueue::reset): (BlackBerry::WebKit::RenderQueue::isEmpty): (BlackBerry::WebKit::RenderQueue::hasCurrentRegularRenderJob): (BlackBerry::WebKit::RenderQueue::hasCurrentVisibleZoomJob): (BlackBerry::WebKit::RenderQueue::hasCurrentVisibleScrollJob): (BlackBerry::WebKit::RenderQueue::isCurrentVisibleZoomJob): (BlackBerry::WebKit::RenderQueue::isCurrentVisibleZoomJobCompleted): (BlackBerry::WebKit::RenderQueue::isCurrentVisibleScrollJob): (BlackBerry::WebKit::RenderQueue::isCurrentVisibleScrollJobCompleted): (BlackBerry::WebKit::RenderQueue::isCurrentRegularRenderJob): (BlackBerry::WebKit::RenderQueue::tileIndexesIntersectingRegion): (BlackBerry::WebKit::RenderQueue::tileIndexesFullyContainedInRegion): (BlackBerry::WebKit::RenderQueue::tileRegion): (BlackBerry::WebKit::RenderQueue::addToQueue): (BlackBerry::WebKit::RenderQueue::addToRegularQueue): (BlackBerry::WebKit::RenderQueue::addToScrollZoomQueue): (BlackBerry::WebKit::RenderQueue::quickSort): (BlackBerry::WebKit::RenderQueue::visibleContentChanged): (BlackBerry::WebKit::RenderQueue::backingStoreRectChanging): (BlackBerry::WebKit::RenderQueue::clear): (BlackBerry::WebKit::RenderQueue::clearRegions): (BlackBerry::WebKit::RenderQueue::clearTileIndexes): (BlackBerry::WebKit::RenderQueue::render): (BlackBerry::WebKit::RenderQueue::renderRegularRenderJobs): (BlackBerry::WebKit::RenderQueue::renderScrollZoomJobs): (BlackBerry::WebKit::RenderQueue::scrollZoomJobsCompleted): * WebKitSupport/RenderQueue.h: (WebKit): (RenderQueue): * WebKitSupport/SurfacePool.cpp: (BlackBerry::WebKit::SurfacePool::numberOfAvailableBackBuffers): (BlackBerry::WebKit::SurfacePool::takeBackBuffer): * WebKitSupport/SurfacePool.h: (SurfacePool): * WebKitSupport/TileIndex.h: (WebKit): 2012-12-17 Sean Wang [BlackBerry] Editable text element can't be selected https://bugs.webkit.org/show_bug.cgi?id=105240 Reviewed by Rob Buis. Internally reviewed by Genevieve Mak and Mike Fenton. Internal PR266755 When the target is Text, we should allow it to collect text nodes in the shadow tree of text editable elements. * WebKitSupport/FatFingers.cpp: (BlackBerry::WebKit::FatFingers::getNodesFromRect): 2012-12-17 Yongxin Dai [BlackBerry] Prevent selection handles from being rendered after selection was canceled https://bugs.webkit.org/show_bug.cgi?id=105203 Reviewed by Rob Buis. PR255438 Here is the explanation why handles occur without selection overlay. 1. Still touch at current selection (Selection A) initiated by touch-hold 2. Selection expanding (Selection B) is ongoing 3. Finger moves. In UI thread: 1) SelectionHander::cancelSelection() gets called. a. Selection A is canceled immediately (clear selecting state and hide handles) b. Post a request to webkit thread to cancel Selection A. 4. In webkit thread: 1) Selection B becomes active selection a. Show selection overlay for Selection B b. Dispatch Selection B to UI thread to show handles 2) Handle the request of canceling Selection A. The selection A was gone. Instead the active Selection B is canceled. The visual change is Selection overlay for Selection B becomes invisible.. 5. In UI thread: Selection B is rendered. The start handle and the end handle occur without selection overlay. The fix is to notify client with a empty selection whenever the selection is canceled in webkit thread. Reviewed Internally by Mike Fenton. * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::cancelSelection): 2012-12-17 Yong Li [BlackBerry] Null pointer access in compositorDrawsRootLayer https://bugs.webkit.org/show_bug.cgi?id=105204 Reviewed by Rob Buis. PR# 267188. Add a null check for m_mainFrame in the function. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::compositorDrawsRootLayer): 2012-12-17 Andrew Lo [BlackBerry] Use application size rather than screen size where appropriate. https://bugs.webkit.org/show_bug.cgi?id=105201 Reviewed by Rob Buis. Internally reviewed by Jeff Rogers. Switch from screenSize to applicationSize where appropriate. Internal PR266400 * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::transformedViewportSize): (BlackBerry::WebKit::WebPagePrivate::setDefaultLayoutSize): * WebKitSupport/SurfacePool.cpp: (BlackBerry::WebKit::SurfacePool::initialize): 2012-12-17 Mike Fenton [BlackBerry] Improve DOMSupport visibleSelectionForClosestActualWordStart for content editable. https://bugs.webkit.org/show_bug.cgi?id=105198 Reviewed by Rob Buis. PR 258038. Improve closest word matching by giving preference to the left when distances are equal. Also enforce container matching to avoid selecting the paragraph marker if a CE div is followed immediately by a CE paragraph. Minor refactor - don't calculate the distance if the selection isn't on a word. Reviewed Internally by Gen Mak and Nima Ghanavatian. * WebKitSupport/DOMSupport.cpp: (BlackBerry::WebKit::DOMSupport::visibleSelectionForClosestActualWordStart): 2012-12-17 Jakob Petsovits [BlackBerry] Clean up log output in WebKit/blackberry. https://bugs.webkit.org/show_bug.cgi?id=104823 Reviewed by George Staikos. Behavior-preserving change, fixing many issues with logging: - Call logAlways() instead of BBLOG() in already defined-out debug blocks. - Call logAlways() instead of BBLOG() for serious errors, too. - Fix build for the DEBUG_OVERFLOW_DETECTION block in ChromeClientBlackBerry. - Fix build for double declarations of "elapsed" variables in RenderQueue. - Fix compiler warnings due to format string / parameter mismatches. - Remove unnecessary trailing newlines in logged strings. - Consistently use Platform:: as prefix except inside WebCore-namespaced code. - Use indentation that actually passes WebKit style checks. - Change point/size/rect output to use Platform toString() formats for consistency. * Api/BackingStore.cpp: (BlackBerry::WebKit::bestDivisor): (BlackBerry::WebKit::BackingStorePrivate::suspendBackingStoreUpdates): (BlackBerry::WebKit::BackingStorePrivate::suspendScreenUpdates): (BlackBerry::WebKit::BackingStorePrivate::resumeBackingStoreUpdates): (BlackBerry::WebKit::BackingStorePrivate::resumeScreenUpdates): (BlackBerry::WebKit::BackingStorePrivate::repaint): (BlackBerry::WebKit::BackingStorePrivate::slowScroll): (BlackBerry::WebKit::BackingStorePrivate::scroll): (BlackBerry::WebKit::BackingStorePrivate::renderJob): (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect): (BlackBerry::WebKit::BackingStorePrivate::updateTilesAfterBackingStoreRectChange): (BlackBerry::WebKit::BackingStorePrivate::scrollBackingStore): (BlackBerry::WebKit::BackingStorePrivate::render): (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents): (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion): (BlackBerry::WebKit::BackingStorePrivate::renderContents): (BlackBerry::WebKit::BackingStorePrivate::blitToWindow): (BlackBerry::WebKit::BackingStorePrivate::fillWindow): (BlackBerry::WebKit::BackingStorePrivate::invalidateWindow): (BlackBerry::WebKit::BackingStorePrivate::clearWindow): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setLoadState): (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint): (BlackBerry::WebKit::WebPagePrivate::contentsSizeChanged): (BlackBerry::WebKit::WebPagePrivate::zoomToInitialScaleOnLoad): (BlackBerry::WebKit::WebPage::touchEvent): (BlackBerry::WebKit::WebPagePrivate::scheduleRootLayerCommit): (BlackBerry::WebKit::WebPagePrivate::commitRootLayer): (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded): (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired): * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::overflowExceedsContentsSize): * WebKitSupport/FatFingers.cpp: (BlackBerry::WebKit::FatFingers::checkFingerIntersection): (BlackBerry::WebKit::FatFingers::findIntersectingRegions): (BlackBerry::WebKit::FatFingers::checkForText): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::convertStringToWchar): (BlackBerry::WebKit::convertStringToWcharVector): (BlackBerry::WebKit::convertSpannableStringToString): (BlackBerry::WebKit::InputHandler::learnText): (BlackBerry::WebKit::InputHandler::requestCheckingOfString): (BlackBerry::WebKit::InputHandler::spellCheckingRequestCancelled): (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed): (BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint): (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions): (BlackBerry::WebKit::InputHandler::setElementUnfocused): (BlackBerry::WebKit::InputHandler::setInputModeEnabled): (BlackBerry::WebKit::InputHandler::setElementFocused): (BlackBerry::WebKit::InputHandler::spellCheckBlock): (BlackBerry::WebKit::InputHandler::nodeTextChanged): (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible): (BlackBerry::WebKit::InputHandler::frameUnloaded): (BlackBerry::WebKit::InputHandler::selectionChanged): (BlackBerry::WebKit::InputHandler::setSelection): (BlackBerry::WebKit::InputHandler::handleKeyboardInput): (BlackBerry::WebKit::InputHandler::deleteTextRelativeToCursor): (BlackBerry::WebKit::InputHandler::deleteText): (BlackBerry::WebKit::InputHandler::spannableTextInRange): (BlackBerry::WebKit::InputHandler::setComposingRegion): (BlackBerry::WebKit::InputHandler::finishComposition): (BlackBerry::WebKit::InputHandler::setText): (BlackBerry::WebKit::InputHandler::setTextAttributes): (BlackBerry::WebKit::InputHandler::setRelativeCursorPosition): (BlackBerry::WebKit::InputHandler::setSpannableTextAndRelativeCursor): (BlackBerry::WebKit::InputHandler::setComposingText): (BlackBerry::WebKit::InputHandler::commitText): * WebKitSupport/RenderQueue.cpp: (BlackBerry::WebKit::RenderQueue::addToRegularQueue): (BlackBerry::WebKit::RenderQueue::addToScrollZoomQueue): (BlackBerry::WebKit::RenderQueue::render): (BlackBerry::WebKit::RenderQueue::renderAllCurrentRegularRenderJobs): (BlackBerry::WebKit::RenderQueue::startRegularRenderJobBatchIfNeeded): (BlackBerry::WebKit::RenderQueue::renderVisibleZoomJob): (BlackBerry::WebKit::RenderQueue::renderVisibleScrollJob): (BlackBerry::WebKit::RenderQueue::renderRegularRenderJob): (BlackBerry::WebKit::RenderQueue::renderNonVisibleScrollJob): * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::cancelSelection): (BlackBerry::WebKit::SelectionHandler::shouldUpdateSelectionOrCaretForPoint): (BlackBerry::WebKit::SelectionHandler::setCaretPosition): (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection): (BlackBerry::WebKit::SelectionHandler::setSelection): (BlackBerry::WebKit::SelectionHandler::selectObject): (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged): (BlackBerry::WebKit::SelectionHandler::caretPositionChanged): * WebKitSupport/SurfacePool.cpp: (BlackBerry::WebKit::SurfacePool::initialize): 2012-12-17 Anthony Scian [Blackberry] Static code analysis warning fixes https://bugs.webkit.org/show_bug.cgi?id=105129 Reviewed by Rob Buis. - disable copy/op= in BackingStore - cache and check intermediate values in parentLayer - disable copy/op= in InRegionScroller - disable copy/op= in WebPageGroupLoadDeferrer - disable copy/op= in WebSettings - disable copy/op= in WebViewportArguments - disable copy/op= in BackingStoreClient - disable copy/op= in TileBuffer - if stopNode is not NULL, loop could iterate past NULL; added NULL check to loop to make the code more robust * Api/BackingStore.h: * Api/InRegionScroller.cpp: (BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint): (BlackBerry::WebKit::parentLayer): * Api/InRegionScroller.h: * Api/WebPageGroupLoadDeferrer.h: * Api/WebSettings.h: * Api/WebViewportArguments.h: * WebKitSupport/BackingStoreClient.h: (BackingStoreClient): * WebKitSupport/BackingStoreTile.h: (TileBuffer): * WebKitSupport/DOMSupport.cpp: (BlackBerry::WebKit::DOMSupport::visibleTextQuads): 2012-12-16 Arvid Nilsson [BlackBerry] Adapt to new BlackBerry::Platform::TouchPoint API https://bugs.webkit.org/show_bug.cgi?id=105143 RIM PR 171941 Reviewed by Rob Buis. Internally reviewed by George Staikos. TouchPoint instances now provide document coordinates for the viewport and content position of the touch event. The pixel coordinates stored in the TouchPoint should no longer be needed in WebKit. One exception is when passing events to a full screen plugin. Also adapt to new method names and encapsulation of TouchPoint data members. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::touchEvent): (BlackBerry::WebKit::WebPage::touchPointAsMouseEvent): (BlackBerry::WebKit::WebPagePrivate::dispatchTouchEventToFullScreenPlugin): (BlackBerry::WebKit::WebPagePrivate::dispatchTouchPointAsMouseEventToFullScreenPlugin): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint): * WebKitSupport/InputHandler.h: (InputHandler): * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::doFatFingers): (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint): * WebKitSupport/TouchEventHandler.h: (TouchEventHandler): 2012-12-15 Anders Carlsson Rename FrameLoaderClient::download to convertMainResourceLoadToDownload https://bugs.webkit.org/show_bug.cgi?id=105122 Reviewed by Andreas Kling. Update for WebCore changes. * Api/WebPage.h: * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::convertMainResourceLoadToDownload): * WebCoreSupport/FrameLoaderClientBlackBerry.h: (FrameLoaderClientBlackBerry): 2012-12-16 Jacky Jiang [BlackBerry] GUIMark3 page is rendered at a large scale during history navigation back https://bugs.webkit.org/show_bug.cgi?id=105130 Reviewed by George Staikos. PR: 265999 During history navigation, UI thread can blit the contents at a bad view state before WebKit thread restores the view state. Suspend screen updates before goBackOrForward() and resume thereafter so that screen can be updated after the correct view state is updated. No need to render or blit here, as goBackOrForward() can dispatch a message to WebKit thread to do that in WebPagePrivate::restoreHistoryViewState(). * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::goBackOrForward): 2012-12-15 Nima Ghanavatian [BlackBerry] Pass key modifiers with touch and mouse events https://bugs.webkit.org/show_bug.cgi?id=105108 Reviewed by Rob Buis. Pass key modifiers to allow for added functionality, such as shift+click to highlight. Internally reviewed by Gen Mak. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::webContext): (BlackBerry::WebKit::WebPagePrivate::updateCursor): (BlackBerry::WebKit::WebPage::mouseEvent): (BlackBerry::WebKit::WebPage::touchPointAsMouseEvent): * Api/WebPage.h: * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::sendClickAtFatFingersPoint): (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint): (BlackBerry::WebKit::TouchEventHandler::handleFatFingerPressed): * WebKitSupport/TouchEventHandler.h: (TouchEventHandler): 2012-12-15 Nima Ghanavatian [BlackBerry] Clean up allocated memory from InputMethodSupport https://bugs.webkit.org/show_bug.cgi?id=105110 Reviewed by Rob Buis. PR265919 We are deep copying the spannable_string from IMF and freeing here once we're done with it. Internally reviewed by Jeff Rogers. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed): 2012-12-14 Parth Patel [BlackBerry] Allow plugins to be disabled by shared library filename https://bugs.webkit.org/show_bug.cgi?id=101274 Reviewed by Yong Li. Fixing build error. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::setExtraPluginDirectory): 2012-12-13 Jacky Jiang [BlackBerry][Fullscreen] Exiting fullscreen does not set the correct scroll position https://bugs.webkit.org/show_bug.cgi?id=104958 Reviewed by Antonio Gomes. Internally reviewed by Arvid Nilsson and Max Feil. PR: 231174 When leaving fullscreen, WebPage scale and scroll position can't return to the original scale and scroll position. We can't restore them in WebPagePrivate::exitFullScreenForElement() as they can still be changed thereafter during the async setViewportSize(). And also the async setViewportSize() from the app side isn't guaranteed as some apps don't need to resize the viewport if their windows are already fullscreen. The restoration is basically only needed if viewport size is changed. At the point of entering fullscreen, we can safely assume that there would be a viewport size change thereafter if the current visible size and screen size are not equal. Based on this assumption, we can save the scale and position before entering fullscreen and restore them in setViewportSize() thereafter. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::setViewportSize): * Api/WebPage_p.h: (WebPagePrivate): 2012-12-13 Yong Li [BlackBerry] Possible JS re-entrancy caused by UI event handler https://bugs.webkit.org/show_bug.cgi?id=84862 Reviewed by Rob Buis. Fix an obvious bug in previous patch. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::deferredTasksTimerFired): 2012-12-13 Parth Patel , Max Feil Allow plugins to be disabled by shared library filename https://bugs.webkit.org/show_bug.cgi?id=101274 Reviewed by Antonio Gomes. Mechanism allows plugins to be disabled by specifying their shared library filenames. Once disabled, a plugin's shared library should never be loaded. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::setExtraPluginDirectory): (WebKit): (BlackBerry::WebKit::WebPage::updateDisabledPluginFiles): * Api/WebPage.h: 2012-12-12 Gyuyoung Kim NetworkInfoController needs to support destructor https://bugs.webkit.org/show_bug.cgi?id=104642 Reviewed by Kentaro Hara. Though NetworkInfoController can be referenced by each port in order to update network status change, there is no virtual interface to destroy it. Beside each port client also needs to be destroyed when controller is destroyed. * WebCoreSupport/NetworkInfoClientBlackBerry.cpp: (WebCore::NetworkInfoClientBlackBerry::networkInfoControllerDestroyed): (WebCore): * WebCoreSupport/NetworkInfoClientBlackBerry.h: (NetworkInfoClientBlackBerry): 2012-12-12 Mike Lattanzio [BlackBerry] Ensure InRegionScrollableArea is valid before using. https://bugs.webkit.org/show_bug.cgi?id=104832 Reviewed by Antonio Gomes. Make sure the InRegionScrollableArea we are about to scroll is still valid by ensuring its present in our cache of scrollable areas. Internal PR: 258475 Internal Review: Gen Mak We cache a RefPtr for each scrollable area at the time we discover them, but this cache can get cleared anytime and then the references will be released. If a request comes in to scroll a region which no longer exists we have to ignore it. * Api/InRegionScroller.cpp: (BlackBerry::WebKit::InRegionScrollerPrivate::setScrollPositionCompositingThread): (BlackBerry::WebKit::InRegionScrollerPrivate::setScrollPositionWebKitThread): (BlackBerry::WebKit::InRegionScrollerPrivate::isValidScrollableLayerWebKitThread): (WebKit): (BlackBerry::WebKit::InRegionScrollerPrivate::isValidScrollableNode): * Api/InRegionScroller_p.h: (WebCore): (InRegionScrollerPrivate): * WebKitSupport/InRegionScrollableArea.cpp: (BlackBerry::WebKit::InRegionScrollableArea::cachedScrollableLayer): (WebKit): (BlackBerry::WebKit::InRegionScrollableArea::cachedScrollableNode): * WebKitSupport/InRegionScrollableArea.h: (InRegionScrollableArea): 2012-12-12 Mark Lam Encapsulate externally used webdatabase APIs in DatabaseManager. https://bugs.webkit.org/show_bug.cgi?id=104741. Reviewed by Sam Weinig. Use DatabaseManager instead of accessing DatabaseTracker, AbstractDatabase, and DatabaseContext directly. This is to prepare for upcoming webkit2 refactoring. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::didChangeSettings): * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::exceededDatabaseQuota): 2012-12-12 Mike Fenton [BlackBerry] Fix word matching algorithm to account for adjacent divs with no whitespace between them. https://bugs.webkit.org/show_bug.cgi?id=104837 Reviewed by Rob Buis. PR 258038. Fix selection at the end of content editable text block. The next character may be in the next block bypassing the distance comparison logic we have, remove the check for next character being whitespace Reviewed Internally by Nima Ghanavatian. * WebKitSupport/DOMSupport.cpp: (BlackBerry::WebKit::DOMSupport::visibleSelectionForClosestActualWordStart): 2012-12-12 Alexey Proskuryakov Make LOG() work in WebProcess and NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=104718 Reviewed by Tim Horton. * Api/BlackBerryGlobal.cpp: Include InitializeLogging.h 2012-12-11 Kihong Kwon Vibration API: IDL type doesn't match implementation type https://bugs.webkit.org/show_bug.cgi?id=103899 Reviewed by Kentaro Hara. According to WebIDL, "unsigned long" corresponds to "unsigned" in the platform. Therefore unsigned long need to be changed to unsigned for the Vibration API. - Change a parameter type of vibrate function from unsigned long to unsigned. * WebCoreSupport/VibrationClientBlackBerry.cpp: (WebCore::VibrationClientBlackBerry::vibrate): * WebCoreSupport/VibrationClientBlackBerry.h: (VibrationClientBlackBerry): 2012-12-11 Nima Ghanavatian [BlackBerry] Redraw spell check dialog after rotation. https://bugs.webkit.org/show_bug.cgi?id=104737 Reviewed by Rob Buis. After rotating the device, all dialogs are dismissed. We should restore the spell check dialog as it is still valid after rotation and the user will expect it there. Internally reviewed by Mike Fenton and Gen Mak. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::applyPendingOrientationIfNeeded): 2012-12-11 Nima Ghanavatian [BlackBerry] Shift the spell check dialog to align with text after transformation https://bugs.webkit.org/show_bug.cgi?id=104716 Reviewed by Rob Buis. PR245033 As the page is transformed, we should redraw the dialog box to align with the new text position. We send a message to move the dialog box from different spots to account for scrolling. This includes keyboard transitions from hidden to displayed and centering of focus around a new touch point. We do not reposition on manual user scrolling of the page, as this simply dismisses the dialog. Internally reviewed by Mike Fenton and Gen Mak. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setViewportSize): * Api/WebPageClient.h: * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::scroll): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::InputHandler): (BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint): (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions): (BlackBerry::WebKit::InputHandler::redrawSpellCheckDialogIfRequired): (WebKit): * WebKitSupport/InputHandler.h: (InputHandler): (BlackBerry::WebKit::InputHandler::clearDidSpellCheckState): (BlackBerry::WebKit::InputHandler::didSpellCheckWord): * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint): 2012-12-11 Genevieve Mak [BlackBerry] Avoid multiple calls to fat fingers https://bugs.webkit.org/show_bug.cgi?id=104703 Reviewed by Rob Buis. We already run fat fingers on touch start. No need to do it again in the general use case. * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint): 2012-12-11 Mike West Web Inspector: ConsoleTypes should not expose MessageType - it should be private to inspector. https://bugs.webkit.org/show_bug.cgi?id=66371 Reviewed by Pavel Feldman. Drops WebCore::MessageType from the addMessageToConsole method. * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::addMessageToConsole): * WebCoreSupport/ChromeClientBlackBerry.h: (ChromeClientBlackBerry): 2012-12-10 Max Feil [BlackBerry] Flash content is being rendered as garbled characters when Flashplayer is disabled https://bugs.webkit.org/show_bug.cgi?id=104505 Reviewed by Antonio Gomes. The check to allow video and audio as the source of embed and object elements is causing a problem when the Flashplayer plugin is disabled. We have to take Flash content into account in this check otherwise the swf contents will be rendered as garbled text characters where there should just be blank space. * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::createPlugin): 2012-12-10 Parth Patel [BlackBerry] Make hiddenPageDomTimerInterval a setting https://bugs.webkit.org/show_bug.cgi?id=104555 Reviewed by Yong Li. HiddenPageDomTimerInterval in setting in webcore can be utilized by browser application when needed. * Api/BlackBerryGlobal.cpp: (BlackBerry::WebKit::globalInitialize): 2012-12-10 Nima Ghanavatian [BlackBerry] Fix warning for comparison between signed and unsigned https://bugs.webkit.org/show_bug.cgi?id=104563 Reviewed by Rob Buis. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::isCaretAtEndOfText): 2012-12-10 Charles Wei [BlackBerry] Webkit crashes sometimes (even though very rarely) when deleting a webview https://bugs.webkit.org/show_bug.cgi?id=104504 Reviewed by George Staikos. When deleting a webview, the webkit thread will send a sync message to userInterfaceThread to delete handlers, including the viewport accessor. But the UserInterfaceThread could be doing a blit after it has deleted the viewport accessor and before the webkit thread gets the time slot to resume it's operation to clean up the webview, which leaves a very short time that viewport accessor of a webpage has been deleted while the webpage is still in the process of deleting, and the viewport accessor is referenced in the UserInterfaceThread. So we need to check if the viewport accessor is NULL before using it in the backingstore code. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents): (BlackBerry::WebKit::BackingStorePrivate::invalidateWindow): 2012-12-10 Kent Tamura Refactoring: Introduce HTMLFormControlElement::isDisabledOrReadOnly https://bugs.webkit.org/show_bug.cgi?id=104508 Reviewed by Kentaro Hara. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::openDatePopup): Use isDisabledOrReadOnly. (BlackBerry::WebKit::InputHandler::openColorPopup): Ditto. 2012-12-08 Jacky Jiang [BlackBerry] Google results page rendering issue with RTL languages like arabic/hebrew https://bugs.webkit.org/show_bug.cgi?id=104451 Reviewed by Rob Buis. PR: 206372 On Google results page, we layout the contents at the width of 833. However, "appbar" and "top_nav" elements which have width 980 cause overflow during the last layout and make the contents width larger. The other renderers still stay at the old width unfortunately which results in blank areas on the left side of the Google results RTL page. Give it a chance to request another layout if overflow exceeds the contents size and the page doesn't have virtual viewport, as this layout will pick up the absolute visible overflow width within DEFAULT_MAX_LAYOUT_WIDTH and update the other renderers. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::overflowExceedsContentsSize): (WebKit): * Api/WebPage_p.h: (WebPagePrivate): 2012-12-08 Mike Fenton [BlackBerry] Enforce selection of last work when triggering caret based selection https://bugs.webkit.org/show_bug.cgi?id=104447 Reviewed by Rob Buis. PR 249225. When the selection has reached the end of an input field, ensure the last word is selected by adjusting the caret. Reviewed Internally by Gen Mak. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::isCaretAtEndOfText): (WebKit): * WebKitSupport/InputHandler.h: (InputHandler): * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::selectObject): 2012-12-08 Chris Hutten-Czapski [BlackBerry] Remove about:credits https://bugs.webkit.org/show_bug.cgi?id=104399 Reviewed by Rob Buis. Just a simple removal. * WebKitSupport/AboutData.cpp: 2012-12-08 Rob Buis [BlackBerry] Remove no-op line in WebPage.cpp https://bugs.webkit.org/show_bug.cgi?id=104385 Reviewed by Antonio Gomes. Remove self-assignment no-op line. Must have been left when I removed the mapFromTransformed part. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::touchPointAsMouseEvent): 2012-12-07 Nima Ghanavatian [BlackBerry] General code cleanup and improved logging. https://bugs.webkit.org/show_bug.cgi?id=104389 Reviewed by Rob Buis. Internally reviewed by Mike Fenton * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::convertStringToWchar): (BlackBerry::WebKit::InputHandler::requestCheckingOfString): (BlackBerry::WebKit::InputHandler::handleKeyboardInput): 2012-12-07 Nima Ghanavatian [BlackBerry] Strip whitespace from learned text. https://bugs.webkit.org/show_bug.cgi?id=104391 Reviewed by Rob Buis. This was removing the first word from the sentence being learned. Using stripWhiteSpace to remove spaces from the start and end of the text. Internally reviewed by Mike Fenton. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::learnText): 2012-12-07 Otto Derek Cheung [BlackBerry] GeolocationClientBB should show file system path in prompts when host is not avaliable https://bugs.webkit.org/show_bug.cgi?id=103785 PR 247656 Reviewed by Rob Buis. Adding a special case for origins with protocol "file". We will use the filepath as an origin when asking for geolocation permission. If the origin is unique (ie. from a sandboxed iframe), we will fail the location request right away. * WebCoreSupport/GeolocationClientBlackBerry.cpp: (getOrigin): (GeolocationClientBlackBerry::requestPermission): (GeolocationClientBlackBerry::cancelPermissionRequest): 2012-12-07 Mike Lattanzio [BlackBerry] Update BlackBerry Port to use new Graphics::createBuffer BufferType enum values. https://bugs.webkit.org/show_bug.cgi?id=104121 Reviewed by Rob Buis. Update createBuffer calls to reflect new BufferType enum. Set buffers opaque if possible to avoid unnecessary blends. Internal PR 254649 Internal Review: Jakob Petsovits * WebKitSupport/BackingStoreTile.cpp: (BlackBerry::WebKit::TileBuffer::nativeBuffer): 2012-12-07 Andrew Lo [BlackBerry] Double zoom animation when focusing on input field. https://bugs.webkit.org/show_bug.cgi?id=104375 Reviewed by Rob Buis. Internally reviewed by Jakob Petsovits. UI thread does not need to be notified of a scale change if the WebKit thread scale has not changed. This caused issues when two viewport resizes occured one after the other. Before the scale change due to the first resize could be set in the WK thread's scale value, it caused WK thread to dispatch a scaleChanged, overwritting & resetting the new UI thread scale value, resulting in the double zoom animation. The larger issue dealing with synchronization between the threads where scale changes could occur on either thread, however that is beyond the scope of this change. Internal PR253122 * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::shouldZoomAboutPoint): 2012-12-07 Xiaobo Wang [BlackBerry] DRT - Update implementation of TestRunner.setCustomPolicyDelegate() https://bugs.webkit.org/show_bug.cgi?id=104243 RIM PR 259337 Reviewed by Rob Buis. 1. Add DRT callback in dispatchDecidePolicyForResponse. 2. Pass frame pointer to DRT callback in dispatchDecidePolicyForNavigationAction, so that it can be used to calculate originating. 3. Fix some webkit style errors. The patch fixed the following tests: - http/tests/download - fast/forms/mailto/formenctype-attribute-button-html.html - fast/forms/mailto/formenctype-attribute-input-html.html - fast/encoding/mailto-always-utf-8.html * Api/DumpRenderTreeClient.h: * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForResponse): (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction): (WebCore::FrameLoaderClientBlackBerry::transitionToCommittedForNewPage): (WebCore::FrameLoaderClientBlackBerry::dispatchDidFinishLoad): (WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad): (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendRequest): (WebCore::FrameLoaderClientBlackBerry::decidePolicyForExternalLoad): 2012-12-05 Otto Derek Cheung [BlackBerry] Geolocation prompts won't respond to the correct geolocation object if the user opens two pages and respond in the reversed order https://bugs.webkit.org/show_bug.cgi?id=104162 PR 257505 Reviewed by Yong Li. GeolocationClientBlackBerry will register itself to GeolocationHandler when it has a pending request. When browser responds with WebPageClientImpl::setAllowGeolocation, we go through the list and let all the pending GeolocationListeners know that a certain origin has been aceepted/denied. * WebCoreSupport/GeolocationClientBlackBerry.cpp: (GeolocationClientBlackBerry::geolocationDestroyed): (GeolocationClientBlackBerry::requestPermission): (GeolocationClientBlackBerry::cancelPermissionRequest): (GeolocationClientBlackBerry::onPermission): 2012-12-05 Jakob Petsovits [BlackBerry] Better crash fix for resetting tiles on a backingstore takeover. https://bugs.webkit.org/show_bug.cgi?id=103969 RIM PR 258415 Reviewed by Adam Treat. The previous attempt for releasing tile buffers from the previously active backingstore did not take into account that resetTiles() would sometimes return early without having swapped the tiles and thus reclaiming them. This patch removes the early returns, because it's safe to swap in an empty geometry at any time and we should always take the chance when we get it. Also put the code that calls resetTiles() on an owner switch right into setCurrentBackingStoreOwner(), so that it will also release the buffers when the BackingStore is destroyed (the function is then called with 0). * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::resetTiles): (WebKit): (BlackBerry::WebKit::BackingStorePrivate::setCurrentBackingStoreOwner): * Api/BackingStore.h: Had to add the friend here to make the moved code work from the static function. * Api/BackingStore_p.h: (BackingStorePrivate): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore): 2012-12-05 Jakob Petsovits [BlackBerry] Keep screen updates suspended until after a viewport resize. https://bugs.webkit.org/show_bug.cgi?id=104041 Reviewed by Adam Treat. Now that screen and backing store updates can be suspended and resumed separately from each other, prevent blits for the whole duration of setViewportSize() and always issue a blit at the end. Makes WebPage::setViewportSize() more robust in threaded usage, easier to read/understand, and gets rid of a couple of FIXMEs. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setViewportSize): 2012-12-05 Andrew Lo [BlackBerry] Scroll position shifts while FCC & selection handle are dragged https://bugs.webkit.org/show_bug.cgi?id=104156 Reviewed by Rob Buis. Internally reviewed by Mike Fenton. Only ensureFocusTextElementVisible on selectionChanged when an element is being re-focused. Internal PR256329 * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::InputHandler): (BlackBerry::WebKit::InputHandler::setElementFocused): (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible): (BlackBerry::WebKit::InputHandler::selectionChanged): * WebKitSupport/InputHandler.h: (InputHandler): 2012-12-05 Leo Yang [BlackBerry] Enable CSS_IMAGE_RESOLUTION https://bugs.webkit.org/show_bug.cgi?id=104132 Reviewed by Yong Li. * WebCoreSupport/AboutDataEnableFeatures.in: 2012-12-05 Jacky Jiang [BlackBerry] meta viewport pages are rendered at a bad initial scale https://bugs.webkit.org/show_bug.cgi?id=104122 Reviewed by Rob Buis. Internally reviewed by Arvid Nilsson. PR: 240378 Many websites are rendered at a very bad initial scale because they both specify meta viewport tag and have large width elements. In such a case we will think the meta viewport tag is broken if the width of any element is larger than the calculated layout viewport width. The fix to this is straightforward that we will zoom the page to fit the screen to have better user experience instead of respecting the meta viewport. This can fix the issue on the websites such as www.travelpod.com, www.forbes.com, interfacelift.com, www.sky.com, raphaeljs.com and so on. If non-empty m_userViewportArguments is applied, then we will force to respect the viewport arguments. In this way we will restrict the fix to browser only. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::setLoadState): (BlackBerry::WebKit::WebPagePrivate::respectViewport): (WebKit): (BlackBerry::WebKit::WebPagePrivate::initialScale): (BlackBerry::WebKit::WebPagePrivate::maximumScale): (BlackBerry::WebKit::WebPagePrivate::dispatchViewportPropertiesDidChange): * Api/WebPage_p.h: (BlackBerry::WebKit::WebPagePrivate::isUserScalable): (WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::minimumScale): 2012-12-05 Otto Derek Cheung [BlackBerry] GeolocationClientBB only holding the latest geolocation permission request https://bugs.webkit.org/show_bug.cgi?id=104123 PR 256089 Reviewed by Yong Li. Add a mapping between origin URL and it's geolocation object so we could respond to the correct geolocation when libwebview responds with onPermission in GeolocationClient. Using the mapping, we could also prevent requestGeolocation requests from the same origin to be sent twice. This prevents pages that hold two iframes to the same resource to request geolocation permission on the same security origin twice. Tested this by running a page that includes 2 or more iframes that requests geolocation permission. * WebCoreSupport/GeolocationClientBlackBerry.cpp: (GeolocationClientBlackBerry::requestPermission): (GeolocationClientBlackBerry::cancelPermissionRequest): (GeolocationClientBlackBerry::onPermission): * WebCoreSupport/GeolocationClientBlackBerry.h: (GeolocationClientBlackBerry): 2012-12-05 Yongxin Dai [BlackBerry] Avoid showing FCC on empty text field in a different way https://bugs.webkit.org/show_bug.cgi?id=104019 Reviewed by Rob Buis. PR #222796 Add text field empty flag along with the caret change notification so that FineCursorContnrol is able to avoid showing FCC on empty text filed. Previous approach, notifying client with empty caret on empty text field, causes problem. Its code is removed. Reviewed Internally by Mike Fenton. * Api/WebPageClient.h: * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::caretPositionChanged): 2012-12-04 Sean Wang [BlackBerry] VKB flickers in and out when tapping on webview after text selection on URL bar https://bugs.webkit.org/show_bug.cgi?id=103874 PR245678 Reviewed by Rob Buis. Internally reviewed by Mike Fenton. When the virtual keyboard is hiding, the viewport is changed and the page needs to relayout.At the same time, the user interface thread is executing compositeLayers and it will dispatch the updateDelegatedOverlays() to webkit thread which will trigger the selectionPositionChanged() in webkit thread. When the selectionPositionChanged() calls frame->selection()->selection(). visibleStart() and frame->selection()->selection().visibleEnd(), it will trigger page relayout and return the relayouted selection start and end position. These positions are out of the range which is recorded before its relayout. As a result it think the selection start and end are all clipped out and it send out an "empty selection"(not selected) changing event. When the WebPageClient receives the empty selection changing event, it will consider the selection process aborted and might cancel selection-related user interaction. This is not what we intend to happen. This patch stops the changing handling process and returns when the page needs relayout, and the selection will be updated again when the page finishs relayout. * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged): 2012-12-04 Andrew Lo [BlackBerry] Scroll adjustments while typing scroll off page, then bounce back. https://bugs.webkit.org/show_bug.cgi?id=104045 Reviewed by Rob Buis. Internally reviewed by Mike Fenton & Jakob Petsovits. Internal PR253845 The main frame's view should only be temporarily set to not constrain scrolling to the content edge while the scroll position is set at the end of the scroll animation. Remove ensureFocusTextElementVisible from setSpannableTextAndRelativeCursor in InputHandler since FrameSelection::revealSelection already implements scroll adjustments due to typing. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::zoomBlock): (BlackBerry::WebKit::WebPagePrivate::resetBlockZoom): * Api/WebPage_p.h: (WebPagePrivate): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible): (BlackBerry::WebKit::InputHandler::setSpannableTextAndRelativeCursor): 2012-12-04 Mike Fenton [BlackBerry] Remove assert and fix conditional for out of bounds requests in InputHandler::spannableTextInRange https://bugs.webkit.org/show_bug.cgi?id=104001 Reviewed by Rob Buis. PR 257723. Remove assert and update early return to allow out of bounds request at end of field. Reviewed Internally by Gen Mak. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::spannableTextInRange): 2012-12-04 Jakob Petsovits [BlackBerry] Store rendered regions in pixel contents coordinates. https://bugs.webkit.org/show_bug.cgi?id=103930 PR 253496 Reviewed by Rob Buis. Internally reviewed by Adam Treat. Previously, the rendered region of a tile used to be stored in coordinates relative to the tile origin. This brings no benefits whatsoever and causes a lot of unnecessary transformations, together with the potential of incorrectly transforming rendered regions. By storing the rendered region as what it is, everything is more compact, easier to understand and easier to use with other existing functionality. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::clearAndUpdateTileOfNotRenderedRegion): (BlackBerry::WebKit::BackingStorePrivate::isCurrentVisibleJob): (BlackBerry::WebKit::BackingStorePrivate::render): (BlackBerry::WebKit::BackingStorePrivate::renderVisibleContents): (BlackBerry::WebKit::BackingStorePrivate::copyPreviousContentsToTileBuffer): (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents): (BlackBerry::WebKit::BackingStorePrivate::compositeContents): (BlackBerry::WebKit::BackingStorePrivate::blitTileRect): (BlackBerry::WebKit::BackingStorePrivate::isTileVisible): (BlackBerry::WebKit::BackingStorePrivate::visibleTilesRect): (BlackBerry::WebKit::BackingStorePrivate::tileVisibleContentsRect): (BlackBerry::WebKit::BackingStorePrivate::tileContentsRect): (BlackBerry::WebKit::BackingStorePrivate::updateTiles): (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion): (BlackBerry::WebKit::BackingStorePrivate::mapFromPixelContentsToTiles): (BlackBerry::WebKit::BackingStorePrivate::transformChanged): (BlackBerry::WebKit::BackingStorePrivate::blitToWindow): * Api/BackingStore_p.h: (BackingStorePrivate): * WebKitSupport/BackingStoreTile.cpp: (BlackBerry::WebKit::TileBuffer::surfaceRect): (BlackBerry::WebKit::TileBuffer::pixelContentsRect): (WebKit): (BlackBerry::WebKit::TileBuffer::isRendered): (BlackBerry::WebKit::TileBuffer::notRenderedRegion): * WebKitSupport/BackingStoreTile.h: (TileBuffer): 2012-12-04 Jakob Petsovits [BlackBerry] Use updated API for backingstore tiles. https://bugs.webkit.org/show_bug.cgi?id=103970 PR 212369 Reviewed by George Staikos. Internally reviewed by Arvid Nilsson. We now make use of Platform::Settings::tileSize() in the backingstore and don't hardcode the number of back buffers like we used to. * Api/BackingStore.cpp: (BlackBerry::WebKit::bestDivisor): (BlackBerry::WebKit::BackingStorePrivate::tileWidth): (BlackBerry::WebKit::BackingStorePrivate::tileHeight): (BlackBerry::WebKit::BackingStorePrivate::tileSize): * WebKitSupport/AboutData.cpp: (BlackBerry::WebKit::configPage): * WebKitSupport/SurfacePool.cpp: (BlackBerry::WebKit::SurfacePool::SurfacePool): (BlackBerry::WebKit::SurfacePool::numberOfBackingStoreFrontBuffers): (BlackBerry::WebKit::SurfacePool::initialize): * WebKitSupport/SurfacePool.h: (SurfacePool): 2012-12-04 Jakob Petsovits [BlackBerry] On taking over a backingstore, reset the previous page's tiles. https://bugs.webkit.org/show_bug.cgi?id=103969 RIM PR 253496 Reviewed by George Staikos. With buffers being explicitly reclaimed from backingstore geometries, we have to make sure that the previously active backingstore releases its front buffers for use in the newly active one. Previously, this clearing of backingstore tiles occurred after the dormant backingstore is reactivated, the backingstore active in the meantime would just use the back buffer anyway and leave the dormant one with dangling pointers that would just not be shown. Now that we have a counted list of back buffers, we need to be explicit about this thing upfront. Fixes a crash that would occur after switching ownership of the backingstore to a different WebPage. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore): 2012-12-03 Jakob Petsovits [BlackBerry] Refactor the backingstore to swap full geometries. https://bugs.webkit.org/show_bug.cgi?id=103924 RIM PR 253496 Reviewed by Yong Li. Internally reviewed by Adam Treat and Arvid Nilsson. The backingstore had a working split between front and back state, but it was multilayered and hard to grasp. This commit cleanly divides the responsibilities of BackingStoreGeometry and TileBuffer, with the latter now being able to function on its own without the help of its geometry. The BackingStoreTile class was an unnecessary middleman and can be removed wholesale. A BackingStoreGeometry can now function with null tiles being assigned to its indices, which enables us to reclaim tile buffers outside of the visible contents area as back buffers. This reduces the need to swap and block when the backingstore size exceeds the contents size, and also lets us use more tiles for initial rendering after a call to resetTiles() which is now implemented as swapping in a geometry with only null buffers. setBackingStoreRect() was the only function that had to get a change of behavior. Because we're now constructing new BackingStoreGeometry objects every time the front geometry is being exchanged for a new one, it is only safe to call other functions reliant on the new geometry after it has been finalized and put in place. Therefore, updateTilesForScrollOrNotRenderedRegion() takes on the render queue maintenance tasks that setBackingStoreRect() had performed previously. It was already doing something very similar so only few changes to the function were necessary. This commit will make subsequent changes to the backingstore geometry and tile logic a lot easier. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStoreGeometry::isTileCorrespondingToBuffer): (WebKit): (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate): (BlackBerry::WebKit::BackingStorePrivate::~BackingStorePrivate): (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect): (BlackBerry::WebKit::BackingStorePrivate::updateTilesAfterBackingStoreRectChange): (BlackBerry::WebKit::BackingStorePrivate::clearAndUpdateTileOfNotRenderedRegion): (BlackBerry::WebKit::BackingStorePrivate::clearRenderedRegion): (BlackBerry::WebKit::BackingStorePrivate::isCurrentVisibleJob): (BlackBerry::WebKit::BackingStorePrivate::render): (BlackBerry::WebKit::BackingStorePrivate::copyPreviousContentsToTileBuffer): (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents): (BlackBerry::WebKit::BackingStorePrivate::compositeContents): (BlackBerry::WebKit::BackingStorePrivate::blitTileRect): (BlackBerry::WebKit::BackingStorePrivate::tileVisibleContentsRect): (BlackBerry::WebKit::BackingStorePrivate::resetTiles): (BlackBerry::WebKit::BackingStorePrivate::updateTiles): (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion): (BlackBerry::WebKit::BackingStorePrivate::mapFromTilesToTransformedContents): (BlackBerry::WebKit::BackingStorePrivate::mapFromTransformedContentsToTiles): (BlackBerry::WebKit::BackingStorePrivate::transformChanged): (BlackBerry::WebKit::BackingStorePrivate::createSurfaces): (BlackBerry::WebKit::BackingStoreGeometry::originOfTile): (BlackBerry::WebKit::BackingStorePrivate::adoptAsFrontState): * Api/BackingStore_p.h: (WebKit): (BackingStoreGeometry): (BlackBerry::WebKit::BackingStoreGeometry::tileBufferAt): (BackingStorePrivate): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setLoadState): (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore): (BlackBerry::WebKit::WebPagePrivate::setViewportSize): * Api/WebPage_p.h: (WebKit): * WebKitSupport/BackingStoreTile.cpp: (BlackBerry::WebKit::TileBuffer::TileBuffer): (BlackBerry::WebKit::TileBuffer::~TileBuffer): (BlackBerry::WebKit::TileBuffer::isRendered): (BlackBerry::WebKit::TileBuffer::nativeBuffer): (BlackBerry::WebKit::TileBuffer::wasNativeBufferCreated): (BlackBerry::WebKit::TileBuffer::paintBackground): * WebKitSupport/BackingStoreTile.h: (BlackBerry::WebKit::TileBuffer::lastRenderOrigin): (BlackBerry::WebKit::TileBuffer::setLastRenderOrigin): (BlackBerry::WebKit::TileBuffer::lastRenderScale): (BlackBerry::WebKit::TileBuffer::setLastRenderScale): (TileBuffer): (BlackBerry::WebKit::TileBuffer::backgroundPainted): * WebKitSupport/SurfacePool.cpp: (BlackBerry::WebKit::SurfacePool::SurfacePool): (BlackBerry::WebKit::SurfacePool::size): (WebKit): (BlackBerry::WebKit::SurfacePool::initialize): (BlackBerry::WebKit::SurfacePool::initializeVisibleTileBuffer): (BlackBerry::WebKit::SurfacePool::hasBackBuffer): (BlackBerry::WebKit::SurfacePool::takeBackBuffer): (BlackBerry::WebKit::SurfacePool::addBackBuffer): (BlackBerry::WebKit::SurfacePool::createBuffers): (BlackBerry::WebKit::SurfacePool::releaseBuffers): (BlackBerry::WebKit::SurfacePool::notifyBuffersComposited): * WebKitSupport/SurfacePool.h: (BlackBerry::WebKit::SurfacePool::isActive): (BlackBerry::WebKit::SurfacePool::isEmpty): (SurfacePool): (BlackBerry::WebKit::SurfacePool::visibleTileBuffer): 2012-12-03 Cosmin Truta [BlackBerry] Enable HIDDEN_PAGE_DOM_TIMER_THROTTLING https://bugs.webkit.org/show_bug.cgi?id=103842 Reviewed by Yong Li. Add HIDDEN_PAGE_DOM_TIMER_THROTTLING. * WebCoreSupport/AboutDataEnableFeatures.in: 2012-12-02 Tiancheng Jiang [BlackBerry]Tap highlight https://bugs.webkit.org/show_bug.cgi?id=103787 Reviewed by Rob Buis. RIM PR 248626 Internally Reviewed by Genevieve Mak. Draw tap highlight as soon as tap on element. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::touchEvent): * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint): * WebKitSupport/TouchEventHandler.h: (TouchEventHandler): 2012-11-28 Cosmin Truta [BlackBerry] Set the minimal DOM timer interval to 4 milliseconds https://bugs.webkit.org/show_bug.cgi?id=103534 Reviewed by Yong Li. We align this behavior with other platforms. * Api/BlackBerryGlobal.cpp: (BlackBerry::WebKit::globalInitialize): 2012-11-29 Otto Derek Cheung [BlackBerry] Modifying GeoClientBlackBerry to switch between high and low accuracy https://bugs.webkit.org/show_bug.cgi?id=103666 Reviewed by Yong Li. Internally reviewed by Yong Li. PR 243420 Updating GeolocationClientBlackBerry to switch accuracy when GeolocationController calls setEnableHighAccuracy. * WebCoreSupport/GeolocationClientBlackBerry.cpp: (GeolocationClientBlackBerry::startUpdating): (GeolocationClientBlackBerry::setEnableHighAccuracy): 2012-11-29 Andrew Lo [BlackBerry] Do not adjust scroll position on viewport resizes that are not orientation change related https://bugs.webkit.org/show_bug.cgi?id=103659 Reviewed by Rob Buis. Internally reviewed by Gen Mak. Internal PR253893. Only adjust scroll position during an orientation change when setting viewport size. We don't want the scroll position jumping around when opening & closing the VKB. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setViewportSize): 2012-11-28 Otto Derek Cheung [BlackBerry] CookieJarBlackBerry will use document settings for cookiesEnabled https://bugs.webkit.org/show_bug.cgi?id=103560 Reviewed by Rob Buis. PR 253490 Syncing platform Websetting's cookieEnabled value with Page->setting's cookieEnabled value. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::didChangeSettings): 2012-11-27 James Simonsen Consolidate FrameLoader::load() into one function taking a FrameLoadRequest https://bugs.webkit.org/show_bug.cgi?id=102151 Reviewed by Adam Barth. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::load): (BlackBerry::WebKit::WebPagePrivate::loadString): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad): 2012-11-27 Jacky Jiang [BlackBerry] http:// origins can navigate to privileged local:// origins https://bugs.webkit.org/show_bug.cgi?id=103437 Reviewed by Yong Li. PR: 251489 When we aren't allowed to display the destination origin, we shouldn't even create the window for it. In this way we can block the remote origins(like http://) window.open local origins(like file:// and local://) and avoid further security issues. Chrome and Safari will open a blank window and fail to load. Firefox will fail to open the window and report a load failure error which has the same behavior as us. I would prefer this way as the window would be useless and the calls after that would be harmful to us. * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::createWindow): 2012-11-27 Andrew Lo [BlackBerry] Remove unnecessary backing store suspension in InputHandler::ensureFocusTextElementVisible https://bugs.webkit.org/show_bug.cgi?id=103441 Reviewed by Rob Buis. Internally reviewed by Mike Fenton. Remove unnecessary backing store suspension in InputHandler::ensureFocusTextElementVisible. Not necessary anymore since both zoom and scroll adjustments happen in an animation. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible): 2012-11-27 Sheriff Bot Unreviewed, rolling out r135786. http://trac.webkit.org/changeset/135786 https://bugs.webkit.org/show_bug.cgi?id=103379 It made 3 plugin tests timeout on several platforms (Requested by Ossy on #webkit). * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::load): (BlackBerry::WebKit::WebPagePrivate::loadString): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad): 2012-11-26 James Simonsen Consolidate FrameLoader::load() into one function taking a FrameLoadRequest https://bugs.webkit.org/show_bug.cgi?id=102151 Reviewed by Adam Barth. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::load): (BlackBerry::WebKit::WebPagePrivate::loadString): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad): 2012-11-26 Genevieve Mak [BlackBerry] Form controls don't show pressed state. https://bugs.webkit.org/show_bug.cgi?id=103292 Reviewed by Rob Buis. Reviewed internally by Eli Fidler and Mike Lattanzio. We weren't sending touch events to webpages unless they had JS touch event listeners which form controls don't have. Now send them always and do a little cleanup. PR #249791 * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPage::touchEvent): * Api/WebPageClient.h: * Api/WebPage_p.h: (WebPagePrivate): * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::needTouchEvents): 2012-11-26 Nima Ghanavatian [BlackBerry] Null check calls associated with retrieving the caret rect. https://bugs.webkit.org/show_bug.cgi?id=103281 Reviewed by Rob Buis. Some of these calls can return null, which could lead to a crash. Internally reviewed by Gen Mak. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions): 2012-11-26 Jonathan Dong [BlackBerry] Should not autofill username and password when there're more than one password inputs on the same page https://bugs.webkit.org/show_bug.cgi?id=103104 Reviewed by Rob Buis. RIM PR: 245334 Added the oldPassword detection back into the password input detection logic, which was removed for simplicity when imported those pieces of codes from Chromium. And we won't do autofill when there're more than one password field detected. Internally reviewed by Rob Buis. * WebCoreSupport/CredentialTransformData.cpp: (WebCore::CredentialTransformData::CredentialTransformData): (WebCore::CredentialTransformData::findPasswordFormFields): * WebCoreSupport/CredentialTransformData.h: (CredentialTransformData): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendSubmitEvent): 2012-11-25 Jacky Jiang [BlackBerry] Get rid of resetBitmapZoomScale() https://bugs.webkit.org/show_bug.cgi?id=103200 Reviewed by Rob Buis. Internally reviewed by Gen Mak. PR: 235707 Right now, resetBitmapZoomScale() takes an unused paramter and dispatches a message to end the bitmap zooming. However, the interaction has its own state machine to start bitmap zooming when it is active and end bitmap zooming when it is inactive. This is expecially for pinch zoom and scroll. From WebKit side, block zoom which will call zoomBlock when the bitmap zoom finished doesn't even need to dispatch the useless ending message to ZoomHandler. resetBitmapZoomScale() is basically a noop for block zoom. And likewise that is useless for zoomToInitialScaleOnLoad(). It can also potentially cause problem if it is used somewhere else in the future and incidentally breaks the interaction's own state machine. So just remove this completely. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::zoomToInitialScaleOnLoad): (BlackBerry::WebKit::WebPagePrivate::zoomBlock): * Api/WebPageClient.h: 2012-11-24 Andy Chen [BlackBerry] Find-on-page keeps stale pointer https://bugs.webkit.org/show_bug.cgi?id=103190 Reviewed by Rob Buis. Find on page: pendingScopingEffort stores stale pointer when frames unload, we need to cancel those scoping efforts. PR 250807. Internally reviewed by Yongxin Dai and Mike Fenton. * WebKitSupport/InPageSearchManager.cpp: (InPageSearchManager::DeferredScopeStringMatches): (BlackBerry::WebKit::InPageSearchManager::frameUnloaded): 2012-11-24 Genevieve Mak [BlackBerry] Text not selected when input field focused. https://bugs.webkit.org/show_bug.cgi?id=103182 Reviewed by George Staikos. Reviewed Internally by: Mike Fenton, Eli Fidler PR #250163 * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::selectObject): 2012-11-23 Nima Ghanavatian [BlackBerry] Define platform limitations in platform layer https://bugs.webkit.org/show_bug.cgi?id=103160 Reviewed by Rob Buis. Taking length as const unsigned in checkSpellingOfStringAsync. This value is unchanging and should never be less than 0, even in an error case. Internally reviewed by Mike Fenton. * Api/WebPageClient.h: * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::requestCheckingOfString): 2012-11-23 Jacky Jiang [BlackBerry] Meta viewport can't be changed dynamically https://bugs.webkit.org/show_bug.cgi?id=103098 Reviewed by Rob Buis. Internally reviewed by Arvid Nilsson. PR: 237072 Reset m_userPerformedManualZoom and enable m_shouldZoomToInitialScaleAfterLoadFinished so that we can relayout the page and zoom it to fit the screen when we dynamically change the meta viewport after the load is finished. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::dispatchViewportPropertiesDidChange): 2012-11-23 Genevieve Mak [BlackBerry] Drop Synchronous Mouse Events https://bugs.webkit.org/show_bug.cgi?id=102980 Reviewed by Rob Buis. Reviewed Internally by George Staikos and Mike Lattanzio. Don't send actual Touch Events to fullscreen plugins unless its a Touch Cancel, DoubleTap or TouchHold. Instead send mouse events as long as its a single finger. PR #242781 * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::touchPointAsMouseEvent): (BlackBerry::WebKit::WebPagePrivate::dispatchTouchEventToFullScreenPlugin): (WebKit): (BlackBerry::WebKit::WebPagePrivate::dispatchTouchPointAsMouseEventToFullScreenPlugin): 2012-11-23 Andrew Lo [BlackBerry] InputHandler::ensureFocusTextElementVisible incorrectly used y coordinate as x coordinate https://bugs.webkit.org/show_bug.cgi?id=103091 Reviewed by Yong Li. Internally reviewed by Mike Fenton. Internal PR249523 Incorrectly used y coordinate as x coordinate in InputHandler::ensureFocusTextElementVisible. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible): 2012-11-22 Jeff Rogers [BlackBerry] Update Web Notifications Implementation https://bugs.webkit.org/show_bug.cgi?id=102621 Reviewed by George Staikos. Reviewed internally by George Staikos and Joe Mason Internal PR 172120 Add new notifications implementation for the BlackBerry port. Rename existing class to match Client naming. Adds NotificationManager implementation for managing notifications and permissions, and logic for passing the notifications to the platform provider. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::init): (BlackBerry::WebKit::WebPage::updateNotificationPermission): (WebKit): (BlackBerry::WebKit::WebPage::notificationClicked): (BlackBerry::WebKit::WebPage::notificationClosed): (BlackBerry::WebKit::WebPage::notificationError): (BlackBerry::WebKit::WebPage::notificationShown): * Api/WebPage.h: * Api/WebPageClient.h: * Api/WebPage_p.h: (WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::notificationManager): * WebCoreSupport/NotificationClientBlackBerry.cpp: Added. (WebCore): (WebCore::NotificationClientBlackBerry::NotificationClientBlackBerry): (WebCore::NotificationClientBlackBerry::show): (WebCore::NotificationClientBlackBerry::cancel): (WebCore::NotificationClientBlackBerry::clearNotifications): (WebCore::NotificationClientBlackBerry::notificationObjectDestroyed): (WebCore::NotificationClientBlackBerry::notificationControllerDestroyed): (WebCore::NotificationClientBlackBerry::requestPermission): (WebCore::NotificationClientBlackBerry::cancelRequestsForPermission): (WebCore::NotificationClientBlackBerry::checkPermission): * WebCoreSupport/NotificationClientBlackBerry.h: Added. (WebKit): (WebCore): (NotificationClientBlackBerry): * WebCoreSupport/NotificationPresenterImpl.cpp: Removed. * WebCoreSupport/NotificationPresenterImpl.h: Removed. * WebKitSupport/NotificationManager.cpp: Added. (WebKit): (BlackBerry::WebKit::NotificationManager::NotificationManager): (BlackBerry::WebKit::NotificationManager::~NotificationManager): (BlackBerry::WebKit::NotificationManager::show): (BlackBerry::WebKit::NotificationManager::cancel): (BlackBerry::WebKit::NotificationManager::clearNotifications): (BlackBerry::WebKit::NotificationManager::notificationObjectDestroyed): (BlackBerry::WebKit::NotificationManager::requestPermission): (BlackBerry::WebKit::NotificationManager::cancelRequestsForPermission): (BlackBerry::WebKit::NotificationManager::checkPermission): (BlackBerry::WebKit::NotificationManager::updatePermission): (BlackBerry::WebKit::NotificationManager::notificationClicked): (BlackBerry::WebKit::NotificationManager::notificationClosed): (BlackBerry::WebKit::NotificationManager::notificationError): (BlackBerry::WebKit::NotificationManager::notificationShown): (BlackBerry::WebKit::NotificationManager::removeNotificationFromContextMap): * WebKitSupport/NotificationManager.h: Added. (WebKit): (NotificationManager): 2012-11-22 Mike Fenton [BlackBerry] Guard against a lost focusedNode that input handler isn't yet informed of. https://bugs.webkit.org/show_bug.cgi?id=103071 Reviewed by Rob Buis. Fix potential for a crash if input mode is active but we can't get a focusedNode. Reviewed Internally by Gen Mak. * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::setCaretPosition): 2012-11-21 Genevieve Mak [BlackBerry] Drop Synchronous Mouse Events https://bugs.webkit.org/show_bug.cgi?id=102980 Reviewed by Rob Buis. Reviewed Internally by George Staikos, Mike Lattanzio and Mike Fenton. Get rid of unneeded methods and simplify code. Send click if getting context over an empty text field so that it will be focused and have a caret. PR #242781 * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::webContext): (BlackBerry::WebKit::WebPage::touchEvent): (BlackBerry::WebKit::WebPage::touchPointAsMouseEvent): (BlackBerry::WebKit::WebPage::touchEventCancel): * Api/WebPage.h: * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::TouchEventHandler): (BlackBerry::WebKit::TouchEventHandler::doFatFingers): (BlackBerry::WebKit::TouchEventHandler::sendClickAtFatFingersPoint): (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint): (BlackBerry::WebKit::TouchEventHandler::handleFatFingerPressed): * WebKitSupport/TouchEventHandler.h: (TouchEventHandler): 2012-11-21 Konrad Piascik [BlackBerry] Prevent screen from dimming on device when inspector front-end is connected https://bugs.webkit.org/show_bug.cgi?id=102978 Reviewed by Rob Buis. Internal PR 200848 We prevent screen from going dim when the front-end is connected and return to normal when the front-end disconnects. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::enableWebInspector): (BlackBerry::WebKit::WebPage::disableWebInspector): 2012-11-21 Konrad Piascik [BlackBerry] Don't add empty rects to the tap highlight region. https://bugs.webkit.org/show_bug.cgi?id=102966 Reviewed by George Staikos. Internal PR 246960 Tap highlight is way too large sometimes. When we add an empty rect it inflates by 2 and causes the tap region to extend to the origin. * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::drawTapHighlight): 2012-11-21 Mike Fenton [BlackBerry] Switch to point instead of VisiblePosition comparison for input bounds check https://bugs.webkit.org/show_bug.cgi?id=102962 Reviewed by Rob Buis. PR 247270. Switch from using VisiblePosition to determine if we are in a node to a comparison of the field bounds. This fixes the case where there is no node before the target node to match. Reviewed Internally by Gen Mak. * WebKitSupport/DOMSupport.cpp: * WebKitSupport/DOMSupport.h: * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::setCaretPosition): 2012-11-20 Andrew Lo [BlackBerry] Animated gifs pause on scroll or zoom and sometimes don't resume after scroll or zoom completes https://bugs.webkit.org/show_bug.cgi?id=102838 Reviewed by Rob Buis. Internally reviewed by Adam Treat. Internal PR244646 When entering scrolling & zooming, we suspend regular render jobs in order to pause animations. When finishing scrolling or zooming, dispatch a render job in order to resume those animations. If an animation requests a repaint while the backing store is suspended, add the regular render job to the render queue so that it can be processed later. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::repaint): (BlackBerry::WebKit::BackingStorePrivate::setScrollingOrZooming): 2012-11-20 Sheriff Bot Unreviewed, rolling out r135295. http://trac.webkit.org/changeset/135295 https://bugs.webkit.org/show_bug.cgi?id=102834 This patch causes assertion to some layout tests on chromium (Requested by jianli on #webkit). * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::load): (BlackBerry::WebKit::WebPagePrivate::loadString): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad): 2012-11-20 James Simonsen Consolidate FrameLoader::load() into one function taking a FrameLoadRequest https://bugs.webkit.org/show_bug.cgi?id=102151 Reviewed by Adam Barth. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::load): (BlackBerry::WebKit::WebPagePrivate::loadString): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad): 2012-11-19 Genevieve Mak [BlackBerry] Block Zoom picks wrong block https://bugs.webkit.org/show_bug.cgi?id=102728 Reviewed by Rob Buis. Reviewed Internally by Jakob Petsovits Remove transform missed in previous commit for https://bugs.webkit.org/show_bug.cgi?id=101608 PR #247198 * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::nodeForZoomUnderPoint): 2012-11-19 Liam Quinn [BlackBerry] Remove RTSP handling from FrameLoaderClientBlackBerry https://bugs.webkit.org/show_bug.cgi?id=102692 Reviewed by Rob Buis. Reviewed internally by George Staikos. Internal PR 242750. Our RTSP handling in FrameLoaderClientBlackBerry causes HTTP redirects to "rtsp:" URIs to fail. Remove handling of RTSP from this class; it will be moved to the network layer alongside other URI schemes like "data:" and "file:". * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::createDocumentLoader): 2012-11-16 Adam Treat https://bugs.webkit.org/show_bug.cgi?id=102540 [BlackBerry] Checkerboard flicker when pinch zooming out on google.com/nwshp Reviewed by George Staikos. PR 245827 Disable updates to the backingstore tile matrix when backingstore updates are disabled. This prevents changes to the tile matrix when we are in the middle of a pinch zoom which can cause checkebroard flickering. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate): (BlackBerry::WebKit::BackingStorePrivate::resumeBackingStoreUpdates): (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect): (BlackBerry::WebKit::BackingStorePrivate::render): (BlackBerry::WebKit::BackingStorePrivate::renderVisibleContents): (BlackBerry::WebKit::BackingStorePrivate::renderBackingStore): (BlackBerry::WebKit::BackingStorePrivate::updateTileMatrixIfNeeded): (BlackBerry::WebKit::BackingStorePrivate::contentsSizeChanged): (BlackBerry::WebKit::BackingStorePrivate::orientationChanged): * Api/BackingStore_p.h: (BlackBerry::WebKit::BackingStorePrivate::setTileMatrixNeedsUpdate): (BackingStorePrivate): 2012-11-16 Rob Buis [BlackBerry] FCC doesn't work in textarea https://bugs.webkit.org/show_bug.cgi?id=102088 Reviewed by Antonio Gomes. Remove the cancel button specializations, it was needed at some point but hitting it works just as well without it. This unbreaks FCC in textarea's. * WebKitSupport/FatFingers.cpp: (BlackBerry::WebKit::FatFingers::isElementClickable): 2012-11-16 Adam Treat [BlackBerry] Fix regression causing checkerboard flicker after app wake-up https://bugs.webkit.org/show_bug.cgi?id=102526 Reviewed by George Staikos. PR 245027 The webkit patch for 219976 introduced an undesirable behavior change resulting in a regression where there was checkerboard flickering on resuming from an inactive application state. This patch restores the previous behavior and fixes the regression. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStore::createBackingStoreMemory): (BlackBerry::WebKit::BackingStore::releaseBackingStoreMemory): 2012-11-16 Mike Fenton [BlackBerry] Use proper keycode value for space instead of hardcoded value. https://bugs.webkit.org/show_bug.cgi?id=102518 Reviewed by Rob Buis. Remove hard coded value for space. Reviewed Internally by Gen Mak. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::setText): 2012-11-15 Andrew Lo [BlackBerry] Animate changes to viewport due to input focus changes. https://bugs.webkit.org/show_bug.cgi?id=102410 Reviewed by Rob Buis. When changing scroll position or zoom level for input field focus, animate the change. Internal PR 231937 Internally reviewed by Mike Fenton. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible): 2012-11-15 Mike Fenton [BlackBerry] Don't restore zoom and scroll when leaving an input field. https://bugs.webkit.org/show_bug.cgi?id=102376 Reviewed by Yong Li. Restoring the zoom causes undesirable behavior when switching between fields. Reviewed Internally by Andrew Lo. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::InputHandler): (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible): * WebKitSupport/InputHandler.h: (InputHandler): 2012-11-15 Jakob Petsovits [BlackBerry] Fix suspend/resume assertion in setCompositor(). https://bugs.webkit.org/show_bug.cgi?id=102397 RIM PR 244701 Reviewed by Adam Treat. If a compositor is used but no surface pool is ever allocated (which is a perfectly valid use case), initial suspension of the backingstore is skipped because of an early return. This will cause an assertion to be triggered and a bug. Fix this by suspending it before the return. With Adam Treat's recent change to split suspension of screen and backingstore into two different functions, this can now be reduced to a mere screen (blitting) suspension. That was the original intention of this code. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::createSurfaces): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setCompositor): 2012-11-15 Jakob Petsovits [BlackBerry] Leave surface resizing to the client. https://bugs.webkit.org/show_bug.cgi?id=102280 RIM PR 235034 RIM PR 160619 Reviewed by Adam Treat. Now that we always blit on the user interface thread and use the client's userInterfaceViewportAccessor() to determine the destination rectangle for blitting, changing the viewport size does not affect the window or target surface directly. The only way that blitted output is affected is through layout, scroll position or scale changes. None of these require us to synchronize with the UI thread to resize its target surface. This commit simplifies setViewportSize() and removes a blocking message dispatch by simply offloading all surface resizing responsibilities to the client. This is safer, cleaner and easier. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPage::setScreenOrientation): (BlackBerry::WebKit::WebPagePrivate::setViewportSize): * Api/WebPage.h: * Api/WebPageClient.h: * Api/WebPage_p.h: (WebPagePrivate): 2012-11-14 Nima Ghanavatian [BlackBerry] Do not clear the ProcessingChangeGuard state on DeleteBackward https://bugs.webkit.org/show_bug.cgi?id=102284 Reviewed by Rob Buis. PR237497 When holding backspace, clearing the state forces a keyboard update which resets the state of the keyboard. Handling this specific corner case separate from all other editor commands. Internally reviewed by Mike Fenton. * WebCoreSupport/EditorClientBlackBerry.cpp: (WebCore::EditorClientBlackBerry::handleKeyboardEvent): 2012-11-14 Rob Buis [BlackBerry] Improve debug functionality in FatFingers https://bugs.webkit.org/show_bug.cgi?id=102263 Reviewed by Antonio Gomes. - use logAlways to log even in release. - dump shadow tree info if available. * WebKitSupport/FatFingers.cpp: (BlackBerry::WebKit::FatFingers::isElementClickable): (BlackBerry::WebKit::FatFingers::checkFingerIntersection): (BlackBerry::WebKit::FatFingers::findIntersectingRegions): (BlackBerry::WebKit::FatFingers::checkForText): 2012-11-14 Adam Treat [BlackBerry] Break suspend/resume of the backingstore and screen into separate methods https://bugs.webkit.org/show_bug.cgi?id=102126 Reviewed by George Staikos. PR 219976 Modify the suspend/resume methods so that they can be called from the UI thread itself and split up the suspend/resume methods so that we can suspend/resume the screen or backingstore separately. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::suspendBackingStoreUpdates): (WebKit): (BlackBerry::WebKit::BackingStorePrivate::suspendScreenUpdates): (BlackBerry::WebKit::BackingStorePrivate::resumeBackingStoreUpdates): (BlackBerry::WebKit::BackingStorePrivate::resumeScreenUpdates): (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents): (BlackBerry::WebKit::BackingStorePrivate::createSurfaces): (BlackBerry::WebKit::BackingStore::suspendBackingStoreUpdates): (BlackBerry::WebKit::BackingStore::resumeBackingStoreUpdates): (BlackBerry::WebKit::BackingStore::suspendScreenUpdates): (BlackBerry::WebKit::BackingStore::resumeScreenUpdates): (BlackBerry::WebKit::BackingStore::createBackingStoreMemory): (BlackBerry::WebKit::BackingStore::releaseBackingStoreMemory): * Api/BackingStore.h: * Api/BackingStore_p.h: (BackingStorePrivate): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setLoadState): (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint): (BlackBerry::WebKit::WebPagePrivate::zoomBlock): (BlackBerry::WebKit::WebPage::destroy): (BlackBerry::WebKit::WebPagePrivate::setViewportSize): (BlackBerry::WebKit::WebPagePrivate::setCompositor): (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement): (BlackBerry::WebKit::WebPagePrivate::restoreHistoryViewState): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::transitionToCommittedForNewPage): (WebCore::FrameLoaderClientBlackBerry::restoreViewState): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::setBatchEditingActive): 2012-11-14 Andy Chen [BlackBerry] Add FocusBased context node detection strategy https://bugs.webkit.org/show_bug.cgi?id=102238 Reviewed by Rob Buis. If last fat finger result is invalid, we need to return current focus element as context node, because when user tap on selection overlay, there is not touch event sent to webkit. PR 241382 Internally reviewed by Genevieve Mak and Mike Fenton. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::contextNode): * Api/WebPage.h: * WebKitSupport/InputHandler.h: (BlackBerry::WebKit::InputHandler::currentFocusElement): 2012-11-14 Nima Ghanavatian [BlackBerry] Use mispelled-marker offsets relative to the element https://bugs.webkit.org/show_bug.cgi?id=102236 Reviewed by Rob Buis. DocumentMarker offsets are calculated relative to a node. This is causing problems for contenteditable which can have numerous nodes. Creating a Range around a word and calculating its location and length gives us the correct override in this case for starting and ending points to pass to IMF. Internally reviewed by Mike Fenton. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions): 2012-11-13 Mike Fenton [BlackBerry] Fully restore both zoom and scroll when leaving an input field. https://bugs.webkit.org/show_bug.cgi?id=102094 Reviewed by Rob Buis. PR 234187. Cache both the zoom and scroll position prior to adjusting for input focus so that state can be reset fully. Reviewed Internally by Gen Mak. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible): * WebKitSupport/InputHandler.h: (InputHandler): 2012-11-12 Nima Ghanavatian [BlackBerry] Ensure we only receive one KeyUp per key event https://bugs.webkit.org/show_bug.cgi?id=101967 Reviewed by Rob Buis. We are creating synthetic KeyUps too often, and get into trouble since IMF will send up a KeyUp on all key events. Furthermore, these KeyUps can arrive both when we are composing and not. To bypass this check, we are storing the KeyDown character and comparing against it on KeyUp. Internally reviewed by Mike Fenton. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::InputHandler): (BlackBerry::WebKit::InputHandler::handleKeyboardInput): (BlackBerry::WebKit::InputHandler::insertText): (BlackBerry::WebKit::InputHandler::setText): * WebKitSupport/InputHandler.h: (InputHandler): 2012-11-12 Jacky Jiang [BlackBerry] When opening an image it does not scale to fit our window https://bugs.webkit.org/show_bug.cgi?id=101778 Reviewed by Rob Buis. Internally reviewed by Konrad Piascik. PR: 230935 For image document, the actual image size can be different with the contents size. Zoom the document based on the image width so that images can fit the screen horizontally. Set 2.0 as the maximum zoom to fit scale for image document so that very small images won't get ridiculous large scales during the initial load. * Api/WebPage.cpp: (WebKit): (BlackBerry::WebKit::WebPagePrivate::zoomToFitScale): 2012-11-12 Nima Ghanavatian [BlackBerry] Use keyevents instead of editor commands for backspace https://bugs.webkit.org/show_bug.cgi?id=101663 Reviewed by Rob Buis. PR229395 Sending keyEvents for backspace and switching from KeyChar to KeyDown since we are still receiving an unadultered KeyUp from the input service. This was causing us to get two keyUps for regular keys and no key downs for backspace since it was triggering an editor command and bypassing JS listeners. Reviewed internally by Mike Fenton. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::handleKeyboardInput): (BlackBerry::WebKit::relativeRightOffset): (WebKit): (BlackBerry::WebKit::InputHandler::deleteTextRelativeToCursor): (BlackBerry::WebKit::InputHandler::setText): 2012-11-12 Rob Buis [BlackBerry] Crash in InRegionScrollerPrivate. https://bugs.webkit.org/show_bug.cgi?id=101399 Reviewed by Yong Li. Fix warning caused by the previous patch for this bug (r133679). * WebKitSupport/InRegionScrollableArea.cpp: (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea): 2012-11-11 George Staikos [BlackBerry] The QNX extension method should not be enabled by default https://bugs.webkit.org/show_bug.cgi?id=101863 Reviewed by Rob Buis. Simply change the default to false. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): 2012-11-09 Otto Derek Cheung [BlackBerry] Adding a sound to touch events on anchor elements https://bugs.webkit.org/show_bug.cgi?id=101655 Reviewed by Antonio Gomes. Adding audio feedback to touchevents on html anchor elements. The feedback is called directly from client instead of using the mouseup event to avoid the delay between touch start and end caused by the tap sequence recognizer. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::playSoundIfAnchorIsTarget): (WebKit): * Api/WebPage.h: * WebKitSupport/TouchEventHandler.cpp: (WebKit): (BlackBerry::WebKit::TouchEventHandler::playSoundIfAnchorIsTarget): * WebKitSupport/TouchEventHandler.h: (TouchEventHandler): 2012-11-09 George Staikos [BlackBerry] Remove obsolete tokenizer settings https://bugs.webkit.org/show_bug.cgi?id=101689 Reviewed by Yong Li. These tokenizer settings are obsolete and should not be here. Remove them. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::init): 2012-11-08 Chris Guan [BlackBerry] need to call closePopup at setValueAndClosePopup https://bugs.webkit.org/show_bug.cgi?id=101568 Reviewed by George Staikos. When early return occurs, we need to call closePopup at setValueAndClosePopup function. See the comments in WebCore/page/PagePopupClient.h. If we have not it, Webkit thread is held and browser will be unresponsive in BlackBerry port. RIM PR 232962 Internally reviewed by Charles Wei. * WebCoreSupport/SelectPopupClient.cpp: (WebCore::SelectPopupClient::setValueAndClosePopup): 2012-11-08 Jakob Petsovits [BlackBerry] Replace checkerboard with page background color. https://bugs.webkit.org/show_bug.cgi?id=101652 RIM PR 188235 Reviewed by George Staikos. In order to do this, we introduce a new member variable for BackingStore because when blitting, we can't access the page background color in a threadsafe way. Solid background color fill is still only used for public builds. Developers and beta testers should still see checkerboard and do something about it. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate): (BlackBerry::WebKit::BackingStorePrivate::fillWindow): (BlackBerry::WebKit::BackingStorePrivate::webPageBackgroundColorUserInterfaceThread): (WebKit): (BlackBerry::WebKit::BackingStorePrivate::setWebPageBackgroundColor): * Api/BackingStore_p.h: (BackingStorePrivate): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setLoadState): (BlackBerry::WebKit::WebPagePrivate::didChangeSettings): 2012-11-08 Tiancheng Jiang [BlackBerry] Update BB10 date input form. https://bugs.webkit.org/show_bug.cgi?id=101075 Reviewed by Rob Buis. RIM PR 234531 Internally Reviewed by Mike Fenton. Change date input appearance to button and hide caret when click on them. * WebCoreSupport/DatePickerClient.cpp: (WebCore::DatePickerClient::setValueAndClosePopup): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::openDatePopup): 2012-11-08 Nima Ghanavatian [BlackBerry] Provide pixel coordinates to IMF relative to the screen https://bugs.webkit.org/show_bug.cgi?id=101628 Reviewed by Rob Buis. Reviewed internally by Mike Fenton and Jakob Petsovits. We need to provide the correct pixel coordinates to IMF, accounting for webkit based fields in UIB as well as browser. Getting an offset value from the screen point to the document content point allows us to adjust for when the document, such as in UIB, does not start at 0,0. * Api/WebPageClient.h: * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions): * WebKitSupport/InputHandler.h: (InputHandler): * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint): 2012-11-08 Jakob Petsovits [BlackBerry] Janitor: Remove unused m_isValid bool https://bugs.webkit.org/show_bug.cgi?id=101610 Reviewed by Rob Buis. It's not used anywhere, but as we have a constructor that creates an invalid TileIndex, let's add another method to check validity - now a correct check. On top of that, make the stylebot happy by reducing "unsigned int" to just "unsigned". * WebKitSupport/TileIndex.h: (BlackBerry::WebKit::TileIndex::TileIndex): (BlackBerry::WebKit::TileIndex::i): (BlackBerry::WebKit::TileIndex::j): (BlackBerry::WebKit::TileIndex::setIndex): (BlackBerry::WebKit::TileIndex::isValid): (TileIndex): 2012-11-08 Eli Fidler [BlackBerry] Increase memory cache size https://bugs.webkit.org/show_bug.cgi?id=101622 Reviewed by Yong Li. * WebCoreSupport/CacheClientBlackBerry.cpp: (WebCore::CacheClientBlackBerry::updateCacheCapacity): * WebCoreSupport/CacheClientBlackBerry.h: (CacheClientBlackBerry): 2012-11-08 Jakob Petsovits [BlackBerry] Rework the API to use document coordinates https://bugs.webkit.org/show_bug.cgi?id=101608 RIM PR 173292 Reviewed by Adam Treat. Scrolling and zooming APIs used to operate on transformed coordinates, which is a bad idea: The UI thread might long have moved on to a different scale and scroll position so outdated pixel coordinates are of limited value. Moreover, more transformation calculations are needed than if we operate purely on document coordinates. With webkitThreadViewportAccessor() exposed, the caller has a choice between how to handle coordinates and the means to perform conversions with little effort and overhead if needed. Therefore, we should remove pixel coordinates from the public API. This commit makes this change. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::repaint): (BlackBerry::WebKit::BackingStorePrivate::didRenderContent): * Api/InRegionScroller.cpp: (BlackBerry::WebKit::InRegionScroller::setDocumentScrollPositionCompositingThread): (BlackBerry::WebKit::InRegionScroller::setDocumentScrollPositionWebKitThread): (BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint): * Api/InRegionScroller.h: * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::setLoadState): (BlackBerry::WebKit::WebPagePrivate::shouldZoomAboutPoint): (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint): (BlackBerry::WebKit::WebPage::setDocumentScrollPosition): (BlackBerry::WebKit::WebPagePrivate::hasVirtualViewport): (BlackBerry::WebKit::WebPagePrivate::notifyTransformedContentsSizeChanged): (BlackBerry::WebKit::WebPagePrivate::notifyTransformedScrollChanged): (BlackBerry::WebKit::WebPagePrivate::setCursor): (BlackBerry::WebKit::WebPagePrivate::notifyPopupAutofillDialog): (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize): (BlackBerry::WebKit::WebPagePrivate::bestNodeForZoomUnderPoint): (BlackBerry::WebKit::WebPagePrivate::blockZoomRectForNode): (BlackBerry::WebKit::WebPagePrivate::zoomBlock): (BlackBerry::WebKit::WebPage::setVirtualViewportSize): (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments): (BlackBerry::WebKit::WebPagePrivate::dispatchViewportPropertiesDidChange): (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore): (BlackBerry::WebKit::WebPagePrivate::setViewportSize): (BlackBerry::WebKit::WebPage::setDefaultLayoutSize): (BlackBerry::WebKit::WebPagePrivate::setScrollOriginPoint): (BlackBerry::WebKit::WebPage::setDocumentScrollOriginPoint): (BlackBerry::WebKit::handleScrolling): (BlackBerry::WebKit::WebPage::selectionContainsDocumentPoint): (BlackBerry::WebKit::WebPage::setDocumentSelection): (BlackBerry::WebKit::WebPage::setDocumentCaretPosition): (BlackBerry::WebKit::WebPage::selectAtDocumentPoint): (BlackBerry::WebKit::WebPagePrivate::setTextReflowAnchorPoint): (BlackBerry::WebKit::WebPage::pinchZoomAboutPoint): (BlackBerry::WebKit::WebPage::blockZoom): (BlackBerry::WebKit::WebPage::nodeAtDocumentPoint): (BlackBerry::WebKit::WebPagePrivate::enterFullscreenForNode): * Api/WebPage.h: (Platform): * Api/WebPageClient.h: * Api/WebPage_p.h: (WebPagePrivate): * WebCoreSupport/AutofillManager.cpp: (WebCore::AutofillManager::didChangeInTextField): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchDidLayout): * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged): (BlackBerry::WebKit::SelectionHandler::caretPositionChanged): 2012-11-08 Nima Ghanavatian [BlackBerry] Verify touched element using the rootEditableElement https://bugs.webkit.org/show_bug.cgi?id=101510 Reviewed by Rob Buis. Reviewed internally by Mike Fenton. Move up the tree until we find the rootEditableElement and use that to compare with the touched element. * WebKitSupport/FatFingers.h: (BlackBerry::WebKit::FatFingersResult::node): (BlackBerry::WebKit::FatFingersResult::nodeAsElementIfApplicable): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint): * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint): 2012-11-07 Rob Buis [BlackBerry] Remove setUserStyleSheetString/userStyleSheetString https://bugs.webkit.org/show_bug.cgi?id=101490 Reviewed by Yong Li. We no longer need this API. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::didChangeSettings): * Api/WebSettings.cpp: (WebKit): * Api/WebSettings.h: 2012-11-07 Christophe Dumez Add replaceWithLiteral() method to WTF::String https://bugs.webkit.org/show_bug.cgi?id=101257 Reviewed by Benjamin Poulain. Substitute String::replace() calls by String::replaceWithLiteral() where adequate, for efficiency. * WebCoreSupport/SelectPopupClient.cpp: (WebCore::SelectPopupClient::generateHTML): 2012-11-07 Kenneth Rohde Christiansen Remove support for "desktop-width" in the viewport meta tag https://bugs.webkit.org/show_bug.cgi?id=101217 Reviewed by Gyuyoung Kim. Sync WebViewportArguments enum with the one in WebCore::ViewportArguments * Api/WebViewportArguments.h: 2012-11-06 Genevieve Mak [BlackBerry] Crash in InRegionScrollerPrivate. https://bugs.webkit.org/show_bug.cgi?id=101399 Reviewed by Rob Buis. Add a pointer to the enclosing document as the pointer to layer or node along the way may become invalid. Use document pointer in clearDocumentData. PR #238469 * Api/InRegionScroller.cpp: (BlackBerry::WebKit::InRegionScrollerPrivate::clearDocumentData): * WebKitSupport/InRegionScrollableArea.cpp: (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea): (BlackBerry::WebKit::InRegionScrollableArea::document): (WebKit): * WebKitSupport/InRegionScrollableArea.h: (WebCore): (InRegionScrollableArea): 2012-11-06 Otto Derek Cheung [BlackBerry] Pushing window.external.* events to webplatform https://bugs.webkit.org/show_bug.cgi?id=101386 Reviewed by Rob Buis. Adding calls to trigger window.external events so we can handle them on the browser side. PR 170059 * Api/WebPageClient.h: * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::addSearchProvider): (WebCore::ChromeClientBlackBerry::isSearchProviderInstalled): 2012-11-06 Otto Derek Cheung [BlackBerry] Adding window.external to our port https://bugs.webkit.org/show_bug.cgi?id=100868 Reviewed by Rob Buis. Patching the method names to match the ones in the spec. * WebCoreSupport/ExternalExtension.cpp: 2012-11-06 Jacky Jiang [BlackBerry] Page can't back to whole screen after zoom out and orientation change https://bugs.webkit.org/show_bug.cgi?id=101350 Reviewed by Rob Buis. Internally reviewed by Arvid Nilsson. PR: 229321 When rotating device during touch interaction, bitmap zooming was unexpected ended by resetBitmapZoomScale() so that it couldn't bounce back. The call resetBitmapZoomScale() is ancient, which just resets the scale of the bitmap before. Right now it only ends the bitmap zooming which caused the issue. As UI viewport will be updated by zoomChanged() right after that, we can remove this trouble maker. Update the interaction views if the rotation is being changed so that ZoomHandler can get the updated views. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint): * Api/WebPageClient.h: 2012-11-05 Lianghui Chen [BlackBerry] Do not show error page for main loads denied by client application https://bugs.webkit.org/show_bug.cgi?id=101287 Internal PR: 237574. Internally reviewed by Arvid Nilsson, Joe Mason. Reviewed by George Staikos. * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad): 2012-11-05 Lianghui Chen [BlackBerry] Do not display error page for failed downloads https://bugs.webkit.org/show_bug.cgi?id=101246 Internal PR: 236318 Internal reviewed by Joe Mason, Leo Yang. Reviewed by Rob Buis. Right now when a main load, including all downloads, failed, it will display an error page. This is not very user friendly, especially for WebWorks application, which want to use its own user interface to info user about the failure. So we just stop displaying error page for downloads. * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad): 2012-11-05 Simon Fraser Fix layer borders to cleaning appear and disappear on switching https://bugs.webkit.org/show_bug.cgi?id=101136 Reviewed by Sam Weinig. Remove the GraphicsLayerClient methods showDebugBorders() and showRepaintCounter(). * Api/WebOverlay_p.h: (WebOverlayPrivateWebKitThread): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::notifyFlushRequired): * Api/WebPage_p.h: * WebKitSupport/DefaultTapHighlight.cpp: * WebKitSupport/DefaultTapHighlight.h: (DefaultTapHighlight): * WebKitSupport/InspectorOverlayBlackBerry.cpp: * WebKitSupport/InspectorOverlayBlackBerry.h: (InspectorOverlay): * WebKitSupport/SelectionOverlay.cpp: * WebKitSupport/SelectionOverlay.h: (SelectionOverlay): 2012-11-05 Rob Buis [BlackBerry] screenX/Y gives wrong values https://bugs.webkit.org/show_bug.cgi?id=101259 Reviewed by Yong Li. PR 237071 Reviewed internally by Gen Mak. Do not transform screenPos coordinates. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::mouseEvent): (BlackBerry::WebKit::WebPage::touchEvent): (BlackBerry::WebKit::WebPage::touchPointAsMouseEvent): 2012-11-05 Rob Buis [BlackBerry] Input date should not popup dialog when readonly is set https://bugs.webkit.org/show_bug.cgi?id=101234 Reviewed by Yong Li. PR 236114 Reviewed internally by Mike Fenton. Suppress popup dialog if the input element has readonly attribute set. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::openDatePopup): (BlackBerry::WebKit::InputHandler::openColorPopup): 2012-11-05 Genevieve Mak [BLACKBERRY] Update touch code to reflect touch refactor https://bugs.webkit.org/show_bug.cgi?id=101227 Reviewed by Rob Buis. PR #2706785 Reviewed Internally by: Mike Lattanzio * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::touchEvent): (BlackBerry::WebKit::WebPagePrivate::dispatchTouchEventToFullScreenPlugin): 2012-11-05 Konrad Piascik [BlackBerry] Web Inspector: Add InspectorInstrumentaiton calls for timeline compositing. https://bugs.webkit.org/show_bug.cgi?id=101213 RIM PR 178131 Reviewed by Rob Buis. Internally Reviewed by Arvid Nilsson. Added compositing events to the timeline for BlackBerry. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded): (BlackBerry::WebKit::WebPagePrivate::willComposite): (WebKit): (BlackBerry::WebKit::WebPagePrivate::didComposite): * Api/WebPage_p.h: (WebPagePrivate): 2012-11-03 Alexey Proskuryakov Get rid of USE(CFURLSTORAGESESSIONS) https://bugs.webkit.org/show_bug.cgi?id=101131 Reviewed by Sam Weinig. * WebCoreSupport/AboutDataUseFeatures.in: Not sure what this list is about, but CFURLSTORAGESESSIONS probably doesn't need to stay here. 2012-11-02 Nima Ghanavatian [BlackBerry] Fix compile-time warning of a possible empty-body if statement https://bugs.webkit.org/show_bug.cgi?id=101095 Reviewed by Yong Li. Internally reviewed by Jeff Rogers. BBLOG might be compiled out leaving an if statement with an empty body. This is giving us a warning at the moment. Simply putting braces around it will fail as well because then we'd have braces around a single-line if. So, in following with the style observed in other parts of BackingStore.cpp, break up the log message and add braces. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::blitToWindow): (BlackBerry::WebKit::BackingStorePrivate::fillWindow): (BlackBerry::WebKit::BackingStorePrivate::clearWindow): 2012-11-02 Nima Ghanavatian [BlackBerry] Optimize backspace key handling https://bugs.webkit.org/show_bug.cgi?id=101083 PR233591 Optimize backspace key handling. Some of these calls are not required by IMF since the input_service already processes the backspace key and updates the state before passing us the key. Internally reviewed by Mike Fenton. Reviewed by Yong Li. Blocking calls with a flag that we clear immediately after processing a backspace keydown. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::nodeTextChanged): (BlackBerry::WebKit::InputHandler::selectionChanged): (BlackBerry::WebKit::InputHandler::handleKeyboardInput): * WebKitSupport/InputHandler.h: (InputHandler): 2012-11-02 Otto Derek Cheung [BlackBerry] Adding window.external to our port https://bugs.webkit.org/show_bug.cgi?id=100868 Reviewed by Rob Buis. PR 158809 Patch up an error where we were dereferencing a null pointer. * WebCoreSupport/ExternalExtension.cpp: (addSearchProviderMethod): (IsSearchProviderInstalledMethod): 2012-11-01 Peter Wang [BlackBerry] Simplify the code of returning JSValue in "BlackBerry::WebKit::WebPagePrivate::executeJavaScript" https://bugs.webkit.org/show_bug.cgi?id=100941 Reviewed by Yong Li. Remove the unnecessary steps, just directly deal with returned JSValue. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::executeJavaScript): (BlackBerry::WebKit::WebPagePrivate::executeJavaScriptInIsolatedWorld): 2012-11-01 Otto Derek Cheung [BlackBerry] Add a prompt to enable global location services https://bugs.webkit.org/show_bug.cgi?id=100992 PR 227897 Reviewed by Rob Buis. Adding a dialog to let the user know location services isn't enabled. Currently, the browser app does not check whether the global setting for location service is enabled. This patch adds a dialog to allow the user to open the settings app and change that setting. This infobar will only show once per session. If the user fails to turn on location services after the first prompt, all geolocation requests will automatically fail. Also, adapting GeolocationClientBlackBerry to the removal of GeoTracker. The class now talks directly to the geo handler singleton. * Api/WebPageClient.h: * WebCoreSupport/GeolocationClientBlackBerry.cpp: (GeolocationClientBlackBerry::GeolocationClientBlackBerry): (GeolocationClientBlackBerry::geolocationDestroyed): (GeolocationClientBlackBerry::startUpdating): (GeolocationClientBlackBerry::stopUpdating): (GeolocationClientBlackBerry::requestPermission): (GeolocationClientBlackBerry::setEnableHighAccuracy): * WebCoreSupport/GeolocationClientBlackBerry.h: (WebCore::GeolocationClientBlackBerry::requiresHighAccuracy): (GeolocationClientBlackBerry): 2012-11-01 Michael Matovsky [BlackBerry] Web page view state should be preserved for pages loaded from page cache https://bugs.webkit.org/show_bug.cgi?id=100694 Internal PR: 220488 Internally reviewed by Lianghui Chen, Joe Mason Reviewed by Rob Buis. The web page view specific metadata should be preserved for web pages loaded from page cache (by using back/forward). This requires web page view state to be saved in and restored from the corresponding page cache history item. * Api/WebPageClient.h: * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::saveViewStateToItem): (WebCore::FrameLoaderClientBlackBerry::restoreViewState): 2012-11-01 Leo Yang [BlackBerry] Use clipped background rect in backing store https://bugs.webkit.org/show_bug.cgi?id=100960 Reviewed by Yong Li. Reviewed internally by Arvid Nilsson. We calculated clipped background rect but didn't really use it when painting the background. Use the correct rect to avoid ASSERT failure in platform code. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::paintDefaultBackground): 2012-10-31 George Staikos [BlackBerry] Crash on html popup form control when element is deleted https://bugs.webkit.org/show_bug.cgi?id=100869 Reviewed by Yong Li. Make the element pointers RefPtr so they don't go away before the popup is closed. * WebCoreSupport/ColorPickerClient.h: (ColorPickerClient): * WebCoreSupport/DatePickerClient.h: (DatePickerClient): * WebCoreSupport/SelectPopupClient.h: (SelectPopupClient): 2012-10-31 Genevieve Mak [BLACKBERRY] Custom WebWorks context menus don't always work. https://bugs.webkit.org/show_bug.cgi?id=100891 Reviewed by Rob Buis. Walk up the dom tree until we find the webworks attribute or run out of parent nodes. PR# 227732 * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::webContext): 2012-10-31 Otto Derek Cheung [BlackBerry] Adding window.external to our port https://bugs.webkit.org/show_bug.cgi?id=100868 Reviewed by Rob Buis. Attaching the window.external interface to the frame when it loads up. When called, the external interface methods call stubs declared in ChromeClientBlackBerry. The method passes in the url of the search provider and the url of the frame. Cross-site check has to be done in the implementation PR. * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::addSearchProvider): (WebCore): (WebCore::ChromeClientBlackBerry::isSearchProviderInstalled): * WebCoreSupport/ChromeClientBlackBerry.h: (ChromeClientBlackBerry): * WebCoreSupport/ExternalExtension.cpp: Added. (addSearchProviderMethod): (IsSearchProviderInstalledMethod): (externalExtensionInitialize): (externalExtensionFinalize): * WebCoreSupport/ExternalExtension.h: Added. (WebCore): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchDidClearWindowObjectInWorld): 2012-10-30 Peter Wang [BlackBerry] Clean the code of "JavaScriptDebuggerBlackBerry" https://bugs.webkit.org/show_bug.cgi?id=100724 Reviewed by Rob Buis. Remove the code of JavaScriptDebuggerBlackBerry. * Api/WebPage.cpp: * Api/WebPage.h: * Api/WebPage_p.h: (WebCore): (WebPagePrivate): * WebCoreSupport/JavaScriptDebuggerBlackBerry.cpp: Removed. * WebCoreSupport/JavaScriptDebuggerBlackBerry.h: Removed. 2012-10-29 Rob Buis [BlackBerry] Simplify AuthenticationChallengeManager::instance https://bugs.webkit.org/show_bug.cgi?id=100614 Reviewed by Yong Li. Internally reviewed by Lyon Chen. No need to call AuthenticationChallengeManager::init anymore. * Api/BlackBerryGlobal.cpp: (BlackBerry::WebKit::globalInitialize): 2012-10-29 Mike Lattanzio [BlackBerry] Typo in WebPagePrivate::postponeDocumentRecalcStyle() https://bugs.webkit.org/show_bug.cgi?id=100377 Reviewed by Adam Treat. Should be void, not bool. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::postponeDocumentStyleRecalc): * Api/WebPage_p.h: (WebPagePrivate): 2012-10-29 Robin Cao [BlackBerry] Fix a build error https://bugs.webkit.org/show_bug.cgi?id=100649 Reviewed by Kentaro Hara. r127876 changed the signature of WebCore::EventHandler::hitTestResultAtPoint() and this commit was later reverted. We need to update a call site in the BlackBerry port to make it build. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::hitTestResult): 2012-10-26 Jacky Jiang [BlackBerry][FullScreen] entering/leaving fullscreen results in temporary glitches on the screen https://bugs.webkit.org/show_bug.cgi?id=100421 Reviewed by Yong Li. PR: 231173 When leaving fullscreen, we need to suspend screen and backing store updates before setting scroll position and changing transformation and resume after they are done. In which way, we can get rid of a noticeable glitch during the transition. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement): 2012-10-26 Sean Wang [BlackBerry] ASSERT currentThreadIsHoldingLock() failed in MarkedAllocator::allocateSlowCase() https://bugs.webkit.org/show_bug.cgi?id=100504 Reviewed by Yong Li. PR #232038 The similar PR # 200724. Reviewed internally by Petter Wang. This issue is same as bug 95492, and this patch is same as its patch. Hold the JSLock for the current thread before we call toRef to avoid the ASSERT failure. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::executeJavaScriptInIsolatedWorld): (BlackBerry::WebKit::WebPage::executeJavaScriptFunction): 2012-10-25 Sean Wang [BlackBerry] WebView process crashed at AuthenticationChallengeManager::pageVisibilityChanged() https://bugs.webkit.org/show_bug.cgi?id=100330 Reviewed by Rob Buis. Reviewed internally by Charles Wei. PR #231232 Since AuthenticationChallengeManager keeps a map of WebPages, WebPage setting visible needs AuthenticationChallengeManager to update its records, deleting webpage from AuthenticationChallengeManager's map should be done after setting webpage visibility. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate): 2012-10-24 Sean Wang [BlackBerry] ASSERT(!needsOneShotDrawingSynchronization()) failed in commitRootLayerIfNeeded() https://bugs.webkit.org/show_bug.cgi?id=100214 Reviewed by Rob Buis. ViewportSize has been changed before committing root layer, it asserts that it needs relayout and render if needed before committing if it Needs One Shot Drawing Synchronization. This patch calls requestLayoutIfNeeded() when resumeScreenAndBackingStoreUpdates(). Fix a coding style in the BackingStore.cpp as well. Reviewed internally by Arvid Nilsson. PR #230253 * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::resumeScreenAndBackingStoreUpdates): 2012-10-24 Otto Derek Cheung [BlackBerry] Geolocation is segfaulting https://bugs.webkit.org/show_bug.cgi?id=100305 Reviewed by Rob Buis. We weren't wrapping the Geolocation object in a RefPtr when we call setIsAllowed in GeolocationClientBlackBerry::onPermission. This patch also removes all references of the Geolocation object in WebPageClientImpl. One RefPtr is used to store the reference of the WebCore object on our port. We don't need a mapping between origin -> context of Geolocation because in our port, one WebPage.cpp contains one GeolocationController only. * Api/WebPageClient.h: * WebCoreSupport/GeolocationClientBlackBerry.cpp: (frameOrigin): (GeolocationClientBlackBerry::requestPermission): (GeolocationClientBlackBerry::cancelPermissionRequest): (GeolocationClientBlackBerry::onPermission): * WebCoreSupport/GeolocationClientBlackBerry.h: (GeolocationClientBlackBerry): 2012-10-24 Jacky Jiang [BlackBerry][Fullscreen] Roll out changes to fullscreen which rely on viewport size change [Part II] https://bugs.webkit.org/show_bug.cgi?id=100259 Reviewed by Rob Buis. PR: 219666 Revert "[BlackBerry] [FullScreen] entering/leaving fullscreen results in temporary glitches on the screen" This rolls out r128772. The patches relies on the viewport size change of the client side to resume the screen and backing store updates. However, some client sides don't need or wish to resize the WebKit viewport at all which will result in upexpected screen and backing store suspensions. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::setViewportSize): * Api/WebPage_p.h: (WebPagePrivate): * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::enterFullScreenForElement): (WebCore::ChromeClientBlackBerry::exitFullScreenForElement): 2012-10-24 Jacky Jiang [BlackBerry][Fullscreen] Roll out changes to fullscreen which rely on viewport size change https://bugs.webkit.org/show_bug.cgi?id=100259 Reviewed by Rob Buis. PR: 219666 Roll out r130392 and r129909. The patches rely on the viewport size change of the client side to update the scale and scroll position of the video. However, some client sides don't need or wish to resize the WebKit viewport at all. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::setViewportSize): (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement): (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement): * Api/WebPage_p.h: (WebPagePrivate): 2012-10-24 Otto Derek Cheung [BlackBerry] Rename GeolocationControllerClientBlackBerry to GeolocationClientBlackBerry https://bugs.webkit.org/show_bug.cgi?id=100250 Reviewed by Rob Buis. Rename GeolocationControllerClientBlackBerry to GeolocationClientBlackBerry to prevent confusion. PR 230196 * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::init): * Api/WebPage_p.h: (WebCore): * WebCoreSupport/ChromeClientBlackBerry.cpp: * WebCoreSupport/GeolocationClientBlackBerry.cpp: Renamed from Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.cpp. (frameOrigin): (GeolocationClientBlackBerry::GeolocationClientBlackBerry): (GeolocationClientBlackBerry::geolocationDestroyed): (GeolocationClientBlackBerry::startUpdating): (GeolocationClientBlackBerry::stopUpdating): (GeolocationClientBlackBerry::lastPosition): (GeolocationClientBlackBerry::requestPermission): (GeolocationClientBlackBerry::cancelPermissionRequest): (GeolocationClientBlackBerry::onLocationUpdate): (GeolocationClientBlackBerry::onLocationError): (GeolocationClientBlackBerry::onPermission): (GeolocationClientBlackBerry::setEnableHighAccuracy): * WebCoreSupport/GeolocationClientBlackBerry.h: Renamed from Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.h. (WebKit): (WebCore): (GeolocationClientBlackBerry): (WebCore::GeolocationClientBlackBerry::tracker): 2012-10-24 Parth Patel [BlackBerry] Extending existing ThreadUnsafe singletons in webkit to Generic ThreadUnsafe Singleton https://bugs.webkit.org/show_bug.cgi?id=100145 Reviewed by Rob Buis. Extending the singletons to generic singleton and changing getInstance() in IconDatabaseClientBlackBerry to instance() to match the generic singleton template. Reviewed Internally by Yong Li. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::initializeIconDataBase): * WebCoreSupport/IconDatabaseClientBlackBerry.cpp: (WebCore): * WebCoreSupport/IconDatabaseClientBlackBerry.h: (IconDatabaseClientBlackBerry): 2012-10-23 Robin Cao [BlackBerry] Web page renders at the wrong zoom level after viewport changes https://bugs.webkit.org/show_bug.cgi?id=100096 Reviewed by Rob Buis. Notify the client of the zoom level change before resuming screen updates. Otherwise, the user interface thread may blit the content at the wrong zoom level in some cases. This can also prevent potential flickering. Reviewed internally by Arvid Nilsson. PR #225741 * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint): (BlackBerry::WebKit::WebPagePrivate::zoomBlock): 2012-10-23 Mike Lattanzio [BlackBerry] Cache TouchDown HitTestResult to avoid calling RenderLayer::hitTest unnecessarily https://bugs.webkit.org/show_bug.cgi?id=99649 Reviewed by George Staikos. Random latency before scroll starts on sites like http://pintrest.com Internal PR225398 The chief problem here is the all the hit testing that we do for touch events and simulated mouse events. If the render tree is dirty hit tests can take a long time in Document::recalcStyle(). Masking the flags that force style recalculations will make them fast, at the expense that they might be happening on stale data. Since we are only using these hit tests to look for event handlers - we're not actually modifying anything, it is better to skip the Document::recalcStyle() and save ourselves tons of time. * Api/InRegionScroller.cpp: (BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPage::touchEvent): (BlackBerry::WebKit::WebPagePrivate::setScrollOriginPoint): (BlackBerry::WebKit::WebPagePrivate::postponeDocumentStyleRecalc): (WebKit): (BlackBerry::WebKit::WebPagePrivate::resumeDocumentStyleRecalc): (BlackBerry::WebKit::WebPagePrivate::hitTestResult): (BlackBerry::WebKit::WebPagePrivate::clearCachedHitTestResult): * Api/WebPage_p.h: (WebPagePrivate): * WebKitSupport/FatFingers.cpp: (BlackBerry::WebKit::FatFingers::findBestPoint): (BlackBerry::WebKit::FatFingers::getRelevantInfoFromCachedHitTest): * WebKitSupport/FatFingers.h: * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint): 2012-10-23 Rob Buis [BlackBerry] Make selection in search input box not overlap cancel button https://bugs.webkit.org/show_bug.cgi?id=100130 Reviewed by Antonio Gomes. This ensures that even when selection is active, the user can still press 'cancel'. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::boundingBoxForInputField): 2012-10-23 Arvid Nilsson [BlackBerry] Let WebKit manage the SelectionOverlay https://bugs.webkit.org/show_bug.cgi?id=99585 Reviewed by Rob Buis. The SelectionOverlay was exposed to clients of the BlackBerry::WebKit API. However, all the information and notifications necessary to manage the SelectionOverlay are available within WebKit, so the client does not have to shoulder this responsibility. Remove WebSelection and all the related plumbing. Now that nobody is using the class from the user interface thread, remove the message related code in SelectionOverlay. Add two calls to SelectionOverlay::hide() that are necessary now that the client is no longer responsible for hiding it. RIM PR: 225789 Reviewed internally by Mike Fenton. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate): * Api/WebPage.h: (WebKit): * Api/WebPage_p.h: (WebPagePrivate): * Api/WebSelectionOverlay.h: Removed. * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::cancelSelection): Hide the overlay here, because state is reset and selection mode is no longer active (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged): Also hide overlay here, to go with the call to cancelSelectionVisuals * WebKitSupport/SelectionOverlay.cpp: (BlackBerry::WebKit::SelectionOverlay::SelectionOverlay): * WebKitSupport/SelectionOverlay.h: (BlackBerry::WebKit::SelectionOverlay::create): (SelectionOverlay): 2012-10-22 Mike Fenton [BlackBerry] Remove specialized handling for isIndex fields. https://bugs.webkit.org/show_bug.cgi?id=100004 Reviewed by Rob Buis. PR 214342. Remove special handling for isIndex field as the tag is rewritten. Reviewed Internally by Yongxin Dai and Nima Ghanavatian. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::inputStyle): (BlackBerry::WebKit::InputHandler::elementType): 2012-10-22 Jocelyn Turcotte [Qt] Fix "ASSERTION FAILED: !document->inPageCache()" when loading a page https://bugs.webkit.org/show_bug.cgi?id=98514 Reviewed by Kenneth Rohde Christiansen. * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::transitionToCommittedForNewPage): 2012-10-20 Andrew Lo [BlackBerry] m_mainFrame should be null checked before use in WebPagePrivate destructor https://bugs.webkit.org/show_bug.cgi?id=99916 Reviewed by George Staikos. Internally reviewed by Arvid Nilsson. Internal PR228029 Add null checks for m_mainFrame for things that happen during WebPage destruction. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setVisible): (BlackBerry::WebKit::WebPagePrivate::setCompositorDrawsRootLayer): 2012-10-19 Mike Fenton [BlackBerry] Convert input style to int64_t https://bugs.webkit.org/show_bug.cgi?id=99848 Reviewed by Yong Li. PR 227381. Switch input style mask to int64_t to match the the updated definition. Reviewed Internally by Nima Ghanavatian. * Api/WebPageClient.h: * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::inputStyle): * WebKitSupport/InputHandler.h: (InputHandler): 2012-10-19 Mike Fenton [BlackBerry] Move all keyboard type calculations into InputHandler. https://bugs.webkit.org/show_bug.cgi?id=99847 Reviewed by Yong Li. PR 227381. Move all keyboard type calculations into webkit and avoid passing type information to the webview. Reviewed Internally by Nima Ghanavatian. * Api/WebPageClient.h: * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::convertInputTypeToVKBType): (WebKit): (BlackBerry::WebKit::InputHandler::setElementFocused): 2012-10-19 Jacky Jiang [BlackBerry] Page viewport aspect ratio not kept on navigating back https://bugs.webkit.org/show_bug.cgi?id=99760 Reviewed by Yong Li. Internally reviewed by Konrad Piascik PR: 222437 This is to fix the second issue on PR222437 that the viewport not kept when navigating back from google after rotation to bloomberg. We were trying to restore the history contents size and scale of bloomberg which has virtual viewport. The scale would be recalculated based on the new screen size. However, we would still use the current contents size if it was greater than the history contents size in FrameView::setContentsSize which made the contents seem to be scaled too much. Actually when we relayout the contents after rotation change, the current contents size which is based on the virtual viewport has taken the screen size into account. Shrinking the contents size will be expensive. So we can ignore screen size based scale calculation here. * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::restoreViewState): 2012-10-19 Mike Fenton [BlackBerry] Add input logs to InputHandler::ensureFocusTextElementVisible. https://bugs.webkit.org/show_bug.cgi?id=99837 Reviewed by Antonio Gomes. Add input logs for InputHandler::ensureFocusTextElementVisible. Reviewed Internally by Nima Ghanavatian. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible): 2012-10-19 Andrew Lo [BlackBerry] Should suspend AnimationController when WebPage becomes invisible. https://bugs.webkit.org/show_bug.cgi?id=99844 Reviewed by Yong Li. Internally reviewed by Arvid Nilsson & Yong Li. Suspend animation controller when the tab becomes invisible, in addition to suspending scripted animations. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setVisible): 2012-10-19 Mike Fenton [BlackBerry] Don't attempt to auto scroll on input for Fixed Position elements. https://bugs.webkit.org/show_bug.cgi?id=99833 Reviewed by Antonio Gomes. PR 195024. Don't attempt to scroll fixed position elements. Reviewed Internally by Arvid Nilsson. * WebKitSupport/DOMSupport.cpp: (BlackBerry::WebKit::DOMSupport::isFixedPositionOrHasFixedPositionAncestor): (DOMSupport): * WebKitSupport/DOMSupport.h: (WebCore): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible): 2012-10-18 Jacky Jiang [BlackBerry] Page viewport aspect ratio not kept on navigating back https://bugs.webkit.org/show_bug.cgi?id=99760 Reviewed by Rob Buis. Internally reviewed by Konrad Piascik. PR: 190469 This was added in r127628 which was trying to fix some rendering defects on maps.google.com and news.qq.com, however it was very harmful and caused regressions. zoomToFitScale() depends on the current contents size. During history navigation and device rotation, if zoomToFitScale() is based on the final contents size which is expected, there will still be a scale calculation like this afterwards screenSize.width()/screenSize.height()*zoomToFitScale() which will result in a wrong scale. During the history navigation, if zoomToFitScale() isn't based on the final contents size, then we will get the wrong scale as well for sure. This issue will be fixed by removing the wrong calculation. The original issue of r127628 was fixed by the patch of PR225981. * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::restoreViewState): 2012-10-18 John Griggs 2012-10-18 John Griggs Crash in InRegionScrollableArea constructor while loading page https://bugs.webkit.org/show_bug.cgi?id=99733 Reviewed by Antonio Gomes. Check scrollLayer and avoid constructing InRegionScrollableArea when it is NULL. * Api/InRegionScroller.cpp: (BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint): 2012-10-17 Jacky Jiang [BlackBerry] Possible redundant zoomToInitialScaleOnLoad() in WebPagePrivate::setLoadState https://bugs.webkit.org/show_bug.cgi?id=99624 Reviewed by Rob Buis. Internally reviewed by Arvid Nilsson PR: 225981 Several reasons to eliminate the ancient unnecessary zoomToInitialScaleOnLoad() in WebPagePrivate::setLoadState committed: - At this point, we have only committed the data we received. - For the new load, we haven't started parsing the tokens and building the DOM tree and the first layout will happen after that. - For the load restored from cache, the first layout will happen after setLoadState committed which is called by FrameLoader::dispatchDidCommitLoad(). - zoomToInitialScaleOnLoad() can still be called after the first layout finished. - zoomToInitialScaleOnLoad() is expensive and it will boost the load performance after the removal. - Removal of this can fix some weird rendering defects on yahoo.com, maps.google.com, news.qq.com and so on during load and rotation mentioned on the PR. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setLoadState): 2012-10-17 Mike Fenton [BlackBerry] Prevent focus zoom on non-userscalable pages. https://bugs.webkit.org/show_bug.cgi?id=99608 Reviewed by Rob Buis. PR 222378. Disable focus zoom when the page is non-user scalable. Reviewed Internally by Nima Ghanavatian. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible): 2012-10-16 Mike Lattanzio 2012-10-16 Mike Lattanzio [BlackBerry] calculateInRegionScrollableAreasForPoint should use a ReadOnly HitTest https://bugs.webkit.org/show_bug.cgi?id=99497 Reviewed by Antonio Gomes. Fix calculateInRegionScrollableAreasForPoint to use a ReadOnly hit test to improve its performance. * Api/InRegionScroller.cpp: (BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint): 2012-10-15 Peter Wang [BlackBerry] Web Inspector: Remove the useless preferences items in "inspectorBB.js" https://bugs.webkit.org/show_bug.cgi?id=99404 Reviewed by George Staikos. In "inspectorBB.js", remove the useless preferences items to catch up the new code of frontend. * WebCoreSupport/inspectorBB.js: 2012-10-15 Jakob Petsovits [BlackBerry] Only reallocate buffers that were allocated before suspending https://bugs.webkit.org/show_bug.cgi?id=99205 RIM PR 99395 Reviewed by Antonio Gomes. When we call releaseBuffers(), not all of the backingstore tile buffers might have been allocated yet. Still we try to release all of them, which causes us to lazy-initialize the tile buffers so we can release them again. This is stupid and we should just ignore buffers that haven't been initialized yet. This patch makes that change. * WebKitSupport/BackingStoreTile.cpp: (BlackBerry::WebKit::TileBuffer::wasNativeBufferCreated): (WebKit): * WebKitSupport/BackingStoreTile.h: (TileBuffer): * WebKitSupport/SurfacePool.cpp: (BlackBerry::WebKit::SurfacePool::createBuffers): (BlackBerry::WebKit::SurfacePool::releaseBuffers): 2012-10-15 Jonathan Dong [BlackBerry] replace BlackBerry::Platform::log() with BBLOG() https://bugs.webkit.org/show_bug.cgi?id=99302 Reviewed by Rob Buis. RIM PR: 210884 The marco BBLOG() is defined as a no-op in release mode which will save a function call in the release build. Internally reviewed by Charles Wei. * Api/BackingStore.cpp: (BlackBerry::WebKit::bestDivisor): (BlackBerry::WebKit::BackingStorePrivate::suspendScreenAndBackingStoreUpdates): (BlackBerry::WebKit::BackingStorePrivate::resumeScreenAndBackingStoreUpdates): (BlackBerry::WebKit::BackingStorePrivate::repaint): (BlackBerry::WebKit::BackingStorePrivate::slowScroll): (BlackBerry::WebKit::BackingStorePrivate::scroll): (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect): (BlackBerry::WebKit::BackingStorePrivate::scrollBackingStore): (BlackBerry::WebKit::BackingStorePrivate::render): (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents): (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion): (BlackBerry::WebKit::BackingStorePrivate::renderContents): (BlackBerry::WebKit::BackingStorePrivate::blitToWindow): (BlackBerry::WebKit::BackingStorePrivate::fillWindow): (BlackBerry::WebKit::BackingStorePrivate::invalidateWindow): (BlackBerry::WebKit::BackingStorePrivate::clearWindow): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setLoadState): (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint): (BlackBerry::WebKit::WebPagePrivate::contentsSizeChanged): (BlackBerry::WebKit::WebPagePrivate::zoomToInitialScaleOnLoad): (BlackBerry::WebKit::WebPagePrivate::scheduleRootLayerCommit): (BlackBerry::WebKit::WebPagePrivate::commitRootLayer): (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded): (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired): * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::overflowExceedsContentsSize): (WebCore::ChromeClientBlackBerry::didDiscoverFrameSet): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchDidLayout): * WebKitSupport/FatFingers.cpp: (BlackBerry::WebKit::FatFingers::checkFingerIntersection): (BlackBerry::WebKit::FatFingers::findIntersectingRegions): (BlackBerry::WebKit::FatFingers::checkForText): * WebKitSupport/RenderQueue.cpp: (BlackBerry::WebKit::RenderQueue::addToRegularQueue): (BlackBerry::WebKit::RenderQueue::addToScrollZoomQueue): (BlackBerry::WebKit::RenderQueue::render): (BlackBerry::WebKit::RenderQueue::renderAllCurrentRegularRenderJobs): (BlackBerry::WebKit::RenderQueue::startRegularRenderJobBatchIfNeeded): (BlackBerry::WebKit::RenderQueue::renderVisibleZoomJob): (BlackBerry::WebKit::RenderQueue::renderVisibleScrollJob): (BlackBerry::WebKit::RenderQueue::renderRegularRenderJob): (BlackBerry::WebKit::RenderQueue::renderNonVisibleScrollJob): * WebKitSupport/SurfacePool.cpp: (BlackBerry::WebKit::SurfacePool::initialize): 2012-10-15 Xiaobo Wang [BlackBerry] [DRT] Skip region of interest zooming when running DRT https://bugs.webkit.org/show_bug.cgi?id=97663 Reviewed by Rob Buis. This patch fixes test fast/forms/textarea-scrolled-endline-caret.html, and 1. Add a global function isRunningDrt to check if we're currently running DRT. 2. Use the new function in places where getenv("drtRun") is used. * Api/BlackBerryGlobal.cpp: (BlackBerry::WebKit::isRunningDrt): (WebKit): * Api/BlackBerryGlobal.h: (WebKit): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::init): * WebKitSupport/DumpRenderTreeSupport.cpp: (toGeolocationClientMock): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible): 2012-10-15 George Staikos [BlackBerry] Adapt to Platform API changes in string handling https://bugs.webkit.org/show_bug.cgi?id=99248 Reviewed by Yong Li. Convert usage of WebString, char* and std::string to BlackBerry::Platform::String. * Api/BlackBerryGlobal.cpp: (BlackBerry::WebKit::clearAppCache): (BlackBerry::WebKit::clearDatabase): * Api/BlackBerryGlobal.h: (Platform): (WebKit): * Api/JavaScriptVariant.cpp: (BlackBerry::WebKit::JSValueRefToBlackBerryJavaScriptVariant): (BlackBerry::WebKit::BlackBerryJavaScriptVariantToJSValueRef): (BlackBerry::WebKit::JavaScriptVariant::JavaScriptVariant): (WebKit): (BlackBerry::WebKit::JavaScriptVariant::~JavaScriptVariant): (BlackBerry::WebKit::JavaScriptVariant::setType): (BlackBerry::WebKit::JavaScriptVariant::setString): (BlackBerry::WebKit::JavaScriptVariant::stringValue): * Api/JavaScriptVariant.h: * Api/WebAnimation.cpp: (BlackBerry::WebKit::WebAnimation::fadeAnimation): (BlackBerry::WebKit::WebAnimation::name): * Api/WebAnimation.h: * Api/WebCookieJar.cpp: (BlackBerry::WebKit::WebCookieJar::cookies): (BlackBerry::WebKit::WebCookieJar::setCookies): * Api/WebCookieJar.h: (Platform): (BlackBerry): (WebKit): * Api/WebKitMIMETypeConverter.cpp: (BlackBerry::WebKit::getExtensionForMimeType): (BlackBerry::WebKit::getMimeTypeForExtension): * Api/WebKitMIMETypeConverter.h: (Platform): (BlackBerry): (WebKit): * Api/WebKitTextCodec.cpp: (BlackBerry::WebKit::base64Decode): (BlackBerry::WebKit::base64Encode): (BlackBerry::WebKit::unescapeURL): (BlackBerry::WebKit::escapeURL): * Api/WebKitTextCodec.h: (Platform): (BlackBerry): * Api/WebOverlay.cpp: (BlackBerry::WebKit::WebOverlay::removeAnimation): * Api/WebOverlay.h: (Platform): (BlackBerry): (WebKit): * Api/WebOverlayOverride.cpp: (BlackBerry::WebKit::WebOverlayOverride::removeAnimation): * Api/WebOverlayOverride.h: (Platform): (BlackBerry): (WebKit): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::autofillTextField): (BlackBerry::WebKit::WebPage::renderTreeAsText): (BlackBerry::WebKit::WebPage::WebPage): (BlackBerry::WebKit::WebPagePrivate::init): (BlackBerry::WebKit::WebPagePrivate::load): (BlackBerry::WebKit::WebPage::load): (BlackBerry::WebKit::WebPage::loadFile): (BlackBerry::WebKit::WebPage::download): (BlackBerry::WebKit::WebPagePrivate::loadString): (BlackBerry::WebKit::WebPage::loadString): (BlackBerry::WebKit::WebPagePrivate::executeJavaScript): (BlackBerry::WebKit::WebPage::executeJavaScript): (BlackBerry::WebKit::WebPagePrivate::executeJavaScriptInIsolatedWorld): (BlackBerry::WebKit::WebPage::executeJavaScriptInIsolatedWorld): (BlackBerry::WebKit::WebPage::executeJavaScriptFunction): (BlackBerry::WebKit::WebPagePrivate::addOriginAccessWhitelistEntry): (BlackBerry::WebKit::WebPage::addOriginAccessWhitelistEntry): (BlackBerry::WebKit::WebPagePrivate::removeOriginAccessWhitelistEntry): (BlackBerry::WebKit::WebPage::removeOriginAccessWhitelistEntry): (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge): (BlackBerry::WebKit::WebPagePrivate::syncProxyCredential): (BlackBerry::WebKit::WebPagePrivate::notifyPopupAutofillDialog): (BlackBerry::WebKit::WebPagePrivate::webContext): (BlackBerry::WebKit::WebPage::setDateTimeInput): (BlackBerry::WebKit::WebPage::setColorInput): (BlackBerry::WebKit::WebPage::textEncoding): (BlackBerry::WebKit::WebPage::forcedTextEncoding): (BlackBerry::WebKit::WebPage::setForcedTextEncoding): (BlackBerry::WebKit::WebPage::title): (BlackBerry::WebKit::WebPage::selectedText): (BlackBerry::WebKit::WebPage::cutSelectedText): (BlackBerry::WebKit::WebPage::insertText): (BlackBerry::WebKit::WebPage::getBackForwardList): (BlackBerry::WebKit::WebPage::onCertificateStoreLocationSet): (BlackBerry::WebKit::WebPage::dispatchInspectorMessage): (BlackBerry::WebKit::WebPagePrivate::didChangeSettings): (BlackBerry::WebKit::WebPage::textHasAttribute): (BlackBerry::WebKit::WebPage::setAllowNotification): (BlackBerry::WebKit::WebPagePrivate::defaultUserAgent): * Api/WebPage.h: * Api/WebPageClient.h: * Api/WebPage_p.h: (WebPagePrivate): * Api/WebSettings.cpp: (BlackBerry::WebKit::WebSettings::standardSettings): (BlackBerry::WebKit::WebSettings::addSupportedObjectPluginMIMEType): (BlackBerry::WebKit::WebSettings::isSupportedObjectMIMEType): (BlackBerry::WebKit::WebSettings::serifFontFamily): (BlackBerry::WebKit::WebSettings::setSerifFontFamily): (BlackBerry::WebKit::WebSettings::fixedFontFamily): (BlackBerry::WebKit::WebSettings::setFixedFontFamily): (BlackBerry::WebKit::WebSettings::sansSerifFontFamily): (BlackBerry::WebKit::WebSettings::setSansSerifFontFamily): (BlackBerry::WebKit::WebSettings::standardFontFamily): (BlackBerry::WebKit::WebSettings::setStandardFontFamily): (BlackBerry::WebKit::WebSettings::userAgentString): (BlackBerry::WebKit::WebSettings::setUserAgentString): (BlackBerry::WebKit::WebSettings::defaultTextEncodingName): (BlackBerry::WebKit::WebSettings::setDefaultTextEncodingName): (BlackBerry::WebKit::WebSettings::userStyleSheetString): (BlackBerry::WebKit::WebSettings::setUserStyleSheetString): (BlackBerry::WebKit::WebSettings::userStyleSheetLocation): (BlackBerry::WebKit::WebSettings::setUserStyleSheetLocation): (BlackBerry::WebKit::WebSettings::localStoragePath): (BlackBerry::WebKit::WebSettings::setLocalStoragePath): (BlackBerry::WebKit::WebSettings::indexedDataBasePath): (BlackBerry::WebKit::WebSettings::setIndexedDataBasePath): (BlackBerry::WebKit::WebSettings::databasePath): (BlackBerry::WebKit::WebSettings::setDatabasePath): (BlackBerry::WebKit::WebSettings::appCachePath): (BlackBerry::WebKit::WebSettings::setAppCachePath): (BlackBerry::WebKit::WebSettings::pageGroupName): (BlackBerry::WebKit::WebSettings::setPageGroupName): * Api/WebSettings.h: * Api/WebString.cpp: Removed. * Api/WebString.h: Removed. * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::runJavaScriptPrompt): (WebCore::ChromeClientBlackBerry::createWindow): (WebCore::ChromeClientBlackBerry::runOpenPanel): (WebCore): * WebCoreSupport/ChromeClientBlackBerry.h: (ChromeClientBlackBerry): * WebCoreSupport/ClientExtension.cpp: (clientExtensionMethod): * WebCoreSupport/ColorPickerClient.cpp: (WebCore::ColorPickerClient::ColorPickerClient): (WebCore::ColorPickerClient::generateHTML): * WebCoreSupport/ColorPickerClient.h: (Platform): (BlackBerry): (WebKit): (ColorPickerClient): * WebCoreSupport/CredentialManager.cpp: (WebCore::CredentialManager::autofillAuthenticationChallenge): * WebCoreSupport/CredentialManager.h: (Platform): (CredentialManager): * WebCoreSupport/DatePickerClient.cpp: (WebCore::DatePickerClient::DatePickerClient): (WebCore::DatePickerClient::generateHTML): * WebCoreSupport/DatePickerClient.h: (Platform): (BlackBerry): (WebKit): (DatePickerClient): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForResponse): (WebCore::FrameLoaderClientBlackBerry::createDocumentLoader): (WebCore::FrameLoaderClientBlackBerry::dispatchDidFinishLoad): (WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad): (WebCore::FrameLoaderClientBlackBerry::dispatchCreatePage): (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendRequest): (WebCore::FrameLoaderClientBlackBerry::loadIconExternally): (WebCore::FrameLoaderClientBlackBerry::startDownload): (WebCore::FrameLoaderClientBlackBerry::dispatchDidReceiveIcon): * WebCoreSupport/IconDatabaseClientBlackBerry.cpp: * WebCoreSupport/NotificationPresenterImpl.cpp: (WebCore::NotificationPresenterImpl::show): (WebCore::NotificationPresenterImpl::cancel): (WebCore::NotificationPresenterImpl::requestPermission): (WebCore::NotificationPresenterImpl::onPermission): (WebCore::NotificationPresenterImpl::notificationClicked): * WebCoreSupport/NotificationPresenterImpl.h: (Platform): (NotificationPresenterImpl): * WebCoreSupport/SelectPopupClient.cpp: (WebCore::SelectPopupClient::SelectPopupClient): (WebCore::SelectPopupClient::update): (WebCore::SelectPopupClient::generateHTML): * WebCoreSupport/SelectPopupClient.h: (Platform): (BlackBerry): (SelectPopupClient): * WebCoreSupport/UserMediaClientImpl.cpp: (WebCore::toMediaStreamSource): (WebCore::toMediaStreamDescriptor): (WebCore::UserMediaClientImpl::requestUserMedia): (WebCore::UserMediaClientImpl::cancelUserMediaRequest): * WebKitSupport/AboutData.cpp: (BlackBerry::WebKit::cachePage): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::convertStringToWchar): (BlackBerry::WebKit::convertStringToWcharVector): (BlackBerry::WebKit::convertSpannableStringToString): (BlackBerry::WebKit::InputHandler::learnText): (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed): (BlackBerry::WebKit::InputHandler::openDatePopup): (BlackBerry::WebKit::InputHandler::openSelectPopup): (BlackBerry::WebKit::InputHandler::setText): * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::selectedText): * WebKitSupport/SelectionHandler.h: (Platform): (WebKit): (SelectionHandler): * WebKitSupport/SurfacePool.cpp: (BlackBerry::WebKit::SurfacePool::sharedPixmapGroup): * WebKitSupport/SurfacePool.h: (SurfacePool): 2012-10-15 Antonio Gomes [BlackBerry] Clean up BackingStoreClient (part II) https://bugs.webkit.org/show_bug.cgi?id=99327 Reviewed by Yong Li. Remove more unneeded BackingStoreClient <-> WebPageClient integration methods: - BackingStoreClient* backingStoreClientForFrame(...) - void addBackingStoreClientForFrame(...) - void removeBackingStoreClientForFrame(...) Change places calling WPPriv::backingStoreClientForFrame to directly access WPPriv::backingStoreClient instead, since only the main frame will have a BackingStoreClient instance associated with it, and it is owned by the WKPriv. Remove non-mainframe only references to BackingStoreClient completely, since it is dead code now. * Api/InRegionScroller.cpp: (BlackBerry::WebKit::InRegionScrollerPrivate::setLayerScrollPosition): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::backingStoreClient): (BlackBerry::WebKit::WebPage::destroy): * Api/WebPage_p.h: (WebPagePrivate): * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::invalidateContentsForSlowScroll): (WebCore::ChromeClientBlackBerry::scroll): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::transitionToCommittedForNewPage): (WebCore::FrameLoaderClientBlackBerry::createFrame): (WebCore::FrameLoaderClientBlackBerry::detachedFromParent2): * WebKitSupport/BackingStoreClient.cpp: (BlackBerry::WebKit::BackingStoreClient::create): (BlackBerry::WebKit::BackingStoreClient::BackingStoreClient): (BlackBerry::WebKit::BackingStoreClient::~BackingStoreClient): * WebKitSupport/BackingStoreClient.h: (BackingStoreClient): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::setBatchEditingActive): 2012-10-15 Antonio Gomes [BlackBerry] Clean up BackingStoreClient (part I) https://bugs.webkit.org/show_bug.cgi?id=99327 Reviewed by Yong Li. Now that we won't use the BackingStoreClient code path to scroll inner frames at all (instead we use AC layers!), we can remove all "!isMainFrame" code paths. No behavior change, since the code path being removed was not in use. * WebKitSupport/BackingStoreClient.cpp: (BlackBerry::WebKit::BackingStoreClient::absoluteRect): (BlackBerry::WebKit::BackingStoreClient::transformedActualVisibleSize): (BlackBerry::WebKit::BackingStoreClient::viewportSize): (BlackBerry::WebKit::BackingStoreClient::transformedViewportSize): (BlackBerry::WebKit::BackingStoreClient::visibleContentsRect): (BlackBerry::WebKit::BackingStoreClient::transformedVisibleContentsRect): (BlackBerry::WebKit::BackingStoreClient::checkOriginOfCurrentScrollOperation): 2012-10-13 Jakob Petsovits [BlackBerry] Fetch blit rects from a viewport accessor https://bugs.webkit.org/show_bug.cgi?id=98581 RIM PR 173292 Reviewed by George Staikos. Internally reviewed by Arvid Nilsson. The long-standing userInterfaceBlittedVisibleContentsRect() method in WebPageClient has long been a major annoyance, as it returns the source rect for WebKit contents but in backingstore pixel coordinates. This makes it not only unwieldy but also terribly fragile, especially when both pinch zoom and a backingstore re-render both deal with the same rectangle. On different threads, even. BlackBerry::Platform now exposes a ViewportAccessor interface, which can be used to get the various rects in document coordinates or target pixel coordinates, both being a better choice than the ones dependent on an implentation detail. This commit makes use of this new functionality. Instead of relying on the passed rectangle to contain implicit information about the scale factor, we now track the scale of each backingstore geometry by making a snapshot of the current WebKit-thread scale when the geometry is generated. Once the geometry is swapped to the front, we can then calculate the remaining backingstore-to-viewport transformation in a threadsafe way. We now only calculate this if we actually blit from backingstore tiles and don't go through a configuration of pure accelerated compositing. As a result, we are now a lot more robust against synchonization issues related to backingstore geometry changes. As an additional gimmick, the scale is also stored with each tile buffer to doubly secure that a tile rendered in one scale is not transferred to a different geometry and then rendered there without being rerendered at the new scale, even if the rendered pixel coordinates are still the same. Having per-geometry scale information also opens up opportunities to further improve backingstore rendering later. For instance, we could pre-render a low-res version of the page onto one buffer and combine that one with a higher-res array of tiles covering a smaller area. Or we could steal some tiles from the front geometry to render them at a new scale while a pinch-zoom operation is in progress. No such thing is implemented in this patch though. In adapting/fixing the backingstore visualization debug mode and the default background painting in renderDirectToWindow(), we also introduce new ViewportAccessor subclasses that can subsequently be used to replace methods from WebPage and elsewhere. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::slowScroll): (BlackBerry::WebKit::BackingStorePrivate::scroll): (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect): (BlackBerry::WebKit::BackingStorePrivate::scrollBackingStore): (BlackBerry::WebKit::BackingStorePrivate::renderDirectToWindow): (BlackBerry::WebKit::BackingStorePrivate::render): (BlackBerry::WebKit::BackingStorePrivate::paintDefaultBackground): (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents): (BlackBerry::WebKit::BackingStorePrivate::blitHorizontalScrollbar): (BlackBerry::WebKit::BackingStorePrivate::blitVerticalScrollbar): (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion): (BlackBerry::WebKit::BackingStorePrivate::updateTileMatrixIfNeeded): (BlackBerry::WebKit::BackingStorePrivate::orientationChanged): (BlackBerry::WebKit::BackingStorePrivate::createSurfaces): (BlackBerry::WebKit::BackingStorePrivate::invalidateWindow): * Api/BackingStore_p.h: (BlackBerry): (Platform): (BlackBerry::WebKit::BackingStoreGeometry::BackingStoreGeometry): (BlackBerry::WebKit::BackingStoreGeometry::scale): (BlackBerry::WebKit::BackingStoreGeometry::setScale): (BackingStoreGeometry): (BackingStorePrivate): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::init): (BlackBerry::WebKit::WebPage::webkitThreadViewportAccessor): (WebKit): * Api/WebPage.h: (Platform): * Api/WebPageClient.h: (Platform): * Api/WebPageCompositor.cpp: (BlackBerry::WebKit::WebPageCompositorPrivate::animationFrameChanged): * Api/WebPage_p.h: (WebKit): (WebPagePrivate): * WebKitSupport/BackingStoreTile.cpp: (BlackBerry::WebKit::TileBuffer::TileBuffer): (BlackBerry::WebKit::TileBuffer::isRendered): * WebKitSupport/BackingStoreTile.h: (TileBuffer): (BlackBerry::WebKit::TileBuffer::scale): (BlackBerry::WebKit::TileBuffer::setScale): * WebKitSupport/BackingStoreVisualizationViewportAccessor.cpp: Added. (WebKit): (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::BackingStoreVisualizationViewportAccessor): (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::pixelContentsSize): (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::documentContentsSize): (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::pixelScrollPosition): (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::documentScrollPosition): (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::pixelViewportSize): (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::documentViewportSize): (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::destinationSurfaceOffset): (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::scale): (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::state): * WebKitSupport/BackingStoreVisualizationViewportAccessor.h: Added. (BlackBerry): (Platform): (WebKit): (BackingStoreVisualizationViewportAccessor): (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::~BackingStoreVisualizationViewportAccessor): * WebKitSupport/WebKitThreadViewportAccessor.cpp: Added. (WebKit): (BlackBerry::WebKit::WebKitThreadViewportAccessor::WebKitThreadViewportAccessor): (BlackBerry::WebKit::WebKitThreadViewportAccessor::pixelContentsSize): (BlackBerry::WebKit::WebKitThreadViewportAccessor::documentContentsSize): (BlackBerry::WebKit::WebKitThreadViewportAccessor::pixelScrollPosition): (BlackBerry::WebKit::WebKitThreadViewportAccessor::documentScrollPosition): (BlackBerry::WebKit::WebKitThreadViewportAccessor::pixelViewportSize): (BlackBerry::WebKit::WebKitThreadViewportAccessor::documentViewportSize): (BlackBerry::WebKit::WebKitThreadViewportAccessor::destinationSurfaceOffset): (BlackBerry::WebKit::WebKitThreadViewportAccessor::scale): * WebKitSupport/WebKitThreadViewportAccessor.h: Added. (BlackBerry): (Platform): (WebKit): (WebKitThreadViewportAccessor): (BlackBerry::WebKit::WebKitThreadViewportAccessor::~WebKitThreadViewportAccessor): 2012-10-11 Peter Wang [BlackBerry] Paused in Inspector, Browser doesn't exit cleanly https://bugs.webkit.org/show_bug.cgi?id=97962 Reviewed by George Staikos. Before destroying webpage, close the inspector, so if the JSC is paused it will be resumed. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::destroy): 2012-10-11 Konrad Piascik Web Inspector: node search does not work with elements on touch start listener https://bugs.webkit.org/show_bug.cgi?id=95252 Reviewed by Pavel Feldman. Removed calls to InspectorInstrumentation that no didn't work anyway. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::touchEvent): 2012-10-11 Chris Guan [Blackberry] makes NavigatorContentUtils work https://bugs.webkit.org/show_bug.cgi?id=99022 Reviewed by Rob Buis. Because r126735 renamed RegisterProtocolHandler API to NavigatorContentUtils and r122810 added RegisterProtocolHandlerClient to the Modules/protocolhandler, we need sync up code: 1. Add NavigatorContentUtilsClientBlackBerry class. 2. use new API provideNavigatorContentUtilsTo. No new tests. Covered by existing tests. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::init): * WebCoreSupport/NavigatorContentUtilsClientBlackBerry.cpp: Added. (WebCore): (WebCore::NavigatorContentUtilsClientBlackBerry::NavigatorContentUtilsClientBlackBerry): (WebCore::NavigatorContentUtilsClientBlackBerry::registerProtocolHandler): (WebCore::NavigatorContentUtilsClientBlackBerry::isProtocolHandlerRegistered): (WebCore::NavigatorContentUtilsClientBlackBerry::unregisterProtocolHandler): * WebCoreSupport/NavigatorContentUtilsClientBlackBerry.h: Added. (WebKit): (NavigatorContentUtilsClientBlackBerry): (WebCore::NavigatorContentUtilsClientBlackBerry::~NavigatorContentUtilsClientBlackBerry): 2012-10-10 Lianghui Chen [BlackBerry] Fix assertion in NetworkJob::notifyChallengeResult. https://bugs.webkit.org/show_bug.cgi?id=97397 Internal PR: 186597. Internally reviewed by Yong Li, Joe Mason. Reviewed by George Staikos. Update WebPage to use new AuthenticationChallengeManager. Register page creation/deletion and visibility change to the new AuthenticationChallengeManager. Initialize AuthenticationChallengeManager in GlobalInitialize() function. * Api/BlackBerryGlobal.cpp: (BlackBerry::WebKit::globalInitialize): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge): (BlackBerry::WebKit::WebPage::setVisible): * Api/WebPage_p.h: (WebPagePrivate): 2012-10-10 Andrew Lo [BlackBerry] Do not perform backing store blit for animations during one-shot drawing synchronization https://bugs.webkit.org/show_bug.cgi?id=98944 Reviewed by Rob Buis. Internally reviewed by: Arvid Nilsson. Internal PR 220014 Prevent animations from causing a backing store blit during a one-shot drawing synchronization. * Api/WebPageCompositor.cpp: (BlackBerry::WebKit::WebPageCompositorPrivate::animationFrameChanged): 2012-10-10 Mike Fenton [BlackBerry] Fix crash for detached node when validating selection change. https://bugs.webkit.org/show_bug.cgi?id=98926 Reviewed by Rob Buis. PR 220628. Guard against detached nodes when generating selection rect. * WebKitSupport/DOMSupport.cpp: (BlackBerry::WebKit::DOMSupport::visibleTextQuads): 2012-10-10 Mike Fenton [BlackBerry] Adjust spell checking location to update after the cursor position is set. https://bugs.webkit.org/show_bug.cgi?id=98904 Reviewed by Rob Buis. PR 215172. Delay calculation of caret position until it is updated on mouse release handling. Reviewed Internally by Nima Ghanavatian. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint): (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions): 2012-10-10 Mike Fenton [BlackBerry] Suppress keyboard requests while processing spell checking suggestions unless focus change is occurring.. https://bugs.webkit.org/show_bug.cgi?id=98903 Reviewed by Rob Buis. PR 221143. Suppress keyboard state changes when they are not triggered by focus changes. Reviewed Internally by Nima Ghanavatian. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::setElementUnfocused): (BlackBerry::WebKit::InputHandler::setElementFocused): (BlackBerry::WebKit::InputHandler::notifyClientOfKeyboardVisibilityChange): * WebKitSupport/InputHandler.h: 2012-10-09 Rob Buis [BlackBerry] Cleanup FatFingers.cpp https://bugs.webkit.org/show_bug.cgi?id=98806 Reviewed by Antonio Gomes. Cleanup namespace usage and sync up FatFingers.cpp. * WebKitSupport/FatFingers.cpp: (BlackBerry::WebKit::compareDistanceBetweenPoints): (BlackBerry::WebKit::FatFingers::findBestPoint): (BlackBerry::WebKit::FatFingers::checkFingerIntersection): (BlackBerry::WebKit::FatFingers::findIntersectingRegions): (BlackBerry::WebKit::FatFingers::checkForClickableElement): (BlackBerry::WebKit::FatFingers::checkForText): (BlackBerry::WebKit::FatFingers::getNodesFromRect): (BlackBerry::WebKit::FatFingers::getRelevantInfoFromPoint): 2012-10-09 Antonio Gomes Get rid of FIXED_POSITION_CREATES_STACKING_CONTEXT in favor of Settings::fixedPositionCreatesStackingContext() https://bugs.webkit.org/show_bug.cgi?id=98756 Reviewed by Rob Buis. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::init): 2012-10-09 Charles Wei [BlackBerry] Need API to control the DNS Prefetching https://bugs.webkit.org/show_bug.cgi?id=98713 Reviewed by George Staikos. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::init): (BlackBerry::WebKit::WebPage::enableDNSPrefetch): (WebKit): (BlackBerry::WebKit::WebPage::disableDNSPrefetch): (BlackBerry::WebKit::WebPage::isDNSPrefetchEnabled): * Api/WebPage.h: 2012-10-07 Caio Marcelo de Oliveira Filho Rename first/second to key/value in HashMap iterators https://bugs.webkit.org/show_bug.cgi?id=82784 Reviewed by Eric Seidel. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect): (BlackBerry::WebKit::BackingStorePrivate::visibleTilesRect): (BlackBerry::WebKit::BackingStorePrivate::resetTiles): (BlackBerry::WebKit::BackingStorePrivate::updateTiles): (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion): (BlackBerry::WebKit::BackingStorePrivate::mapFromTransformedContentsToTiles): * WebCoreSupport/NotificationPresenterImpl.cpp: (WebCore::NotificationPresenterImpl::cancel): (WebCore::NotificationPresenterImpl::onPermission): (WebCore::NotificationPresenterImpl::notificationClicked): * WebCoreSupport/UserMediaClientImpl.cpp: (WebCore::UserMediaClientImpl::cancelUserMediaRequest): * WebKitSupport/AboutData.cpp: (BlackBerry::WebKit::dumpJSCTypeCountSetToTableHTML): * WebKitSupport/FrameLayers.cpp: (BlackBerry::WebKit::FrameLayers::removeLayerByFrame): (BlackBerry::WebKit::FrameLayers::commitOnWebKitThread): (BlackBerry::WebKit::FrameLayers::calculateRootLayer): 2012-10-05 Rob Buis [BlackBerry] Implement TestRunner.setMockDeviceOrientation https://bugs.webkit.org/show_bug.cgi?id=98542 Reviewed by Antonio Gomes. PR 120681 Provide framework for mock device motion. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::init): * WebKitSupport/DumpRenderTreeSupport.cpp: (toDeviceOrientationClientMock): (DumpRenderTreeSupport::setMockDeviceOrientation): * WebKitSupport/DumpRenderTreeSupport.h: (DumpRenderTreeSupport): 2012-10-05 Konrad Piascik [BlackBerry] Remove unnecessary html file. https://bugs.webkit.org/show_bug.cgi?id=98531 Reviewed by Yong Li. We now just use Source/WebCore/inspector/front-end/inspector.html instead. * WebCoreSupport/inspectorBB.html: Removed. 2012-10-05 Antonio Gomes [BlackBerry] Find a proper fix for the WebPagePrivate::enqueueRenderingOfClippedContentOfScrollableNodeAfterInRegionScrolling hack https://bugs.webkit.org/show_bug.cgi?id=98517 PR #137382 Reviewed by Yong Li. We've generalized composited in-region scrolling, originally only applicable to block elements, to inner frames (see PR #197093). Past that, we no longer need to force repaints of offscreen areas when we finish scrolling, since translating the Layer takes care of properly invalidating it. Thus, remove this method. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::notifyInRegionScrollStopped): * Api/WebPage_p.h: (WebPagePrivate): 2012-10-05 Mike Fenton [BlackBerry] Update default input support style for single line inputs. https://bugs.webkit.org/show_bug.cgi?id=98510 Reviewed by Antonio Gomes. PR 219588. Update style calculations to eliminate automatic changes by default on single line input fields. Reviewed Internally by Gen Mak. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::inputStyle): 2012-10-04 Simon Fraser Final part of "sync" to "flush" renaming https://bugs.webkit.org/show_bug.cgi?id=98430 Reviewed by Tim Horton. Change method names on GraphicsLayer and GraphicsLayerClient that refer to "sync" to use the term "flush" instead, to be consistent with the rest of the code. * Api/WebOverlay.cpp: (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::notifyFlushRequired): * Api/WebOverlay_p.h: (WebOverlayPrivateWebKitThread): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::notifyFlushRequired): * Api/WebPage_p.h: (WebPagePrivate): * WebKitSupport/DefaultTapHighlight.cpp: (BlackBerry::WebKit::DefaultTapHighlight::notifyFlushRequired): * WebKitSupport/DefaultTapHighlight.h: (DefaultTapHighlight): * WebKitSupport/InspectorOverlayBlackBerry.cpp: (BlackBerry::WebKit::InspectorOverlay::notifyFlushRequired): * WebKitSupport/InspectorOverlayBlackBerry.h: (InspectorOverlay): * WebKitSupport/SelectionOverlay.cpp: (BlackBerry::WebKit::SelectionOverlay::notifyFlushRequired): * WebKitSupport/SelectionOverlay.h: (SelectionOverlay): 2012-10-04 Simon Fraser Standardize on "flush" terminology for compositing layer flushing/syncing https://bugs.webkit.org/show_bug.cgi?id=98321 Reviewed by Simon Fraser. Rename compositing-related methods that refer to "syncing" to instead refer to "flushing". * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::scheduleCompositingLayerFlush): * WebCoreSupport/ChromeClientBlackBerry.h: (ChromeClientBlackBerry): 2012-10-03 Antonio Gomes [BlackBerry] Exiting fullscreen does not set the correct scroll position (Part II) https://bugs.webkit.org/show_bug.cgi?id=97917 PR #212920 Reviewed by Yong Li. Internally reviewed by Jacky Jiang. Inform the client of transform change so that we avoid getting stuck on overscroll. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setViewportSize): 2012-10-03 Otto Derek Cheung [BlackBerry] Implementing the NetworkInfo API for BB port https://bugs.webkit.org/show_bug.cgi?id=98273 Reviewed by Rob Buis. Adding new class NetworkInfoClientBlackBerry to implement NetworkInfoClient for the BlackBerry port. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::init): * WebCoreSupport/NetworkInfoClientBlackBerry.cpp: Added. (WebCore): (WebCore::NetworkInfoClientBlackBerry::NetworkInfoClientBlackBerry): (WebCore::NetworkInfoClientBlackBerry::startUpdating): (WebCore::NetworkInfoClientBlackBerry::stopUpdating): (WebCore::NetworkInfoClientBlackBerry::bandwidth): (WebCore::NetworkInfoClientBlackBerry::metered): (WebCore::NetworkInfoClientBlackBerry::onCurrentNetworkChange): (WebCore::NetworkInfoClientBlackBerry::onCurrentCellularTypeChange): * WebCoreSupport/NetworkInfoClientBlackBerry.h: Added. (WebKit): (WebCore): (NetworkInfoClientBlackBerry): (WebCore::NetworkInfoClientBlackBerry::~NetworkInfoClientBlackBerry): 2012-10-02 Anders Carlsson Change most GraphicsLayer::create calls to use the version that takes a GraphicsLayerFactory https://bugs.webkit.org/show_bug.cgi?id=98217 Reviewed by Andreas Kling. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::overlayLayer): 2012-10-02 Yong Li [BlackBerry] Prevent window.close() from closing pages that are not opened by JS https://bugs.webkit.org/show_bug.cgi?id=98190 Reviewed by Antonio Gomes. RIM PR# 217812. Only pages opened by JS can be closed by JS. * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::closeWindowSoon): 2012-10-01 Brady Eidson Remove the Safari 2 -> Safari 3 icon database import code. https://bugs.webkit.org/show_bug.cgi?id=98113 Reviewed by Maciej Stachowiak. Nuke the performImport() IconDatabaseClient method. * WebCoreSupport/IconDatabaseClientBlackBerry.cpp: * WebCoreSupport/IconDatabaseClientBlackBerry.h: (IconDatabaseClientBlackBerry): 2012-10-01 Jakob Petsovits [BlackBerry] Remove unused hasPendingScrollOrZoomEvent() interface. https://bugs.webkit.org/show_bug.cgi?id=98107 RIM PR 173292 Reviewed by George Staikos. This method is not referenced anywhere anymore, so we should stop requiring it from WebPageClient implementations. * Api/WebPageClient.h: 2012-10-01 Mike Fenton [BlackBerry] Remove suppressing of VKB hiding when processing changes. https://bugs.webkit.org/show_bug.cgi?id=98023 Reviewed by Rob Buis. PR 215881. Allow JS to blur the input field while processing key handling. Reviewed Internally by Chris Hutten-Czapski * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::notifyClientOfKeyboardVisibilityChange): 2012-09-28 Konrad Piascik [BlackBerry] Update the value of window.devicePixelRation when it is set programmatically https://bugs.webkit.org/show_bug.cgi?id=97512 Reviewed by Rob Buis. RIM PR 213984 Set the deviceScaleFactor of the page explicity when the devicePixelRatio is changed. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments): (BlackBerry::WebKit::WebPagePrivate::didChangeSettings): 2012-09-28 Mikhail Pozdnyakov Code inside FrameLoaderClient::canShowMIMEType() implementations can be shared among different WK ports https://bugs.webkit.org/show_bug.cgi?id=97547 Reviewed by Adam Barth. Newly added WebCore::MIMETypeRegistry::canShowMIMEType() function is used inside WebCore::FrameLoaderClientBlackBerry::canShowMIMEType(). * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::canShowMIMEType): 2012-09-28 Rob Buis [BlackBerry] Hard to tap on x to clear a text field https://bugs.webkit.org/show_bug.cgi?id=97923 Reviewed by Antonio Gomes. Allow the shadow element for 'X' to be clickable and do not prefer shadow content-editable div's over the 'X'. * WebKitSupport/FatFingers.cpp: (BlackBerry::WebKit::FatFingers::isElementClickable): 2012-09-28 Antonio Gomes [BlackBerry] Extend composited in-region scrolling to iframes/frames https://bugs.webkit.org/show_bug.cgi?id=97922 PR #197093 Reviewed by Yong Li. Internaly reviewed by Arvid Nilsson. Add support for composited scrolling in a inner frame level: 1) When creating an InRegionScrollableArea, for a inner scrollable frame, cache and camouflag the appropriated scroll layer (i.e. RenderLayerCompositor::scrollLayer); 2) Differentiate what type of scroll target we are at: BlockElement or InnerFrame; 3) Change the signature of the public methods to support and newly passed in ScrollTarget parameter; As a side note, this parameter is needed in order to know what class to static_cast the GraphicsLayer::client to: in the case of a composited scrollable inner frame, the client is a RenderLayerCompositor; in case of a composited scrollable block element, the client is a RenderLayerBacking. * Api/InRegionScroller.cpp: (BlackBerry::WebKit::InRegionScroller::setScrollPositionWebKitThread): (BlackBerry::WebKit::InRegionScrollerPrivate::setScrollPositionWebKitThread): * Api/InRegionScroller.h: * Api/InRegionScroller_p.h: (InRegionScrollerPrivate): * WebCoreSupport/ChromeClientBlackBerry.h: (WebCore::ChromeClientBlackBerry::allowedCompositingTriggers): * WebKitSupport/InRegionScrollableArea.cpp: (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea): 2012-09-28 Antonio Gomes [BlackBerry] Exiting fullscreen does not set the correct scroll position https://bugs.webkit.org/show_bug.cgi?id=97917 PR #212920 Reviewed by Yong Li. Internally reviewed by Jacky Jiang. Restore the zoom level and scroll position at the time when know the fullscreen exit routine has ended (i.e. in ::setViewportSize instead of ::exitFullScreenForElement). Also patch caches now the scroll position instead of only the "x scroll position. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::setViewportSize): (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement): (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement): * Api/WebPage_p.h: (WebPagePrivate): 2012-09-28 Kent Tamura Clean up Localizer-related functions https://bugs.webkit.org/show_bug.cgi?id=97899 Reviewed by Kentaro Hara. * WebCoreSupport/ColorPickerClient.cpp: (WebCore::ColorPickerClient::localizer): Follow Document::getLocalizer renaming. * WebCoreSupport/DatePickerClient.cpp: (WebCore::SelectPopupClient::localizer): ditto. * WebCoreSupport/SelectPopupClient.cpp: (WebCore::SelectPopupClient::localizer): ditto. 2012-09-28 Genevieve Mak [BLACKBERRY] Add isVisible method to WebTapHighlight https://bugs.webkit.org/show_bug.cgi?id=97915 Reviewed by Rob Buis. Reviewed Internally By Andrew Lo The isVisible() method lets us avoid dispatching to the webkit thread if the tap highlight isn't visible. Always clear tap highlight on Touch up when converting Touch Events to Mouse Events. * Api/WebTapHighlight.h: * WebKitSupport/DefaultTapHighlight.h: (BlackBerry::WebKit::DefaultTapHighlight::isVisible): * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint): 2012-09-28 Andrew Lo [BlackBerry] Should suspend page's scripted animations when WebPage is invisible https://bugs.webkit.org/show_bug.cgi?id=97856 Reviewed by Antonio Gomes. Suspend page animations when setting WebPage invisible, resume when visible. Internal PR212788. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setVisible): 2012-09-28 Arvid Nilsson [BlackBerry] Destroy thread-specific data for Platform::Graphics::Buffer on the right thread https://bugs.webkit.org/show_bug.cgi?id=97674 Reviewed by Rob Buis. A new API was added to BlackBerry::Platform::Graphics for destroying thread-specific data generated on the compositing thread when we blit buffers. The buffers are otherwise created and destroyed on the WebKit thread, which doesn't give platform any opportunity to destroy the thread-specific data. This patch adds calls to the new API to avoid leaking resources. Reviewed internally by Jakob Petsovits and Filip Spacek. PR 214644 * WebKitSupport/SurfacePool.cpp: (BlackBerry::WebKit::SurfacePool::initialize): (BlackBerry::WebKit::SurfacePool::createPlatformGraphicsContext): (BlackBerry::WebKit::SurfacePool::lockTileRenderingSurface): (BlackBerry::WebKit::SurfacePool::releaseTileRenderingSurface): (BlackBerry::WebKit::SurfacePool::initializeVisibleTileBuffer): (BlackBerry::WebKit::SurfacePool::createBuffers): (BlackBerry::WebKit::SurfacePool::releaseBuffers): 2012-09-27 Kent Tamura Use Localizer in PagePopupController https://bugs.webkit.org/show_bug.cgi?id=97862 Reviewed by Hajime Morita. We need to implement PagePopupClient::localizer. These clients know the host elements. Localizer implementations get Localizer objects from the owner documents of the elements for the browser locale. * WebCoreSupport/ColorPickerClient.cpp: (WebCore::ColorPickerClient::localizer): Added. * WebCoreSupport/ColorPickerClient.h: (ColorPickerClient): Declare "localizer." * WebCoreSupport/DatePickerClient.cpp: (WebCore::SelectPopupClient::localizer): Added. * WebCoreSupport/DatePickerClient.h: (DatePickerClient): Declare "localizer." * WebCoreSupport/SelectPopupClient.cpp: (WebCore::SelectPopupClient::localizer): Added. * WebCoreSupport/SelectPopupClient.h: (SelectPopupClient): Declare "localizer." 2012-09-27 Charles Wei Empty URL gets through to acceptNavigationRequest() https://bugs.webkit.org/show_bug.cgi?id=97076 Reviewed by George Staikos. Invalid URLs in iframe src results in an empty URL in platform request, we should reject such URL as early as we identify it. * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction): 2012-09-26 Jakob Petsovits [BlackBerry] Remove blitContents() in favor of blitVisibleContents(). https://bugs.webkit.org/show_bug.cgi?id=97718 Reviewed by Antonio Gomes. After the last calling sites of blitContents() have been removed or reworked, the actual method itself can now retire. All blits now go through blitVisibleContents(). The knowledge that we always blit the full visible surface can facilitate further optimizations; we will get to that in time. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::suspendScreenAndBackingStoreUpdates): (BlackBerry::WebKit::BackingStorePrivate::resumeScreenAndBackingStoreUpdates): (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents): * Api/BackingStore.h: * Api/BackingStore_p.h: (BackingStorePrivate): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::transitionToCommittedForNewPage): 2012-09-26 Mike Fenton [BlackBerry] Update padding in ensureFocusTextElementVisible to be DPI independent. https://bugs.webkit.org/show_bug.cgi?id=97684 Reviewed by Rob Buis. Update padding in ensureFocusTextElementVisible to be DPI independent and relative to the current zoom level. Reviewed Internally by Gen Mak. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible): 2012-09-25 Genevieve Mak Fat Fingers doesn't work on non-scrollable pages. PR #209609 https://bugs.webkit.org/show_bug.cgi?id=97607 Reviewed by Antonio Gomes. Only bypass Fat Fingers and use the actual touch point if its specifically requested and the page has a mouse move listener or if using the Touch Event Mode meta-tag. * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint): 2012-09-25 Rob Buis [BlackBerry] Make COMPUTED_GOTO part of the HAVE section https://bugs.webkit.org/show_bug.cgi?id=97600 Reviewed by Yong Li. Also get rid of COMPUTED_GOTO_INTERPRETER and add COMPUTED_GOTO_OPCODES. * WebCoreSupport/AboutDataEnableFeatures.in: * WebCoreSupport/AboutDataHaveFeatures.in: 2012-09-25 Mike Fenton [BlackBerry] Suspend the backingstore while adjusting the view on input field focus. https://bugs.webkit.org/show_bug.cgi?id=97595 Reviewed by Antonio Gomes. PR 188751. Avoid jumpiness when both a scroll and zoom are required to move an input field into focus by suspending the backingstore. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible): 2012-09-25 Pratik Solanki Remove HAVE_SBRK since we never set use_sbrk to true https://bugs.webkit.org/show_bug.cgi?id=97525 Reviewed by Geoffrey Garen. * WebCoreSupport/AboutDataHaveFeatures.in: Remove SBRK from list. 2012-09-25 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=95397 Need to merge didFirstVisuallyNonEmptyLayout and didNewFirstVisuallyNonEmptyLayout -and corresponding- Reviewed by Sam Weinig. Remove dispatchDidFirstLayout, dispatchDidFirstVisuallyNonEmptyLayout, and dispatchDidNewFirstVisuallyNonEmptyLayout. Their functionality is now replaced by dispatchDidLayout(LayoutMilestoneOptions) * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchDidLayout): * WebCoreSupport/FrameLoaderClientBlackBerry.h: (FrameLoaderClientBlackBerry): It is now necessary to opt into getting any of the "layout milestone" notifications. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::init): 2012-09-25 Mike Fenton [BlackBerry] When zooming into an input field take the current zoom level into account. https://bugs.webkit.org/show_bug.cgi?id=97594 Reviewed by Antonio Gomes. PR 188751. Perform the zoom action prior to scroll to avoid breaking scrolling rules. Take the current scale into account when calculating the zoom factor. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible): 2012-09-25 Nima Ghanavatian [BlackBerry] Handling required for multiple consecutive whitespace https://bugs.webkit.org/show_bug.cgi?id=97575 Reviewed by Rob Buis. PR211670 Need specific handling in the case where we have multiple consecutive whitespaces which exceeds our character limit. This breaks some of the functionality employed with the visible_units methods used here to tranverse the text. Internally reviewed by Mike Fenton. * WebKitSupport/DOMSupport.cpp: (BlackBerry::WebKit::DOMSupport::trimWhitespaceFromRange): (DOMSupport): (BlackBerry::WebKit::DOMSupport::isEmptyRangeOrAllSpaces): * WebKitSupport/DOMSupport.h: (WebCore): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::spellCheckBlock): (BlackBerry::WebKit::InputHandler::getRangeForSpellCheckWithFineGranularity): 2012-09-24 Mark Lam Deleting the classic interpreter and cleaning up some build options. https://bugs.webkit.org/show_bug.cgi?id=96969. Reviewed by Geoffrey Garen. * WebCoreSupport/AboutDataEnableFeatures.in: 2012-09-24 Benjamin Poulain Fix Geolocation error reporting in the test support https://bugs.webkit.org/show_bug.cgi?id=97386 Reviewed by Sam Weinig. * WebKitSupport/DumpRenderTreeSupport.cpp: (DumpRenderTreeSupport::setMockGeolocationPositionUnavailableError): * WebKitSupport/DumpRenderTreeSupport.h: (DumpRenderTreeSupport): 2012-09-24 Otto Derek Cheung [BlackBerry] Reverting implementation for 407 error pages https://bugs.webkit.org/show_bug.cgi?id=97455 Reviewed by Rob Buis. Revert "[BlackBerry] Really fix bug 95488 that user can get the authentication challenge dialog while the other tab has focus." https://bugs.webkit.org/show_bug.cgi?id=97348 This reverts commit 0cffe01961fb80204138505bcec29a83818efb73. * Api/BlackBerryGlobal.cpp: (BlackBerry::WebKit::globalInitialize): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge): (BlackBerry::WebKit::WebPage::setVisible): * Api/WebPage_p.h: (WebPagePrivate): 2012-09-24 Arvid Nilsson [BlackBerry] Add cookie database API https://bugs.webkit.org/show_bug.cgi?id=97102 Reviewed by Antonio Gomes. The cookie database is exposed through WebCookieJar, which has only two methods: cookies() and setCookies(). Also add a new WebString::fromUTF8 overload that takes a const char* and a length, in order to avoid a strlen call when converting from other string classes to WebString. This is useful for callers of the new cookie API when converting cookies to WebString. Reviewed internally by Otto D. Cheung. PR 209282 * Api/WebCookieJar.cpp: Added. (WebKit): (BlackBerry::WebKit::WebCookieJar::WebCookieJar): (BlackBerry::WebKit::WebCookieJar::cookies): (BlackBerry::WebKit::WebCookieJar::setCookies): * Api/WebCookieJar.h: Added. (WebKit): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate): (BlackBerry::WebKit::WebPage::cookieJar): (WebKit): * Api/WebPage.h: (WebKit): * Api/WebPage_p.h: (WebKit): (WebPagePrivate): * Api/WebString.cpp: (BlackBerry::WebKit::WebString::fromUtf8): (WebKit): * Api/WebString.h: 2012-09-21 Lianghui Chen [BlackBerry] Really fix bug 95488 that user can get the authentication challenge dialog while the other tab has focus. https://bugs.webkit.org/show_bug.cgi?id=97348 Internal PR: 186597. Internally reviewed by Yong Li, Joe Mason. Reviewed by Yong Li. Update WebPage to use new AuthenticationChallengeManager. Register page creation/deletion and visibility change to the new AuthenticationChallengeManager. Initialize AuthenticationChallengeManager in GlobalInitialize() function. * Api/BlackBerryGlobal.cpp: (BlackBerry::WebKit::globalInitialize): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge): (BlackBerry::WebKit::WebPage::setVisible): * Api/WebPage_p.h: (WebPagePrivate): 2012-09-21 Charles Wei Wrong seperator for viewport meta in Popup scripts https://bugs.webkit.org/show_bug.cgi?id=97313 Reviewed by Yong Li. The valid seperator for viewport meta is ',' instead of ';'. * WebCoreSupport/PagePopupBlackBerry.cpp: (WebCore::PagePopupBlackBerry::generateHTML): 2012-09-21 Arvid Nilsson [BlackBerry] Remove obsolete compositing surface code https://bugs.webkit.org/show_bug.cgi?id=97314 Reviewed by Antonio Gomes. The removed code allowed rendering of sublayers to a separate offscreen surface. Now that we composite root layer and all sublayers to the window surface, this code is not needed anymore. In addition, we save some memory by not allocating the unused offscreen surface. PR 208038. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::suspendScreenAndBackingStoreUpdates): (BlackBerry::WebKit::BackingStorePrivate::blitContents): (BlackBerry::WebKit::BackingStorePrivate::drawAndBlendLayersForDirectRendering): * Api/BackingStore_p.h: (BackingStorePrivate): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setLoadState): (BlackBerry::WebKit::WebPagePrivate::suspendBackingStore): (BlackBerry::WebKit::WebPagePrivate::resizeSurfaceIfNeeded): (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired): (BlackBerry::WebKit::WebPagePrivate::setRootLayerCompositingThread): * Api/WebPage_p.h: (WebPagePrivate): * WebKitSupport/BackingStoreCompositingSurface.cpp: Removed. * WebKitSupport/BackingStoreCompositingSurface.h: Removed. * WebKitSupport/GLES2Context.cpp: (BlackBerry::WebKit::GLES2Context::buffer): (BlackBerry::WebKit::GLES2Context::surfaceSize): (BlackBerry::WebKit::GLES2Context::swapBuffers): * WebKitSupport/GLES2Context.h: (GLES2Context): * WebKitSupport/SurfacePool.cpp: (WebKit): (BlackBerry::WebKit::SurfacePool::SurfacePool): (BlackBerry::WebKit::SurfacePool::initialize): * WebKitSupport/SurfacePool.h: (SurfacePool): 2012-09-20 Peter Wang [BlackBerry] To support "Frames View" of "TimeLine" panel in Inspector https://bugs.webkit.org/show_bug.cgi?id=96077 Reviewed by Pavel Feldman. A minor modification to make the inspecting results more accurate. Internally reviewd by Arvid, Robin.C, and Konrad. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::renderJob): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired): * WebKitSupport/RenderQueue.cpp: (BlackBerry::WebKit::RenderQueue::render): 2012-09-19 Sean Wang [BlackBerry] Basic authentication challenge credentials for stored credentials again after restarting browser https://bugs.webkit.org/show_bug.cgi?id=96362 Reviewed by Rob Buis. Make the FrameLoaderClient use credential storage according to the macro BLACKBERRY_CREDENTIAL_PERSIST * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::shouldUseCredentialStorage): (WebCore): * WebCoreSupport/FrameLoaderClientBlackBerry.h: (FrameLoaderClientBlackBerry): 2012-09-19 Mike Fenton [BlackBerry] After zooming into an input field, zoom out when focus is lost. https://bugs.webkit.org/show_bug.cgi?id=97128 Reviewed by Rob Buis. When the page has automatically zoomed in for input focus, unzoom it when input focus is lost or keyboard hidden. Reviewed Internally by Gen Mak. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::InputHandler): (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible): * WebKitSupport/InputHandler.h: (InputHandler): 2012-09-19 Nima Ghanavatian [BlackBerry] Clean up the SpellingLog output https://bugs.webkit.org/show_bug.cgi?id=97129 Reviewed by Rob Buis. Internally reviewed by Mike Fenton. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::spellCheckingRequestCancelled): (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed): 2012-09-19 Mike Fenton [BlackBerry] Add SpellingLog for spell checking options request. https://bugs.webkit.org/show_bug.cgi?id=97125 Reviewed by Rob Buis. Add spell checking log to indicate the calculated text position for spell checking option requests. Reviewed Internally by Nima Ghanavatian. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint): 2012-09-19 Jonathan Dong [BlackBerry] Add function playerId() in class PageClientBlackBerry https://bugs.webkit.org/show_bug.cgi?id=97099 Reviewed by Yong Li. Implemented PageClientBlackBerry::playerID() in class WebPagePrivate, and replaced the implementation of FrameLoaderClientBlackBerry::playerId(). Internally reviewed by Charles Wei. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::playerID): (WebKit): * Api/WebPage_p.h: (WebPagePrivate): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::playerId): 2012-09-19 Abbas Sherawala [BlackBerry] BackingStorePrivate::resumeScreenAndBackingStoreUpdates more atomic Added a missing 'if' statement. https://bugs.webkit.org/show_bug.cgi?id=96925 PR #180866 Internally Reviewed by Antonio Gomes. Adding an 'if' statement which should have been in PR # 180866 (SHA:b9c06af395c22e) Reviewed by Antonio Gomes. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::resumeScreenAndBackingStoreUpdates): 2012-09-18 Nima Ghanavatian [BlackBerry] Use didCancel and didSucceed instead of didCheckCancel and didCheckSucceed https://bugs.webkit.org/show_bug.cgi?id=97033 Reviewed by Rob Buis. Using these preferred public methods (the latter has a note to be made private) ensures that the right SpellChecker object is being called during the callback in spellCheckingRequestProcessed and spellCheckingRequestCancelled. Internally reviewed by Mike Fenton. By referencing the TextCheckingRequest object's methods, we don't need to keep track of the associated SpellChecker for each request. Removing much of the code that was put in place incorrectly to achieve this. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::InputHandler): (BlackBerry::WebKit::InputHandler::requestCheckingOfString): (BlackBerry::WebKit::InputHandler::spellCheckingRequestCancelled): (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed): (BlackBerry::WebKit::InputHandler::getSpellChecker): * WebKitSupport/InputHandler.h: (InputHandler): 2012-09-18 Jessica Cao [BlackBerry] Date picker isn't inputting after 'OK' https://bugs.webkit.org/show_bug.cgi?id=97031 PR208052 Reviewed by Rob Buis Checking for !values.contains("-1") will match valid strings like "2012-09-18". Use value != "-1" instead. * WebCoreSupport/DatePickerClient.cpp: (WebCore::DatePickerClient::setValueAndClosePopup): 2012-09-18 Yong Li [BlackBerry] Popup page should reference the client with a weak pointer https://bugs.webkit.org/show_bug.cgi?id=97028 Reviewed by Rob Buis. RIM PR# 209847. Internally reviewed by Mike Fenton. Store the pointer in a ref-coutned shared object, and clear the pointer when the client is going to be destroyed, so it won't be accessed by the JS function afterwards. * WebCoreSupport/PagePopupBlackBerry.cpp: (WebCore::PagePopupBlackBerry::PagePopupBlackBerry): (WebCore::PagePopupBlackBerry::~PagePopupBlackBerry): (WebCore::PagePopupBlackBerry::init): (WebCore::setValueAndClosePopupCallback): (WebCore::popUpExtensionFinalize): (WebCore::PagePopupBlackBerry::installDOMFunction): (WebCore::PagePopupBlackBerry::closePopup): * WebCoreSupport/PagePopupBlackBerry.h: (PagePopupBlackBerry): (SharedClientPointer): (WebCore::PagePopupBlackBerry::SharedClientPointer::SharedClientPointer): (WebCore::PagePopupBlackBerry::SharedClientPointer::clear): (WebCore::PagePopupBlackBerry::SharedClientPointer::get): 2012-09-18 Arvid Nilsson [BlackBerry] Prevent scroll adjustment of input fields when region of interest mechanism active https://bugs.webkit.org/show_bug.cgi?id=96750 Reviewed by Antonio Gomes. The region of interest mechanism replaces the scrolling/zooming functionality in InputHandler::ensureFocusTextElementVisible(). We introduce a new fine-grained setting for the various adjustment modes. The WebKit embedder can disable all scroll types in favor of the region of interest mechanism by using the new setting. PR #208387 Reviewed internally by Mike Fenton. * WebKitSupport/AboutData.cpp: (BlackBerry::WebKit::configPage): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible): * WebKitSupport/InputHandler.h: 2012-09-17 Jakob Petsovits [BlackBerry] Remove dysfunctional zoom blit in setViewportSize(). https://bugs.webkit.org/show_bug.cgi?id=96954 PR 178411 Reviewed by Antonio Gomes. The blitContents() call removed by this patch used to be part of scheduleZoomAboutPoint(). Its goal was to display a preview of the zoomed contents, primarily when auto-zoomed after rotation. Nested inside a pair of screen suspend/resume calls, it has been a pointless no-op for a while. Antonio's recent change to remove scheduleZoomAboutPoint() and call zoomAboutPoint() from setViewportSize() directly (the only call site) obsoletes the call completely. The zoomAboutPoint() call itself will cause a re-render and blit right away, so we don't care about any preview. zoomAboutPoint() will also take care of the necessary screen/backingstore suspension. The result is a vastly simplified block of code. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setViewportSize): 2012-09-17 Antonio Gomes [BlackBerry] [FullScreen] entering/leaving fullscreen results in temporary glitches on the screen https://bugs.webkit.org/show_bug.cgi?id=96927 PR #180866 Reviewed by Yong Li. Suspend backing store and screen updates while entering fullscreen, and only resume at the end, when viewport is resized. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::setViewportSize): * Api/WebPage_p.h: (WebPagePrivate): * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::enterFullScreenForElement): (WebCore::ChromeClientBlackBerry::exitFullScreenForElement): 2012-09-17 Rob Buis [BlackBerry] Fix compile problems in WebKit/blackberry https://bugs.webkit.org/show_bug.cgi?id=96926 Reviewed by Antonio Gomes. This code is slightly out of date and so will not compile, fix it. * WebCoreSupport/BatteryClientBlackBerry.cpp: (WebCore::BatteryClientBlackBerry::BatteryClientBlackBerry): * WebCoreSupport/BatteryClientBlackBerry.h: (WebKit): * WebCoreSupport/CredentialTransformData.h: * WebCoreSupport/DeviceOrientationClientBlackBerry.cpp: (DeviceOrientationClientBlackBerry::onOrientation): * WebCoreSupport/InspectorClientBlackBerry.h: * WebCoreSupport/PagePopupBlackBerry.cpp: * WebKitSupport/DOMSupport.cpp: (BlackBerry::WebKit::DOMSupport::isDateTimeInputField): (BlackBerry::WebKit::DOMSupport::isTextBasedContentEditableElement): * WebKitSupport/DumpRenderTreeSupport.cpp: (DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests): * WebKitSupport/InPageSearchManager.cpp: (BlackBerry::WebKit::InPageSearchManager::scopeStringMatches): 2012-09-17 Antonio Gomes [BlackBerry] BackingStorePrivate::resumeScreenAndBackingStoreUpdates more atomic https://bugs.webkit.org/show_bug.cgi?id=96925 [FullScreen] entering/leaving fullscreen results in temporary glitches on the screen (part 2/3) PR #180866 Reviewed by Rob Buis. Internally reviewed by Arvid Nilsson. Paraphrasing Arvid "resumeBackingStore will be a truly atomic operation. Well more atomic than it was before, with regards to a mix of accelerated and non-accelerated compositing content". I.e. by committing the root layer (if needed) when resuming the Backing Store, we call blitVisibleContents right way, so we are actually shortcutting when AC content will get on screen. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::resumeScreenAndBackingStoreUpdates): 2012-09-17 Peter Wang [BlackBerry] To support "Frames View" of "TimeLine" panel in Inspector https://bugs.webkit.org/show_bug.cgi?id=96077 Reviewed by Rob Buis. Invoke the "instrumentBeginFrame" and "instrumentCancelFrame" at the start and end of processing render message to record one time of page's update. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::instrumentBeginFrame): (WebKit): (BlackBerry::WebKit::BackingStorePrivate::instrumentCancelFrame): * Api/BackingStore_p.h: * WebKitSupport/RenderQueue.cpp: (BlackBerry::WebKit::RenderQueue::render): 2012-09-17 Jakob Petsovits [BlackBerry] Support copying image data in WebOverlay. https://bugs.webkit.org/show_bug.cgi?id=96684 RIM PR 195444 Reviewed by Rob Buis. Internally reviewed by Arvid Nilsson. The publicly exposed WebOverlay class provides a method setContentsToImage() to assign a pointer to pixel data, which is later used to provide texture data for the underlying compositing layer. This works well for static images that stay in memory and never change, but not so well for images with changing contents or where the image data is being reassigned from different image sources that are not constantly kept around in memory. Due to the delayed upload and delayed fetching of EGLImage data by the GPU, we shouldn't assume the caller to know how long the image should be retained. Instead, we should offer another method of setting image data that takes ownership of the pixel data. This patch adds an option to setContentsToImage() that copies the passed pixel data and doesn't destroy it until both the texture is destroyed and the image contents are changed. Using this method, the caller can withdraw the passed pixel array right after the setContentsToImage() call without consequences. * Api/WebOverlay.cpp: (BlackBerry::WebKit::WebOverlay::setContentsToImage): (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setContentsToImage): (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::WebOverlayLayerCompositingThreadClient): (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::invalidate): (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::setContents): (WebKit): (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::clearUploadedContents): (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::setContentsToColor): (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded): (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::deleteTextures): (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setContentsToImage): * Api/WebOverlay.h: * Api/WebOverlay_p.h: (WebOverlayPrivate): (WebOverlayPrivateWebKitThread): (WebOverlayLayerCompositingThreadClient): (WebOverlayPrivateCompositingThread): 2012-09-14 Dana Jansens Minimize collisions when hashing pairs https://bugs.webkit.org/show_bug.cgi?id=96022 Reviewed by Adrienne Walker. Use WTF::pairIntHash() to hash a pair of integers. * WebKitSupport/TileIndexHash.h: 2012-09-14 Genevieve Mak Always send mouse events on pages that don't scroll even if there is no mouse move listener attatched. PR #208228 https://bugs.webkit.org/show_bug.cgi?id=96800 Reviewed by Antonio Gomes. Reviewed Internally By Antonio Gomes. * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint): 2012-09-14 Mike Fenton [BlackBerry] Update the minimum zoom scale when focusing an input field. https://bugs.webkit.org/show_bug.cgi?id=96789 Reviewed by Antonio Gomes. PR 188751. Increase the minimum font fix and base it on mm instead of pixels. Reviewed Internally by Gen Mak. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible): 2012-09-13 Antonio Gomes [BlackBerry] Remove the ability to schedule a zoom about point call. https://bugs.webkit.org/show_bug.cgi?id=96696 [FullScreen] entering/leaving fullscreen results in temporary glitches on the screen (Part I) PR #180866 Reviewed by Rob Buis. Internally reviewed by Jacky Jiang and Arvid Nilsson. Patch replaces the async call to zoomAboutPoint (via scheduling it with a one-shot-0-timer). Instead, at its single call site, we inline most of the previous scheduleZoomAboutPoint code, and in the end call zoomAboutPoint directly. Change was estimulated by Arvid's comment on PRzilla: "There is no longer any reason to have zoom about point be async.. That was a hack I did for BB6, back when we were doing everything on the WK thread and needed manual time slicing betwren rendering and user interaction." The bigger goal though is to be able to remove screen glitches while entering/leaving fullscreen mode: since we could accurately use the count-based suspend/resume backing store mechanism to prevent it. * Api/WebPage.cpp: (WebKit): (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::setLoadState): (BlackBerry::WebKit::WebPagePrivate::setViewportSize): * Api/WebPage_p.h: (WebPagePrivate): 2012-09-14 Arvid Nilsson [BlackBerry] Add renderTreeAsText API to WebPage https://bugs.webkit.org/show_bug.cgi?id=96629 Reviewed by Antonio Gomes. This will be used for automated testing. PR #198595 * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::renderTreeAsText): (WebKit): * Api/WebPage.h: 2012-09-13 Rob Buis [BlackBerry] Cleanup AboutDataEnableFeatures.in https://bugs.webkit.org/show_bug.cgi?id=96695 Reviewed by Antonio Gomes. Remove unused features. * WebCoreSupport/AboutDataEnableFeatures.in: 2012-09-13 Rob Buis [BlackBerry] Rename InspectorOverlay in blackberry/WebKitSupport https://bugs.webkit.org/show_bug.cgi?id=96689 Reviewed by Antonio Gomes. Rename to InspectorClientBlackBerry to avoid include problems. * WebCoreSupport/InspectorClientBlackBerry.h: * WebKitSupport/InspectorOverlayBlackBerry.cpp: Renamed from Source/WebKit/blackberry/WebKitSupport/InspectorOverlay.cpp. (WebKit): (BlackBerry::WebKit::InspectorOverlay::create): (BlackBerry::WebKit::InspectorOverlay::InspectorOverlay): (BlackBerry::WebKit::InspectorOverlay::notifySyncRequired): (BlackBerry::WebKit::InspectorOverlay::paintContents): (BlackBerry::WebKit::InspectorOverlay::showDebugBorders): (BlackBerry::WebKit::InspectorOverlay::showRepaintCounter): (BlackBerry::WebKit::InspectorOverlay::~InspectorOverlay): (BlackBerry::WebKit::InspectorOverlay::clear): (BlackBerry::WebKit::InspectorOverlay::update): * WebKitSupport/InspectorOverlayBlackBerry.h: Renamed from Source/WebKit/blackberry/WebKitSupport/InspectorOverlay.h. (WebCore): (WebKit): (InspectorOverlay): (InspectorOverlayClient): (BlackBerry::WebKit::InspectorOverlay::setClient): (BlackBerry::WebKit::InspectorOverlay::notifyAnimationStarted): 2012-09-13 Antonio Gomes Unreviewed, warning fix left over from r128456 (bug 96645) * Api/InRegionScroller.cpp: (WebKit): 2012-09-13 Genevieve Mak Continue to send mouse move events to a non-scrollable page even if they are not consumed. PR #207024 https://bugs.webkit.org/show_bug.cgi?id=96655 Reviewed by Antonio Gomes. * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::isMainFrameScrollable): (WebKit): (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint): 2012-09-13 Jacky Jiang [BlackBerry] Missing conditions in InRegionScrollerPrivate::canScrollRenderBox https://bugs.webkit.org/show_bug.cgi?id=96660 Reviewed by Antonio Gomes. PR: 207884 According to RenderBox::canBeScrolledAndHasScrollableArea(), we should bail out early in InRegionScrollerPrivate::canScrollRenderBox() if the RenderBox's scroll height equals the client height and the scroll width equals the client width. Otherwise, we will miss the conditions. * Api/InRegionScroller.cpp: (BlackBerry::WebKit::InRegionScrollerPrivate::canScrollRenderBox): 2012-09-13 Jessica Cao [BlackBerry] Page Popup for Month is non-functional. https://bugs.webkit.org/show_bug.cgi?id=96651 Reviewed by Rob Buis. Hook up support for Month popup. * WebCoreSupport/DatePickerClient.cpp: (WebCore::DatePickerClient::generateHTML): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::openDatePopup): 2012-09-13 Antonio Gomes [BlackBerry] ASSERT failure in InRegionScrollableArea::InRegionScrollableArea https://bugs.webkit.org/show_bug.cgi?id=96645 PR #207307 Reviewed by George Staikos. We use canScrollRenderBox to promote the layer as scrollable instead of RenderBox::canScrollAndHasScrollableArea (see comment above the former). We should assert against the former as well. * Api/InRegionScroller.cpp: (BlackBerry::WebKit::InRegionScrollerPrivate::canScrollRenderBox): * Api/InRegionScroller_p.h: (WebCore): (InRegionScrollerPrivate): * WebKitSupport/InRegionScrollableArea.cpp: (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea): 2012-09-12 Sheriff Bot Unreviewed, rolling out r127876. http://trac.webkit.org/changeset/127876 https://bugs.webkit.org/show_bug.cgi?id=96600 mouse click doesn't work for spin button if spin button in iframe (Requested by yosin on #webkit). * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::contextNode): (BlackBerry::WebKit::WebPagePrivate::nodeForZoomUnderPoint): (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent): (BlackBerry::WebKit::WebPage::nodeAtPoint): * WebKitSupport/FatFingers.cpp: (BlackBerry::WebKit::FatFingers::getNodesFromRect): (BlackBerry::WebKit::FatFingers::getRelevantInfoFromPoint): * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::visiblePositionForPointIgnoringClipping): 2012-09-12 Sami Kyostila Rename OVERFLOW_SCROLLING as ACCELERATED_OVERFLOW_SCROLLING https://bugs.webkit.org/show_bug.cgi?id=96251 Reviewed by Simon Fraser. Rename OVERFLOW_SCROLLING as ACCELERATED_OVERFLOW_SCROLLING to better describe the feature it controls. * WebCoreSupport/AboutDataEnableFeatures.in: 2012-09-11 Antonio Gomes [BlackBerry] add a way to overscroll non-overflown content https://bugs.webkit.org/show_bug.cgi?id=96331 PR #195305 Reviewed by Yong Li. Check -webkit-overflow-scrolling value for '-blackberry-touch' instead of checking a custom HTML5 attribute. No behavioural change. Mostly a rework of r128142. * Api/InRegionScroller.cpp: (BlackBerry::WebKit::canScrollRenderBox): 2012-09-11 Rob Buis [BlackBerry] make pickers/dialogs use appendLiteral https://bugs.webkit.org/show_bug.cgi?id=96424 Reviewed by Antonio Gomes. PR 204032 Other pickers were updated in r128204. * WebCoreSupport/ColorPickerClient.cpp: (WebCore::ColorPickerClient::generateHTML): * WebCoreSupport/PagePopupBlackBerry.cpp: (WebCore::PagePopupBlackBerry::generateHTML): 2012-09-11 Konrad Piascik [BlackBerry] Fix history navigation for error pages. https://bugs.webkit.org/show_bug.cgi?id=96410 Reviewed by Rob Buis. Fix how history navigation handles restoring view state when navigating between error pages. * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::FrameLoaderClientBlackBerry): (WebCore::FrameLoaderClientBlackBerry::saveViewStateToItem): (WebCore::FrameLoaderClientBlackBerry::restoreViewState): * WebCoreSupport/FrameLoaderClientBlackBerry.h: (FrameLoaderClientBlackBerry): 2012-09-11 Jinwoo Song Deploy StringBuilder::appendNumber() and StringBuilder::appendLiteral() in more places https://bugs.webkit.org/show_bug.cgi?id=96344 Reviewed by Benjamin Poulain. Use StringBuilder::appendNumber() instead of String::number(). Also deploy StringBuilder::appendLiteral() instead of String::append() in the surrounding code. * WebCoreSupport/DatePickerClient.cpp: (WebCore::DatePickerClient::generateHTML): * WebCoreSupport/SelectPopupClient.cpp: (WebCore::SelectPopupClient::generateHTML): 2012-09-11 Jacky Jiang [BlackBerry] InRegion scrollable area dangling pointers were accessed in UI thread https://bugs.webkit.org/show_bug.cgi?id=96318 Reviewed by Antonio Gomes. PR: 204066 Dangling pointers were accessed in UI thread, as the actual InRegion scrollable areas of WebKit side had been destroyed before that in WebKit thread after UI thread set scrolling to false. Notify the client side to clear InRegion scrollable areas before we destroy them in WebKit side. Internally reviewed by Gen Mak and George Staikos. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::notifyInRegionScrollStopped): (BlackBerry::WebKit::WebPagePrivate::setScrollOriginPoint): * Api/WebPageClient.h: 2012-09-11 Mike Fenton [BlackBerry] Suppress keyboard requests while processing spell checking suggestions. https://bugs.webkit.org/show_bug.cgi?id=96394 Reviewed by Rob Buis. Suppress the VKB notification when the touch event is a spell checking request. PR 192925. Reviewed Internally by Gen Mak. * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint): 2012-09-11 Mike Fenton [BlackBerry] Colour Dialog popup request should return proper state. https://bugs.webkit.org/show_bug.cgi?id=96392 Reviewed by Rob Buis. Return proper state from openColorPopup dependent on whether the popup actually opened. Reviewed Internally by Chris Hutten-Czapski * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::openColorPopup): 2012-09-11 Nima Ghanavatian [BlackBerry] Take account for single words that exceed our client character limit https://bugs.webkit.org/show_bug.cgi?id=96389 Fix to the processing of long single-line text using getRangeForSpellCheckWithFineGranularity. This was failing if a single word was longer than our maximum allowed limit. Internally reviewed by Mike Fenton. Reviewed by Rob Buis. * WebKitSupport/InputHandler.cpp: (WebKit): (BlackBerry::WebKit::InputHandler::getRangeForSpellCheckWithFineGranularity): 2012-09-11 Arvid Nilsson [BlackBerry] SelectionHandler drops caret change notifications https://bugs.webkit.org/show_bug.cgi?id=96378 Reviewed by Antonio Gomes. The selection handler deliberately drops caret change notifications while the input handler is processing changes, to avoid displaying intermediate state during a complex change. However, this meant that the client was never informed of the final caret position. Fixed by notifying client about caret change after processing ends, if one or more caret change notifications were dropped during processing. PR #205073 Reviewed internally by Mike Fenton. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::setProcessingChange): (WebKit): * WebKitSupport/InputHandler.h: (InputHandler): * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::SelectionHandler): (BlackBerry::WebKit::SelectionHandler::inputHandlerDidFinishProcessingChange): (WebKit): (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged): (BlackBerry::WebKit::SelectionHandler::notifyCaretPositionChangedIfNeeded): * WebKitSupport/SelectionHandler.h: (SelectionHandler): 2012-09-10 Antonio Gomes [BlackBerry] add a way to overscroll non-overflown content https://bugs.webkit.org/show_bug.cgi?id=96331 [UxD] Vertical lists should always be scrollable PR #195305 Reviewed by Yong Li. Internally reviewed by Gen Mak. Check if the RenderLayer is composited / hardware acceleratable prior to check if its contents overflows. If that is the case, check if our custom data-blackberry-force-overscroll is present. That makes it possible for us to align to UX requirements: settings and CCM panels should be always scrollable. * Api/InRegionScroller.cpp: (BlackBerry::WebKit::canScrollRenderBox): * WebKitSupport/InRegionScrollableArea.cpp: (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea): 2012-09-10 Genevieve Mak Change -data-blackberry-webworks-context to -data-webworks-context because not all webworks apps are blackberry apps. https://bugs.webkit.org/show_bug.cgi?id=96297 Reviewed by Antonio Gomes. PR #193726 Rubber Stamped interally by Mike Fenton. * WebKitSupport/DOMSupport.cpp: (BlackBerry::WebKit::DOMSupport::webWorksContext): 2012-09-09 Arvid Nilsson [BlackBerry] Fix flicker due to introduction of the fence extension. https://bugs.webkit.org/show_bug.cgi?id=96207 Reviewed by George Staikos. Don't immediately add fence to garbage list, so it is destroyed after only one swap, for a set of tiles just because one tile in the set gets a new fence, the old fence may still not be signalled and before rendering the other tiles in the set we have to wait for it. * WebKitSupport/BackingStoreTile.cpp: (BlackBerry::WebKit::Fence::~Fence): (WebKit): * WebKitSupport/BackingStoreTile.h: (WebKit): (Fence): * WebKitSupport/SurfacePool.cpp: (BlackBerry::WebKit::SurfacePool::initialize): (BlackBerry::WebKit::SurfacePool::notifyBuffersComposited): (WebKit): (BlackBerry::WebKit::SurfacePool::destroyPlatformSync): * WebKitSupport/SurfacePool.h: (SurfacePool): 2012-09-08 Max Feil [BlackBerry] Exiting fullscreen mode can leave user stuck without Browser menus https://bugs.webkit.org/show_bug.cgi?id=96027 Reviewed by Antonio Gomes. The changes for bug 87337 (landed as trunk svn revision 119119) introduced a bug. The same conditions are not checked on enter fullscreen vs. exit. Web sites such as http://videojs.com and youtube's mobile HTML5 player make the div container of the video element go fullscreen. This is allowed in WebPagePrivate::enterFullScreenForElement() but disallowed in WebPagePrivate::exitFullScreenForElement(). I am fixing this by allowing containers of video elements to exit fullscreen. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement): 2012-09-07 Ming Xie [BlackBerry] Remove browser from the build info page https://bugs.webkit.org/show_bug.cgi?id=96162 Reviewed by George Staikos. Internal reviewed by Jeff Rogers. WebKit build should not have the build info for browser which is built on top of webkit. * WebKitSupport/AboutData.cpp: (BlackBerry::WebKit::buildPage): 2012-09-07 Yongxin Dai [BlackBerry] Initialize caret rectangle with invalid location https://bugs.webkit.org/show_bug.cgi?id=96011 Reviewed by Rob Buis. In SelectionHandler::selectionPositionChanged() method, startCaret and endCaret are used to notify clients about new caret positions. This patch initializes startCaret and endCaret with location(-1. -1), and keeps them empty before they are assigned to valid values. This would help for other classes to check validity of the caret correctly. Internal reviewed by Mike Fenton. * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::adjustCaretRects): (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged): 2012-09-07 Lianghui Chen [BlackBerry] when one of multiple tabs uses authentication, user can get the auth dialog while the other tab has focus. https://bugs.webkit.org/show_bug.cgi?id=95488 PR: 186597. Internally reviewed by Joe Mason. Reviewed by Yong Li. Use new AuthenticationChallengeClient interface to make authentication challenge asynchronous to NetworkJob, MediaPlayerPrivateBlackBerry, and other module that will use HTTP authentication. WebPage itself still use synchronous authentication though. Switching to asynchronous authentication in WebPage will require bigger platform layer change and not very necessary at the moment for this bug. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge): * Api/WebPage_p.h: (WebCore): (WebPagePrivate): 2012-09-07 Rob Buis [BlackBerry] Remove feature about:cache/disable and about:cache/enable https://bugs.webkit.org/show_bug.cgi?id=95820 Reviewed by Yong Li. Fix warning that was caused by r127680. * WebKitSupport/AboutData.cpp: (BlackBerry::WebKit::cachePage): 2012-09-07 Allan Sandfeld Jensen Simplify hitTestResultAtPoint and nodesFromRect APIs https://bugs.webkit.org/show_bug.cgi?id=95720 Reviewed by Antonio Gomes. Update calls to new API. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::contextNode): (BlackBerry::WebKit::WebPagePrivate::nodeForZoomUnderPoint): (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent): (BlackBerry::WebKit::WebPage::nodeAtPoint): * WebKitSupport/FatFingers.cpp: (BlackBerry::WebKit::FatFingers::getNodesFromRect): (BlackBerry::WebKit::FatFingers::getRelevantInfoFromPoint): * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::visiblePositionForPointIgnoringClipping): 2012-09-07 Robin Cao [BlackBerry] Rendering issue after rotation https://bugs.webkit.org/show_bug.cgi?id=96094 PR #201930 Reviewed by George Staikos. The cause of the rendering issue is that the BackingStore tiles are not reset after layout. This is a regression of r125680, which overwrites a local variable that are used later in the function. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setViewportSize): 2012-09-06 Crystal Zhang [BlackBerry] Implement a color picker https://bugs.webkit.org/show_bug.cgi?id=96001 Reviewed by Rob Buis. Add files for color picker, replace old hook to AIR color picker. * WebCoreSupport/ColorPickerClient.cpp: Added. (WebCore): (WebCore::ColorPickerClient::ColorPickerClient): (WebCore::ColorPickerClient::~ColorPickerClient): (WebCore::ColorPickerClient::generateHTML): (WebCore::ColorPickerClient::closePopup): (WebCore::ColorPickerClient::contentSize): (WebCore::ColorPickerClient::htmlSource): (WebCore::ColorPickerClient::setValueAndClosePopup): (WebCore::ColorPickerClient::didClosePopup): (WebCore::ColorPickerClient::writeDocument): * WebCoreSupport/ColorPickerClient.h: Added. (WebKit): (WebCore): (ColorPickerClient): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::openColorPopup): 2012-09-06 Genevieve Mak Add data-blackberry-webworks-context attribute and set the custom context when getting context. https://bugs.webkit.org/show_bug.cgi?id=95993 Reviewed by Antonio Gomes. PR #193726 Reviewed Internally by Mike Fenton. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::webContext): - Check for custom WebWorks context and add it if there. * WebKitSupport/DOMSupport.cpp: (BlackBerry::WebKit::DOMSupport::webWorksContext): (DOMSupport): * WebKitSupport/DOMSupport.h: - Add a method that checks a given element for the data-webworks-context attribute and returns its value if present. 2012-09-06 Antonio Gomes [BlackBerry] Allow overscroll to composited scroll layers https://bugs.webkit.org/show_bug.cgi?id=95998 PR #195305 Reviewed by Rob Buis. Internally reviewed by Gen Mak. No need to reset the overscroll limit factor at creation to 0. It is already 0 by default, and later on the client sets the appropriated value. * WebKitSupport/InRegionScrollableArea.cpp: (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea): 2012-09-05 Sam Weinig Part 2 of removing PlatformString.h, remove PlatformString.h https://bugs.webkit.org/show_bug.cgi?id=95931 Reviewed by Adam Barth. Remove PlatformString.h * Api/DumpRenderTreeClient.h: * WebCoreSupport/ChromeClientBlackBerry.cpp: * WebCoreSupport/InspectorClientBlackBerry.h: * WebCoreSupport/JavaScriptDebuggerBlackBerry.cpp: * WebKitSupport/AboutData.h: 2012-09-05 Jason Liu [BlackBerry] Remove feature about:cache/disable and about:cache/enable https://bugs.webkit.org/show_bug.cgi?id=95820 Reviewed by Rob Buis. Remove this feature since we need to add a button in settings. * WebKitSupport/AboutData.cpp: (BlackBerry::WebKit::cachePage): 2012-09-05 Mike Fenton [BlackBerry] Remove deprecated dialog connections. https://bugs.webkit.org/show_bug.cgi?id=95868 Reviewed by Rob Buis. PR 187481. Remove deprecated logic for unsupported Dialog types. * Api/WebPageClient.h: * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::openDatePopup): (BlackBerry::WebKit::InputHandler::openColorPopup): 2012-09-05 George Staikos [BlackBerry] Assignment operators missing self-check https://bugs.webkit.org/show_bug.cgi?id=95774 Reviewed by Rob Buis. Add a test for self-assignment. * Api/WebAnimation.cpp: (BlackBerry::WebKit::WebAnimation::operator=): * Api/WebString.cpp: (BlackBerry::WebKit::WebString::operator=): 2012-09-05 Leo Yang [BlackBerry] Optimize BackingStorePrivate::isCurrentVisibleJob https://bugs.webkit.org/show_bug.cgi?id=95897 Reviewed by Antonio Gomes. Bail out the loop early if one of the not-rendered rectangle is not current regular render job. No behavior change, just code optimization. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::isCurrentVisibleJob): 2012-09-05 Benjamin C Meyer [BlackBerry] JavaScriptVariant can crash when operator= is called with itself https://bugs.webkit.org/show_bug.cgi?id=95859 Reviewed by George Staikos. * Api/JavaScriptVariant.cpp: (BlackBerry::WebKit::JavaScriptVariant::operator=): When JavaScriptVariant contains a string and operator= is called with itself the memory will be free'd in 'this' and then a copy will be attempted from 'that' resulting in a crash. 2012-09-05 Leo Yang [BlackBerry] Rotation and then reload causes less sized webpage (PR 190469) https://bugs.webkit.org/show_bug.cgi?id=95870 Reviewed by George Staikos. Reviewed internally by Jacky Jiang. Use the new zoom to fit scale if the page was zoomed to fit initial scale When a page is reloaded the layout size may be changed. So the contents size on which the initial scale depends may be changed. Use the new initial scale in this case to make sure the page will be zoomed to correct scale. * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::restoreViewState): 2012-09-05 Robin Cao [BlackBerry] Do not release shared backingstore memory prematurely https://bugs.webkit.org/show_bug.cgi?id=95841 PR #202517 Reviewed by George Staikos. The BackingStore memory is shared by all web pages. We should check if the current backingStore is active before create/release this shared memory. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStore::createBackingStoreMemory): (BlackBerry::WebKit::BackingStore::releaseBackingStoreMemory): 2012-09-05 Andy Chen [BlackBerry] Implement number of matches and current active match index for find-on-page https://bugs.webkit.org/show_bug.cgi?id=95801 Reviewed by Antonio Gomes. - Calculate current match index for find-on-page - Notify client when number of matches and current match index update. PR 162090 162091. Internally reviewed by Mike Fenton and Joe Mason * Api/WebPageClient.h: * WebKitSupport/InPageSearchManager.cpp: (BlackBerry::WebKit::InPageSearchManager::DeferredScopeStringMatches::DeferredScopeStringMatches): (BlackBerry::WebKit::InPageSearchManager::DeferredScopeStringMatches::doTimeout): (InPageSearchManager::DeferredScopeStringMatches): (BlackBerry::WebKit::InPageSearchManager::findNextString): (BlackBerry::WebKit::InPageSearchManager::findAndMarkText): (BlackBerry::WebKit::InPageSearchManager::scopeStringMatches): (BlackBerry::WebKit::InPageSearchManager::scopeStringMatchesSoon): (BlackBerry::WebKit::InPageSearchManager::callScopeStringMatches): * WebKitSupport/InPageSearchManager.h: (InPageSearchManager): 2012-09-04 Rob Buis [BlackBerry] FatFingers::cachingStrategy uses incorrect enum value https://bugs.webkit.org/show_bug.cgi?id=95783 Reviewed by Antonio Gomes. Use the correct enum values. * WebKitSupport/FatFingers.cpp: (BlackBerry::WebKit::FatFingers::cachingStrategy): 2012-09-04 Antonio Gomes [BlackBerry] Use child/ScrollableContent layer's position instead of parent/ScrollLayer's boundsOrigin https://bugs.webkit.org/show_bug.cgi?id=95778 PR #202252 Reviewed by Rob Buis. Internally reviewed by Arvid Nilsson. Upstream has switch away from using the parent scroll layer's bounds origin in order to translate contents of all its child layers. Instead now, it directly sets the scroll position of the child scrollable contents layer. Source/WebKit/blackberry: * Api/InRegionScroller.cpp: (BlackBerry::WebKit::InRegionScrollerPrivate::setScrollPositionCompositingThread): * WebKitSupport/InRegionScrollableArea.cpp: (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea): No new tests, since it is a catch-up with upstreaming code. 2012-09-04 George Staikos [BlackBerry] Fix memory leak in InputHandler https://bugs.webkit.org/show_bug.cgi?id=95771 Reviewed by Rob Buis. Simply delete the arrays at function exit. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::openSelectPopup): 2012-09-04 George Staikos [BlackBerry] pass isMainFrame() through to notifyDocumentOnLoad() https://bugs.webkit.org/show_bug.cgi?id=95766 Reviewed by Rob Buis. Passing the frame status through will allow the client to make better decisions about how to act on the onload. * Api/WebPageClient.h: * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchDidHandleOnloadEvents): 2012-09-04 Rob Buis [BlackBerry] Provide virtual dtor for DumpRenderTreeClient https://bugs.webkit.org/show_bug.cgi?id=95769 Reviewed by Yong Li. Also remove WTF prefixes. * Api/DumpRenderTreeClient.h: 2012-09-04 Mary Wu [BlackBerry] Add webplatform and browser to build info https://bugs.webkit.org/show_bug.cgi?id=95715 Reviewed by George Staikos. PR# 202102 * WebKitSupport/AboutData.cpp: (BlackBerry::WebKit::buildPage): 2012-08-31 Jacky Jiang [BlackBerry] ASSERT failure in RenderBlock::checkPositionedObjectsNeedLayout https://bugs.webkit.org/show_bug.cgi?id=95611 Reviewed by Antonio Gomes. PR:200127 Remove r118405 now as we already have a new fix webkit/43f8394b for that issue and it is not reproducible anymore after the removal. In this way, we can get rid of this ASSERT failure as well. Thanks Antonio for the suggestion. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setViewportSize): 2012-08-31 Joshua Netterfield [BlackBerry] Eliminate WebGL IT policy https://bugs.webkit.org/show_bug.cgi?id=95604 Internal RIM PR #198764 Reviewed by Rob Buis. This is no longer a requirement for the BlackBerry port. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::init): (BlackBerry::WebKit::WebPage::setWebGLEnabled): * WebKitSupport/AboutData.cpp: (BlackBerry::WebKit::configPage): 2012-08-30 Benjamin Poulain Replace JSC::UString by WTF::String https://bugs.webkit.org/show_bug.cgi?id=95271 Reviewed by Geoffrey Garen. Replace UString by String. * WebCoreSupport/ClientExtension.cpp: * WebCoreSupport/PagePopupBlackBerry.cpp: (WebCore::PagePopupBlackBerry::installDomFunction): 2012-08-30 Jacky Jiang [BlackBerry] ASSERT failure in JSC::MarkedAllocator::allocateSlowCase https://bugs.webkit.org/show_bug.cgi?id=95492 Reviewed by Yong Li. PR: 200724 Hold the JSLock for the current thread before we call toRef to avoid the ASSERT failure. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::executeJavaScript): 2012-08-30 Antonio Gomes [BlackBerry] Remove unneeded force-immediate-repaint from InRegionScroller::setLayerScrollPosition https://bugs.webkit.org/show_bug.cgi?id=95476 PR #200704 Reviewed by Yong Li. This code is not needed at this point for neither the fast nor slow in-region scroll codepaths, and it is a huge performance beast as it forces all containers to get full-repainted per scroll call (in webkit thread). Patch also take this opportunity to remove an early-return we have in the {i}frame slow scrolling code path so that we can adjust the selection handles in this case as well. * Api/InRegionScroller.cpp: (BlackBerry::WebKit::InRegionScrollerPrivate::setLayerScrollPosition): 2012-08-30 Hanna Ma [BlackBerry] node search does not work with elements on touch start listener https://bugs.webkit.org/show_bug.cgi?id=95252 Reviewed by Antonio Gomes. Fix the node search function of web insepctor on elements with touch start listener. Add methods from webPage to check if the node search functionality is enabled before handling touch events. PR194107 * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::touchEvent): 2012-08-30 Arvid Nilsson [BlackBerry] One shot drawing sync flag never cleared when there's no layers https://bugs.webkit.org/show_bug.cgi?id=95447 Reviewed by Antonio Gomes. PR 199866 When we remove the layers, WebKit could tell us we need a one shot drawing sync to repaint the BackingStore with the content that was previously drawn by layers. We also sometimes set the one shot drawing sync flag manually. We would bail from commit if there were no layers and not actually perform the osds, so it left the osds flag set forever and the situation prevails, because nobody will ever clear the osds flag. The BackingStore surrenders the responsibility of blitting to the AC commit mechanism when a one shot drawing sync is pending, because we want the operations render, commit and blit to happen in the correct order with no intermediate blits. So, no commit means no blit, and the result of regular rendering did not show up on screen. Fixed by not bailing from commit if there's no layers, instead clearing the "needs commit" and osds flags and performing a blit. Reviewed internally by Andrew Lo. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded): 2012-08-30 Gyuyoung Kim Use ASCIILiteral for DEFINE_STATIC_LOCAL string https://bugs.webkit.org/show_bug.cgi?id=95420 Reviewed by Benjamin Poulain. As recommended by http://trac.webkit.org/wiki/EfficientStrings, WebKit needs to use ASCIILiteral for the string of DEFINE_STATIC_LOCAL. * Api/WebSettings.cpp: (WebKit): 2012-08-29 Nima Ghanavatian [BlackBerry] Do not use the shadow tree when retrieving the underlying element for FatFinger. https://bugs.webkit.org/show_bug.cgi?id=95372 By using the shadow tree we were getting a mismatch between elements of the current element under focus and the one return to us from FatFingers. Passing ShadowContentNotAllowed to get the right handle. Reviewed by Antonio Gomes. * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint): 2012-08-29 Robin Cao [BlackBerry] Move the handling of UserMedia requests to the client https://bugs.webkit.org/show_bug.cgi?id=95317 PR #197283 Reviewed by George Staikos. Internally reviewed by George Staikos. Move the logic for user media requests handling to the client, as it requires inputs from users. Also adds a origin field to WebUserMediaRequest. * Api/WebPageClient.h: (Platform): * WebCoreSupport/UserMediaClientImpl.cpp: (WebCore::UserMediaClientImpl::UserMediaClientImpl): (WebCore::UserMediaClientImpl::~UserMediaClientImpl): (WebCore::UserMediaClientImpl::requestUserMedia): (WebCore::UserMediaClientImpl::cancelUserMediaRequest): * WebCoreSupport/UserMediaClientImpl.h: (UserMediaClientImpl): 2012-08-29 Antonio Gomes [BlackBerry] Replace blackberry specific HitTestRequest::FingerUp by TouchEvent + Release https://bugs.webkit.org/show_bug.cgi?id=95383 Reviewed by Rob Buis. * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::touchEventCancel): 2012-08-29 Rob Buis [BlackBerry] Adjust wtf include header style https://bugs.webkit.org/show_bug.cgi?id=95368 Reviewed by Yong Li. Switch to #include like the other ports. * Api/BlackBerryGlobal.cpp: * Api/WebPage.cpp: * WebCoreSupport/ChromeClientBlackBerry.cpp: * WebCoreSupport/GeolocationControllerClientBlackBerry.h: * WebCoreSupport/SelectPopupClient.h: * WebKitSupport/AboutData.cpp: * WebKitSupport/DOMSupport.cpp: * WebKitSupport/GLES2Context.cpp: * WebKitSupport/InPageSearchManager.h: * WebKitSupport/InputHandler.cpp: 2012-08-29 Jacky Jiang [BlackBerry] Remove unused tapGesture in WebPage.cpp https://bugs.webkit.org/show_bug.cgi?id=95357 Reviewed by Rob Buis. Remove unused variable tapGesture in WebPage.cpp. Internally reviewed by Gen Mak. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::touchEvent): 2012-08-28 Antonio Gomes [BlackBerry] crash while trying to scroll any inner frame https://bugs.webkit.org/show_bug.cgi?id=95287 PR #198510 Reviewed by George Staikos. Set the starting point of scrolling (slow path only still) for inner frames. It was left over as set to 0 by r126474. In practice, patch fixes a crash on gmail.com desktop edition. * WebKitSupport/InRegionScrollableArea.cpp: (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea): 2012-08-28 Sheriff Bot Unreviewed, rolling out r126914. http://trac.webkit.org/changeset/126914 https://bugs.webkit.org/show_bug.cgi?id=95239 it breaks everything and fixes nothing (Requested by pizlo on #webkit). * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect): (BlackBerry::WebKit::BackingStorePrivate::visibleTilesRect): (BlackBerry::WebKit::BackingStorePrivate::resetTiles): (BlackBerry::WebKit::BackingStorePrivate::updateTiles): (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion): (BlackBerry::WebKit::BackingStorePrivate::mapFromTransformedContentsToTiles): * WebCoreSupport/NotificationPresenterImpl.cpp: (WebCore::NotificationPresenterImpl::cancel): (WebCore::NotificationPresenterImpl::onPermission): (WebCore::NotificationPresenterImpl::notificationClicked): * WebCoreSupport/UserMediaClientImpl.cpp: (WebCore::UserMediaClientImpl::cancelUserMediaRequest): * WebKitSupport/AboutData.cpp: (BlackBerry::WebKit::dumpJSCTypeCountSetToTableHTML): * WebKitSupport/FrameLayers.cpp: (BlackBerry::WebKit::FrameLayers::removeLayerByFrame): (BlackBerry::WebKit::FrameLayers::commitOnWebKitThread): (BlackBerry::WebKit::FrameLayers::calculateRootLayer): 2012-08-28 Nima Ghanavatian [BlackBerry] Spellcheck should be enabled if undefined in content. https://bugs.webkit.org/show_bug.cgi?id=95139 Currently we only enable spellcheck if it is defined as such in the web content explicitly. Making this change to enable by default, and only turn off if it is explicitly set, or if we expect the field to be a username, email or url. Internally reviewed by Mike Fenton. Reviewed by Rob Buis. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::requestCheckingOfString): (BlackBerry::WebKit::InputHandler::setElementFocused): (BlackBerry::WebKit::InputHandler::unlockSequenceMap): (WebKit): (BlackBerry::WebKit::InputHandler::shouldSpellCheckElement): * WebKitSupport/InputHandler.h: (InputHandler): 2012-08-28 Caio Marcelo de Oliveira Filho Rename first/second to key/value in HashMap iterators https://bugs.webkit.org/show_bug.cgi?id=82784 Reviewed by Eric Seidel. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect): (BlackBerry::WebKit::BackingStorePrivate::visibleTilesRect): (BlackBerry::WebKit::BackingStorePrivate::resetTiles): (BlackBerry::WebKit::BackingStorePrivate::updateTiles): (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion): (BlackBerry::WebKit::BackingStorePrivate::mapFromTransformedContentsToTiles): * WebCoreSupport/NotificationPresenterImpl.cpp: (WebCore::NotificationPresenterImpl::cancel): (WebCore::NotificationPresenterImpl::onPermission): (WebCore::NotificationPresenterImpl::notificationClicked): * WebKitSupport/AboutData.cpp: (BlackBerry::WebKit::dumpJSCTypeCountSetToTableHTML): * WebKitSupport/FrameLayers.cpp: (BlackBerry::WebKit::FrameLayers::removeLayerByFrame): (BlackBerry::WebKit::FrameLayers::commitOnWebKitThread): (BlackBerry::WebKit::FrameLayers::calculateRootLayer): * WebCoreSupport/UserMediaClientImpl.cpp: (WebCore::UserMediaClientImpl::cancelUserMediaRequest): 2012-08-28 Nima Ghanavatian [BlackBerry] Range boundaries should use endOfBlock instead of endOfLine. https://bugs.webkit.org/show_bug.cgi?id=95135 The original implementation used nextLinePosition to iterate through the field from the start of each line, and was bounded in comparison to the endOfLine. This works fine as long as there aren't any empty lines between paragraphs of text, since these will have startOfLine == endOfLine and break out. Also, protect map access with a mutex in case we get a response before updating the map. Further, we should check the Range pointer before using it, since its not guaranteed to be valid. Internally reviewed by Mike Fenton. Reviewed by Antonio Gomes. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::spellCheckBlock): 2012-08-28 Andrew Lo [BlackBerry] One shot drawing synchronization broken https://bugs.webkit.org/show_bug.cgi?id=95179 Reviewed by Antonio Gomes. Internally reviewed by Arvid Nilsson. Make sure no backing store blits happen during one shot drawing synchronization. Since we always blit during commit now, make sure we don't blit if we commit after a render. We no longer need a deferred blit since we don't commit during renderContents now. Instead, we only commit & blit once after a full render job. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate): (BlackBerry::WebKit::BackingStorePrivate::repaint): (BlackBerry::WebKit::BackingStorePrivate::slowScroll): (BlackBerry::WebKit::BackingStorePrivate::renderJob): (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents): (BlackBerry::WebKit::BackingStorePrivate::blitContents): (BlackBerry::WebKit::BackingStorePrivate::renderContents): (WebKit): (BlackBerry::WebKit::BackingStorePrivate::drawAndBlendLayersForDirectRendering): (BlackBerry::WebKit::BackingStorePrivate::didRenderContent): * Api/BackingStore_p.h: (BackingStorePrivate): * Api/WebPage.cpp: (WebKit): (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired): * Api/WebPage_p.h: (WebPagePrivate): * WebKitSupport/RenderQueue.cpp: (BlackBerry::WebKit::RenderQueue::renderAllCurrentRegularRenderJobs): (BlackBerry::WebKit::RenderQueue::renderRegularRenderJob): (BlackBerry::WebKit::RenderQueue::visibleScrollJobsCompleted): 2012-08-28 Parth Patel [BlackBerry] Removing unnecessary include of Class BlackBerryPlatformClient https://bugs.webkit.org/show_bug.cgi?id=95113 Reviewed by Kentaro Hara. Refactoring has lead to relocation of many or all methods from Class BlackBerryPlatformClient to other classes. Some files include BlackBerryPlatformClient but does not use its instance thus these includes has to be removed. * Api/BackingStore.cpp: 2012-08-28 Andy Chen [BlackBerry] UpdateViewport uses wrong size for frameView https://bugs.webkit.org/show_bug.cgi?id=95138 Reviewed by Antonio Gomes. Internally reviewed by Jakob Petsovits. Use actual visible size instead of screen size when updating viewport size, otherwise, frameView size would be too big. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::updateViewportSize): 2012-08-28 Andy Chen [BlackBerry] Pseudo class "active" is broken https://bugs.webkit.org/show_bug.cgi?id=95142 Reviewed by Antonio Gomes. Check if an element is affected by active rule before cancelling the touch event. PR 198544. * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::touchEventCancel): 2012-08-27 Sheriff Bot Unreviewed, rolling out r126836. http://trac.webkit.org/changeset/126836 https://bugs.webkit.org/show_bug.cgi?id=95163 Broke all Apple ports, EFL, and Qt. (Requested by tkent on #webkit). * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect): (BlackBerry::WebKit::BackingStorePrivate::visibleTilesRect): (BlackBerry::WebKit::BackingStorePrivate::resetTiles): (BlackBerry::WebKit::BackingStorePrivate::updateTiles): (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion): (BlackBerry::WebKit::BackingStorePrivate::mapFromTransformedContentsToTiles): * WebCoreSupport/NotificationPresenterImpl.cpp: (WebCore::NotificationPresenterImpl::cancel): (WebCore::NotificationPresenterImpl::onPermission): (WebCore::NotificationPresenterImpl::notificationClicked): * WebKitSupport/AboutData.cpp: (BlackBerry::WebKit::dumpJSCTypeCountSetToTableHTML): * WebKitSupport/FrameLayers.cpp: (BlackBerry::WebKit::FrameLayers::removeLayerByFrame): (BlackBerry::WebKit::FrameLayers::commitOnWebKitThread): (BlackBerry::WebKit::FrameLayers::calculateRootLayer): 2012-08-27 Caio Marcelo de Oliveira Filho Rename first/second to key/value in HashMap iterators https://bugs.webkit.org/show_bug.cgi?id=82784 Reviewed by Eric Seidel. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect): (BlackBerry::WebKit::BackingStorePrivate::visibleTilesRect): (BlackBerry::WebKit::BackingStorePrivate::resetTiles): (BlackBerry::WebKit::BackingStorePrivate::updateTiles): (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion): (BlackBerry::WebKit::BackingStorePrivate::mapFromTransformedContentsToTiles): * WebCoreSupport/NotificationPresenterImpl.cpp: (WebCore::NotificationPresenterImpl::cancel): (WebCore::NotificationPresenterImpl::onPermission): (WebCore::NotificationPresenterImpl::notificationClicked): * WebKitSupport/AboutData.cpp: (BlackBerry::WebKit::dumpJSCTypeCountSetToTableHTML): * WebKitSupport/FrameLayers.cpp: (BlackBerry::WebKit::FrameLayers::removeLayerByFrame): (BlackBerry::WebKit::FrameLayers::commitOnWebKitThread): (BlackBerry::WebKit::FrameLayers::calculateRootLayer): 2012-08-27 Sheriff Bot Unreviewed, rolling out r126772. http://trac.webkit.org/changeset/126772 https://bugs.webkit.org/show_bug.cgi?id=95137 "This change breaks news.qq.com" (Requested by leoyang on #webkit). * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize): 2012-08-27 Leo Yang [BlackBerry] Not using absoluteVisibleOverSize when rotating https://bugs.webkit.org/show_bug.cgi?id=95092 PR #190469 Reviewed by Antonio Gomes. Reviewed internally by Arvid Nilsson. When we are rotating don't count absolute overflow visible size into fixed layout size because we are in a transient state. The absolute overflow visible size remains old size during rotation. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize): 2012-08-25 Antonio Gomes [BlackBerry] Remove the 'in region scrollable starting node' concept from InRegionScroller https://bugs.webkit.org/show_bug.cgi?id=95020 Reviewed by Rob Buis. 'In-region start scrolling node' is an obsolete concept, and we can remove it in favor of using the information from the cached layers. * Api/InRegionScroller.cpp: (WebKit): (BlackBerry::WebKit::InRegionScrollerPrivate::reset): Adjusted as it used to clear the cached 'node'. (BlackBerry::WebKit::InRegionScrollerPrivate::isActive): Added method to be checked directly instead of only null-checking the previously cached 'node'. (BlackBerry::WebKit::InRegionScrollerPrivate::clearDocumentData): New method to clear the cached resources if its document is done. (BlackBerry::WebKit::InRegionScrollerPrivate::pushBackInRegionScrollable): Adjusted to not care about the cached 'node' anymore. * Api/InRegionScroller_p.h: (InRegionScrollerPrivate): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::notifyInRegionScrollStopped): Check ::isActive instead of ::hasNode, since the later is gone. (BlackBerry::WebKit::WebPagePrivate::enqueueRenderingOfClippedContentOfScrollableAreaAfterInRegionScrolling): Changed the method signature, given that we do have a cached 'node' to pass in as parameter anymore. (BlackBerry::WebKit::WebPagePrivate::clearDocumentData): Delegate all the related work to InRegionScroller. * Api/WebPage_p.h: (WebPagePrivate): * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::drawTapHighlight): . 2012-08-25 Antonio Gomes BlackBerry] Shrink the in-region nested scrollable list as soon as we can https://bugs.webkit.org/show_bug.cgi?id=95019 Reviewed by Rob Buis. We cache all possible nested scrollable in-region layers given a point. It is up to the client to pick a view, based on the scroll position and limits of each layer, and on the direction user swipes its finger. From the point we pick a view on, we stick with it, and any other possibly cached layer can be uncached, as it won't be needed. Patch provides a simple solution to that. * Api/InRegionScroller.cpp: (BlackBerry::WebKit::InRegionScrollerPrivate::InRegionScrollerPrivate): (BlackBerry::WebKit::InRegionScrollerPrivate::reset): (BlackBerry::WebKit::InRegionScrollerPrivate::setScrollPositionWebKitThread): (BlackBerry::WebKit::InRegionScrollerPrivate::calculateActiveAndShrinkCachedScrollableAreas): (WebKit): (BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint): * Api/InRegionScroller_p.h: (InRegionScrollerPrivate): 2012-08-25 Antonio Gomes For convenience, make RenderLayer::enclosingElement a public method. https://bugs.webkit.org/show_bug.cgi?id=95018 Reviewed by George Staikos. Make use of the new public RenderLayer::enclosingElement method and remove duplicated code. * WebKitSupport/InRegionScrollableArea.cpp: (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea): 2012-08-27 Mikhail Pozdnyakov Rename RegisterProtocolHandler API to NavigatorContentUtils https://bugs.webkit.org/show_bug.cgi?id=94920 Reviewed by Adam Barth. Renaming whatever RegisterProtocolHandler-prefixed to NavigatorContentUtils-prefixed. * WebCoreSupport/AboutDataEnableFeatures.in: * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore): (WebCore::ChromeClientBlackBerry::registerProtocolHandler): * WebCoreSupport/ChromeClientBlackBerry.h: (ChromeClientBlackBerry): 2012-08-26 Arvid Nilsson [BlackBerry] ASSERT failed in WebPagePrivate::commitRootLayerIfNeeded() https://bugs.webkit.org/show_bug.cgi?id=94921 PR 104676 As visibility changed due to WebPage::setVisible(true), resumeRootLayerCommit() would call commitRootLayerIfNeeded(), without layouting or rendering. If a one shot drawing sync was pending at this time, it would cause the condition ASSERT(!needsOneShotDrawingSynchronization()) to fail. The comment immediately before the assert states that "In case of one shot drawing synchronization, you should first layoutIfNeeded, render, then commit and draw the layers". However, resumeRootLayerCommit() did no such thing. Fixed by removing the call to commitRootLayerIfNeeded() from resumeRootLayerCommit(), because the latter is only called in a code path where we're going to layout, render and then commit anyway. These operations will be performed from resumeBackingStore() which is called at the end of setVisible(). Reviewed by George Staikos. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::resumeRootLayerCommit): 2012-08-24 Adam Treat [BlackBerry] Web pages are zoomed out to much on initial load https://bugs.webkit.org/show_bug.cgi?id=94830 The previous patch caused a slight regression to the calculation we do for the default splitting factor in the render queue. The default value we use to represent the max area should be the tile size. This was true with the old calculation of default max layout width since it was the screen size. The fix is to be explicit and use the tile size directly. Reviewed by George Staikos. * WebKitSupport/RenderQueue.cpp: (BlackBerry::WebKit::RenderQueue::splittingFactor): 2012-08-24 Parth Patel [BlackBerry] Changes resulting from moving network related methods from platform client to platform settings. https://bugs.webkit.org/show_bug.cgi?id=94963 Reviewed by Yong Li. Changes in response to Network methods moved from class BlackBerryPlatformClient to class BlackBerryPlatformSettings in platform repository. * WebKitSupport/AboutData.cpp: (BlackBerry::WebKit::cachePage): 2012-08-24 Liam Quinn [BlackBerry] Debug assertion fires in BackingStorePrivate::renderJob() https://bugs.webkit.org/show_bug.cgi?id=94960 Reviewed by Adam Treat. Change the assertion into an early return as recommended by Adam Treat. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::renderJob): 2012-08-24 Andrew Lo [BlackBerry] Animation & UI lag when rendering https://bugs.webkit.org/show_bug.cgi?id=94943 Reviewed by Rob Buis. Schedule a backing store blit & composite when commiting root layer. This results in compositing not having to wait until after a long render operation, increasing responsiveness & fixing animations which skip to the last frame due to lag. This can cause a blit during a "one shot drawing synchronization", which is a render & commit on the AC layers, which may result in flashing. However, this can happen in other situations as well, and we feel that the responsiveness, reduced lag, and smoothness of animations is more important. Internal PR194209 Internally reviewed by: George Staikos. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::commitRootLayer): 2012-08-24 Parth Patel [BlackBerry] Changes resulting from moving application directory methods from platform client to platform settings. https://bugs.webkit.org/show_bug.cgi?id=94249 Reviewed by Rob Buis. PR# 170160 Changes in response to Application Directory methods moved from Class BlackBerryPlatformClient to BlackBerryPlatformSettings in platform respository since these methods are more appropriate in class BlackBerryPlatformSettings. * WebCoreSupport/IconDatabaseClientBlackBerry.cpp: (WebCore::IconDatabaseClientBlackBerry::initIconDatabase): 2012-08-24 Antonio Gomes [BlackBerry] Touch cancel can cause huge and needless invalidations https://bugs.webkit.org/show_bug.cgi?id=94938 PR #198051 Reviewed by George Staikos. Internally reviewed by Gen Mak. In order to remove the possible hover effect on touch_cancel, we always invalidate the node under the fat finger, being the fat finger valid or not. Point is: having a valid fat finger node does not mean the original touch position was actually adjust for clicking or that the fat finger is actually valid. We set the fat finger node to be the result of the point-based hit-test regardless if it is a click target or not (in order to make our mouse-move machinery to work). We should can less aggressively invalidate the fat finger node, since it can be rather an expensive call (longer than 1s in the worst scenario). * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::touchEventCancel): 2012-08-24 Arvid Nilsson [BlackBerry] Add WebPage API to reset block zoom https://bugs.webkit.org/show_bug.cgi?id=94863 PR 187478 This is an alternative to WebPage::blockZoomAnimationFinished() when it's desirable to avoid rerendering of the whole web page at the end of block zoom. This is the case when the planned "incremental zoom factor" is used instead of zoomAboutPoint and it's relatives. Ideally, the block zoom algorithm would be clever enough not to need a reset or any form of callback when the animation finishes, but that requires the implementation of said incremental zoom factor, which is not done yet. Reviewed by Antonio Gomes. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::resetBlockZoom): (WebKit): * Api/WebPage.h: 2012-08-23 Antonio Gomes [BlackBerry] Obsolete the in-region scroll codepath prior to BB10's https://bugs.webkit.org/show_bug.cgi?id=94839 PR #197775 Reviewed by George Staikos. This codepath is not needed anymore, so lets let it RIP. The only code addition is due to some code I've moved from WebPagePrivate::scrollNodeRecursively and WebPagePrivate::scrollBy to InRegionScrollerPrivate::setLayerScrollPosition. Rest is code removal ... * Api/InRegionScroller.cpp: (BlackBerry::WebKit::InRegionScrollerPrivate::setLayerScrollPosition): * Api/InRegionScroller_p.h: (InRegionScrollerPrivate): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::scrollBy): (BlackBerry::WebKit::WebPage::scrollBy): * Api/WebPage.h: * Api/WebPage_p.h: (WebPagePrivate): 2012-08-23 Adam Treat [BlackBerry] Replace the three different rendering mechanisms for clearing the render queue https://bugs.webkit.org/show_bug.cgi?id=94837 Reviewed by George Staikos. PR 197738 Currently, we have three different mechanisms for clearing the render queue. The first mechanism is render on idle. Whenever the webkit thread becomes idle (read: no more events in its queue) we render the next job in the render queue. This is the primary means we use for clearing the render queue. However, this mechanism has a flaw, it is such a low priority mechanism that sometimes the queue grows so fast due to higher priority events adding rects to the queue that this mechanism can't possibly keep up. That is what leads to the second mechanism: rendering right before a timer is fired when we discover that the render queue is under pressure and rendering on idle can't keep up. However, there are still degenerate cases where even this mechanism does not allow us to keep up. That brings us to the third mechanism: rendering based on a timer that is a catch-all. The second and third mechanisms lead to very large render jobs as they try and clear the queue faster when it comes under pressure. These very large render jobs end up keeping the webkit thread busy with a message that can take large fractions of a second to resolve. These three mechanisms were put in place when the backingstore had a different overall design that was not truly asynchronous. This patch replaces these three mechanisms with a single one that uses the platform messaging classes to full purpose - a uniquely coalescing message that has a higher priority level than timers making sure the render queue can never come under pressure. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate): (WebKit): (RenderJobMessage): (BlackBerry::WebKit::RenderJobMessage::RenderJobMessage): (BlackBerry::WebKit::BackingStorePrivate::dispatchRenderJob): (BlackBerry::WebKit::BackingStorePrivate::renderJob): (BlackBerry::WebKit::BackingStore::blitContents): * Api/BackingStore.h: * Api/BackingStore_p.h: (BackingStorePrivate): * Api/WebPage.cpp: * Api/WebPage.h: * WebKitSupport/RenderQueue.cpp: (BlackBerry::WebKit::RenderQueue::reset): (BlackBerry::WebKit::RenderQueue::addToRegularQueue): (BlackBerry::WebKit::RenderQueue::addToScrollZoomQueue): (BlackBerry::WebKit::RenderQueue::clear): (BlackBerry::WebKit::RenderQueue::clearVisibleZoom): (BlackBerry::WebKit::RenderQueue::render): 2012-08-23 Antonio Gomes [BlackBerry] Unify slow and fast in-region scrolling code paths https://bugs.webkit.org/show_bug.cgi?id=94834 PR #197662 Reviewed by Rob Buis. Internally reviewed by Arvid Nilsson. In order to be able to remove a bunch of obsolete code from InRegionScroller.cpp, we need to unify the codepaths for slow and fast in-region scrolling. This patch caches the root scrollable node of each scrollable block in InRegionScrollableArea also for the non-composited-scrolling case now too (analogly to the way we cache LayerWebKitThread for the composited scrolling case). Now the client (libwebview) can dispatch an in-region scrolling with one single code path, making use of a boolean (argh!) to inform if the scroll of the given layer supports compositing or not. Later on, this boolean is used to casting the proper element. * Api/InRegionScroller.cpp: (BlackBerry::WebKit::InRegionScroller::setScrollPositionWebKitThread): (BlackBerry::WebKit::InRegionScrollerPrivate::setScrollPositionWebKitThread): * Api/InRegionScroller.h: * Api/InRegionScroller_p.h: (InRegionScrollerPrivate): * WebKitSupport/InRegionScrollableArea.cpp: (WebKit): (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea): (BlackBerry::WebKit::enclosingLayerNode): * WebKitSupport/InRegionScrollableArea.h: (WebCore): (InRegionScrollableArea): 2012-08-23 Jacky Jiang [BlackBerry] Web pages are zoomed out to much on initial load https://bugs.webkit.org/show_bug.cgi?id=94830 Reviewed by Adam Treat. PR: 193943 Browser continuously adds paddings to the left and right sides of the main contents which makes the main contents even smaller. The issue can be reproduced on the desktop websites such as huffingtonpost.ca, bloomberg.com, online.wsj.com, nytimes.com, yahoo.com, thestar.com, sina.com.cn, sohu.com and so on. The root cause is that we layout those contents at the width of 1280 although the fixed width of the main contents of those websites is less than 1000, which results in adding the paddings. To fix this, we need to get back to the default max layout size 1024 * 768, which will make the main contents of those popular websites take full advantage of the screen real estate and look much better. Internally reviewed by Adam Treat. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize): (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments): * Api/WebPage_p.h: (WebPagePrivate): * WebKitSupport/RenderQueue.cpp: (BlackBerry::WebKit::RenderQueue::splittingFactor): 2012-08-22 Crystal Zhang [BlackBerry] Make all pickers non-zoomable https://bugs.webkit.org/show_bug.cgi?id=94729 Reviewed by Antonio Gomes. Move HTML header initialization to PagePopupBlackBerry as that part are all the same, and make all pickers non-zoomable. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::screenSize): (WebKit): * Api/WebPage_p.h: (WebPagePrivate): * WebCoreSupport/DatePickerClient.cpp: (WebCore::DatePickerClient::generateHTML): (WebCore::DatePickerClient::writeDocument): * WebCoreSupport/PagePopupBlackBerry.cpp: (WebCore::PagePopupBlackBerry::init): (WebCore::PagePopupBlackBerry::generateHTML): (WebCore): * WebCoreSupport/PagePopupBlackBerry.h: (PagePopupBlackBerry): * WebCoreSupport/SelectPopupClient.cpp: (WebCore::SelectPopupClient::generateHTML): (WebCore::SelectPopupClient::writeDocument): 2012-08-21 Benjamin C Meyer [BlackBerry] Add option to only add JavaScript object 'qnx' to private webviews https://bugs.webkit.org/show_bug.cgi?id=94621 Reviewed by Yong Li. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::enableQnxJavaScriptObject): (WebKit): (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): * Api/WebPage.h: * Api/WebPage_p.h: (WebPagePrivate): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchDidClearWindowObjectInWorld): 2012-08-21 Robin Cao [BlackBerry] Add support for getUserMedia https://bugs.webkit.org/show_bug.cgi?id=94591 Reviewed by George Staikos. Implement getUserMedia feature using the platform API. PR #153571 Reviewed internally by George Staikos. * WebCoreSupport/UserMediaClientImpl.cpp: (WebCore): (WebCore::userMediaRequestsMap): (WebCore::toMediaStreamSource): (WebCore::toMediaStreamDescriptor): (WebUserMediaRequestClientImpl): (WebCore::WebUserMediaRequestClientImpl::WebUserMediaRequestClientImpl): (WebCore::WebUserMediaRequestClientImpl::requestSucceeded): (WebCore::WebUserMediaRequestClientImpl::requestFailed): (WebCore::UserMediaClientImpl::UserMediaClientImpl): (WebCore::UserMediaClientImpl::~UserMediaClientImpl): (WebCore::UserMediaClientImpl::requestUserMedia): (WebCore::UserMediaClientImpl::cancelUserMediaRequest): (WebCore::UserMediaClientImpl::webUserMedia): * WebCoreSupport/UserMediaClientImpl.h: (BlackBerry): (Platform): (UserMediaClientImpl): 2012-08-21 Kihong Kwon [EFL][GTK][BlackBerry] Fix build error in the DeviceOrientationClient https://bugs.webkit.org/show_bug.cgi?id=94586 Reviewed by Kentaro Hara. Fix build error in the DeviceOrientationClientBlackBerry.cpp. It is occured because DeviceOrientation is changed to DeviceOrientationData in the WebCore. * WebCoreSupport/DeviceOrientationClientBlackBerry.cpp: (DeviceOrientationClientBlackBerry::lastOrientation): 2012-08-21 Jacky Jiang [BlackBerry] about:memory and about:memory-live should show numbers for the chrome process https://bugs.webkit.org/show_bug.cgi?id=94531 Reviewed by Rob Buis. Patch by Jacky Jiang PR: 190504 Add total committed memory of chrome process into about:memory and add its peak into about:memory-live. Internally reviewed by Yong Li and George Staikos. * WebKitSupport/AboutData.cpp: (BlackBerry::WebKit::memoryPage): (BlackBerry::WebKit::MemoryTracker::clear): (MemoryTracker): (BlackBerry::WebKit::MemoryTracker::peakTotalCommittedMemoryOfCurrentProcess): (BlackBerry::WebKit::MemoryTracker::peakTotalCommittedMemoryOfChromeProcess): (BlackBerry::WebKit::MemoryTracker::MemoryTracker): (BlackBerry::WebKit::MemoryTracker::updateMemoryPeaks): (BlackBerry::WebKit::memoryPeaksToHtmlTable): 2012-08-21 Antonio Gomes [BlackBerry] Accelerated In-Region Scrolling does not render correctly on rotation https://bugs.webkit.org/show_bug.cgi?id=94608 PR #194754 Reviewed by Goerge Staikos. When one translates/scrolls a HW accelerated scrollable layer, it makes use of the OVERRIDE mechanism. Suppose the following scenario: - In landscape, the overflow menu is scrollable. Then the user scrolls it so that is has scroll position of 0, -100. - when he rotates to portrait, the menus fit well to the available space but it still has the OVERRIDE set, so it keeps the layer translated at 0, -100. Fix is simple: clear the override when we stop scrolling a HW accelerated layer, when we destroy the objects. * WebKitSupport/InRegionScrollableArea.cpp: (BlackBerry::WebKit::InRegionScrollableArea::~InRegionScrollableArea): 2012-08-21 Antonio Gomes [BlackBerry] Properly notify WebKit when Client stops in-region scrolling https://bugs.webkit.org/show_bug.cgi?id=94603 PR #195813 Reviewed by Goerge Staikos. Simplify the API to get a notification of when a in-region scrolling has finished. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::notifyInRegionScrollStopped): Removed an unneeded parameter. (BlackBerry::WebKit::WebPage::notifyInRegionScrollStopped): Ditto. * Api/WebPage.h: * Api/WebPage_p.h: (WebPagePrivate): 2012-08-20 Sean Wang [BlackBerry] Select popup shows blank content when its option tags contain '\' characters https://bugs.webkit.org/show_bug.cgi?id=94321 Reviewed by George Staikos. PR 194224 When the SelectPopupClient generates HTML, if there is a character '\' in the select options' description, we should escape it to avoid the character being interpreted as an escape character. * WebCoreSupport/SelectPopupClient.cpp: (WebCore::SelectPopupClient::generateHTML): 2012-08-20 Genevieve Mak [BLACKBERRY] Add notification if an element does not have touch move or mouse move handlers. https://bugs.webkit.org/show_bug.cgi?id=94529 Reviewed by George Staikos. Send a notification to the client if the fat finger element does not have a mouse move or touch move handler or if it is empty. PR #177701 Reviewed Internally By Mike Lattanzio and Antonio Gomes. * Api/WebPageClient.h: * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint): 2012-08-17 Antonio Gomes [BlackBerry] Allow in-region accelerated scrolling take advantage of defer_blits https://bugs.webkit.org/show_bug.cgi?id=94379 PR #194595 Reviewed by Yong Li. Client does the blitting now. * Api/InRegionScroller.cpp: (BlackBerry::WebKit::InRegionScrollerPrivate::setScrollPositionCompositingThread): 2012-08-17 Jacky Jiang [BlackBerry] On reload, www.sohu.com renders part white background, part overscroll pattern https://bugs.webkit.org/show_bug.cgi?id=94348 Reviewed by Yong Li. Jacky Jiang PR: 179200 This can fix the reload issues of sohu.com, yahoo.com and thestar.com/iphone(PR158041). And it is also related with PR178305. Internally reviewed by George Staikos. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setLoadState): Keeping scales for reload was doing more harm than good. Two reasons to remove this: (1) During reload, contents rect is changing due to layout updates, it is possible that the contents or the white background can't cover the whole screen if we are using the previous scales. (2) Before reload, the source of the web page can be changed, therefore previous scales won't be valid anymore. Remove shouldRestoreViewState() as this check here is useless now. (BlackBerry::WebKit::WebPagePrivate::zoomToInitialScaleOnLoad): During reload, we should give it a chance to zoom to fit the screen, otherwise, it happens that the contents can't cover the whole screen until we restore the view state, see PR158041. Remove shouldRestoreViewState() as the error page issue PR178305 can be covered by reload now. * WebCoreSupport/FrameLoaderClientBlackBerry.h: Remove unused shouldRestoreViewState(). 2012-08-16 Mike Fenton [BlackBerry] Use form state to determine the VKB enter key. https://bugs.webkit.org/show_bug.cgi?id=94239 Reviewed by Rob Buis. PR 188234. If the enter key for the VKB is not explicitly set, use submit if we are in a single line input and a default button exists for the form. Reviewed Internally by Gen Mak. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::setElementFocused): 2012-08-16 Konrad Piascik [BlackBerry] Reload valid page from Error Page keeps history ViewState and zoom. https://bugs.webkit.org/show_bug.cgi?id=94123 Reviewed by Antonio Gomes. Reviewed internally by Leo Yang, Jacky Jiang. PR 178305 * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setLoadState):Reset the scales and the user scalable flag if we're reloading from an error page. (BlackBerry::WebKit::WebPagePrivate::updateViewportSize): Don't update the viewport size if we're still in the WebPagePrivate::init method. (BlackBerry::WebKit::WebPagePrivate::zoomToInitialScaleOnLoad): Properly set the shouldZoom flag if we're not going to restore the view state. * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::FrameLoaderClientBlackBerry): (WebCore::FrameLoaderClientBlackBerry::dispatchDidCommitLoad): Set the ViewState's shouldSaveViewState flag if we're coming from an error page. (WebCore::FrameLoaderClientBlackBerry::saveViewStateToItem): Set the new member variable m_shouldRestoreViewState based on the ViewState's shouldSaveViewState flag. (WebCore::FrameLoaderClientBlackBerry::restoreViewState): Added early return if m_shouldRestoreViewState is false. * WebCoreSupport/FrameLoaderClientBlackBerry.h: Add new method to have the client track whether we should restore the view state. (WebCore::FrameLoaderClientBlackBerry::shouldRestoreViewState): (FrameLoaderClientBlackBerry): 2012-08-16 Leo Yang [BlackBerry] Remove Mobile mode from WebPage.cpp and WebPage_p.h https://bugs.webkit.org/show_bug.cgi?id=94223 PR #192773 Reviewed by Rob Buis. Reviewed internally by Arvid Nilsson. Remove Mobile mode as it's not been used. Also remove code that handle top-level SVG document because now we can handle it in Desktop mode. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setLoadState): (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize): * Api/WebPage_p.h: 2012-08-16 Arvid Nilsson [BlackBerry] SurfacePool::waitForBuffer() sometimes waits for deleted EGLSyncKHR object https://bugs.webkit.org/show_bug.cgi?id=94208 Reviewed by Rob Buis. SurfacePool::notifyBuffersComposited() adds a tile's previous sync object to the garbage list before replacing it with a new one. However, it failed to thoroughly clear all tiles that were referencing the old sync object. Thus it could happen that if a set of tiles A was composited, then another set of tiles B was composited, only the intersection of A and B was cleared of the soon-to-be-deleted sync object, and the subtraction A - B would reference an invalid sync object in case the BackingStore decided to render to one of the tiles in A - B before they were composited again. Fixed by storing each individual sync object in only one place so we don't have to rummage through all tiles and remove stale references to sync objects that are about to be destroyed. A new reference counted Fence class is added for this purpose, to store a sync object. Tiles refer to Fence instances instead of holding a sync object directly. Since Fence is reference counted, several tiles can refer to the same Fence instance, and clearing its sync object will instantly remove it from the grasp of all tiles that depend on that Fence. Since there's no point in waiting for the same Fence twice, the only operation provided on Fence is takePlatformSync() which returns the sync object and clears the Fence of its sync object. Reviewed internally by Filip Spacek. PR 193610 * WebKitSupport/BackingStoreTile.cpp: (BlackBerry::WebKit::TileBuffer::TileBuffer): * WebKitSupport/BackingStoreTile.h: (BlackBerry): (Fence): (BlackBerry::Fence::create): (BlackBerry::Fence::takePlatformSync): (BlackBerry::Fence::Fence): (BlackBerry::WebKit::TileBuffer::fence): (BlackBerry::WebKit::TileBuffer::setFence): (TileBuffer): * WebKitSupport/SurfacePool.cpp: (BlackBerry::WebKit::SurfacePool::waitForBuffer): (BlackBerry::WebKit::SurfacePool::notifyBuffersComposited): * WebKitSupport/SurfacePool.h: (SurfacePool): 2012-08-16 Rob Buis [BlackBerry] Suppress non DRT JS Console output. https://bugs.webkit.org/show_bug.cgi?id=94058 Reviewed by Yong Li. Reviewed internally by Ming Xie. Some actual test results show JS Console showing up twice, for instance traversal/moz-bug559526.html. Only print the DRT specific Console message. * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::addMessageToConsole): 2012-08-16 Arvid Nilsson [BlackBerry] WebGL and Canvas fail to display after being restored from page cache https://bugs.webkit.org/show_bug.cgi?id=94105 Reviewed by George Staikos. The EGLImage was being destroyed when releasing layer resources on the compositing thread, but the WebKit thread layer never found out and failed to create a new image. Fixed by extending the release layer resources mechanism to also make a pass on the WebKit thread so that thread's layers have a chance to delete their textures and related resources. Reviewed internally by Filip Spacek. PR 192899 * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setLoadState): (BlackBerry::WebKit::WebPagePrivate::releaseLayerResources): (WebKit): (BlackBerry::WebKit::WebPagePrivate::releaseLayerResourcesCompositingThread): (BlackBerry::WebKit::WebPagePrivate::suspendRootLayerCommit): * Api/WebPage_p.h: (WebPagePrivate): * WebKitSupport/FrameLayers.cpp: (BlackBerry::WebKit::FrameLayers::releaseLayerResources): (WebKit): * WebKitSupport/FrameLayers.h: (FrameLayers): 2012-08-16 Pierre Rossi [Qt] Remove FontQt4, HAVE_QRAWFONT flag and the related dead code https://bugs.webkit.org/show_bug.cgi?id=93960 Reviewed by Simon Hausmann. Following the removal of Qt 4 support from trunk in r124879. * WebCoreSupport/AboutDataHaveFeatures.in: Remove all traces of HAVE_QRAWFONT's existence. 2012-08-15 Benjamin C Meyer [BlackBerry] When there is an exception we want to check if the ref is 0, not the value as JSObjectCallAsFunction returns 0 in that case. https://bugs.webkit.org/show_bug.cgi?id=94153 Reviewed by Yong Li. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::executeJavaScriptFunction): 2012-08-15 Yong Li [BlackBerry] Upstream FrameLoaderClientBlackBerry::securityOriginForNewDocument() https://bugs.webkit.org/show_bug.cgi?id=94139 Reviewed by Antonio Gomes. Keep same security origin when a file URL automatically redirects to its child folder. This patch will be reverted when we finish the better solution. PR# 172333 and PR# 180590. * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::FrameLoaderClientBlackBerry): (WebCore::FrameLoaderClientBlackBerry::dispatchDidStartProvisionalLoad): (WebCore::FrameLoaderClientBlackBerry::securityOriginForNewDocument): (WebCore): * WebCoreSupport/FrameLoaderClientBlackBerry.h: (FrameLoaderClientBlackBerry): 2012-08-15 Yong Li [BlackBerry] Should not keep recreating GeoTracker in setEnableHighAccuracy() https://bugs.webkit.org/show_bug.cgi?id=94136 Reviewed by Rob Buis. Internally reviewed by Lyon Chen. PR# 192401. 1. The prototype of GeoTracker::create() has changed. 2. Fix the issue that it could recreate tracker unnecessarily when setEnableHighAccuracy() is called but accuracy requirment hasn't changed. 3. Fix the issue setEnableHighAccuracy() could start tracking when tracker was suspended. * WebCoreSupport/GeolocationControllerClientBlackBerry.cpp: (GeolocationControllerClientBlackBerry::startUpdating): (GeolocationControllerClientBlackBerry::setEnableHighAccuracy): 2012-08-15 Mike Fenton [BlackBerry] Use the unconverted attribute instead of composing when deciding to how to handle key input. https://bugs.webkit.org/show_bug.cgi?id=94132 Reviewed by Rob Buis. PR 139838. Switch direct key input handling to be based on the unconverted attribute being present. Converted keys, even during composition are now input directly. Reviewed Internally by Nima Ghanavatian. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::setText): 2012-08-15 Joshua Netterfield [BlackBerry] Upstream BlackBerry build fixes https://bugs.webkit.org/show_bug.cgi?id=94121 Reviewed by Rob Buis. This includes several build fixes due to incorrect upstream patches. These mistakes were never present downstream. No new tests, because no new functionality is added. * WebCoreSupport/AboutDataEnableFeatures.in: * WebCoreSupport/AboutTemplate.html.cpp: (writeHeader): 2012-08-15 Leo Yang [BlackBerry] Use nested layout when rotating https://bugs.webkit.org/show_bug.cgi?id=94117 Partially patched by Arvid Nilsson. Reviewed by George Staikos. Reviewed internally by Arvid Nilsson. When rotating the content width used for fixedLayoutSize is not correct because we are changing the rotation and the content with should be determined after layout. So we set the with to 0 if we are rotating and beginning the nested layout. And in setViewportSize we need a nested layout loop to trigger zoom-to-fit. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize): (BlackBerry::WebKit::WebPagePrivate::setViewportSize): 2012-08-14 Antonio Gomes [BlackBerry] Stop copying ScrollViewBase vector all over https://bugs.webkit.org/show_bug.cgi?id=94021 Reviewed by Rob Buis. It outlives long enough in WebKit that we can just pass a const+ref of it. Internally reviewed by Gen Mak. * Api/WebPageClient.h: 2012-08-14 Antonio Gomes [BlackBerry] Robust-fy the LayerWebKitThread ownership with InRegionScroller https://bugs.webkit.org/show_bug.cgi?id=93983 PR #191737 Reviewed by Yong Li. Patch changes the way we currently keep track of the active scrollable area objects: before, we acquired the scrollable areas and just passed them in a vector up to the client, copying it over and over again. Also, it was a client responsability to delete stuff (BAD!). Now, we keep track of vector within InRegionScroller, as a class member, which allows us to avoid copies (in follow up patch), and control until when these objects outlive. Patch also changes InRegionScrollableArea to "retptr" the composited layer associated to it (if any). This ensure we have a non-null scrollable element always. As mentioned, InRegionScroller is now responsible for deleting and vector of scrollable areas. Internally reviewed by Arvid Nilsson. * Api/InRegionScroller.cpp: (WebKit): (BlackBerry::WebKit::InRegionScrollerPrivate::reset): Method is now responsible for deleting the tracked scrollable areas. (BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint): Renamed from 'inRegionScrollableAreasForPoint'. It was changed in order to store the scrollable area objects instead of just pass a copy of them up to the client. (BlackBerry::WebKit::InRegionScrollerPrivate::activeInRegionScrollableAreas): Getter. (BlackBerry::WebKit::InRegionScrollerPrivate::pushBackInRegionScrollable): It was promoted to a class method instead of a local helper. * Api/InRegionScroller_p.h: (WebKit): (InRegionScrollerPrivate): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setScrollOriginPoint): Adjustments needed due to the above changed. * WebKitSupport/InRegionScrollableArea.cpp: (BlackBerry::WebKit::InRegionScrollableArea::~InRegionScrollableArea): Clear up the cached layer. (WebKit): (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea): * WebKitSupport/InRegionScrollableArea.h: (InRegionScrollableArea): 2012-08-15 Nima Ghanavatian [BlackBerry] Check for valid field focus before processing a spellcheck request https://bugs.webkit.org/show_bug.cgi?id=94115 Reviewed by Rob Buis. PR192891 Checking for valid field focus before processing the spellcheck request. Internally reviewed by Mike Fenton. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::requestCheckingOfString): 2012-08-14 Adam Barth Delete Frame::domWindow() and Frame::existingDOMWindow() https://bugs.webkit.org/show_bug.cgi?id=93990 Reviewed by Eric Seidel. * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::toOriginString): (WebCore::ChromeClientBlackBerry::runJavaScriptAlert): (WebCore::ChromeClientBlackBerry::runJavaScriptConfirm): (WebCore::ChromeClientBlackBerry::runJavaScriptPrompt): (WebCore::ChromeClientBlackBerry::runBeforeUnloadConfirmPanel): (WebCore::ChromeClientBlackBerry::requestWebGLPermission): 2012-08-14 Leo Yang [BlackBerry] Checkerboard flashes on Go Back https://bugs.webkit.org/show_bug.cgi?id=94018 Reviewed by Yong Li. Reviewed internally by Yong Li. The backing store need to be suspended before the WebPagePrivate::restoreHistoryViewState() is called to avoid UI thread drawing checkerboard. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::restoreHistoryViewState): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::restoreViewState): 2012-08-14 Mike Fenton [BlackBerry] Remove unnecessary \n's from InputHandler log messages. https://bugs.webkit.org/show_bug.cgi?id=94015 Reviewed by Rob Buis. Remove many unnecessary \n's from the end of log messages. Reviewed Internally by Nima Ghanavatian. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::convertStringToWcharVector): (BlackBerry::WebKit::convertSpannableStringToString): (BlackBerry::WebKit::InputHandler::spannableTextInRange): (BlackBerry::WebKit::InputHandler::setText): (BlackBerry::WebKit::InputHandler::setSpannableTextAndRelativeCursor): 2012-08-14 Nima Ghanavatian [BlackBerry] Queue spellcheck requests with char-count limitations https://bugs.webkit.org/show_bug.cgi?id=93866 Reviewed by Rob Buis. PR184196 Making spellcheck a little more granular so as to work around the limitations of the inputservice. Also, spellcheck the entire field on focus only if spellcheck="on" is explicitly set. Internally reviewed by Mike Fenton. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::requestCheckingOfString): (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed): 2012-08-14 Mike Fenton [BlackBerry] Use Form helper functions to determine state in DOMSupport::isTextBasedContentEditableElement https://bugs.webkit.org/show_bug.cgi?id=93992 Reviewed by Antonio Gomes. Use form control helper functions to determine the editable state of the input field. * WebKitSupport/DOMSupport.cpp: (BlackBerry::WebKit::DOMSupport::isTextBasedContentEditableElement): 2012-08-14 Mike Fenton [BlackBerry] Use constructor to initialize rect in TouchEventHandler::drawTapHighlight() https://bugs.webkit.org/show_bug.cgi?id=93988 Reviewed by Antonio Gomes. Use constructor to initialize rect in TouchEventHandler::drawTapHighlight() * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::drawTapHighlight): 2012-08-14 Mike Fenton [BlackBerry] Fix use of endsWith to use string instead of char. https://bugs.webkit.org/show_bug.cgi?id=93994 Reviewed by Antonio Gomes. Regex comparison should use string instead of char comparison. * WebKitSupport/DOMSupport.cpp: (BlackBerry::WebKit::DOMSupport::elementPatternMatches): 2012-08-14 Jacky Jiang [BlackBerry] Double-tap zoom on blocks on cnn.com desktop page doesn't work https://bugs.webkit.org/show_bug.cgi?id=93895 Reviewed by Antonio Gomes. Patch by Jacky Jiang PR: 188232 When adjusting block zoom node, don't choose a node if the width of the node size is very close to the width of the actual visible size as block zoom can do nothing on such kind of node. This condition is more restrictive than the one based on area and can bail out early. In this way, we can get a better node for double-tap zoom. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::bestNodeForZoomUnderPoint): (BlackBerry::WebKit::WebPagePrivate::adjustedBlockZoomNodeForZoomAndExpandingRatioLimits): * Api/WebPage_p.h: (WebPagePrivate): 2012-08-14 Konrad Piascik [BlackBerry] Change the call to setUserScalable to use the setting. https://bugs.webkit.org/show_bug.cgi?id=93974 Reviewed by Rob Buis. We should be using the WebSetting and not the current value of m_userScalable. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments): 2012-08-14 Charles Wei [BlackBerry] Some callback of Select onchange doesn't work https://bugs.webkit.org/show_bug.cgi?id=93944 Reviewed by George Staikos. The Selection element is implemented with PagePopup, an HTML-based WebView with some Javascripts to make the UI of the select and option lists; The selection change is initiated from the javascript code in the Select Webview, and back to the native code of SelectPopupClient, which now in turn dispatches FormControlChangeEvent to the select element directly, and that causes the javascript callback been invoked in the same cycle as the javascript in the Popup View, and causes some Javascript Context problem. The solution is to send the FormControlChangeEvent asynchronously by a timer, when the JavaScript in the Popup view finishes execution, we then send the FormControlChangeEvent to the select element in the content page, that avoids the concurrent Javascript context issue. * WebCoreSupport/SelectPopupClient.cpp: (WebCore::SelectPopupClient::SelectPopupClient): (WebCore::SelectPopupClient::setValueAndClosePopup): (WebCore): (WebCore::SelectPopupClient::notifySelectionChange): * WebCoreSupport/SelectPopupClient.h: (SelectPopupClient): 2012-08-14 Arvid Nilsson [BlackBerry] Get rid of glCopyTexImage2D in Canvas and WebGL code paths https://bugs.webkit.org/show_bug.cgi?id=93614 Reviewed by Antonio Gomes. We used to set up resource sharing between the compositing thread context and the Canvas and WebGL contexts, and use glCopyTexImage2D to get a copy of the framebuffer to use as front buffer for compositing purposes. Now we instead create an EGLImage and blit the Canvas/WebGL output to it. The compositing thread creates a texture from the EGLImage in order to composite the output. This allows us to turn off resource sharing, so the WebPageCompositor no longer needs to pass the compositing thread context to the webkit thread. Reviewed internally by Filip Spacek. PR 188472 * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setCompositor): (BlackBerry::WebKit::WebPagePrivate::setCompositorHelper): * Api/WebPageCompositor.cpp: (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor): (BlackBerry::WebKit::WebPageCompositor::~WebPageCompositor): * Api/WebPage_p.h: (WebPagePrivate): 2012-08-14 Charles Wei [BlackBerry] Enable DNS prefetch https://bugs.webkit.org/show_bug.cgi?id=93846 Reviewed by George Staikos. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::init): 2012-08-13 Tom Sepez [chromium] release FrameLoaderClientImpl::m_pluginWidget refptr upon Plugin Document detach. https://bugs.webkit.org/show_bug.cgi?id=93283 Reviewed by Eric Seidel. Change the client redirectDataToPlugin method(s) to expect the possibility of a NULL argument, keeping existing behaviour otherwise. * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::redirectDataToPlugin): 2012-08-13 Mike Fenton [BlackBerry] Update API for spell checking suggestions again. https://bugs.webkit.org/show_bug.cgi?id=93877 Reviewed by Antonio Gomes. PR 163283. Update the spell checking options request API to include the caret positions. Reviewed internally by Nima Ghanavatian. * Api/WebPageClient.h: * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint): (WebKit): (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions): * WebKitSupport/InputHandler.h: (Platform): (InputHandler): * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint): * WebKitSupport/TouchEventHandler.h: (TouchEventHandler): 2012-08-13 Antonio Gomes [BlackBerry] Rounding error somewhere when translating CompositingLayer 's for in-region scrolling https://bugs.webkit.org/show_bug.cgi?id=93848 PR #190986 Reviewed by Yong Li. Patch adds a WebKit thread setScrollPosition-like API to InRegionScroller. It fixes a mismatch we had of setting a layer's scroll positing directly via ::setScrollPosition on the UI thread, but dispatching a coalesceable scrollBy(delta) message to WebKit thread. * Api/InRegionScroller.cpp: (BlackBerry::WebKit::InRegionScroller::setScrollPositionCompositingThread): Changed the API name to match other thread specific methods naming. (WebKit): (BlackBerry::WebKit::InRegionScroller::setScrollPositionWebKitThread): Added a setScrollPosition-like method to InRegionScroller public API. Used together with its UI-thread counterpart, it can fix some rounding errors we have due to mixing ::setScrollPosition and ::scrollBy methods. (BlackBerry::WebKit::InRegionScrollerPrivate::setScrollPositionCompositingThread): Method renamed. See reasons above. (BlackBerry::WebKit::InRegionScrollerPrivate::setScrollPositionWebKitThread): Calls fowards the call to ::setLayerScrollPosition (below). (BlackBerry::WebKit::InRegionScrollerPrivate::setLayerScrollPosition): Sets the scroll position of a given RenderLayer. * Api/InRegionScroller.h: (InRegionScroller): * Api/InRegionScroller_p.h: (WebCore): (InRegionScrollerPrivate): * WebKitSupport/InRegionScrollableArea.cpp: (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea): Cache the RenderLayer object associated to a given scrollable area instead of its LayerCompositingThread. This way we can use it for scrolling from both Compositing/UI and WebKit threads. 2012-08-12 Arvid Nilsson [BlackBerry] Tap highlight flashes checkerboard after pinch zoom https://bugs.webkit.org/show_bug.cgi?id=93601 Reviewed by Antonio Gomes. Since the tap highlight is usually rather small, we can reimplement GraphicsLayerClient::contentsVisible() to always return true in order to keep all AC layer tiles cached all the time. PR 189895 * WebKitSupport/DefaultTapHighlight.cpp: (BlackBerry::WebKit::DefaultTapHighlight::contentsVisible): (WebKit): * WebKitSupport/DefaultTapHighlight.h: (DefaultTapHighlight): 2012-08-12 Arvid Nilsson [BlackBerry] Tap highlight sometimes doesn't disappear https://bugs.webkit.org/show_bug.cgi?id=93711 Reviewed by Antonio Gomes. The WebOverlayOverride implementation just changes properties of a LayerCompositingThread directly, which means the changes will immediately be overwritten on the next commit. Therefore, when the tap highlight implementation adds a fade out animation, that animation will instantly be removed again if a commit happens for any reason. The reason is I totally botched the implementation of WebOverlayOverride, it's not wrapping WebCore::LayerOverride at all, instead for some reason it's manipulating the LayerCompositingThread directly. Fixed by actually mapping WebOverlayOverride calls to the corresponding WebCore::LayerOverride method, and scheduling a compositing run to make the change visible and kick off animations. Reviewed internally by Sean Wang. PR 188453 * Api/WebOverlay.cpp: (BlackBerry::WebKit::WebOverlayPrivate::override): * Api/WebOverlayOverride.cpp: (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: * Api/WebOverlay_p.h: (WebOverlayPrivate): (WebOverlayPrivateWebKitThread): (WebOverlayPrivateCompositingThread): 2012-08-10 Benjamin C Meyer Introduce JavaScriptVariant object. https://bugs.webkit.org/show_bug.cgi?id=93644 The JavaScriptVariant can be used for functions that return results from JavaScript such as executeJavaScript or functions that take arguments to pass a variable to JavaScript and they want to make sure the type is correct. Convert executeJavaScriptFunction() to use this data type as the example, other functions will be converted in the future. PR 14929 Internally reviewed by Joe Mason Reviewed by Adam Treat * Api/JavaScriptVariant.cpp: Added. (WebKit): (BlackBerry::WebKit::JSValueRefToBlackBerryJavaScriptVariant): (BlackBerry::WebKit::BlackBerryJavaScriptVariantToJSValueRef): (BlackBerry::WebKit::JavaScriptVariant::JavaScriptVariant): (BlackBerry::WebKit::JavaScriptVariant::~JavaScriptVariant): (BlackBerry::WebKit::JavaScriptVariant::operator=): (BlackBerry::WebKit::JavaScriptVariant::setType): (BlackBerry::WebKit::JavaScriptVariant::type): (BlackBerry::WebKit::JavaScriptVariant::setDouble): (BlackBerry::WebKit::JavaScriptVariant::doubleValue): (BlackBerry::WebKit::JavaScriptVariant::setString): (BlackBerry::WebKit::JavaScriptVariant::stringValue): (BlackBerry::WebKit::JavaScriptVariant::setBoolean): (BlackBerry::WebKit::JavaScriptVariant::booleanValue): * Api/JavaScriptVariant.h: Added. (WebKit): * Api/JavaScriptVariant_p.h: Added. (WebKit): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::executeJavaScriptFunction): * Api/WebPage.h: 2012-08-09 Leo Yang [BlackBerry] Export InRegionScroller to fix build https://bugs.webkit.org/show_bug.cgi?id=93635 Reviewed by Antonio Gomes. Build fix. * Api/InRegionScroller.h: 2012-08-08 Jacky Jiang [BlackBerry] Implement about:memory-live https://bugs.webkit.org/show_bug.cgi?id=93153 Reviewed by Yong Li. Patch by Jacky Jiang Implementing about:memory-live to track memory peaks: - about:memory-live/start: start tracking memory peaks. - about:memory-live: show memory peaks every 30ms. - about:memory-live/stop: stop tracking and show memory peaks. Mainly track the following memory peaks: - Total used memory (malloc + JSC). - Total committed memory. - Total mapped memory. Add total committed memory for about:memory * WebKitSupport/AboutData.cpp: (BlackBerry::WebKit::memoryPage): (WebKit): (MemoryTracker): (BlackBerry::WebKit::MemoryTracker::isActive): (BlackBerry::WebKit::MemoryTracker::clear): (BlackBerry::WebKit::MemoryTracker::peakTotalUsedMemory): (BlackBerry::WebKit::MemoryTracker::peakTotalCommittedMemory): (BlackBerry::WebKit::MemoryTracker::peakTotalMappedMemory): (BlackBerry::WebKit::MemoryTracker::MemoryTracker): (BlackBerry::WebKit::MemoryTracker::instance): (BlackBerry::WebKit::MemoryTracker::start): (BlackBerry::WebKit::MemoryTracker::stop): (BlackBerry::WebKit::MemoryTracker::updateMemoryPeaks): (BlackBerry::WebKit::memoryPeaksToHtmlTable): (BlackBerry::WebKit::memoryLivePage): (BlackBerry::WebKit::aboutData): 2012-08-08 Antonio Gomes [BlackBerry] Tie up the scrolling machinery to the graphics tree when applicable for in-region scroll https://bugs.webkit.org/show_bug.cgi?id=93482 PR #187672 Make InRegionScroller a simple public webkit/ API PR #188677 Reviewed by Rob Buis. In order to prepare InRegionScroller to be a public API in webkit/, the patch: 1) Renamed the current InRegionScroller class to InRegionScrollerPrivate; 2) Moved InRegionScroller.cpp|h from WebKitSupport/ to Api/; 3) Renamed InRegionScroller.h to InRegionScroller_p.h; 4) Added a new public class implementation to InRegionScroller.h; 5) Adapted WebPage and TouchEventHandler classes to use InRegionScroller::d directly. The most important API here is '::compositedSetScrollPosition' It is a UI/Compositing thread method only and sets the associated LayerCompositingThread (camouflaged as a unsigned) for each created InRegionScrollableArea that supports composited scrolling. The way ::compositedSetScrollPosition "scrolls" a layer is by setting the boundsOrigin property to the LayerCompositingThread's 'override' property in the UI/Compositing thread. * Api/InRegionScroller.cpp: Renamed from Source/WebKit/blackberry/WebKitSupport/InRegionScroller.cpp. (WebKit): (BlackBerry::WebKit::InRegionScroller::InRegionScroller): (BlackBerry::WebKit::InRegionScroller::~InRegionScroller): (BlackBerry::WebKit::InRegionScroller::compositedSetScrollPosition): (BlackBerry::WebKit::InRegionScrollerPrivate::InRegionScrollerPrivate): (BlackBerry::WebKit::InRegionScrollerPrivate::setNode): (BlackBerry::WebKit::InRegionScrollerPrivate::node): (BlackBerry::WebKit::InRegionScrollerPrivate::reset): (BlackBerry::WebKit::InRegionScrollerPrivate::hasNode): (BlackBerry::WebKit::InRegionScrollerPrivate::canScroll): (BlackBerry::WebKit::InRegionScrollerPrivate::compositedSetScrollPosition): (BlackBerry::WebKit::InRegionScrollerPrivate::scrollBy): (BlackBerry::WebKit::InRegionScrollerPrivate::inRegionScrollableAreasForPoint): (BlackBerry::WebKit::InRegionScrollerPrivate::scrollNodeRecursively): (BlackBerry::WebKit::InRegionScrollerPrivate::scrollRenderer): (BlackBerry::WebKit::InRegionScrollerPrivate::adjustScrollDelta): (BlackBerry::WebKit::canScrollInnerFrame): (BlackBerry::WebKit::canScrollRenderBox): (BlackBerry::WebKit::parentLayer): (BlackBerry::WebKit::enclosingLayerNode): (BlackBerry::WebKit::isNonRenderViewFixedPositionedContainer): (BlackBerry::WebKit::pushBackInRegionScrollable): * Api/InRegionScroller.h: Copied from Source/WebKit/blackberry/WebKitSupport/InRegionScroller.h. (WebKit): (InRegionScroller): * Api/InRegionScroller_p.h: Renamed from Source/WebKit/blackberry/WebKitSupport/InRegionScroller.h. (WebCore): (WebKit): (InRegionScrollerPrivate): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::scrollBy): (BlackBerry::WebKit::WebPagePrivate::notifyInRegionScrollStatusChanged): (BlackBerry::WebKit::WebPagePrivate::clearDocumentData): (BlackBerry::WebKit::WebPagePrivate::setScrollOriginPoint): (BlackBerry::WebKit::WebPage::inRegionScroller): (WebKit): * Api/WebPage.h: (WebKit): * WebKitSupport/InRegionScrollableArea.cpp: (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea): * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::drawTapHighlight): 2012-08-08 Antonio Gomes [BlackBerry] Make WebOverlayPrivate::scheduleCompositingRun a WebPagePrivate method. https://bugs.webkit.org/show_bug.cgi?id=93480 PR #188682 Reviewed by Rob Buis. ... this way it can be used by others. No behavioural change. Another preparation patch. * Api/WebOverlay.cpp: (BlackBerry::WebKit::WebOverlayPrivate::scheduleCompositingRun): * Api/WebPage.cpp: (WebKit): (BlackBerry::WebKit::WebPagePrivate::scheduleCompositingRun): * Api/WebPage_p.h: (WebPagePrivate): 2012-08-08 Sheriff Bot Unreviewed, rolling out r124887. http://trac.webkit.org/changeset/124887 https://bugs.webkit.org/show_bug.cgi?id=93504 Dependent API being removed. (Requested by mfenton on #webkit). * Api/WebPageClient.h: * WebKitSupport/InputHandler.cpp: * WebKitSupport/InputHandler.h: (InputHandler): * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint): (BlackBerry::WebKit::TouchEventHandler::spellCheck): (WebKit): * WebKitSupport/TouchEventHandler.h: (TouchEventHandler): 2012-08-08 Ed Baker [BlackBerry] Add relayout after updating fixed reported size https://bugs.webkit.org/show_bug.cgi?id=93116 PR #160059 Reviewed by Antonio Gomes. Reviewed internally by Antonio Gomes. On an orientation change and after fixed reported size is updated perform a layout and update the fixed elements after scrolling. This will recalculate the height and width of fixed position elements using percentage values with the new fixed reported size. Otherwise using the old fixed reported size in the new orientation overflowing or clipping could occur. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setViewportSize): 2012-08-07 Charles Wei [BlackBerry] always set PolicyAction to PolicyIgnore if the chrome returns false for acceptNavigationRequest https://bugs.webkit.org/show_bug.cgi?id=93251 Reviewed by George Staikos. In acceptNavigationRequest(), webkit will ask if the chrome will accept the navigation request. We will take this chance to see if the request is an internal-webkit protocol, otherwise, we will try to launch an external application to handle the request, and ask webkit to ignore the request by returning false in acceptNavigationRequest(). * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction): 2012-08-07 Konrad Piascik [BlackBerry] Change how devicePixelRatio is set. https://bugs.webkit.org/show_bug.cgi?id=93385 Reviewed by Antonio Gomes. Change devicePixelRatio to be set immediately after the page is created based on the WebSetting. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::init): (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments): 2012-08-07 Antonio Gomes [BlackBerry] [FullScreen] No need to scroll 'x' to 0 before entering fullscreen https://bugs.webkit.org/show_bug.cgi?id=91750 PR #178293 Reviewed by Rob Buis. We are not adjusting the 'left' CSS property of the fullscreen wrapper properly, so no need to scroll 'x' to 0 anymore. Internally reviewed by Jacky Jiang. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement): 2012-08-07 Antonio Gomes [BlackBerry][FullScreen] Remove the set/reset of touch modes code when entering/leaving fullscreen https://bugs.webkit.org/show_bug.cgi?id=92520 PR #184511 Reviewed by Yong Li. Internally reviewed by Gen Mak. Remove touch mode set/reset when entering/leaving fullscreen for media elements through the new FULLSCREEN_API code path. The client now handles it. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement): (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement): * Api/WebPage_p.h: (WebPagePrivate): 2012-08-07 Konrad Piascik [BlackBerry] Add missing include in FrameLoaderClienBlackBerry after Base64 moved. https://bugs.webkit.org/show_bug.cgi?id=93383 Reviewed by Rob Buis. Base64 moved from platform/text to wtf/text, need to add mssing include. * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: 2012-08-07 Konrad Piascik [BlackBerry] InspectorOverlay class duplicated in WebCore https://bugs.webkit.org/show_bug.cgi?id=93124 Reviewed by Rob Buis. Moved files to better align with namespace names. * WebKitSupport/InspectorOverlay.cpp: Renamed from Source/WebKit/blackberry/WebCoreSupport/InspectorOverlay.cpp. (WebKit): (BlackBerry::WebKit::InspectorOverlay::create): (BlackBerry::WebKit::InspectorOverlay::InspectorOverlay): (BlackBerry::WebKit::InspectorOverlay::notifySyncRequired): (BlackBerry::WebKit::InspectorOverlay::paintContents): (BlackBerry::WebKit::InspectorOverlay::showDebugBorders): (BlackBerry::WebKit::InspectorOverlay::showRepaintCounter): (BlackBerry::WebKit::InspectorOverlay::~InspectorOverlay): (BlackBerry::WebKit::InspectorOverlay::clear): (BlackBerry::WebKit::InspectorOverlay::update): * WebKitSupport/InspectorOverlay.h: Renamed from Source/WebKit/blackberry/WebCoreSupport/InspectorOverlay.h. (WebCore): (WebKit): (InspectorOverlay): (InspectorOverlayClient): (BlackBerry::WebKit::InspectorOverlay::setClient): (BlackBerry::WebKit::InspectorOverlay::notifyAnimationStarted): 2012-08-07 Mike Fenton [BlackBerry] Update API for spell checking suggestions. https://bugs.webkit.org/show_bug.cgi?id=93356 Reviewed by Antonio Gomes. PR 163283. Add connections for updated spell checking options request API. Move all this logic into InputHandler. Reviewed Internally by Gen Mak and Nima Ghanavatian. * Api/WebPageClient.h: * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint): (WebKit): (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions): * WebKitSupport/InputHandler.h: (Platform): (InputHandler): * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint): * WebKitSupport/TouchEventHandler.h: (TouchEventHandler): 2012-08-06 Charles Wei [BlackBerry] About: shows PAGE_CACHE not enabled. https://bugs.webkit.org/show_bug.cgi?id=93216 Reviewed by Antonio Gomes. Page cache is a feature that can be enabled/disabled at runtime, there's no MACRO named PAGE_CACHE to control the feature. * WebCoreSupport/AboutDataEnableFeatures.in: 2012-08-03 Yong Li [BlackBerry] FrameLoaderClient::restoreViewState() shouldn't trigger painting https://bugs.webkit.org/show_bug.cgi?id=93141 Reviewed by Rob Buis. PR# 172041. It is not always safe to render the page at this point. So we post a message instead. * Api/WebPage.cpp: (WebKit): (BlackBerry::WebKit::WebPagePrivate::restoreHistoryViewState): * Api/WebPage_p.h: (WebPagePrivate): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::restoreViewState): 2012-08-03 Konrad Piascik [BlackBerry] InspectorOverlay class duplicated in WebCore https://bugs.webkit.org/show_bug.cgi?id=93124 Reviewed by Rob Buis. Changed namespace of InspectorOverlay from WebCore to BlackBerry::WebKit * Api/WebPage.cpp: (WebKit): (BlackBerry::WebKit::WebPagePrivate::setInspectorOverlayClient): * Api/WebPage_p.h: (WebPagePrivate): * WebCoreSupport/InspectorClientBlackBerry.h: * WebCoreSupport/InspectorOverlay.cpp: (BlackBerry::WebKit::InspectorOverlay::create): (BlackBerry::WebKit::InspectorOverlay::InspectorOverlay): (BlackBerry::WebKit::InspectorOverlay::notifySyncRequired): (BlackBerry::WebKit::InspectorOverlay::paintContents): (BlackBerry::WebKit::InspectorOverlay::showDebugBorders): (BlackBerry::WebKit::InspectorOverlay::showRepaintCounter): (BlackBerry::WebKit::InspectorOverlay::contentsVisible): (BlackBerry::WebKit::InspectorOverlay::update): * WebCoreSupport/InspectorOverlay.h: (WebKit): (InspectorOverlayClient): (InspectorOverlay): (BlackBerry::WebKit::InspectorOverlay::notifyAnimationStarted): 2012-08-03 Arvid Nilsson [BlackBerry] Overlays display checkerboard that doesn't resolve https://bugs.webkit.org/show_bug.cgi?id=93099 Reviewed by Antonio Gomes. The WebKit-thread overlays, like tap highlight, inspector highlight and selection are all part of a separate graphics layer tree rooted in WebPagePrivate::m_overlayLayer. When LayerRenderer needs to schedule a commit to reactively render tiles and resolve checkerboard, it does so through the root layer. Since the overlay layer root didn't have a GraphicsLayerClient, there was no implementation of GraphicsLayerClient::notifySyncRequired() to call, and a commit was never scheduled, thus checkerboard never resolved. Fixed by adding a fallback implementation of GraphicsLayerClient in WebPagePrivate and hooking up the overlay root to it. Also, this implementation can be shared by the various overlays to avoide code duplication, specifically to implement notifySyncRequired(), showDebugBorders() and showRepaintCounter() only once. Fixing this revealed a bug where the web page would get stuck in an endless sequence of commits. It turned out that WebPagePrivate::updateDelegatedOverlays() was called right in the middle of the commit operation, after performing the webkit thread part of the commit operation but before we continued on the compositing thread. Since updateDelegatedOverlays() typically mutates layers, this is very bad (layers should not be mutated mid-commit). The mutations also cause a new commit to scheduled from within the current, which results in an endless sequence of commits. Fixed this latter bug by moving the updateDelegatedOverlays() call to the beginning of the method where it can cause no harm. This is before we mark the web page as no longer needing commit, so even if the implementation flips the "needs commit" bit, we will immediately flip it back and proceed with commit as usual. PR 187458, 184377 * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::overlayLayer): (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded): (WebKit): (BlackBerry::WebKit::WebPagePrivate::notifySyncRequired): (BlackBerry::WebKit::WebPagePrivate::showDebugBorders): (BlackBerry::WebKit::WebPagePrivate::showRepaintCounter): * Api/WebPage_p.h: (WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::notifyAnimationStarted): (BlackBerry::WebKit::WebPagePrivate::paintContents): * WebCoreSupport/InspectorOverlay.cpp: (WebCore::InspectorOverlay::notifySyncRequired): (WebCore::InspectorOverlay::showDebugBorders): (WebCore::InspectorOverlay::showRepaintCounter): * WebKitSupport/DefaultTapHighlight.cpp: (BlackBerry::WebKit::DefaultTapHighlight::notifySyncRequired): (BlackBerry::WebKit::DefaultTapHighlight::showDebugBorders): (WebKit): (BlackBerry::WebKit::DefaultTapHighlight::showRepaintCounter): * WebKitSupport/DefaultTapHighlight.h: (DefaultTapHighlight): * WebKitSupport/SelectionOverlay.cpp: (BlackBerry::WebKit::SelectionOverlay::notifySyncRequired): (BlackBerry::WebKit::SelectionOverlay::showDebugBorders): (WebKit): (BlackBerry::WebKit::SelectionOverlay::showRepaintCounter): * WebKitSupport/SelectionOverlay.h: (SelectionOverlay): 2012-08-02 Arvid Nilsson [BlackBerry] Add default implementation of GraphicsLayerClient::contentsVisible() https://bugs.webkit.org/show_bug.cgi?id=93036 Reviewed by George Staikos. Remove implementation of GraphicsLayerClient::contentsVisible() now that it has a default implementation. This also fixes a bug where memory usage for the inspector highlight overlay would balloon because it returned true from contentsVisible() which would cause the LayerTiler to populate all tiles. The default implementation returns false instead. PR 187458, 184377 * WebCoreSupport/InspectorOverlay.cpp: (WebCore::InspectorOverlay::showRepaintCounter): * WebCoreSupport/InspectorOverlay.h: (InspectorOverlay): * WebKitSupport/DefaultTapHighlight.h: * WebKitSupport/SelectionOverlay.h: 2012-08-02 Antonio Gomes Unreviewed debug build fix (bug 92889) * WebKitSupport/InRegionScroller.cpp: (BlackBerry::WebKit::pushBackInRegionScrollable): 2012-08-02 Leo Yang [BlackBerry] Rounding error of destination rect of checkerboard https://bugs.webkit.org/show_bug.cgi?id=93012 Reviewed by Rob Buis. Reviewed internally by Jakob Petsovits. Intersect with the destination rectangle to eliminate the rounding error. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::blitContents): 2012-08-01 Antonio Gomes [BlackBerry] Implement InRegionScroller class as a in-region scroll controller https://bugs.webkit.org/show_bug.cgi?id=92889 PR #186587 Reviewed by Yong Li. Internally reviewed by Arvid Nilsson. Moved all in-region scrolling code out of WebPagePrivate to the just created InRegionScroller class. This class aims to: 1) Centralize all in-region scroll code and clean up WebPagePrivate as a consequence. 2) Be the bases to add UI/Compositing thread driven scrolls to in-region. The patch does not change any functionallity change. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::init): (BlackBerry::WebKit::WebPagePrivate::scrollBy): (BlackBerry::WebKit::WebPagePrivate::notifyInRegionScrollStatusChanged): (BlackBerry::WebKit::WebPagePrivate::clearDocumentData): (BlackBerry::WebKit::WebPagePrivate::setScrollOriginPoint): * Api/WebPage_p.h: (WebPagePrivate): * WebKitSupport/InRegionScrollableArea.cpp: (BlackBerry::WebKit::InRegionScrollableArea::layer): * WebKitSupport/InRegionScroller.cpp: Added. (WebKit): (BlackBerry::WebKit::canScrollInnerFrame): (BlackBerry::WebKit::canScrollRenderBox): (BlackBerry::WebKit::parentLayer): (BlackBerry::WebKit::enclosingLayerNode): (BlackBerry::WebKit::isNonRenderViewFixedPositionedContainer): (BlackBerry::WebKit::pushBackInRegionScrollable): (BlackBerry::WebKit::InRegionScroller::InRegionScroller): (BlackBerry::WebKit::InRegionScroller::setNode): (BlackBerry::WebKit::InRegionScroller::node): (BlackBerry::WebKit::InRegionScroller::reset): (BlackBerry::WebKit::InRegionScroller::isNull): (BlackBerry::WebKit::InRegionScroller::scrollBy): (BlackBerry::WebKit::InRegionScroller::inRegionScrollableAreasForPoint): (BlackBerry::WebKit::InRegionScroller::scrollNodeRecursively): (BlackBerry::WebKit::InRegionScroller::scrollRenderer): (BlackBerry::WebKit::InRegionScroller::adjustScrollDelta): * WebKitSupport/InRegionScroller.h: Added. (WebCore): (WebKit): (InRegionScroller): * WebKitSupport/TouchEventHandler.cpp: (BlackBerry::WebKit::TouchEventHandler::drawTapHighlight): 2012-08-01 Charles Wei [BlackBerry] Favicon should be Base64 encoded for cross-process passing https://bugs.webkit.org/show_bug.cgi?id=92857 Reviewed by George Staikos. The current implementation just passes the internal of SkPixels data to the client, which can't be passed accross the process boundary to chrome for processing. This patch makes the favicon Base64 encoded so that can be passed to chrome in another process. * Api/WebPageClient.h: * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchDidReceiveIcon): 2012-08-01 Jacky Jiang [BlackBerry] Allow client side to add and remove origin access whitelist entries https://bugs.webkit.org/show_bug.cgi?id=92790 Reviewed by Yong Li. PR: 172658 Add two new APIs to add and remove origin access whitelist entries. Initialize the BlackBerryAllowCrossSiteRequests WebSetting to false. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::addOriginAccessWhitelistEntry): (WebKit): (BlackBerry::WebKit::WebPage::addOriginAccessWhitelistEntry): (BlackBerry::WebKit::WebPagePrivate::removeOriginAccessWhitelistEntry): (BlackBerry::WebKit::WebPage::removeOriginAccessWhitelistEntry): * Api/WebPage.h: * Api/WebPage_p.h: (WebPagePrivate): * Api/WebSettings.cpp: (BlackBerry::WebKit::WebSettings::standardSettings): 2012-08-01 Mike Fenton [BlackBerry] Consolidate suppression of keyboard requests. https://bugs.webkit.org/show_bug.cgi?id=92871 Reviewed by Antonio Gomes. Reduce VKB requests even more by applying the filter on all requests during processing. Reviewed Internally by Gen Mak. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::focusedNodeChanged): (BlackBerry::WebKit::InputHandler::notifyClientOfKeyboardVisibilityChange): 2012-08-01 Arvid Nilsson [BlackBerry] Disable tap highlight when transparent color is specified https://bugs.webkit.org/show_bug.cgi?id=92849 Reviewed by Antonio Gomes. When the web page specifies -webkit-tap-highlight-color:rgba(0,0,0,0) or any color with alpha value 0, we should disable the tap highlight. * WebKitSupport/DefaultTapHighlight.cpp: (BlackBerry::WebKit::DefaultTapHighlight::draw): 2012-07-31 Robin Cao [BlackBerry] Pass all file chooser settings to clients https://bugs.webkit.org/show_bug.cgi?id=92237 Reviewed by Rob Buis. Expose all file chooser settings to clients. * Api/WebPageClient.h: * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::runOpenPanel): 2012-07-31 Mike Fenton [BlackBerry] Fix crash in InputHandler spell checking. https://bugs.webkit.org/show_bug.cgi?id=92763 Reviewed by Antonio Gomes. PR 185574. Fix crash in getSpellChecker by guarding the calling paths to ensure that m_currentFocusElement is valid. Also add ASSERTs for previous crash. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed): (BlackBerry::WebKit::InputHandler::spellCheckingRequestCancelled): (BlackBerry::WebKit::InputHandler::getSpellChecker): 2012-07-31 Genevieve Mak Send an onContextMenu event to the page content so that context menus can be prevented. We use the node's event handler because we want to use the fat finger's node. If we use the EventHandler's sendContextMenuEvent it will hit test with the mouse position which may not be what we want. PR #184032 https://bugs.webkit.org/show_bug.cgi?id=92766 Reviewed by Antonio Gomes. Reviewed Internally by Antonio Gomes. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::webContext): (BlackBerry::WebKit::WebPagePrivate::contextNode): 2012-07-31 Arvid Nilsson [BlackBerry] Backing store output flickers when using WebPageCompositor https://bugs.webkit.org/show_bug.cgi?id=90291 Reviewed by Antonio Gomes. The backing store doesn't know when the API client swaps the buffers, so it doesn't know when to signal the blit generation condition variable. Fixed by using EGL fence sync instead, when available, so we don't have to know. Reviewed internally by Filip Spacek. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate): (BlackBerry::WebKit::BackingStorePrivate::~BackingStorePrivate): (BlackBerry::WebKit::BackingStorePrivate::render): (BlackBerry::WebKit::BackingStorePrivate::blitContents): (BlackBerry::WebKit::BackingStorePrivate::compositeContents): * Api/BackingStore_p.h: (BackingStorePrivate): * WebKitSupport/BackingStoreTile.cpp: (BlackBerry::WebKit::TileBuffer::TileBuffer): * WebKitSupport/BackingStoreTile.h: (BlackBerry::WebKit::TileBuffer::syncObject): (BlackBerry::WebKit::TileBuffer::setSyncObject): (TileBuffer): * WebKitSupport/SurfacePool.cpp: (WebKit): (BlackBerry::WebKit::SurfacePool::SurfacePool): (BlackBerry::WebKit::SurfacePool::initialize): (BlackBerry::WebKit::SurfacePool::waitForBuffer): (BlackBerry::WebKit::SurfacePool::notifyBuffersComposited): * WebKitSupport/SurfacePool.h: (SurfacePool): 2012-07-30 Yoshifumi Inoue [Forms] Get rid of Element::isReadOnlyFormControl other than CSS related https://bugs.webkit.org/show_bug.cgi?id=92612 Reviewed by Kent Tamura. This patch replaces Element::isReadOnlyFormControl() to HTMLFormControlElement::readOnly() for preparation of introducing Element::shouldMatchReadWriteSelector(), bug 92602. * WebKitSupport/DOMSupport.cpp: (BlackBerry::WebKit::DOMSupport::isTextBasedContentEditableElement): Replaced isReadOnlyFormControl() by HTMLTextFormControlElement::readOnly(). 2012-07-30 Mike Fenton [BlackBerry] Optimize the generation of selection details generation. https://bugs.webkit.org/show_bug.cgi?id=92522 Reviewed by Antonio Gomes. PR 179264. Reduce the number of times we generate selection details notifications. This removes several notifications that are handled by the standard notification path and makes skipping duplicate notifications the default so that only those that must generate a response do. Reviewed Internally by Gen Mak. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::notifyTransformedContentsSizeChanged): (BlackBerry::WebKit::WebPagePrivate::updateDelegatedOverlays): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::setElementUnfocused): * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::setCaretPosition): (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection): (BlackBerry::WebKit::SelectionHandler::setSelection): (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged): * WebKitSupport/SelectionHandler.h: (SelectionHandler): 2012-07-30 Robin Cao [BlackBerry] Adapt to changes in the SharedArray platform API https://bugs.webkit.org/show_bug.cgi?id=92631 Reviewed by Rob Buis. Adapt to changes in the SharedArray platform API. No behavioural change. Reviewed internally by Joe Mason. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::getBackForwardList): * Api/WebPage.h: * Api/WebPageClient.h: * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::runOpenPanel): 2012-07-30 Patrick Gansterer Replace UnicodeWinCE with UnicodeWchar https://bugs.webkit.org/show_bug.cgi?id=92539 Reviewed by Ryosuke Niwa. UnicodeWinCE never contained WinCE specific code. UnicodeWchar is a replacement for it, which is mainly based on the functions from . It is ment as a minimal Unicode backend, which can be used very easy and has no external dependencies. * WebCoreSupport/AboutDataUseFeatures.in: 2012-07-27 Eli Fidler [BlackBerry] Adapt to change in the FontInfo platform API. https://bugs.webkit.org/show_bug.cgi?id=92547 Reviewed by Yong Li RIM PR 161263 * Api/WebSettings.cpp: (BlackBerry::WebKit::WebSettings::standardSettings): 2012-07-27 Yong Li [BlackBerry] Should support onbeforeunload event and show confirmation dialog https://bugs.webkit.org/show_bug.cgi?id=92510 Reviewed by Antonio Gomes. RIM PR# 155878. 1. Export dispatchBeforeUnloadEvent() so client can call it before going to close the page. 2. Forward runBeforeUnloadConfirmPanel() call to client so it can show a dialog. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::dispatchBeforeUnloadEvent): (WebKit): * Api/WebPage.h: * Api/WebPageClient.h: * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::canRunBeforeUnloadConfirmPanel): (WebCore::ChromeClientBlackBerry::runBeforeUnloadConfirmPanel): 2012-07-27 Mike Fenton [BlackBerry] Switch InputHandler malloc use to fastMalloc for cases that should never fail https://bugs.webkit.org/show_bug.cgi?id=92508 Reviewed by Yong Li. Replace common uses of malloc with fastMalloc rather than trying to recover gracefully. If we are truly out of memory, crash before corruption occurs. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::spannableTextInRange): (BlackBerry::WebKit::InputHandler::extractedTextRequest): 2012-07-26 Nima Ghanavatian [BlackBerry] Remove synchronous spellchecking code https://bugs.webkit.org/show_bug.cgi?id=92415 Removing synchronous spellchecking code path. Reviewed by Rob Buis. Internally reviewed by Mike Fenton. * Api/WebPageClient.h: * WebCoreSupport/EditorClientBlackBerry.cpp: (WebCore::EditorClientBlackBerry::checkSpellingOfString): 2012-07-26 Nima Ghanavatian [BlackBerry] Support async spellcheck for the blackberry port https://bugs.webkit.org/show_bug.cgi?id=92160 PR124517 Implementing support for async spellcheck. Reviewed by Rob Buis. Internally reviewed by Mike Fenton. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::spellCheckingRequestCancelled): (WebKit): (BlackBerry::WebKit::WebPage::spellCheckingRequestProcessed): (BlackBerry::WebKit::WebPagePrivate::didChangeSettings): * Api/WebPage.h: * Api/WebSettings.cpp: (WebKit): (BlackBerry::WebKit::WebSettings::standardSettings): (BlackBerry::WebKit::WebSettings::isAsynchronousSpellCheckingEnabled): (BlackBerry::WebKit::WebSettings::setAsynchronousSpellCheckingEnabled): * Api/WebSettings.h: * WebCoreSupport/EditorClientBlackBerry.cpp: (WebCore): (WebCore::EditorClientBlackBerry::requestCheckingOfString): (WebCore::EditorClientBlackBerry::checkTextOfParagraph): * WebCoreSupport/EditorClientBlackBerry.h: (EditorClientBlackBerry): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::requestCheckingOfString): (BlackBerry::WebKit::InputHandler::convertTransactionIdToSequenceId): (WebKit): (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed): (BlackBerry::WebKit::InputHandler::spellCheckingRequestCancelled): (BlackBerry::WebKit::InputHandler::getSpellChecker): * WebKitSupport/InputHandler.h: (WebCore): (InputHandler): 2012-07-26 Mike Fenton [BlackBerry] Improve the logs in Selection Handler. https://bugs.webkit.org/show_bug.cgi?id=92405 Reviewed by Rob Buis. Clean up selection logging, fix priority and style of helper function. Reviewed Internally by Nima Ghanavatian. * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::cancelSelection): (BlackBerry::WebKit::SelectionHandler::shouldUpdateSelectionOrCaretForPoint): (BlackBerry::WebKit::SelectionHandler::setCaretPosition): (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection): (BlackBerry::WebKit::SelectionHandler::setSelection): (BlackBerry::WebKit::SelectionHandler::selectObject): (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged): (BlackBerry::WebKit::SelectionHandler::caretPositionChanged): 2012-07-26 Mike Fenton [BlackBerry] Add timing logs to SelectionHandler. https://bugs.webkit.org/show_bug.cgi?id=92404 Reviewed by Rob Buis. Add selection timing logs. Reviewed Internally by Nima Ghanavatian. * WebKitSupport/SelectionHandler.cpp: (BlackBerry::WebKit::SelectionHandler::setSelection): (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged): * WebKitSupport/SelectionHandler.h: (SelectionHandler): 2012-07-26 Mike Fenton [BlackBerry] InputHandler failure logs should be logAlways and critical. https://bugs.webkit.org/show_bug.cgi?id=92403 Reviewed by Rob Buis. Update Log level for failures and fix mask in log. Reviewed Internally by Nima Ghanavatian. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::convertStringToWchar): (BlackBerry::WebKit::convertStringToWcharVector): (BlackBerry::WebKit::convertSpannableStringToString): (BlackBerry::WebKit::InputHandler::spannableTextInRange): (BlackBerry::WebKit::InputHandler::setTextAttributes): 2012-07-26 Arvid Nilsson [BlackBerry] Refactor BackingStorePrivate::BackingStorePrivate::clearAndUpdateTileOfNotRenderedRegion() to avoid touching tile frontbuffer https://bugs.webkit.org/show_bug.cgi?id=92095 Reviewed by George Staikos. PR: 141439 Specifically, we want to avoid changing the rendered region of the front buffer without proper synchronization. The method is trying to force checkerboard to appear on screen because an area was invalidated but the render job was dropped, so the tile contents are now invalid. Unfortunately it did this in a way which is not thread safe. Fixed by making it thread safe, in a way that minimizes memory bandwidth usage. Instead of using the customary sequence of copy-back, modify and swap, we send a synchronous message to the compositing thread to avoid the copy-back step and save memory bandwidth. The trade-off is that the WebKit thread might wait a little longer for the compositing thread than it would from a waitForCurrentMessage() call. The way we synchronize this is rather expensive for the WebKit thread, and this method is called rather carelessly, so add various early returns to avoid doing it redundantly. Internally reviewed by Jakob Petsovits and Adam Treat. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::indexOfTile): (BlackBerry::WebKit::BackingStorePrivate::clearAndUpdateTileOfNotRenderedRegion): * Api/BackingStore_p.h: (BackingStorePrivate): 2012-07-26 Arvid Nilsson [BlackBerry] Refactor BackingStorePrivate::render() to avoid touching tile frontbuffer https://bugs.webkit.org/show_bug.cgi?id=91989 Reviewed by George Staikos. PR: 141439 Specifically, we want to avoid changing the rendered region of the front buffer. The code only touched the front buffer rendered region if the tile was not committed. Instead of immediately marking the tile as committed, and clearing the front buffer's rendered region to make it appear as checkerboard, we leave the front buffer alone and only mark the tile as committed once the front buffer has valid content. Un-committed tiles will also be rendered as checkerboard, so leaving it uncommitted is equivalent to clearing the front buffer rendered region here. In addition to the main change, some related changes follow naturally. The copyPreviousContentsToBackSurfaceOfTile() call only makes sense if the tile is committed, and the front buffer has valid content. Otherwise, clearing the back buffer is equivalent. The code has been updated to this effect. Since copyPreviousContentsToBackSurfaceOfTile() always sets the rendered region to the union of the front and back buffer regions, there is no point in the "backBufferIsValid" check. It has been turned into an ASSERT instead, just to make sure. Internally reviewed by Jakob Petsovits. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::render): 2012-07-25 Jonathan Dong [BlackBerry] Support RTSP in browser https://bugs.webkit.org/show_bug.cgi?id=92233 Reviewed by Rob Buis. Handle URL scheme "rtsp://" before creating the DocumentLoader and send the request to webkit. As we don't have any application which can deal with rtsp invocation for now, we need to create a media document to wrap the rtsp url within a video tag which makes it load as a normal video clip. RIM PR: 169669 Internally reviewed by Charles Wei . * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::createDocumentLoader): 2012-07-25 Jakob Petsovits [BlackBerry] Rephrase suspend/resume condition to guard against crashes https://bugs.webkit.org/show_bug.cgi?id=92300 PR 182125 Reviewed by George Staikos. When the compositor is removed from a WebPage, it might already have unset its context, and issuing a call to BackingStore::buffer() would therefore cause a crash. Just guarding buffer() from this crash isn't fully correct, because then we wouldn't suspend rendering for a compositor that had been previously enabled. Instead, change the condition to suspend/resume in WebPagePrivate::setCompositor() to focus on the object that delivers us the buffer. If we can't listen to the context or buffer being set, better just take the compositor object itself to determine whether we have something valid or not... and hope that they give us a valid context & buffer in all situations when we can actually be rendering. Also check compositor->context() in buffer() to be non-zero before accessing the context's buffer, because more defensive coding can't hurt here. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::buffer): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setCompositor): 2012-07-25 Joshua Netterfield [BlackBerry] Update about:config lists https://bugs.webkit.org/show_bug.cgi?id=92118 Reviewed by Rob Buis. Remove features from list that have either been removed from WebKit or that have been moved from one list to another. * WebCoreSupport/AboutDataEnableFeatures.in: * WebCoreSupport/AboutDataHaveFeatures.in: * WebCoreSupport/AboutDataUseFeatures.in: 2012-07-25 Jacky Jiang [BlackBerry] clock_gettime() in BackingStore.cpp should use CLOCK_MONOTONIC https://bugs.webkit.org/show_bug.cgi?id=91898 Reviewed by Yong Li. Let pthread condition variable in BackingStore.cpp use monotonic clock to fix a regression caused by r123266. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate): 2012-07-25 Andy Chen [BlackBerry] Add "SelectAll" to WebPage https://bugs.webkit.org/show_bug.cgi?id=92246 Reviewed by Antonio Gomes. Add "Select All" editor command to WebPage. Internally reviewed by Mike Fenton. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::selectAll): (WebKit): * Api/WebPage.h: * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::selectAll): (WebKit): * WebKitSupport/InputHandler.h: 2012-07-25 Arvid Nilsson [BlackBerry] Don't touch a tile buffer while it's still on its way to the GPU https://bugs.webkit.org/show_bug.cgi?id=91992 Reviewed by Adam Treat. PR: 141439 The copyPreviousContentsToBackSurfaceOfTile() call will also modify buffer contents, move it after the blit generation condvar to make sure we've waited for the buffer to become available first. This is done as part of some general BackingStorePrivate::render() cleanup in PR 141439. Internally reviewed by Jakob Petsovits. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::render): 2012-07-25 Jakob Petsovits [BlackBerry] notifyContentRendered() call missing in two spots https://bugs.webkit.org/show_bug.cgi?id=92153 RIM PR 173340 Reviewed by Antonio Gomes. In dispatchDidFirstVisualLayout() and repaint() in immediate mode, we render but don't notify the WebPageClient that the content was modified. In the long run, we should probably keep track of the modified reason from within render() itself and use this to automatically notify the client from within blitContents() and/or invalidateWindow(), depending on the rendering path. That's somewhat of a medium-size undertaking though; for now, adding the call directly to the renderVisibleContents() call sites will do. This patch also adds a blitVisibleContents() to dispatchDidFirstVisualLayout() where it was inexplicably missing, probably on account of old code that was never updated. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::repaint): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchDidFirstVisuallyNonEmptyLayout): 2012-07-24 Rob Buis [BlackBerry] Do not call settings setters twice on page construction https://bugs.webkit.org/show_bug.cgi?id=92157 Reviewed by Yong Li. The WebPagePrivate init method sets some settings value that were already set in didChangeSettings. setUseHixie76WebSocketProtocol just sets the default value, no need to set it again. Also call didChangeSettings explicitly from init, before that we are not calling it since the delegate is not set yet. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::init): 2012-07-24 Mike Fenton Throttle calls to request the virtual keyboard be shown. https://bugs.webkit.org/show_bug.cgi?id=92138 Reviewed by Rob Buis. PR 178465. Do not request keyboard visibility change when we are actively processing an input event. Reviewed Internally by Gen Mak. * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::focusedNodeChanged): 2012-07-24 Joshua Netterfield [BlackBerry] Update about:config lists https://bugs.webkit.org/show_bug.cgi?id=92118 Reviewed by Rob Buis. We want to have all flags which could be used / have been used by any platform. These lists were created by running: * WebCoreSupport/AboutDataEnableFeatures.in: `git grep "ENABLE(" | cut -d "(" -f2 | cut -d ")" -f1 | sort -u` * WebCoreSupport/AboutDataHaveFeatures.in: `git grep "HAVE(" | cut -d "(" -f2 | cut -d ")" -f1 | sort -u` * WebCoreSupport/AboutDataUseFeatures.in: `git grep "USE(" | cut -d "(" -f2 | cut -d ")" -f1 | sort -u` 2012-07-24 Arvid Nilsson [BlackBerry] Remove unused variable in BackingStore.cpp https://bugs.webkit.org/show_bug.cgi?id=91987 Reviewed by Antonio Gomes. PR: 141439 This is done as part of some general BackingStorePrivate::render() cleanup in PR 141439. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::render): 2012-07-23 Yong Li [BlackBerry] Move about: URL handling out of WebCore https://bugs.webkit.org/show_bug.cgi?id=91541 Reviewed by Rob Buis. PR# 181304. Move about: URL handling to the right place (FrameLoaderClientBlackBerry::createDocumentLoader), so reload and history navigation can work. Other changes: Remove about:version which makes little sense. Make about:memory partially visible. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::load): Remove the call to loadAbout() * Api/WebPage_p.h: Remove loadAbout() (WebPagePrivate): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::createDocumentLoader): Construct about: data here. * WebKitSupport/AboutData.cpp: (BlackBerry::WebKit::numberToHTMLTr): Make it static (BlackBerry::WebKit::configPage): Make it static (BlackBerry::WebKit::memoryPage): Make it static (BlackBerry::WebKit::cachePage): (BlackBerry::WebKit::buildPage): (BlackBerry::WebKit::creditsPage): (BlackBerry::WebKit::cookiePage): (BlackBerry::WebKit::aboutData): The only export function that returns HTML source for a given about: URL. (WebKit): * WebKitSupport/AboutData.h: (WebKit): 2012-07-23 Pierre Rossi Unify numTouchEventHandlersChanged and needTouchEvents in the chrome client https://bugs.webkit.org/show_bug.cgi?id=91006 Reviewed by Ryosuke Niwa. Removed numTouchEventHandlersChanged stub. * WebCoreSupport/ChromeClientBlackBerry.h: 2012-07-22 Kent Tamura Rename ENABLE_METER_TAG and ENABLE_PROGRESS_TAG to ENABLE_METER_ELEMENT and ENABLE_PROGRESS_ELEMENT respectively https://bugs.webkit.org/show_bug.cgi?id=91941 Reviewed by Kentaro Hara. A flag name for an elmement should be ENABLE_*_ELEMENT. * WebCoreSupport/AboutDataEnableFeatures.in: 2012-07-20 Jacky Jiang [BlackBerry] clock_gettime() in BackingStore.cpp should use CLOCK_MONOTONIC https://bugs.webkit.org/show_bug.cgi?id=91898 Reviewed by Yong Li. PR: 181043 Use CLOCK_MONOTONIC when we do expect a monotonic timer. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::blitContents): 2012-07-20 Crystal Zhang [BlackBerry] Add Cancel button for Select popup https://bugs.webkit.org/show_bug.cgi?id=91887 Reviewed by Yong Li. PR 177706 * WebCoreSupport/SelectPopupClient.cpp: (WebCore::SelectPopupClient::generateHTML): (WebCore::SelectPopupClient::setValueAndClosePopup): 2012-07-19 Mary Wu [BlackBerry] Make sure to send favicon when go back/forward https://bugs.webkit.org/show_bug.cgi?id=91808 Reviewed by George Staikos. When go back/forward, if the page was in page cache, it would have no chance to send favicon. So we'll send it in commitLoad right after send the blank icon. RIM PR# 177495 * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchDidCommitLoad): 2012-07-19 Jakob Petsovits [BlackBerry] Suspend when there's no target buffer until an external compositor is set https://bugs.webkit.org/show_bug.cgi?id=91686 RIM PR 174365 Reviewed by Antonio Gomes. If we don't have a client window (i.e. rendering to GL directly) and a WebPageCompositor is only set after a rendering operation, then we'll try to render to BackingStorePrivate::buffer() which doesn't exist at this point. That's bad, and gets us various assertions and possibly worse. Fix it by starting in a screen-suspended state and only resuming screen and backingstore once a compositor is actually set. So, in effect, with this patch applied, the sequence of events will look like this: 1) WebPage & BackingStore are initialize, neither window nor compositor exists, therefore buffer() returns 0. createSurface() therefore suspends screen and backingstore. 2) loadURL() or loadData() is called, web page is fully loaded, however we don't try to render because we're still suspended, still have no target buffer. 3) A WebPageCompositor is being set from outside. At the beginning of WebPage::setCompositor() we still don't have a buffer() so there's nothing to suspend, however, after the sync call to setCompositorHelper() the compositor is set so buffer() will return a nonzero value, causing us to resume at this point. Using the existence of a target buffer to determine whether or not to enable rendering or keep it suspended seems like a good idea, and the implementation (while not quite perfect yet) is a step forward from before. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::createSurfaces): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setCompositor): (BlackBerry::WebKit::WebPagePrivate::setCompositorHelper): * Api/WebPage_p.h: (WebPagePrivate): 2012-07-19 Jakob Petsovits [BlackBerry] Allow nested suspend/resume screen & backingstore calls. https://bugs.webkit.org/show_bug.cgi?id=91644 RIM PR 174365 Reviewed by Adam Treat and Antonio Gomes. We expose suspendScreenAndBackingStoreUpdates() to the outside API, but also use it internally when reacting to a number of happenings, i.e. zooming, viewport resize, resetting view state on Committed state or when restoring it from previous pages, etc. These two can clash. For instance, if we get a suspend call from outside that suspends us for app inactivity, or we are told to suspend because the main target surface is not available at the time, and while being suspended we try to rotate, finish loading a page, the we'll end up resuming operations even though we shouldn't. This patch changes the suspend flag to be a counter instead, allowing nested suspend/resume calls and making suspend/resume more robust this way. It also changes several call sites to make sure suspend/resume calls are paired up correctly. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate): (BlackBerry::WebKit::BackingStorePrivate::suspendScreenAndBackingStoreUpdates): (BlackBerry::WebKit::BackingStorePrivate::resumeScreenAndBackingStoreUpdates): * Api/BackingStore_p.h: (BackingStorePrivate): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::shouldZoomAboutPoint): (BlackBerry::WebKit::WebPagePrivate::zoomAboutPointTimerFired): (BlackBerry::WebKit::WebPagePrivate::blockZoomRectForNode): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::restoreViewState): 2012-07-18 Yong Li [BlackBerry] Move about: URL handling out of WebCore https://bugs.webkit.org/show_bug.cgi?id=91541 Reviewed by Rob Buis. Move about URL handling code to WebKit/blackberry. Now when WebPage is asked to load an about URL, it directly calls loadString() with the generated source. Also move AboutData.h/cpp from WebCoreSupport to WebKitSupport and change their namespace from WebCore to BlackBerry::WebKit. The change is very mechanical except "procss total memory usage" in about:memory now only accounts used bytes and ignore free spaces in malloc. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::loadAbout): (WebKit): (BlackBerry::WebKit::WebPage::load): * Api/WebPage_p.h: (WebPagePrivate): * WebKitSupport/AboutData.cpp: Renamed from Source/WebKit/blackberry/WebCoreSupport/AboutData.cpp. (WebKit): (BlackBerry::WebKit::writeFeatures): (BlackBerry::WebKit::numberToHTMLTr): (BlackBerry::WebKit::bool): (BlackBerry::WebKit::configPage): (BlackBerry::WebKit::cacheTypeStatisticToHTMLTr): (BlackBerry::WebKit::dumpJSCTypeCountSetToTableHTML): (BlackBerry::WebKit::memoryPage): * WebKitSupport/AboutData.h: Renamed from Source/WebKit/blackberry/WebCoreSupport/AboutData.h. (WebKit): 2012-07-17 Jakob Petsovits [BlackBerry] Remove unnecessary clearWindow() calls and the method itself https://bugs.webkit.org/show_bug.cgi?id=91540 RIM PR 174365 Reviewed by Adam Treat. If we resume the backingstore right afterwards with RenderAndBlit then that'll fill the whole visible area with content, making a clearWindow() call unnecessary. This call is a remnant from ages ago, and is well suited to disappear into nothingness. (There is still a clearWindow() call, with rect argument, which we continue using. This commit only removes the rect-less version.) * Api/BackingStore.cpp: * Api/BackingStore_p.h: (BackingStorePrivate): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint): (BlackBerry::WebKit::WebPagePrivate::zoomBlock): 2012-07-17 Vivek Galatage Web Inspector: refactor InspectorController::connectFrontend() to accept InspectorFrontendChannel. https://bugs.webkit.org/show_bug.cgi?id=91196 Reviewed by Pavel Feldman. Refactoring InspectorClients. InspectorClient::openInspectorFrontend now returning the InspectorFrontendChannel. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::init): (BlackBerry::WebKit::WebPage::enableWebInspector): * Api/WebPage_p.h: (WebPagePrivate): * WebCoreSupport/InspectorClientBlackBerry.cpp: (WebCore::InspectorClientBlackBerry::openInspectorFrontend): * WebCoreSupport/InspectorClientBlackBerry.h: (InspectorClientBlackBerry): 2012-07-17 Chris Guan [BlackBerry] Enable registerProtocolHandler for Blackberry https://bugs.webkit.org/show_bug.cgi?id=90422 Reviewed by George Staikos. Implements APIs were added in Custom Scheme Handler specification which is at http://dev.w3.org/html5/spec/Overview.html#custom-handlers. Test cases: fast/dom/register-protocol-handler.html fast/dom/unregister-protocol-handler.html * Api/WebPageClient.h: * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::isProtocolHandlerRegistered): (WebCore::ChromeClientBlackBerry::unregisterProtocolHandler): (WebCore::ChromeClientBlackBerry::registerProtocolHandler): * WebCoreSupport/ChromeClientBlackBerry.h: (ChromeClientBlackBerry): 2012-07-16 Benjamin C Meyer Any webpage can crash webkit via qnx.callExtensionMethod assuming 'this' is the 'qnx' object. https://bugs.webkit.org/show_bug.cgi?id=91419 Run the following in inspector to crash WebKit qnx.callExtensionMethod.apply(window, []); In the c++ that handles the function it assumes that when callExtensionMethod is called that 'this' is the object 'qnx'. The qnx object has a hidden variable that the code casts and uses, but when 'this' is not qnx such as the example this will cause a crash. Any website can insert the above JavaScript to cause the crash. Reviewed by Yong Li. * WebCoreSupport/ClientExtension.cpp: (clientExtensionMethod): 2012-07-16 Yong Li [BlackBerry] Improve about:memory page https://bugs.webkit.org/show_bug.cgi?id=87676 Reviewed by Rob Buis. Add a table for process memory usage summary for easy read. * WebCoreSupport/AboutData.cpp: (WebCore::memoryPage): 2012-07-16 Kihong Kwon Remove setController from BatteryClient https://bugs.webkit.org/show_bug.cgi?id=90944 Reviewed by Adam Barth. BatteryClient doesn't need to keep m_controller, because BatteryController can be accessed using BatteryController::from(). Remove m_controller and Add webPagePrivate to BatteryClientBlackBerry. And change all m_controller to BatteryController::from. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::init): * WebCoreSupport/BatteryClientBlackBerry.cpp: (WebCore::BatteryClientBlackBerry::BatteryClientBlackBerry): (WebCore::BatteryClientBlackBerry::onLevelChange): (WebCore::BatteryClientBlackBerry::onChargingChange): (WebCore::BatteryClientBlackBerry::onChargingTimeChange): (WebCore::BatteryClientBlackBerry::onDischargingTimeChange): * WebCoreSupport/BatteryClientBlackBerry.h: (BatteryClientBlackBerry): 2012-07-16 Yongxin Dai [BlackBerry] Text selection with touch hold does not start on text field in some cases https://bugs.webkit.org/show_bug.cgi?id=91267 Reviewed by Antonio Gomes. Input fields host node is by spec non-editable unless the field itself has content editable enabled. We enable selection if the shadow tree for the input field is selectable. PR # 173450 Reviewed Internally by Mike Fenton. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::webContext): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::webContext): 2012-07-15 Jonathan Dong [BlackBerry] Move icon database to application data directory. https://bugs.webkit.org/show_bug.cgi?id=91195 Reviewed by Rob Buis. RIM PR: 156852 Create icon database in application data directory instead of database or local storage directory, by doing this we can make things easier when clearing database or local storage data files. Internally reviewed by Charles Wei * WebCoreSupport/IconDatabaseClientBlackBerry.cpp: (WebCore::IconDatabaseClientBlackBerry::initIconDatabase): 2012-07-13 Xianzhu Wang Move WebCore/platform/text/Base64 to WTF/wtf/text https://bugs.webkit.org/show_bug.cgi?id=91162 Reviewed by Adam Barth. * Api/WebKitTextCodec.cpp: (BlackBerry::WebKit::base64DecodePolicyForWTF): (BlackBerry::WebKit::base64Decode): (BlackBerry::WebKit::base64EncodePolicyForWTF): (BlackBerry::WebKit::base64Encode): * Api/WebSettings.cpp: (BlackBerry::WebKit::WebSettings::setUserStyleSheetString): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: 2012-07-13 George Staikos [BlackBerry] Fix crash due to unguarded use of renderer in select popup. https://bugs.webkit.org/show_bug.cgi?id=91287 Reviewed by Rob Buis. No known testcase for this. Found in the wild. * WebCoreSupport/SelectPopupClient.cpp: (WebCore::SelectPopupClient::setValueAndClosePopup): 2012-07-13 Mike Fenton [BlackBerry] Add support for attributes to define keyboard and enter key type on the Virtual Keyboard https://bugs.webkit.org/show_bug.cgi?id=91248 Reviewed by Antonio Gomes. PR 174733. Add data-blackberry-virtual-keyboard-type and data-blackberry-virtual-keyboard-enter-key to enable configuration of the desired virtual keyboard using element attributes. Reviewed Internally by Gen Mak. * Api/WebPageClient.h: * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::convertStringToKeyboardType): (WebKit): (BlackBerry::WebKit::keyboardTypeAttribute): (BlackBerry::WebKit::convertStringToKeyboardEnterKeyType): (BlackBerry::WebKit::keyboardEnterKeyTypeAttribute): (BlackBerry::WebKit::InputHandler::setElementFocused): 2012-07-13 Jacky Jiang [BlackBerry] resetBitmapZoomScale called while zooming preventing pinch zoom https://bugs.webkit.org/show_bug.cgi?id=91247 Reviewed by Antonio Gomes. PR: 175432 On yahoo.com, the web page stopped zooming while trying to pinch as WebPageClient::resetBitmapZoomScale(double) was being called by WebPagePrivate::zoomToInitialScaleOnLoad() after load finished. And also yahoo.com was keeping updating layout, which made it really bad that zoomToInitialScaleOnLoad() was called many times when load finished and the load type was FrameLoadTypeStandard or FrameLoadTypeSame. As we only care about the situation that dispatchDidFirstVisuallyNonEmptyLayout() happens after load finished, we can move the code to that method and set a flag for WebPage layoutFinished() and zoomToInitialScaleOnLoad() instead. In this way, we can ensure that the flag is only enabled when dispatchDidFirstVisuallyNonEmptyLayout() is called after load finished and get rid of calling zoomToInitialScaleOnLoad() lots of times when keeping updating layout in such kind of situation. Internally reviewed by Arvid Nilsson * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::setLoadState): (BlackBerry::WebKit::WebPagePrivate::layoutFinished): * Api/WebPage_p.h: (BlackBerry::WebKit::WebPagePrivate::shouldZoomToInitialScaleOnLoad): (BlackBerry::WebKit::WebPagePrivate::setShouldZoomToInitialScaleAfterLoadFinished): (WebPagePrivate): * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: (WebCore::FrameLoaderClientBlackBerry::dispatchDidFirstVisuallyNonEmptyLayout): 2012-07-13 Jakob Petsovits [BlackBerry] Use fillBuffer() instead of a user-defined background image. https://bugs.webkit.org/show_bug.cgi?id=91180 RIM PR 171458 Reviewed by Rob Buis. Internally reviewed by Andrew Lo. By using Platform::Graphics::fillBuffer() to fill the overscroll area, we save graphics memory for the buffer that the background image was occupying. Also adapt checkerboard drawing as it is now done using fillBuffer() which replaces checkerBuffer(). In the same go, use the opportunity of the WebSettings API change to make it more consistent, renaming the OverZoomColor setting to OverScrollColor. * Api/BackingStore.cpp: (WebKit): (BlackBerry::WebKit::BackingStorePrivate::paintDefaultBackground): (BlackBerry::WebKit::BackingStorePrivate::blitContents): (BlackBerry::WebKit::BackingStorePrivate::fillWindow): * Api/BackingStore_p.h: (BackingStorePrivate): * Api/WebSettings.cpp: (WebKit): (BlackBerry::WebKit::WebSettings::standardSettings): (BlackBerry::WebKit::WebSettings::overScrollColor): (BlackBerry::WebKit::WebSettings::setOverScrollColor): (BlackBerry::WebKit::WebSettings::isEnableDefaultOverScrollBackground): (BlackBerry::WebKit::WebSettings::setEnableDefaultOverScrollBackground): * Api/WebSettings.h: 2012-07-13 Joshua Netterfield [BlackBerry] Update about:* pages https://bugs.webkit.org/show_bug.cgi?id=91121 Reviewed by Yong Li. Update the about:config pages, and improve the aesthetics of the about:build, about:version, about:credits, about:memory, about:config, and similar pages. No new tests, because there is no new funtionality. * WebCoreSupport/AboutData.cpp: (WebCore): (WebCore::writeFeatures): (WebCore::numberToHTMLTr): Converted to template function, added bool specialization to write "true" and "false" instead of "1" and "0" (WebCore::configPage): (WebCore::memoryPage): * WebCoreSupport/AboutTemplate.html.cpp: Template for BlackBerry about:* pages. 2012-07-12 Benjamin C Meyer WebPage::executeJavaScriptFunction crashes when there is an exception https://bugs.webkit.org/show_bug.cgi?id=91098 RIM PR #149294 When there is an exception currently the code tries to get the string of the exception via JSValueToStringCopy to pass back, but this cases a crash inside JavaScriptCore, so change it to simply return false and not set the return value with the exception string. Reviewed by George Staikos. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::executeJavaScriptFunction): 2012-07-12 Pawel Chomicki [BlackBerry] WebPage::touchEvent() should use Platform::TouchEvent's toString() for debugging. https://bugs.webkit.org/show_bug.cgi?id=91002 Reviewed by Antonio Gomes. Reviewed internally by Genevieve Mak. Updated DEBUG_TOUCH_EVENTS section of touchEvent method to utilize Platform::TouchEvent's toString method. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::touchEvent): 2012-07-12 Jonathan Dong [BlackBerry] Cannot use digest proxy auth and NTLM auth at the same time https://bugs.webkit.org/show_bug.cgi?id=91054 Reviewed by George Staikos. Implemented interface function syncProxyCredential() derived from class PageClientBlackBerry. Internally reviewed by Jason Liu * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::syncProxyCredential): (WebKit): * Api/WebPageClient.h: * Api/WebPage_p.h: (WebPagePrivate): 2012-07-11 Mike Lattanzio [BlackBerry] UserViewportArguments are not properly respected. https://bugs.webkit.org/show_bug.cgi?id=91005 Reviewed by Rob Buis. PR# 170088. Move scale and zooming reset on Committed before applying the user viewport to avoid overriding it immediately. Internal review by Konrad Piascik, Jacky Jiang. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setLoadState): 2012-07-11 Crystal Zhang [BlackBerry] Implement Date/Time picker https://bugs.webkit.org/show_bug.cgi?id=90911 Reviewed by Rob Buis. Implement HTML Date/Time picker, also should delete popup when closing popup. * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::closePagePopup): * WebCoreSupport/DatePickerClient.cpp: Added. (WebCore): (WebCore::DatePickerClient::DatePickerClient): (WebCore::DatePickerClient::~DatePickerClient): (WebCore::DatePickerClient::generateHTML): (WebCore::DatePickerClient::closePopup): (WebCore::DatePickerClient::contentSize): (WebCore::DatePickerClient::htmlSource): (WebCore::DatePickerClient::setValueAndClosePopup): (WebCore::DatePickerClient::didClosePopup): (WebCore::DatePickerClient::writeDocument): * WebCoreSupport/DatePickerClient.h: Added. (WebKit): (WebCore): (DatePickerClient): * WebKitSupport/InputHandler.cpp: (BlackBerry::WebKit::InputHandler::openDatePopup): 2012-07-10 Adam Barth WebCore::Settings for Hixie76 WebSocket protocol doesn't do anything and should be removed https://bugs.webkit.org/show_bug.cgi?id=90910 Reviewed by Eric Seidel. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::init): 2012-07-10 Adam Barth LayoutTestController.dumpConfigurationForViewport should move to Internals https://bugs.webkit.org/show_bug.cgi?id=45652 Reviewed by Eric Seidel. * WebKitSupport/DumpRenderTreeSupport.cpp: * WebKitSupport/DumpRenderTreeSupport.h: (DumpRenderTreeSupport): 2012-07-09 Yong Li [BlackBerry] PagePopupBlackBerry::closePopup() should always clear the pointer in WebPagePrivate https://bugs.webkit.org/show_bug.cgi?id=90817 Reviewed by Rob Buis. PR# 174085. PagePopupBlackBerry::closePopup() should always clear the pointer in WebPagePrivate to avoid crashes. This patch also removes unused variable m_parentPopup and its setter. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): Remove m_parentPopup. * Api/WebPage_p.h: (WebPagePrivate): * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::closePagePopup): * WebCoreSupport/PagePopupBlackBerry.cpp: (WebCore::PagePopupBlackBerry::init): Remove the setParentPopup() call. (WebCore::PagePopupBlackBerry::closePopup): Clear the reference in WebPagePrivate. * WebCoreSupport/SelectPopupClient.cpp: (WebCore::SelectPopupClient::setValueAndClosePopup): Add an assert for valid m_element. 2012-07-09 Mike Lattanzio [BlackBerry] meta viewport initial-scale doesn't factor in device pixel ratio https://bugs.webkit.org/show_bug.cgi?id=90575 Reviewed by Rob Buis. Refactor meta viewport handling to multiply the developer specified scale properties by the devicePixelRatio. This required moving the setting of these values until after the call to computeViewportAttributes. This fixes an isssue where content wider than the meta viewport would case a zoom-out-to-fit scenario because we misinterpreted the specified initial-scale. New test to verify wide content doesn't affect initial-scale: ManualTests/blackberry/meta-viewport-initial-scale-wide-content.html Internal review from Konrad Piascik, Arvid Nilsson. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments): (BlackBerry::WebKit::WebPagePrivate::dispatchViewportPropertiesDidChange): 2012-07-07 George Staikos Detach animation clients properly if we clear the web page pointer. https://bugs.webkit.org/show_bug.cgi?id=90730 Reviewed by Adam Treat. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::destroyCompositor): * Api/WebPageCompositor.cpp: (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate): (BlackBerry::WebKit::WebPageCompositorPrivate::~WebPageCompositorPrivate): (WebKit): (BlackBerry::WebKit::WebPageCompositorPrivate::detach): (BlackBerry::WebKit::WebPageCompositorPrivate::setPage): * Api/WebPageCompositor_p.h: (WebPageCompositorPrivate): 2012-07-06 Max Feil [BlackBerry] exitFullScreenForElement() is not working for fullscreen elements in iframes https://bugs.webkit.org/show_bug.cgi?id=90327 Reviewed by Antonio Gomes. Fix exit fullscreen problem for elements in iframes. The exitFullScreenForElement() call is passed a null element in this case, instead of the original element which entered fullscreen. If you look in Document.cpp you can see the exitFullScreenForElement() call being made on the topDocument (which has a null m_fullScreenElement) instead of the iframe's document. The Chromium and Windows ports get around this problem by storing either the fullscreen element or its frame during enterFullScreenForElement(), so I will bring the BlackBerry port in line with this. See also bug 89817. * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::enterFullScreenForElement): (WebCore::ChromeClientBlackBerry::exitFullScreenForElement): * WebCoreSupport/ChromeClientBlackBerry.h: (ChromeClientBlackBerry): 2012-07-06 Benjamin C Meyer Add an API to explicitly call a JavaScript function with args. https://bugs.webkit.org/show_bug.cgi?id=90694 Currently the Blackberry port doesn't expose the JavaScript engine to 3rd parties so they rely upon executeJavaScript which can be slower than necessary and unsafe as eval is used. This new API provides a way to explicitly call a specific JavaScript function with a list of args preventing the case where an argument comes from a untrusted source and tries to escape the arg list to take control of the JavaScript engine. In the future if the Blackberry port introduces a formal way to interact with the JavaScript engine this function should be removed. PR 149294 Reviewed by Unreviewed * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::executeJavaScriptFunction): (WebKit): * Api/WebPage.h: 2012-07-05 Charles Wei [BlackBerry] Fix the build error introduced by enabling CUSTOM_THEME_HANDLER https://bugs.webkit.org/show_bug.cgi?id=90588 Reviewed by Rob Buis. Fix the build error introduced by enabling CUSTOM_THEME_HANDLER. * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::isProtocolHandlerRegistered): 2012-07-04 Hanna Ma [BlackBerry] Implement device metrics for blackberry. https://bugs.webkit.org/show_bug.cgi?id=90494 RIM PR #159034 Reviewed by Rob Buis. Implement calls to the application to change the device metrics for the web inspector. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::applySizeOverride): (WebKit): (BlackBerry::WebKit::WebPagePrivate::setTextZoomFactor): * Api/WebPage_p.h: (WebPagePrivate): * WebCoreSupport/InspectorClientBlackBerry.cpp: (WebCore::InspectorClientBlackBerry::InspectorClientBlackBerry): (WebCore::InspectorClientBlackBerry::canOverrideDeviceMetrics): (WebCore): (WebCore::InspectorClientBlackBerry::overrideDeviceMetrics): (WebCore::InspectorClientBlackBerry::supportsFrameInstrumentation): * WebCoreSupport/InspectorClientBlackBerry.h: (InspectorClientBlackBerry): 2012-07-03 Leo Yang [BlackBerry] Checkerboard shown when clicking on error page buttons https://bugs.webkit.org/show_bug.cgi?id=90152 RIM PR #161867 Reviewed by George Staikos. r121514 just made the race occur in lower possibility but can't avoid it. This path is using another approach to fix the problem. When we are resetting backingstore while committing a page we need to suspend backingstore and screen update to make sure no other threads can update backingstore and screen. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::resetTiles): * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::setLoadState): 2012-07-03 George Staikos [BlackBerry] Enable Custom Scheme Handlers for BlackBerry. https://bugs.webkit.org/show_bug.cgi?id=90422 Reviewed by Rob Buis. * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore): (WebCore::ChromeClientBlackBerry::isProtocolHandlerRegistered): (WebCore::ChromeClientBlackBerry::unregisterProtocolHandler): * WebCoreSupport/ChromeClientBlackBerry.h: (ChromeClientBlackBerry): 2012-07-03 George Staikos [BlackBerry] Enable RegisterProtocolHandler for BlackBerry. https://bugs.webkit.org/show_bug.cgi?id=90422 Reviewed by Rob Buis. * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore): (WebCore::ChromeClientBlackBerry::registerProtocolHandler): * WebCoreSupport/ChromeClientBlackBerry.h: (ChromeClientBlackBerry): 2012-07-03 Jan Keromnes Web Inspector: WebInspector.TextViewer should be renamed WebInspector.TextEditor https://bugs.webkit.org/show_bug.cgi?id=89939 Reviewed by Vsevolod Vlasov. * WebCoreSupport/inspectorBB.html: 2012-07-02 Xiaobo Wang [BlackBerry] Use PUBLIC_BUILD to enable/disable DRT https://bugs.webkit.org/show_bug.cgi?id=90271 Reviewed by George Staikos. RIM PR #154707 Currently DRT code will be compiled only if ENABLE_DRT is set, and it's not defined by default. We should enable DRT by default unless PUBLIC_BUILD is set. In this way we don't need to rebuild webkit before running DRT. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate): (BlackBerry::WebKit::WebPagePrivate::init): (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge): (BlackBerry::WebKit::WebPage::runLayoutTests): * WebCoreSupport/ChromeClientBlackBerry.cpp: (WebCore::ChromeClientBlackBerry::addMessageToConsole): (WebCore::ChromeClientBlackBerry::runJavaScriptAlert): (WebCore::ChromeClientBlackBerry::runJavaScriptConfirm): (WebCore::ChromeClientBlackBerry::runJavaScriptPrompt): (WebCore::ChromeClientBlackBerry::createWindow): (WebCore::ChromeClientBlackBerry::runBeforeUnloadConfirmPanel): (WebCore::ChromeClientBlackBerry::setStatusbarText): (WebCore::ChromeClientBlackBerry::exceededDatabaseQuota): (WebCore::ChromeClientBlackBerry::keyboardUIMode): 2012-07-02 George Staikos [BlackBerry] Implement cancelVibration, and make sure it's canceled on destruction. https://bugs.webkit.org/show_bug.cgi?id=90406 Reviewed by Rob Buis. * WebCoreSupport/VibrationClientBlackBerry.cpp: (WebCore::VibrationClientBlackBerry::cancelVibration): (WebCore::VibrationClientBlackBerry::vibrationDestroyed): 2012-07-02 Benjamin Poulain Do not do any logging initialization when logging is disabled https://bugs.webkit.org/show_bug.cgi?id=90228 Reviewed by Simon Fraser. * Api/BlackBerryGlobal.cpp: (BlackBerry::WebKit::globalInitialize): 2012-07-01 George Staikos Clear visited links when clearing history. https://bugs.webkit.org/show_bug.cgi?id=90345 Reviewed by Antonio Gomes. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::clearHistory): 2012-06-30 Jason Liu [BlackBerry] WebView/Browser cause blank screen when selecting a dropdown field. https://bugs.webkit.org/show_bug.cgi?id=90241 This issue is caused by single quotes in option's labels. We should use the escape character of single quotes in JavaScript's string which starts and ends with single quotes. So we replace lablels' single quotes with its escape character during generating the select popUp's HTML. Reviewed by George Staikos. * WebCoreSupport/SelectPopupClient.cpp: (WebCore::SelectPopupClient::generateHTML): 2012-06-30 Jakob Petsovits [BlackBerry] Allow surface resizing for use cases other than rotation. https://bugs.webkit.org/show_bug.cgi?id=90295 RIM PR 171459 Reviewed by George Staikos. A new API method setHasPendingSurfaceSizeChange() is introduced for that effect, and used inside of setViewportSize() to let the WebPageClient do the resizing. Methods are renamed to reflect that this is not exclusively meant for rotation anymore. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): (BlackBerry::WebKit::WebPage::setScreenOrientation): (WebKit): (BlackBerry::WebKit::WebPage::setHasPendingSurfaceSizeChange): (BlackBerry::WebKit::WebPagePrivate::resizeSurfaceIfNeeded): (BlackBerry::WebKit::WebPagePrivate::setViewportSize): * Api/WebPage.h: * Api/WebPageClient.h: * Api/WebPage_p.h: (WebPagePrivate): 2012-06-29 Jacky Jiang [BlackBerry] Page jumps after post-pinch-zoom re-render https://bugs.webkit.org/show_bug.cgi?id=90282 Reviewed by Antonio Gomes. PR: 170255 In r120622, we moved ScrollableArea::setConstrainsScrollingToContentEdge(false|true) from WebPage::setScrollPosition() to BackingStorePrivate::setScrollingOrZooming() to address an overscroll reset issue. However, when we are ending bitmap zooming, UI thread can call BackingStorePrivate::setScrollingOrZooming(false) before WebKit thread calls WebPage::setScrollPosition(), in which case it will set ScrollableArea::m_constrainsScrollingToContentEdge to true earlier. To fix this, we can cache ScrollableArea::m_constrainsScrollingToContentEdge and always set it to false before we set scroll position in WebKit thread to avoid scroll position clamping during scrolling, and restore it to what it was after that. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPage::setScrollPosition): 2012-06-29 Jakob Petsovits Add blitVisibleContents() as public API. https://bugs.webkit.org/show_bug.cgi?id=90211 Reviewed by Adam Treat. We keep blitContents() (with src/dst rectangles) for compatibility with older Cascades sprints for now, but want to switch to always blitting the full viewport and this is a good first step. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents): (BlackBerry::WebKit::BackingStore::blitVisibleContents): (WebKit): * Api/BackingStore.h: 2012-06-29 Konrad Piascik Don't hardcode target dpi of 160 (it should be 96 on desktop) https://bugs.webkit.org/show_bug.cgi?id=88114 Reviewed by Adam Barth. Added new WebSetting to specify what the devicePixelRatio should be. Updated the call to computeViewportAttributes. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments): * Api/WebSettings.cpp: (WebKit): (BlackBerry::WebKit::WebSettings::standardSettings): (BlackBerry::WebKit::WebSettings::devicePixelRatio): (BlackBerry::WebKit::WebSettings::setDevicePixelRatio): * Api/WebSettings.h: * WebKitSupport/DumpRenderTreeSupport.cpp: (DumpRenderTreeSupport::dumpConfigurationForViewport): 2012-06-28 Jason Liu [BlackBerry] Selection items show as garbage for non-ascii characters. https://bugs.webkit.org/show_bug.cgi?id=89969 Add charset utf-8 to the select popup's page. Reviewed by Antonio Gomes. * WebCoreSupport/SelectPopupClient.cpp: (WebCore::SelectPopupClient::generateHTML): 2012-06-28 Leo Yang [BlackBerry] Checkerboard shown when clicking on error page buttons https://bugs.webkit.org/show_bug.cgi?id=90152 RIM PR #161867 Reviewed by George Staikos. Reset m_hasBlitJobs when resetting tiles to prevent ui thread from drawing checkerboard unintentionally. * Api/BackingStore.cpp: (BlackBerry::WebKit::BackingStorePrivate::resetTiles): 2012-06-27 Andrew Lo [BlackBerry] Selection overlay can become visible after it has been hidden https://bugs.webkit.org/show_bug.cgi?id=90105 Reviewed by George Staikos. When SelectionOverlay::hide is called from UI thread, rather than setting the override opacity, dispatch to the WebKit thread, which removes the overlay (normal case). Internal PR164183. Internally Reviewed by: Arvid Nilsson. * Api/WebPage.cpp: (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate): (BlackBerry::WebKit::WebPage::selectionOverlay): * Api/WebPage_p.h: (WebPagePrivate): * Api/WebSelectionOverlay.h: * WebKitSupport/SelectionOverlay.cpp: (BlackBerry::WebKit::SelectionOverlay::SelectionOverlay): (BlackBerry::WebKit::SelectionOverlay::hide): * WebKitSupport/SelectionOverlay.h: (BlackBerry::WebKit::SelectionOverlay::create): (SelectionOverlay): 2012-06-25 Mark Hahnenberg JSLock should be per-JSGlobalData https://bugs.webkit.org/show_bug.cgi?id=89123 Reviewed by Geoffrey Garen. Changed all sites that used JSLock to instead use the new JSLockHolder and pass in the correct JS context that the code is about to interact with that needs protection. Also added a couple JSLocks to places that didn't already have it that needed it. * Api/BlackBerryGlobal.cpp: (BlackBerry::WebKit::clearMemoryCaches): * WebCoreSupport/ClientExtension.cpp: * WebCoreSupport/PagePopupBlackBerry.cpp: (WebCore::PagePopupBlackBerry::installDomFunction): * WebKitSupport/DumpRenderTreeSupport.cpp: (DumpRenderTreeSupport::computedStyleIncludingVisitedInfo): 2012-06-27 Jacky Jiang [BlackBerry] Wrong scale after leaving fullscreen