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-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