8950d4e85862eecab06380bcc4f4c2d86a081a0a
[WebKit-https.git] / Source / WebKit / blackberry / ChangeLog
1 2012-11-26  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2
3         [BlackBerry] Should not autofill username and password when there're more than one password inputs on the same page
4         https://bugs.webkit.org/show_bug.cgi?id=103104
5
6         Reviewed by Rob Buis.
7
8         RIM PR: 245334
9         Added the oldPassword detection back into the password input
10         detection logic, which was removed for simplicity when imported
11         those pieces of codes from Chromium. And we won't do autofill
12         when there're more than one password field detected.
13
14         Internally reviewed by Rob Buis.
15
16         * WebCoreSupport/CredentialTransformData.cpp:
17         (WebCore::CredentialTransformData::CredentialTransformData):
18         (WebCore::CredentialTransformData::findPasswordFormFields):
19         * WebCoreSupport/CredentialTransformData.h:
20         (CredentialTransformData):
21         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
22         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendSubmitEvent):
23
24 2012-11-25  Jacky Jiang  <zhajiang@rim.com>
25
26         [BlackBerry] Get rid of resetBitmapZoomScale()
27         https://bugs.webkit.org/show_bug.cgi?id=103200
28
29         Reviewed by Rob Buis.
30         Internally reviewed by Gen Mak.
31
32         PR: 235707
33         Right now, resetBitmapZoomScale() takes an unused paramter and
34         dispatches a message to end the bitmap zooming. However, the
35         interaction has its own state machine to start bitmap zooming when it
36         is active and end bitmap zooming when it is inactive. This is
37         expecially for pinch zoom and scroll. From WebKit side, block zoom
38         which will call zoomBlock when the bitmap zoom finished doesn't even
39         need to dispatch the useless ending message to ZoomHandler.
40         resetBitmapZoomScale() is basically a noop for block zoom. And likewise
41         that is useless for zoomToInitialScaleOnLoad(). It can also potentially
42         cause problem if it is used somewhere else in the future and
43         incidentally breaks the interaction's own state machine. So just remove
44         this completely.
45
46         * Api/WebPage.cpp:
47         (BlackBerry::WebKit::WebPagePrivate::zoomToInitialScaleOnLoad):
48         (BlackBerry::WebKit::WebPagePrivate::zoomBlock):
49         * Api/WebPageClient.h:
50
51 2012-11-24  Andy Chen  <andchen@rim.com>
52
53         [BlackBerry] Find-on-page keeps stale pointer
54         https://bugs.webkit.org/show_bug.cgi?id=103190
55
56         Reviewed by Rob Buis.
57
58         Find on page: pendingScopingEffort stores stale pointer when frames unload,
59         we need to cancel those scoping efforts.
60         PR 250807.
61
62         Internally reviewed by Yongxin Dai and Mike Fenton.
63
64         * WebKitSupport/InPageSearchManager.cpp:
65         (InPageSearchManager::DeferredScopeStringMatches):
66         (BlackBerry::WebKit::InPageSearchManager::frameUnloaded):
67
68 2012-11-24  Genevieve Mak  <gmak@rim.com>
69
70         [BlackBerry] Text not selected when input field focused.
71         https://bugs.webkit.org/show_bug.cgi?id=103182
72
73         Reviewed by George Staikos.
74
75         Reviewed Internally by: Mike Fenton, Eli Fidler
76         PR #250163
77
78         * WebKitSupport/SelectionHandler.cpp:
79         (BlackBerry::WebKit::SelectionHandler::selectObject):
80
81 2012-11-23  Nima Ghanavatian  <nghanavatian@rim.com>
82
83         [BlackBerry] Define platform limitations in platform layer
84         https://bugs.webkit.org/show_bug.cgi?id=103160
85
86         Reviewed by Rob Buis.
87
88         Taking length as const unsigned in checkSpellingOfStringAsync.
89         This value is unchanging and should never be less than 0, even
90         in an error case.
91
92         Internally reviewed by Mike Fenton.
93
94         * Api/WebPageClient.h:
95         * WebKitSupport/InputHandler.cpp:
96         (BlackBerry::WebKit::InputHandler::requestCheckingOfString):
97
98 2012-11-23  Jacky Jiang  <zhajiang@rim.com>
99
100         [BlackBerry] Meta viewport can't be changed dynamically
101         https://bugs.webkit.org/show_bug.cgi?id=103098
102
103         Reviewed by Rob Buis.
104         Internally reviewed by Arvid Nilsson.
105
106         PR: 237072
107         Reset m_userPerformedManualZoom and enable
108         m_shouldZoomToInitialScaleAfterLoadFinished so that we can relayout the
109         page and zoom it to fit the screen when we dynamically change the meta
110         viewport after the load is finished.
111
112         * Api/WebPage.cpp:
113         (BlackBerry::WebKit::WebPagePrivate::dispatchViewportPropertiesDidChange):
114
115 2012-11-23  Genevieve Mak  <gmak@rim.com>
116
117         [BlackBerry] Drop Synchronous Mouse Events
118         https://bugs.webkit.org/show_bug.cgi?id=102980
119
120         Reviewed by Rob Buis.
121
122         Reviewed Internally by George Staikos and Mike Lattanzio.
123         Don't send actual Touch Events to fullscreen plugins unless
124         its a Touch Cancel, DoubleTap or TouchHold.
125         Instead send mouse events as long as its a single finger.
126         PR #242781
127
128         * Api/WebPage.cpp:
129         (BlackBerry::WebKit::WebPage::touchPointAsMouseEvent):
130         (BlackBerry::WebKit::WebPagePrivate::dispatchTouchEventToFullScreenPlugin):
131         (WebKit):
132         (BlackBerry::WebKit::WebPagePrivate::dispatchTouchPointAsMouseEventToFullScreenPlugin):
133
134 2012-11-23  Andrew Lo  <anlo@rim.com>
135
136         [BlackBerry] InputHandler::ensureFocusTextElementVisible incorrectly used y coordinate as x coordinate
137         https://bugs.webkit.org/show_bug.cgi?id=103091
138
139         Reviewed by Yong Li.
140
141         Internally reviewed by Mike Fenton.
142         Internal PR249523
143         Incorrectly used y coordinate as x coordinate in
144         InputHandler::ensureFocusTextElementVisible.
145
146         * WebKitSupport/InputHandler.cpp:
147         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
148
149 2012-11-22  Jeff Rogers  <jrogers@rim.com>
150
151         [BlackBerry] Update Web Notifications Implementation
152         https://bugs.webkit.org/show_bug.cgi?id=102621
153
154         Reviewed by George Staikos.
155
156         Reviewed internally by George Staikos and Joe Mason
157         Internal PR 172120
158         Add new notifications implementation for the BlackBerry port. Rename
159         existing class to match Client naming. Adds NotificationManager
160         implementation for managing notifications and permissions, and logic
161         for passing the notifications to the platform provider.
162
163         * Api/WebPage.cpp:
164         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
165         (BlackBerry::WebKit::WebPagePrivate::init):
166         (BlackBerry::WebKit::WebPage::updateNotificationPermission):
167         (WebKit):
168         (BlackBerry::WebKit::WebPage::notificationClicked):
169         (BlackBerry::WebKit::WebPage::notificationClosed):
170         (BlackBerry::WebKit::WebPage::notificationError):
171         (BlackBerry::WebKit::WebPage::notificationShown):
172         * Api/WebPage.h:
173         * Api/WebPageClient.h:
174         * Api/WebPage_p.h:
175         (WebPagePrivate):
176         (BlackBerry::WebKit::WebPagePrivate::notificationManager):
177         * WebCoreSupport/NotificationClientBlackBerry.cpp: Added.
178         (WebCore):
179         (WebCore::NotificationClientBlackBerry::NotificationClientBlackBerry):
180         (WebCore::NotificationClientBlackBerry::show):
181         (WebCore::NotificationClientBlackBerry::cancel):
182         (WebCore::NotificationClientBlackBerry::clearNotifications):
183         (WebCore::NotificationClientBlackBerry::notificationObjectDestroyed):
184         (WebCore::NotificationClientBlackBerry::notificationControllerDestroyed):
185         (WebCore::NotificationClientBlackBerry::requestPermission):
186         (WebCore::NotificationClientBlackBerry::cancelRequestsForPermission):
187         (WebCore::NotificationClientBlackBerry::checkPermission):
188         * WebCoreSupport/NotificationClientBlackBerry.h: Added.
189         (WebKit):
190         (WebCore):
191         (NotificationClientBlackBerry):
192         * WebCoreSupport/NotificationPresenterImpl.cpp: Removed.
193         * WebCoreSupport/NotificationPresenterImpl.h: Removed.
194         * WebKitSupport/NotificationManager.cpp: Added.
195         (WebKit):
196         (BlackBerry::WebKit::NotificationManager::NotificationManager):
197         (BlackBerry::WebKit::NotificationManager::~NotificationManager):
198         (BlackBerry::WebKit::NotificationManager::show):
199         (BlackBerry::WebKit::NotificationManager::cancel):
200         (BlackBerry::WebKit::NotificationManager::clearNotifications):
201         (BlackBerry::WebKit::NotificationManager::notificationObjectDestroyed):
202         (BlackBerry::WebKit::NotificationManager::requestPermission):
203         (BlackBerry::WebKit::NotificationManager::cancelRequestsForPermission):
204         (BlackBerry::WebKit::NotificationManager::checkPermission):
205         (BlackBerry::WebKit::NotificationManager::updatePermission):
206         (BlackBerry::WebKit::NotificationManager::notificationClicked):
207         (BlackBerry::WebKit::NotificationManager::notificationClosed):
208         (BlackBerry::WebKit::NotificationManager::notificationError):
209         (BlackBerry::WebKit::NotificationManager::notificationShown):
210         (BlackBerry::WebKit::NotificationManager::removeNotificationFromContextMap):
211         * WebKitSupport/NotificationManager.h: Added.
212         (WebKit):
213         (NotificationManager):
214
215 2012-11-22  Mike Fenton  <mifenton@rim.com>
216
217         [BlackBerry] Guard against a lost focusedNode that input handler isn't yet informed of.
218         https://bugs.webkit.org/show_bug.cgi?id=103071
219
220         Reviewed by Rob Buis.
221
222         Fix potential for a crash if input mode is active but
223         we can't get a focusedNode.
224
225         Reviewed Internally by Gen Mak.
226
227         * WebKitSupport/SelectionHandler.cpp:
228         (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
229
230 2012-11-21  Genevieve Mak  <gmak@rim.com>
231
232         [BlackBerry] Drop Synchronous Mouse Events
233         https://bugs.webkit.org/show_bug.cgi?id=102980
234
235         Reviewed by Rob Buis.
236
237         Reviewed Internally by George Staikos, Mike Lattanzio and Mike Fenton.
238         Get rid of unneeded methods and simplify code.
239         Send click if getting context over an empty text field
240         so that it will be focused and have a caret.
241         PR #242781
242
243         * Api/WebPage.cpp:
244         (BlackBerry::WebKit::WebPagePrivate::webContext):
245         (BlackBerry::WebKit::WebPage::touchEvent):
246         (BlackBerry::WebKit::WebPage::touchPointAsMouseEvent):
247         (BlackBerry::WebKit::WebPage::touchEventCancel):
248         * Api/WebPage.h:
249         * WebKitSupport/TouchEventHandler.cpp:
250         (BlackBerry::WebKit::TouchEventHandler::TouchEventHandler):
251         (BlackBerry::WebKit::TouchEventHandler::doFatFingers):
252         (BlackBerry::WebKit::TouchEventHandler::sendClickAtFatFingersPoint):
253         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
254         (BlackBerry::WebKit::TouchEventHandler::handleFatFingerPressed):
255         * WebKitSupport/TouchEventHandler.h:
256         (TouchEventHandler):
257
258 2012-11-21  Konrad Piascik  <kpiascik@rim.com>
259
260         [BlackBerry] Prevent screen from dimming on device when inspector front-end is connected
261         https://bugs.webkit.org/show_bug.cgi?id=102978
262
263         Reviewed by Rob Buis.
264
265         Internal PR 200848
266         We prevent screen from going dim when the front-end is connected and return to normal when
267         the front-end disconnects.
268
269         * Api/WebPage.cpp:
270         (BlackBerry::WebKit::WebPage::enableWebInspector):
271         (BlackBerry::WebKit::WebPage::disableWebInspector):
272
273 2012-11-21  Konrad Piascik  <kpiascik@rim.com>
274
275         [BlackBerry] Don't add empty rects to the tap highlight region.
276         https://bugs.webkit.org/show_bug.cgi?id=102966
277
278         Reviewed by George Staikos.
279
280         Internal PR 246960
281         Tap highlight is way too large sometimes.
282         When we add an empty rect it inflates by 2 and causes the tap region to extend to the origin.
283
284         * WebKitSupport/TouchEventHandler.cpp:
285         (BlackBerry::WebKit::TouchEventHandler::drawTapHighlight):
286
287 2012-11-21  Mike Fenton  <mifenton@rim.com>
288
289         [BlackBerry] Switch to point instead of VisiblePosition comparison for input bounds check
290         https://bugs.webkit.org/show_bug.cgi?id=102962
291
292         Reviewed by Rob Buis.
293
294         PR 247270.
295
296         Switch from using VisiblePosition to determine if we are in a node
297         to a comparison of the field bounds.  This fixes the case where
298         there is no node before the target node to match.
299
300         Reviewed Internally by Gen Mak.
301
302         * WebKitSupport/DOMSupport.cpp:
303         * WebKitSupport/DOMSupport.h:
304         * WebKitSupport/SelectionHandler.cpp:
305         (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
306
307 2012-11-20  Andrew Lo  <anlo@rim.com>
308
309         [BlackBerry] Animated gifs pause on scroll or zoom and sometimes don't resume after scroll or zoom completes
310         https://bugs.webkit.org/show_bug.cgi?id=102838
311
312         Reviewed by Rob Buis.
313
314         Internally reviewed by Adam Treat.
315         Internal PR244646
316         When entering scrolling & zooming, we suspend regular render jobs
317         in order to pause animations. When finishing scrolling or zooming,
318         dispatch a render job in order to resume those animations.
319
320         If an animation requests a repaint while the backing store is suspended,
321         add the regular render job to the render queue so that it can be
322         processed later.
323
324         * Api/BackingStore.cpp:
325         (BlackBerry::WebKit::BackingStorePrivate::repaint):
326         (BlackBerry::WebKit::BackingStorePrivate::setScrollingOrZooming):
327
328 2012-11-20  Sheriff Bot  <webkit.review.bot@gmail.com>
329
330         Unreviewed, rolling out r135295.
331         http://trac.webkit.org/changeset/135295
332         https://bugs.webkit.org/show_bug.cgi?id=102834
333
334         This patch causes assertion to some layout tests on chromium
335         (Requested by jianli on #webkit).
336
337         * Api/WebPage.cpp:
338         (BlackBerry::WebKit::WebPagePrivate::load):
339         (BlackBerry::WebKit::WebPagePrivate::loadString):
340         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
341         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad):
342
343 2012-11-20  James Simonsen  <simonjam@chromium.org>
344
345         Consolidate FrameLoader::load() into one function taking a FrameLoadRequest
346         https://bugs.webkit.org/show_bug.cgi?id=102151
347
348         Reviewed by Adam Barth.
349
350         * Api/WebPage.cpp:
351         (BlackBerry::WebKit::WebPagePrivate::load):
352         (BlackBerry::WebKit::WebPagePrivate::loadString):
353         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
354         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad):
355
356 2012-11-19  Genevieve Mak  <gmak@rim.com>
357
358         [BlackBerry] Block Zoom picks wrong block
359         https://bugs.webkit.org/show_bug.cgi?id=102728
360
361         Reviewed by Rob Buis.
362
363         Reviewed Internally by Jakob Petsovits
364         Remove transform missed in previous commit for
365         https://bugs.webkit.org/show_bug.cgi?id=101608
366         PR #247198
367
368         * Api/WebPage.cpp:
369         (BlackBerry::WebKit::WebPagePrivate::nodeForZoomUnderPoint):
370
371 2012-11-19  Liam Quinn  <lquinn@rim.com>
372
373         [BlackBerry] Remove RTSP handling from FrameLoaderClientBlackBerry
374         https://bugs.webkit.org/show_bug.cgi?id=102692
375
376         Reviewed by Rob Buis.
377
378         Reviewed internally by George Staikos. Internal PR 242750.
379
380         Our RTSP handling in FrameLoaderClientBlackBerry causes HTTP redirects to "rtsp:" URIs to fail. Remove handling of RTSP from this class; it will be moved to the network layer alongside other URI schemes like "data:" and "file:".
381
382         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
383         (WebCore::FrameLoaderClientBlackBerry::createDocumentLoader):
384
385 2012-11-16  Adam Treat  <atreat@rim.com>
386
387         https://bugs.webkit.org/show_bug.cgi?id=102540
388         [BlackBerry] Checkerboard flicker when pinch zooming out on google.com/nwshp
389
390         Reviewed by George Staikos.
391         PR 245827
392
393         Disable updates to the backingstore tile matrix when backingstore updates
394         are disabled.  This prevents changes to the tile matrix when we are in the
395         middle of a pinch zoom which can cause checkebroard flickering.
396
397         * Api/BackingStore.cpp:
398         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
399         (BlackBerry::WebKit::BackingStorePrivate::resumeBackingStoreUpdates):
400         (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect):
401         (BlackBerry::WebKit::BackingStorePrivate::render):
402         (BlackBerry::WebKit::BackingStorePrivate::renderVisibleContents):
403         (BlackBerry::WebKit::BackingStorePrivate::renderBackingStore):
404         (BlackBerry::WebKit::BackingStorePrivate::updateTileMatrixIfNeeded):
405         (BlackBerry::WebKit::BackingStorePrivate::contentsSizeChanged):
406         (BlackBerry::WebKit::BackingStorePrivate::orientationChanged):
407         * Api/BackingStore_p.h:
408         (BlackBerry::WebKit::BackingStorePrivate::setTileMatrixNeedsUpdate):
409         (BackingStorePrivate):
410
411 2012-11-16  Rob Buis  <rbuis@rim.com>
412
413         [BlackBerry] FCC doesn't work in textarea
414         https://bugs.webkit.org/show_bug.cgi?id=102088
415
416         Reviewed by Antonio Gomes.
417
418         Remove the cancel button specializations, it was needed at some point but hitting it
419         works just as well without it. This unbreaks FCC in textarea's.
420
421         * WebKitSupport/FatFingers.cpp:
422         (BlackBerry::WebKit::FatFingers::isElementClickable):
423
424 2012-11-16  Adam Treat  <atreat@rim.com>
425
426         [BlackBerry] Fix regression causing checkerboard flicker after app wake-up
427         https://bugs.webkit.org/show_bug.cgi?id=102526
428
429         Reviewed by George Staikos.
430         PR 245027
431
432         The webkit patch for 219976 introduced an undesirable behavior change
433         resulting in a regression where there was checkerboard flickering on
434         resuming from an inactive application state.  This patch restores the
435         previous behavior and fixes the regression.
436
437         * Api/BackingStore.cpp:
438         (BlackBerry::WebKit::BackingStore::createBackingStoreMemory):
439         (BlackBerry::WebKit::BackingStore::releaseBackingStoreMemory):
440
441 2012-11-16  Mike Fenton  <mifenton@rim.com>
442
443         [BlackBerry] Use proper keycode value for space instead of hardcoded value.
444         https://bugs.webkit.org/show_bug.cgi?id=102518
445
446         Reviewed by Rob Buis.
447
448         Remove hard coded value for space.
449
450         Reviewed Internally by Gen Mak.
451
452         * WebKitSupport/InputHandler.cpp:
453         (BlackBerry::WebKit::InputHandler::setText):
454
455 2012-11-15  Andrew Lo  <anlo@rim.com>
456
457         [BlackBerry] Animate changes to viewport due to input focus changes.
458         https://bugs.webkit.org/show_bug.cgi?id=102410
459
460         Reviewed by Rob Buis.
461
462         When changing scroll position or zoom level for input field focus,
463         animate the change.
464         Internal PR 231937
465
466         Internally reviewed by Mike Fenton.
467
468         * WebKitSupport/InputHandler.cpp:
469         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
470
471 2012-11-15  Mike Fenton  <mifenton@rim.com>
472
473         [BlackBerry] Don't restore zoom and scroll when leaving an input field.
474         https://bugs.webkit.org/show_bug.cgi?id=102376
475
476         Reviewed by Yong Li.
477
478         Restoring the zoom causes undesirable behavior when switching between fields.
479
480         Reviewed Internally by Andrew Lo.
481
482         * WebKitSupport/InputHandler.cpp:
483         (BlackBerry::WebKit::InputHandler::InputHandler):
484         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
485         * WebKitSupport/InputHandler.h:
486         (InputHandler):
487
488 2012-11-15  Jakob Petsovits  <jpetsovits@rim.com>
489
490         [BlackBerry] Fix suspend/resume assertion in setCompositor().
491         https://bugs.webkit.org/show_bug.cgi?id=102397
492         RIM PR 244701
493
494         Reviewed by Adam Treat.
495
496         If a compositor is used but no surface pool is ever
497         allocated (which is a perfectly valid use case), initial
498         suspension of the backingstore is skipped because of an
499         early return. This will cause an assertion to be triggered
500         and a bug. Fix this by suspending it before the return.
501
502         With Adam Treat's recent change to split suspension of
503         screen and backingstore into two different functions,
504         this can now be reduced to a mere screen (blitting)
505         suspension. That was the original intention of this code.
506
507         * Api/BackingStore.cpp:
508         (BlackBerry::WebKit::BackingStorePrivate::createSurfaces):
509         * Api/WebPage.cpp:
510         (BlackBerry::WebKit::WebPagePrivate::setCompositor):
511
512 2012-11-15  Jakob Petsovits  <jpetsovits@rim.com>
513
514         [BlackBerry] Leave surface resizing to the client.
515         https://bugs.webkit.org/show_bug.cgi?id=102280
516         RIM PR 235034
517         RIM PR 160619
518
519         Reviewed by Adam Treat.
520
521         Now that we always blit on the user interface thread and
522         use the client's userInterfaceViewportAccessor() to determine
523         the destination rectangle for blitting, changing the viewport
524         size does not affect the window or target surface directly.
525         The only way that blitted output is affected is through
526         layout, scroll position or scale changes. None of these
527         require us to synchronize with the UI thread to resize its
528         target surface.
529
530         This commit simplifies setViewportSize() and removes a
531         blocking message dispatch by simply offloading all surface
532         resizing responsibilities to the client. This is safer,
533         cleaner and easier.
534
535         * Api/WebPage.cpp:
536         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
537         (BlackBerry::WebKit::WebPage::setScreenOrientation):
538         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
539         * Api/WebPage.h:
540         * Api/WebPageClient.h:
541         * Api/WebPage_p.h:
542         (WebPagePrivate):
543
544 2012-11-14  Nima Ghanavatian  <nghanavatian@rim.com>
545
546         [BlackBerry] Do not clear the ProcessingChangeGuard state on DeleteBackward
547         https://bugs.webkit.org/show_bug.cgi?id=102284
548
549         Reviewed by Rob Buis.
550
551         PR237497
552         When holding backspace, clearing the state forces a keyboard
553         update which resets the state of the keyboard. Handling this
554         specific corner case separate from all other editor commands.
555
556         Internally reviewed by Mike Fenton.
557
558         * WebCoreSupport/EditorClientBlackBerry.cpp:
559         (WebCore::EditorClientBlackBerry::handleKeyboardEvent):
560
561 2012-11-14  Rob Buis  <rbuis@rim.com>
562
563         [BlackBerry] Improve debug functionality in FatFingers
564         https://bugs.webkit.org/show_bug.cgi?id=102263
565
566         Reviewed by Antonio Gomes.
567
568         - use logAlways to log even in release.
569         - dump shadow tree info if available.
570
571         * WebKitSupport/FatFingers.cpp:
572         (BlackBerry::WebKit::FatFingers::isElementClickable):
573         (BlackBerry::WebKit::FatFingers::checkFingerIntersection):
574         (BlackBerry::WebKit::FatFingers::findIntersectingRegions):
575         (BlackBerry::WebKit::FatFingers::checkForText):
576
577 2012-11-14  Adam Treat  <atreat@rim.com>
578
579         [BlackBerry] Break suspend/resume of the backingstore and screen into separate methods
580         https://bugs.webkit.org/show_bug.cgi?id=102126
581
582         Reviewed by George Staikos.
583         PR 219976
584
585         Modify the suspend/resume methods so that they can be called from the UI thread
586         itself and split up the suspend/resume methods so that we can suspend/resume
587         the screen or backingstore separately.
588
589         * Api/BackingStore.cpp:
590         (BlackBerry::WebKit::BackingStorePrivate::suspendBackingStoreUpdates):
591         (WebKit):
592         (BlackBerry::WebKit::BackingStorePrivate::suspendScreenUpdates):
593         (BlackBerry::WebKit::BackingStorePrivate::resumeBackingStoreUpdates):
594         (BlackBerry::WebKit::BackingStorePrivate::resumeScreenUpdates):
595         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
596         (BlackBerry::WebKit::BackingStorePrivate::createSurfaces):
597         (BlackBerry::WebKit::BackingStore::suspendBackingStoreUpdates):
598         (BlackBerry::WebKit::BackingStore::resumeBackingStoreUpdates):
599         (BlackBerry::WebKit::BackingStore::suspendScreenUpdates):
600         (BlackBerry::WebKit::BackingStore::resumeScreenUpdates):
601         (BlackBerry::WebKit::BackingStore::createBackingStoreMemory):
602         (BlackBerry::WebKit::BackingStore::releaseBackingStoreMemory):
603         * Api/BackingStore.h:
604         * Api/BackingStore_p.h:
605         (BackingStorePrivate):
606         * Api/WebPage.cpp:
607         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
608         (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint):
609         (BlackBerry::WebKit::WebPagePrivate::zoomBlock):
610         (BlackBerry::WebKit::WebPage::destroy):
611         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
612         (BlackBerry::WebKit::WebPagePrivate::setCompositor):
613         (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
614         (BlackBerry::WebKit::WebPagePrivate::restoreHistoryViewState):
615         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
616         (WebCore::FrameLoaderClientBlackBerry::transitionToCommittedForNewPage):
617         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
618         * WebKitSupport/InputHandler.cpp:
619         (BlackBerry::WebKit::InputHandler::setBatchEditingActive):
620
621 2012-11-14  Andy Chen  <andchen@rim.com>
622
623         [BlackBerry] Add FocusBased context node detection strategy
624         https://bugs.webkit.org/show_bug.cgi?id=102238
625
626         Reviewed by Rob Buis.
627
628         If last fat finger result is invalid, we need to return current
629         focus element as context node, because when user tap on selection
630         overlay, there is not touch event sent to webkit.
631         PR 241382
632
633         Internally reviewed by Genevieve Mak and Mike Fenton.
634
635         * Api/WebPage.cpp:
636         (BlackBerry::WebKit::WebPagePrivate::contextNode):
637         * Api/WebPage.h:
638         * WebKitSupport/InputHandler.h:
639         (BlackBerry::WebKit::InputHandler::currentFocusElement):
640
641 2012-11-14  Nima Ghanavatian  <nghanavatian@rim.com>
642
643         [BlackBerry] Use mispelled-marker offsets relative to the element
644         https://bugs.webkit.org/show_bug.cgi?id=102236
645
646         Reviewed by Rob Buis.
647
648         DocumentMarker offsets are calculated relative to a node. This is causing
649         problems for contenteditable which can have numerous nodes. Creating a Range around a word
650         and calculating its location and length gives us the correct override in this case for starting
651         and ending points to pass to IMF.
652
653         Internally reviewed by Mike Fenton.
654
655         * WebKitSupport/InputHandler.cpp:
656         (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions):
657
658 2012-11-13  Mike Fenton  <mifenton@rim.com>
659
660         [BlackBerry] Fully restore both zoom and scroll when leaving an input field.
661         https://bugs.webkit.org/show_bug.cgi?id=102094
662
663         Reviewed by Rob Buis.
664
665         PR 234187.
666
667         Cache both the zoom and scroll position prior to adjusting
668         for input focus so that state can be reset fully.
669
670         Reviewed Internally by Gen Mak.
671
672         * WebKitSupport/InputHandler.cpp:
673         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
674         * WebKitSupport/InputHandler.h:
675         (InputHandler):
676
677 2012-11-12  Nima Ghanavatian  <nghanavatian@rim.com>
678
679         [BlackBerry] Ensure we only receive one KeyUp per key event
680         https://bugs.webkit.org/show_bug.cgi?id=101967
681
682         Reviewed by Rob Buis.
683
684         We are creating synthetic KeyUps too often, and get into trouble since IMF will send up a KeyUp on all key events.
685         Furthermore, these KeyUps can arrive both when we are composing and not. To bypass this check, we are storing the KeyDown
686         character and comparing against it on KeyUp.
687
688         Internally reviewed by Mike Fenton.
689
690         * WebKitSupport/InputHandler.cpp:
691         (BlackBerry::WebKit::InputHandler::InputHandler):
692         (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
693         (BlackBerry::WebKit::InputHandler::insertText):
694         (BlackBerry::WebKit::InputHandler::setText):
695         * WebKitSupport/InputHandler.h:
696         (InputHandler):
697
698 2012-11-12  Jacky Jiang  <zhajiang@rim.com>
699
700         [BlackBerry] When opening an image it does not scale to fit our window
701         https://bugs.webkit.org/show_bug.cgi?id=101778
702
703         Reviewed by Rob Buis.
704         Internally reviewed by Konrad Piascik.
705
706         PR: 230935
707         For image document, the actual image size can be different with the
708         contents size. Zoom the document based on the image width so that
709         images can fit the screen horizontally. Set 2.0 as the maximum zoom to
710         fit scale for image document so that very small images won't get
711         ridiculous large scales during the initial load.
712
713         * Api/WebPage.cpp:
714         (WebKit):
715         (BlackBerry::WebKit::WebPagePrivate::zoomToFitScale):
716
717 2012-11-12  Nima Ghanavatian  <nghanavatian@rim.com>
718
719         [BlackBerry] Use keyevents instead of editor commands for backspace
720         https://bugs.webkit.org/show_bug.cgi?id=101663
721
722         Reviewed by Rob Buis.
723
724         PR229395
725         Sending keyEvents for backspace and switching from KeyChar
726         to KeyDown since we are still receiving an unadultered KeyUp
727         from the input service. This was causing us to get two keyUps
728         for regular keys and no key downs for backspace since it was
729         triggering an editor command and bypassing JS listeners.
730
731         Reviewed internally by Mike Fenton.
732
733         * WebKitSupport/InputHandler.cpp:
734         (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
735         (BlackBerry::WebKit::relativeRightOffset):
736         (WebKit):
737         (BlackBerry::WebKit::InputHandler::deleteTextRelativeToCursor):
738         (BlackBerry::WebKit::InputHandler::setText):
739
740 2012-11-12  Rob Buis  <rbuis@rim.com>
741
742         [BlackBerry] Crash in InRegionScrollerPrivate.
743         https://bugs.webkit.org/show_bug.cgi?id=101399
744
745         Reviewed by Yong Li.
746
747         Fix warning caused by the previous patch for this bug (r133679).
748
749         * WebKitSupport/InRegionScrollableArea.cpp:
750         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
751
752 2012-11-11  George Staikos  <staikos@webkit.org>
753
754         [BlackBerry] The QNX extension method should not be enabled by default
755         https://bugs.webkit.org/show_bug.cgi?id=101863
756
757         Reviewed by Rob Buis.
758
759         Simply change the default to false.
760
761         * Api/WebPage.cpp:
762         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
763
764 2012-11-09  Otto Derek Cheung  <otcheung@rim.com>
765
766         [BlackBerry] Adding a sound to touch events on anchor elements
767         https://bugs.webkit.org/show_bug.cgi?id=101655
768
769         Reviewed by Antonio Gomes.
770
771         Adding audio feedback to touchevents on html anchor elements.
772
773         The feedback is called directly from client instead of using the
774         mouseup event to avoid the delay between touch start and end caused
775         by the tap sequence recognizer.
776
777         * Api/WebPage.cpp:
778         (BlackBerry::WebKit::WebPage::playSoundIfAnchorIsTarget):
779         (WebKit):
780         * Api/WebPage.h:
781         * WebKitSupport/TouchEventHandler.cpp:
782         (WebKit):
783         (BlackBerry::WebKit::TouchEventHandler::playSoundIfAnchorIsTarget):
784         * WebKitSupport/TouchEventHandler.h:
785         (TouchEventHandler):
786
787 2012-11-09  George Staikos  <staikos@webkit.org>
788
789         [BlackBerry] Remove obsolete tokenizer settings
790         https://bugs.webkit.org/show_bug.cgi?id=101689
791
792         Reviewed by Yong Li.
793
794         These tokenizer settings are obsolete and should not be here.  Remove them.
795
796         * Api/WebPage.cpp:
797         (BlackBerry::WebKit::WebPagePrivate::init):
798
799 2012-11-08  Chris Guan  <chris.guan@torchmobile.com.cn>
800
801         [BlackBerry] need to call closePopup at setValueAndClosePopup
802         https://bugs.webkit.org/show_bug.cgi?id=101568
803
804         Reviewed by George Staikos.
805
806         When early return occurs, we need to call closePopup
807         at setValueAndClosePopup function. See the comments
808         in WebCore/page/PagePopupClient.h. If we have not it,
809         Webkit thread is held and browser will be unresponsive 
810         in BlackBerry port.
811         
812         RIM PR 232962
813         Internally reviewed by Charles Wei.
814
815         * WebCoreSupport/SelectPopupClient.cpp:
816         (WebCore::SelectPopupClient::setValueAndClosePopup):
817
818 2012-11-08  Jakob Petsovits  <jpetsovits@rim.com>
819
820         [BlackBerry] Replace checkerboard with page background color.
821         https://bugs.webkit.org/show_bug.cgi?id=101652
822         RIM PR 188235
823
824         Reviewed by George Staikos.
825
826         In order to do this, we introduce a new member variable for
827         BackingStore because when blitting, we can't access the
828         page background color in a threadsafe way.
829
830         Solid background color fill is still only used for public builds.
831         Developers and beta testers should still see checkerboard and
832         do something about it.
833
834         * Api/BackingStore.cpp:
835         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
836         (BlackBerry::WebKit::BackingStorePrivate::fillWindow):
837         (BlackBerry::WebKit::BackingStorePrivate::webPageBackgroundColorUserInterfaceThread):
838         (WebKit):
839         (BlackBerry::WebKit::BackingStorePrivate::setWebPageBackgroundColor):
840         * Api/BackingStore_p.h:
841         (BackingStorePrivate):
842         * Api/WebPage.cpp:
843         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
844         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
845
846 2012-11-08  Tiancheng Jiang  <tijiang@rim.com>
847
848         [BlackBerry] Update BB10 date input form.
849         https://bugs.webkit.org/show_bug.cgi?id=101075
850
851         Reviewed by Rob Buis.
852
853         RIM PR 234531
854         Internally Reviewed by Mike Fenton.
855         Change date input appearance to button and hide caret when click on them.
856
857         * WebCoreSupport/DatePickerClient.cpp:
858         (WebCore::DatePickerClient::setValueAndClosePopup):
859         * WebKitSupport/InputHandler.cpp:
860         (BlackBerry::WebKit::InputHandler::openDatePopup):
861
862 2012-11-08  Nima Ghanavatian  <nghanavatian@rim.com>
863
864         [BlackBerry] Provide pixel coordinates to IMF relative to the screen
865         https://bugs.webkit.org/show_bug.cgi?id=101628
866
867         Reviewed by Rob Buis.
868
869         Reviewed internally by Mike Fenton and Jakob Petsovits.
870
871         We need to provide the correct pixel coordinates to IMF,
872         accounting for webkit based fields in UIB as well as browser.
873         Getting an offset value from the screen point to the document
874         content point allows us to adjust for when the document,
875         such as in UIB, does not start at 0,0.
876
877         * Api/WebPageClient.h:
878         * WebKitSupport/InputHandler.cpp:
879         (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions):
880         * WebKitSupport/InputHandler.h:
881         (InputHandler):
882         * WebKitSupport/TouchEventHandler.cpp:
883         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
884
885 2012-11-08  Jakob Petsovits  <jpetsovits@rim.com>
886
887         [BlackBerry] Janitor: Remove unused m_isValid bool
888         https://bugs.webkit.org/show_bug.cgi?id=101610
889
890         Reviewed by Rob Buis.
891
892         It's not used anywhere, but as we have a constructor
893         that creates an invalid TileIndex, let's add another
894         method to check validity - now a correct check.
895
896         On top of that, make the stylebot happy by reducing
897         "unsigned int" to just "unsigned".
898
899         * WebKitSupport/TileIndex.h:
900         (BlackBerry::WebKit::TileIndex::TileIndex):
901         (BlackBerry::WebKit::TileIndex::i):
902         (BlackBerry::WebKit::TileIndex::j):
903         (BlackBerry::WebKit::TileIndex::setIndex):
904         (BlackBerry::WebKit::TileIndex::isValid):
905         (TileIndex):
906
907 2012-11-08  Eli Fidler  <efidler@rim.com>
908
909         [BlackBerry] Increase memory cache size
910         https://bugs.webkit.org/show_bug.cgi?id=101622
911
912         Reviewed by Yong Li.
913
914         * WebCoreSupport/CacheClientBlackBerry.cpp:
915         (WebCore::CacheClientBlackBerry::updateCacheCapacity):
916         * WebCoreSupport/CacheClientBlackBerry.h:
917         (CacheClientBlackBerry):
918
919 2012-11-08  Jakob Petsovits  <jpetsovits@rim.com>
920
921         [BlackBerry] Rework the API to use document coordinates
922         https://bugs.webkit.org/show_bug.cgi?id=101608
923         RIM PR 173292
924
925         Reviewed by Adam Treat.
926
927         Scrolling and zooming APIs used to operate on
928         transformed coordinates, which is a bad idea:
929         The UI thread might long have moved on to a
930         different scale and scroll position so outdated
931         pixel coordinates are of limited value.
932
933         Moreover, more transformation calculations are
934         needed than if we operate purely on document
935         coordinates.
936
937         With webkitThreadViewportAccessor() exposed,
938         the caller has a choice between how to handle
939         coordinates and the means to perform conversions
940         with little effort and overhead if needed.
941         Therefore, we should remove pixel coordinates
942         from the public API. This commit makes this change.
943
944         * Api/BackingStore.cpp:
945         (BlackBerry::WebKit::BackingStorePrivate::repaint):
946         (BlackBerry::WebKit::BackingStorePrivate::didRenderContent):
947         * Api/InRegionScroller.cpp:
948         (BlackBerry::WebKit::InRegionScroller::setDocumentScrollPositionCompositingThread):
949         (BlackBerry::WebKit::InRegionScroller::setDocumentScrollPositionWebKitThread):
950         (BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint):
951         * Api/InRegionScroller.h:
952         * Api/WebPage.cpp:
953         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
954         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
955         (BlackBerry::WebKit::WebPagePrivate::shouldZoomAboutPoint):
956         (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint):
957         (BlackBerry::WebKit::WebPage::setDocumentScrollPosition):
958         (BlackBerry::WebKit::WebPagePrivate::hasVirtualViewport):
959         (BlackBerry::WebKit::WebPagePrivate::notifyTransformedContentsSizeChanged):
960         (BlackBerry::WebKit::WebPagePrivate::notifyTransformedScrollChanged):
961         (BlackBerry::WebKit::WebPagePrivate::setCursor):
962         (BlackBerry::WebKit::WebPagePrivate::notifyPopupAutofillDialog):
963         (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize):
964         (BlackBerry::WebKit::WebPagePrivate::bestNodeForZoomUnderPoint):
965         (BlackBerry::WebKit::WebPagePrivate::blockZoomRectForNode):
966         (BlackBerry::WebKit::WebPagePrivate::zoomBlock):
967         (BlackBerry::WebKit::WebPage::setVirtualViewportSize):
968         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
969         (BlackBerry::WebKit::WebPagePrivate::dispatchViewportPropertiesDidChange):
970         (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore):
971         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
972         (BlackBerry::WebKit::WebPage::setDefaultLayoutSize):
973         (BlackBerry::WebKit::WebPagePrivate::setScrollOriginPoint):
974         (BlackBerry::WebKit::WebPage::setDocumentScrollOriginPoint):
975         (BlackBerry::WebKit::handleScrolling):
976         (BlackBerry::WebKit::WebPage::selectionContainsDocumentPoint):
977         (BlackBerry::WebKit::WebPage::setDocumentSelection):
978         (BlackBerry::WebKit::WebPage::setDocumentCaretPosition):
979         (BlackBerry::WebKit::WebPage::selectAtDocumentPoint):
980         (BlackBerry::WebKit::WebPagePrivate::setTextReflowAnchorPoint):
981         (BlackBerry::WebKit::WebPage::pinchZoomAboutPoint):
982         (BlackBerry::WebKit::WebPage::blockZoom):
983         (BlackBerry::WebKit::WebPage::nodeAtDocumentPoint):
984         (BlackBerry::WebKit::WebPagePrivate::enterFullscreenForNode):
985         * Api/WebPage.h:
986         (Platform):
987         * Api/WebPageClient.h:
988         * Api/WebPage_p.h:
989         (WebPagePrivate):
990         * WebCoreSupport/AutofillManager.cpp:
991         (WebCore::AutofillManager::didChangeInTextField):
992         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
993         (WebCore::FrameLoaderClientBlackBerry::dispatchDidLayout):
994         * WebKitSupport/SelectionHandler.cpp:
995         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
996         (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
997
998 2012-11-08  Nima Ghanavatian  <nghanavatian@rim.com>
999
1000         [BlackBerry] Verify touched element using the rootEditableElement
1001         https://bugs.webkit.org/show_bug.cgi?id=101510
1002
1003         Reviewed by Rob Buis.
1004
1005         Reviewed internally by Mike Fenton.
1006
1007         Move up the tree until we find the rootEditableElement and use
1008         that to compare with the touched element.
1009
1010         * WebKitSupport/FatFingers.h:
1011         (BlackBerry::WebKit::FatFingersResult::node):
1012         (BlackBerry::WebKit::FatFingersResult::nodeAsElementIfApplicable):
1013         * WebKitSupport/InputHandler.cpp:
1014         (BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint):
1015         * WebKitSupport/TouchEventHandler.cpp:
1016         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
1017
1018 2012-11-07  Rob Buis  <rbuis@rim.com>
1019
1020         [BlackBerry] Remove setUserStyleSheetString/userStyleSheetString
1021         https://bugs.webkit.org/show_bug.cgi?id=101490
1022
1023         Reviewed by Yong Li.
1024
1025         We no longer need this API.
1026
1027         * Api/WebPage.cpp:
1028         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
1029         * Api/WebSettings.cpp:
1030         (WebKit):
1031         * Api/WebSettings.h:
1032
1033 2012-11-07  Christophe Dumez  <christophe.dumez@intel.com>
1034
1035         Add replaceWithLiteral() method to WTF::String
1036         https://bugs.webkit.org/show_bug.cgi?id=101257
1037
1038         Reviewed by Benjamin Poulain.
1039
1040         Substitute String::replace() calls by String::replaceWithLiteral() where
1041         adequate, for efficiency.
1042
1043         * WebCoreSupport/SelectPopupClient.cpp:
1044         (WebCore::SelectPopupClient::generateHTML):
1045
1046 2012-11-07  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1047
1048         Remove support for "desktop-width" in the viewport meta tag
1049         https://bugs.webkit.org/show_bug.cgi?id=101217
1050
1051         Reviewed by Gyuyoung Kim.
1052
1053         Sync WebViewportArguments enum with the one in
1054         WebCore::ViewportArguments
1055
1056         * Api/WebViewportArguments.h:
1057
1058 2012-11-06  Genevieve Mak  <gmak@rim.com>
1059
1060         [BlackBerry] Crash in InRegionScrollerPrivate.
1061         https://bugs.webkit.org/show_bug.cgi?id=101399
1062
1063         Reviewed by Rob Buis.
1064
1065         Add a pointer to the enclosing document as the pointer to layer
1066         or node along the way may become invalid.
1067         Use document pointer in clearDocumentData.
1068         PR #238469
1069
1070         * Api/InRegionScroller.cpp:
1071         (BlackBerry::WebKit::InRegionScrollerPrivate::clearDocumentData):
1072         * WebKitSupport/InRegionScrollableArea.cpp:
1073         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
1074         (BlackBerry::WebKit::InRegionScrollableArea::document):
1075         (WebKit):
1076         * WebKitSupport/InRegionScrollableArea.h:
1077         (WebCore):
1078         (InRegionScrollableArea):
1079
1080 2012-11-06  Otto Derek Cheung  <otcheung@rim.com>
1081
1082         [BlackBerry] Pushing window.external.* events to webplatform
1083         https://bugs.webkit.org/show_bug.cgi?id=101386
1084
1085         Reviewed by Rob Buis.
1086
1087         Adding calls to trigger window.external events so we can handle them on the
1088         browser side.
1089
1090         PR 170059
1091
1092         * Api/WebPageClient.h:
1093         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1094         (WebCore::ChromeClientBlackBerry::addSearchProvider):
1095         (WebCore::ChromeClientBlackBerry::isSearchProviderInstalled):
1096
1097 2012-11-06  Otto Derek Cheung  <otcheung@rim.com>
1098
1099         [BlackBerry] Adding window.external to our port
1100         https://bugs.webkit.org/show_bug.cgi?id=100868
1101
1102         Reviewed by Rob Buis.
1103
1104         Patching the method names to match the ones in the spec.
1105
1106         * WebCoreSupport/ExternalExtension.cpp:
1107
1108 2012-11-06  Jacky Jiang  <zhajiang@rim.com>
1109
1110         [BlackBerry] Page can't back to whole screen after zoom out and orientation change
1111         https://bugs.webkit.org/show_bug.cgi?id=101350
1112
1113         Reviewed by Rob Buis.
1114         Internally reviewed by Arvid Nilsson.
1115
1116         PR: 229321
1117         When rotating device during touch interaction, bitmap zooming was
1118         unexpected ended by resetBitmapZoomScale() so that it couldn't bounce
1119         back. The call resetBitmapZoomScale() is ancient, which just resets the
1120         scale of the bitmap before. Right now it only ends the bitmap zooming
1121         which caused the issue. As UI viewport will be updated by zoomChanged()
1122         right after that, we can remove this trouble maker.
1123         Update the interaction views if the rotation is being changed so that
1124         ZoomHandler can get the updated views.
1125
1126         * Api/WebPage.cpp:
1127         (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint):
1128         * Api/WebPageClient.h:
1129
1130 2012-11-05  Lianghui Chen  <liachen@rim.com>
1131
1132         [BlackBerry] Do not show error page for main loads denied by client application
1133         https://bugs.webkit.org/show_bug.cgi?id=101287
1134
1135         Internal PR: 237574.
1136         Internally reviewed by Arvid Nilsson, Joe Mason.
1137         Reviewed by George Staikos.
1138
1139         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1140         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad):
1141
1142 2012-11-05  Lianghui Chen  <liachen@rim.com>
1143
1144         [BlackBerry] Do not display error page for failed downloads
1145         https://bugs.webkit.org/show_bug.cgi?id=101246
1146
1147         Internal PR: 236318
1148         Internal reviewed by Joe Mason, Leo Yang.
1149         Reviewed by Rob Buis.
1150
1151         Right now when a main load, including all downloads, failed, it will
1152         display an error page. This is not very user friendly, especially for
1153         WebWorks application, which want to use its own user interface to info
1154         user about the failure.
1155         So we just stop displaying error page for downloads.
1156
1157         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1158         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad):
1159
1160 2012-11-05  Simon Fraser  <simon.fraser@apple.com>
1161
1162         Fix layer borders to cleaning appear and disappear on switching
1163         https://bugs.webkit.org/show_bug.cgi?id=101136
1164
1165         Reviewed by Sam Weinig.
1166
1167         Remove the GraphicsLayerClient methods showDebugBorders() and
1168         showRepaintCounter().
1169
1170         * Api/WebOverlay_p.h:
1171         (WebOverlayPrivateWebKitThread):
1172         * Api/WebPage.cpp:
1173         (BlackBerry::WebKit::WebPagePrivate::notifyFlushRequired):
1174         * Api/WebPage_p.h:
1175         * WebKitSupport/DefaultTapHighlight.cpp:
1176         * WebKitSupport/DefaultTapHighlight.h:
1177         (DefaultTapHighlight):
1178         * WebKitSupport/InspectorOverlayBlackBerry.cpp:
1179         * WebKitSupport/InspectorOverlayBlackBerry.h:
1180         (InspectorOverlay):
1181         * WebKitSupport/SelectionOverlay.cpp:
1182         * WebKitSupport/SelectionOverlay.h:
1183         (SelectionOverlay):
1184
1185 2012-11-05  Rob Buis  <rbuis@rim.com>
1186
1187         [BlackBerry] screenX/Y gives wrong values
1188         https://bugs.webkit.org/show_bug.cgi?id=101259
1189
1190         Reviewed by Yong Li.
1191
1192         PR 237071
1193
1194         Reviewed internally by Gen Mak.
1195
1196         Do not transform screenPos coordinates.
1197
1198         * Api/WebPage.cpp:
1199         (BlackBerry::WebKit::WebPage::mouseEvent):
1200         (BlackBerry::WebKit::WebPage::touchEvent):
1201         (BlackBerry::WebKit::WebPage::touchPointAsMouseEvent):
1202
1203 2012-11-05  Rob Buis  <rbuis@rim.com>
1204
1205         [BlackBerry] Input date should not popup dialog when readonly is set
1206         https://bugs.webkit.org/show_bug.cgi?id=101234
1207
1208         Reviewed by Yong Li.
1209
1210         PR 236114
1211
1212         Reviewed internally by Mike Fenton.
1213
1214         Suppress popup dialog if the input element has readonly attribute set.
1215
1216         * WebKitSupport/InputHandler.cpp:
1217         (BlackBerry::WebKit::InputHandler::openDatePopup):
1218         (BlackBerry::WebKit::InputHandler::openColorPopup):
1219
1220 2012-11-05  Genevieve Mak  <gmak@rim.com>
1221
1222         [BLACKBERRY] Update touch code to reflect touch refactor
1223         https://bugs.webkit.org/show_bug.cgi?id=101227
1224
1225         Reviewed by Rob Buis.
1226
1227         PR #2706785
1228         Reviewed Internally by: Mike Lattanzio
1229
1230         * Api/WebPage.cpp:
1231         (BlackBerry::WebKit::WebPage::touchEvent):
1232         (BlackBerry::WebKit::WebPagePrivate::dispatchTouchEventToFullScreenPlugin):
1233
1234 2012-11-05  Konrad Piascik  <kpiascik@rim.com>
1235
1236         [BlackBerry] Web Inspector: Add InspectorInstrumentaiton calls for timeline compositing.
1237         https://bugs.webkit.org/show_bug.cgi?id=101213
1238         RIM PR 178131
1239
1240         Reviewed by Rob Buis.
1241
1242         Internally Reviewed by Arvid Nilsson.
1243
1244         Added compositing events to the timeline for BlackBerry.
1245
1246         * Api/WebPage.cpp:
1247         (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
1248         (BlackBerry::WebKit::WebPagePrivate::willComposite):
1249         (WebKit):
1250         (BlackBerry::WebKit::WebPagePrivate::didComposite):
1251         * Api/WebPage_p.h:
1252         (WebPagePrivate):
1253
1254 2012-11-03  Alexey Proskuryakov  <ap@apple.com>
1255
1256         Get rid of USE(CFURLSTORAGESESSIONS)
1257         https://bugs.webkit.org/show_bug.cgi?id=101131
1258
1259         Reviewed by Sam Weinig.
1260
1261         * WebCoreSupport/AboutDataUseFeatures.in: Not sure what this list is about, but
1262         CFURLSTORAGESESSIONS probably doesn't need to stay here.
1263
1264 2012-11-02  Nima Ghanavatian  <nghanavatian@rim.com>
1265
1266         [BlackBerry] Fix compile-time warning of a possible empty-body if statement
1267         https://bugs.webkit.org/show_bug.cgi?id=101095
1268
1269         Reviewed by Yong Li.
1270         Internally reviewed by Jeff Rogers.
1271
1272         BBLOG might be compiled out leaving an if statement with an empty
1273         body. This is giving us a warning at the moment. Simply putting braces
1274         around it will fail as well because then we'd have braces around a
1275         single-line if. So, in following with the style observed in other parts
1276         of BackingStore.cpp, break up the log message and add braces.
1277
1278         * Api/BackingStore.cpp:
1279         (BlackBerry::WebKit::BackingStorePrivate::blitToWindow):
1280         (BlackBerry::WebKit::BackingStorePrivate::fillWindow):
1281         (BlackBerry::WebKit::BackingStorePrivate::clearWindow):
1282
1283 2012-11-02  Nima Ghanavatian  <nghanavatian@rim.com>
1284
1285         [BlackBerry] Optimize backspace key handling
1286         https://bugs.webkit.org/show_bug.cgi?id=101083
1287
1288         PR233591
1289         Optimize backspace key handling. Some of these calls are not
1290         required by IMF since the input_service already processes the backspace key
1291         and updates the state before passing us the key.
1292
1293         Internally reviewed by Mike Fenton.
1294
1295         Reviewed by Yong Li.
1296
1297         Blocking calls with a flag that we clear immediately after
1298         processing a backspace keydown.
1299
1300         * WebKitSupport/InputHandler.cpp:
1301         (BlackBerry::WebKit::InputHandler::nodeTextChanged):
1302         (BlackBerry::WebKit::InputHandler::selectionChanged):
1303         (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
1304         * WebKitSupport/InputHandler.h:
1305         (InputHandler):
1306
1307 2012-11-02  Otto Derek Cheung  <otcheung@rim.com>
1308
1309         [BlackBerry] Adding window.external to our port
1310         https://bugs.webkit.org/show_bug.cgi?id=100868
1311
1312         Reviewed by Rob Buis.
1313         PR 158809
1314
1315         Patch up an error where we were dereferencing a null pointer.
1316
1317         * WebCoreSupport/ExternalExtension.cpp:
1318         (addSearchProviderMethod):
1319         (IsSearchProviderInstalledMethod):
1320
1321 2012-11-01  Peter Wang  <peter.wang@torchmobile.com.cn>
1322
1323         [BlackBerry] Simplify the code of returning JSValue in "BlackBerry::WebKit::WebPagePrivate::executeJavaScript"
1324         https://bugs.webkit.org/show_bug.cgi?id=100941
1325
1326         Reviewed by Yong Li.
1327
1328         Remove the unnecessary steps, just directly deal with returned JSValue.
1329
1330         * Api/WebPage.cpp:
1331         (BlackBerry::WebKit::WebPagePrivate::executeJavaScript):
1332         (BlackBerry::WebKit::WebPagePrivate::executeJavaScriptInIsolatedWorld):
1333
1334 2012-11-01  Otto Derek Cheung  <otcheung@rim.com>
1335
1336         [BlackBerry] Add a prompt to enable global location services
1337         https://bugs.webkit.org/show_bug.cgi?id=100992
1338         
1339         PR 227897
1340
1341         Reviewed by Rob Buis.
1342
1343         Adding a dialog to let the user know location services isn't enabled.
1344         Currently, the browser app does not check whether the global setting for
1345         location service is enabled. This patch adds a dialog to allow the user
1346         to open the settings app and change that setting. This infobar will only
1347         show once per session. If the user fails to turn on location services after
1348         the first prompt, all geolocation requests will automatically fail.
1349
1350         Also, adapting GeolocationClientBlackBerry to the removal of GeoTracker.
1351         The class now talks directly to the geo handler singleton.
1352
1353         * Api/WebPageClient.h:
1354         * WebCoreSupport/GeolocationClientBlackBerry.cpp:
1355         (GeolocationClientBlackBerry::GeolocationClientBlackBerry):
1356         (GeolocationClientBlackBerry::geolocationDestroyed):
1357         (GeolocationClientBlackBerry::startUpdating):
1358         (GeolocationClientBlackBerry::stopUpdating):
1359         (GeolocationClientBlackBerry::requestPermission):
1360         (GeolocationClientBlackBerry::setEnableHighAccuracy):
1361         * WebCoreSupport/GeolocationClientBlackBerry.h:
1362         (WebCore::GeolocationClientBlackBerry::requiresHighAccuracy):
1363         (GeolocationClientBlackBerry):
1364
1365 2012-11-01  Michael Matovsky  <mmatovsky@rim.com>
1366
1367         [BlackBerry] Web page view state should be preserved for pages loaded from page cache
1368         https://bugs.webkit.org/show_bug.cgi?id=100694
1369         Internal PR: 220488
1370
1371         Internally reviewed by Lianghui Chen, Joe Mason
1372         Reviewed by Rob Buis.
1373
1374         The web page view specific metadata should be preserved for web pages loaded from page cache (by using back/forward).
1375         This requires web page view state to be saved in and restored from the corresponding page cache history item.
1376
1377         * Api/WebPageClient.h:
1378         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1379         (WebCore::FrameLoaderClientBlackBerry::saveViewStateToItem):
1380         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
1381
1382 2012-11-01  Leo Yang  <leoyang@rim.com>
1383
1384         [BlackBerry] Use clipped background rect in backing store
1385         https://bugs.webkit.org/show_bug.cgi?id=100960
1386
1387         Reviewed by Yong Li.
1388         Reviewed internally by Arvid Nilsson.
1389
1390         We calculated clipped background rect but didn't really use it when painting
1391         the background. Use the correct rect to avoid ASSERT failure in platform code.
1392
1393         * Api/BackingStore.cpp:
1394         (BlackBerry::WebKit::BackingStorePrivate::paintDefaultBackground):
1395
1396 2012-10-31  George Staikos  <staikos@webkit.org>
1397
1398         [BlackBerry] Crash on html popup form control when element is deleted
1399         https://bugs.webkit.org/show_bug.cgi?id=100869
1400
1401         Reviewed by Yong Li.
1402
1403         Make the element pointers RefPtr so they don't go away before the popup
1404         is closed.
1405
1406         * WebCoreSupport/ColorPickerClient.h:
1407         (ColorPickerClient):
1408         * WebCoreSupport/DatePickerClient.h:
1409         (DatePickerClient):
1410         * WebCoreSupport/SelectPopupClient.h:
1411         (SelectPopupClient):
1412
1413 2012-10-31  Genevieve Mak  <gmak@rim.com>
1414
1415         [BLACKBERRY] Custom WebWorks context menus don't always work.
1416         https://bugs.webkit.org/show_bug.cgi?id=100891
1417
1418         Reviewed by Rob Buis.
1419
1420         Walk up the dom tree until we find the webworks attribute or run out
1421         of parent nodes.
1422         PR# 227732
1423
1424         * Api/WebPage.cpp:
1425         (BlackBerry::WebKit::WebPagePrivate::webContext):
1426
1427 2012-10-31  Otto Derek Cheung  <otcheung@rim.com>
1428
1429         [BlackBerry] Adding window.external to our port
1430         https://bugs.webkit.org/show_bug.cgi?id=100868
1431
1432         Reviewed by Rob Buis.
1433
1434         Attaching the window.external interface to the frame when
1435         it loads up.
1436
1437         When called, the external interface methods call stubs declared
1438         in ChromeClientBlackBerry. The method passes in the url of the search
1439         provider and the url of the frame. Cross-site check has to be done in the
1440         implementation PR.
1441
1442         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1443         (WebCore::ChromeClientBlackBerry::addSearchProvider):
1444         (WebCore):
1445         (WebCore::ChromeClientBlackBerry::isSearchProviderInstalled):
1446         * WebCoreSupport/ChromeClientBlackBerry.h:
1447         (ChromeClientBlackBerry):
1448         * WebCoreSupport/ExternalExtension.cpp: Added.
1449         (addSearchProviderMethod):
1450         (IsSearchProviderInstalledMethod):
1451         (externalExtensionInitialize):
1452         (externalExtensionFinalize):
1453         * WebCoreSupport/ExternalExtension.h: Added.
1454         (WebCore):
1455         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1456         (WebCore::FrameLoaderClientBlackBerry::dispatchDidClearWindowObjectInWorld):
1457
1458 2012-10-30  Peter Wang  <peter.wang@torchmobile.com.cn>
1459
1460         [BlackBerry] Clean the code of "JavaScriptDebuggerBlackBerry"
1461         https://bugs.webkit.org/show_bug.cgi?id=100724
1462
1463         Reviewed by Rob Buis.
1464
1465         Remove the code of JavaScriptDebuggerBlackBerry.
1466
1467         * Api/WebPage.cpp:
1468         * Api/WebPage.h:
1469         * Api/WebPage_p.h:
1470         (WebCore):
1471         (WebPagePrivate):
1472         * WebCoreSupport/JavaScriptDebuggerBlackBerry.cpp: Removed.
1473         * WebCoreSupport/JavaScriptDebuggerBlackBerry.h: Removed.
1474
1475 2012-10-29  Rob Buis  <rbuis@rim.com>
1476
1477         [BlackBerry] Simplify AuthenticationChallengeManager::instance
1478         https://bugs.webkit.org/show_bug.cgi?id=100614
1479
1480         Reviewed by Yong Li.
1481         Internally reviewed by Lyon Chen.
1482
1483         No need to call AuthenticationChallengeManager::init anymore.
1484
1485         * Api/BlackBerryGlobal.cpp:
1486         (BlackBerry::WebKit::globalInitialize):
1487
1488 2012-10-29  Mike Lattanzio  <mlattanzio@rim.com>
1489
1490         [BlackBerry] Typo in WebPagePrivate::postponeDocumentRecalcStyle()
1491         https://bugs.webkit.org/show_bug.cgi?id=100377
1492
1493         Reviewed by Adam Treat.
1494
1495         Should be void, not bool.
1496
1497         * Api/WebPage.cpp:
1498         (BlackBerry::WebKit::WebPagePrivate::postponeDocumentStyleRecalc):
1499         * Api/WebPage_p.h:
1500         (WebPagePrivate):
1501
1502 2012-10-29  Robin Cao  <robin.cao@torchmobile.com.cn>
1503
1504         [BlackBerry] Fix a build error
1505         https://bugs.webkit.org/show_bug.cgi?id=100649
1506
1507         Reviewed by Kentaro Hara.
1508
1509         r127876 changed the signature of WebCore::EventHandler::hitTestResultAtPoint()
1510         and this commit was later reverted. We need to update a call site in the
1511         BlackBerry port to make it build.
1512
1513         * Api/WebPage.cpp:
1514         (BlackBerry::WebKit::WebPagePrivate::hitTestResult):
1515
1516 2012-10-26  Jacky Jiang  <zhajiang@rim.com>
1517
1518         [BlackBerry][FullScreen] entering/leaving fullscreen results in temporary glitches on the screen
1519         https://bugs.webkit.org/show_bug.cgi?id=100421
1520
1521         Reviewed by Yong Li.
1522
1523         PR: 231173
1524         When leaving fullscreen, we need to suspend screen and backing store
1525         updates before setting scroll position and changing transformation and
1526         resume after they are done. In which way, we can get rid of a noticeable
1527         glitch during the transition.
1528
1529         * Api/WebPage.cpp:
1530         (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
1531
1532 2012-10-26  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
1533
1534         [BlackBerry] ASSERT currentThreadIsHoldingLock() failed in MarkedAllocator::allocateSlowCase()
1535         https://bugs.webkit.org/show_bug.cgi?id=100504
1536
1537         Reviewed by Yong Li.
1538
1539         PR #232038 The similar PR # 200724.
1540         Reviewed internally by Petter Wang.
1541
1542         This issue is same as bug 95492, and this patch is same as its patch.
1543         Hold the JSLock for the current thread before we call toRef to avoid
1544         the ASSERT failure.
1545
1546         * Api/WebPage.cpp:
1547         (BlackBerry::WebKit::WebPagePrivate::executeJavaScriptInIsolatedWorld):
1548         (BlackBerry::WebKit::WebPage::executeJavaScriptFunction):
1549
1550 2012-10-25  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
1551
1552         [BlackBerry] WebView process crashed at AuthenticationChallengeManager::pageVisibilityChanged()
1553         https://bugs.webkit.org/show_bug.cgi?id=100330
1554
1555         Reviewed by Rob Buis.
1556
1557         Reviewed internally by Charles Wei.
1558         PR #231232
1559
1560         Since AuthenticationChallengeManager keeps a map of WebPages, WebPage setting
1561         visible needs AuthenticationChallengeManager to update its records, deleting
1562         webpage from AuthenticationChallengeManager's map should be done after setting
1563         webpage visibility.
1564
1565         * Api/WebPage.cpp:
1566         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
1567
1568 2012-10-24  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
1569
1570         [BlackBerry] ASSERT(!needsOneShotDrawingSynchronization()) failed in commitRootLayerIfNeeded()
1571         https://bugs.webkit.org/show_bug.cgi?id=100214
1572
1573         Reviewed by Rob Buis.
1574
1575         ViewportSize has been changed before committing root layer, it asserts
1576         that it needs relayout and render if needed before committing if it
1577         Needs One Shot Drawing Synchronization.
1578         This patch calls requestLayoutIfNeeded() when resumeScreenAndBackingStoreUpdates().
1579
1580         Fix a coding style in the BackingStore.cpp as well.
1581
1582         Reviewed internally by Arvid Nilsson.
1583         PR #230253
1584
1585         * Api/BackingStore.cpp:
1586         (BlackBerry::WebKit::BackingStorePrivate::resumeScreenAndBackingStoreUpdates):
1587
1588 2012-10-24  Otto Derek Cheung  <otcheung@rim.com>
1589
1590         [BlackBerry] Geolocation is segfaulting
1591         https://bugs.webkit.org/show_bug.cgi?id=100305
1592
1593         Reviewed by Rob Buis.
1594
1595         We weren't wrapping the Geolocation object in a RefPtr when we call setIsAllowed in
1596         GeolocationClientBlackBerry::onPermission.
1597
1598         This patch also removes all references of the Geolocation object in WebPageClientImpl.
1599         One RefPtr<Geolocation> is used to store the reference of the WebCore object on our port.
1600
1601         We don't need a mapping between origin -> context of Geolocation because in our port,
1602         one WebPage.cpp contains one GeolocationController only. 
1603
1604         * Api/WebPageClient.h:
1605         * WebCoreSupport/GeolocationClientBlackBerry.cpp:
1606         (frameOrigin):
1607         (GeolocationClientBlackBerry::requestPermission):
1608         (GeolocationClientBlackBerry::cancelPermissionRequest):
1609         (GeolocationClientBlackBerry::onPermission):
1610         * WebCoreSupport/GeolocationClientBlackBerry.h:
1611         (GeolocationClientBlackBerry):
1612
1613 2012-10-24  Jacky Jiang  <zhajiang@rim.com>
1614
1615         [BlackBerry][Fullscreen] Roll out changes to fullscreen which rely on viewport size change [Part II]
1616         https://bugs.webkit.org/show_bug.cgi?id=100259
1617
1618         Reviewed by Rob Buis.
1619
1620         PR: 219666
1621         Revert "[BlackBerry] [FullScreen] entering/leaving fullscreen results in temporary glitches on the screen"
1622         This rolls out r128772.
1623         The patches relies on the viewport size change of the client side to
1624         resume the screen and backing store updates. However, some client
1625         sides don't need or wish to resize the WebKit viewport at all which
1626         will result in upexpected screen and backing store suspensions.
1627
1628         * Api/WebPage.cpp:
1629         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
1630         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
1631         * Api/WebPage_p.h:
1632         (WebPagePrivate):
1633         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1634         (WebCore::ChromeClientBlackBerry::enterFullScreenForElement):
1635         (WebCore::ChromeClientBlackBerry::exitFullScreenForElement):
1636
1637 2012-10-24  Jacky Jiang  <zhajiang@rim.com>
1638
1639         [BlackBerry][Fullscreen] Roll out changes to fullscreen which rely on viewport size change
1640         https://bugs.webkit.org/show_bug.cgi?id=100259
1641
1642         Reviewed by Rob Buis.
1643
1644         PR: 219666
1645         Roll out r130392 and r129909.
1646         The patches rely on the viewport size change of the client side to
1647         update the scale and scroll position of the video. However, some client
1648         sides don't need or wish to resize the WebKit viewport at all.
1649
1650         * Api/WebPage.cpp:
1651         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
1652         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
1653         (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
1654         (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
1655         * Api/WebPage_p.h:
1656         (WebPagePrivate):
1657
1658 2012-10-24  Otto Derek Cheung  <otcheung@rim.com>
1659
1660         [BlackBerry] Rename GeolocationControllerClientBlackBerry to GeolocationClientBlackBerry
1661         https://bugs.webkit.org/show_bug.cgi?id=100250
1662
1663         Reviewed by Rob Buis.
1664
1665         Rename GeolocationControllerClientBlackBerry to GeolocationClientBlackBerry
1666         to prevent confusion.
1667         PR 230196
1668
1669         * Api/WebPage.cpp:
1670         (BlackBerry::WebKit::WebPagePrivate::init):
1671         * Api/WebPage_p.h:
1672         (WebCore):
1673         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1674         * WebCoreSupport/GeolocationClientBlackBerry.cpp: Renamed from Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.cpp.
1675         (frameOrigin):
1676         (GeolocationClientBlackBerry::GeolocationClientBlackBerry):
1677         (GeolocationClientBlackBerry::geolocationDestroyed):
1678         (GeolocationClientBlackBerry::startUpdating):
1679         (GeolocationClientBlackBerry::stopUpdating):
1680         (GeolocationClientBlackBerry::lastPosition):
1681         (GeolocationClientBlackBerry::requestPermission):
1682         (GeolocationClientBlackBerry::cancelPermissionRequest):
1683         (GeolocationClientBlackBerry::onLocationUpdate):
1684         (GeolocationClientBlackBerry::onLocationError):
1685         (GeolocationClientBlackBerry::onPermission):
1686         (GeolocationClientBlackBerry::setEnableHighAccuracy):
1687         * WebCoreSupport/GeolocationClientBlackBerry.h: Renamed from Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.h.
1688         (WebKit):
1689         (WebCore):
1690         (GeolocationClientBlackBerry):
1691         (WebCore::GeolocationClientBlackBerry::tracker):
1692
1693 2012-10-24  Parth Patel  <parpatel@rim.com>
1694
1695         [BlackBerry] Extending existing ThreadUnsafe singletons in webkit to
1696         Generic ThreadUnsafe Singleton
1697         https://bugs.webkit.org/show_bug.cgi?id=100145
1698
1699         Reviewed by Rob Buis.
1700
1701         Extending the singletons to generic singleton and changing
1702         getInstance() in IconDatabaseClientBlackBerry to instance()
1703         to match the generic singleton template.
1704
1705         Reviewed Internally by Yong Li.
1706
1707         * Api/WebPage.cpp:
1708         (BlackBerry::WebKit::WebPage::initializeIconDataBase):
1709         * WebCoreSupport/IconDatabaseClientBlackBerry.cpp:
1710         (WebCore):
1711         * WebCoreSupport/IconDatabaseClientBlackBerry.h:
1712         (IconDatabaseClientBlackBerry):
1713
1714 2012-10-23  Robin Cao  <robin.cao@torchmobile.com.cn>
1715
1716         [BlackBerry] Web page renders at the wrong zoom level after viewport changes
1717         https://bugs.webkit.org/show_bug.cgi?id=100096
1718
1719         Reviewed by Rob Buis.
1720
1721         Notify the client of the zoom level change before resuming screen updates.
1722         Otherwise, the user interface thread may blit the content at the wrong
1723         zoom level in some cases. This can also prevent potential flickering.
1724
1725         Reviewed internally by Arvid Nilsson.
1726
1727         PR #225741
1728
1729         * Api/WebPage.cpp:
1730         (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint):
1731         (BlackBerry::WebKit::WebPagePrivate::zoomBlock):
1732
1733 2012-10-23  Mike Lattanzio  <mlattanzio@rim.com>
1734
1735         [BlackBerry] Cache TouchDown HitTestResult to avoid calling RenderLayer::hitTest unnecessarily
1736         https://bugs.webkit.org/show_bug.cgi?id=99649
1737
1738         Reviewed by George Staikos.
1739
1740         Random latency before scroll starts on sites like http://pintrest.com
1741         Internal PR225398
1742
1743         The chief problem here is the all the hit testing that we do for
1744         touch events and simulated mouse events. If the render tree is dirty
1745         hit tests can take a long time in Document::recalcStyle(). Masking
1746         the flags that force style recalculations will make them fast, at the
1747         expense that they might be happening on stale data.
1748
1749         Since we are only using these hit tests to look for event handlers -
1750         we're not actually modifying anything, it is better to skip the
1751         Document::recalcStyle() and save ourselves tons of time.
1752
1753         * Api/InRegionScroller.cpp:
1754         (BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint):
1755         * Api/WebPage.cpp:
1756         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
1757         (BlackBerry::WebKit::WebPage::touchEvent):
1758         (BlackBerry::WebKit::WebPagePrivate::setScrollOriginPoint):
1759         (BlackBerry::WebKit::WebPagePrivate::postponeDocumentStyleRecalc):
1760         (WebKit):
1761         (BlackBerry::WebKit::WebPagePrivate::resumeDocumentStyleRecalc):
1762         (BlackBerry::WebKit::WebPagePrivate::hitTestResult):
1763         (BlackBerry::WebKit::WebPagePrivate::clearCachedHitTestResult):
1764         * Api/WebPage_p.h:
1765         (WebPagePrivate):
1766         * WebKitSupport/FatFingers.cpp:
1767         (BlackBerry::WebKit::FatFingers::findBestPoint):
1768         (BlackBerry::WebKit::FatFingers::getRelevantInfoFromCachedHitTest):
1769         * WebKitSupport/FatFingers.h:
1770         * WebKitSupport/TouchEventHandler.cpp:
1771         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
1772
1773 2012-10-23  Rob Buis  <rbuis@rim.com>
1774
1775         [BlackBerry] Make selection in search input box not overlap cancel button
1776         https://bugs.webkit.org/show_bug.cgi?id=100130
1777
1778         Reviewed by Antonio Gomes.
1779
1780         This ensures that even when selection is active, the user can still press 'cancel'.
1781
1782         * WebKitSupport/InputHandler.cpp:
1783         (BlackBerry::WebKit::InputHandler::boundingBoxForInputField):
1784
1785 2012-10-23  Arvid Nilsson  <anilsson@rim.com>
1786
1787         [BlackBerry] Let WebKit manage the SelectionOverlay
1788         https://bugs.webkit.org/show_bug.cgi?id=99585
1789
1790         Reviewed by Rob Buis.
1791
1792         The SelectionOverlay was exposed to clients of the BlackBerry::WebKit
1793         API. However, all the information and notifications necessary to manage
1794         the SelectionOverlay are available within WebKit, so the client does
1795         not have to shoulder this responsibility.
1796
1797         Remove WebSelection and all the related plumbing. Now that nobody is
1798         using the class from the user interface thread, remove the message
1799         related code in SelectionOverlay.
1800
1801         Add two calls to SelectionOverlay::hide() that are necessary now that
1802         the client is no longer responsible for hiding it.
1803
1804         RIM PR: 225789
1805
1806         Reviewed internally by Mike Fenton.
1807
1808         * Api/WebPage.cpp:
1809         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
1810         * Api/WebPage.h:
1811         (WebKit):
1812         * Api/WebPage_p.h:
1813         (WebPagePrivate):
1814         * Api/WebSelectionOverlay.h: Removed.
1815         * WebKitSupport/SelectionHandler.cpp:
1816         (BlackBerry::WebKit::SelectionHandler::cancelSelection): Hide the overlay here, because state is reset and selection mode is no longer active
1817         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged): Also hide overlay here, to go with the call to cancelSelectionVisuals
1818         * WebKitSupport/SelectionOverlay.cpp:
1819         (BlackBerry::WebKit::SelectionOverlay::SelectionOverlay):
1820         * WebKitSupport/SelectionOverlay.h:
1821         (BlackBerry::WebKit::SelectionOverlay::create):
1822         (SelectionOverlay):
1823
1824 2012-10-22  Mike Fenton  <mifenton@rim.com>
1825
1826         [BlackBerry] Remove specialized handling for isIndex fields.
1827         https://bugs.webkit.org/show_bug.cgi?id=100004
1828
1829         Reviewed by Rob Buis.
1830
1831         PR 214342.
1832
1833         Remove special handling for isIndex field as the tag
1834         is rewritten.
1835
1836         Reviewed Internally by Yongxin Dai and Nima Ghanavatian.
1837
1838         * WebKitSupport/InputHandler.cpp:
1839         (BlackBerry::WebKit::inputStyle):
1840         (BlackBerry::WebKit::InputHandler::elementType):
1841
1842 2012-10-22  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
1843
1844         [Qt] Fix "ASSERTION FAILED: !document->inPageCache()" when loading a page
1845         https://bugs.webkit.org/show_bug.cgi?id=98514
1846
1847         Reviewed by Kenneth Rohde Christiansen.
1848
1849         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1850         (WebCore::FrameLoaderClientBlackBerry::transitionToCommittedForNewPage):
1851
1852 2012-10-20  Andrew Lo  <anlo@rim.com>
1853
1854         [BlackBerry] m_mainFrame should be null checked before use in WebPagePrivate destructor
1855         https://bugs.webkit.org/show_bug.cgi?id=99916
1856
1857         Reviewed by George Staikos.
1858         Internally reviewed by Arvid Nilsson.
1859
1860         Internal PR228029
1861         Add null checks for m_mainFrame for things that happen during
1862         WebPage destruction.
1863
1864         * Api/WebPage.cpp:
1865         (BlackBerry::WebKit::WebPagePrivate::setVisible):
1866         (BlackBerry::WebKit::WebPagePrivate::setCompositorDrawsRootLayer):
1867
1868 2012-10-19  Mike Fenton  <mifenton@rim.com>
1869
1870         [BlackBerry] Convert input style to int64_t
1871         https://bugs.webkit.org/show_bug.cgi?id=99848
1872
1873         Reviewed by Yong Li.
1874
1875         PR 227381.
1876
1877         Switch input style mask to int64_t to match the the updated definition.
1878
1879         Reviewed Internally by Nima Ghanavatian.
1880
1881         * Api/WebPageClient.h:
1882         * WebKitSupport/InputHandler.cpp:
1883         (BlackBerry::WebKit::inputStyle):
1884         * WebKitSupport/InputHandler.h:
1885         (InputHandler):
1886
1887 2012-10-19  Mike Fenton  <mifenton@rim.com>
1888
1889         [BlackBerry] Move all keyboard type calculations into InputHandler.
1890         https://bugs.webkit.org/show_bug.cgi?id=99847
1891
1892         Reviewed by Yong Li.
1893
1894         PR 227381.
1895
1896         Move all keyboard type calculations into webkit and avoid passing type
1897         information to the webview.
1898
1899         Reviewed Internally by Nima Ghanavatian.
1900
1901         * Api/WebPageClient.h:
1902         * WebKitSupport/InputHandler.cpp:
1903         (BlackBerry::WebKit::convertInputTypeToVKBType):
1904         (WebKit):
1905         (BlackBerry::WebKit::InputHandler::setElementFocused):
1906
1907 2012-10-19  Jacky Jiang  <zhajiang@rim.com>
1908
1909         [BlackBerry] Page viewport aspect ratio not kept on navigating back
1910         https://bugs.webkit.org/show_bug.cgi?id=99760
1911
1912         Reviewed by Yong Li.
1913         Internally reviewed by Konrad Piascik
1914
1915         PR: 222437
1916         This is to fix the second issue on PR222437 that the viewport not kept
1917         when navigating back from google after rotation to bloomberg.
1918         We were trying to restore the history contents size and scale of
1919         bloomberg which has virtual viewport. The scale would be recalculated
1920         based on the new screen size. However, we would still use the current
1921         contents size if it was greater than the history contents size in
1922         FrameView::setContentsSize which made the contents seem to be scaled
1923         too much.
1924         Actually when we relayout the contents after rotation change, the
1925         current contents size which is based on the virtual viewport has taken
1926         the screen size into account. Shrinking the contents size will be
1927         expensive. So we can ignore screen size based scale calculation here.
1928
1929         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1930         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
1931
1932 2012-10-19  Mike Fenton  <mifenton@rim.com>
1933
1934         [BlackBerry] Add input logs to InputHandler::ensureFocusTextElementVisible.
1935         https://bugs.webkit.org/show_bug.cgi?id=99837
1936
1937         Reviewed by Antonio Gomes.
1938
1939         Add input logs for InputHandler::ensureFocusTextElementVisible.
1940
1941         Reviewed Internally by Nima Ghanavatian.
1942
1943         * WebKitSupport/InputHandler.cpp:
1944         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
1945
1946 2012-10-19  Andrew Lo  <anlo@rim.com>
1947
1948         [BlackBerry] Should suspend AnimationController when WebPage becomes invisible.
1949         https://bugs.webkit.org/show_bug.cgi?id=99844
1950
1951         Reviewed by Yong Li.
1952         Internally reviewed by Arvid Nilsson & Yong Li.
1953
1954         Suspend animation controller when the tab becomes invisible,
1955         in addition to suspending scripted animations.
1956
1957         * Api/WebPage.cpp:
1958         (BlackBerry::WebKit::WebPagePrivate::setVisible):
1959
1960 2012-10-19  Mike Fenton  <mifenton@rim.com>
1961
1962         [BlackBerry] Don't attempt to auto scroll on input for Fixed Position elements.
1963         https://bugs.webkit.org/show_bug.cgi?id=99833
1964
1965         Reviewed by Antonio Gomes.
1966
1967         PR 195024.
1968
1969         Don't attempt to scroll fixed position elements.
1970
1971         Reviewed Internally by Arvid Nilsson.
1972
1973         * WebKitSupport/DOMSupport.cpp:
1974         (BlackBerry::WebKit::DOMSupport::isFixedPositionOrHasFixedPositionAncestor):
1975         (DOMSupport):
1976         * WebKitSupport/DOMSupport.h:
1977         (WebCore):
1978         * WebKitSupport/InputHandler.cpp:
1979         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
1980
1981 2012-10-18  Jacky Jiang  <zhajiang@rim.com>
1982
1983         [BlackBerry] Page viewport aspect ratio not kept on navigating back
1984         https://bugs.webkit.org/show_bug.cgi?id=99760
1985
1986         Reviewed by Rob Buis.
1987         Internally reviewed by Konrad Piascik.
1988
1989         PR: 190469
1990         This was added in r127628 which was trying to fix some rendering
1991         defects on maps.google.com and news.qq.com, however it was very harmful
1992         and caused regressions.
1993         zoomToFitScale() depends on the current contents size. During history
1994         navigation and device rotation, if zoomToFitScale() is based on the
1995         final contents size which is expected, there will still be a scale
1996         calculation like this afterwards
1997         screenSize.width()/screenSize.height()*zoomToFitScale() which will
1998         result in a wrong scale. During the history navigation, if
1999         zoomToFitScale() isn't based on the final contents size, then we will
2000         get the wrong scale as well for sure.
2001         This issue will be fixed by removing the wrong calculation.
2002         The original issue of r127628 was fixed by the patch of PR225981.
2003
2004         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2005         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
2006
2007 2012-10-18  John Griggs  <jgriggs@rim.com>
2008
2009         2012-10-18  John Griggs  <jgriggs@rim.com>
2010
2011         Crash in InRegionScrollableArea constructor while loading page
2012         https://bugs.webkit.org/show_bug.cgi?id=99733
2013
2014         Reviewed by Antonio Gomes.
2015
2016         Check scrollLayer and avoid constructing InRegionScrollableArea when it is NULL.
2017
2018         * Api/InRegionScroller.cpp:
2019         (BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint):
2020
2021 2012-10-17  Jacky Jiang  <zhajiang@rim.com>
2022
2023         [BlackBerry] Possible redundant zoomToInitialScaleOnLoad() in WebPagePrivate::setLoadState
2024         https://bugs.webkit.org/show_bug.cgi?id=99624
2025
2026         Reviewed by Rob Buis.
2027         Internally reviewed by Arvid Nilsson
2028
2029         PR: 225981
2030         Several reasons to eliminate the ancient unnecessary
2031         zoomToInitialScaleOnLoad() in WebPagePrivate::setLoadState committed:
2032         - At this point, we have only committed the data we received.
2033         - For the new load, we haven't started parsing the tokens and building
2034           the DOM tree and the first layout will happen after that.
2035         - For the load restored from cache, the first layout will happen after
2036           setLoadState committed which is called by
2037           FrameLoader::dispatchDidCommitLoad().
2038         - zoomToInitialScaleOnLoad() can still be called after the first
2039           layout finished.
2040         - zoomToInitialScaleOnLoad() is expensive and it will boost the load
2041           performance after the removal.
2042         - Removal of this can fix some weird rendering defects on yahoo.com,
2043           maps.google.com, news.qq.com and so on during load and rotation
2044           mentioned on the PR.
2045
2046         * Api/WebPage.cpp:
2047         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
2048
2049 2012-10-17  Mike Fenton  <mifenton@rim.com>
2050
2051         [BlackBerry] Prevent focus zoom on non-userscalable pages.
2052         https://bugs.webkit.org/show_bug.cgi?id=99608
2053
2054         Reviewed by Rob Buis.
2055
2056         PR 222378.
2057
2058         Disable focus zoom when the page is non-user scalable.
2059
2060         Reviewed Internally by Nima Ghanavatian.
2061
2062         * WebKitSupport/InputHandler.cpp:
2063         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
2064
2065 2012-10-16  Mike Lattanzio  <mlattanzio@rim.com>
2066
2067         2012-10-16  Mike Lattanzio  <mlattanzio@rim.com>
2068
2069         [BlackBerry] calculateInRegionScrollableAreasForPoint should use a ReadOnly HitTest
2070         https://bugs.webkit.org/show_bug.cgi?id=99497
2071
2072         Reviewed by Antonio Gomes.
2073
2074         Fix calculateInRegionScrollableAreasForPoint to use a ReadOnly
2075         hit test to improve its performance.
2076
2077         * Api/InRegionScroller.cpp:
2078         (BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint):
2079
2080 2012-10-15  Peter Wang  <peter.wang@torchmobile.com.cn>
2081
2082         [BlackBerry] Web Inspector: Remove the useless preferences items in "inspectorBB.js"
2083         https://bugs.webkit.org/show_bug.cgi?id=99404
2084
2085         Reviewed by George Staikos.
2086
2087         In "inspectorBB.js", remove the useless preferences items to catch up the new code of frontend.
2088
2089         * WebCoreSupport/inspectorBB.js:
2090
2091 2012-10-15  Jakob Petsovits  <jpetsovits@rim.com>
2092
2093         [BlackBerry] Only reallocate buffers that were allocated before suspending
2094         https://bugs.webkit.org/show_bug.cgi?id=99205
2095         RIM PR 99395
2096
2097         Reviewed by Antonio Gomes.
2098
2099         When we call releaseBuffers(), not all of the backingstore
2100         tile buffers might have been allocated yet. Still we try
2101         to release all of them, which causes us to lazy-initialize
2102         the tile buffers so we can release them again.
2103
2104         This is stupid and we should just ignore buffers that
2105         haven't been initialized yet. This patch makes that change.
2106
2107         * WebKitSupport/BackingStoreTile.cpp:
2108         (BlackBerry::WebKit::TileBuffer::wasNativeBufferCreated):
2109         (WebKit):
2110         * WebKitSupport/BackingStoreTile.h:
2111         (TileBuffer):
2112         * WebKitSupport/SurfacePool.cpp:
2113         (BlackBerry::WebKit::SurfacePool::createBuffers):
2114         (BlackBerry::WebKit::SurfacePool::releaseBuffers):
2115
2116 2012-10-15  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2117
2118         [BlackBerry] replace BlackBerry::Platform::log() with BBLOG()
2119         https://bugs.webkit.org/show_bug.cgi?id=99302
2120
2121         Reviewed by Rob Buis.
2122
2123         RIM PR: 210884
2124         The marco BBLOG() is defined as a no-op in release mode which will
2125         save a function call in the release build.
2126         Internally reviewed by Charles Wei.
2127
2128         * Api/BackingStore.cpp:
2129         (BlackBerry::WebKit::bestDivisor):
2130         (BlackBerry::WebKit::BackingStorePrivate::suspendScreenAndBackingStoreUpdates):
2131         (BlackBerry::WebKit::BackingStorePrivate::resumeScreenAndBackingStoreUpdates):
2132         (BlackBerry::WebKit::BackingStorePrivate::repaint):
2133         (BlackBerry::WebKit::BackingStorePrivate::slowScroll):
2134         (BlackBerry::WebKit::BackingStorePrivate::scroll):
2135         (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect):
2136         (BlackBerry::WebKit::BackingStorePrivate::scrollBackingStore):
2137         (BlackBerry::WebKit::BackingStorePrivate::render):
2138         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
2139         (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion):
2140         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
2141         (BlackBerry::WebKit::BackingStorePrivate::blitToWindow):
2142         (BlackBerry::WebKit::BackingStorePrivate::fillWindow):
2143         (BlackBerry::WebKit::BackingStorePrivate::invalidateWindow):
2144         (BlackBerry::WebKit::BackingStorePrivate::clearWindow):
2145         * Api/WebPage.cpp:
2146         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
2147         (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint):
2148         (BlackBerry::WebKit::WebPagePrivate::contentsSizeChanged):
2149         (BlackBerry::WebKit::WebPagePrivate::zoomToInitialScaleOnLoad):
2150         (BlackBerry::WebKit::WebPagePrivate::scheduleRootLayerCommit):
2151         (BlackBerry::WebKit::WebPagePrivate::commitRootLayer):
2152         (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
2153         (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
2154         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2155         (WebCore::ChromeClientBlackBerry::overflowExceedsContentsSize):
2156         (WebCore::ChromeClientBlackBerry::didDiscoverFrameSet):
2157         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2158         (WebCore::FrameLoaderClientBlackBerry::dispatchDidLayout):
2159         * WebKitSupport/FatFingers.cpp:
2160         (BlackBerry::WebKit::FatFingers::checkFingerIntersection):
2161         (BlackBerry::WebKit::FatFingers::findIntersectingRegions):
2162         (BlackBerry::WebKit::FatFingers::checkForText):
2163         * WebKitSupport/RenderQueue.cpp:
2164         (BlackBerry::WebKit::RenderQueue::addToRegularQueue):
2165         (BlackBerry::WebKit::RenderQueue::addToScrollZoomQueue):
2166         (BlackBerry::WebKit::RenderQueue::render):
2167         (BlackBerry::WebKit::RenderQueue::renderAllCurrentRegularRenderJobs):
2168         (BlackBerry::WebKit::RenderQueue::startRegularRenderJobBatchIfNeeded):
2169         (BlackBerry::WebKit::RenderQueue::renderVisibleZoomJob):
2170         (BlackBerry::WebKit::RenderQueue::renderVisibleScrollJob):
2171         (BlackBerry::WebKit::RenderQueue::renderRegularRenderJob):
2172         (BlackBerry::WebKit::RenderQueue::renderNonVisibleScrollJob):
2173         * WebKitSupport/SurfacePool.cpp:
2174         (BlackBerry::WebKit::SurfacePool::initialize):
2175
2176 2012-10-15  Xiaobo Wang  <xbwang@torchmobile.com.cn>
2177
2178         [BlackBerry] [DRT] Skip region of interest zooming when running DRT
2179         https://bugs.webkit.org/show_bug.cgi?id=97663
2180
2181         Reviewed by Rob Buis.
2182
2183         This patch fixes test fast/forms/textarea-scrolled-endline-caret.html, and
2184         1. Add a global function isRunningDrt to check if we're currently running DRT.
2185         2. Use the new function in places where getenv("drtRun") is used.
2186
2187         * Api/BlackBerryGlobal.cpp:
2188         (BlackBerry::WebKit::isRunningDrt):
2189         (WebKit):
2190         * Api/BlackBerryGlobal.h:
2191         (WebKit):
2192         * Api/WebPage.cpp:
2193         (BlackBerry::WebKit::WebPagePrivate::init):
2194         * WebKitSupport/DumpRenderTreeSupport.cpp:
2195         (toGeolocationClientMock):
2196         * WebKitSupport/InputHandler.cpp:
2197         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
2198
2199 2012-10-15  George Staikos  <staikos@webkit.org>
2200
2201         [BlackBerry] Adapt to Platform API changes in string handling
2202         https://bugs.webkit.org/show_bug.cgi?id=99248
2203
2204         Reviewed by Yong Li.
2205
2206         Convert usage of WebString, char* and std::string to BlackBerry::Platform::String.
2207
2208         * Api/BlackBerryGlobal.cpp:
2209         (BlackBerry::WebKit::clearAppCache):
2210         (BlackBerry::WebKit::clearDatabase):
2211         * Api/BlackBerryGlobal.h:
2212         (Platform):
2213         (WebKit):
2214         * Api/JavaScriptVariant.cpp:
2215         (BlackBerry::WebKit::JSValueRefToBlackBerryJavaScriptVariant):
2216         (BlackBerry::WebKit::BlackBerryJavaScriptVariantToJSValueRef):
2217         (BlackBerry::WebKit::JavaScriptVariant::JavaScriptVariant):
2218         (WebKit):
2219         (BlackBerry::WebKit::JavaScriptVariant::~JavaScriptVariant):
2220         (BlackBerry::WebKit::JavaScriptVariant::setType):
2221         (BlackBerry::WebKit::JavaScriptVariant::setString):
2222         (BlackBerry::WebKit::JavaScriptVariant::stringValue):
2223         * Api/JavaScriptVariant.h:
2224         * Api/WebAnimation.cpp:
2225         (BlackBerry::WebKit::WebAnimation::fadeAnimation):
2226         (BlackBerry::WebKit::WebAnimation::name):
2227         * Api/WebAnimation.h:
2228         * Api/WebCookieJar.cpp:
2229         (BlackBerry::WebKit::WebCookieJar::cookies):
2230         (BlackBerry::WebKit::WebCookieJar::setCookies):
2231         * Api/WebCookieJar.h:
2232         (Platform):
2233         (BlackBerry):
2234         (WebKit):
2235         * Api/WebKitMIMETypeConverter.cpp:
2236         (BlackBerry::WebKit::getExtensionForMimeType):
2237         (BlackBerry::WebKit::getMimeTypeForExtension):
2238         * Api/WebKitMIMETypeConverter.h:
2239         (Platform):
2240         (BlackBerry):
2241         (WebKit):
2242         * Api/WebKitTextCodec.cpp:
2243         (BlackBerry::WebKit::base64Decode):
2244         (BlackBerry::WebKit::base64Encode):
2245         (BlackBerry::WebKit::unescapeURL):
2246         (BlackBerry::WebKit::escapeURL):
2247         * Api/WebKitTextCodec.h:
2248         (Platform):
2249         (BlackBerry):
2250         * Api/WebOverlay.cpp:
2251         (BlackBerry::WebKit::WebOverlay::removeAnimation):
2252         * Api/WebOverlay.h:
2253         (Platform):
2254         (BlackBerry):
2255         (WebKit):
2256         * Api/WebOverlayOverride.cpp:
2257         (BlackBerry::WebKit::WebOverlayOverride::removeAnimation):
2258         * Api/WebOverlayOverride.h:
2259         (Platform):
2260         (BlackBerry):
2261         (WebKit):
2262         * Api/WebPage.cpp:
2263         (BlackBerry::WebKit::WebPage::autofillTextField):
2264         (BlackBerry::WebKit::WebPage::renderTreeAsText):
2265         (BlackBerry::WebKit::WebPage::WebPage):
2266         (BlackBerry::WebKit::WebPagePrivate::init):
2267         (BlackBerry::WebKit::WebPagePrivate::load):
2268         (BlackBerry::WebKit::WebPage::load):
2269         (BlackBerry::WebKit::WebPage::loadFile):
2270         (BlackBerry::WebKit::WebPage::download):
2271         (BlackBerry::WebKit::WebPagePrivate::loadString):
2272         (BlackBerry::WebKit::WebPage::loadString):
2273         (BlackBerry::WebKit::WebPagePrivate::executeJavaScript):
2274         (BlackBerry::WebKit::WebPage::executeJavaScript):
2275         (BlackBerry::WebKit::WebPagePrivate::executeJavaScriptInIsolatedWorld):
2276         (BlackBerry::WebKit::WebPage::executeJavaScriptInIsolatedWorld):
2277         (BlackBerry::WebKit::WebPage::executeJavaScriptFunction):
2278         (BlackBerry::WebKit::WebPagePrivate::addOriginAccessWhitelistEntry):
2279         (BlackBerry::WebKit::WebPage::addOriginAccessWhitelistEntry):
2280         (BlackBerry::WebKit::WebPagePrivate::removeOriginAccessWhitelistEntry):
2281         (BlackBerry::WebKit::WebPage::removeOriginAccessWhitelistEntry):
2282         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
2283         (BlackBerry::WebKit::WebPagePrivate::syncProxyCredential):
2284         (BlackBerry::WebKit::WebPagePrivate::notifyPopupAutofillDialog):
2285         (BlackBerry::WebKit::WebPagePrivate::webContext):
2286         (BlackBerry::WebKit::WebPage::setDateTimeInput):
2287         (BlackBerry::WebKit::WebPage::setColorInput):
2288         (BlackBerry::WebKit::WebPage::textEncoding):
2289         (BlackBerry::WebKit::WebPage::forcedTextEncoding):
2290         (BlackBerry::WebKit::WebPage::setForcedTextEncoding):
2291         (BlackBerry::WebKit::WebPage::title):
2292         (BlackBerry::WebKit::WebPage::selectedText):
2293         (BlackBerry::WebKit::WebPage::cutSelectedText):
2294         (BlackBerry::WebKit::WebPage::insertText):
2295         (BlackBerry::WebKit::WebPage::getBackForwardList):
2296         (BlackBerry::WebKit::WebPage::onCertificateStoreLocationSet):
2297         (BlackBerry::WebKit::WebPage::dispatchInspectorMessage):
2298         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
2299         (BlackBerry::WebKit::WebPage::textHasAttribute):
2300         (BlackBerry::WebKit::WebPage::setAllowNotification):
2301         (BlackBerry::WebKit::WebPagePrivate::defaultUserAgent):
2302         * Api/WebPage.h:
2303         * Api/WebPageClient.h:
2304         * Api/WebPage_p.h:
2305         (WebPagePrivate):
2306         * Api/WebSettings.cpp:
2307         (BlackBerry::WebKit::WebSettings::standardSettings):
2308         (BlackBerry::WebKit::WebSettings::addSupportedObjectPluginMIMEType):
2309         (BlackBerry::WebKit::WebSettings::isSupportedObjectMIMEType):
2310         (BlackBerry::WebKit::WebSettings::serifFontFamily):
2311         (BlackBerry::WebKit::WebSettings::setSerifFontFamily):
2312         (BlackBerry::WebKit::WebSettings::fixedFontFamily):
2313         (BlackBerry::WebKit::WebSettings::setFixedFontFamily):
2314         (BlackBerry::WebKit::WebSettings::sansSerifFontFamily):
2315         (BlackBerry::WebKit::WebSettings::setSansSerifFontFamily):
2316         (BlackBerry::WebKit::WebSettings::standardFontFamily):
2317         (BlackBerry::WebKit::WebSettings::setStandardFontFamily):
2318         (BlackBerry::WebKit::WebSettings::userAgentString):
2319         (BlackBerry::WebKit::WebSettings::setUserAgentString):
2320         (BlackBerry::WebKit::WebSettings::defaultTextEncodingName):
2321         (BlackBerry::WebKit::WebSettings::setDefaultTextEncodingName):
2322         (BlackBerry::WebKit::WebSettings::userStyleSheetString):
2323         (BlackBerry::WebKit::WebSettings::setUserStyleSheetString):
2324         (BlackBerry::WebKit::WebSettings::userStyleSheetLocation):
2325         (BlackBerry::WebKit::WebSettings::setUserStyleSheetLocation):
2326         (BlackBerry::WebKit::WebSettings::localStoragePath):
2327         (BlackBerry::WebKit::WebSettings::setLocalStoragePath):
2328         (BlackBerry::WebKit::WebSettings::indexedDataBasePath):
2329         (BlackBerry::WebKit::WebSettings::setIndexedDataBasePath):
2330         (BlackBerry::WebKit::WebSettings::databasePath):
2331         (BlackBerry::WebKit::WebSettings::setDatabasePath):
2332         (BlackBerry::WebKit::WebSettings::appCachePath):
2333         (BlackBerry::WebKit::WebSettings::setAppCachePath):
2334         (BlackBerry::WebKit::WebSettings::pageGroupName):
2335         (BlackBerry::WebKit::WebSettings::setPageGroupName):
2336         * Api/WebSettings.h:
2337         * Api/WebString.cpp: Removed.
2338         * Api/WebString.h: Removed.
2339         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2340         (WebCore::ChromeClientBlackBerry::runJavaScriptPrompt):
2341         (WebCore::ChromeClientBlackBerry::createWindow):
2342         (WebCore::ChromeClientBlackBerry::runOpenPanel):
2343         (WebCore):
2344         * WebCoreSupport/ChromeClientBlackBerry.h:
2345         (ChromeClientBlackBerry):
2346         * WebCoreSupport/ClientExtension.cpp:
2347         (clientExtensionMethod):
2348         * WebCoreSupport/ColorPickerClient.cpp:
2349         (WebCore::ColorPickerClient::ColorPickerClient):
2350         (WebCore::ColorPickerClient::generateHTML):
2351         * WebCoreSupport/ColorPickerClient.h:
2352         (Platform):
2353         (BlackBerry):
2354         (WebKit):
2355         (ColorPickerClient):
2356         * WebCoreSupport/CredentialManager.cpp:
2357         (WebCore::CredentialManager::autofillAuthenticationChallenge):
2358         * WebCoreSupport/CredentialManager.h:
2359         (Platform):
2360         (CredentialManager):
2361         * WebCoreSupport/DatePickerClient.cpp:
2362         (WebCore::DatePickerClient::DatePickerClient):
2363         (WebCore::DatePickerClient::generateHTML):
2364         * WebCoreSupport/DatePickerClient.h:
2365         (Platform):
2366         (BlackBerry):
2367         (WebKit):
2368         (DatePickerClient):
2369         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2370         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForResponse):
2371         (WebCore::FrameLoaderClientBlackBerry::createDocumentLoader):
2372         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFinishLoad):
2373         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad):
2374         (WebCore::FrameLoaderClientBlackBerry::dispatchCreatePage):
2375         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendRequest):
2376         (WebCore::FrameLoaderClientBlackBerry::loadIconExternally):
2377         (WebCore::FrameLoaderClientBlackBerry::startDownload):
2378         (WebCore::FrameLoaderClientBlackBerry::dispatchDidReceiveIcon):
2379         * WebCoreSupport/IconDatabaseClientBlackBerry.cpp:
2380         * WebCoreSupport/NotificationPresenterImpl.cpp:
2381         (WebCore::NotificationPresenterImpl::show):
2382         (WebCore::NotificationPresenterImpl::cancel):
2383         (WebCore::NotificationPresenterImpl::requestPermission):
2384         (WebCore::NotificationPresenterImpl::onPermission):
2385         (WebCore::NotificationPresenterImpl::notificationClicked):
2386         * WebCoreSupport/NotificationPresenterImpl.h:
2387         (Platform):
2388         (NotificationPresenterImpl):
2389         * WebCoreSupport/SelectPopupClient.cpp:
2390         (WebCore::SelectPopupClient::SelectPopupClient):
2391         (WebCore::SelectPopupClient::update):
2392         (WebCore::SelectPopupClient::generateHTML):
2393         * WebCoreSupport/SelectPopupClient.h:
2394         (Platform):
2395         (BlackBerry):
2396         (SelectPopupClient):
2397         * WebCoreSupport/UserMediaClientImpl.cpp:
2398         (WebCore::toMediaStreamSource):
2399         (WebCore::toMediaStreamDescriptor):
2400         (WebCore::UserMediaClientImpl::requestUserMedia):
2401         (WebCore::UserMediaClientImpl::cancelUserMediaRequest):
2402         * WebKitSupport/AboutData.cpp:
2403         (BlackBerry::WebKit::cachePage):
2404         * WebKitSupport/InputHandler.cpp:
2405         (BlackBerry::WebKit::convertStringToWchar):
2406         (BlackBerry::WebKit::convertStringToWcharVector):
2407         (BlackBerry::WebKit::convertSpannableStringToString):
2408         (BlackBerry::WebKit::InputHandler::learnText):
2409         (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
2410         (BlackBerry::WebKit::InputHandler::openDatePopup):
2411         (BlackBerry::WebKit::InputHandler::openSelectPopup):
2412         (BlackBerry::WebKit::InputHandler::setText):
2413         * WebKitSupport/SelectionHandler.cpp:
2414         (BlackBerry::WebKit::SelectionHandler::selectedText):
2415         * WebKitSupport/SelectionHandler.h:
2416         (Platform):
2417         (WebKit):
2418         (SelectionHandler):
2419         * WebKitSupport/SurfacePool.cpp:
2420         (BlackBerry::WebKit::SurfacePool::sharedPixmapGroup):
2421         * WebKitSupport/SurfacePool.h:
2422         (SurfacePool):
2423
2424 2012-10-15  Antonio Gomes  <agomes@rim.com>
2425
2426         [BlackBerry] Clean up BackingStoreClient (part II)
2427         https://bugs.webkit.org/show_bug.cgi?id=99327
2428
2429         Reviewed by Yong Li.
2430
2431         Remove more unneeded BackingStoreClient <-> WebPageClient integration
2432         methods:
2433         - BackingStoreClient* backingStoreClientForFrame(...)
2434         - void addBackingStoreClientForFrame(...)
2435         - void removeBackingStoreClientForFrame(...)
2436
2437         Change places calling WPPriv::backingStoreClientForFrame to directly
2438         access WPPriv::backingStoreClient instead, since only the main frame will
2439         have a BackingStoreClient instance associated with it, and it is owned by
2440         the WKPriv.
2441
2442         Remove non-mainframe only references to BackingStoreClient completely,
2443         since it is dead code now.
2444
2445         * Api/InRegionScroller.cpp:
2446         (BlackBerry::WebKit::InRegionScrollerPrivate::setLayerScrollPosition):
2447         * Api/WebPage.cpp:
2448         (BlackBerry::WebKit::WebPagePrivate::backingStoreClient):
2449         (BlackBerry::WebKit::WebPage::destroy):
2450         * Api/WebPage_p.h:
2451         (WebPagePrivate):
2452         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2453         (WebCore::ChromeClientBlackBerry::invalidateContentsForSlowScroll):
2454         (WebCore::ChromeClientBlackBerry::scroll):
2455         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2456         (WebCore::FrameLoaderClientBlackBerry::transitionToCommittedForNewPage):
2457         (WebCore::FrameLoaderClientBlackBerry::createFrame):
2458         (WebCore::FrameLoaderClientBlackBerry::detachedFromParent2):
2459         * WebKitSupport/BackingStoreClient.cpp:
2460         (BlackBerry::WebKit::BackingStoreClient::create):
2461         (BlackBerry::WebKit::BackingStoreClient::BackingStoreClient):
2462         (BlackBerry::WebKit::BackingStoreClient::~BackingStoreClient):
2463         * WebKitSupport/BackingStoreClient.h:
2464         (BackingStoreClient):
2465         * WebKitSupport/InputHandler.cpp:
2466         (BlackBerry::WebKit::InputHandler::setBatchEditingActive):
2467
2468 2012-10-15  Antonio Gomes  <agomes@rim.com>
2469
2470         [BlackBerry] Clean up BackingStoreClient (part I)
2471         https://bugs.webkit.org/show_bug.cgi?id=99327
2472
2473         Reviewed by Yong Li.
2474
2475         Now that we won't use the BackingStoreClient code path to scroll inner frames at all
2476         (instead we use AC layers!), we can remove all "!isMainFrame" code paths.
2477
2478         No behavior change, since the code path being removed was not in use.
2479
2480         * WebKitSupport/BackingStoreClient.cpp:
2481         (BlackBerry::WebKit::BackingStoreClient::absoluteRect):
2482         (BlackBerry::WebKit::BackingStoreClient::transformedActualVisibleSize):
2483         (BlackBerry::WebKit::BackingStoreClient::viewportSize):
2484         (BlackBerry::WebKit::BackingStoreClient::transformedViewportSize):
2485         (BlackBerry::WebKit::BackingStoreClient::visibleContentsRect):
2486         (BlackBerry::WebKit::BackingStoreClient::transformedVisibleContentsRect):
2487         (BlackBerry::WebKit::BackingStoreClient::checkOriginOfCurrentScrollOperation):
2488
2489 2012-10-13  Jakob Petsovits  <jpetsovits@rim.com>
2490
2491         [BlackBerry] Fetch blit rects from a viewport accessor
2492         https://bugs.webkit.org/show_bug.cgi?id=98581
2493         RIM PR 173292
2494
2495         Reviewed by George Staikos.
2496         Internally reviewed by Arvid Nilsson.
2497
2498         The long-standing userInterfaceBlittedVisibleContentsRect()
2499         method in WebPageClient has long been a major annoyance,
2500         as it returns the source rect for WebKit contents but in
2501         backingstore pixel coordinates. This makes it not only
2502         unwieldy but also terribly fragile, especially when
2503         both pinch zoom and a backingstore re-render both deal
2504         with the same rectangle. On different threads, even.
2505
2506         BlackBerry::Platform now exposes a ViewportAccessor
2507         interface, which can be used to get the various rects
2508         in document coordinates or target pixel coordinates,
2509         both being a better choice than the ones dependent
2510         on an implentation detail.
2511
2512         This commit makes use of this new functionality.
2513         Instead of relying on the passed rectangle to contain
2514         implicit information about the scale factor, we now
2515         track the scale of each backingstore geometry by making
2516         a snapshot of the current WebKit-thread scale when the
2517         geometry is generated. Once the geometry is swapped to
2518         the front, we can then calculate the remaining
2519         backingstore-to-viewport transformation in a threadsafe
2520         way. We now only calculate this if we actually blit from
2521         backingstore tiles and don't go through a configuration
2522         of pure accelerated compositing.
2523
2524         As a result, we are now a lot more robust against
2525         synchonization issues related to backingstore
2526         geometry changes. As an additional gimmick, the scale
2527         is also stored with each tile buffer to doubly secure
2528         that a tile rendered in one scale is not transferred
2529         to a different geometry and then rendered there without
2530         being rerendered at the new scale, even if the rendered
2531         pixel coordinates are still the same.
2532
2533         Having per-geometry scale information also opens up
2534         opportunities to further improve backingstore rendering
2535         later. For instance, we could pre-render a low-res
2536         version of the page onto one buffer and combine that one
2537         with a higher-res array of tiles covering a smaller area.
2538         Or we could steal some tiles from the front geometry to
2539         render them at a new scale while a pinch-zoom operation
2540         is in progress.
2541
2542         No such thing is implemented in this patch though.
2543
2544         In adapting/fixing the backingstore visualization
2545         debug mode and the default background painting in
2546         renderDirectToWindow(), we also introduce new
2547         ViewportAccessor subclasses that can subsequently
2548         be used to replace methods from WebPage and elsewhere.
2549
2550         * Api/BackingStore.cpp:
2551         (BlackBerry::WebKit::BackingStorePrivate::slowScroll):
2552         (BlackBerry::WebKit::BackingStorePrivate::scroll):
2553         (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect):
2554         (BlackBerry::WebKit::BackingStorePrivate::scrollBackingStore):
2555         (BlackBerry::WebKit::BackingStorePrivate::renderDirectToWindow):
2556         (BlackBerry::WebKit::BackingStorePrivate::render):
2557         (BlackBerry::WebKit::BackingStorePrivate::paintDefaultBackground):
2558         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
2559         (BlackBerry::WebKit::BackingStorePrivate::blitHorizontalScrollbar):
2560         (BlackBerry::WebKit::BackingStorePrivate::blitVerticalScrollbar):
2561         (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion):
2562         (BlackBerry::WebKit::BackingStorePrivate::updateTileMatrixIfNeeded):
2563         (BlackBerry::WebKit::BackingStorePrivate::orientationChanged):
2564         (BlackBerry::WebKit::BackingStorePrivate::createSurfaces):
2565         (BlackBerry::WebKit::BackingStorePrivate::invalidateWindow):
2566         * Api/BackingStore_p.h:
2567         (BlackBerry):
2568         (Platform):
2569         (BlackBerry::WebKit::BackingStoreGeometry::BackingStoreGeometry):
2570         (BlackBerry::WebKit::BackingStoreGeometry::scale):
2571         (BlackBerry::WebKit::BackingStoreGeometry::setScale):
2572         (BackingStoreGeometry):
2573         (BackingStorePrivate):
2574         * Api/WebPage.cpp:
2575         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
2576         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
2577         (BlackBerry::WebKit::WebPagePrivate::init):
2578         (BlackBerry::WebKit::WebPage::webkitThreadViewportAccessor):
2579         (WebKit):
2580         * Api/WebPage.h:
2581         (Platform):
2582         * Api/WebPageClient.h:
2583         (Platform):
2584         * Api/WebPageCompositor.cpp:
2585         (BlackBerry::WebKit::WebPageCompositorPrivate::animationFrameChanged):
2586         * Api/WebPage_p.h:
2587         (WebKit):
2588         (WebPagePrivate):
2589         * WebKitSupport/BackingStoreTile.cpp:
2590         (BlackBerry::WebKit::TileBuffer::TileBuffer):
2591         (BlackBerry::WebKit::TileBuffer::isRendered):
2592         * WebKitSupport/BackingStoreTile.h:
2593         (TileBuffer):
2594         (BlackBerry::WebKit::TileBuffer::scale):
2595         (BlackBerry::WebKit::TileBuffer::setScale):
2596         * WebKitSupport/BackingStoreVisualizationViewportAccessor.cpp: Added.
2597         (WebKit):
2598         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::BackingStoreVisualizationViewportAccessor):
2599         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::pixelContentsSize):
2600         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::documentContentsSize):
2601         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::pixelScrollPosition):
2602         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::documentScrollPosition):
2603         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::pixelViewportSize):
2604         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::documentViewportSize):
2605         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::destinationSurfaceOffset):
2606         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::scale):
2607         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::state):
2608         * WebKitSupport/BackingStoreVisualizationViewportAccessor.h: Added.
2609         (BlackBerry):
2610         (Platform):
2611         (WebKit):
2612         (BackingStoreVisualizationViewportAccessor):
2613         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::~BackingStoreVisualizationViewportAccessor):
2614         * WebKitSupport/WebKitThreadViewportAccessor.cpp: Added.
2615         (WebKit):
2616         (BlackBerry::WebKit::WebKitThreadViewportAccessor::WebKitThreadViewportAccessor):
2617         (BlackBerry::WebKit::WebKitThreadViewportAccessor::pixelContentsSize):
2618         (BlackBerry::WebKit::WebKitThreadViewportAccessor::documentContentsSize):
2619         (BlackBerry::WebKit::WebKitThreadViewportAccessor::pixelScrollPosition):
2620         (BlackBerry::WebKit::WebKitThreadViewportAccessor::documentScrollPosition):
2621         (BlackBerry::WebKit::WebKitThreadViewportAccessor::pixelViewportSize):
2622         (BlackBerry::WebKit::WebKitThreadViewportAccessor::documentViewportSize):
2623         (BlackBerry::WebKit::WebKitThreadViewportAccessor::destinationSurfaceOffset):
2624         (BlackBerry::WebKit::WebKitThreadViewportAccessor::scale):
2625         * WebKitSupport/WebKitThreadViewportAccessor.h: Added.
2626         (BlackBerry):
2627         (Platform):
2628         (WebKit):
2629         (WebKitThreadViewportAccessor):
2630         (BlackBerry::WebKit::WebKitThreadViewportAccessor::~WebKitThreadViewportAccessor):
2631
2632 2012-10-11  Peter Wang  <peter.wang@torchmobile.com.cn>
2633
2634         [BlackBerry] Paused in Inspector, Browser doesn't exit cleanly
2635         https://bugs.webkit.org/show_bug.cgi?id=97962
2636
2637         Reviewed by George Staikos.
2638
2639         Before destroying webpage, close the inspector, so if the JSC is paused it will be resumed.
2640
2641         * Api/WebPage.cpp:
2642         (BlackBerry::WebKit::WebPage::destroy):
2643
2644 2012-10-11  Konrad Piascik  <kpiascik@rim.com>
2645
2646         Web Inspector: node search does not work with elements on touch start listener
2647         https://bugs.webkit.org/show_bug.cgi?id=95252
2648
2649         Reviewed by Pavel Feldman.
2650
2651         Removed calls to InspectorInstrumentation that no didn't work anyway.
2652
2653         * Api/WebPage.cpp:
2654         (BlackBerry::WebKit::WebPage::touchEvent):
2655
2656 2012-10-11  Chris Guan  <chris.guan@torchmobile.com.cn>
2657
2658         [Blackberry] makes NavigatorContentUtils work
2659         https://bugs.webkit.org/show_bug.cgi?id=99022
2660
2661         Reviewed by Rob Buis.
2662
2663         Because r126735 renamed RegisterProtocolHandler API to NavigatorContentUtils and 
2664         r122810 added RegisterProtocolHandlerClient to the Modules/protocolhandler,
2665         we need sync up code:
2666         1. Add NavigatorContentUtilsClientBlackBerry class.
2667         2. use new API provideNavigatorContentUtilsTo.
2668
2669         No new tests. Covered by existing tests.
2670
2671         * Api/WebPage.cpp:
2672         (BlackBerry::WebKit::WebPagePrivate::init):
2673         * WebCoreSupport/NavigatorContentUtilsClientBlackBerry.cpp: Added.
2674         (WebCore):
2675         (WebCore::NavigatorContentUtilsClientBlackBerry::NavigatorContentUtilsClientBlackBerry):
2676         (WebCore::NavigatorContentUtilsClientBlackBerry::registerProtocolHandler):
2677         (WebCore::NavigatorContentUtilsClientBlackBerry::isProtocolHandlerRegistered):
2678         (WebCore::NavigatorContentUtilsClientBlackBerry::unregisterProtocolHandler):
2679         * WebCoreSupport/NavigatorContentUtilsClientBlackBerry.h: Added.
2680         (WebKit):
2681         (NavigatorContentUtilsClientBlackBerry):
2682         (WebCore::NavigatorContentUtilsClientBlackBerry::~NavigatorContentUtilsClientBlackBerry):
2683
2684 2012-10-10  Lianghui Chen  <liachen@rim.com>
2685
2686         [BlackBerry] Fix assertion in NetworkJob::notifyChallengeResult.
2687         https://bugs.webkit.org/show_bug.cgi?id=97397
2688         Internal PR: 186597.
2689
2690         Internally reviewed by Yong Li, Joe Mason.
2691         Reviewed by George Staikos.
2692
2693         Update WebPage to use new AuthenticationChallengeManager.
2694         Register page creation/deletion and visibility change to the new
2695             AuthenticationChallengeManager.
2696         Initialize AuthenticationChallengeManager in GlobalInitialize() function.
2697
2698         * Api/BlackBerryGlobal.cpp:
2699         (BlackBerry::WebKit::globalInitialize):
2700         * Api/WebPage.cpp:
2701         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
2702         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
2703         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
2704         (BlackBerry::WebKit::WebPage::setVisible):
2705         * Api/WebPage_p.h:
2706         (WebPagePrivate):
2707
2708 2012-10-10  Andrew Lo  <anlo@rim.com>
2709
2710         [BlackBerry] Do not perform backing store blit for animations during one-shot drawing synchronization
2711         https://bugs.webkit.org/show_bug.cgi?id=98944
2712
2713         Reviewed by Rob Buis.
2714
2715         Internally reviewed by: Arvid Nilsson.
2716         Internal PR 220014
2717         Prevent animations from causing a backing store blit during a
2718         one-shot drawing synchronization.
2719
2720         * Api/WebPageCompositor.cpp:
2721         (BlackBerry::WebKit::WebPageCompositorPrivate::animationFrameChanged):
2722
2723 2012-10-10  Mike Fenton  <mifenton@rim.com>
2724
2725         [BlackBerry] Fix crash for detached node when validating selection change.
2726         https://bugs.webkit.org/show_bug.cgi?id=98926
2727
2728         Reviewed by Rob Buis.
2729
2730         PR 220628.
2731
2732         Guard against detached nodes when generating selection rect.
2733
2734         * WebKitSupport/DOMSupport.cpp:
2735         (BlackBerry::WebKit::DOMSupport::visibleTextQuads):
2736
2737 2012-10-10  Mike Fenton  <mifenton@rim.com>
2738
2739         [BlackBerry] Adjust spell checking location to update after the cursor position is set.
2740         https://bugs.webkit.org/show_bug.cgi?id=98904
2741
2742         Reviewed by Rob Buis.
2743
2744         PR 215172.
2745
2746         Delay calculation of caret position until it is updated on mouse release
2747         handling.
2748
2749         Reviewed Internally by Nima Ghanavatian.
2750
2751         * WebKitSupport/InputHandler.cpp:
2752         (BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint):
2753         (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions):
2754
2755 2012-10-10  Mike Fenton  <mifenton@rim.com>
2756
2757         [BlackBerry] Suppress keyboard requests while processing spell checking suggestions unless focus change is occurring..
2758         https://bugs.webkit.org/show_bug.cgi?id=98903
2759
2760         Reviewed by Rob Buis.
2761
2762         PR 221143.
2763
2764         Suppress keyboard state changes when they are not triggered by
2765         focus changes.
2766
2767         Reviewed Internally by Nima Ghanavatian.
2768
2769         * WebKitSupport/InputHandler.cpp:
2770         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
2771         (BlackBerry::WebKit::InputHandler::setElementFocused):
2772         (BlackBerry::WebKit::InputHandler::notifyClientOfKeyboardVisibilityChange):
2773         * WebKitSupport/InputHandler.h:
2774
2775 2012-10-09  Rob Buis  <rbuis@rim.com>
2776
2777         [BlackBerry] Cleanup FatFingers.cpp
2778         https://bugs.webkit.org/show_bug.cgi?id=98806
2779
2780         Reviewed by Antonio Gomes.
2781
2782         Cleanup namespace usage and sync up FatFingers.cpp.
2783
2784         * WebKitSupport/FatFingers.cpp:
2785         (BlackBerry::WebKit::compareDistanceBetweenPoints):
2786         (BlackBerry::WebKit::FatFingers::findBestPoint):
2787         (BlackBerry::WebKit::FatFingers::checkFingerIntersection):
2788         (BlackBerry::WebKit::FatFingers::findIntersectingRegions):
2789         (BlackBerry::WebKit::FatFingers::checkForClickableElement):
2790         (BlackBerry::WebKit::FatFingers::checkForText):
2791         (BlackBerry::WebKit::FatFingers::getNodesFromRect):
2792         (BlackBerry::WebKit::FatFingers::getRelevantInfoFromPoint):
2793
2794 2012-10-09  Antonio Gomes  <agomes@rim.com>
2795
2796         Get rid of FIXED_POSITION_CREATES_STACKING_CONTEXT in favor of Settings::fixedPositionCreatesStackingContext()
2797         https://bugs.webkit.org/show_bug.cgi?id=98756
2798
2799         Reviewed by Rob Buis.
2800
2801         * Api/WebPage.cpp:
2802         (BlackBerry::WebKit::WebPagePrivate::init):
2803
2804 2012-10-09  Charles Wei  <charles.wei@torchmobile.com.cn>
2805
2806         [BlackBerry] Need API to control the DNS Prefetching
2807         https://bugs.webkit.org/show_bug.cgi?id=98713
2808
2809         Reviewed by George Staikos.
2810
2811         * Api/WebPage.cpp:
2812         (BlackBerry::WebKit::WebPagePrivate::init):
2813         (BlackBerry::WebKit::WebPage::enableDNSPrefetch):
2814         (WebKit):
2815         (BlackBerry::WebKit::WebPage::disableDNSPrefetch):
2816         (BlackBerry::WebKit::WebPage::isDNSPrefetchEnabled):
2817         * Api/WebPage.h:
2818
2819 2012-10-07  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2820
2821         Rename first/second to key/value in HashMap iterators
2822         https://bugs.webkit.org/show_bug.cgi?id=82784
2823
2824         Reviewed by Eric Seidel.
2825
2826         * Api/BackingStore.cpp:
2827         (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect):
2828         (BlackBerry::WebKit::BackingStorePrivate::visibleTilesRect):
2829         (BlackBerry::WebKit::BackingStorePrivate::resetTiles):
2830         (BlackBerry::WebKit::BackingStorePrivate::updateTiles):
2831         (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion):
2832         (BlackBerry::WebKit::BackingStorePrivate::mapFromTransformedContentsToTiles):
2833         * WebCoreSupport/NotificationPresenterImpl.cpp:
2834         (WebCore::NotificationPresenterImpl::cancel):
2835         (WebCore::NotificationPresenterImpl::onPermission):
2836         (WebCore::NotificationPresenterImpl::notificationClicked):
2837         * WebCoreSupport/UserMediaClientImpl.cpp:
2838         (WebCore::UserMediaClientImpl::cancelUserMediaRequest):
2839         * WebKitSupport/AboutData.cpp:
2840         (BlackBerry::WebKit::dumpJSCTypeCountSetToTableHTML):
2841         * WebKitSupport/FrameLayers.cpp:
2842         (BlackBerry::WebKit::FrameLayers::removeLayerByFrame):
2843         (BlackBerry::WebKit::FrameLayers::commitOnWebKitThread):
2844         (BlackBerry::WebKit::FrameLayers::calculateRootLayer):
2845
2846 2012-10-05  Rob Buis  <rbuis@rim.com>
2847
2848         [BlackBerry] Implement TestRunner.setMockDeviceOrientation
2849         https://bugs.webkit.org/show_bug.cgi?id=98542
2850
2851         Reviewed by Antonio Gomes.
2852
2853         PR 120681
2854
2855         Provide framework for mock device motion.
2856
2857         * Api/WebPage.cpp:
2858         (BlackBerry::WebKit::WebPagePrivate::init):
2859         * WebKitSupport/DumpRenderTreeSupport.cpp:
2860         (toDeviceOrientationClientMock):
2861         (DumpRenderTreeSupport::setMockDeviceOrientation):
2862         * WebKitSupport/DumpRenderTreeSupport.h:
2863         (DumpRenderTreeSupport):
2864
2865 2012-10-05  Konrad Piascik  <kpiascik@rim.com>
2866
2867         [BlackBerry] Remove unnecessary html file.
2868         https://bugs.webkit.org/show_bug.cgi?id=98531
2869
2870         Reviewed by Yong Li.
2871
2872         We now just use Source/WebCore/inspector/front-end/inspector.html
2873         instead.
2874
2875         * WebCoreSupport/inspectorBB.html: Removed.
2876
2877 2012-10-05  Antonio Gomes  <agomes@rim.com>
2878
2879         [BlackBerry] Find a proper fix for the WebPagePrivate::enqueueRenderingOfClippedContentOfScrollableNodeAfterInRegionScrolling hack
2880         https://bugs.webkit.org/show_bug.cgi?id=98517
2881         PR #137382
2882
2883         Reviewed by Yong Li.
2884
2885         We've generalized composited in-region scrolling, originally only applicable
2886         to block elements, to inner frames (see PR #197093). Past that, we no longer
2887         need to force repaints of offscreen areas when we finish scrolling, since translating
2888         the Layer takes care of properly invalidating it. Thus, remove this method.
2889
2890         * Api/WebPage.cpp:
2891         (BlackBerry::WebKit::WebPagePrivate::notifyInRegionScrollStopped):
2892         * Api/WebPage_p.h:
2893         (WebPagePrivate):
2894
2895 2012-10-05  Mike Fenton  <mifenton@rim.com>
2896
2897         [BlackBerry] Update default input support style for single line inputs.
2898         https://bugs.webkit.org/show_bug.cgi?id=98510
2899
2900         Reviewed by Antonio Gomes.
2901
2902         PR 219588.
2903
2904         Update style calculations to eliminate automatic changes
2905         by default on single line input fields.
2906
2907         Reviewed Internally by Gen Mak.
2908
2909         * WebKitSupport/InputHandler.cpp:
2910         (BlackBerry::WebKit::inputStyle):
2911
2912 2012-10-04  Simon Fraser  <simon.fraser@apple.com>
2913
2914         Final part of "sync" to "flush" renaming
2915         https://bugs.webkit.org/show_bug.cgi?id=98430
2916
2917         Reviewed by Tim Horton.
2918
2919         Change method names on GraphicsLayer and GraphicsLayerClient that
2920         refer to "sync" to use the term "flush" instead, to be consistent
2921         with the rest of the code.
2922
2923         * Api/WebOverlay.cpp:
2924         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::notifyFlushRequired):
2925         * Api/WebOverlay_p.h:
2926         (WebOverlayPrivateWebKitThread):
2927         * Api/WebPage.cpp:
2928         (BlackBerry::WebKit::WebPagePrivate::notifyFlushRequired):
2929         * Api/WebPage_p.h:
2930         (WebPagePrivate):
2931         * WebKitSupport/DefaultTapHighlight.cpp:
2932         (BlackBerry::WebKit::DefaultTapHighlight::notifyFlushRequired):
2933         * WebKitSupport/DefaultTapHighlight.h:
2934         (DefaultTapHighlight):
2935         * WebKitSupport/InspectorOverlayBlackBerry.cpp:
2936         (BlackBerry::WebKit::InspectorOverlay::notifyFlushRequired):
2937         * WebKitSupport/InspectorOverlayBlackBerry.h:
2938         (InspectorOverlay):
2939         * WebKitSupport/SelectionOverlay.cpp:
2940         (BlackBerry::WebKit::SelectionOverlay::notifyFlushRequired):
2941         * WebKitSupport/SelectionOverlay.h:
2942         (SelectionOverlay):
2943
2944 2012-10-04  Simon Fraser  <simon.fraser@apple.com>
2945
2946         Standardize on "flush" terminology for compositing layer flushing/syncing
2947         https://bugs.webkit.org/show_bug.cgi?id=98321
2948
2949         Reviewed by Simon Fraser.
2950
2951         Rename compositing-related methods that refer to "syncing" to instead
2952         refer to "flushing".
2953
2954         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2955         (WebCore::ChromeClientBlackBerry::scheduleCompositingLayerFlush):
2956         * WebCoreSupport/ChromeClientBlackBerry.h:
2957         (ChromeClientBlackBerry):
2958
2959 2012-10-03  Antonio Gomes  <agomes@rim.com>
2960
2961         [BlackBerry] Exiting fullscreen does not set the correct scroll position (Part II)
2962         https://bugs.webkit.org/show_bug.cgi?id=97917
2963         PR #212920
2964
2965         Reviewed by Yong Li.
2966         Internally reviewed by Jacky Jiang.
2967
2968         Inform the client of transform change so that we avoid
2969         getting stuck on overscroll.
2970
2971         * Api/WebPage.cpp:
2972         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
2973
2974 2012-10-03  Otto Derek Cheung  <otcheung@rim.com>
2975
2976         [BlackBerry] Implementing the NetworkInfo API for BB port
2977         https://bugs.webkit.org/show_bug.cgi?id=98273
2978
2979         Reviewed by Rob Buis.
2980
2981         Adding new class NetworkInfoClientBlackBerry to implement
2982         NetworkInfoClient for the BlackBerry port.
2983
2984         * Api/WebPage.cpp:
2985         (BlackBerry::WebKit::WebPagePrivate::init):
2986         * WebCoreSupport/NetworkInfoClientBlackBerry.cpp: Added.
2987         (WebCore):
2988         (WebCore::NetworkInfoClientBlackBerry::NetworkInfoClientBlackBerry):
2989         (WebCore::NetworkInfoClientBlackBerry::startUpdating):
2990         (WebCore::NetworkInfoClientBlackBerry::stopUpdating):
2991         (WebCore::NetworkInfoClientBlackBerry::bandwidth):
2992         (WebCore::NetworkInfoClientBlackBerry::metered):
2993         (WebCore::NetworkInfoClientBlackBerry::onCurrentNetworkChange):
2994         (WebCore::NetworkInfoClientBlackBerry::onCurrentCellularTypeChange):
2995         * WebCoreSupport/NetworkInfoClientBlackBerry.h: Added.
2996         (WebKit):
2997         (WebCore):
2998         (NetworkInfoClientBlackBerry):
2999         (WebCore::NetworkInfoClientBlackBerry::~NetworkInfoClientBlackBerry):
3000
3001 2012-10-02  Anders Carlsson  <andersca@apple.com>
3002
3003         Change most GraphicsLayer::create calls to use the version that takes a GraphicsLayerFactory
3004         https://bugs.webkit.org/show_bug.cgi?id=98217
3005
3006         Reviewed by Andreas Kling.
3007
3008         * Api/WebPage.cpp:
3009         (BlackBerry::WebKit::WebPagePrivate::overlayLayer):
3010
3011 2012-10-02  Yong Li  <yoli@rim.com>
3012
3013         [BlackBerry] Prevent window.close() from closing pages that are not opened by JS
3014         https://bugs.webkit.org/show_bug.cgi?id=98190
3015
3016         Reviewed by Antonio Gomes.
3017
3018         RIM PR# 217812.
3019         Only pages opened by JS can be closed by JS.
3020
3021         * WebCoreSupport/ChromeClientBlackBerry.cpp:
3022         (WebCore::ChromeClientBlackBerry::closeWindowSoon):
3023
3024 2012-10-01  Brady Eidson  <beidson@apple.com>
3025
3026         Remove the Safari 2 -> Safari 3 icon database import code.
3027         https://bugs.webkit.org/show_bug.cgi?id=98113
3028
3029         Reviewed by Maciej Stachowiak.
3030
3031         Nuke the performImport() IconDatabaseClient method.
3032
3033         * WebCoreSupport/IconDatabaseClientBlackBerry.cpp:
3034         * WebCoreSupport/IconDatabaseClientBlackBerry.h:
3035         (IconDatabaseClientBlackBerry):
3036
3037 2012-10-01  Jakob Petsovits  <jpetsovits@rim.com>
3038
3039         [BlackBerry] Remove unused hasPendingScrollOrZoomEvent() interface.
3040         https://bugs.webkit.org/show_bug.cgi?id=98107
3041         RIM PR 173292
3042
3043         Reviewed by George Staikos.
3044
3045         This method is not referenced anywhere anymore,
3046         so we should stop requiring it from WebPageClient
3047         implementations.
3048
3049         * Api/WebPageClient.h:
3050
3051 2012-10-01  Mike Fenton  <mifenton@rim.com>
3052
3053         [BlackBerry] Remove suppressing of VKB hiding when processing changes.
3054         https://bugs.webkit.org/show_bug.cgi?id=98023
3055
3056         Reviewed by Rob Buis.
3057
3058         PR 215881.
3059
3060         Allow JS to blur the input field while processing key handling.
3061
3062         Reviewed Internally by Chris Hutten-Czapski
3063
3064         * WebKitSupport/InputHandler.cpp:
3065         (BlackBerry::WebKit::InputHandler::notifyClientOfKeyboardVisibilityChange):
3066
3067 2012-09-28  Konrad Piascik  <kpiascik@rim.com>
3068
3069         [BlackBerry] Update the value of window.devicePixelRation when it is set programmatically
3070         https://bugs.webkit.org/show_bug.cgi?id=97512
3071
3072         Reviewed by Rob Buis.
3073
3074         RIM PR 213984
3075         Set the deviceScaleFactor of the page explicity when the
3076         devicePixelRatio is changed.
3077
3078         * Api/WebPage.cpp:
3079         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
3080         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
3081
3082 2012-09-28  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
3083
3084         Code inside FrameLoaderClient::canShowMIMEType() implementations can be shared among different WK ports
3085         https://bugs.webkit.org/show_bug.cgi?id=97547
3086
3087         Reviewed by Adam Barth.
3088
3089         Newly added WebCore::MIMETypeRegistry::canShowMIMEType() function is used
3090         inside WebCore::FrameLoaderClientBlackBerry::canShowMIMEType().
3091
3092         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3093         (WebCore::FrameLoaderClientBlackBerry::canShowMIMEType):
3094
3095 2012-09-28  Rob Buis  <rbuis@rim.com>
3096
3097         [BlackBerry] Hard to tap on x to clear a text field
3098         https://bugs.webkit.org/show_bug.cgi?id=97923
3099
3100         Reviewed by Antonio Gomes.
3101
3102         Allow the shadow element for 'X' to be clickable and do not prefer
3103         shadow content-editable div's over the 'X'.
3104
3105         * WebKitSupport/FatFingers.cpp:
3106         (BlackBerry::WebKit::FatFingers::isElementClickable):
3107
3108 2012-09-28  Antonio Gomes  <agomes@rim.com>
3109
3110         [BlackBerry] Extend composited  in-region scrolling to iframes/frames
3111         https://bugs.webkit.org/show_bug.cgi?id=97922
3112         PR #197093
3113
3114         Reviewed by Yong Li.
3115         Internaly reviewed by Arvid Nilsson.
3116
3117         Add support for composited scrolling in a inner frame level:
3118
3119         1) When creating an InRegionScrollableArea, for a inner scrollable frame,
3120         cache and camouflag the appropriated scroll layer (i.e. RenderLayerCompositor::scrollLayer);
3121
3122         2) Differentiate what type of scroll target we are at: BlockElement or
3123         InnerFrame;
3124
3125         3) Change the signature of the public methods to support and newly passed
3126         in ScrollTarget parameter;
3127         As a side note, this parameter is needed in order to know what class to static_cast
3128         the GraphicsLayer::client to: in the case of a composited scrollable inner frame, the client
3129         is a RenderLayerCompositor; in case of a composited scrollable block element, the client
3130         is a RenderLayerBacking.
3131
3132         * Api/InRegionScroller.cpp:
3133         (BlackBerry::WebKit::InRegionScroller::setScrollPositionWebKitThread):
3134         (BlackBerry::WebKit::InRegionScrollerPrivate::setScrollPositionWebKitThread):
3135         * Api/InRegionScroller.h:
3136         * Api/InRegionScroller_p.h:
3137         (InRegionScrollerPrivate):
3138         * WebCoreSupport/ChromeClientBlackBerry.h:
3139         (WebCore::ChromeClientBlackBerry::allowedCompositingTriggers):
3140         * WebKitSupport/InRegionScrollableArea.cpp:
3141         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
3142
3143 2012-09-28  Antonio Gomes  <agomes@rim.com>
3144
3145         [BlackBerry] Exiting fullscreen does not set the correct scroll position
3146         https://bugs.webkit.org/show_bug.cgi?id=97917
3147         PR #212920
3148
3149         Reviewed by Yong Li.
3150         Internally reviewed by Jacky Jiang.
3151
3152         Restore the zoom level and scroll position at the time when know
3153         the fullscreen exit routine has ended (i.e. in ::setViewportSize
3154         instead of ::exitFullScreenForElement).
3155
3156         Also patch caches now the scroll position instead of only the
3157         "x scroll position.
3158
3159         * Api/WebPage.cpp:
3160         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
3161         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
3162         (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
3163         (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
3164         * Api/WebPage_p.h:
3165         (WebPagePrivate):
3166
3167 2012-09-28  Kent Tamura  <tkent@chromium.org>
3168
3169         Clean up Localizer-related functions
3170         https://bugs.webkit.org/show_bug.cgi?id=97899
3171
3172         Reviewed by Kentaro Hara.
3173
3174         * WebCoreSupport/ColorPickerClient.cpp:
3175         (WebCore::ColorPickerClient::localizer): Follow Document::getLocalizer renaming.
3176         * WebCoreSupport/DatePickerClient.cpp:
3177         (WebCore::SelectPopupClient::localizer): ditto.
3178         * WebCoreSupport/SelectPopupClient.cpp:
3179         (WebCore::SelectPopupClient::localizer): ditto.
3180
3181 2012-09-28  Genevieve Mak  <gmak@rim.com>
3182
3183         [BLACKBERRY] Add isVisible method to WebTapHighlight
3184         https://bugs.webkit.org/show_bug.cgi?id=97915
3185
3186         Reviewed by Rob Buis.
3187
3188         Reviewed Internally By Andrew Lo
3189         The isVisible() method lets us avoid dispatching to the webkit thread
3190         if the tap highlight isn't visible.
3191         Always clear tap highlight on Touch up when converting Touch Events
3192         to Mouse Events.
3193
3194         * Api/WebTapHighlight.h:
3195         * WebKitSupport/DefaultTapHighlight.h:
3196         (BlackBerry::WebKit::DefaultTapHighlight::isVisible):
3197         * WebKitSupport/TouchEventHandler.cpp:
3198         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
3199
3200 2012-09-28  Andrew Lo  <anlo@rim.com>
3201
3202         [BlackBerry] Should suspend page's scripted animations when WebPage is invisible
3203         https://bugs.webkit.org/show_bug.cgi?id=97856
3204
3205         Reviewed by Antonio Gomes.
3206
3207         Suspend page animations when setting WebPage invisible, resume when visible.
3208         Internal PR212788.
3209
3210         * Api/WebPage.cpp:
3211         (BlackBerry::WebKit::WebPagePrivate::setVisible):
3212
3213 2012-09-28  Arvid Nilsson  <anilsson@rim.com>
3214
3215         [BlackBerry] Destroy thread-specific data for Platform::Graphics::Buffer on the right thread
3216         https://bugs.webkit.org/show_bug.cgi?id=97674
3217
3218         Reviewed by Rob Buis.
3219
3220         A new API was added to BlackBerry::Platform::Graphics for destroying
3221         thread-specific data generated on the compositing thread when we blit
3222         buffers. The buffers are otherwise created and destroyed on the WebKit
3223         thread, which doesn't give platform any opportunity to destroy the
3224         thread-specific data.
3225
3226         This patch adds calls to the new API to avoid leaking resources.
3227
3228         Reviewed internally by Jakob Petsovits and Filip Spacek.
3229
3230         PR 214644
3231
3232         * WebKitSupport/SurfacePool.cpp:
3233         (BlackBerry::WebKit::SurfacePool::initialize):
3234         (BlackBerry::WebKit::SurfacePool::createPlatformGraphicsContext):
3235         (BlackBerry::WebKit::SurfacePool::lockTileRenderingSurface):
3236         (BlackBerry::WebKit::SurfacePool::releaseTileRenderingSurface):
3237         (BlackBerry::WebKit::SurfacePool::initializeVisibleTileBuffer):
3238         (BlackBerry::WebKit::SurfacePool::createBuffers):
3239         (BlackBerry::WebKit::SurfacePool::releaseBuffers):
3240
3241 2012-09-27  Kent Tamura  <tkent@chromium.org>
3242
3243         Use Localizer in PagePopupController
3244         https://bugs.webkit.org/show_bug.cgi?id=97862
3245
3246         Reviewed by Hajime Morita.
3247
3248         We need to implement PagePopupClient::localizer. These clients know the
3249         host elements. Localizer implementations get Localizer objects from the
3250         owner documents of the elements for the browser locale.
3251
3252         * WebCoreSupport/ColorPickerClient.cpp:
3253         (WebCore::ColorPickerClient::localizer): Added.
3254         * WebCoreSupport/ColorPickerClient.h:
3255         (ColorPickerClient): Declare "localizer."
3256         * WebCoreSupport/DatePickerClient.cpp:
3257         (WebCore::SelectPopupClient::localizer): Added.
3258         * WebCoreSupport/DatePickerClient.h:
3259         (DatePickerClient): Declare "localizer."
3260         * WebCoreSupport/SelectPopupClient.cpp:
3261         (WebCore::SelectPopupClient::localizer): Added.
3262         * WebCoreSupport/SelectPopupClient.h:
3263         (SelectPopupClient): Declare "localizer."
3264
3265 2012-09-27  Charles Wei  <charles.wei@torchmobile.com.cn>
3266
3267         Empty URL gets through to acceptNavigationRequest()
3268         https://bugs.webkit.org/show_bug.cgi?id=97076
3269
3270         Reviewed by George Staikos.
3271
3272         Invalid URLs in iframe src results in an empty URL in platform request, we should reject
3273         such URL as early as we identify it.
3274
3275         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3276         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction):
3277
3278 2012-09-26  Jakob Petsovits  <jpetsovits@rim.com>
3279
3280         [BlackBerry] Remove blitContents() in favor of blitVisibleContents().
3281         https://bugs.webkit.org/show_bug.cgi?id=97718
3282
3283         Reviewed by Antonio Gomes.
3284
3285         After the last calling sites of blitContents() have
3286         been removed or reworked, the actual method itself
3287         can now retire. All blits now go through
3288         blitVisibleContents(). The knowledge that we always
3289         blit the full visible surface can facilitate further
3290         optimizations; we will get to that in time.
3291
3292         * Api/BackingStore.cpp:
3293         (BlackBerry::WebKit::BackingStorePrivate::suspendScreenAndBackingStoreUpdates):
3294         (BlackBerry::WebKit::BackingStorePrivate::resumeScreenAndBackingStoreUpdates):
3295         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
3296         * Api/BackingStore.h:
3297         * Api/BackingStore_p.h:
3298         (BackingStorePrivate):
3299         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3300         (WebCore::FrameLoaderClientBlackBerry::transitionToCommittedForNewPage):
3301
3302 2012-09-26  Mike Fenton  <mifenton@rim.com>
3303
3304         [BlackBerry] Update padding in ensureFocusTextElementVisible to be DPI independent.
3305         https://bugs.webkit.org/show_bug.cgi?id=97684
3306
3307         Reviewed by Rob Buis.
3308
3309         Update padding in ensureFocusTextElementVisible to be DPI
3310         independent and relative to the current zoom level.
3311
3312         Reviewed Internally by Gen Mak.
3313
3314         * WebKitSupport/InputHandler.cpp:
3315         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
3316
3317 2012-09-25  Genevieve Mak  <gmak@rim.com>
3318
3319         Fat Fingers doesn't work on non-scrollable pages.
3320         PR #209609
3321         https://bugs.webkit.org/show_bug.cgi?id=97607
3322
3323         Reviewed by Antonio Gomes.
3324
3325         Only bypass Fat Fingers and use the actual touch point if its specifically
3326         requested and the page has a mouse move listener or if using the Touch Event
3327         Mode meta-tag.
3328
3329         * WebKitSupport/TouchEventHandler.cpp:
3330         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
3331
3332 2012-09-25  Rob Buis  <rbuis@rim.com>
3333
3334         [BlackBerry] Make COMPUTED_GOTO part of the HAVE section
3335         https://bugs.webkit.org/show_bug.cgi?id=97600
3336
3337         Reviewed by Yong Li.
3338
3339         Also get rid of COMPUTED_GOTO_INTERPRETER and add COMPUTED_GOTO_OPCODES.
3340
3341         * WebCoreSupport/AboutDataEnableFeatures.in:
3342         * WebCoreSupport/AboutDataHaveFeatures.in:
3343
3344 2012-09-25  Mike Fenton  <mifenton@rim.com>
3345
3346         [BlackBerry] Suspend the backingstore while adjusting the view on input field focus.
3347         https://bugs.webkit.org/show_bug.cgi?id=97595
3348
3349         Reviewed by Antonio Gomes.
3350
3351         PR 188751.
3352
3353         Avoid jumpiness when both a scroll and zoom are required to
3354         move an input field into focus by suspending the backingstore.
3355
3356         * WebKitSupport/InputHandler.cpp:
3357         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
3358
3359 2012-09-25  Pratik Solanki  <psolanki@apple.com>
3360
3361         Remove HAVE_SBRK since we never set use_sbrk to true
3362         https://bugs.webkit.org/show_bug.cgi?id=97525
3363         <rdar://problem/12363601>
3364
3365         Reviewed by Geoffrey Garen.
3366
3367         * WebCoreSupport/AboutDataHaveFeatures.in: Remove SBRK from list.
3368
3369 2012-09-25  Beth Dakin  <bdakin@apple.com>
3370
3371         https://bugs.webkit.org/show_bug.cgi?id=95397
3372         Need to merge didFirstVisuallyNonEmptyLayout and 
3373         didNewFirstVisuallyNonEmptyLayout
3374         -and corresponding-
3375         <rdar://problem/10791680>
3376
3377         Reviewed by Sam Weinig.
3378
3379         Remove dispatchDidFirstLayout, 
3380         dispatchDidFirstVisuallyNonEmptyLayout, and 
3381         dispatchDidNewFirstVisuallyNonEmptyLayout. Their functionality 
3382         is now replaced by dispatchDidLayout(LayoutMilestoneOptions)
3383         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3384         (WebCore::FrameLoaderClientBlackBerry::dispatchDidLayout):
3385         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
3386         (FrameLoaderClientBlackBerry):
3387
3388         It is now necessary to opt into getting any of the 
3389         "layout milestone" notifications.
3390         * Api/WebPage.cpp:
3391         (BlackBerry::WebKit::WebPagePrivate::init):
3392
3393 2012-09-25  Mike Fenton  <mifenton@rim.com>
3394
3395         [BlackBerry] When zooming into an input field take the current zoom level into account.
3396         https://bugs.webkit.org/show_bug.cgi?id=97594
3397
3398         Reviewed by Antonio Gomes.
3399
3400         PR 188751.
3401
3402         Perform the zoom action prior to scroll to avoid breaking scrolling
3403         rules.  Take the current scale into account when calculating the
3404         zoom factor.
3405
3406         * WebKitSupport/InputHandler.cpp:
3407         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
3408
3409 2012-09-25  Nima Ghanavatian  <nghanavatian@rim.com>
3410
3411         [BlackBerry] Handling required for multiple consecutive whitespace
3412         https://bugs.webkit.org/show_bug.cgi?id=97575
3413
3414         Reviewed by Rob Buis.
3415
3416         PR211670
3417         Need specific handling in the case where we have multiple
3418         consecutive whitespaces which exceeds our character limit. This
3419         breaks some of the functionality employed with the visible_units
3420         methods used here to tranverse the text.
3421
3422         Internally reviewed by Mike Fenton.
3423
3424         * WebKitSupport/DOMSupport.cpp:
3425         (BlackBerry::WebKit::DOMSupport::trimWhitespaceFromRange):
3426         (DOMSupport):
3427         (BlackBerry::WebKit::DOMSupport::isEmptyRangeOrAllSpaces):
3428         * WebKitSupport/DOMSupport.h:
3429         (WebCore):
3430         * WebKitSupport/InputHandler.cpp:
3431         (BlackBerry::WebKit::InputHandler::spellCheckBlock):
3432         (BlackBerry::WebKit::InputHandler::getRangeForSpellCheckWithFineGranularity):
3433
3434 2012-09-24  Mark Lam  <mark.lam@apple.com>
3435
3436         Deleting the classic interpreter and cleaning up some build options.
3437         https://bugs.webkit.org/show_bug.cgi?id=96969.
3438
3439         Reviewed by Geoffrey Garen.
3440
3441         * WebCoreSupport/AboutDataEnableFeatures.in:
3442
3443 2012-09-24  Benjamin Poulain  <bpoulain@apple.com>
3444
3445         Fix Geolocation error reporting in the test support
3446         https://bugs.webkit.org/show_bug.cgi?id=97386
3447
3448         Reviewed by Sam Weinig.
3449
3450         * WebKitSupport/DumpRenderTreeSupport.cpp:
3451         (DumpRenderTreeSupport::setMockGeolocationPositionUnavailableError):
3452         * WebKitSupport/DumpRenderTreeSupport.h:
3453         (DumpRenderTreeSupport):
3454
3455 2012-09-24  Otto Derek Cheung  <otcheung@rim.com>
3456
3457         [BlackBerry] Reverting implementation for 407 error pages
3458         https://bugs.webkit.org/show_bug.cgi?id=97455
3459
3460         Reviewed by Rob Buis.
3461
3462         Revert "[BlackBerry] Really fix bug 95488 that user can get the 
3463         authentication challenge dialog while the other tab has focus."
3464         https://bugs.webkit.org/show_bug.cgi?id=97348
3465
3466         This reverts commit 0cffe01961fb80204138505bcec29a83818efb73.
3467
3468         * Api/BlackBerryGlobal.cpp:
3469         (BlackBerry::WebKit::globalInitialize):
3470         * Api/WebPage.cpp:
3471         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
3472         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
3473         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
3474         (BlackBerry::WebKit::WebPage::setVisible):
3475         * Api/WebPage_p.h:
3476         (WebPagePrivate):
3477
3478 2012-09-24  Arvid Nilsson  <anilsson@rim.com>
3479
3480         [BlackBerry] Add cookie database API
3481         https://bugs.webkit.org/show_bug.cgi?id=97102
3482
3483         Reviewed by Antonio Gomes.
3484
3485         The cookie database is exposed through WebCookieJar, which has only two
3486         methods: cookies() and setCookies().
3487
3488         Also add a new WebString::fromUTF8 overload that takes a const char*
3489         and a length, in order to avoid a strlen call when converting from
3490         other string classes to WebString. This is useful for callers of the
3491         new cookie API when converting cookies to WebString.
3492
3493         Reviewed internally by Otto D. Cheung.
3494
3495         PR 209282
3496
3497         * Api/WebCookieJar.cpp: Added.
3498         (WebKit):
3499         (BlackBerry::WebKit::WebCookieJar::WebCookieJar):
3500         (BlackBerry::WebKit::WebCookieJar::cookies):
3501         (BlackBerry::WebKit::WebCookieJar::setCookies):
3502         * Api/WebCookieJar.h: Added.
3503         (WebKit):
3504         * Api/WebPage.cpp:
3505         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
3506         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
3507         (BlackBerry::WebKit::WebPage::cookieJar):
3508         (WebKit):
3509         * Api/WebPage.h:
3510         (WebKit):
3511         * Api/WebPage_p.h:
3512         (WebKit):
3513         (WebPagePrivate):
3514         * Api/WebString.cpp:
3515         (BlackBerry::WebKit::WebString::fromUtf8):
3516         (WebKit):
3517         * Api/WebString.h:
3518
3519 2012-09-21  Lianghui Chen  <liachen@rim.com>
3520
3521         [BlackBerry] Really fix bug 95488 that user can get the authentication challenge dialog while the other tab has focus.
3522         https://bugs.webkit.org/show_bug.cgi?id=97348
3523         Internal PR: 186597.
3524
3525         Internally reviewed by Yong Li, Joe Mason.
3526         Reviewed by Yong Li.
3527
3528         Update WebPage to use new AuthenticationChallengeManager.
3529         Register page creation/deletion and visibility change to the new
3530             AuthenticationChallengeManager.
3531         Initialize AuthenticationChallengeManager in GlobalInitialize() function.
3532
3533         * Api/BlackBerryGlobal.cpp:
3534         (BlackBerry::WebKit::globalInitialize):
3535         * Api/WebPage.cpp:
3536         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
3537         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
3538         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
3539         (BlackBerry::WebKit::WebPage::setVisible):
3540         * Api/WebPage_p.h:
3541         (WebPagePrivate):
3542
3543 2012-09-21  Charles Wei  <charles.wei@torchmobile.com.cn>
3544
3545         Wrong seperator for viewport meta in Popup scripts
3546         https://bugs.webkit.org/show_bug.cgi?id=97313
3547
3548         Reviewed by Yong Li.
3549
3550         The valid seperator for viewport meta is ',' instead of ';'.
3551
3552         * WebCoreSupport/PagePopupBlackBerry.cpp:
3553         (WebCore::PagePopupBlackBerry::generateHTML):
3554
3555 2012-09-21  Arvid Nilsson  <anilsson@rim.com>
3556
3557         [BlackBerry] Remove obsolete compositing surface code
3558         https://bugs.webkit.org/show_bug.cgi?id=97314
3559
3560         Reviewed by Antonio Gomes.
3561
3562         The removed code allowed rendering of sublayers to a separate offscreen
3563         surface.
3564
3565         Now that we composite root layer and all sublayers to the window
3566         surface, this code is not needed anymore. In addition, we save some
3567         memory by not allocating the unused offscreen surface.
3568
3569         PR 208038.
3570
3571         * Api/BackingStore.cpp:
3572         (BlackBerry::WebKit::BackingStorePrivate::suspendScreenAndBackingStoreUpdates):
3573         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
3574         (BlackBerry::WebKit::BackingStorePrivate::drawAndBlendLayersForDirectRendering):
3575         * Api/BackingStore_p.h:
3576         (BackingStorePrivate):
3577         * Api/WebPage.cpp:
3578         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
3579         (BlackBerry::WebKit::WebPagePrivate::suspendBackingStore):
3580         (BlackBerry::WebKit::WebPagePrivate::resizeSurfaceIfNeeded):
3581         (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
3582         (BlackBerry::WebKit::WebPagePrivate::setRootLayerCompositingThread):
3583         * Api/WebPage_p.h:
3584         (WebPagePrivate):
3585         * WebKitSupport/BackingStoreCompositingSurface.cpp: Removed.
3586         * WebKitSupport/BackingStoreCompositingSurface.h: Removed.
3587         * WebKitSupport/GLES2Context.cpp:
3588         (BlackBerry::WebKit::GLES2Context::buffer):
3589         (BlackBerry::WebKit::GLES2Context::surfaceSize):
3590         (BlackBerry::WebKit::GLES2Context::swapBuffers):
3591         * WebKitSupport/GLES2Context.h:
3592         (GLES2Context):
3593         * WebKitSupport/SurfacePool.cpp:
3594         (WebKit):
3595         (BlackBerry::WebKit::SurfacePool::SurfacePool):
3596         (BlackBerry::WebKit::SurfacePool::initialize):
3597         * WebKitSupport/SurfacePool.h:
3598         (SurfacePool):
3599
3600 2012-09-20  Peter Wang  <peter.wang@torchmobile.com.cn>
3601
3602         [BlackBerry] To support "Frames View" of "TimeLine" panel  in Inspector
3603         https://bugs.webkit.org/show_bug.cgi?id=96077
3604
3605         Reviewed by Pavel Feldman.
3606
3607         A minor modification to make the inspecting results more accurate.
3608         Internally reviewd by Arvid, Robin.C, and Konrad.
3609
3610         * Api/BackingStore.cpp:
3611         (BlackBerry::WebKit::BackingStorePrivate::renderJob):
3612         * Api/WebPage.cpp:
3613         (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
3614         * WebKitSupport/RenderQueue.cpp:
3615         (BlackBerry::WebKit::RenderQueue::render):
3616
3617 2012-09-19  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
3618
3619         [BlackBerry] Basic authentication challenge credentials for stored credentials again after restarting browser
3620         https://bugs.webkit.org/show_bug.cgi?id=96362
3621
3622         Reviewed by Rob Buis.
3623
3624         Make the FrameLoaderClient use credential storage according to the macro
3625         BLACKBERRY_CREDENTIAL_PERSIST
3626
3627         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3628         (WebCore::FrameLoaderClientBlackBerry::shouldUseCredentialStorage):
3629         (WebCore):
3630         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
3631         (FrameLoaderClientBlackBerry):
3632
3633 2012-09-19  Mike Fenton  <mifenton@rim.com>
3634
3635         [BlackBerry] After zooming into an input field, zoom out when focus is lost.
3636         https://bugs.webkit.org/show_bug.cgi?id=97128
3637
3638         Reviewed by Rob Buis.
3639
3640         When the page has automatically zoomed in for input
3641         focus, unzoom it when input focus is lost or keyboard hidden.
3642
3643         Reviewed Internally by Gen Mak.
3644
3645         * WebKitSupport/InputHandler.cpp:
3646         (BlackBerry::WebKit::InputHandler::InputHandler):
3647         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
3648         * WebKitSupport/InputHandler.h:
3649         (InputHandler):
3650
3651 2012-09-19  Nima Ghanavatian  <nghanavatian@rim.com>
3652
3653         [BlackBerry] Clean up the SpellingLog output
3654         https://bugs.webkit.org/show_bug.cgi?id=97129
3655
3656         Reviewed by Rob Buis.
3657
3658         Internally reviewed by Mike Fenton.
3659
3660         * WebKitSupport/InputHandler.cpp:
3661         (BlackBerry::WebKit::InputHandler::spellCheckingRequestCancelled):
3662         (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
3663
3664 2012-09-19  Mike Fenton  <mifenton@rim.com>
3665
3666         [BlackBerry] Add SpellingLog for spell checking options request.
3667         https://bugs.webkit.org/show_bug.cgi?id=97125
3668
3669         Reviewed by Rob Buis.
3670
3671         Add spell checking log to indicate the calculated
3672         text position for spell checking option requests.
3673
3674         Reviewed Internally by Nima Ghanavatian.
3675
3676         * WebKitSupport/InputHandler.cpp:
3677         (BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint):
3678
3679 2012-09-19  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
3680
3681         [BlackBerry] Add function playerId() in class PageClientBlackBerry
3682         https://bugs.webkit.org/show_bug.cgi?id=97099
3683
3684         Reviewed by Yong Li.
3685
3686         Implemented PageClientBlackBerry::playerID() in class WebPagePrivate,
3687         and replaced the implementation of FrameLoaderClientBlackBerry::playerId().
3688
3689         Internally reviewed by Charles Wei.
3690
3691         * Api/WebPage.cpp:
3692         (BlackBerry::WebKit::WebPagePrivate::playerID):
3693         (WebKit):
3694         * Api/WebPage_p.h:
3695         (WebPagePrivate):
3696         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3697         (WebCore::FrameLoaderClientBlackBerry::playerId):
3698
3699 2012-09-19  Abbas Sherawala  <asherawala@rim.com>
3700
3701         [BlackBerry] BackingStorePrivate::resumeScreenAndBackingStoreUpdates more atomic
3702         Added a missing 'if' statement.
3703         https://bugs.webkit.org/show_bug.cgi?id=96925
3704
3705         PR #180866
3706
3707         Internally Reviewed by Antonio Gomes.
3708
3709         Adding an 'if' statement which should have been in PR # 180866 (SHA:b9c06af395c22e)
3710
3711         Reviewed by Antonio Gomes.
3712
3713         * Api/BackingStore.cpp:
3714         (BlackBerry::WebKit::BackingStorePrivate::resumeScreenAndBackingStoreUpdates):
3715
3716 2012-09-18  Nima Ghanavatian  <nghanavatian@rim.com>
3717
3718         [BlackBerry] Use didCancel and didSucceed instead of didCheckCancel and didCheckSucceed
3719         https://bugs.webkit.org/show_bug.cgi?id=97033
3720
3721         Reviewed by Rob Buis.
3722
3723         Using these preferred public methods (the latter has a note to be made private) ensures that
3724         the right SpellChecker object is being called during the callback in spellCheckingRequestProcessed
3725         and spellCheckingRequestCancelled.
3726
3727         Internally reviewed by Mike Fenton.
3728
3729         By referencing the TextCheckingRequest object's methods, we don't need to keep track of the associated
3730         SpellChecker for each request. Removing much of the code that was put in place incorrectly to achieve this.
3731
3732         * WebKitSupport/InputHandler.cpp:
3733         (BlackBerry::WebKit::InputHandler::InputHandler):
3734         (BlackBerry::WebKit::InputHandler::requestCheckingOfString):
3735         (BlackBerry::WebKit::InputHandler::spellCheckingRequestCancelled):
3736         (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
3737         (BlackBerry::WebKit::InputHandler::getSpellChecker):
3738         * WebKitSupport/InputHandler.h:
3739         (InputHandler):
3740
3741 2012-09-18  Jessica Cao  <jecao@rim.com>
3742
3743         [BlackBerry] Date picker isn't inputting after 'OK'
3744         https://bugs.webkit.org/show_bug.cgi?id=97031
3745
3746         PR208052
3747
3748         Reviewed by Rob Buis
3749
3750         Checking for !values.contains("-1") will match valid strings like "2012-09-18". Use value != "-1" instead.
3751
3752         * WebCoreSupport/DatePickerClient.cpp:
3753         (WebCore::DatePickerClient::setValueAndClosePopup):
3754
3755 2012-09-18  Yong Li  <yoli@rim.com>
3756
3757         [BlackBerry] Popup page should reference the client with a weak pointer
3758         https://bugs.webkit.org/show_bug.cgi?id=97028
3759
3760         Reviewed by Rob Buis.
3761
3762         RIM PR# 209847.
3763         Internally reviewed by Mike Fenton.
3764
3765         Store the pointer in a ref-coutned shared object, and clear the pointer 
3766         when the client is going to be destroyed, so it won't be accessed by
3767         the JS function afterwards.
3768
3769         * WebCoreSupport/PagePopupBlackBerry.cpp:
3770         (WebCore::PagePopupBlackBerry::PagePopupBlackBerry):
3771         (WebCore::PagePopupBlackBerry::~PagePopupBlackBerry):
3772         (WebCore::PagePopupBlackBerry::init):
3773         (WebCore::setValueAndClosePopupCallback):
3774         (WebCore::popUpExtensionFinalize):
3775         (WebCore::PagePopupBlackBerry::installDOMFunction):
3776         (WebCore::PagePopupBlackBerry::closePopup):
3777         * WebCoreSupport/PagePopupBlackBerry.h:
3778         (PagePopupBlackBerry):
3779         (SharedClientPointer):
3780         (WebCore::PagePopupBlackBerry::SharedClientPointer::SharedClientPointer):
3781         (WebCore::PagePopupBlackBerry::SharedClientPointer::clear):
3782         (WebCore::PagePopupBlackBerry::SharedClientPointer::get):
3783
3784 2012-09-18  Arvid Nilsson  <anilsson@rim.com>
3785
3786         [BlackBerry] Prevent scroll adjustment of input fields when region of interest mechanism active
3787         https://bugs.webkit.org/show_bug.cgi?id=96750
3788
3789         Reviewed by Antonio Gomes.
3790
3791         The region of interest mechanism replaces the scrolling/zooming
3792         functionality in InputHandler::ensureFocusTextElementVisible().
3793
3794         We introduce a new fine-grained setting for the various adjustment
3795         modes. The WebKit embedder can disable all scroll types in favor of the
3796         region of interest mechanism by using the new setting.
3797
3798         PR #208387
3799
3800         Reviewed internally by Mike Fenton.
3801
3802         * WebKitSupport/AboutData.cpp:
3803         (BlackBerry::WebKit::configPage):
3804         * WebKitSupport/InputHandler.cpp:
3805         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
3806         * WebKitSupport/InputHandler.h:
3807
3808 2012-09-17  Jakob Petsovits  <jpetsovits@rim.com>
3809
3810         [BlackBerry] Remove dysfunctional zoom blit in setViewportSize().
3811         https://bugs.webkit.org/show_bug.cgi?id=96954
3812         PR 178411
3813
3814         Reviewed by Antonio Gomes.
3815
3816         The blitContents() call removed by this patch used to
3817         be part of scheduleZoomAboutPoint(). Its goal was to
3818         display a preview of the zoomed contents, primarily
3819         when auto-zoomed after rotation. Nested inside a pair
3820         of screen suspend/resume calls, it has been a pointless
3821         no-op for a while.
3822
3823         Antonio's recent change to remove scheduleZoomAboutPoint()
3824         and call zoomAboutPoint() from setViewportSize() directly
3825         (the only call site) obsoletes the call completely.
3826         The zoomAboutPoint() call itself will cause a re-render
3827         and blit right away, so we don't care about any preview.
3828         zoomAboutPoint() will also take care of the necessary
3829         screen/backingstore suspension.
3830
3831         The result is a vastly simplified block of code.
3832
3833         * Api/WebPage.cpp:
3834         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
3835
3836 2012-09-17  Antonio Gomes  <agomes@rim.com>
3837
3838         [BlackBerry] [FullScreen] entering/leaving fullscreen results in temporary glitches on the screen
3839         https://bugs.webkit.org/show_bug.cgi?id=96927
3840         PR #180866
3841
3842         Reviewed by Yong Li.
3843
3844         Suspend backing store and screen updates while entering fullscreen,
3845         and only resume at the end, when viewport is resized.
3846
3847         * Api/WebPage.cpp:
3848         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
3849         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
3850         * Api/WebPage_p.h:
3851         (WebPagePrivate):
3852         * WebCoreSupport/ChromeClientBlackBerry.cpp:
3853         (WebCore::ChromeClientBlackBerry::enterFullScreenForElement):
3854         (WebCore::ChromeClientBlackBerry::exitFullScreenForElement):
3855
3856 2012-09-17  Rob Buis  <rbuis@rim.com>
3857
3858         [BlackBerry] Fix compile problems in WebKit/blackberry
3859         https://bugs.webkit.org/show_bug.cgi?id=96926
3860
3861         Reviewed by Antonio Gomes.
3862
3863         This code is slightly out of date and so will not compile, fix it.
3864
3865         * WebCoreSupport/BatteryClientBlackBerry.cpp:
3866         (WebCore::BatteryClientBlackBerry::BatteryClientBlackBerry):
3867         * WebCoreSupport/BatteryClientBlackBerry.h:
3868         (WebKit):
3869         * WebCoreSupport/CredentialTransformData.h:
3870         * WebCoreSupport/DeviceOrientationClientBlackBerry.cpp:
3871         (DeviceOrientationClientBlackBerry::onOrientation):
3872         * WebCoreSupport/InspectorClientBlackBerry.h:
3873         * WebCoreSupport/PagePopupBlackBerry.cpp:
3874         * WebKitSupport/DOMSupport.cpp:
3875         (BlackBerry::WebKit::DOMSupport::isDateTimeInputField):
3876         (BlackBerry::WebKit::DOMSupport::isTextBasedContentEditableElement):
3877         * WebKitSupport/DumpRenderTreeSupport.cpp:
3878         (DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests):
3879         * WebKitSupport/InPageSearchManager.cpp:
3880         (BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):
3881
3882 2012-09-17  Antonio Gomes  <agomes@rim.com>
3883
3884         [BlackBerry] BackingStorePrivate::resumeScreenAndBackingStoreUpdates more atomic
3885         https://bugs.webkit.org/show_bug.cgi?id=96925
3886
3887         [FullScreen] entering/leaving fullscreen results in temporary glitches on the screen (part 2/3)
3888         PR #180866
3889
3890         Reviewed by Rob Buis.
3891         Internally reviewed by Arvid Nilsson.
3892
3893         Paraphrasing Arvid "resumeBackingStore will be a truly atomic operation.
3894         Well more atomic than it was before, with regards to a mix of accelerated and
3895         non-accelerated compositing content".
3896
3897         I.e. by committing the root layer (if needed) when resuming the Backing
3898         Store, we call blitVisibleContents right way, so we are actually shortcutting when
3899         AC content will get on screen.
3900
3901         * Api/BackingStore.cpp:
3902         (BlackBerry::WebKit::BackingStorePrivate::resumeScreenAndBackingStoreUpdates):
3903
3904 2012-09-17  Peter Wang  <peter.wang@torchmobile.com.cn>
3905
3906         [BlackBerry] To support "Frames View" of "TimeLine" panel in Inspector
3907         https://bugs.webkit.org/show_bug.cgi?id=96077
3908
3909         Reviewed by Rob Buis.
3910
3911         Invoke the "instrumentBeginFrame" and "instrumentCancelFrame" at the start and end of processing
3912         render message to record one time of page's update.
3913
3914         * Api/BackingStore.cpp:
3915         (BlackBerry::WebKit::BackingStorePrivate::instrumentBeginFrame):
3916         (WebKit):
3917         (BlackBerry::WebKit::BackingStorePrivate::instrumentCancelFrame):
3918         * Api/BackingStore_p.h:
3919         * WebKitSupport/RenderQueue.cpp:
3920         (BlackBerry::WebKit::RenderQueue::render):
3921
3922 2012-09-17  Jakob Petsovits  <jpetsovits@rim.com>
3923
3924         [BlackBerry] Support copying image data in WebOverlay.
3925         https://bugs.webkit.org/show_bug.cgi?id=96684
3926         RIM PR 195444
3927
3928         Reviewed by Rob Buis.
3929         Internally reviewed by Arvid Nilsson.
3930
3931         The publicly exposed WebOverlay class provides a method
3932         setContentsToImage() to assign a pointer to pixel data,
3933         which is later used to provide texture data for the
3934         underlying compositing layer. This works well for static
3935         images that stay in memory and never change, but not
3936         so well for images with changing contents or where the
3937         image data is being reassigned from different image
3938         sources that are not constantly kept around in memory.
3939
3940         Due to the delayed upload and delayed fetching of
3941         EGLImage data by the GPU, we shouldn't assume the caller
3942         to know how long the image should be retained. Instead,
3943         we should offer another method of setting image data
3944         that takes ownership of the pixel data.
3945
3946         This patch adds an option to setContentsToImage() that
3947         copies the passed pixel data and doesn't destroy it
3948         until both the texture is destroyed and the image
3949         contents are changed. Using this method, the caller can
3950         withdraw the passed pixel array right after the
3951         setContentsToImage() call without consequences.
3952
3953         * Api/WebOverlay.cpp:
3954         (BlackBerry::WebKit::WebOverlay::setContentsToImage):
3955         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setContentsToImage):
3956         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::WebOverlayLayerCompositingThreadClient):
3957         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::invalidate):
3958         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::setContents):
3959         (WebKit):
3960         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::clearUploadedContents):
3961         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::setContentsToColor):
3962         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded):
3963         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::deleteTextures):
3964         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setContentsToImage):
3965         * Api/WebOverlay.h:
3966         * Api/WebOverlay_p.h:
3967         (WebOverlayPrivate):
3968         (WebOverlayPrivateWebKitThread):
3969         (WebOverlayLayerCompositingThreadClient):
3970         (WebOverlayPrivateCompositingThread):
3971
3972 2012-09-14  Dana Jansens  <danakj@chromium.org>
3973
3974         Minimize collisions when hashing pairs
3975         https://bugs.webkit.org/show_bug.cgi?id=96022
3976
3977         Reviewed by Adrienne Walker.
3978
3979         Use WTF::pairIntHash() to hash a pair of integers.
3980
3981         * WebKitSupport/TileIndexHash.h:
3982
3983 2012-09-14  Genevieve Mak  <gmak@rim.com>
3984
3985         Always send mouse events on pages that don't scroll even if there
3986         is no mouse move listener attatched.
3987         PR #208228
3988         https://bugs.webkit.org/show_bug.cgi?id=96800
3989
3990         Reviewed by Antonio Gomes.
3991
3992         Reviewed Internally By Antonio Gomes.
3993
3994         * WebKitSupport/TouchEventHandler.cpp:
3995         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
3996
3997 2012-09-14  Mike Fenton  <mifenton@rim.com>
3998
3999         [BlackBerry] Update the minimum zoom scale when focusing an input field.
4000         https://bugs.webkit.org/show_bug.cgi?id=96789
4001
4002         Reviewed by Antonio Gomes.
4003
4004         PR 188751.