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