8bb4d1a95a5cac8f6b081fdb53e57dd49b8b278d
[WebKit-https.git] / Source / WebKit / blackberry / ChangeLog
1 2012-03-16  Robin Cao  <robin.cao@torchmobile.com.cn>
2
3         [BlackBerry] Can not open certain links from bridge applications
4         https://bugs.webkit.org/show_bug.cgi?id=81197
5
6         Reviewed by Rob Buis.
7
8         Currently, the engine asks the client to handle some type of requests externally.
9         But WebPageClient::handleStringPattern is not yet implemented and exposed to
10         the client. Before that, we still need to give the client a chance to decide
11         how to handle requests such as 'mailto:'.
12
13         To address this problem, r108763 introduced a change that ask the client to
14         decide how to handle the navigation in dispatchDecidePolicyForNewWindowAction().
15         This is not intuitive and will bring troubles, because this navigation will
16         happen in the new page. So the new page client is to decide how to handle
17         the navigation, not the old one.
18
19         This patch reverts r108763 and skips calling WebPageClient::handleStringPattern
20         since it's not implemented.
21
22         This way the new window action will continue, and the logic in
23         dispatchDecidePolicyForNavigationAction() will handle the navigation correctly.
24
25         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
26         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNewWindowAction):
27         (WebCore::FrameLoaderClientBlackBerry::decidePolicyForExternalLoad):
28
29 2012-03-16  Leo Yang  <leo.yang@torchmobile.com.cn>
30
31         [BlackBerry] Crash when going back from an xhtml document containing <img>
32         https://bugs.webkit.org/show_bug.cgi?id=81297
33
34         Reviewed by Rob Buis.
35
36         This is manually reverting the offending internal commit which checked-in before upstreaming.
37
38         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
39         (WebCore::FrameLoaderClientBlackBerry::canCachePage):
40
41 2012-03-16  Genevieve Mak  <gmak@rim.com>
42
43         [BlackBerry] viewportRect has changed to viewportSize
44         https://bugs.webkit.org/show_bug.cgi?id=81262
45
46         Reviewed by Antonio Gomes.
47
48         Set size instead of rect in constructor.
49         * WebKitSupport/InRegionScrollableArea.cpp:
50         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
51
52 2012-03-16  Andrew Lo  <anlo@rim.com>
53
54         [BlackBerry] Enable PAGE_VISIBILITY_API
55         https://bugs.webkit.org/show_bug.cgi?id=81257
56
57         Set Page visibility state for BlackBerry port.
58
59         Reviewed by Rob Buis.
60
61         * Api/WebPage.cpp:
62         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
63         (WebKit):
64         (BlackBerry::WebKit::WebPagePrivate::setPageVisibilityState):
65         (BlackBerry::WebKit::WebPagePrivate::setVisible):
66         (BlackBerry::WebKit::WebPage::setVisible):
67         (BlackBerry::WebKit::WebPagePrivate::notifyAppActivationStateChange):
68         (BlackBerry::WebKit::WebPage::notifyAppActivationStateChange):
69         * Api/WebPage_p.h:
70         (WebPagePrivate):
71
72 2012-03-14  Arvid Nilsson  <anilsson@rim.com>
73
74         [BlackBerry] Make sure WebPage and BackingStore don't crash without a Window
75         https://bugs.webkit.org/show_bug.cgi?id=81099
76
77         Reviewed by Rob Buis.
78
79         Also rename the "compositing/blitting to main window" variables to
80         instead refer to OpenGL compositing. The code paths it triggers are
81         related to the BackingStore using OpenGL compositing, and can be useful
82         even when there's no window.
83
84         * Api/BackingStore.cpp:
85         (BlackBerry::WebKit::BackingStorePrivate::isOpenGLCompositing):
86         (BlackBerry::WebKit::BackingStorePrivate::render):
87         (BlackBerry::WebKit::BackingStorePrivate::copyPreviousContentsToBackSurfaceOfWindow):
88         (BlackBerry::WebKit::BackingStorePrivate::paintDefaultBackground):
89         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
90         (BlackBerry::WebKit::BackingStorePrivate::blitTileRect):
91         (BlackBerry::WebKit::BackingStorePrivate::blendCompositingSurface):
92         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
93         (BlackBerry::WebKit::BackingStorePrivate::blitToWindow):
94         (BlackBerry::WebKit::BackingStorePrivate::checkerWindow):
95         (BlackBerry::WebKit::BackingStorePrivate::invalidateWindow):
96         (BlackBerry::WebKit::BackingStorePrivate::clearWindow):
97         (BlackBerry::WebKit::BackingStorePrivate::drawSubLayers):
98         (BlackBerry::WebKit::BackingStorePrivate::surfaceSize):
99         (BlackBerry::WebKit::BackingStorePrivate::buffer):
100         * Api/BackingStore_p.h:
101         * Api/WebPage.cpp:
102         (BlackBerry::WebKit::WebPagePrivate::didPluginEnterFullScreen):
103         (BlackBerry::WebKit::WebPagePrivate::didPluginExitFullScreen):
104         (BlackBerry::WebKit::WebPagePrivate::drawLayersOnCommit):
105         (BlackBerry::WebKit::WebPagePrivate::drawSubLayers):
106         (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
107         * WebCoreSupport/ChromeClientBlackBerry.cpp:
108         (WebCore::ChromeClientBlackBerry::windowRect):
109         (WebCore::ChromeClientBlackBerry::screenToWindow):
110         (WebCore::ChromeClientBlackBerry::windowToScreen):
111         * WebKitSupport/GLES2Context.cpp:
112         (BlackBerry::WebKit::GLES2Context::GLES2Context):
113         * WebKitSupport/TouchEventHandler.h:
114         * WebKitSupport/WebPageCompositor.cpp:
115         (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor):
116         (BlackBerry::WebKit::WebPageCompositor::setBackingStoreUsesOpenGL):
117         (BlackBerry::WebKit::WebPageCompositor::drawLayers):
118         * WebKitSupport/WebPageCompositor.h:
119
120 2012-03-13  Jon Lee  <jonlee@apple.com>
121
122         Separate NOTIFICATIONS and LEGACY_NOTIFICATIONS
123         https://bugs.webkit.org/show_bug.cgi?id=80922
124         <rdar://problem/11035082>
125
126         Reviewed by Jian Li.
127
128         You can include either NOTIFICATIONS or LEGACY_NOTIFICATIONS and have a complete API.
129         LEGACY_NOTIFICATIONS should cover all of the previous functionality, and NOTIFICATIONS will cover the
130         new API. Therefore, APIs that are common between the two will have:
131         #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
132
133         This patch initially sets both to be exactly the same. As other bugs with patches begin to migrate to
134         the new API, the defines will begin to split. This allows ports to decide which set of APIs to include.
135
136         Update everything to be #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
137         * Api/WebPage.cpp:
138         (BlackBerry::WebKit::WebPagePrivate::init):
139         * WebCoreSupport/NotificationPresenterImpl.cpp:
140         * WebCoreSupport/NotificationPresenterImpl.h:
141
142 2012-03-14  Nima Ghanavatian  <nghanavatian@rim.com>
143
144         [BlackBerry] Syncing up left over bits in Api from our local branch to upstream
145         https://bugs.webkit.org/show_bug.cgi?id=81105
146
147         Reviewed by Rob Buis.
148
149         * Api/BackingStore.cpp:
150         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
151         (BlackBerry::WebKit::BackingStorePrivate::isActive):
152         (BlackBerry::WebKit::BackingStore::createBackingStoreMemory):
153         (WebKit):
154         (BlackBerry::WebKit::BackingStore::releaseBackingStoreMemory):
155         * Api/BackingStore.h:
156         * Api/WebPage.cpp:
157         (BlackBerry::WebKit::toWebCoreMouseEventType):
158         (BlackBerry::WebKit::WebPagePrivate::init):
159         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
160         (BlackBerry::WebKit::WebPagePrivate::activeNodeContext):
161         (BlackBerry::WebKit::WebPage::activeNodeContext):
162         (BlackBerry::WebKit::WebPagePrivate::updateCursor):
163         (BlackBerry::WebKit::WebPagePrivate::contextNode):
164         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
165         * Api/WebPage.h:
166         * Api/WebPage_p.h:
167         (WebPagePrivate):
168
169 2012-03-14  Andrew Lo  <anlo@rim.com>
170
171         [BlackBerry] Implement REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR using AnimationFrameRateController
172         https://bugs.webkit.org/show_bug.cgi?id=81000
173
174         Set the platform display ID, needed for DisplayRefreshMonitor.
175
176         Reviewed by Antonio Gomes.
177
178         * Api/WebPage.cpp:
179         (BlackBerry::WebKit::WebPagePrivate::init):
180
181 2012-03-14  Leo Yang  <leo.yang@torchmobile.com.cn>
182
183         [BlackBerry] Upstream the BlackBerry change to platform/Cursor.h
184         https://bugs.webkit.org/show_bug.cgi?id=81086
185
186         Reviewed by Rob Buis.
187
188         There was an alias named PlatformCursorHandle for PlatformCursor
189         in the internal version of Cursor.h. But it's not necessary so it's
190         not included in the upstreaming version of Cursor.h. As a result,
191         use PlatformCursor directly.
192
193         * Api/WebPage.cpp:
194         (BlackBerry::WebKit::WebPagePrivate::setCursor):
195         * Api/WebPage_p.h:
196         (WebPagePrivate):
197
198 2012-03-13  Mike Fenton  <mifenton@rim.com>
199
200         [BlackBerry] Input focus state should unfocus the frame selection instead of the field.
201         https://bugs.webkit.org/show_bug.cgi?id=81023
202
203         Reviewed by Antonio Gomes.
204
205         PR 137400.
206
207         Prevent cursor drawing by unfocusing the frame selection
208         when input mode is not ready.
209
210         Greatly simplify the decision to focus input fields by removing
211         all ties to the page load state and base it on input.  Input mode
212         is disabled when a page load begins and enabled on any user input.
213
214         The field is focused and ready for input immediately, only the
215         frame selection (or cursor) is unfocused.
216
217         Reviewed Internally by Gen Mak, Antonio Gomes and Nima Ghanavatian.
218
219         * Api/WebPage.cpp:
220         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
221         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
222         * Api/WebPageClient.h:
223         * WebCoreSupport/EditorClientBlackBerry.cpp:
224         (WebCore::EditorClientBlackBerry::shouldBeginEditing):
225         * WebKitSupport/InputHandler.cpp:
226         (BlackBerry::WebKit::InputHandler::InputHandler):
227         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
228         (BlackBerry::WebKit::InputHandler::enableInputMode):
229         (BlackBerry::WebKit::InputHandler::setElementFocused):
230         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
231         (BlackBerry::WebKit::InputHandler::notifyClientOfKeyboardVisibilityChange):
232         (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
233         (BlackBerry::WebKit::InputHandler::setComposingText):
234         * WebKitSupport/InputHandler.h:
235         (InputHandler):
236         * WebKitSupport/TouchEventHandler.cpp:
237         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
238
239 2012-03-13  Adam Barth  <abarth@webkit.org> && Benjamin Poulain  <bpoulain@apple.com>
240
241         Always enable ENABLE(CLIENT_BASED_GEOLOCATION)
242         https://bugs.webkit.org/show_bug.cgi?id=78853
243
244         Reviewed by Adam Barth.
245
246         * Api/WebPage.cpp:
247         (BlackBerry::WebKit::WebPagePrivate::init):
248         * WebCoreSupport/AboutDataEnableFeatures.in:
249         * WebCoreSupport/ChromeClientBlackBerry.cpp:
250         * WebCoreSupport/ChromeClientBlackBerry.h:
251         (ChromeClientBlackBerry):
252         * WebKitSupport/DumpRenderTreeSupport.cpp:
253         (toGeolocationClientMock):
254         (DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests):
255         (DumpRenderTreeSupport::resetGeolocationMock):
256         (DumpRenderTreeSupport::setMockGeolocationError):
257         (DumpRenderTreeSupport::setMockGeolocationPermission):
258         (DumpRenderTreeSupport::setMockGeolocationPosition):
259
260 2012-03-13  Mike Lattanzio  <mlattanzio@rim.com>
261
262         Remove ActiveNodeContext in favour of BlackBerry::Platform::WebContext
263         https://bugs.webkit.org/show_bug.cgi?id=80984
264
265         Remove ActiveNodeContext, and switch the implementation to
266         provide a BlackBerry::Platform::WebContext. The new object
267         adds an explicit IsImage flag, as well as IsAudio and IsVideo
268         for the HTML5 elements.
269
270         Note that for many videos both IsVideo and IsAudio will be true,
271         as videos typically have audio streams as well.
272
273         Reviewed by George Staikos.
274
275         * Api/ActiveNodeContext.h: Removed.
276         * Api/WebPage.cpp:
277         (BlackBerry::WebKit::WebPagePrivate::webContext):
278         (BlackBerry::WebKit::WebPage::webContext):
279         * Api/WebPage.h:
280         * Api/WebPage_p.h:
281
282 2012-03-12  Andy Chen  <andchen@rim.com>
283
284         [Blackberry] Make the process of marking all matches interruptible and asynchronous for find-in-page
285         https://bugs.webkit.org/show_bug.cgi?id=80831
286
287         Reviewed by Antonio Gomes.
288
289         * WebKitSupport/InPageSearchManager.cpp:
290         (BlackBerry::WebKit::InPageSearchManager::DeferredScopeStringMatches::DeferredScopeStringMatches):
291         (BlackBerry::WebKit::InPageSearchManager::DeferredScopeStringMatches::doTimeout):
292         (BlackBerry::WebKit::InPageSearchManager::InPageSearchManager):
293         (BlackBerry::WebKit::InPageSearchManager::~InPageSearchManager):
294         (BlackBerry::WebKit::InPageSearchManager::findNextString):
295         (BlackBerry::WebKit::InPageSearchManager::shouldSearchForText):
296         (BlackBerry::WebKit::InPageSearchManager::findAndMarkText):
297         (BlackBerry::WebKit::InPageSearchManager::clearTextMatches):
298         (BlackBerry::WebKit::InPageSearchManager::frameUnloaded):
299         (BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):
300         (BlackBerry::WebKit::InPageSearchManager::scopeStringMatchesSoon):
301         (BlackBerry::WebKit::InPageSearchManager::callScopeStringMatches):
302         (BlackBerry::WebKit::InPageSearchManager::cancelPendingScopingEffort):
303         * WebKitSupport/InPageSearchManager.h:
304
305 2012-03-09  Jon Lee  <jonlee@apple.com>
306
307         Rename NotificationPresenter to NotificationClient
308         https://bugs.webkit.org/show_bug.cgi?id=80488
309         <rdar://problem/10965558>
310
311         Reviewed by Kentaro Hara.
312
313         Refactor to use renamed WebCore::NotificationClient.
314         * WebCoreSupport/NotificationPresenterImpl.cpp:
315         (WebCore::NotificationPresenterImpl::instance):
316         (WebCore::NotificationPresenterImpl::show):
317         (WebCore::NotificationPresenterImpl::checkPermission):
318         * WebCoreSupport/NotificationPresenterImpl.h:
319         (NotificationPresenterImpl):
320
321 2012-03-09  Charles Wei  <charles.wei@torchmobile.com.cn>
322
323         [BlackBerry] Web Notification not working after rebase
324         https://bugs.webkit.org/show_bug.cgi?id=80690
325
326         Reviewed by George Staikos.
327
328         1. NotificationPresenterImpl should be in namespace WebCore
329         2. Need to connect NotificationPresenterImpl to webcore the new way:
330            WebCore::provideNotification(Page*, NotificationPresenter*)
331         3. Remove the old way of connecting the Notification:
332            ChromeClientBlackBerry::notificationPresenter()
333
334         * Api/WebPage.cpp:
335         (BlackBerry::WebKit::WebPagePrivate::init):
336         * WebCoreSupport/ChromeClientBlackBerry.cpp:
337         (WebCore):
338         * WebCoreSupport/ChromeClientBlackBerry.h:
339         (ChromeClientBlackBerry):
340         * WebCoreSupport/NotificationPresenterImpl.cpp:
341         * WebCoreSupport/NotificationPresenterImpl.h:
342
343 2012-03-08  Mike Fenton  <mifenton@rim.com>
344
345         [BlackBerry] Always use the current focused node when processing focus changes
346         https://bugs.webkit.org/show_bug.cgi?id=80594
347
348         Reviewed by Antonio Gomes.
349
350         Guard against toRange or fromRange being null when called
351         as part of a clear event.
352
353         * WebCoreSupport/EditorClientBlackBerry.cpp:
354         (WebCore::EditorClientBlackBerry::shouldChangeSelectedRange):
355
356 2012-03-08  Yong Li  <yoli@rim.com>
357
358         [BlackBerry] Block file-to-file access by default
359         https://bugs.webkit.org/show_bug.cgi?id=80605
360
361         Reviewed by Rob Buis.
362
363         Turn off allowFileAccessFromFileURLs() by default.
364
365         * Api/WebPage.cpp:
366         (BlackBerry::WebKit::WebPagePrivate::init):
367
368 2012-03-08  Mike Fenton  <mifenton@rim.com>
369
370         [BlackBerry] Always use the current focused node when processing focus changes
371         https://bugs.webkit.org/show_bug.cgi?id=80594
372
373         Reviewed by Antonio Gomes.
374
375         Update InputHandler focused node handling to strictly use
376         the currently focused node.  This prevents a handling loop
377         when JS is modifying the focus and we get a late notification
378         of a past change from ChromeClientBlackBerry with the previously
379         unfocused node.
380
381         * WebCoreSupport/ChromeClientBlackBerry.cpp:
382         (WebCore::ChromeClientBlackBerry::focusedNodeChanged):
383         * WebCoreSupport/EditorClientBlackBerry.cpp:
384         (WebCore::EditorClientBlackBerry::shouldChangeSelectedRange):
385         (WebCore::EditorClientBlackBerry::setInputMethodState):
386         * WebKitSupport/InputHandler.cpp:
387         (BlackBerry::WebKit::InputHandler::focusedNodeChanged):
388         * WebKitSupport/InputHandler.h:
389
390 2012-03-07  Jacky Jiang  <zhajiang@rim.com>
391
392         [BlackBerry] WebKit rendering problem when show/hide VKB
393         https://bugs.webkit.org/show_bug.cgi?id=80448
394         RIM PR: 141727
395
396         Reviewed by Antonio Gomes.
397
398         When setting viewport size, layout happens inside
399         WebPagePrivate::setDefaultLayoutSize(), in this way, the layout is
400         outside of the code path of "needsLayout" so that the contents are
401         not rendered into the backing store. This is a regression of r108718,
402         switch back to do the layout inside the public API
403         WebPage::setDefaultLayoutSize().
404
405         We haven't upstreamed the manual tests directory yet, therefore,
406         the new manual test case will be upstreamed later.
407
408         * Api/WebPage.cpp:
409         (BlackBerry::WebKit::WebPagePrivate::setDefaultLayoutSize):
410         (BlackBerry::WebKit::WebPage::setDefaultLayoutSize):
411
412 2012-03-06  Lianghui Chen  <liachen@rim.com>
413
414         [BlackBerry] Set correct ResourceRequest target type.
415         https://bugs.webkit.org/show_bug.cgi?id=80430
416
417         Reviewed by Rob Buis.
418
419         Removed unused code in dispatchWillSendRequest(). These codes are too
420         late as the target type has already been referred to when calling
421         ResourceRequest::initializePlatformRequest().
422
423         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
424         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendRequest):
425
426 2012-03-06  Lianghui Chen  <liachen@rim.com>
427
428         [BlackBerry] Remove unused and unneeded WebPageClient::downloadRequested(NetworkRequest&)
429         https://bugs.webkit.org/show_bug.cgi?id=80438
430
431         Reviewed by Antonio Gomes.
432
433         * Api/WebPageClient.h:
434
435 2012-03-06  Jakob Petsovits  <jpetsovits@rim.com>
436
437         [BlackBerry] Don't suspend accel comp when backgrounding a page.
438         https://bugs.webkit.org/show_bug.cgi?id=80369
439         RIM PR: 137609
440
441         Reviewed by Adam Treat.
442
443         Just because the page is in the background doesn't mean
444         it's invisible, doesn't mean it won't have to be redrawn
445         at some point - on rotation, for instance.
446
447         We still suspend accelerated compositing on setVisible(false).
448
449         * Api/WebPage.cpp:
450         (BlackBerry::WebKit::WebPage::notifyPageBackground):
451         (BlackBerry::WebKit::WebPage::notifyPageForeground):
452
453 2012-03-06  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
454
455         [BlackBerry] function rename issue after MediaPlayerPrivateBlackBerry.[cpp\h] upstream
456         https://bugs.webkit.org/show_bug.cgi?id=80377
457
458         Reviewed by Rob Buis.
459
460         As some of the function names changed in class MediaPlayerPrivate
461         with the upstream of MediaPlayerPrivateBlackBerry.[cpp|h], we
462         should update WebKit/blackberry/Api/WebPage.cpp which uses these
463         functions accordingly.
464         Renamed functions in class MediaPlayerPrivate:
465         windowGet() -> getWindow()
466         windowPositionGet() -> getWindowPosition()
467         mmrContextNameGet() -> mmrContextName()
468
469         * Api/WebPage.cpp:
470         (BlackBerry::WebKit::WebPagePrivate::enterFullscreenForNode):
471
472 2012-03-05  Eli Fidler  <efidler@rim.com>
473
474         The minimum font size WebSetting should actually change the LOGICAL font size in WebCore.
475         https://bugs.webkit.org/show_bug.cgi?id=80312
476         RIM PR: 139874
477
478         Reviewed by George Staikos.
479
480         * Api/WebPage.cpp:
481         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
482
483 2012-03-05  Jakob Petsovits  <jpetsovits@rim.com>
484
485         Make accelerated compositing work again with direct rendering.
486         https://bugs.webkit.org/show_bug.cgi?id=80181
487         RIM PR: 139110
488
489         Reviewed by Antonio Gomes.
490         Internally reviewed by Arvid Nilsson.
491
492         The significant amount of refactoring and optimization work
493         that has gone into accelerated compositing missed out on
494         some of the code paths that are being used in direct rendering.
495
496         Animations were relying on blitVisibleContents() only (which
497         is a no-op in direct rendering mode). There were early returns
498         which are suitable to determine whether screen contents need
499         to be updated at all; however, when we're already forcing a
500         re-render then those checks would cause the composition surface
501         not to appear at all, or avoid drawing new animation frames.
502
503         We went through dispatchMessage(), potentially causing
504         mismatches between rendered (but not yet posted) back content
505         and layers composited on top of it. As we're rendering onto
506         the sole target surface (the window) directly and posting
507         from the same thread, we have to wait for compositing on the
508         UI thread to finish before posting the window.
509
510         In turn, this patch combines both drawSubLayers() and
511         blendCompositingSurface() calls into one method, reducing
512         the number of messages to the UI thread within
513         renderDirectToWindow() to one.
514
515         blendCompositingMessage() in renderDirectToScreen() was called
516         with contents coordinates rather than viewport coordinates.
517         That caused some of the composited content to be cut off when
518         the scroll position wasn't (0, 0).
519
520         We called copyPreviousContentsToBackSurfaceOfWindow() twice for
521         one frame, in both renderDirectToWindow() and invalidateWindow().
522         Only one of those (the latter one) is necessary.
523
524         * Api/BackingStore.cpp:
525         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
526         (BlackBerry::WebKit::BackingStorePrivate::renderDirectToWindow):
527         (BlackBerry::WebKit::BackingStorePrivate::drawSubLayers):
528         (WebKit):
529         (BlackBerry::WebKit::BackingStorePrivate::drawAndBlendLayersForDirectRendering):
530         * Api/BackingStore.h:
531         (WebKit):
532         * Api/BackingStore_p.h:
533         (BackingStorePrivate):
534         (BlackBerry::WebKit::BackingStorePrivate::isDirectRenderingAnimationMessageScheduled):
535         (BlackBerry::WebKit::BackingStorePrivate::setDirectRenderingAnimationMessageScheduled):
536         * Api/WebPage_p.h:
537         (BlackBerry::WebKit::WebPagePrivate::isAcceleratedCompositingActive):
538         (WebPagePrivate):
539         * WebKitSupport/WebPageCompositor.cpp:
540         (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor):
541         (BlackBerry::WebKit::WebPageCompositor::~WebPageCompositor):
542         (BlackBerry::WebKit::WebPageCompositor::drawLayers):
543         (BlackBerry::WebKit::WebPageCompositor::animationTimerFired):
544         * WebKitSupport/WebPageCompositor.h:
545         (WebPageCompositor):
546
547 2012-03-05  George Staikos  <gstaikos@rim.com>
548
549         [BlackBerry] DOMSupport visibleSelectionForRangeInputElement incorrectly dereferences a null range.
550         https://bugs.webkit.org/show_bug.cgi?id=80274
551
552         Reviewed by Antonio Gomes.
553
554         A null range can be returned so we should not blindly deref it.
555         Reviewed Internally by Mike Fenton.
556
557         * WebKitSupport/DOMSupport.cpp:
558         (BlackBerry::WebKit::DOMSupport::visibleSelectionForRangeInputElement):
559
560 2012-03-04  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
561
562         [BlackBerry] upstream CredentialManager and CredentialTransformData implementation
563         https://bugs.webkit.org/show_bug.cgi?id=80107
564
565         Reviewed by Antonio Gomes.
566
567         Initial upstream of CredentialManager.[h|cpp] and
568         CredentialTransformData.[h|cpp].
569         No new test.
570
571         * WebCoreSupport/CredentialManager.cpp: Added.
572         (WebCore):
573         (WebCore::CredentialManager::CredentialManager):
574         (WebCore::CredentialManager::autofillAuthenticationChallenge):
575         (WebCore::CredentialManager::autofillPasswordForms):
576         (WebCore::CredentialManager::saveCredentialIfConfirmed):
577         * WebCoreSupport/CredentialManager.h: Added.
578         (WebKit):
579         (WebCore):
580         (CredentialManager):
581         * WebCoreSupport/CredentialTransformData.cpp: Added.
582         (WebCore::CredentialTransformData::CredentialTransformData):
583         (WebCore):
584         (WebCore::CredentialTransformData::url):
585         (WebCore::CredentialTransformData::credential):
586         (WebCore::CredentialTransformData::setCredential):
587         (WebCore::CredentialTransformData::findPasswordFormFields):
588         * WebCoreSupport/CredentialTransformData.h: Added.
589         (WebCore):
590         (CredentialTransformData):
591         (WebCore::CredentialTransformData::isValid):
592         (WebCore::CredentialTransformData::protectionSpace):
593
594 2012-03-04  Antonio Gomes  <agomes@rim.com>
595
596         [BlackBerry] Fixed positioned element not correctly positioned after orientation change, when viewport metatag is used
597         https://bugs.webkit.org/show_bug.cgi?id=80228
598         PR #138865
599
600         Reviewed by George Staikos.
601
602         Viewport size changes in two main scenarios:
603         - orientation changes;
604         - virtual keyboard pop up/hide.
605
606         When we are setting a new viewport size, we need to
607         update the FixedReportedSize of the mainframe. This size
608         is used to return innerWidth|Heigth as well as to calculate
609         the fixed position elements height relative to the RenderView [1].
610
611         [1] RenderBox::containingBlockLogicalHeightForPositioned.
612
613         When we are rotating, we need to delay setting the new FixedReportedSize
614         till we layout and are able to figure out the new contents size. At this
615         time we call setFixedReportedSize, but we do not reposition the fixed elemts
616         afterwards.
617
618         Patch adds a call to FrameView::repaintFixedElementsAfterScrolling, after
619         setting the new size.
620
621         Source/WebKit/blackberry:
622         * Api/WebPage.cpp:
623         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
624
625 2012-03-02  Mike Fenton  <mifenton@rim.com>
626
627         [BlackBerry] Expose WebInspector state to client and clean up WebSettings
628         https://bugs.webkit.org/show_bug.cgi?id=80177
629
630         Reviewed by Antonio Gomes.
631
632         Expose the Web Inspector state to WebPage client's and
633         re-order initialization of WebSettings to be alphabetical
634         matching their definitions.
635
636         * Api/WebPage.cpp:
637         (BlackBerry::WebKit::WebPage::isWebInspectorEnabled):
638         * Api/WebPage.h:
639         * Api/WebSettings.cpp:
640         (BlackBerry::WebKit::WebSettings::standardSettings):
641
642 2012-03-02  Arvid Nilsson  <anilsson@rim.com>
643
644         Accelerated compositing: Checkerboard never goes away
645         https://bugs.webkit.org/show_bug.cgi?id=79020
646         RIM PR #134164
647
648         Reviewed by Adam Treat.
649
650         Checkerboard appears in accelerated compositing layers when there's no
651         texture for (part of) a layer. The layer renderer queues up some render
652         jobs and schedules a commit to make the WebKit thread process those
653         jobs. Render jobs performed during commit cause texture upload jobs to
654         be scheduled on the UI thread. Texture uploads are performed when next
655         drawing the layers.
656
657         Unfortunately, sometimes commit operation happens without a subsequent
658         call draw the layers.
659
660         In order to implement one-shot drawing sync, I added a call to
661         commitRootLayerIfNeeded() in BackingStore::renderContents(), and
662         I was lucky that most of the time, renderContents() is followed by
663         blit(Visible)Contents() which in turn draws the layers.
664         However, render is not always followed by a blit, for example when
665         rendering offscreen tiles in BackingStore::renderOnIdle(), and in
666         direct rendering mode.
667
668         Fixed by making sure that every call to commitRootLayerIfNeeded() that
669         returns true is followed by a call to drawLayersOnCommit(), unless a
670         blit was requested already.
671
672         Also tweak the logic for one-shot drawing sync to make the code in
673         drawLayersOnCommit() reusable outside of rootLayerCommitTimerFired().
674
675         * Api/BackingStore.cpp:
676         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
677         (BlackBerry::WebKit::BackingStorePrivate::renderOnTimer):
678         (BlackBerry::WebKit::BackingStorePrivate::renderOnIdle):
679         (BlackBerry::WebKit::BackingStorePrivate::willFireTimer):
680         (BlackBerry::WebKit::BackingStorePrivate::renderDirectToWindow):
681         (BlackBerry::WebKit::BackingStorePrivate::render):
682         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
683         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
684         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
685         (WebKit):
686         (BlackBerry::WebKit::BackingStorePrivate::drawLayersOnCommitIfNeeded):
687         * Api/BackingStore_p.h:
688         (BackingStorePrivate):
689         (BlackBerry::WebKit::BackingStorePrivate::willDrawLayersOnCommit):
690
691 2012-03-02  Adam Treat  <atreat@rim.com>
692
693         https://bugs.webkit.org/show_bug.cgi?id=80161
694         PR: 141157
695
696         BlackBerryPlatformScreen.h API has been updated.  Reflect those
697         changes in our usage.
698
699         Reviewed by Antonio Gomes.
700         Internally reviewed by Jakob Petsovits.
701
702         * Api/BackingStore.cpp:
703         (BlackBerry::WebKit::BackingStorePrivate::tileWidth):
704         (BlackBerry::WebKit::BackingStorePrivate::tileHeight):
705         * Api/WebPage.cpp:
706         (BlackBerry::WebKit::WebPagePrivate::init):
707         (BlackBerry::WebKit::WebPagePrivate::transformedViewportSize):
708         (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize):
709         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
710         (BlackBerry::WebKit::WebPagePrivate::setDefaultLayoutSize):
711         (BlackBerry::WebKit::WebPagePrivate::defaultMaxLayoutSize):
712         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
713         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
714         * WebKitSupport/SurfacePool.cpp:
715         (BlackBerry::WebKit::createCompositingSurface):
716
717 2012-03-02  Konrad Piascik  <kpiascik@rim.com>
718
719         [BlackBerry] Set the devicePixelRatio from the results of computeViewportAttributes
720         https://bugs.webkit.org/show_bug.cgi?id=80160
721
722         Reviewed by Antonio Gomes.
723
724         Tested by going to layout test fast/viewport/viewport-95.html and viewport-93.html
725         Previously when executing window.devicePixelRatio these two pages returned 1 now
726         they report the devicePixelRatio returned by computeViewportAttributes.
727
728         * Api/WebPage.cpp:
729         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
730
731 2012-03-02  Jacky Jiang  <zhajiang@rim.com>
732
733         Fix a warning in InputHandler::learnText()
734         https://bugs.webkit.org/show_bug.cgi?id=80049
735
736         Reviewed by Antonio Gomes.
737
738         Fix a warning of the comparison "textInField.length() <=
739         MaxLearnTextDataSize" in InputHandler::learnText().
740
741         Rubber-stamped internally by Mike Fenton.
742
743         * WebKitSupport/InputHandler.cpp:
744         (BlackBerry::WebKit::InputHandler::learnText):
745
746 2012-03-01  Andy Chen  <andchen@rim.com>
747
748         [BlackBerry] Implement features for find-in-page
749         https://bugs.webkit.org/show_bug.cgi?id=79820
750
751         Reviewed by Antonio Gomes.
752
753         - Make it be able to search text around the whole page instead of single frame.
754         - Make it be able to start new search from active selection and last active match.
755
756         No new tests as this patch doesn't change behavior.
757
758         * Api/WebPage.cpp:
759         (BlackBerry::WebKit::WebPagePrivate::frameUnloaded):
760         * Api/WebPage_p.h:
761         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
762         (WebCore::FrameLoaderClientBlackBerry::dispatchWillClose):
763         (WebCore::FrameLoaderClientBlackBerry::detachedFromParent2):
764         * WebKitSupport/DOMSupport.cpp:
765         (BlackBerry::WebKit::DOMSupport::incrementFrame):
766         * WebKitSupport/DOMSupport.h:
767         * WebKitSupport/InPageSearchManager.cpp:
768         (BlackBerry::WebKit::InPageSearchManager::findNextString):
769         (BlackBerry::WebKit::InPageSearchManager::shouldSearchForText):
770         (BlackBerry::WebKit::InPageSearchManager::findAndMarkText):
771         (BlackBerry::WebKit::InPageSearchManager::setMarkerActive):
772         (BlackBerry::WebKit::InPageSearchManager::frameUnloaded):
773         * WebKitSupport/InPageSearchManager.h:
774         * WebKitSupport/InputHandler.cpp:
775         (BlackBerry::WebKit::InputHandler::frameUnloaded):
776         * WebKitSupport/InputHandler.h:
777
778 2012-03-01  Charles Wei  <charles.wei@torchmobile.com.cn>
779
780         [BlackBerry] Web Notification crashes the browser.
781         https://bugs.webkit.org/show_bug.cgi?id=79897
782
783         Reviewed by Antonio Gomes.
784
785         The reason of the crash is that it still uses the iterator
786         after been removed from the container, which invalidates the
787         iterator. 
788         We should stop processing after we have found the element
789         and removed from the container through the iterator.
790
791         This patch only fixes the crash issue, but not any notification
792         functionality issue, which is tracked seperatly.
793
794         Test case: http://sandbox.gtaero.net/chrome/notifications.php
795
796         * WebCoreSupport/NotificationPresenterImpl.cpp:
797         (WebKit::NotificationPresenterImpl::onPermission):
798         (WebKit::NotificationPresenterImpl::notificationClicked):
799
800 2012-03-01  Mike Fenton  <mifenton@rim.com>
801
802         Autocomplete attribute should apply to textarea's.
803         https://bugs.webkit.org/show_bug.cgi?id=79929
804
805         Reviewed by Antonio Gomes.
806
807         Add local static Qualified name for autocorrect attribute.
808
809         * WebKitSupport/DOMSupport.cpp:
810         (BlackBerry::WebKit::DOMSupport::elementSupportsAutocorrect):
811
812 2012-02-29  Mike Fenton  <mifenton@rim.com>
813
814         Autocomplete attribute should apply to textarea's.
815         https://bugs.webkit.org/show_bug.cgi?id=79929
816
817         Reviewed by Antonio Gomes.
818
819         Allow the autocomplete attribute to bubble back to the form setting.
820
821         Expand support to include checking autocorrect, autocomplete and
822         name/id matching to text areas.
823
824         Reviewed internally by Nima Ghanavatian and Gen Mak.
825
826         * WebKitSupport/DOMSupport.cpp:
827         (BlackBerry::WebKit::DOMSupport::elementSupportsAutocorrect):
828         (BlackBerry::WebKit::DOMSupport::elementSupportsAutocomplete):
829         (BlackBerry::WebKit::DOMSupport::elementAttributeState):
830         * WebKitSupport/DOMSupport.h:
831         * WebKitSupport/InputHandler.cpp:
832         (BlackBerry::WebKit::inputStyle):
833
834 2012-02-29  Max Feil  <mfeil@rim.com>
835
836         [BlackBerry] Add support for FLAC audio and OGG/Vorbis audio
837         https://bugs.webkit.org/show_bug.cgi?id=79519
838
839         Reviewed by Antonio Gomes.
840
841         * Api/WebSettings.cpp:
842         (BlackBerry::WebKit::mimeTypeAssociationMap):
843
844 2012-02-28  Konrad Piascik  <kpiascik@rim.com>
845
846         [BlackBerry] Change the API to use std::string
847         https://bugs.webkit.org/show_bug.cgi?id=79818
848
849         Reviewed by Antonio Gomes.
850
851         * Api/WebPage.cpp:
852         (BlackBerry::WebKit::WebPage::dispatchInspectorMessage):
853         * Api/WebPage.h:
854
855 2012-02-28  Jacky Jiang  <zhajiang@rim.com>
856
857         [BlackBerry] x86 build fix after cleaning up WebPage.cpp
858         https://bugs.webkit.org/show_bug.cgi?id=79814
859
860         Reviewed by Antonio Gomes.
861
862         x86 build fix, keep WebPage::destroyWebPageCompositor() method where it
863         was which was outside of USE(ACCELERATED_COMPOSITING).
864
865         * Api/WebPage.cpp:
866         (BlackBerry::WebKit::WebPage::destroyWebPageCompositor):
867         (WebKit):
868
869 2012-02-28  Mike Fenton  <mifenton@rim.com>
870
871         [BlackBerry] Remove unused focusedNodeChange notifications from the Chrome client.
872         https://bugs.webkit.org/show_bug.cgi?id=79794
873
874         Reviewed by Rob Buis.
875
876         Remove unused notification for focusedNodeChanged.
877
878         Internally reviewed by Gen Mak.
879
880         * Api/WebPageClient.h:
881         * WebCoreSupport/ChromeClientBlackBerry.cpp:
882         (WebCore::ChromeClientBlackBerry::focusedNodeChanged):
883
884 2012-02-27  Jacky Jiang  <zhajiang@rim.com>
885
886         [BlackBerry] Upstream BlackBerry API web page related files
887         https://bugs.webkit.org/show_bug.cgi?id=74380
888
889         Reviewed by Antonio Gomes.
890
891         Clean up WebPage.{h, cpp} and WebPage_p.h.
892         - Remove WebPage::mainFrame() as it is bad to expose WebCore::Frame in
893           the public API, adapt to the change by adding a new method
894           WebPagePrivate::core(Const WebPage*) and expose it to
895           DumpRenderTreeSupport.
896         - Rename WebPage::spellCheckingEnabled to
897           WebPage::setSpellCheckingEnabled.
898         - Remove unused WebPage::focusNodeRect().
899         - Remove extra blank lines.
900         - Put WebPage methods and their associated WebPagePrivate methods
901           together.
902
903         No new tests as this patch doesn't change behavior.
904
905         * Api/WebPage.cpp:
906         (BlackBerry::WebKit::WebPage::WebPage):
907         (WebKit):
908         (BlackBerry::WebKit::WebPage::~WebPage):
909         (BlackBerry::WebKit::WebPagePrivate::core):
910         (BlackBerry::WebKit::WebPage::load):
911         (BlackBerry::WebKit::WebPage::loadExtended):
912         (BlackBerry::WebKit::WebPage::loadFile):
913         (BlackBerry::WebKit::WebPage::download):
914         (BlackBerry::WebKit::WebPage::loadString):
915         (BlackBerry::WebKit::WebPage::executeJavaScript):
916         (BlackBerry::WebKit::WebPage::executeJavaScriptInIsolatedWorld):
917         (BlackBerry::WebKit::WebPage::stopLoading):
918         (BlackBerry::WebKit::WebPage::prepareToDestroy):
919         (BlackBerry::WebKit::WebPage::setScrollPosition):
920         (BlackBerry::WebKit::WebPage::scrollBy):
921         (BlackBerry::WebKit::WebPage::notifyInRegionScrollStatusChanged):
922         (BlackBerry::WebKit::WebPage::zoomToFitScale):
923         (BlackBerry::WebKit::WebPage::initialScale):
924         (BlackBerry::WebKit::WebPage::maximumScale):
925         (BlackBerry::WebKit::WebPage::scrollPosition):
926         (BlackBerry::WebKit::WebPage::viewportSize):
927         (BlackBerry::WebKit::WebPage::activeNodeContext):
928         (BlackBerry::WebKit::WebPage::assignFocus):
929         (BlackBerry::WebKit::WebPage::blockZoomAnimationFinished):
930         (BlackBerry::WebKit::WebPage::onInputLocaleChanged):
931         (BlackBerry::WebKit::WebPage::setScreenOrientation):
932         (BlackBerry::WebKit::WebPage::applyPendingOrientationIfNeeded):
933         (BlackBerry::WebKit::WebPage::setViewportSize):
934         (BlackBerry::WebKit::WebPage::setDefaultLayoutSize):
935         (BlackBerry::WebKit::WebPage::setScrollOriginPoint):
936         (BlackBerry::WebKit::WebPage::textEncoding):
937         (BlackBerry::WebKit::WebPage::forcedTextEncoding):
938         (BlackBerry::WebKit::WebPage::setForcedTextEncoding):
939         (BlackBerry::WebKit::WebPage::setSpellCheckingEnabled):
940         (BlackBerry::WebKit::parentLayer):
941         (BlackBerry::WebKit::WebPagePrivate::inRegionScrollableAreasForPoint):
942         (BlackBerry::WebKit::WebPage::destroyWebPageCompositor):
943         * Api/WebPage.h:
944         (WebCore):
945         (WebKit):
946         * Api/WebPage_p.h:
947         (WebCore):
948         (WebKit):
949         * WebKitSupport/DumpRenderTreeSupport.cpp:
950         (DumpRenderTreeSupport::corePage):
951         (DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests):
952         (DumpRenderTreeSupport::resetGeolocationMock):
953         (DumpRenderTreeSupport::setMockGeolocationError):
954         (DumpRenderTreeSupport::setMockGeolocationPermission):
955         (DumpRenderTreeSupport::setMockGeolocationPosition):
956         (DumpRenderTreeSupport::scalePageBy):
957         * WebKitSupport/DumpRenderTreeSupport.h:
958         (WebCore):
959         (DumpRenderTreeSupport):
960
961 2012-02-27  Mike Fenton  <mifenton@rim.com>
962
963         [BlackBerry] Selection handling should be entirely directional
964         https://bugs.webkit.org/show_bug.cgi?id=79692
965
966         Reviewed by Antonio Gomes.
967
968         Make all VisibleSelections directional.
969
970         * WebKitSupport/SelectionHandler.cpp:
971         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
972         (BlackBerry::WebKit::SelectionHandler::setSelection):
973
974 2012-02-27  Ed Baker  <edbaker@rim.com>
975
976         [BlackBerry] Dragging a selection handle outside of the content bounding box does not update the selection range correctly
977         https://bugs.webkit.org/show_bug.cgi?id=78608
978
979         Ensure that when selection handles leave the content bounding box that
980         the handle not being dragged remains fixed. Do not apply padding to a
981         direction that would cause the selection to shrink when performing the
982         handle direction detection.
983
984         Reviewed by Antonio Gomes.
985
986         * WebKitSupport/DOMSupport.cpp:
987         (BlackBerry::WebKit::DOMSupport::convertPointToFrame):
988         * WebKitSupport/DOMSupport.h:
989         * WebKitSupport/SelectionHandler.cpp:
990         (BlackBerry::WebKit::clamp):
991         (BlackBerry::WebKit::directionalVisiblePositionAtExtentOfBox):
992         (BlackBerry::WebKit::SelectionHandler::extendSelectionToFieldBoundary):
993         (BlackBerry::WebKit::SelectionHandler::setSelection):
994         (BlackBerry::WebKit::SelectionHandler::clipPointToVisibleContainer):
995         * WebKitSupport/SelectionHandler.h:
996
997 2012-02-27  Leo Yang  <leo.yang@torchmobile.com.cn>
998
999         [BlackBerry] Upstream accelerated compositing helper class
1000         https://bugs.webkit.org/show_bug.cgi?id=78448
1001
1002         Reviewed by Antonio Gomes.
1003
1004         Initial upstream, no new tests.
1005
1006         * WebKitSupport/FrameLayers.cpp: Added.
1007         * WebKitSupport/FrameLayers.h: Added.
1008
1009 2012-02-26  Hajime Morrita  <morrita@chromium.org>
1010
1011         Move ChromeClient::showContextMenu() to ContextMenuClient
1012         https://bugs.webkit.org/show_bug.cgi?id=79427
1013
1014         Reviewed by Adam Barth.
1015
1016         * WebCoreSupport/ChromeClientBlackBerry.h:
1017         (ChromeClientBlackBerry):
1018
1019 2012-02-24  Mike Fenton  <mifenton@rim.com>
1020
1021         [BlackBerry] Eliminate excessive BlackBerry::Platform use in InputHandler
1022         https://bugs.webkit.org/show_bug.cgi?id=79393
1023
1024         Reviewed by Antonio Gomes.
1025
1026         Cleanup usage of BlackBerry::Platform in InputHandler.
1027
1028         * WebKitSupport/InputHandler.cpp:
1029         (BlackBerry::WebKit::convertStringToWchar):
1030         (BlackBerry::WebKit::convertStringToWcharVector):
1031         (BlackBerry::WebKit::convertSpannableStringToString):
1032         (BlackBerry::WebKit::InputHandler::learnText):
1033         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
1034         (BlackBerry::WebKit::InputHandler::shouldAcceptInputFocus):
1035         (BlackBerry::WebKit::InputHandler::setElementFocused):
1036         (BlackBerry::WebKit::InputHandler::nodeTextChanged):
1037         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
1038         (BlackBerry::WebKit::InputHandler::frameUnloaded):
1039         (BlackBerry::WebKit::InputHandler::selectionChanged):
1040         (BlackBerry::WebKit::InputHandler::setSelection):
1041         (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
1042         (BlackBerry::WebKit::InputHandler::deleteTextRelativeToCursor):
1043         (BlackBerry::WebKit::InputHandler::deleteText):
1044         (BlackBerry::WebKit::InputHandler::spannableTextInRange):
1045         (BlackBerry::WebKit::InputHandler::setComposingRegion):
1046         (BlackBerry::WebKit::InputHandler::finishComposition):
1047         (BlackBerry::WebKit::InputHandler::setText):
1048         (BlackBerry::WebKit::InputHandler::setTextAttributes):
1049         (BlackBerry::WebKit::InputHandler::setRelativeCursorPosition):
1050         (BlackBerry::WebKit::InputHandler::setSpannableTextAndRelativeCursor):
1051         (BlackBerry::WebKit::InputHandler::setComposingText):
1052         (BlackBerry::WebKit::InputHandler::commitText):
1053
1054 2012-02-24  Mike Fenton  <mifenton@rim.com>
1055
1056         [BlackBerry] Eliminate excessive BlackBerry::Platform use in SelectionHandler.
1057         https://bugs.webkit.org/show_bug.cgi?id=79391
1058
1059         Reviewed by Antonio Gomes.
1060
1061         Clean up usage of BlackBerry::Platform in SelectionHandler and
1062         explicitly define what namespace to use for ambiguous objects like
1063         IntRect and IntPoint.
1064
1065         * WebKitSupport/SelectionHandler.cpp:
1066         (BlackBerry::WebKit::SelectionHandler::cancelSelection):
1067         (BlackBerry::WebKit::SelectionHandler::getConsolidatedRegionOfTextQuadsForSelection):
1068         (BlackBerry::WebKit::visiblePositionForPointIgnoringClipping):
1069         (BlackBerry::WebKit::directionOfPointRelativeToRect):
1070         (BlackBerry::WebKit::SelectionHandler::shouldUpdateSelectionOrCaretForPoint):
1071         (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
1072         (BlackBerry::WebKit::directionalVisiblePositionAtExtentOfBox):
1073         (BlackBerry::WebKit::pointIsOutsideOfBoundingBoxInDirection):
1074         (BlackBerry::WebKit::SelectionHandler::extendSelectionToFieldBoundary):
1075         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
1076         (BlackBerry::WebKit::SelectionHandler::clipPointToFocusNode):
1077         (BlackBerry::WebKit::SelectionHandler::setSelection):
1078         (BlackBerry::WebKit::SelectionHandler::selectAtPoint):
1079         (BlackBerry::WebKit::SelectionHandler::selectObject):
1080         (BlackBerry::WebKit::comparePointsToReferencePoint):
1081         (BlackBerry::WebKit::minXMinYCorner):
1082         (BlackBerry::WebKit::maxXMinYCorner):
1083         (BlackBerry::WebKit::minXMaxYCorner):
1084         (BlackBerry::WebKit::maxXMaxYCorner):
1085         (BlackBerry::WebKit::caretLocationForRect):
1086         (BlackBerry::WebKit::caretComparisonPointForRect):
1087         (BlackBerry::WebKit::adjustCaretRects):
1088         (BlackBerry::WebKit::SelectionHandler::clipRegionToVisibleContainer):
1089         (BlackBerry::WebKit::referencePoint):
1090         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
1091         (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
1092         (BlackBerry::WebKit::SelectionHandler::selectionContains):
1093
1094 2012-02-24  Shinya Kawanaka  <shinyak@chromium.org>
1095
1096         SpellCheckRequest needs to know the context where the spellcheck happened.
1097         https://bugs.webkit.org/show_bug.cgi?id=79320
1098
1099         Reviewed by Hajime Morita.
1100
1101         * WebCoreSupport/EditorClientBlackBerry.cpp:
1102         (WebCore::EditorClientBlackBerry::requestCheckingOfString):
1103         * WebCoreSupport/EditorClientBlackBerry.h:
1104         (EditorClientBlackBerry):
1105
1106 2012-02-24  Charles Wei  <charles.wei@torchmobile.com.cn>
1107
1108         [BlackBerry] Anchor mailto: with target set won't launch Messaging application when clicked
1109         https://bugs.webkit.org/show_bug.cgi?id=79318
1110
1111         Need to give the client a chance to decide how to handle the new window request.
1112
1113         Reviewed by Rob Buis.
1114
1115         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1116         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNewWindowAction):
1117
1118 2012-02-23  Mike Fenton  <mifenton@rim.com>
1119
1120         [BlackBerry] Selection handler has compile failure with logs enabled.
1121         https://bugs.webkit.org/show_bug.cgi?id=79392
1122
1123         Reviewed by Antonio Gomes.
1124
1125         Build Fix.  Update log to avoid usage of toString which was removed.
1126
1127         * WebKitSupport/SelectionHandler.cpp:
1128         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
1129
1130 2012-02-19  Antonio Gomes  <agomes@rim.com>
1131
1132         Fat fingers - Add a clearer way to distinguish the node we want (shadow or non-shadow)
1133         https://bugs.webkit.org/show_bug.cgi?id=79256
1134         PR #127814 / MKS_2587410
1135
1136         Reviewed by Rob Buis.
1137
1138         Patch adds a cleaner way for call sites of FatFingersResult to
1139         query for the appropriated target node: shadow or non-shadow DOM nodes.
1140
1141         It also renames FatFingersResults::validNode to ::node, assuming
1142         that "invalid" nodes are not applicable in any context.
1143
1144         * Api/WebPage.cpp:
1145         (BlackBerry::WebKit::WebPagePrivate::clearDocumentData):
1146         (BlackBerry::WebKit::WebPagePrivate::contextNode):
1147         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
1148         * WebKitSupport/FatFingers.h:
1149         (FatFingersResult):
1150         (BlackBerry::WebKit::FatFingersResult::node):
1151         (BlackBerry::WebKit::FatFingersResult::nodeAsElementIfApplicable):
1152         * WebKitSupport/SelectionHandler.cpp:
1153         (BlackBerry::WebKit::SelectionHandler::selectAtPoint):
1154         * WebKitSupport/TouchEventHandler.cpp:
1155         (BlackBerry::WebKit::TouchEventHandler::touchHoldEvent):
1156         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
1157
1158 2012-02-23  Jacky Jiang  <zhajiang@rim.com>
1159
1160         [BlackBerry] Upstream BlackBerry API web page related files
1161         https://bugs.webkit.org/show_bug.cgi?id=74380
1162
1163         Reviewed by Antonio Gomes.
1164
1165         Initial upstream, no new tests.
1166
1167         * Api/WebPage.cpp: Added.
1168         * Api/WebPage.h: Added.
1169         * Api/WebPage_p.h: Added.
1170
1171 2012-02-23  Leo Yang  <leo.yang@torchmobile.com.cn>
1172
1173         [BlackBerry] Remove unused ChromeClientBlackBerry::platformCompositingWindow(), platformWindow() and WebPageClient::compositingWindow()
1174         https://bugs.webkit.org/show_bug.cgi?id=78681
1175
1176         Reviewed by Antonio Gomes.
1177
1178         * Api/WebPageClient.h:
1179         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1180         (WebCore):
1181         * WebCoreSupport/ChromeClientBlackBerry.h:
1182         (ChromeClientBlackBerry):
1183
1184 2012-02-23  Leo Yang  <leo.yang@torchmobile.com.cn>
1185
1186         [BlackBerry] Upstream GLES2Context.{h, cpp}
1187         https://bugs.webkit.org/show_bug.cgi?id=79196
1188
1189         Reviewed by Rob Buis.
1190
1191         Initial upstream, no new tests.
1192
1193         * WebKitSupport/GLES2Context.cpp: Added.
1194         * WebKitSupport/GLES2Context.h: Added.
1195
1196 2012-02-23  Mike Fenton  <mifenton@rim.com>
1197
1198         [BlackBerry] InputHandler requires cleanup of Navigation Mode handling.
1199         https://bugs.webkit.org/show_bug.cgi?id=79366
1200
1201         Reviewed by Rob Buis.
1202
1203         Cleanup InputHandler navigation based code.
1204
1205         1) Remove the concept of NavigationMode and replace it
1206            with simple showKeyboard calls.
1207
1208         2) Remove navigation move events and replace with standard
1209            key events.
1210
1211         3) Standardize function/variable names and remove obsolete
1212            functions.
1213
1214         * Api/WebPageClient.h:
1215         * WebKitSupport/InputHandler.cpp:
1216         (BlackBerry::WebKit::InputHandler::InputHandler):
1217         (BlackBerry::WebKit::InputHandler::nodeFocused):
1218         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
1219         (BlackBerry::WebKit::InputHandler::setElementFocused):
1220         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
1221         (BlackBerry::WebKit::InputHandler::setDelayKeyboardVisibilityChange):
1222         (BlackBerry::WebKit::InputHandler::processPendingKeyboardVisibilityChange):
1223         (BlackBerry::WebKit::InputHandler::notifyClientOfKeyboardVisibilityChange):
1224         * WebKitSupport/InputHandler.h:
1225         (InputHandler):
1226         * WebKitSupport/SelectionHandler.cpp:
1227         (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
1228         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
1229         * WebKitSupport/TouchEventHandler.cpp:
1230         (BlackBerry::WebKit::TouchEventHandler::touchEventCancel):
1231         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
1232
1233 2012-02-21  Ryosuke Niwa  <rniwa@webkit.org>
1234
1235         Remove the remaining uses of CSSStyleDeclaration in Editor
1236         https://bugs.webkit.org/show_bug.cgi?id=78939
1237
1238         Reviewed by Enrica Casucci.
1239
1240         * WebCoreSupport/EditorClientBlackBerry.cpp:
1241         (WebCore::EditorClientBlackBerry::shouldApplyStyle):
1242         * WebCoreSupport/EditorClientBlackBerry.h:
1243         (EditorClientBlackBerry):
1244
1245 2012-02-22  Mike Fenton  <mifenton@rim.com>
1246
1247         [BlackBerry] InputHandler has signed vs unsigned comparison.
1248         https://bugs.webkit.org/show_bug.cgi?id=79261
1249
1250         Fix warning by casting the unsigned int to an int.
1251
1252         Reviewed by Rob Buis.
1253
1254         * WebKitSupport/InputHandler.cpp:
1255         (BlackBerry::WebKit::InputHandler::rectForCaret):
1256
1257 2012-02-22  Ryosuke Niwa  <rniwa@webkit.org>
1258
1259         Remove the remaining uses of CSSStyleDeclaration in Editor
1260         https://bugs.webkit.org/show_bug.cgi?id=78939
1261
1262         Reviewed by Enrica Casucci.
1263
1264         * WebCoreSupport/EditorClientBlackBerry.cpp:
1265         (WebCore::EditorClientBlackBerry::shouldApplyStyle):
1266         * WebCoreSupport/EditorClientBlackBerry.h:
1267         (EditorClientBlackBerry):
1268
1269 2012-02-18  Antonio Gomes  <agomes@rim.com>
1270
1271         Fat fingers - cache the first rect-based hit test so we do not need to do it again
1272         https://bugs.webkit.org/show_bug.cgi?id=79115
1273
1274         Reviewed by Adam Treat.
1275
1276         Our FatFingers implementation runs currently in two phases:
1277         the first checks for the elements intrinsically clickable;
1278         the second checks for elements made clickable by the page
1279         (for example, a div with a onclick event listener attached to it).
1280         For each phase, we perform a rect hittest, which is not needed since
1281         the result of each is the same.
1282
1283         Patch introduces a caching mechanism so we avoid on rect hittest:
1284         when the first phase runs, it caches each nodeset per document in
1285         a hashmap. This second phase works with the cached results.
1286
1287         No behavioral change, but performance is better since we
1288         avoid one (possibly expensive) rect hittest.
1289
1290         I measured the performance gain on https://www.kvd.se/, and we
1291         save up to 0.04 seconds, by caching and re-using the results.
1292
1293         * WebKitSupport/FatFingers.cpp:
1294         (BlackBerry::WebKit::dumpHitTestResult):
1295         (BlackBerry::WebKit::FatFingers::findBestPoint):
1296         (BlackBerry::WebKit::FatFingers::findIntersectingRegions):
1297         (BlackBerry::WebKit::FatFingers::cachingStrategy):
1298         (WebKit):
1299         (BlackBerry::WebKit::FatFingers::getNodesFromRect):
1300         * WebKitSupport/FatFingers.h:
1301
1302 2012-02-20  Antonio Gomes  <agomes@rim.com>
1303
1304         All default video/audio control elements should be rect-hit testable (Part II)
1305         PR #139518 / MKS_3005538
1306
1307         Reviewed by George Staikos.
1308
1309         Add HTMLInputElement::isMediaControlElement as a criteria
1310         to consider a element as clickable.
1311
1312         Note that is should be only used while in the "ClickableByDefault"
1313         phase of FatFingers.
1314
1315         * WebKitSupport/FatFingers.cpp:
1316         (BlackBerry::WebKit::FatFingers::isElementClickable):
1317
1318 2012-02-16  Antonio Gomes  <agomes@rim.com>
1319
1320         [BlackBerry] Implemented a way to defer client navigation change client notifications
1321         https://bugs.webkit.org/show_bug.cgi?id=78848
1322
1323         Reviewed by Rob Buis.
1324
1325         Currently we postpone touch_down till touch_up if user touches
1326         the screen and an input field has the WebKit focus. This is done
1327         so we can scroll the page without hidding the vkb needlessly.
1328
1329         However, it breaks the conversion of touch to mouse events
1330         if an input field has the focus in the following scenario:
1331         an <input type=text> is focused and an user grab and-drag
1332         a <input type=range> knob/slide. It does not work until the
1333         user unfocuses the currently focused edit field.
1334
1335         Patch introduces a way to unfocus a currently focused input field,
1336         without requesting the client to show or hide the virtual keyboard
1337         right way. Instead it gets a delayed notification of the vkb mode requested
1338         at either touch_released/mouse_up or touch_cancel time.
1339
1340         For now, due to content side issues with major web sites,
1341         only delay navigation mode notification changes if we are not dealing with
1342         input modes.
1343
1344         * WebKitSupport/InputHandler.cpp:
1345         (BlackBerry::WebKit::InputHandler::InputHandler):
1346         (BlackBerry::WebKit::InputHandler::nodeFocused):
1347         (BlackBerry::WebKit::InputHandler::setElementFocused):
1348         (BlackBerry::WebKit::InputHandler::setNavigationMode):
1349         (WebKit):
1350         (BlackBerry::WebKit::InputHandler::setDelayClientNotificationOfNavigationModeChange):
1351         (BlackBerry::WebKit::InputHandler::processPendingClientNavigationModeChangeNotification):
1352         (BlackBerry::WebKit::InputHandler::notifyClientOfNavigationModeChange):
1353         (BlackBerry::WebKit::InputHandler::willOpenPopupForNode):
1354         (BlackBerry::WebKit::InputHandler::setPopupListIndexes):
1355         (BlackBerry::WebKit::InputHandler::spannableTextInRange):
1356         (BlackBerry::WebKit::InputHandler::removeComposedText):
1357         (BlackBerry::WebKit::InputHandler::firstSpanInString):
1358         (BlackBerry::WebKit::InputHandler::setText):
1359         (BlackBerry::WebKit::InputHandler::setRelativeCursorPosition):
1360         * WebKitSupport/InputHandler.h:
1361         (InputHandler):
1362
1363 2012-02-16  Antonio Gomes  <agomes@rim.com>
1364
1365         Crash @WebPagePrivate::enqueueRenderingOfClippedContentOfScrollableNodeAfterInRegionScrolling MKS_2986818
1366         https://bugs.webkit.org/show_bug.cgi?id=78845
1367
1368         Reviewed by Rob Buis.
1369
1370         We were trying to operate on a cached Node when its page/frame/document
1371         were gone to PageCache already. To avoid such problems, lets clean up
1372         any document data we have cached when the Frame goes into the cache.
1373
1374         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1375         (WebCore::FrameLoaderClientBlackBerry::didSaveToPageCache):
1376         (WebCore):
1377         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
1378         (FrameLoaderClientBlackBerry):
1379
1380 2012-02-16  Antonio Gomes  <agomes@rim.com>
1381
1382         [BlackBerry] Upstream touch handling related classes
1383         https://bugs.webkit.org/show_bug.cgi?id=78509
1384
1385         Reviewed by Adam Treat and Rob Buis.
1386
1387         FatFingers is the class responsible to the whole touch
1388         accuracy of the BlackBerry port. Initial upstream.
1389
1390         * WebKitSupport/FatFingers.cpp: Added.
1391         (WebKit):
1392         (BlackBerry::WebKit::FatFingers::fingerRectForPoint):
1393         (BlackBerry::WebKit::hasMousePressListener):
1394         (BlackBerry::WebKit::FatFingers::isElementClickable):
1395         (BlackBerry::WebKit::isFieldWithText):
1396         (BlackBerry::WebKit::distanceBetweenPoints):
1397         (BlackBerry::WebKit::compareDistanceBetweenPoints):
1398         (BlackBerry::WebKit::isValidFrameOwner):
1399         (BlackBerry::WebKit::FatFingers::FatFingers):
1400         (BlackBerry::WebKit::FatFingers::~FatFingers):
1401         (BlackBerry::WebKit::FatFingers::findBestPoint):
1402         (BlackBerry::WebKit::FatFingers::checkFingerIntersection):
1403         (BlackBerry::WebKit::FatFingers::findIntersectingRegions):
1404         (BlackBerry::WebKit::FatFingers::checkForClickableElement):
1405         (BlackBerry::WebKit::FatFingers::checkForText):
1406         (BlackBerry::WebKit::FatFingers::getPaddings):
1407         (BlackBerry::WebKit::FatFingers::nodesFromRect):
1408         (BlackBerry::WebKit::FatFingers::getRelevantInfoFromPoint):
1409         (BlackBerry::WebKit::FatFingers::setSuccessfulFatFingersResult):
1410         * WebKitSupport/FatFingers.h: Added.
1411         (WebCore):
1412         (WebKit):
1413         (FatFingersResult):
1414         (BlackBerry::WebKit::FatFingersResult::FatFingersResult):
1415         (BlackBerry::WebKit::FatFingersResult::reset):
1416         (BlackBerry::WebKit::FatFingersResult::originPosition):
1417         (BlackBerry::WebKit::FatFingersResult::adjustedPosition):
1418         (BlackBerry::WebKit::FatFingersResult::positionWasAdjusted):
1419         (BlackBerry::WebKit::FatFingersResult::isTextInput):
1420         (BlackBerry::WebKit::FatFingersResult::isValid):
1421         (BlackBerry::WebKit::FatFingersResult::validNode):
1422         (BlackBerry::WebKit::FatFingersResult::nodeAsElementIfApplicable):
1423         (FatFingers):
1424
1425 2012-02-16  Antonio Gomes  <agomes@rim.com>
1426
1427         [BlackBerry] Upstream touch handling related classes
1428         https://bugs.webkit.org/show_bug.cgi?id=78509
1429
1430         Reviewed by Adam Treat.
1431
1432         Initial upstream of the Blackberry specific single touch event
1433         handler class.
1434
1435         * blackberry/WebKitSupport/TouchEventHandler.cpp: Added.
1436         (WebKit):
1437         (BlackBerry::WebKit::hasMouseMoveListener):
1438         (BlackBerry::WebKit::hasTouchListener):
1439         (BlackBerry::WebKit::elementExpectsMouseEvents):
1440         (BlackBerry::WebKit::shouldConvertTouchToMouse):
1441         (BlackBerry::WebKit::TouchEventHandler::TouchEventHandler):
1442         (BlackBerry::WebKit::TouchEventHandler::~TouchEventHandler):
1443         (BlackBerry::WebKit::TouchEventHandler::shouldSuppressMouseDownOnTouchDown):
1444         [BlackBerry] Upstream touch handling related classes
1445         https://bugs.webkit.org/show_bug.cgi?id=78509
1446
1447         Reviewed by Rob Buis.
1448
1449         InRegionScrollableArea specializes the BlackBerry specific ScrollViewBase,
1450         working as a read-only wrapper object for a scrollable areas in the page.
1451         It is used in our client side to control in-region scrolling (scrollable boxes,
1452         inner frames, etc).
1453
1454         Initial upstream.
1455
1456         * WebKitSupport/InRegionScrollableArea.cpp: Added.
1457         (WebKit):
1458         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
1459         (BlackBerry::WebKit::InRegionScrollableArea::calculateMinimumScrollPosition):
1460         (BlackBerry::WebKit::InRegionScrollableArea::calculateMaximumScrollPosition):
1461         (BlackBerry::WebKit::InRegionScrollableArea::layer):
1462         (BlackBerry):
1463         * WebKitSupport/InRegionScrollableArea.h: Added.
1464         (WebCore):
1465         (WebKit):
1466         (InRegionScrollableArea):
1467
1468 2012-02-16  Antonio Gomes  <agomes@rim.com>
1469
1470         (BlackBerry::WebKit::TouchEventHandler::touchEventCancel):
1471         (BlackBerry::WebKit::TouchEventHandler::touchHoldEvent):
1472         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
1473         (BlackBerry::WebKit::TouchEventHandler::spellCheck):
1474         (BlackBerry::WebKit::TouchEventHandler::handleFatFingerPressed):
1475         (BlackBerry::WebKit::elementForTapHighlight):
1476         (BlackBerry::WebKit::TouchEventHandler::drawTapHighlight):
1477         * blackberry/WebKitSupport/TouchEventHandler.h: Added.
1478         (WebCore):
1479         (WebKit):
1480         (TouchEventHandler):
1481         (BlackBerry::WebKit::TouchEventHandler::lastFatFingersResult):
1482         (BlackBerry::WebKit::TouchEventHandler::resetLastFatFingersResult):
1483