89a72aeb2441bcaa948d566e817c95824023def2
[WebKit-https.git] / Source / WebKit / blackberry / ChangeLog
1 2013-02-27  Andrew Lo  <anlo@rim.com>
2
3         [BlackBerry] Need WebPage API for animating scroll position & zoom changes
4         https://bugs.webkit.org/show_bug.cgi?id=110912
5
6         Reviewed by Rob Buis.
7
8         Internally reviewed by Jakob Petsovits.
9         Internal PR 285468.
10
11         Add an API to WebPage for animated scroll position & zoom level
12         adjustments.
13
14         Have InputHandler use the new API.
15
16         Rename some variables to reflect the fact that they are not only
17         used by block zoom now.
18
19         * Api/WebPage.cpp:
20         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
21         (BlackBerry::WebKit::WebPagePrivate::zoomBlock):
22         (BlackBerry::WebKit::WebPage::blockZoom):
23         (BlackBerry::WebKit::WebPagePrivate::animateToScaleAndDocumentScrollPosition):
24         (WebKit):
25         (BlackBerry::WebKit::WebPage::animateToScaleAndDocumentScrollPosition):
26         * Api/WebPage.h:
27         * Api/WebPage_p.h:
28         (WebPagePrivate):
29         * WebKitSupport/InputHandler.cpp:
30         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
31
32 2013-02-27  Lianghui Chen  <liachen@rim.com>
33
34         [BlackBerry] User credentials is not correctly handled
35         https://bugs.webkit.org/show_bug.cgi?id=110994
36
37         Reviewed by Yong Li.
38
39         Following change are made:
40             Remove url from CredentialTransformData, as url is not used anymore.
41             Adapt to updated CredentialBackingStore API about removing url.
42
43         * Api/WebPage.cpp:
44         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
45         * WebCoreSupport/CredentialManager.cpp:
46         (WebCore::CredentialManager::autofillPasswordForms):
47         (WebCore::CredentialManager::saveCredentialIfConfirmed):
48         * WebCoreSupport/CredentialTransformData.cpp:
49         (WebCore::CredentialTransformData::CredentialTransformData):
50         * WebCoreSupport/CredentialTransformData.h:
51         (CredentialTransformData):
52
53 2013-02-27  John Griggs  <jgriggs@rim.com>
54
55         2013-02-27  John Griggs  <jgriggs@rim.com>
56
57         Fix bug in HTML5 Fullscreen API implementation that was preventing YouTube HTML5 media controls fullscreen button from working properly.
58         https://bugs.webkit.org/show_bug.cgi?id=110905
59
60         Reviewed by Yong Li.
61
62         Return true from ChromeClientBlackBerry::supportsFullScreenForElement instead of the negation of the boolean flag (withKeyboard) passed in.
63
64         * WebCoreSupport/ChromeClientBlackBerry.cpp:
65         (WebCore::ChromeClientBlackBerry::supportsFullScreenForElement):
66
67 2013-02-27  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
68
69         [BlackBerry] Context menu cannot be invoked after doing text selection in landscape mode
70         https://bugs.webkit.org/show_bug.cgi?id=110860
71
72         Reviewed by Yong Li.
73
74         PR 290248 Internally reviewed by Mike Fenton
75
76         Add a parameter to notify the webpage client which parts of selection have
77         changed in visual or in its selected DOM content. Refactor the selection details
78         parameter to platform repo.
79
80         The reason of this issue is that when javascript triggers webpage layout, the selection
81         will update its apperance event when the selected content is not changed. We want
82         to hide the context menu only when the selected content is changed not when only its
83         visual is changed.
84
85 * Api/WebPageClient.h:
86         (Platform):
87         * WebKitSupport/SelectionHandler.cpp:
88         (BlackBerry::WebKit::SelectionHandler::cancelSelection):
89         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
90         * WebKitSupport/SelectionHandler.h:
91         (SelectionHandler):
92
93 2013-02-27  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
94
95         [BlackBerry] The virtual keyboard hides part of Signing In dialog
96         https://bugs.webkit.org/show_bug.cgi?id=110836
97
98         Reviewed by Yong Li.
99
100         PR # 283427 Internally reviewed by Mike Fenton.
101
102         Store form credentials before javascript "onSubmit" event and notify
103         webpage client to save credentials after that event since javascript
104         may check credentials and stop the submission in its event handler.
105
106         * WebCoreSupport/CredentialTransformData.cpp:
107         (WebCore::CredentialTransformData::CredentialTransformData):
108         (WebCore):
109         * WebCoreSupport/CredentialTransformData.h:
110         (CredentialTransformData):
111         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
112         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSubmitForm):
113         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendSubmitEvent):
114         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
115         (FrameLoaderClientBlackBerry):
116
117 2013-02-27  Mike Fenton  <mifenton@rim.com>
118
119         [BlackBerry] Accept key events even when composing region is active.
120         https://bugs.webkit.org/show_bug.cgi?id=110617
121
122         Reviewed by Rob Buis.
123
124         PR 293598.
125
126         Fix a regression in the previous patch caused
127         by an unhandled Alt key down being sent through
128         by IMF.
129
130         Reviewed Internally by Nima Ghanavatian.
131
132         * WebKitSupport/InputHandler.cpp:
133         (BlackBerry::WebKit::InputHandler::updateFormState):
134         * WebKitSupport/InputHandler.h:
135         (InputHandler):
136
137 2013-02-26  Yong Li  <yoli@rim.com>
138
139         [BlackBerry] Use APIEntryShim when making JS call
140         https://bugs.webkit.org/show_bug.cgi?id=110787
141
142         Reviewed by Rob Buis.
143
144         PR# 301451.
145         Use APIEntryShim to fix an assert and ensure it is thread-safe.
146
147         * Api/WebPage.cpp:
148         (BlackBerry::WebKit::WebPage::executeJavaScriptFunction):
149
150 2013-02-26  Alberto Garcia  <agarcia@igalia.com>
151
152         [BlackBerry] Upstream the datalist support UI
153         https://bugs.webkit.org/show_bug.cgi?id=110736
154
155         Reviewed by Rob Buis.
156
157         Original code by Otto Derek Cheung <otcheung@rim.com>
158
159         * WebCoreSupport/SuggestionBoxElement.cpp: Added.
160         (WebCore):
161         (WebCore::SuggestionBoxElement::SuggestionBoxElement):
162         (WebCore::SuggestionBoxElement::~SuggestionBoxElement):
163         (WebCore::SuggestionBoxElement::create):
164         (WebCore::SuggestionBoxElement::defaultEventHandler):
165         * WebCoreSupport/SuggestionBoxElement.h: Added.
166         (WebCore):
167         (SuggestionBoxElement):
168         * WebCoreSupport/SuggestionBoxHandler.cpp: Added.
169         (WebCore):
170         (WebCore::SuggestionBoxHandler::SuggestionBoxHandler):
171         (WebCore::SuggestionBoxHandler::~SuggestionBoxHandler):
172         (WebCore::SuggestionBoxHandler::create):
173         (WebCore::SuggestionBoxHandler::setInputElementAndUpdateDisplay):
174         (WebCore::SuggestionBoxHandler::showDropdownBox):
175         (WebCore::SuggestionBoxHandler::hideDropdownBox):
176         (WebCore::SuggestionBoxHandler::changeInputElementInnerTextValue):
177         (WebCore::SuggestionBoxHandler::parseSuggestions):
178         (WebCore::SuggestionBoxHandler::insertSuggestionsToDropdownBox):
179         (WebCore::adjustDropdownBoxPosition):
180         (WebCore::SuggestionBoxHandler::buildDropdownBoxTree):
181         * WebCoreSupport/SuggestionBoxHandler.h: Added.
182         (WebCore):
183         (SuggestionBoxHandler):
184         (WebCore::SuggestionBoxHandler::focusedElement):
185         * WebKitSupport/InputHandler.cpp:
186         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
187         (BlackBerry::WebKit::InputHandler::updateFormState):
188         * WebKitSupport/InputHandler.h:
189         (WebCore):
190         (InputHandler):
191         * WebKitSupport/TouchEventHandler.cpp:
192         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
193
194 2013-02-25  Yongxin Dai  <yodai@rim.com>
195
196         [BlackBerry] Add isInputMode() method to WebPage class.
197         https://bugs.webkit.org/show_bug.cgi?id=110754
198
199         Reviewed by Rob Buis.
200
201         PR #262569.
202
203         There is a case we need to know if the active node is content editable
204         from TouchHandlerWebKitThread class. WebPage::isInputMode() just delegates
205         InputHandler::isInputMode().
206
207         Reviewed Internally by Mike Fenton.
208
209         * Api/WebPage.cpp:
210         (BlackBerry::WebKit::WebPage::isInputMode):
211         (WebKit):
212         * Api/WebPage.h:
213
214 2013-02-25  Mike Fenton  <mifenton@rim.com>
215
216         [BlackBerry] Force form submission when implicit submission fails.
217         https://bugs.webkit.org/show_bug.cgi?id=110627
218
219         Reviewed by Rob Buis.
220
221         PR 286023.
222
223         When implicit form submission does not submit the form
224         do a direct submission of the form.
225
226         Reviewed Internally by Nima Ghanavatian.
227
228         * WebKitSupport/InputHandler.cpp:
229         (BlackBerry::WebKit::InputHandler::updateFormState):
230
231 2013-02-25  Tiancheng Jiang  <tijiang@rim.com>
232
233         [BlackBerry]Adjust fatfinger detection rect size.
234         https://bugs.webkit.org/show_bug.cgi?id=108678
235
236         Reviewed by Rob Buis.
237
238         Fix a typo in function names.
239
240         * WebKitSupport/FatFingers.cpp:
241         (BlackBerry::WebKit::FatFingers::getNodesFromRect):
242
243 2013-02-25  Alberto Garcia  <albgarcia@rim.com>
244
245         [BlackBerry] ChromeClientBlackBerry: fix variable names
246         https://bugs.webkit.org/show_bug.cgi?id=110562
247
248         Reviewed by Rob Buis.
249
250         manager was incorrectly renamed back to tracker in r138696:
251         http://trac.webkit.org/changeset/138696/trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp
252
253         * WebCoreSupport/ChromeClientBlackBerry.cpp:
254         (WebCore::ChromeClientBlackBerry::exceededDatabaseQuota):
255
256 2013-02-24  Alberto Garcia  <albgarcia@rim.com>
257
258         [BlackBerry] GeolocationClientBlackBerry: add missing headers
259         https://bugs.webkit.org/show_bug.cgi?id=110563
260
261         Reviewed by Benjamin Poulain.
262
263         Frame.h and SecurityOrigin.h are necessary since r136969.
264         GeolocationPosition.h since r132360.
265
266         * WebCoreSupport/GeolocationClientBlackBerry.cpp:
267
268 2013-02-24  Alberto Garcia  <albgarcia@rim.com>
269
270         [BlackBerry] FatFingers: move rectForPoint() from HitTestResult to HitTestLocation
271         https://bugs.webkit.org/show_bug.cgi?id=110570
272
273         Reviewed by Allan Sandfeld Jensen.
274
275         HitTestResult is no longer a HitTestLocation:
276         http://trac.webkit.org/changeset/135710/trunk/Source/WebCore/rendering/HitTestResult.h
277
278         * WebKitSupport/FatFingers.cpp:
279         (BlackBerry::WebKit::FatFingers::fingerRectForPoint):
280
281 2013-02-22  Mike Fenton  <mifenton@rim.com>
282
283         [BlackBerry] Eliminate invalid clipping for content editable selections
284         https://bugs.webkit.org/show_bug.cgi?id=110630
285
286         Reviewed by Rob Buis.
287
288         PR 284629.
289
290         Remove selection clipping for content editable
291         fields as the bounds aren't valid and cause
292         clipping based on starting node rather than the
293         union of nodes.
294
295         Reviewed Internally by Nima Ghanavatian.
296
297         * WebKitSupport/InputHandler.cpp:
298         (BlackBerry::WebKit::InputHandler::updateFormState):
299         * WebKitSupport/SelectionHandler.cpp:
300         (BlackBerry::WebKit::SelectionHandler::clippingRectForVisibleContent):
301
302 2013-02-22  Tiancheng Jiang  <tijiang@rim.com>
303
304         [BlackBerry]Adjust fatfinger detection rect size
305         https://bugs.webkit.org/show_bug.cgi?id=108678.
306
307         Reviewed by Antonio Gomes.
308
309         Changing HitTestRequest::IgnoreClipping does not solve the problem that
310         FatFinger rect detect the element out of the viewport. We have to clip
311         the fatfinger rect according to the current viewport size to avoid picking
312         the element out of the viewport.
313
314         * WebKitSupport/FatFingers.cpp:
315         (BlackBerry::WebKit::FatFingers::fingerRectForPoint):
316         (BlackBerry::WebKit::FatFingers::findBestPoint):
317         (BlackBerry::WebKit::FatFingers::getAdjustedPaddings):
318         (BlackBerry::WebKit::FatFingers::getNodesFromRect):
319         * WebKitSupport/FatFingers.h:
320
321 2013-02-22  Mike Fenton  <mifenton@rim.com>
322
323         [BlackBerry] Accept key events even when composing region is active.
324         https://bugs.webkit.org/show_bug.cgi?id=110617
325
326         Reviewed by Rob Buis.
327
328         PR 293598.
329
330         Don't reject key events that arrive when composing region is active,
331         this can prevent navigation events from firing, instead end
332         the composition and process the key.
333
334         Reviewed Internally by Nima Ghanavatian.
335
336         * WebKitSupport/InputHandler.cpp:
337         (BlackBerry::WebKit::InputHandler::updateFormState):
338
339 2013-02-22  Carlos Garcia Campos  <cargarcia@rim.com>
340
341         [BlackBerry] Rename first/second to key/value in HashMap iterators
342         https://bugs.webkit.org/show_bug.cgi?id=110577
343
344         Reviewed by Rob Buis.
345
346         Iterators were renamed to key/value in r130612.
347
348         * WebKitSupport/NotificationManager.cpp:
349         (BlackBerry::WebKit::NotificationManager::show):
350         (BlackBerry::WebKit::NotificationManager::clearNotifications):
351         (BlackBerry::WebKit::NotificationManager::removeNotificationFromContextMap):
352
353 2013-02-22  Carlos Garcia Campos  <cargarcia@rim.com>
354
355         [BlackBerry] Remove ProtocolHandler methods from ChromeClientBlackBerry
356         https://bugs.webkit.org/show_bug.cgi?id=110567
357
358         Reviewed by Rob Buis.
359
360         They were removed from ChromeClient in r122810 and are now
361         implemented in NavigatorContentUtilsClientBlackBerry since r131056.
362
363         * WebCoreSupport/ChromeClientBlackBerry.cpp:
364         * WebCoreSupport/ChromeClientBlackBerry.h:
365         (ChromeClientBlackBerry):
366
367 2013-02-22  Xan Lopez  <xlopez@rim.com>
368
369         [BlackBerry] DomSupport: use NodeTraversal APIs
370         https://bugs.webkit.org/show_bug.cgi?id=110467
371
372         Reviewed by Antonio Gomes.
373
374         * WebKitSupport/DOMSupport.cpp:
375         (BlackBerry::WebKit::DOMSupport::visibleTextQuads):
376
377 2013-02-21  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
378
379         Allow to retrieve the request data from abstract TextCheckingRequest to be accessible for WK2
380         https://bugs.webkit.org/show_bug.cgi?id=110208
381
382         Reviewed by Hajime Morrita.
383
384         * WebKitSupport/InputHandler.cpp:
385         (BlackBerry::WebKit::InputHandler::requestCheckingOfString):
386         Extract the request data as it is the member of 'TextCheckingRequest'.
387
388 2013-02-21  Andrew Lo  <anlo@rim.com>
389
390         [BlackBerry] WebPagePrivate::load should not check new window policy
391         https://bugs.webkit.org/show_bug.cgi?id=110403
392
393         Reviewed by Rob Buis.
394
395         Based on my understanding of changeset 135952, we should
396         not check the new window policy in WebPagePrivate::load.
397
398         None of the other ports seem to do this, except for plugins.
399
400         * Api/WebPage.cpp:
401         (BlackBerry::WebKit::WebPagePrivate::load):
402
403 2013-02-21  Alberto Garcia  <albgarcia@rim.com>
404
405         [BlackBerry] BackingStore: replace instrument{Begin,Cancel}Frame with did{Begin,Cancel}Frame
406         https://bugs.webkit.org/show_bug.cgi?id=110460
407
408         Reviewed by Rob Buis.
409
410         This was renamed incorrectly in r142879.
411
412         * Api/BackingStore.cpp:
413         (BlackBerry::WebKit::BackingStorePrivate::instrumentBeginFrame):
414         (BlackBerry::WebKit::BackingStorePrivate::instrumentCancelFrame):
415
416 2013-02-21  Carlos Garcia Campos  <cargarcia@rim.com>
417
418         [BlackBerry] Extra ResourceRequest parameter in FrameLoaderClientBlackBerry::convertMainResourceLoadToDownload
419         https://bugs.webkit.org/show_bug.cgi?id=110451
420
421         Reviewed by Rob Buis.
422
423         Remove the extra ResourceRequest parameter from
424         FrameLoaderClientBlackBerry::convertMainResourceLoadToDownload.
425
426         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
427         (WebCore::FrameLoaderClientBlackBerry::convertMainResourceLoadToDownload):
428         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
429         (FrameLoaderClientBlackBerry):
430
431 2013-02-21  Xan Lopez  <xlopez@rim.com>
432
433         [BlackBerry] Adapt to name changes in WebCore::ViewPortArguments
434         https://bugs.webkit.org/show_bug.cgi?id=110469
435
436         Reviewed by Rob Buis.
437
438         This changed in r134765.
439
440         * Api/WebViewportArguments.cpp:
441         (BlackBerry::WebKit::WebViewportArguments::zoom):
442         (BlackBerry::WebKit::WebViewportArguments::setZoom):
443         (BlackBerry::WebKit::WebViewportArguments::minZoom):
444         (BlackBerry::WebKit::WebViewportArguments::setMinZoom):
445         (BlackBerry::WebKit::WebViewportArguments::maxZoom):
446         (BlackBerry::WebKit::WebViewportArguments::setMaxZoom):
447         (BlackBerry::WebKit::WebViewportArguments::userZoom):
448         (BlackBerry::WebKit::WebViewportArguments::setUserZoom):
449         * Api/WebViewportArguments.h:
450         * WebCoreSupport/ChromeClientBlackBerry.cpp:
451         (WebCore::ChromeClientBlackBerry::didSetSVGZoomAndPan):
452
453 2013-02-21  Jakob Petsovits  <jpetsovits@rim.com>
454
455         [BlackBerry] Move posting and scrollbar updates to the page client.
456         https://bugs.webkit.org/show_bug.cgi?id=110256
457         Internal PR 297099
458
459         Reviewed by Rob Buis.
460
461         In blitVisibleContents(), we were calling the WebKit thread
462         functions BackingStorePrivate::isScrollingOrZooming() and
463         WebPage::isVisible(). This is not the right spot to do it.
464         Furthermore, we want to move away from direct window access
465         in WebKit and leave that kind of dirtywork to the client.
466
467         This patch removes invalidateWindow() as well as the two
468         virtual scrollbar drawing functions and replaces it with
469         one new virtual, WebPageClient::postToSurface().
470         This clears up threading issues and gets us another step
471         further towards pure WebPageCompositor rendering.
472
473         * Api/BackingStore.cpp:
474         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
475         * Api/BackingStore_p.h:
476         (BackingStorePrivate):
477         * Api/WebPageClient.h:
478
479 2013-02-21  Carlos Garcia Campos  <cargarcia@rim.com>
480
481         [BlackBerry] Rename Localizer to Locale
482         https://bugs.webkit.org/show_bug.cgi?id=110449
483
484         Reviewed by Rob Buis.
485
486         * WebCoreSupport/ColorPickerClient.cpp:
487         (WebCore::ColorPickerClient::locale):
488         * WebCoreSupport/ColorPickerClient.h:
489         (ColorPickerClient):
490         * WebCoreSupport/DatePickerClient.cpp:
491         (WebCore::DatePickerClient::locale):
492         * WebCoreSupport/DatePickerClient.h:
493         (DatePickerClient):
494         * WebCoreSupport/SelectPopupClient.cpp:
495         (WebCore::SelectPopupClient::locale):
496         * WebCoreSupport/SelectPopupClient.h:
497         (SelectPopupClient):
498
499 2013-02-21  Carlos Garcia Campos  <cargarcia@rim.com>
500
501         [BlackBerry] Invalid use of COMPILE_ASSERT macro in WebKitTextCodec.cpp
502         https://bugs.webkit.org/show_bug.cgi?id=110437
503
504         Reviewed by Yong Li.
505
506         * Api/WebKitTextCodec.cpp:
507         (WebKit): Define COMPILE_ASSERT_MATCHING_ENUM() macro and use it to
508         check enum values match between WebKit and WTF.
509         (BlackBerry::WebKit::base64Decode): Use a static cast directly to
510         convert from WebKit Base64DecodePolicy to WTF.
511         (BlackBerry::WebKit::base64Encode): Use a static cast directly to
512         convert from WebKit Base64EncodePolicy to WTF.
513
514 2013-02-21  Alberto Garcia  <albgarcia@rim.com>
515
516         [BlackBerry] Element::getAttributeItem() no longer returns a mutable attribute
517         https://bugs.webkit.org/show_bug.cgi?id=110439
518
519         Reviewed by Antonio Gomes.
520
521         This was changed in r142827.
522
523         * Api/WebPage.cpp:
524         (BlackBerry::WebKit::WebPagePrivate::webContext):
525
526 2013-02-21  Alberto Garcia  <albgarcia@rim.com>
527
528         [BlackBerry] willComposite() and didComposite() are now in InspectorController
529         https://bugs.webkit.org/show_bug.cgi?id=110343
530
531         Reviewed by Carlos Garcia Campos.
532
533         This was changed in r142879.
534
535         * Api/WebPage.cpp:
536         (BlackBerry::WebKit::WebPagePrivate::willComposite):
537         (BlackBerry::WebKit::WebPagePrivate::didComposite):
538
539 2013-02-20  Nima Ghanavatian  <nghanavatian@rim.com>
540
541         [BlackBerry] Check offset for initialized value
542         https://bugs.webkit.org/show_bug.cgi?id=110390
543
544         Reviewed by Rob Buis.
545
546         Instead of checking isEmpty, which checks for either point being <= 0, we want to explicitly check
547         for the initialized value of (-1, -1). This would be set in redrawSpellCheckDialogIfRequired, and
548         triggers the restore from cache in requestSpellingCheckingOptions.
549
550         Internally reviewed by Gen Mak.
551
552         * WebKitSupport/InputHandler.cpp:
553         (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions):
554
555 2013-02-20  Jakob Petsovits  <jpetsovits@rim.com>
556
557         [BlackBerry] Make sure to always sync before reusing backingstore tiles.
558         https://bugs.webkit.org/show_bug.cgi?id=109863
559         PR 296118
560
561         Reviewed by Rob Buis.
562         Internally reviewed by Mike Lattanzio and Konrad Piascik.
563
564         In SVN r142137, I replaced a syncToCurrentMessage() call
565         with updateSuspendScreenUpdateState() in some cases,
566         which internally calls the same function.
567
568         Unfortunately, when I optimized updateSuspendScreenUpdateState()
569         to only sync when the state is actually being changed,
570         I omitted an adaptation of adoptAsFrontState() which would
571         rely on this sync but now didn't always perform it.
572
573         This caused a bad race condition as tile buffers could now
574         be accessed from the WebKit thread and the UI thread at
575         the same time. Fix it by (optionally) letting the caller
576         of updateSuspendScreenUpdateState() know whether a sync
577         was performed, and adapt adoptAsFrontState() accordingly.
578
579         Also fixes some excessive flicker caused by the same
580         race condition.
581
582         * Api/BackingStore.cpp:
583         (BlackBerry::WebKit::BackingStorePrivate::updateSuspendScreenUpdateState):
584         (BlackBerry::WebKit::BackingStorePrivate::adoptAsFrontState):
585         * Api/BackingStore_p.h:
586
587 2013-02-20  Yongxin Dai  <yodai@rim.com>
588
589         [BlackBerry] Read "data-blackberry-text-selection-handle-position" attribute from element
590         https://bugs.webkit.org/show_bug.cgi?id=110235
591
592         Reviewed by Yong Li.
593
594         PR #257207.
595
596         Read "data-blackberry-text-selection-handle-position" attribute from element and pass it along
597         with notifySelectionDetailsChanged(). If "data-blackberry-text-selection-handle-position" attribute
598         is specified in the element, the selection handle is always flipped to the required position.
599         along with selected text within element.
600
601         Reviewed Internally by Mike Fenton.
602
603         * Api/WebPageClient.h:
604         * WebKitSupport/DOMSupport.cpp:
605         (BlackBerry::WebKit::DOMSupport::selectionContainerElement):
606         (DOMSupport):
607         (BlackBerry::WebKit::DOMSupport::elementHandlePositionAttribute):
608         * WebKitSupport/DOMSupport.h:
609         * WebKitSupport/SelectionHandler.cpp:
610         (BlackBerry::WebKit::SelectionHandler::requestedSelectionHandlePosition):
611         (WebKit):
612         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
613         * WebKitSupport/SelectionHandler.h:
614         (SelectionHandler):
615
616 2013-02-20  Alberto Garcia  <albgarcia@rim.com>
617
618         [BlackBerry] Fix usage of HitTestRequest::RequestType
619         https://bugs.webkit.org/show_bug.cgi?id=110342
620
621         Reviewed by Carlos Garcia Campos.
622
623         Rename HitTestResult::* -> HitTestRequest::*
624         This was introduced by mistake in r142977.
625
626         * Api/WebPage.cpp:
627         (BlackBerry::WebKit::WebPagePrivate::hitTestResult):
628
629 2013-02-20  Carlos Garcia Campos  <cgarcia@igalia.com>
630
631         Unreviewed BlackBerry build fix.
632
633         WebPage::download was renamed in the header by mistake to
634         convertMainResourceLoadToDownload in r137845.
635
636         * Api/WebPage.h:
637
638 2013-02-19  Nima Ghanavatian  <nghanavatian@rim.com>
639
640         [BlackBerry] Appropriately handle word wrapping in SpellingHandler
641         https://bugs.webkit.org/show_bug.cgi?id=110253
642
643         Reviewed by Rob Buis.
644
645         PR286001
646         Since we traverse through text by visual lines instead of blocks, word wrapping causes some
647         bad behavior. Changing the way we traverse text to jump by words instead of lines. This will
648         mean it takes longer to finish spellchecking, but the removal of any loops allows webkit
649         processing to continue. This gives priority to user actions while still completing a large
650         paragraph in a reasonable amount of time.
651
652         Internally reviewed by Mike Fenton
653
654         * WebKitSupport/InputHandler.cpp:
655         (BlackBerry::WebKit::InputHandler::requestCheckingOfString):
656         * WebKitSupport/SpellingHandler.cpp:
657         (BlackBerry::WebKit::SpellingHandler::createSpellCheckRequest):
658         (BlackBerry::WebKit::SpellingHandler::parseBlockForSpellChecking):
659         (BlackBerry::WebKit::SpellingHandler::getRangeForSpellCheckWithFineGranularity):
660         (BlackBerry::WebKit::SpellingHandler::startOfNextWord):
661         (WebKit):
662         (BlackBerry::WebKit::SpellingHandler::incrementByWord):
663         (BlackBerry::WebKit::SpellingHandler::doesWordWrap):
664         * WebKitSupport/SpellingHandler.h:
665         (SpellingHandler):
666
667 2013-02-18  Simon Fraser  <simon.fraser@apple.com>
668
669         Clean up the boolean argument to visibleContentRect
670         https://bugs.webkit.org/show_bug.cgi?id=110167
671
672         Reviewed by Simon Fraser.
673
674         Replace the boolean argument to visibleContentRect() with
675         an enum.
676
677         * Api/WebPage.cpp:
678         (BlackBerry::WebKit::WebPagePrivate::getRecursiveVisibleWindowRect):
679         * WebKitSupport/InRegionScrollableArea.cpp:
680         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
681
682 2013-02-15  Keishi Hattori  <keishi@webkit.org>
683
684         Add setValue and closePopup methods to PagePopupController
685         https://bugs.webkit.org/show_bug.cgi?id=109897
686
687         Reviewed by Kent Tamura.
688
689         * WebCoreSupport/ColorPickerClient.cpp:
690         (WebCore::ColorPickerClient::setValue): Added empty implementation.
691         (WebCore):
692         * WebCoreSupport/ColorPickerClient.h:
693         (ColorPickerClient):
694         * WebCoreSupport/DatePickerClient.cpp:
695         (WebCore::DatePickerClient::setValue): Ditto.
696         (WebCore):
697         * WebCoreSupport/DatePickerClient.h:
698         (DatePickerClient):
699         * WebCoreSupport/SelectPopupClient.cpp:
700         (WebCore::SelectPopupClient::setValue): Ditto.
701         (WebCore):
702         * WebCoreSupport/SelectPopupClient.h:
703         (SelectPopupClient):
704
705 2013-02-15  Allan Sandfeld Jensen  <allan.jensen@digia.com>
706
707         Simplify hitTestResultAtPoint and nodesFromRect APIs
708         https://bugs.webkit.org/show_bug.cgi?id=95720
709
710         Reviewed by Julien Chaffraix.
711
712         Update calls to new API.
713
714         * Api/WebPage.cpp:
715         (BlackBerry::WebKit::WebPagePrivate::contextNode):
716         (BlackBerry::WebKit::WebPagePrivate::nodeForZoomUnderPoint):
717         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
718         (BlackBerry::WebKit::WebPage::nodeAtDocumentPoint):
719         (BlackBerry::WebKit::WebPagePrivate::hitTestResult):
720         * WebKitSupport/SelectionHandler.cpp:
721         (BlackBerry::WebKit::visiblePositionForPointIgnoringClipping):
722
723 2013-02-14  Mike Fenton  <mifenton@rim.com>
724
725         [BlackBerry] Update keyboard event details to match platform details.
726         https://bugs.webkit.org/show_bug.cgi?id=109693
727
728         Reviewed by Yong Li.
729
730         PR 220170.
731
732         When re-creating the Platform::Keyboard event ensure
733         all values are updated.
734
735         Reviewed Internally by Nima Ghanavatian.
736
737         * WebKitSupport/InputHandler.cpp:
738         (BlackBerry::WebKit::InputHandler::updateFormState):
739
740 2013-02-14  Mike Fenton  <mifenton@rim.com>
741
742         [BlackBerry] Update keyboard event details to match platform details.
743         https://bugs.webkit.org/show_bug.cgi?id=109693
744
745         Reviewed by Yong Li.
746
747         PR 220170.
748
749         Update keyboard event details.
750
751         Reviewed Internally by Nima Ghanavatian and Gen Mak.
752
753         * Api/WebPage.cpp:
754         (BlackBerry::WebKit::WebPage::keyEvent):
755
756 2013-02-08  Andrey Kosyakov  <caseq@chromium.org>
757
758         Web Inspector: expose did{Begin,Cancel}Frame() and {will,did}Composite() on WebDebToolsAgent
759         https://bugs.webkit.org/show_bug.cgi?id=109192
760
761         Reviewed by Pavel Feldman.
762
763         - invoke frame instrumentation methods on InspectorController, not on InspectorInstrumentation.
764
765         * Api/BackingStore.cpp:
766         (BlackBerry::WebKit::BackingStorePrivate::instrumentBeginFrame):
767         (BlackBerry::WebKit::BackingStorePrivate::instrumentCancelFrame):
768
769 2013-02-12  Jakob Petsovits  <jpetsovits@rim.com>
770
771         [BlackBerry] Assume setScrollingOrZooming() to be called on the WebKit thread.
772         https://bugs.webkit.org/show_bug.cgi?id=109614
773         Internal PR 294513
774
775         Reviewed by Rob Buis.
776         Internally reviewed by Arvid Nilsson.
777
778         With this further simplification of threading assumptions,
779         we can get rid of atomic integer access as well as the
780         backing store mutex which was otherwise unused.
781
782         * Api/BackingStore.cpp:
783         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
784         (BlackBerry::WebKit::BackingStorePrivate::~BackingStorePrivate):
785         (BlackBerry::WebKit::BackingStorePrivate::suspendBackingStoreUpdates):
786         (BlackBerry::WebKit::BackingStorePrivate::resumeBackingStoreUpdates):
787         (BlackBerry::WebKit::BackingStorePrivate::isScrollingOrZooming):
788         (BlackBerry::WebKit::BackingStorePrivate::setScrollingOrZooming):
789         * Api/BackingStore_p.h:
790         (BackingStorePrivate):
791
792 2013-02-12  Jakob Petsovits  <jpetsovits@rim.com>
793
794         [BlackBerry] Eliminate the direct rendering option.
795         https://bugs.webkit.org/show_bug.cgi?id=109608
796         RIM PR 293298
797
798         Reviewed by Rob Buis.
799         Internally reviewed by Arvid Nilsson.
800
801         It added a lot of complexity and we're not going to use it anymore.
802         This patch removes direct rendering functionality from
803         WebKit/blackberry together with the assumption that blitting on the
804         WebKit thread is possible or acceptable. It now isn't anymore.
805
806         * Api/BackingStore.cpp:
807         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
808         (BlackBerry::WebKit::BackingStorePrivate::resumeScreenUpdates):
809         (BlackBerry::WebKit::BackingStorePrivate::updateSuspendScreenUpdateState):
810         (BlackBerry::WebKit::BackingStorePrivate::slowScroll):
811         (BlackBerry::WebKit::BackingStorePrivate::scroll):
812         (BlackBerry::WebKit::BackingStorePrivate::shouldPerformRenderJobs):
813         (BlackBerry::WebKit::BackingStorePrivate::render):
814         (BlackBerry::WebKit::BackingStorePrivate::renderAndBlitImmediately):
815         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
816         (BlackBerry::WebKit::BackingStorePrivate::blitToWindow):
817         (BlackBerry::WebKit::BackingStorePrivate::fillWindow):
818         (BlackBerry::WebKit::BackingStorePrivate::invalidateWindow):
819         (BlackBerry::WebKit::BackingStorePrivate::clearWindow):
820         (BlackBerry::WebKit::BackingStorePrivate::setScrollingOrZooming):
821         (BlackBerry::WebKit::BackingStorePrivate::didRenderContent):
822         * Api/BackingStore.h:
823         * Api/BackingStore_p.h:
824         (BackingStorePrivate):
825         * Api/WebPage.cpp:
826         (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore):
827         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
828         (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
829         (WebKit):
830         (BlackBerry::WebKit::WebPagePrivate::scheduleCompositingRun):
831         * Api/WebPageCompositor.cpp:
832         (BlackBerry::WebKit::WebPageCompositorPrivate::animationFrameChanged):
833         * Api/WebPage_p.h:
834         (WebPagePrivate):
835         * Api/WebSettings.cpp:
836         (WebKit):
837         * Api/WebSettings.h:
838         * WebKitSupport/RenderQueue.cpp:
839         (BlackBerry::WebKit::RenderQueue::renderRegularRenderJobs):
840         (BlackBerry::WebKit::RenderQueue::renderScrollZoomJobs):
841         * WebKitSupport/SurfacePool.cpp:
842         (BlackBerry::WebKit::SurfacePool::initialize):
843
844 2013-02-12  Andrew Lo  <anlo@rim.com>
845
846         [BlackBerry] CSS animations stop running during zoom
847         https://bugs.webkit.org/show_bug.cgi?id=109606
848
849         Reviewed by Rob Buis.
850         Internally reviewed by Jakob Petsovits.
851
852         Internal PR 286160.
853         New BackingStore API for suspending/resuming geometry updates.
854
855         This is needed because we want to allow render jobs to continue during
856         zoom, but we don't want to allow geometry updates during zoom.
857
858         Prevent scroll/zoom render jobs from being added to the queue if
859         the tile is outside the expanded content rect.
860
861         * Api/BackingStore.cpp:
862         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
863         (BlackBerry::WebKit::BackingStorePrivate::suspendGeometryUpdates):
864         (WebKit):
865         (BlackBerry::WebKit::BackingStorePrivate::resumeGeometryUpdates):
866         (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect):
867         (BlackBerry::WebKit::BackingStore::suspendGeometryUpdates):
868         (BlackBerry::WebKit::BackingStore::resumeGeometryUpdates):
869         * Api/BackingStore.h:
870         * Api/BackingStore_p.h:
871         (BackingStorePrivate):
872         * WebKitSupport/RenderQueue.cpp:
873         (BlackBerry::WebKit::RenderQueue::addToScrollZoomQueue):
874
875 2013-02-12  Christophe Dumez  <ch.dumez@sisa.samsung.com>
876
877         Remove remaining traces of Web Intents
878         https://bugs.webkit.org/show_bug.cgi?id=109586
879
880         Reviewed by Eric Seidel.
881
882         Remove remaining traces of Web Intents from Blackberry port
883         configuration as the functionality was removed in r142549.
884
885         * WebCoreSupport/AboutDataEnableFeatures.in:
886
887 2013-02-12  Zan Dobersek  <zdobersek@igalia.com>
888
889         Remove ENABLE_XHR_RESPONSE_BLOB handling from various build systems
890         https://bugs.webkit.org/show_bug.cgi?id=109481
891
892         Reviewed by Daniel Bates.
893
894         The ENABLE_XHR_RESPONSE_BLOB feature define was removed from the code
895         back in r120574. There are still occurrences of it in various build systems
896         which should all be removed as they are useless.
897
898         * WebCoreSupport/AboutDataEnableFeatures.in:
899
900 2013-02-11  Ryosuke Niwa  <rniwa@webkit.org>
901
902         Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
903         https://bugs.webkit.org/show_bug.cgi?id=109534
904
905         Reviewed by Anders Carlsson.
906
907         * WebCoreSupport/EditorClientBlackBerry.cpp:
908         (WebCore):
909         * WebCoreSupport/EditorClientBlackBerry.h:
910         (EditorClientBlackBerry):
911
912 2013-02-11  Mike Fenton  <mifenton@rim.com>
913
914         [BlackBerry] Add form navigation control state tracking.
915         https://bugs.webkit.org/show_bug.cgi?id=109300
916
917         Reviewed by Rob Buis.
918
919         Add form navigation control state tracking.
920
921         * Api/WebPage.cpp:
922         (BlackBerry::WebKit::WebPage::focusNextField):
923         (WebKit):
924         (BlackBerry::WebKit::WebPage::focusPreviousField):
925         (BlackBerry::WebKit::WebPage::submitForm):
926         * Api/WebPage.h:
927         * Api/WebPageClient.h:
928         * WebKitSupport/InputHandler.cpp:
929         (BlackBerry::WebKit::InputHandler::InputHandler):
930         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
931         (BlackBerry::WebKit::InputHandler::updateFormState):
932         * WebKitSupport/InputHandler.h:
933         (InputHandler):
934
935 2013-02-09  Tiancheng Jiang  <tijiang@rim.com>
936
937         [BlackBerry] Set mouse document position for mouse event in updateCursor.
938         https://bugs.webkit.org/show_bug.cgi?id=109094.
939
940         Reviewed by Rob Buis.
941
942         RIM PR 246976
943         Internally Reviewed by Genevieve Mak.
944
945         BlackBerry::Platform::MouseEvent have document viewport and document
946         content position as members. When we create the event, we should initial
947         them as well.
948
949         * Api/WebPage.cpp:
950         (BlackBerry::WebKit::WebPagePrivate::updateCursor):
951
952 2013-02-07  Charles Wei  <charles.wei@torchmobile.com.cn>
953
954         webpage needs null check in BackingStore::setCurrentBackingStoreOwner
955         https://bugs.webkit.org/show_bug.cgi?id=109253
956
957         Reviewed by George Staikos.
958
959         * Api/BackingStore.cpp:
960         (BlackBerry::WebKit::BackingStorePrivate::setCurrentBackingStoreOwner):
961
962 2013-02-07  Mary Wu  <mary.wu@torchmobile.com.cn>
963
964         [BlackBerry] Enable non-video element enter/exit fullscreen.
965         https://bugs.webkit.org/show_bug.cgi?id=108314
966
967         Reviewed by Antonio Gomes.
968
969         Webkit support non-video element (like div) to enter/exit
970         fullscreen. We should pass this capability in blackberry porting.
971
972         RIM PR 256370, internally reviewed by Max Feil.
973
974         * Api/WebPage.cpp:
975         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
976         (BlackBerry::WebKit::WebPagePrivate::clearDocumentData):
977         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
978         (BlackBerry::WebKit::WebPage::notifyFullScreenVideoExited):
979         (BlackBerry::WebKit::WebPagePrivate::enterFullscreenForNode):
980         (BlackBerry::WebKit::WebPagePrivate::exitFullscreenForNode):
981         (WebKit):
982         (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
983         (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
984         (BlackBerry::WebKit::WebPagePrivate::adjustFullScreenElementDimensionsIfNeeded):
985         * Api/WebPage_p.h:
986         (WebPagePrivate):
987
988 2013-02-07  Jakob Petsovits  <jpetsovits@rim.com>
989
990         [BlackBerry] Fix all flicker caused by empty/incomplete geometries.
991         https://bugs.webkit.org/show_bug.cgi?id=108951
992         RIM PR 286925
993
994         Reviewed by Rob Buis.
995         Internally reviewed by Arvid Nilsson.
996
997         The main idea for this patch is that whenever we adopt
998         a new backingstore geometry that doesn't contain any
999         rendered tiles, or VisibleZoom render jobs that need more
1000         tiles to be rendered to be considered complete, we'll then
1001         suspend blitting until there is valid content to show.
1002
1003         This main idea is codified as checks for empty buffers
1004         in adoptAsFrontState(), and checks for the current state
1005         of the render queue after rendering content in render().
1006         However, as BackingStore objects with disabled surface pools
1007         or pure use of accelerated compositing also swap geometries
1008         in some circumstances, the use of suspend counters grows
1009         increasingly fragile.
1010
1011         To make this patch more resilient against regressions,
1012         the current suspend counter is complemented with several
1013         explicit conditions for suspending screen updates,
1014         and both subsequently combined into a single cached
1015         boolean value telling the UI thread whether or not to
1016         suspend. In the future, other suspend calls can be
1017         migrated to this "state machine" design as well,
1018         potentially phasing out the suspend counter altogether.
1019
1020         The immediate result is that there will be no flashing
1021         of background color between page loads or after discarding
1022         tiles on scale changes until the content has been rendered.
1023
1024         * Api/BackingStore.cpp:
1025         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
1026         (BlackBerry::WebKit::BackingStorePrivate::suspendBackingStoreUpdates):
1027         (BlackBerry::WebKit::BackingStorePrivate::suspendScreenUpdates):
1028         (BlackBerry::WebKit::BackingStorePrivate::resumeBackingStoreUpdates):
1029         (BlackBerry::WebKit::BackingStorePrivate::resumeScreenUpdates):
1030         (BlackBerry::WebKit::BackingStorePrivate::updateSuspendScreenUpdateState):
1031         (WebKit):
1032         (BlackBerry::WebKit::BackingStorePrivate::render):
1033         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
1034         (BlackBerry::WebKit::BackingStorePrivate::adoptAsFrontState):
1035         (BlackBerry::WebKit::BackingStorePrivate::setCurrentBackingStoreOwner):
1036         (BlackBerry::WebKit::BackingStore::releaseOwnedBackingStoreMemory):
1037         * Api/BackingStore_p.h:
1038         (BackingStorePrivate):
1039         * Api/WebPage.cpp:
1040         (BlackBerry::WebKit::WebPagePrivate::setVisible):
1041         (BlackBerry::WebKit::WebPagePrivate::setCompositorDrawsRootLayer):
1042
1043 2013-02-07  Xiaobo Wang  <xbwang@torchmobile.com.cn>
1044
1045         [BlackBerry] CHHW - Characters that are using 32 bits encoding get trunked to 16bits
1046         https://bugs.webkit.org/show_bug.cgi?id=109126
1047         PR 292540
1048
1049         Reviewed by Yong Li.
1050         Internally reviewed by Mike Fenton.
1051
1052         Key char is UTF32 encoded, should be 4 bytes.
1053
1054         * Api/WebPage.cpp:
1055         (BlackBerry::WebKit::handleScrolling):
1056         * WebKitSupport/InputHandler.cpp:
1057         (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
1058         * WebKitSupport/InputHandler.h:
1059         (InputHandler):
1060         * WebKitSupport/SelectionHandler.cpp:
1061         (BlackBerry::WebKit::directionOfPointRelativeToRect):
1062         (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
1063         (BlackBerry::WebKit::shouldExtendSelectionInDirection):
1064         (BlackBerry::WebKit::directionalVisiblePositionAtExtentOfBox):
1065         (BlackBerry::WebKit::SelectionHandler::extendSelectionToFieldBoundary):
1066         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
1067         * WebKitSupport/SelectionHandler.h:
1068         (SelectionHandler):
1069
1070 2013-02-07  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
1071
1072         [BlackBerry] Reader Mode: Opening two links quickly from reader mode causes browser bad state
1073         https://bugs.webkit.org/show_bug.cgi?id=109124
1074
1075         Reviewed by Yong Li.
1076
1077         RIM BUG 291246 Internally reviewed by YongLi.
1078         Move the WebPageGroupLoadDeferrer object from ChromeClientBlackBerry::createWindow()
1079         into WebPageClientImpl::createWindow() to make it more close to its protecting place.
1080
1081         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1082         (WebCore::ChromeClientBlackBerry::createWindow):
1083
1084 2013-02-07  Mike Fenton  <mifenton@rim.com>
1085
1086         [BlackBerry] Send type details with IMF mask as part of focus gained.
1087         https://bugs.webkit.org/show_bug.cgi?id=109086
1088
1089         Reviewed by Yong Li.
1090
1091         PR 292609.
1092
1093         Add masking options based on VKB type to the IMF mask.
1094
1095         Reviewed Internally by Nima Ghanavatian.
1096
1097         * WebKitSupport/InputHandler.cpp:
1098         (BlackBerry::WebKit::addInputStyleMaskForKeyboardType):
1099         (WebKit):
1100         (BlackBerry::WebKit::InputHandler::setElementFocused):
1101
1102 2013-02-06  Jakob Petsovits  <jpetsovits@rim.com>
1103
1104         [BlackBerry] Refactor renderContents() for cleaner code.
1105         https://bugs.webkit.org/show_bug.cgi?id=109059
1106         RIM PR 280374
1107
1108         Reviewed by Rob Buis.
1109         Internally reviewed by Arvid Nilsson.
1110
1111         The fact that we've got two renderContents() implementations
1112         in BackingStore.cpp, one of which was tailored to just
1113         being called from drawContents(), is a major annoyance.
1114
1115         With this patch, the regular renderContents() is modified
1116         in a way so that drawContents() can make use of it as well.
1117         This includes an API change for both functions which makes
1118         it more flexible and enables further cleanups and improvements
1119         to accuracy. The second, unloved renderContents() is removed.
1120
1121         The user-visible changes are improved (float) accuracy for
1122         render offsets, clipping to exactly the dstRect that has
1123         been specified, and the changed public drawContents() API.
1124
1125         * Api/BackingStore.cpp:
1126         (BlackBerry::WebKit::BackingStorePrivate::renderDirectToWindow):
1127         (BlackBerry::WebKit::BackingStorePrivate::render):
1128         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
1129         (BlackBerry::WebKit::BackingStore::drawContents):
1130         * Api/BackingStore.h:
1131         (Platform):
1132         (Graphics):
1133         * Api/BackingStore_p.h:
1134         (WebCore):
1135         (BackingStorePrivate):
1136         * WebKitSupport/SurfacePool.cpp:
1137         (BlackBerry::WebKit::SurfacePool::SurfacePool):
1138         (BlackBerry::WebKit::SurfacePool::initialize):
1139         (BlackBerry::WebKit::SurfacePool::destroyPlatformGraphicsContext):
1140         * WebKitSupport/SurfacePool.h:
1141         (SurfacePool):
1142
1143 2013-02-06  Nima Ghanavatian  <nghanavatian@rim.com>
1144
1145         [BlackBerry] Check range before use in parseBlockForSpellChecking
1146         https://bugs.webkit.org/show_bug.cgi?id=109080
1147
1148         Reviewed by Yong Li.
1149
1150         PR291394
1151         This was missed during patch webkit/5aea04f6ea625827. Since getRangeForSpellCheckWithFineGranularity
1152         now returns null values, we need a check here before using the range object here as well.
1153
1154         Internally reviewed by Mike Fenton.
1155
1156         * WebKitSupport/SpellingHandler.cpp:
1157         (BlackBerry::WebKit::SpellingHandler::parseBlockForSpellChecking):
1158
1159 2013-02-06  Nima Ghanavatian  <nghanavatian@rim.com>
1160
1161         [BlackBerry] Check for a valid range object before using it
1162         https://bugs.webkit.org/show_bug.cgi?id=109058
1163
1164         Reviewed by Rob Buis.
1165
1166         PR291394
1167         Crash occurs if makeRange returns null, since we are using this value without checking
1168         its validity. We had an assert before which I'm replacing with just a check for null.
1169
1170         Internally reviewed by Mike Fenton.
1171
1172         * WebKitSupport/SpellingHandler.cpp:
1173         (BlackBerry::WebKit::SpellingHandler::getRangeForSpellCheckWithFineGranularity):
1174
1175 2013-02-05  Andrew Lo  <anlo@rim.com>
1176
1177         [BlackBerry] Scrolling performance drops doing page load
1178         https://bugs.webkit.org/show_bug.cgi?id=108949
1179
1180         Reviewed by Yong Li.
1181         Internally reviewed by Jakob Petsovits.
1182
1183         Internal PR 291390.
1184         The intention of this code was to not update non-visible tiles during page load.
1185
1186         Before this patch, the code would update tiles that have already been rendered
1187         during page load.
1188
1189         * Api/BackingStore.cpp:
1190         (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion):
1191
1192 2013-02-04  Tiancheng Jiang  <tijiang@rim.com>
1193
1194         [BlackBerry]Adjust fatfinger detection rect size
1195         https://bugs.webkit.org/show_bug.cgi?id=108678
1196
1197         Reviewed by Antonio Gomes.
1198         RIM Bug 246976
1199
1200         We still need to clip the fatfinger detection rect to the viewport to
1201         avoid wrong hitTest result.
1202
1203         * Api/WebPage.cpp:
1204         (BlackBerry::WebKit::WebPage::mouseEvent):
1205         * WebKitSupport/FatFingers.cpp:
1206         (BlackBerry::WebKit::FatFingers::getNodesFromRect):
1207
1208 2013-02-04  Abhishek Arya  <inferno@chromium.org>
1209
1210         Add ASSERT_WITH_SECURITY_IMPLICATION to detect bad cast in DOM, CSS, etc.
1211         https://bugs.webkit.org/show_bug.cgi?id=108688
1212
1213         Reviewed by Eric Seidel.
1214
1215         * Api/WebPage.cpp:
1216         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
1217         * WebKitSupport/FatFingers.cpp:
1218         (BlackBerry::WebKit::FatFingers::setSuccessfulFatFingersResult):
1219
1220 2013-02-04  Andrew Lo  <anlo@rim.com>
1221
1222         [BlackBerry] Needs one-shot drawing synchronization flag should be set before rendering when resuming the backing store
1223         https://bugs.webkit.org/show_bug.cgi?id=108760
1224
1225         Reviewed by Yong Li.
1226         Internally reviewed by Arvid Nilsson.
1227
1228         Internal PR 286218.
1229         When acquiring the backing store ownership in WebPagePrivate::resumeBackingStore
1230         we need to set the needs one-shot drawing synchronization flag
1231         before rendering, so that when the render is completed we
1232         commit the root layer.
1233
1234         * Api/WebPage.cpp:
1235         (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore):
1236
1237 2013-02-03  KwangYong Choi  <ky0.choi@samsung.com>
1238
1239         Fix build warning after r141473
1240         https://bugs.webkit.org/show_bug.cgi?id=108782
1241
1242         Reviewed by Kentaro Hara.
1243
1244         Fix -Wunused-parameter build warning.
1245
1246         * WebCoreSupport/EditorClientBlackBerry.cpp:
1247         (WebCore::EditorClientBlackBerry::getClientPasteboardDataForRange):
1248
1249 2013-02-01  Jacky Jiang  <zhajiang@rim.com>
1250
1251         [BlackBerry] Zooming in during page load of non-scalable webpage results in fixed magnification
1252         https://bugs.webkit.org/show_bug.cgi?id=108252
1253
1254         Reviewed by Yong Li.
1255         Internally reviewed by Konrad Piascik.
1256
1257         PR: 284828
1258         We got float layoutSize(342.284122, 521.448467) and
1259         m_maximumScale(2.243750) after computing viewport meta based on the
1260         device pixel ratio and laid out the contents at IntSize(342, 521).
1261         Therefore, zoomToFitScale(2.245681) would be a bit larger than
1262         m_maximumScale based on that contents size and resulted in
1263         maximumScale()!=minimumScale(), which made the non-scalable page
1264         scalable.
1265         Return zoomToFitScale for maximumScale() in such kind of case.
1266
1267         * Api/WebPage.cpp:
1268         (BlackBerry::WebKit::WebPagePrivate::maximumScale):
1269
1270 2013-02-01  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
1271
1272         [BlackBerry] InputHandler status is not restored when page history goes back
1273         https://bugs.webkit.org/show_bug.cgi?id=108448
1274
1275         Reviewed by Yong Li.
1276
1277         PR288406 Internally reviewed by Mike Fenton
1278
1279         When webpage goes back, it restores the old frame's selection and focused node,
1280         but we don't save the InputHandler's status, it becomes non-input mode when page
1281         goes back. When it restores the focus, since the new focus node is same as the old
1282         document focused node, webcore will not notify client to update the input handler.
1283
1284         This patch updates the input handler's status by notifying it focus node changed.
1285
1286
1287         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1288         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
1289         * WebKitSupport/InputHandler.cpp:
1290         (BlackBerry::WebKit::InputHandler::restoreViewState):
1291         (WebKit):
1292         * WebKitSupport/InputHandler.h:
1293         (InputHandler):
1294
1295 2013-01-31  Jacky Jiang  <zhajiang@rim.com>
1296
1297         [BlackBerry] Bing Images viewport causes layout "fun"
1298         https://bugs.webkit.org/show_bug.cgi?id=108393
1299
1300         Reviewed by Yong Li.
1301         Internally reviewed by Arvid Nilsson and partially reviewed by Konrad Piascik.
1302
1303         PR: 277855
1304         Set applyPageScaleFactorInCompositor settting to false by default.
1305         Scale down chrome window rect to density-independent pixels.
1306
1307         * Api/WebPage.cpp:
1308         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
1309         * Api/WebSettings.cpp:
1310         (WebKit):
1311         (BlackBerry::WebKit::WebSettings::standardSettings):
1312         (BlackBerry::WebKit::WebSettings::applyDeviceScaleFactorInCompositor):
1313         (BlackBerry::WebKit::WebSettings::setApplyPageScaleFactorInCompositor):
1314         * Api/WebSettings.h:
1315         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1316         (WebCore::ChromeClientBlackBerry::windowRect):
1317
1318 2013-01-31  Enrica Casucci  <enrica@apple.com>
1319
1320         WebKit2: provide new bundle APIs to allow bundle clients to be notified of pasteboard access.
1321         https://bugs.webkit.org/show_bug.cgi?id=108396.
1322         <rdar://problem/12920461>
1323
1324         Reviewed by Alexey Proskuryakov.
1325
1326         Adds stub implementation for WebKit of the new EditorClient methods.
1327
1328         * WebCoreSupport/EditorClientBlackBerry.cpp:
1329         (WebCore::EditorClientBlackBerry::willWriteSelectionToPasteboard):
1330         (WebCore::EditorClientBlackBerry::getClientPasteboardDataForRange):
1331         * WebCoreSupport/EditorClientBlackBerry.h:
1332
1333 2013-01-30  Ed Baker  <edbaker@rim.com>
1334
1335         [BlackBerry] Screenshot is clipped when content is smaller than the desintation size
1336         https://bugs.webkit.org/show_bug.cgi?id=107735
1337
1338         Reviewed by Rob Buis.
1339
1340         Internal PR #284662
1341         Don't scale the transformed content rect when the content is smaller than the destination
1342         size. Scale the graphics context when it has a scale factor that isn't 1.0.
1343
1344         Internally reviewed by Andrew Lo
1345
1346         * Api/BackingStore.cpp:
1347         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
1348
1349 2013-01-30  Xiaobo Wang  <xbwang@torchmobile.com.cn>
1350
1351         [BlackBerry] Webpage was cut off after rotating to landscape and then rotating back to portrait on specific website
1352         https://bugs.webkit.org/show_bug.cgi?id=108281
1353         PR 284985
1354
1355         Reviewed by Rob Buis.
1356         Internally reviewed by Jacky Jiang.
1357
1358         Return correct fixedLayoutSize when overflow exceeds contents size.
1359
1360         * Api/WebPage.cpp:
1361         (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize):
1362
1363 2013-01-30  Simon Hausmann  <simon.hausmann@digia.com>
1364
1365         [Qt] Remove QT4_UNICODE related code paths
1366         https://bugs.webkit.org/show_bug.cgi?id=108316
1367
1368         Reviewed by Kenneth Rohde Christiansen.
1369
1370         * WebCoreSupport/AboutDataUseFeatures.in: The feature macro has been removed.
1371
1372 2013-01-29  Sheriff Bot  <webkit.review.bot@gmail.com>
1373
1374         Unreviewed, rolling out r140983.
1375         http://trac.webkit.org/changeset/140983
1376         https://bugs.webkit.org/show_bug.cgi?id=108277
1377
1378         Unfortunately, this API has one last client (Requested by
1379         abarth on #webkit).
1380
1381         * WebCoreSupport/AboutDataEnableFeatures.in:
1382
1383 2013-01-28  Andrew Lo  <anlo@rim.com>
1384
1385         [BlackBerry] Small animated zoom level adjustments are unnecessary
1386         https://bugs.webkit.org/show_bug.cgi?id=108104
1387
1388         Reviewed by Rob Buis.
1389         Internally reviewed by Mike Fenton.
1390
1391         Internal PR 285861.
1392         If the difference between the target scale and current scale is
1393         less than a given threshold, don't perform a zoom animation.
1394
1395         * WebKitSupport/InputHandler.cpp:
1396         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
1397
1398 2013-01-28  Nima Ghanavatian  <nghanavatian@rim.com>
1399
1400         [BlackBerry] Reduce the region that is spellchecked on keystroke
1401         https://bugs.webkit.org/show_bug.cgi?id=108115
1402
1403         Reviewed by Rob Buis.
1404
1405         PR288217
1406         Instead of blindly checking text until endOfDocument, we should be honoring the boundaries of
1407         the VisibleSelection that is passed into SpellingHandler. Though this results in the same behavior
1408         on focus, this dramatically reduces the region that is rechecked when a key is hit.
1409
1410         Internally reviewed by Mike Fenton.
1411
1412         * WebKitSupport/InputHandler.cpp:
1413         (BlackBerry::WebKit::InputHandler::requestCheckingOfString):
1414         * WebKitSupport/SpellingHandler.cpp:
1415         (BlackBerry::WebKit::SpellingHandler::spellCheckTextBlock):
1416         (BlackBerry::WebKit::SpellingHandler::parseBlockForSpellChecking):
1417         * WebKitSupport/SpellingHandler.h:
1418         (SpellingHandler):
1419
1420 2013-01-28  Adam Barth  <abarth@webkit.org>
1421
1422         Remove webkitNotifications.createHTMLNotification
1423         https://bugs.webkit.org/show_bug.cgi?id=107598
1424
1425         Reviewed by Benjamin Poulain.
1426
1427         * WebCoreSupport/AboutDataEnableFeatures.in:
1428
1429 2013-01-28  Otto Derek Cheung  <otcheung@rim.com>
1430
1431         [BlackBerry] SpellingHandler parses and creates spellcheck requests regardless of the system spell check status
1432         https://bugs.webkit.org/show_bug.cgi?id=108085
1433
1434         Reviewed by Rob Buis.
1435
1436         Fix a merge error that duplicated a function declaration in InputHandler.h.
1437
1438         * WebKitSupport/InputHandler.h:
1439
1440 2013-01-28  Otto Derek Cheung  <otcheung@rim.com>
1441
1442         [BlackBerry] SpellingHandler parses and creates spellcheck requests regardless of the system spell check status
1443         https://bugs.webkit.org/show_bug.cgi?id=108085
1444         PR 286165
1445
1446         Reviewed by Rob Buis.
1447         Internally reviewed by Nima Ghanavatian.
1448
1449         Adding a check for the system spell check status in InputHandler::shouldSpellCheckElement so
1450         we won't bother sending a spellcheck request if system spell check is turned off.
1451
1452         However, on a fresh browser start up and on the first setElementFocus, the spellcheck value isn't defined yet.
1453         The first spell check request is therefore necessary to connect to imf to determine whether spell check is turned on.
1454         If spell check is turned off, we will turn spellinghandler off.
1455
1456         Tested the patch using a test site that contains editable text in text-areas and content-editable divs. Also tested on
1457         an extreme test case where we try to edit a content-editable div with 30000 characters. Confirmed spell-check requests are
1458         being canceled if system spell check is off.
1459
1460         In theory, this patch should also fix PR 284229 . However, because of issues with getting the system spell check values from IMF,
1461         additional work needs to be done for that PR. 
1462
1463         * Api/WebPage.cpp:
1464         (BlackBerry::WebKit::WebPage::setSpellCheckingEnabled):
1465         * WebKitSupport/InputHandler.cpp:
1466         (BlackBerry::WebKit::InputHandler::InputHandler):
1467         (BlackBerry::WebKit::InputHandler::shouldSpellCheckElement):
1468         (WebKit):
1469         (BlackBerry::WebKit::InputHandler::stopPendingSpellCheckRequests):
1470         * WebKitSupport/InputHandler.h:
1471         (InputHandler):
1472         (BlackBerry::WebKit::InputHandler::setSystemSpellCheckStatus):
1473
1474 2013-01-25  Andrew Lo  <anlo@rim.com>
1475
1476         [BlackBerry] Pop-up WebViews should not take ownership of the backing store.
1477         https://bugs.webkit.org/show_bug.cgi?id=107957
1478
1479         Reviewed by Rob Buis.
1480         Internally reviewed by Jakob Petsovits.
1481
1482         Internal PR 274581.
1483         Add web setting for whether a WebPage should take the backing store.
1484         Prevent pop-up WebView from taking ownership of the backing
1485         store when it becomes visible.
1486
1487         * Api/WebPage.cpp:
1488         (BlackBerry::WebKit::WebPage::setVisible):
1489         * Api/WebSettings.cpp:
1490         (WebKit):
1491         (BlackBerry::WebKit::WebSettings::standardSettings):
1492         (BlackBerry::WebKit::WebSettings::isBackingStoreEnabled):
1493         (BlackBerry::WebKit::WebSettings::setBackingStoreEnabled):
1494         * Api/WebSettings.h:
1495         * WebCoreSupport/PagePopupBlackBerry.cpp:
1496         (WebCore::PagePopupBlackBerry::PagePopupBlackBerry):
1497         (WebCore::PagePopupBlackBerry::init):
1498
1499 2013-01-25  Arvid Nilsson  <anilsson@rim.com>
1500
1501         [BlackBerry] AC layers appear in the wrong place on RTL page
1502         https://bugs.webkit.org/show_bug.cgi?id=107930
1503
1504         Reviewed by George Staikos.
1505
1506         The public API of the BlackBerry port always reports a minimum scroll
1507         position of (0, 0), even on RTL pages with left overflow. We
1508         accomplish this by translating the WebCore scroll position by an
1509         amount equal in size to the minimum scroll position, to obtain the API
1510         scroll position reported to the API client.
1511
1512         This means the API client will ask us to render a rect that needs to
1513         be corrected for the minimum scroll position, or we'll render the wrong
1514         part. This is done for BackingStore, but not for WebPageCompositor.
1515
1516         WebPageCompositor was rendering the wrong part of the web page when
1517         the minimum scroll position was non-zero. Fixed by communicating the
1518         minimum scroll position to the WebPageCompositor, and accounting for it
1519         when interpreting the requested content rectangle to render.
1520
1521         PR 280229.
1522
1523         * Api/WebPage.cpp:
1524         (BlackBerry::WebKit::WebPagePrivate::commitRootLayer):
1525         (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
1526         * Api/WebPageCompositor.cpp:
1527         (BlackBerry::WebKit::WebPageCompositorPrivate::render):
1528         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
1529         * Api/WebPageCompositor_p.h:
1530         (BlackBerry::WebKit::WebPageCompositorPrivate::layoutRect):
1531         (BlackBerry::WebKit::WebPageCompositorPrivate::setLayoutRect):
1532         (BlackBerry::WebKit::WebPageCompositorPrivate::documentRect):
1533         (BlackBerry::WebKit::WebPageCompositorPrivate::setDocumentRect):
1534         (WebPageCompositorPrivate):
1535         * Api/WebPage_p.h:
1536         (WebPagePrivate):
1537
1538 2013-01-24  Nima Ghanavatian  <nghanavatian@rim.com>
1539
1540         [BlackBerry] Fix crash in SpellingHandler
1541         https://bugs.webkit.org/show_bug.cgi?id=107842
1542
1543         Reviewed by Rob Buis.
1544
1545         If we have an empty range or one with all spaces, we can simply return 0 instead of
1546         still creating a range. Putting in a null check after trimming to catch this case
1547         which was causing the crash in some DRT tests.
1548
1549         Internally reviewed by Mike Fenton.
1550
1551         * WebKitSupport/DOMSupport.cpp:
1552         (BlackBerry::WebKit::DOMSupport::trimWhitespaceFromRange):
1553         * WebKitSupport/SpellingHandler.cpp:
1554         (BlackBerry::WebKit::SpellingHandler::createSpellCheckRequest):
1555
1556 2013-01-24  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
1557
1558         [BlackBerry] It can't Select texts in main frame when the current focus is in a IFrame
1559         https://bugs.webkit.org/show_bug.cgi?id=107773
1560
1561         Reviewed by Antonio Gomes.
1562
1563         PR285211 Internally reviewed by Genevieve Mak
1564
1565         When touch hold in the unfocused frame, it doesn't switch frame focus. Many
1566         places in code depends on the webpage->forcusOrMainFrame(), including the
1567         SelectionHandler, so it can't select in an unfocused frame. This patch switchs
1568         frame focus when touch starts.
1569
1570         * WebKitSupport/TouchEventHandler.cpp:
1571         (BlackBerry::WebKit::TouchEventHandler::doFatFingers):
1572
1573 2013-01-23  Nima Ghanavatian  <nghanavatian@rim.com>
1574
1575         [BlackBerry] Take a better guess as to what text the user wants learned
1576         https://bugs.webkit.org/show_bug.cgi?id=107706
1577
1578         Reviewed by Rob Buis.
1579
1580         If we still have a valid caret position, use it to give priority to a region
1581         of text.  We now take the text before the caret, instead of the text at the end
1582         of the field.  If the caret is not present, we start from the beginning of the field.
1583         This helps learning in email where the region of interest is generally at the start,
1584         not end of the field.
1585
1586         Internally reviewed by Mike Fenton
1587
1588         * WebKitSupport/InputHandler.cpp:
1589         (BlackBerry::WebKit::InputHandler::learnText):
1590
1591 2013-01-23  Nima Ghanavatian  <nghanavatian@rim.com>
1592
1593         [BlackBerry] Optimize spellchecking by coalescing messages
1594         https://bugs.webkit.org/show_bug.cgi?id=107707
1595
1596         Reviewed by Rob Buis.
1597
1598         PR233604
1599         Instead of taking chunks one line at a time, coalesce them together
1600         to fire off messages as close to our character limit as possible.
1601         This should dramatically reduce the total number of messages in email
1602         giving us a little performance bump.
1603
1604         Internally reviewed by Mike Fenton and Gen Mak.
1605
1606         * WebKitSupport/DOMSupport.cpp:
1607         (BlackBerry::WebKit::DOMSupport::trimWhitespaceFromRange):
1608         (DOMSupport):
1609         * WebKitSupport/DOMSupport.h:
1610         * WebKitSupport/InputHandler.cpp:
1611         * WebKitSupport/InputHandler.h:
1612         (InputHandler):
1613         * WebKitSupport/SpellingHandler.cpp:
1614         (BlackBerry::WebKit::SpellingHandler::spellCheckTextBlock):
1615         (BlackBerry::WebKit::SpellingHandler::createSpellCheckRequest):
1616         (BlackBerry::WebKit::SpellingHandler::parseBlockForSpellChecking):
1617         (BlackBerry::WebKit::SpellingHandler::getRangeForSpellCheckWithFineGranularity):
1618         * WebKitSupport/SpellingHandler.h:
1619
1620 2013-01-23  Shinya Kawanaka  <shinyak@chromium.org>
1621
1622         shadowAncestorNode() should be renamed to deprecatedShadowAncestorNode()
1623         https://bugs.webkit.org/show_bug.cgi?id=107624
1624
1625         Reviewed by Dimitri Glazkov.
1626
1627         Since Node::shadowAncestorNode() is deprecated, we would like to rename it to prevent from further use.
1628
1629         * Api/WebPage.cpp:
1630         (BlackBerry::WebKit::WebPagePrivate::webContext):
1631         * WebKitSupport/FatFingers.h:
1632         (BlackBerry::WebKit::FatFingersResult::node):
1633         * WebKitSupport/InPageSearchManager.cpp:
1634         (BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):
1635
1636 2013-01-22  Andrew Lo  <anlo@rim.com>
1637
1638         [BlackBerry] GIF & RAF animations sometimes don't resume after zoom
1639         https://bugs.webkit.org/show_bug.cgi?id=107590
1640
1641         Reviewed by Rob Buis.
1642         Internally reviewed by Jakob Petsovits.
1643
1644         Internal PR 276907.
1645         Dispatch render jobs when resuming backing store updates to perform jobs
1646         queued when updates were suspended.
1647
1648         * Api/BackingStore.cpp:
1649         (BlackBerry::WebKit::BackingStorePrivate::resumeBackingStoreUpdates):
1650
1651 2013-01-21  Nima Ghanavatian  <nghanavatian@rim.com>
1652
1653         [BlackBerry] Skip spell checking on single character strings
1654         https://bugs.webkit.org/show_bug.cgi?id=107463
1655
1656         Reviewed by Yong Li.
1657
1658         Check for a minimum string length when firing off spellcheck since we don't
1659         want to mark single letter words.
1660
1661         Internally reviewed by Mike Fenton.
1662
1663         * WebKitSupport/InputHandler.cpp:
1664         * WebKitSupport/SpellingHandler.cpp:
1665         (BlackBerry::WebKit::SpellingHandler::createSpellCheckRequest):
1666         (BlackBerry::WebKit::SpellingHandler::parseBlockForSpellChecking):
1667
1668 2013-01-20  Charles Wei  <charles.wei@torchmobile.com.cn>
1669
1670         [BlackBerry] some websites only takes half of the screen after rotating from landscape to portrait mode.
1671         https://bugs.webkit.org/show_bug.cgi?id=107103
1672
1673         Reviewed by George Staikos.
1674         Internally reviewed by Jacky Jiang.
1675
1676         When the document size changes (by some javascript) which makes it too small to fit the viewport, we should
1677         automatically zoom it to fit the viewport.
1678
1679         * Api/WebPage.cpp:
1680         (BlackBerry::WebKit::WebPagePrivate::layoutFinished):
1681
1682 2013-01-20  Tiancheng Jiang  <tijiang@rim.com>
1683
1684         [BlackBerry] Improve Fatfinger phase.
1685         https://bugs.webkit.org/show_bug.cgi?id=107403
1686
1687         Reviewed by Rob Buis.
1688
1689         RIM PR 219489
1690         Internally reviewd by Mike Fenton & Gen Mak.
1691
1692         Treat ClickableByDefault and MadeClickableByTheWebpage elements as
1693         same category. Avoid unnecessary nodes check step.
1694
1695         * WebKitSupport/FatFingers.cpp:
1696         (BlackBerry::WebKit::FatFingers::isElementClickable):
1697         (BlackBerry::WebKit::FatFingers::FatFingers):
1698         (BlackBerry::WebKit::FatFingers::findBestPoint):
1699         (BlackBerry::WebKit::FatFingers::getNodesFromRect):
1700         * WebKitSupport/FatFingers.h:
1701
1702 2013-01-18  Andrew Lo  <anlo@rim.com>
1703         [BlackBerry] When acquiring/releasing backing store memory, allow web page client control suspend/resuming of backing store
1704         https://bugs.webkit.org/show_bug.cgi?id=107307
1705
1706         Reviewed by Rob Buis.
1707         Internally reviewed by Jakob Petsovits.
1708
1709         Internal PR276660
1710         Have BackingStore::createBackingStoreMemory & releaseBackingStoreMemory only
1711         acquire & release the surface pool. It doesn't matter if either is called
1712         redundantly since SurfacePool has internal state to protect against that.
1713
1714         Resuming & suspending backing store and screen updates will be handled by
1715         the WebPageClient.
1716
1717         * Api/BackingStore.cpp:
1718         (BlackBerry::WebKit::BackingStore::acquireBackingStoreMemory):
1719         (BlackBerry::WebKit::BackingStore::releaseOwnedBackingStoreMemory):
1720         * Api/BackingStore.h:
1721
1722 2013-01-18  Nima Ghanavatian  <nghanavatian@rim.com>
1723
1724         [BlackBerry] Set spellchecking calculations on a timer to free up the WebKit thread
1725         https://bugs.webkit.org/show_bug.cgi?id=107284
1726
1727         Reviewed by Rob Buis.
1728
1729         PR282351
1730         Firing off spellcheck requests is tieing up the WebKit thread for an
1731         extended period of time. In testing with large blocks of text, this
1732         can be in the matter of 5-10 seconds. Though we are using asynchronous
1733         spellchecking, the process in which we break down blocks of text based
1734         on input_service limitations is the issue.
1735         Using a timer here which fires with an arbitrary timeout to allow for
1736         focus and interaction to maintain at a reasonable level.
1737         Further, pulling this code out of InputHandler and into its own class.
1738
1739         Internally reviewed by Mike Fenton and Gen Mak.
1740
1741         * WebKitSupport/InputHandler.cpp:
1742         (BlackBerry::WebKit::InputHandler::InputHandler):
1743         (BlackBerry::WebKit::InputHandler::~InputHandler):
1744         (BlackBerry::WebKit::InputHandler::callRequestCheckingFor):
1745         (WebKit):
1746         (BlackBerry::WebKit::InputHandler::requestCheckingOfString):
1747         (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
1748         (BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint):
1749         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
1750         (BlackBerry::WebKit::InputHandler::setElementFocused):
1751         * WebKitSupport/InputHandler.h:
1752         (WebCore):
1753         (WebKit):
1754         (InputHandler):
1755         * WebKitSupport/SpellingHandler.cpp: Added.
1756         (WebKit):
1757         (BlackBerry::WebKit::SpellingHandler::SpellingHandler):
1758         (BlackBerry::WebKit::SpellingHandler::~SpellingHandler):
1759         (BlackBerry::WebKit::SpellingHandler::spellCheckTextBlock):
1760         (BlackBerry::WebKit::SpellingHandler::createSpellCheckRequest):
1761         (BlackBerry::WebKit::SpellingHandler::parseBlockForSpellChecking):
1762         (BlackBerry::WebKit::SpellingHandler::getRangeForSpellCheckWithFineGranularity):
1763         * WebKitSupport/SpellingHandler.h: Added.
1764         (WebCore):
1765         (WebKit):
1766         (SpellingHandler):
1767         (BlackBerry::WebKit::SpellingHandler::isSpellCheckActive):
1768         (BlackBerry::WebKit::SpellingHandler::setSpellCheckActive):
1769
1770 2013-01-18  Nima Ghanavatian  <nghanavatian@rim.com>
1771
1772         [BlackBerry] Check if continuous spellchecking is enabled before processing a request
1773         https://bugs.webkit.org/show_bug.cgi?id=107169
1774
1775         Reviewed by Rob Buis.
1776
1777         PR265815
1778         We set this value based on the global settings page. The
1779         spellcheck-on-focus codepath did not hit this, so focusing a
1780         field would not uphold the setting.
1781
1782         Internally reviewed by Mike Fenton and Gen Mak.
1783
1784         * WebKitSupport/DOMSupport.cpp:
1785         (BlackBerry::WebKit::DOMSupport::elementHasContinuousSpellCheckingEnabled):
1786         (DOMSupport):
1787         * WebKitSupport/DOMSupport.h:
1788         * WebKitSupport/InputHandler.cpp:
1789         (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
1790
1791 2013-01-18  Seokju Kwon  <seokju.kwon@gmail.com>
1792
1793         Add explicit keyword to constructors in platform-specific InspectorClient
1794         https://bugs.webkit.org/show_bug.cgi?id=107255
1795
1796         Reviewed by Kentaro Hara.
1797
1798         Add explicit keyword to constructors that take one argument
1799         in platform-specific implementation of InspectorClient.
1800
1801         * WebCoreSupport/InspectorClientBlackBerry.h:
1802         (InspectorClientBlackBerry):
1803
1804 2013-01-18  Andrew Lo  <anlo@rim.com>
1805
1806         [BlackBerry] Assert failing in RenderQueue::renderScrollZoomJobs
1807         https://bugs.webkit.org/show_bug.cgi?id=107215
1808
1809         Reviewed by Rob Buis.
1810         Internally reviewed by Jakob Petsovits.
1811
1812         Internal PR276660
1813         Render jobs should not be performed if the backing store is inactive.
1814
1815         This occured when the browser was invoked, causing a web page to be made
1816         visible before the surface pool was resumed.
1817
1818         * Api/BackingStore.cpp:
1819         (BlackBerry::WebKit::BackingStorePrivate::shouldPerformRenderJobs):
1820
1821 2013-01-17  Yong Li  <yoli@rim.com>
1822
1823         [BlackBerry] InRegionScroller should notify client before it deletes all the scrollables
1824         https://bugs.webkit.org/show_bug.cgi?id=107162
1825
1826         Reviewed by Rob Buis.
1827         Internally reviewed by Gen Mak and Mike Fenton.
1828
1829         Move the notification code from notifyInRegionScrollStopped() to reset() as there are
1830         other places where reset() gets called.
1831
1832         * Api/InRegionScroller.cpp:
1833         (BlackBerry::WebKit::InRegionScrollerPrivate::reset):
1834         * Api/WebPage.cpp:
1835         (BlackBerry::WebKit::WebPagePrivate::notifyInRegionScrollStopped):
1836
1837 2013-01-17  Mike Fenton  <mifenton@rim.com>
1838
1839         [BlackBerry] Fix selection handle appearance for RTL text.
1840         https://bugs.webkit.org/show_bug.cgi?id=107043
1841
1842         Reviewed by Rob Buis.
1843
1844         PR 263585.
1845
1846         Invert the reported selection handle position if to match
1847         the visual order instead of the logical order to create the
1848         desired appearance for RTL text and directional selections.
1849
1850         Reviewed Internally by Gen Mak and Nima Ghanavatian.
1851
1852         * WebKitSupport/SelectionHandler.cpp:
1853         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
1854
1855 2013-01-16  Charles Wei  <charles.wei@torchmobile.com.cn>
1856
1857         [BlackBerry] Need to adjust the scale and scroll position after leaving fullscreen mode if there's
1858         device rotation in fullscreen mode
1859         https://bugs.webkit.org/show_bug.cgi?id=107085
1860
1861         Reviewed by George STaikos.
1862         Also internally reviewed by Jacky Jiang.
1863
1864         We saved the scale and scroll position before entering full screen mode, so that we can restore
1865         them after leaving fullscreen mode, because entering fullscreen mode automatically changes the 
1866        scale to make the video to fit to the viewport. But if there's device rotation during the fullscreen,
1867        the scale and scroll position saved before may or may not apply anymore, we need to adjust the
1868        scale and/or scroll position if needed to make sure no over-scale or over-scroll in the new orientation.
1869
1870         * Api/WebPage.cpp:
1871         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
1872         (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
1873         * Api/WebPage_p.h:
1874         (WebPagePrivate):
1875
1876 2013-01-16  Joe Mason  <jmason@rim.com>
1877
1878         [BlackBerry] Remove bogus assert in GeolocationClientBlackBerry
1879         https://bugs.webkit.org/show_bug.cgi?id=105651
1880
1881         Reviewed by Darin Adler.
1882
1883         GeolocationClientBlackBerry::cancelPermissionRequest contains an ASSERT that the origin is
1884         in m_geolocationRequestMap. But it's perfectly valid for the origin to not be in the map -
1885         for instance, if GeolocationClientBlackBerry::requestPermission returned immediately,
1886         without putting it in the map, because geolocation was disabled. In this case the correct
1887         thing to do is just return - there is nothing to be done to cancel the permission.
1888
1889         * WebCoreSupport/GeolocationClientBlackBerry.cpp:
1890         (GeolocationClientBlackBerry::cancelPermissionRequest):
1891
1892 2013-01-15  Mike Fenton  <mifenton@rim.com>
1893
1894         [BlackBerry] Don't overwrite field dir with current locale.
1895         https://bugs.webkit.org/show_bug.cgi?id=106932
1896
1897         Reviewed by Yong Li.
1898
1899         PR 212267.
1900
1901         Remove uncalled onInputLocaleChanged and stop re-writing the dir
1902         on input focus which prevented RTL fields from rendering properly.
1903
1904         Reviewed Internally by Eli Fidler.
1905
1906         * Api/WebPage.cpp:
1907         * Api/WebPage.h:
1908         * Api/WebPage_p.h:
1909         (WebPagePrivate):
1910         * WebKitSupport/InputHandler.cpp:
1911         * WebKitSupport/InputHandler.h:
1912         (InputHandler):
1913
1914 2013-01-15  Jacky Jiang  <zhajiang@rim.com>
1915
1916         [BlackBerry] Manual zoom propagates to next page load
1917         https://bugs.webkit.org/show_bug.cgi?id=106914
1918
1919         Reviewed by Yong Li.
1920         Internally reviewed by Eli Fidler and Jakob Petsovits.
1921
1922         PR: 280481
1923         During load committed, the web page scale was reset. However, UI thread
1924         still kept the old scale in UserInterfaceViewportAccessor so that it
1925         blitted the contents at the old scale although WebKit thread could
1926         update the UI thread scale later when finished the load.
1927         We should update the scale of the UI thread right after we reset it in
1928         WebKit thread to keep them in sync.
1929
1930         * Api/WebPage.cpp:
1931         (BlackBerry::WebKit::WebPagePrivate::resetScales):
1932
1933 2013-01-14  Otto Derek Cheung  <otcheung@rim.com>
1934
1935         [BlackBerry] FCC appears when switching search engine providers
1936         https://bugs.webkit.org/show_bug.cgi?id=106824
1937
1938         Magnifying glass appears when switching search engine providers
1939
1940         PR 279178
1941
1942         Reviewed by Rob Buis.
1943         Internal Reviewed by Mike Fenton.
1944
1945         We need to make sure fatfinger is touching a textfield when we tell notifyCaretChanged
1946         to show the FCC.
1947
1948         This behaviour is accidentally regressed in the fix in PR 267177, causing the FCC to show
1949         when the user touches an element that is not a textfield and changes the caret in the inputbar..
1950
1951         Tested that the behaviour in 267177 isn't reproducible and the FCC isn't invoked when we switch
1952         search engine providers.
1953
1954         * WebKitSupport/SelectionHandler.cpp:
1955         (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
1956
1957 2013-01-14  Jacky Jiang  <zhajiang@rim.com>
1958
1959         [BlackBerry] Zoom is still possible when user-scalable=no
1960         https://bugs.webkit.org/show_bug.cgi?id=106809
1961
1962         Reviewed by George Staikos.
1963
1964         PR: 274566
1965         On wordpress.com, the contents were rendered at the width 343 which was
1966         1 css pixel larger than the expected device-width 342 so that we didn't
1967         respect the viewport.
1968         There was a RenderBlock on the page which contained "\n" and an
1969         inline-block. "\n" took 0.78 width and the inline-block took 342 width
1970         and they were unfortunately placed in the same InlineBox which caused
1971         the contents width 1 css pixels larger than the device-width.
1972         Allow the contents width to be 1 css pixel larger and still respect the
1973         viewport in such a special case.
1974
1975         * Api/WebPage.cpp:
1976         (BlackBerry::WebKit::WebPagePrivate::respectViewport):
1977
1978 2013-01-13  Xiaobo Wang  <xbwang@torchmobile.com.cn>
1979
1980         [BlackBerry] Add a public function WebPage::isLoading()
1981         https://bugs.webkit.org/show_bug.cgi?id=106751
1982
1983         PR 274392
1984
1985         Reviewed by George Staikos.
1986
1987         Need to get the load state in WebPageClient when resolving PR 274392.
1988
1989         * Api/WebPage.cpp:
1990         (BlackBerry::WebKit::WebPage::isLoading):
1991         (WebKit):
1992         * Api/WebPage.h:
1993
1994 2013-01-11  Andrew Lo  <anlo@rim.com>
1995
1996         [BlackBerry] Focus zoom animation doesn't occur on devices with physical keyboard
1997         https://bugs.webkit.org/show_bug.cgi?id=106719
1998
1999         Reviewed by Yong Li.
2000         Internally reviewed by Mike Fenton.
2001
2002         Internal PR 278687
2003
2004         Always ensureFocusTextElementVisible if an element is focused when
2005         the device has a physical keyboard.
2006
2007         * WebKitSupport/InputHandler.cpp:
2008         (BlackBerry::WebKit::InputHandler::setElementFocused):
2009
2010 2013-01-11  Otto Derek Cheung  <otcheung@rim.com>
2011
2012         [BlackBerry] Modifying the databaseQuota call to WebPageClient
2013         https://bugs.webkit.org/show_bug.cgi?id=106703
2014
2015         Reviewed by Yong Li.
2016
2017         The databaseQuota call in WebPageClientImpl is modified to take in
2018         BP:Strings directly. Also, we want to use the origin URL from the security origin.
2019         Not the database identifier.
2020
2021         * Api/WebPageClient.h:
2022         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2023         (WebCore::ChromeClientBlackBerry::exceededDatabaseQuota):
2024
2025 2013-01-10  Yongxin Dai  <yodai@rim.com>
2026
2027         [BlackBerry] Handle the case that start/end position is out of unclipped selection region
2028         https://bugs.webkit.org/show_bug.cgi?id=106486
2029
2030         Reviewed by Rob Buis.
2031
2032         PR #270624
2033         Unclipped selection region should cover start/end position of the selection.
2034         Since we exclude hidden text when calculating unclipped selection region, the
2035         start/end position can be out of unclipped selection region if it is for hidden
2036         text. If that is the case, start/end handle will be invisible. To avoid invisible
2037         handle, we take unclipped selection region as reference rectangle in the case.
2038
2039         Internally reviewed by Genevieve Mak, Mike Fenton
2040
2041         * WebKitSupport/SelectionHandler.cpp:
2042         (BlackBerry::WebKit::referencePoint):
2043
2044 2013-01-09  Genevieve Mak  <gmak@rim.com>
2045
2046         [BlackBerry] Useless if statement check
2047         https://bugs.webkit.org/show_bug.cgi?id=106113
2048
2049         Reviewed by Yong Li.
2050
2051         Remove stray ! in if statement which was mistakenly left in during
2052         refactoring. Since Injected events are checked before they are sent to
2053         webkit, it didn't have an effect on behaviour.
2054
2055         * Api/WebPage.cpp:
2056         (BlackBerry::WebKit::WebPage::touchEvent):
2057
2058 2013-01-08  Otto Derek Cheung  <otcheung@rim.com>
2059
2060         [BlackBerry] Removing the totalusage variable in ChromeClientBB::exceededDatabaseQuota
2061         https://bugs.webkit.org/show_bug.cgi?id=106370
2062
2063         Reviewed by Yong Li.
2064
2065         Removing totalUsage in ChromeClientBlackBerry as we no longer use that variable.
2066
2067         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2068         (WebCore::ChromeClientBlackBerry::exceededDatabaseQuota):
2069
2070 2013-01-08  Jacky Jiang  <zhajiang@rim.com>
2071
2072         [Blackberry][FullScreen] Create a helper method to adjust the fullscreen renderer dimensions
2073         https://bugs.webkit.org/show_bug.cgi?id=91748
2074
2075         Reviewed by Antonio Gomes.
2076
2077         PR: 195524
2078         The was originally from Antonio Gomes on PR195524. Bug 105488 has
2079         partially upstreamed that patch. This patch upstreams the rest of it.
2080
2081         * Api/WebPage.cpp:
2082         (BlackBerry::WebKit::WebPagePrivate::updateViewportSize):
2083         (BlackBerry::WebKit::WebPagePrivate::notifyTransformedScrollChanged):
2084         * Api/WebPage_p.h:
2085         (WebPagePrivate):
2086         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2087         (WebCore::ChromeClientBlackBerry::fullScreenRendererChanged):
2088
2089 2013-01-08  Mark Lam  <mark.lam@apple.com>
2090
2091         Removed the need for the ProposedDatabase mechanism.
2092         https://bugs.webkit.org/show_bug.cgi?id=106292.
2093
2094         Reviewed by Sam Weinig.
2095
2096         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2097         (WebCore::ChromeClientBlackBerry::exceededDatabaseQuota):
2098         * WebCoreSupport/ChromeClientBlackBerry.h:
2099         (ChromeClientBlackBerry):
2100
2101 2013-01-08  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
2102
2103         [BlackBerry] Can't select text out of current focused input
2104         https://bugs.webkit.org/show_bug.cgi?id=106322
2105
2106         Reviewed by Rob Buis.
2107
2108         PR270755
2109         Internally reviewed by Mike Fenton
2110
2111         When selection changed, the selection handler clips new selection with
2112         current focused node's boundary. So we clear focus before selectObject.
2113         This patch clear focus when selectObject is at a point but not at a node.
2114
2115         * WebKitSupport/SelectionHandler.cpp:
2116         (BlackBerry::WebKit::SelectionHandler::selectObject):
2117
2118 2013-01-08  Steve Block  <steveblock@chromium.org>
2119
2120         Rename 'IntSize toSize(const IntPoint&)' to 'toIntSize'
2121         https://bugs.webkit.org/show_bug.cgi?id=106307
2122
2123         This matches other method names which distinguish between sizes and
2124         points. See https://bugs.webkit.org/show_bug.cgi?id=105992#c4.
2125
2126         Reviewed by Kentaro Hara.
2127
2128         * Api/InRegionScroller.cpp:
2129         (BlackBerry::WebKit::InRegionScrollerPrivate::setLayerScrollPosition):
2130
2131 2013-01-07  Genevieve Mak  <gmak@rim.com>
2132
2133         [BlackBerry] Touch Events are falling through fullscreen video
2134         https://bugs.webkit.org/show_bug.cgi?id=106112
2135
2136         Reviewed by Rob Buis.
2137
2138         Reviewed Internally by Jakob Petsovits.
2139         PR #274326
2140         Do not do viewport centering calculations if in fullscreen video.
2141         The offset should be zero.
2142
2143         * Api/WebPage.cpp:
2144         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
2145
2146 2013-01-07  Jacky Jiang  <zhajiang@rim.com>
2147
2148         [BlackBerry] Roll out r136173 as there are alternative approaches from the client sides now
2149         https://bugs.webkit.org/show_bug.cgi?id=106236
2150
2151         Unreviewed, rolling out r136173.
2152         This becomes unnecessary now as there are alternative approaches to
2153         solve the issue from the client sides.
2154
2155         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2156         (WebCore::ChromeClientBlackBerry::createWindow):
2157
2158 2013-01-07  Jakob Petsovits  <jpetsovits@rim.com>
2159
2160         [BlackBerry] Never avoid blitting when one-shot drawing sync is involved.
2161         https://bugs.webkit.org/show_bug.cgi?id=106225
2162         RIM PR 274948
2163
2164         Reviewed by George Staikos.
2165         Based on a patch by Chris Guan.
2166
2167         didRenderContent() has a mechanism to avoid double blits;
2168         when scrolling or zooming is enabled then we don't issue
2169         blitContents() as the client would (continually) do that
2170         already.
2171
2172         However, since r138024, didRenderContents() also deals
2173         with one-shot drawing synchronization and commits.
2174         When these are required, we can't just skip out or the
2175         backingstore and overlaying composited layers are likely
2176         to get out of sync. The condition also doesn't make much
2177         sense for direct rendering as no blit calls are issued
2178         at all when it is enabled.
2179
2180         Fix the issue by limiting the impact of the scroll/zoom
2181         early return to only regular blit operations.
2182
2183         * Api/BackingStore.cpp:
2184         (BlackBerry::WebKit::BackingStorePrivate::didRenderContent):
2185
2186 2013-01-05  Andy Chen  <andchen@rim.com>
2187
2188         [BlackBerry] SelectionHandler::selectAtPoint should use last fat finger result when it is a link
2189         https://bugs.webkit.org/show_bug.cgi?id=106141
2190
2191         Reviewed by Rob Buis.
2192
2193         If last fat finger result is a link, select it directly when
2194         SelectionHandler::selectAtPoint is called.
2195         PR 263449
2196         Internally reviewed by Mike Fenton and Yongxin Dai.
2197
2198         * WebKitSupport/SelectionHandler.cpp:
2199         (BlackBerry::WebKit::SelectionHandler::selectNodeIfFatFingersResultIsLink):
2200         (WebKit):
2201         (BlackBerry::WebKit::SelectionHandler::selectAtPoint):
2202         * WebKitSupport/SelectionHandler.h:
2203         (WebKit):
2204         (SelectionHandler):
2205
2206 2013-01-04  Mike Lattanzio  <mlattanzio@rim.com>
2207
2208         [BlackBerry] Last text input caret left visible when WebView entirely loses focus.
2209         https://bugs.webkit.org/show_bug.cgi?id=106124
2210
2211         Reviewed by George Staikos.
2212
2213         Internal PR 248834
2214
2215         There are numerous code paths that lead to repainting of the focus node
2216         when the focus moves to another node, but none seem to cover the case
2217         of focus leaving the document when there are no DocumentMarkers present.
2218
2219         * WebKitSupport/InputHandler.cpp:
2220         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
2221
2222 2013-01-04  Otto Derek Cheung  <otcheung@rim.com>
2223
2224         [BlackBerry]  FCC will show up as you type if you tap on the same input bar twice before typing
2225         https://bugs.webkit.org/show_bug.cgi?id=106116
2226
2227         Reviewed by Yong Li.
2228         Internal reviewed by Gen Mak.
2229         PR 267177
2230
2231         FCC is being invoked because the fatfinger result is no longer a reliable source
2232         to tell whether the caret change is caused by user touch input. Instead, we recognize all
2233         notifyCaretChange calls with userTouchInput as true except when caretPositionChanged is invoked
2234         by SelectionHandler:inputHandlerDidFinishProcessingChange.
2235
2236         * WebKitSupport/SelectionHandler.cpp:
2237         (BlackBerry::WebKit::SelectionHandler::inputHandlerDidFinishProcessingChange):
2238         (BlackBerry::WebKit::SelectionHandler::notifyCaretPositionChangedIfNeeded):
2239         (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
2240         * WebKitSupport/SelectionHandler.h:
2241         (SelectionHandler):
2242
2243 2013-01-04  Yong Li  <yoli@rim.com>
2244
2245         [BlackBerry] Cached frame shouldn't access the page when being destroyed
2246         https://bugs.webkit.org/show_bug.cgi?id=105942
2247
2248         Reviewed by George Staikos.
2249
2250         Fix regression of previous patch. dispatchDidHandleOnloadEvents() can be called
2251         after Frame has been detached.
2252
2253         RIM PR# 271237.
2254
2255         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2256         (WebCore::FrameLoaderClientBlackBerry::dispatchDidHandleOnloadEvents):
2257
2258 2013-01-04  Nima Ghanavatian  <nghanavatian@rim.com>
2259
2260         [BlackBerry] Allow defaultTabEventHandler to trigger on tab
2261         https://bugs.webkit.org/show_bug.cgi?id=106118
2262
2263         Reviewed by Yong Li.
2264
2265         In order to support tabbing through input elements, amongst
2266         other things, we need to bipass the processing of the tab key as
2267         '\t'. This will simply insert 4 spaces in the field. Remove tab
2268         support from the key down map so that we don't translate it to
2269         an editor command.
2270
2271         Internally reviewed by Mike Fenton.
2272
2273         * WebCoreSupport/EditorClientBlackBerry.cpp:
2274         (WebCore):
2275
2276 2013-01-04  Mike Fenton  <mifenton@rim.com>
2277
2278         [BlackBerry] Enable Input Focus when handling touch events for JS
2279         https://bugs.webkit.org/show_bug.cgi?id=106109
2280
2281         Reviewed by Yong Li.
2282
2283         PR 273325.
2284
2285         Toggle input mode active when a touch event is
2286         received for JS processing to ensure state
2287         is updated even when event is consumed.
2288
2289         Reviewed Internally by Gen Mak.
2290
2291         * Api/WebPage.cpp:
2292         (BlackBerry::WebKit::WebPage::touchEvent):
2293
2294 2013-01-04  Adam Klein  <adamk@chromium.org>
2295
2296         Remove ENABLE_MUTATION_OBSERVERS #define
2297         https://bugs.webkit.org/show_bug.cgi?id=105459
2298
2299         Reviewed by Ryosuke Niwa.
2300
2301         * WebCoreSupport/AboutDataEnableFeatures.in:
2302
2303 2013-01-04  Anthony Scian  <ascian@rim.com>
2304
2305         [Blackberry] Static code analysis warning fixes
2306         https://bugs.webkit.org/show_bug.cgi?id=105679
2307
2308         Reviewed by Rob Buis.
2309
2310         Klocwork issue 959: check layer against NULL since it is used in both cases
2311         of the subsequent if-stmt
2312
2313         * Api/InRegionScroller.cpp:
2314         (BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint):
2315
2316 2013-01-02  Jacky Jiang  <zhajiang@rim.com>
2317
2318         [BlackBerry] file:/// pages don't get correct scales after several rotations and history navigations
2319         https://bugs.webkit.org/show_bug.cgi?id=105996
2320
2321         Reviewed by George Staikos.
2322
2323         PR: 273541
2324         When navigating back to the previous page on portrait mode, we were
2325         trying to set virtual viewport after recalculation. However, we didn't
2326         change the fixed layout size so that we still layouted the contents at
2327         the old virtual viewport size. In this case, the old virtual viewport
2328         was 570 * 293 which was set in landscape mode unfortunately. There
2329         would be no chance for such kind of contents size to fit the portrait
2330         mode screen size nicely.
2331         This was a regression of webkit/cc31d9bad where setViewMode() was
2332         removed as a noop. So just get setViewMode() back to apply the fixed
2333         layout size with a little bit change as SVG document path was proved
2334         invalid in that patch. Thanks to George for the float comparison change.
2335         Put a FIXME as we don't have a way to save the scale precisely before
2336         the rotation and history navigation currently.
2337
2338         * Api/WebPage.cpp:
2339         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
2340         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2341         (WebCore::FrameLoaderClientBlackBerry::saveViewStateToItem):
2342
2343 2013-01-02  Otto Derek Cheung  <otcheung@rim.com>
2344
2345         [BlackBerry] Do not determine db quota limit using db file size
2346         https://bugs.webkit.org/show_bug.cgi?id=105991
2347
2348         PR 267191
2349
2350         Reviewed by George Staikos.
2351
2352         Passing the current quota to WebPageClientImpl::databaseQuota so we can determine a better
2353         quota limit without using the db file size.
2354
2355         * Api/WebPageClient.h:
2356         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2357         (WebCore::ChromeClientBlackBerry::exceededDatabaseQuota):
2358
2359 2013-01-02  Yong Li  <yoli@rim.com>
2360
2361         [BlackBerry] Cached frame shouldn't access the page when being destroyed
2362         https://bugs.webkit.org/show_bug.cgi?id=105942
2363
2364         Reviewed by George Staikos.
2365
2366         In order to prevent our FrameLoaderClient from dangling WebPagePrivate object in any case,
2367         this patches clear the m_webPagePrivate pointer when the frame is detached or cached.
2368
2369         RIM PR# 272137.
2370
2371         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2372         (WebCore::FrameLoaderClientBlackBerry::isMainFrame):
2373         (WebCore::FrameLoaderClientBlackBerry::detachedFromParent2):
2374         (WebCore::FrameLoaderClientBlackBerry::didSaveToPageCache):
2375         (WebCore::FrameLoaderClientBlackBerry::didRestoreFromPageCache):
2376
2377 2013-01-02  Nima Ghanavatian  <nghanavatian@rim.com>
2378
2379         [BlackBerry] Use fatfingers result when checking for misspelled words
2380         https://bugs.webkit.org/show_bug.cgi?id=105923
2381
2382         Reviewed by Yong Li.
2383
2384         PR270866
2385         Currently we are using the raw touch point when checking to see if spell check
2386         is required on a word. When tapping close to a boundary, the raw point can be
2387         placed off but fatfingers moves the point onto the word. This causes the caret
2388         to be placed on a word but no spell check request triggered.
2389
2390         Internally reviewed by Mike Fenton and Tiancheng Jiang
2391
2392         * WebKitSupport/TouchEventHandler.cpp:
2393         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
2394
2395 2012-12-28  Charles Wei  <charles.wei@torchmobile.com.cn>
2396
2397         [BlackBerry] Remove unused BackingStorePrivate::m_defersBlit
2398         https://bugs.webkit.org/show_bug.cgi?id=105811
2399         RIM PR 272067
2400
2401         Reviewed by George Staikos.
2402         Internally Reviewed by Jakob Petsovits.
2403
2404         BackingStorePrivate::m_defersBlit is not used anywhere, it should
2405         be removed to simplify the code and to avoid confusion.
2406         * Api/BackingStore.cpp:
2407         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
2408         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
2409         * Api/BackingStore.h:
2410         * Api/BackingStore_p.h:
2411         (BackingStorePrivate):
2412
2413 2012-12-26  Jakob Petsovits  <jpetsovits@rim.com>
2414
2415         [BlackBerry] Set load state for popups manually, in absence of a loader.
2416         https://bugs.webkit.org/show_bug.cgi?id=105708
2417         RIM PR 257216
2418
2419         Reviewed by George Staikos.
2420         Internally reviewed by Chris Guan.
2421
2422         The WebPage class relies on the load state for various things,
2423         among others it will only emit contents size changes after
2424         layouts if a load state other than None is set.
2425
2426         Given that popups write the web page content itself with no
2427         loader that would issue such notifications, the load state
2428         should probably just be set manually in this case.
2429
2430         * WebCoreSupport/PagePopupBlackBerry.cpp:
2431         (WebCore::PagePopupBlackBerry::init):
2432
2433 2012-12-26  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
2434
2435         [BlackBerry] Caret doesn't update position when scrolling text in Input element
2436         https://bugs.webkit.org/show_bug.cgi?id=105757
2437
2438         Reviewed by George Staikos.
2439
2440         PR 271627
2441         Internally reviewed by George Staikos.
2442
2443         Call FrameSelection's updateAppearence instead of SelectionHandler's
2444         selectionPositionChanged to update the caret position.
2445
2446         * Api/InRegionScroller.cpp:
2447         (BlackBerry::WebKit::InRegionScrollerPrivate::setLayerScrollPosition):
2448
2449 2012-12-25  Charles Wei  <charles.wei@torchmobile.com.cn>
2450
2451         [BlackBerry] Need to initialize the onLine in the global
2452         https://bugs.webkit.org/show_bug.cgi?id=105749
2453
2454         Reviewed by George Staikos.
2455
2456         The NetworkStatus is initialized to online in the constructor by default,
2457         we need to update it correctly with the network status at startup.
2458
2459         * Api/BlackBerryGlobal.cpp:
2460         (BlackBerry::WebKit::globalInitialize):
2461
2462 2012-12-24  Jakob Petsovits  <jpetsovits@rim.com>
2463
2464         [BlackBerry] Fix various RenderQueue bugs introduced by r138024.
2465         https://bugs.webkit.org/show_bug.cgi?id=105717
2466         RIM PR 269029
2467
2468         Reviewed by George Staikos.
2469
2470         Scroll/zoom jobs were pretty solid, but I managed to
2471         leave some bugs in the region handling of RenderQueue's
2472         renderRegularRenderJobs() function, causing us to skip
2473         a desired blit or render operation in cases where the
2474         region and tile tracking did not match up.
2475
2476         This commit fixes these errors.
2477
2478         * WebKitSupport/RenderQueue.cpp:
2479         (BlackBerry::WebKit::RenderQueue::renderRegularRenderJobs):
2480
2481 2012-12-24  Charles Wei  <charles.wei@torchmobile.com.cn>
2482
2483         [BlackBerry] Close page popup when a page becomes invisible.
2484         https://bugs.webkit.org/show_bug.cgi?id=105704
2485
2486         Reviewed by George Staikos.
2487
2488         Reviewed internally by Jakob Petsovits.
2489
2490         * Api/WebPage.cpp:
2491         (BlackBerry::WebKit::WebPagePrivate::setVisible):
2492
2493 2012-12-23  Mary Wu  <mary.wu@torchmobile.com.cn>
2494
2495         [BlackBerry] give url when createWindow
2496         https://bugs.webkit.org/show_bug.cgi?id=105702
2497         RIM bug# 257329
2498
2499         Reviewed by George Staikos.
2500
2501         This is to revert previous commit 575407238c35f1a0fa7ff7dd5dbbf6cc3ece1107
2502         for integration issue of cascade and air, as old app side still use the url
2503         to invoke. It would unrevert after resolving the integration issue.
2504
2505         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2506         (WebCore::FrameLoaderClientBlackBerry::dispatchCreatePage):
2507
2508 2012-12-23  Jakob Petsovits  <jpetsovits@rim.com>
2509
2510         [BlackBerry] Specify tile usage enum for backingstore tiles.
2511         https://bugs.webkit.org/show_bug.cgi?id=105688
2512         RIM PR 262120
2513
2514         Reviewed by George Staikos.
2515
2516         This enables us to have separate tile sizes for
2517         backingstore / root layer purposes and generic layers.
2518
2519         * Api/BackingStore.cpp:
2520         (BlackBerry::WebKit::BackingStorePrivate::tileSize):
2521
2522 2012-12-21  Max Feil  <mfeil@rim.com>
2523
2524         [BlackBerry] Fullscreen video fixed position container horizontal position is wrong
2525         https://bugs.webkit.org/show_bug.cgi?id=105488
2526
2527         Reviewed by George Staikos.
2528
2529         The fix for https://bugs.webkit.org/show_bug.cgi?id=105333 has
2530         broken fullscreen video, which was compensating by doing its
2531         own positioning in x. My patch fixes things by making vertical
2532         and horizontal handling symmetrical.
2533         NOTE: This function was not upstreamed before, so you can't
2534         actually see my diff. See the bug.
2535
2536         * Api/WebPage.cpp:
2537         (WebKit):
2538         (BlackBerry::WebKit::WebPagePrivate::adjustFullScreenElementDimensionsIfNeeded):
2539
2540 2012-12-18  Nima Ghanavatian  <nghanavatian@rim.com>
2541
2542         [BlackBerry] Calculate correct word offsets for form elements.
2543         https://bugs.webkit.org/show_bug.cgi?id=105354
2544
2545         Reviewed by Rob Buis.
2546
2547         PR266117
2548         We need to calculate correct offsets for form elements, such as
2549         textareas, relative to the start of the field. This allows for correct
2550         spell checking of words in a textarea element after line breaks.
2551
2552         Internally reviewed by Mike Fenton.
2553
2554         * WebKitSupport/InputHandler.cpp:
2555         (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions):
2556
2557 2012-12-18  Genevieve Mak  <gmak@rim.com>
2558
2559         [BlackBerry] Remove extra call to doFatFingers.
2560         https://bugs.webkit.org/show_bug.cgi?id=105347
2561
2562         Reviewed by Rob Buis.
2563
2564         Reviewed Internally by Mike Fenton.
2565         Now that we do fat fingers on touch start, we don't need this anymore.
2566
2567         * Api/WebPage.cpp:
2568         (BlackBerry::WebKit::WebPage::touchEvent):
2569
2570 2012-12-18  Genevieve Mak  <gmak@rim.com>
2571
2572         Bug 105344 - [BlackBerry] Make single line text edits touch scrollable.
2573         https://bugs.webkit.org/show_bug.cgi?id=105344
2574
2575         Reviewed by Antonio Gomes.
2576
2577         Reviewed Internally by Mike Fenton.
2578         We don't need to check the overflow for editable layers because there's
2579         no need for overflow to be set by the content.
2580         PR #231776
2581
2582         * WebKitSupport/InRegionScrollableArea.cpp:
2583         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
2584
2585 2012-12-18  Jakob Petsovits  <jpetsovits@rim.com>
2586
2587         [BlackBerry] Build fix for r138024.
2588         https://bugs.webkit.org/show_bug.cgi?id=105199
2589         RIM PR 260232
2590
2591         Reviewed by Yong Li.
2592
2593         The clearVisibleTiles() function doesn't exist anymore
2594         and apparently I fail at merge conflict resolution.
2595
2596         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2597         (WebCore::FrameLoaderClientBlackBerry::dispatchDidLayout):
2598
2599 2012-12-18  Jakob Petsovits  <jpetsovits@rim.com>
2600
2601         [BlackBerry] Clean up "frontState" vs. "geometry" naming confusion.
2602         https://bugs.webkit.org/show_bug.cgi?id=105331
2603         RIM PR 260232
2604
2605         Reviewed by Adam Treat.
2606
2607         The concept of the "front state" is going away or will be
2608         marginalized/renamed, but I don't want to clutter upcoming
2609         patches with renames. So do the variable renames in here,
2610         once, and have future patches focus on actual behavior changes.
2611
2612         * Api/BackingStore.cpp:
2613         (BlackBerry::WebKit::BackingStorePrivate::shouldDirectRenderingToWindow):
2614         (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect):
2615         (BlackBerry::WebKit::BackingStorePrivate::updateTilesAfterBackingStoreRectChange):
2616         (BlackBerry::WebKit::BackingStorePrivate::render):
2617         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
2618         (BlackBerry::WebKit::BackingStorePrivate::compositeContents):
2619         (BlackBerry::WebKit::BackingStorePrivate::resetTiles):
2620         (BlackBerry::WebKit::BackingStorePrivate::updateTiles):
2621         (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion):
2622         (BlackBerry::WebKit::BackingStorePrivate::createSurfaces):
2623
2624 2012-12-18  Nima Ghanavatian  <nghanavatian@rim.com>
2625
2626         [BlackBerry] Reduce calls to IMF on return
2627         https://bugs.webkit.org/show_bug.cgi?id=105308
2628
2629         Reviewed by Yong Li.
2630
2631         PR207743
2632         The extra calls of selection change and most importantly, end composition
2633         are sent incorrectly on return. This is causing our state to be reset
2634         every time we hit enter.
2635
2636         Internally reviewed by Mike Fenton and Gen Mak.
2637
2638         * WebKitSupport/InputHandler.cpp:
2639         (BlackBerry::WebKit::InputHandler::InputHandler):
2640         (BlackBerry::WebKit::InputHandler::nodeTextChanged):
2641         (BlackBerry::WebKit::InputHandler::selectionChanged):
2642         (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
2643         (BlackBerry::WebKit::InputHandler::shouldNotifyWebView):
2644         (WebKit):
2645         * WebKitSupport/InputHandler.h:
2646         (InputHandler):
2647
2648 2012-12-18  Jakob Petsovits  <jpetsovits@rim.com>
2649
2650         [BlackBerry] Remove the visible tile buffer from the BackingStore.
2651         https://bugs.webkit.org/show_bug.cgi?id=105302
2652         RIM PR 260232
2653
2654         Reviewed by George Staikos.
2655
2656         The visible tile buffer was introduced as an additional
2657         buffering solution that was necessary because other
2658         buffers would only cover part of the screen and could
2659         only be swapped one by one, with long blocking calls
2660         between each newly rendered tile. By carrying an old copy
2661         of all tiles at once, we were avoiding checkerboard and
2662         visual artifacts during load time when much zoom-to-fit
2663         action is going on.
2664
2665         These days, the visual tile buffer hurts more than it helps,
2666         not only taking up lots of memory but also requiring
2667         complexity that we'd rather get rid of. Now that multiple
2668         buffers are being swapped into the user interface thread
2669         at once, the need for the visible tile buffer is no longer
2670         there and can be exchanged for standard geometry behavior.
2671
2672         This patch simply deletes the visible tile buffer to use
2673         existing other code instead. Differences in behavior are
2674         non-existent or negligible.
2675
2676         * Api/BackingStore.cpp:
2677         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
2678         (BlackBerry::WebKit::BackingStorePrivate::transformChanged):
2679         (BlackBerry::WebKit::BackingStorePrivate::orientationChanged):
2680         (BlackBerry::WebKit::BackingStorePrivate::createSurfaces):
2681         * Api/BackingStore_p.h:
2682         (BackingStorePrivate):
2683         * Api/WebPage.cpp:
2684         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
2685         * WebKitSupport/SurfacePool.cpp:
2686         (BlackBerry::WebKit::SurfacePool::SurfacePool):
2687         (BlackBerry::WebKit::SurfacePool::initialize):
2688         (BlackBerry::WebKit::SurfacePool::createBuffers):
2689         (BlackBerry::WebKit::SurfacePool::releaseBuffers):
2690         * WebKitSupport/SurfacePool.h:
2691         (SurfacePool):
2692
2693 2012-12-18  Jakob Petsovits  <jpetsovits@rim.com>
2694
2695         [BlackBerry] Restructure the render queue to process multiple tiles at once.
2696         https://bugs.webkit.org/show_bug.cgi?id=105199
2697         RIM PR 260232
2698
2699         Reviewed by George Staikos.
2700         Internally reviewed by Arvid Nilsson.
2701
2702         Since my last big commit, r136442, the BackingStore's render()
2703         function is able to fetch multiple back buffers and swap them
2704         into the user interface thread in one go. However, it turns out
2705         that this is not enough to actually render to all of the
2706         available back buffers at once. The RenderQueue class was still
2707         working with a model based on processing one rectangle after
2708         another.
2709
2710         This commit rewrites large parts of RenderQueue to issue
2711         render() calls for multiple tiles at once. As WebCore painting
2712         gets cheaper and blocking becomes more of an issue, this commit
2713         does away with paints smaller than tile size and always renders
2714         whole tiles at once. This means the demise of RenderRect.
2715         As an additional benefit, this means we can remove the
2716         copyPreviousContentsToTileBuffer() function which caused
2717         potential threading issues as it was accessing a buffer
2718         now owned by the UI thread from the WebKit thread.
2719
2720         RenderQueue is also smarter than before in assigning batches,
2721         it now takes into account the number of available back buffers
2722         for rendering as well as excludes tiles outside contents
2723         boundaries. Regular render jobs continue being tracked as
2724         regions (and are being issued to didRenderContent()) with only
2725         the changed content regions. Everything else switches over to
2726         tile index lists from previously lists of rectangles.
2727         By default, we render as many tiles at once as we can grab
2728         back buffers, or until a given set of jobs is done.
2729         For high-priority jobs, render() will be called in a loop.
2730
2731         To allow for the necessary changes in render() and improve
2732         reliability in the same go, we now call render() almost
2733         exclusively through RenderQueue. Other places would often
2734         call renderVisibleContents() in situations where rendering
2735         is not possible, geometries don't get updated, or content
2736         rendered notifications would not get issued to the client.
2737         By replacing renderVisibleContents() with a scheduled
2738         high-priority queue that's immediately being processed
2739         (but only if possible), these problems go away.
2740
2741         * Api/BackingStore.cpp:
2742         (BlackBerry::WebKit::BackingStorePrivate::resumeScreenUpdates):
2743         (BlackBerry::WebKit::BackingStorePrivate::repaint):
2744         (BlackBerry::WebKit::BackingStorePrivate::slowScroll):
2745         (BlackBerry::WebKit::BackingStorePrivate::renderJob):
2746         (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect):
2747         (BlackBerry::WebKit::BackingStorePrivate::updateTilesAfterBackingStoreRectChange):
2748         (BlackBerry::WebKit::BackingStorePrivate::indexesForBackingStoreRect):
2749         (BlackBerry::WebKit::BackingStorePrivate::clearAndUpdateTileOfNotRenderedRegion):
2750         (BlackBerry::WebKit::BackingStorePrivate::isCurrentVisibleJob):
2751         (BlackBerry::WebKit::BackingStorePrivate::renderDirectToWindow):
2752         (BlackBerry::WebKit::BackingStorePrivate::render):
2753         (BlackBerry::WebKit::BackingStorePrivate::renderAndBlitVisibleContentsImmediately):
2754         (BlackBerry::WebKit::BackingStorePrivate::renderAndBlitImmediately):
2755         (BlackBerry::WebKit::BackingStorePrivate::paintDefaultBackground):
2756         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
2757         (BlackBerry::WebKit::BackingStorePrivate::compositeContents):
2758         (BlackBerry::WebKit::BackingStorePrivate::visibleTileIndexes):
2759         (BlackBerry::WebKit::BackingStorePrivate::resetTiles):
2760         (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion):
2761         (BlackBerry::WebKit::BackingStorePrivate::updateTile):
2762         (BlackBerry::WebKit::BackingStorePrivate::transformChanged):
2763         (BlackBerry::WebKit::BackingStorePrivate::didRenderContent):
2764         * Api/BackingStore_p.h:
2765         (BackingStorePrivate):
2766         * Api/WebPage.cpp:
2767         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
2768         (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint):
2769         (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore):
2770         * Api/WebPageCompositor.cpp:
2771         (BlackBerry::WebKit::WebPageCompositorPrivate::animationFrameChanged):
2772         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2773         (WebCore::FrameLoaderClientBlackBerry::dispatchDidLayout):
2774         * WebKitSupport/RenderQueue.cpp:
2775         (BlackBerry::WebKit::compareRectOneDirection):
2776         (BlackBerry::WebKit::tileIndexIsLessThan):
2777         (WebKit):
2778         (BlackBerry::WebKit::tileIndexLessThanFunction):
2779         (BlackBerry::WebKit::TileIndexLessThan::TileIndexLessThan):
2780         (BlackBerry::WebKit::TileIndexLessThan::operator()):
2781         (TileIndexLessThan):
2782         (BlackBerry::WebKit::RenderQueue::reset):
2783         (BlackBerry::WebKit::RenderQueue::isEmpty):
2784         (BlackBerry::WebKit::RenderQueue::hasCurrentRegularRenderJob):
2785         (BlackBerry::WebKit::RenderQueue::hasCurrentVisibleZoomJob):
2786         (BlackBerry::WebKit::RenderQueue::hasCurrentVisibleScrollJob):
2787         (BlackBerry::WebKit::RenderQueue::isCurrentVisibleZoomJob):
2788         (BlackBerry::WebKit::RenderQueue::isCurrentVisibleZoomJobCompleted):
2789         (BlackBerry::WebKit::RenderQueue::isCurrentVisibleScrollJob):
2790         (BlackBerry::WebKit::RenderQueue::isCurrentVisibleScrollJobCompleted):
2791         (BlackBerry::WebKit::RenderQueue::isCurrentRegularRenderJob):
2792         (BlackBerry::WebKit::RenderQueue::tileIndexesIntersectingRegion):
2793         (BlackBerry::WebKit::RenderQueue::tileIndexesFullyContainedInRegion):
2794         (BlackBerry::WebKit::RenderQueue::tileRegion):
2795         (BlackBerry::WebKit::RenderQueue::addToQueue):
2796         (BlackBerry::WebKit::RenderQueue::addToRegularQueue):
2797         (BlackBerry::WebKit::RenderQueue::addToScrollZoomQueue):
2798         (BlackBerry::WebKit::RenderQueue::quickSort):
2799         (BlackBerry::WebKit::RenderQueue::visibleContentChanged):
2800         (BlackBerry::WebKit::RenderQueue::backingStoreRectChanging):
2801         (BlackBerry::WebKit::RenderQueue::clear):
2802         (BlackBerry::WebKit::RenderQueue::clearRegions):
2803         (BlackBerry::WebKit::RenderQueue::clearTileIndexes):
2804         (BlackBerry::WebKit::RenderQueue::render):
2805         (BlackBerry::WebKit::RenderQueue::renderRegularRenderJobs):
2806         (BlackBerry::WebKit::RenderQueue::renderScrollZoomJobs):
2807         (BlackBerry::WebKit::RenderQueue::scrollZoomJobsCompleted):
2808         * WebKitSupport/RenderQueue.h:
2809         (WebKit):
2810         (RenderQueue):
2811         * WebKitSupport/SurfacePool.cpp:
2812         (BlackBerry::WebKit::SurfacePool::numberOfAvailableBackBuffers):
2813         (BlackBerry::WebKit::SurfacePool::takeBackBuffer):
2814         * WebKitSupport/SurfacePool.h:
2815         (SurfacePool):
2816         * WebKitSupport/TileIndex.h:
2817         (WebKit):
2818
2819 2012-12-17  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
2820
2821         [BlackBerry] Editable text element can't be selected
2822         https://bugs.webkit.org/show_bug.cgi?id=105240
2823
2824         Reviewed by Rob Buis.
2825         Internally reviewed by Genevieve Mak and Mike Fenton.
2826
2827         Internal PR266755
2828         When the target is Text, we should allow it to collect text nodes in
2829         the shadow tree of text editable elements.
2830
2831         * WebKitSupport/FatFingers.cpp:
2832         (BlackBerry::WebKit::FatFingers::getNodesFromRect):
2833
2834 2012-12-17  Yongxin Dai  <yodai@rim.com>
2835
2836         [BlackBerry] Prevent selection handles from being rendered after selection was canceled
2837         https://bugs.webkit.org/show_bug.cgi?id=105203
2838
2839         Reviewed by Rob Buis.
2840
2841         PR255438
2842
2843         Here is the explanation why handles occur without selection overlay.
2844         1. Still touch at current selection (Selection A) initiated by touch-hold
2845         2. Selection expanding (Selection B) is ongoing
2846         3. Finger moves. In UI thread:
2847             1) SelectionHander::cancelSelection() gets called.
2848                 a. Selection A is canceled immediately (clear selecting state and hide handles)
2849                 b. Post a request to webkit thread to cancel Selection A.
2850         4. In webkit thread:
2851             1) Selection B becomes active selection
2852                 a. Show selection overlay for Selection B
2853                 b. Dispatch Selection B to UI thread to show handles
2854             2) Handle the request of canceling Selection A. The selection A was gone. Instead the active Selection B is canceled.
2855             The visual change is Selection overlay for Selection B becomes invisible..
2856         5. In UI thread:
2857             Selection B is rendered. The start handle and the end handle occur without selection overlay.
2858
2859         The fix is to notify client with a empty selection whenever the selection is canceled in webkit thread.
2860
2861         Reviewed Internally by Mike Fenton.
2862
2863         * WebKitSupport/SelectionHandler.cpp:
2864         (BlackBerry::WebKit::SelectionHandler::cancelSelection):
2865
2866 2012-12-17  Yong Li  <yoli@rim.com>
2867
2868         [BlackBerry] Null pointer access in compositorDrawsRootLayer
2869         https://bugs.webkit.org/show_bug.cgi?id=105204
2870
2871         Reviewed by Rob Buis.
2872
2873         PR# 267188.
2874         Add a null check for m_mainFrame in the function.
2875
2876         * Api/WebPage.cpp:
2877         (BlackBerry::WebKit::WebPagePrivate::compositorDrawsRootLayer):
2878
2879 2012-12-17  Andrew Lo  <anlo@rim.com>
2880
2881         [BlackBerry] Use application size rather than screen size where appropriate.
2882         https://bugs.webkit.org/show_bug.cgi?id=105201
2883
2884         Reviewed by Rob Buis.
2885         Internally reviewed by Jeff Rogers.
2886
2887         Switch from screenSize to applicationSize where appropriate.
2888         Internal PR266400
2889
2890         * Api/WebPage.cpp:
2891         (BlackBerry::WebKit::WebPagePrivate::transformedViewportSize):
2892         (BlackBerry::WebKit::WebPagePrivate::setDefaultLayoutSize):
2893         * WebKitSupport/SurfacePool.cpp:
2894         (BlackBerry::WebKit::SurfacePool::initialize):
2895
2896 2012-12-17  Mike Fenton  <mifenton@rim.com>
2897
2898         [BlackBerry] Improve DOMSupport visibleSelectionForClosestActualWordStart for content editable.
2899         https://bugs.webkit.org/show_bug.cgi?id=105198
2900
2901         Reviewed by Rob Buis.
2902
2903         PR 258038.
2904
2905         Improve closest word matching by giving preference to the left when
2906         distances are equal.
2907
2908         Also enforce container matching to avoid selecting the paragraph
2909         marker if a CE div is followed immediately by a CE paragraph.
2910
2911         Minor refactor - don't calculate the distance if the selection
2912         isn't on a word.
2913
2914         Reviewed Internally by Gen Mak and Nima Ghanavatian.
2915
2916         * WebKitSupport/DOMSupport.cpp:
2917         (BlackBerry::WebKit::DOMSupport::visibleSelectionForClosestActualWordStart):
2918
2919 2012-12-17  Jakob Petsovits  <jpetsovits@rim.com>
2920
2921         [BlackBerry] Clean up log output in WebKit/blackberry.
2922         https://bugs.webkit.org/show_bug.cgi?id=104823
2923
2924         Reviewed by George Staikos.
2925
2926         Behavior-preserving change, fixing many issues with logging:
2927         - Call logAlways() instead of BBLOG() in already defined-out debug blocks.
2928         - Call logAlways() instead of BBLOG() for serious errors, too.
2929         - Fix build for the DEBUG_OVERFLOW_DETECTION block in ChromeClientBlackBerry.
2930         - Fix build for double declarations of "elapsed" variables in RenderQueue.
2931         - Fix compiler warnings due to format string / parameter mismatches.
2932         - Remove unnecessary trailing newlines in logged strings.
2933         - Consistently use Platform:: as prefix except inside WebCore-namespaced code.
2934         - Use indentation that actually passes WebKit style checks.
2935         - Change point/size/rect output to use Platform toString() formats for consistency.
2936
2937         * Api/BackingStore.cpp:
2938         (BlackBerry::WebKit::bestDivisor):
2939         (BlackBerry::WebKit::BackingStorePrivate::suspendBackingStoreUpdates):
2940         (BlackBerry::WebKit::BackingStorePrivate::suspendScreenUpdates):
2941         (BlackBerry::WebKit::BackingStorePrivate::resumeBackingStoreUpdates):
2942         (BlackBerry::WebKit::BackingStorePrivate::resumeScreenUpdates):
2943         (BlackBerry::WebKit::BackingStorePrivate::repaint):
2944         (BlackBerry::WebKit::BackingStorePrivate::slowScroll):
2945         (BlackBerry::WebKit::BackingStorePrivate::scroll):
2946         (BlackBerry::WebKit::BackingStorePrivate::renderJob):
2947         (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect):
2948         (BlackBerry::WebKit::BackingStorePrivate::updateTilesAfterBackingStoreRectChange):
2949         (BlackBerry::WebKit::BackingStorePrivate::scrollBackingStore):
2950         (BlackBerry::WebKit::BackingStorePrivate::render):
2951         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
2952         (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion):
2953         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
2954         (BlackBerry::WebKit::BackingStorePrivate::blitToWindow):
2955         (BlackBerry::WebKit::BackingStorePrivate::fillWindow):
2956         (BlackBerry::WebKit::BackingStorePrivate::invalidateWindow):
2957         (BlackBerry::WebKit::BackingStorePrivate::clearWindow):
2958         * Api/WebPage.cpp:
2959         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
2960         (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint):
2961         (BlackBerry::WebKit::WebPagePrivate::contentsSizeChanged):
2962         (BlackBerry::WebKit::WebPagePrivate::zoomToInitialScaleOnLoad):
2963         (BlackBerry::WebKit::WebPage::touchEvent):
2964         (BlackBerry::WebKit::WebPagePrivate::scheduleRootLayerCommit):
2965         (BlackBerry::WebKit::WebPagePrivate::commitRootLayer):
2966         (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
2967         (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
2968         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2969         (WebCore::ChromeClientBlackBerry::overflowExceedsContentsSize):
2970         * WebKitSupport/FatFingers.cpp:
2971         (BlackBerry::WebKit::FatFingers::checkFingerIntersection):
2972         (BlackBerry::WebKit::FatFingers::findIntersectingRegions):
2973         (BlackBerry::WebKit::FatFingers::checkForText):
2974         * WebKitSupport/InputHandler.cpp:
2975         (BlackBerry::WebKit::convertStringToWchar):
2976         (BlackBerry::WebKit::convertStringToWcharVector):
2977         (BlackBerry::WebKit::convertSpannableStringToString):
2978         (BlackBerry::WebKit::InputHandler::learnText):
2979         (BlackBerry::WebKit::InputHandler::requestCheckingOfString):
2980         (BlackBerry::WebKit::InputHandler::spellCheckingRequestCancelled):
2981         (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
2982         (BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint):
2983         (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions):
2984         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
2985         (BlackBerry::WebKit::InputHandler::setInputModeEnabled):
2986         (BlackBerry::WebKit::InputHandler::setElementFocused):
2987         (BlackBerry::WebKit::InputHandler::spellCheckBlock):
2988         (BlackBerry::WebKit::InputHandler::nodeTextChanged):
2989         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
2990         (BlackBerry::WebKit::InputHandler::frameUnloaded):
2991         (BlackBerry::WebKit::InputHandler::selectionChanged):
2992         (BlackBerry::WebKit::InputHandler::setSelection):
2993         (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
2994         (BlackBerry::WebKit::InputHandler::deleteTextRelativeToCursor):
2995         (BlackBerry::WebKit::InputHandler::deleteText):
2996         (BlackBerry::WebKit::InputHandler::spannableTextInRange):
2997         (BlackBerry::WebKit::InputHandler::setComposingRegion):
2998         (BlackBerry::WebKit::InputHandler::finishComposition):
2999         (BlackBerry::WebKit::InputHandler::setText):
3000         (BlackBerry::WebKit::InputHandler::setTextAttributes):
3001         (BlackBerry::WebKit::InputHandler::setRelativeCursorPosition):
3002         (BlackBerry::WebKit::InputHandler::setSpannableTextAndRelativeCursor):
3003         (BlackBerry::WebKit::InputHandler::setComposingText):
3004         (BlackBerry::WebKit::InputHandler::commitText):
3005         * WebKitSupport/RenderQueue.cpp:
3006         (BlackBerry::WebKit::RenderQueue::addToRegularQueue):
3007         (BlackBerry::WebKit::RenderQueue::addToScrollZoomQueue):
3008         (BlackBerry::WebKit::RenderQueue::render):
3009         (BlackBerry::WebKit::RenderQueue::renderAllCurrentRegularRenderJobs):
3010         (BlackBerry::WebKit::RenderQueue::startRegularRenderJobBatchIfNeeded):
3011         (BlackBerry::WebKit::RenderQueue::renderVisibleZoomJob):
3012         (BlackBerry::WebKit::RenderQueue::renderVisibleScrollJob):
3013         (BlackBerry::WebKit::RenderQueue::renderRegularRenderJob):
3014         (BlackBerry::WebKit::RenderQueue::renderNonVisibleScrollJob):
3015         * WebKitSupport/SelectionHandler.cpp:
3016         (BlackBerry::WebKit::SelectionHandler::cancelSelection):
3017         (BlackBerry::WebKit::SelectionHandler::shouldUpdateSelectionOrCaretForPoint):
3018         (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
3019         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
3020         (BlackBerry::WebKit::SelectionHandler::setSelection):
3021         (BlackBerry::WebKit::SelectionHandler::selectObject):
3022         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
3023         (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
3024         * WebKitSupport/SurfacePool.cpp:
3025         (BlackBerry::WebKit::SurfacePool::initialize):
3026
3027 2012-12-17  Anthony Scian  <ascian@rim.com>
3028
3029         [Blackberry] Static code analysis warning fixes
3030         https://bugs.webkit.org/show_bug.cgi?id=105129
3031
3032         Reviewed by Rob Buis.
3033
3034         - disable copy/op= in BackingStore
3035         - cache and check intermediate values in parentLayer
3036         - disable copy/op= in InRegionScroller
3037         - disable copy/op= in WebPageGroupLoadDeferrer
3038         - disable copy/op= in WebSettings
3039         - disable copy/op= in WebViewportArguments
3040         - disable copy/op= in BackingStoreClient
3041         - disable copy/op= in TileBuffer
3042         - if stopNode is not NULL, loop could iterate past NULL; added NULL check to loop
3043           to make the code more robust
3044
3045         * Api/BackingStore.h:
3046         * Api/InRegionScroller.cpp:
3047         (BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint):
3048         (BlackBerry::WebKit::parentLayer):
3049         * Api/InRegionScroller.h:
3050         * Api/WebPageGroupLoadDeferrer.h:
3051         * Api/WebSettings.h:
3052         * Api/WebViewportArguments.h:
3053         * WebKitSupport/BackingStoreClient.h:
3054         (BackingStoreClient):
3055         * WebKitSupport/BackingStoreTile.h:
3056         (TileBuffer):
3057         * WebKitSupport/DOMSupport.cpp:
3058         (BlackBerry::WebKit::DOMSupport::visibleTextQuads):
3059
3060 2012-12-16  Arvid Nilsson  <anilsson@rim.com>
3061
3062         [BlackBerry] Adapt to new BlackBerry::Platform::TouchPoint API
3063         https://bugs.webkit.org/show_bug.cgi?id=105143
3064         RIM PR 171941
3065
3066         Reviewed by Rob Buis.
3067         Internally reviewed by George Staikos.
3068
3069         TouchPoint instances now provide document coordinates for the viewport
3070         and content position of the touch event. The pixel coordinates stored
3071         in the TouchPoint should no longer be needed in WebKit. One exception
3072         is when passing events to a full screen plugin.
3073
3074         Also adapt to new method names and encapsulation of TouchPoint data
3075         members.
3076
3077         * Api/WebPage.cpp:
3078         (BlackBerry::WebKit::WebPage::touchEvent):
3079         (BlackBerry::WebKit::WebPage::touchPointAsMouseEvent):
3080         (BlackBerry::WebKit::WebPagePrivate::dispatchTouchEventToFullScreenPlugin):
3081         (BlackBerry::WebKit::WebPagePrivate::dispatchTouchPointAsMouseEventToFullScreenPlugin):
3082         * WebKitSupport/InputHandler.cpp:
3083         (BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint):
3084         * WebKitSupport/InputHandler.h:
3085         (InputHandler):
3086         * WebKitSupport/TouchEventHandler.cpp:
3087         (BlackBerry::WebKit::TouchEventHandler::doFatFingers):
3088         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
3089         * WebKitSupport/TouchEventHandler.h:
3090         (TouchEventHandler):
3091
3092 2012-12-15  Anders Carlsson  <andersca@apple.com>
3093
3094         Rename FrameLoaderClient::download to convertMainResourceLoadToDownload
3095         https://bugs.webkit.org/show_bug.cgi?id=105122
3096
3097         Reviewed by Andreas Kling.
3098
3099         Update for WebCore changes.
3100
3101         * Api/WebPage.h:
3102         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3103         (WebCore::FrameLoaderClientBlackBerry::convertMainResourceLoadToDownload):
3104         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
3105         (FrameLoaderClientBlackBerry):
3106
3107 2012-12-16  Jacky Jiang  <zhajiang@rim.com>
3108
3109         [BlackBerry] GUIMark3 page is rendered at a large scale during history navigation back
3110         https://bugs.webkit.org/show_bug.cgi?id=105130
3111
3112         Reviewed by George Staikos.
3113
3114         PR: 265999
3115         During history navigation, UI thread can blit the contents at a bad
3116         view state before WebKit thread restores the view state.
3117         Suspend screen updates before goBackOrForward() and resume thereafter
3118         so that screen can be updated after the correct view state is updated.
3119         No need to render or blit here, as goBackOrForward() can dispatch a
3120         message to WebKit thread to do that in WebPagePrivate::restoreHistoryViewState().
3121
3122         * Api/WebPage.cpp:
3123         (BlackBerry::WebKit::WebPage::goBackOrForward):
3124
3125 2012-12-15  Nima Ghanavatian  <nghanavatian@rim.com>
3126
3127         [BlackBerry] Pass key modifiers with touch and mouse events
3128         https://bugs.webkit.org/show_bug.cgi?id=105108
3129
3130         Reviewed by Rob Buis.
3131
3132         Pass key modifiers to allow for added functionality, such as
3133         shift+click to highlight.
3134
3135         Internally reviewed by Gen Mak.
3136
3137         * Api/WebPage.cpp:
3138         (BlackBerry::WebKit::WebPagePrivate::webContext):
3139         (BlackBerry::WebKit::WebPagePrivate::updateCursor):
3140         (BlackBerry::WebKit::WebPage::mouseEvent):
3141         (BlackBerry::WebKit::WebPage::touchPointAsMouseEvent):
3142         * Api/WebPage.h:
3143         * WebKitSupport/TouchEventHandler.cpp:
3144         (BlackBerry::WebKit::TouchEventHandler::sendClickAtFatFingersPoint):
3145         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
3146         (BlackBerry::WebKit::TouchEventHandler::handleFatFingerPressed):
3147         * WebKitSupport/TouchEventHandler.h:
3148         (TouchEventHandler):
3149
3150 2012-12-15  Nima Ghanavatian  <nghanavatian@rim.com>
3151
3152         [BlackBerry] Clean up allocated memory from InputMethodSupport
3153         https://bugs.webkit.org/show_bug.cgi?id=105110
3154
3155         Reviewed by Rob Buis.
3156
3157         PR265919
3158         We are deep copying the spannable_string from IMF and freeing
3159         here once we're done with it.
3160
3161         Internally reviewed by Jeff Rogers.
3162
3163         * WebKitSupport/InputHandler.cpp:
3164         (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
3165
3166 2012-12-14  Parth Patel  <parpatel@rim.com>
3167
3168         [BlackBerry] Allow plugins to be disabled by shared library filename
3169         https://bugs.webkit.org/show_bug.cgi?id=101274
3170
3171         Reviewed by Yong Li.
3172
3173         Fixing build error.
3174
3175         * Api/WebPage.cpp:
3176         (BlackBerry::WebKit::WebPage::setExtraPluginDirectory):
3177
3178 2012-12-13  Jacky Jiang  <zhajiang@rim.com>
3179
3180         [BlackBerry][Fullscreen] Exiting fullscreen does not set the correct scroll position
3181         https://bugs.webkit.org/show_bug.cgi?id=104958
3182
3183         Reviewed by Antonio Gomes.
3184         Internally reviewed by Arvid Nilsson and Max Feil.
3185
3186         PR: 231174
3187         When leaving fullscreen, WebPage scale and scroll position can't return
3188         to the original scale and scroll position.
3189         We can't restore them in WebPagePrivate::exitFullScreenForElement()
3190         as they can still be changed thereafter during the async
3191         setViewportSize(). And also the async setViewportSize() from the app
3192         side isn't guaranteed as some apps don't need to resize the viewport if
3193         their windows are already fullscreen.
3194         The restoration is basically only needed if viewport size is changed.
3195         At the point of entering fullscreen, we can safely assume that there
3196         would be a viewport size change thereafter if the current visible size
3197         and screen size are not equal. Based on this assumption, we can save
3198         the scale and position before entering fullscreen and restore them in
3199         setViewportSize() thereafter.
3200
3201         * Api/WebPage.cpp:
3202         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
3203         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
3204         * Api/WebPage_p.h:
3205         (WebPagePrivate):
3206
3207 2012-12-13  Yong Li  <yoli@rim.com>
3208
3209         [BlackBerry] Possible JS re-entrancy caused by UI event handler
3210         https://bugs.webkit.org/show_bug.cgi?id=84862
3211
3212         Reviewed by Rob Buis.
3213
3214         Fix an obvious bug in previous patch.
3215
3216         * Api/WebPage.cpp:
3217         (BlackBerry::WebKit::WebPagePrivate::deferredTasksTimerFired):
3218
3219 2012-12-13  Parth Patel  <parpatel@rim.com>, Max Feil <mfeil@rim.com>
3220
3221         Allow plugins to be disabled by shared library filename
3222         https://bugs.webkit.org/show_bug.cgi?id=101274
3223
3224         Reviewed by Antonio Gomes.
3225
3226         Mechanism allows plugins to be disabled by specifying their shared library filenames.
3227         Once disabled, a plugin's shared library should never be loaded.
3228
3229         * Api/WebPage.cpp:
3230         (BlackBerry::WebKit::WebPage::setExtraPluginDirectory):
3231         (WebKit):
3232         (BlackBerry::WebKit::WebPage::updateDisabledPluginFiles):
3233         * Api/WebPage.h:
3234
3235 2012-12-12  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3236
3237         NetworkInfoController needs to support destructor
3238         https://bugs.webkit.org/show_bug.cgi?id=104642
3239
3240         Reviewed by Kentaro Hara.
3241
3242         Though NetworkInfoController can be referenced by each port in order to update network status change,
3243         there is no virtual interface to destroy it. Beside each port client also needs to be destroyed when
3244         controller is destroyed.
3245
3246         * WebCoreSupport/NetworkInfoClientBlackBerry.cpp:
3247         (WebCore::NetworkInfoClientBlackBerry::networkInfoControllerDestroyed):
3248         (WebCore):
3249         * WebCoreSupport/NetworkInfoClientBlackBerry.h:
3250         (NetworkInfoClientBlackBerry):
3251
3252 2012-12-12  Mike Lattanzio  <mlattanzio@rim.com>
3253
3254         [BlackBerry] Ensure InRegionScrollableArea is valid before using.
3255         https://bugs.webkit.org/show_bug.cgi?id=104832
3256
3257         Reviewed by Antonio Gomes.
3258
3259         Make sure the InRegionScrollableArea we are about to scroll is
3260         still valid by ensuring its present in our cache of scrollable areas.
3261         Internal PR: 258475
3262         Internal Review: Gen Mak
3263
3264         We cache a RefPtr for each scrollable area at the time we discover them,
3265         but this cache can get cleared anytime and then the references will be
3266         released. If a request comes in to scroll a region which no longer
3267         exists we have to ignore it.
3268
3269         * Api/InRegionScroller.cpp:
3270         (BlackBerry::WebKit::InRegionScrollerPrivate::setScrollPositionCompositingThread):
3271         (BlackBerry::WebKit::InRegionScrollerPrivate::setScrollPositionWebKitThread):
3272         (BlackBerry::WebKit::InRegionScrollerPrivate::isValidScrollableLayerWebKitThread):
3273         (WebKit):
3274         (BlackBerry::WebKit::InRegionScrollerPrivate::isValidScrollableNode):
3275         * Api/InRegionScroller_p.h:
3276         (WebCore):
3277         (InRegionScrollerPrivate):
3278         * WebKitSupport/InRegionScrollableArea.cpp:
3279         (BlackBerry::WebKit::InRegionScrollableArea::cachedScrollableLayer):
3280         (WebKit):
3281         (BlackBerry::WebKit::InRegionScrollableArea::cachedScrollableNode):
3282         * WebKitSupport/InRegionScrollableArea.h:
3283         (InRegionScrollableArea):
3284
3285 2012-12-12  Mark Lam  <mark.lam@apple.com>
3286
3287         Encapsulate externally used webdatabase APIs in DatabaseManager.
3288         https://bugs.webkit.org/show_bug.cgi?id=104741.
3289
3290         Reviewed by Sam Weinig.
3291
3292         Use DatabaseManager instead of accessing DatabaseTracker, AbstractDatabase,
3293         and DatabaseContext directly. This is to prepare for upcoming webkit2
3294         refactoring.
3295
3296         * Api/WebPage.cpp:
3297         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
3298         * WebCoreSupport/ChromeClientBlackBerry.cpp:
3299         (WebCore::ChromeClientBlackBerry::exceededDatabaseQuota):
3300
3301 2012-12-12  Mike Fenton  <mifenton@rim.com>
3302
3303         [BlackBerry] Fix word matching algorithm to account for adjacent divs with no whitespace between them.
3304         https://bugs.webkit.org/show_bug.cgi?id=104837
3305
3306         Reviewed by Rob Buis.
3307
3308         PR 258038.
3309
3310         Fix selection at the end of content editable text block.
3311
3312         The next character may be in the next block bypassing the distance
3313         comparison logic we have, remove the check for next character being
3314         whitespace
3315
3316         Reviewed Internally by Nima Ghanavatian.
3317
3318         * WebKitSupport/DOMSupport.cpp:
3319         (BlackBerry::WebKit::DOMSupport::visibleSelectionForClosestActualWordStart):
3320
3321 2012-12-12  Alexey Proskuryakov  <ap@apple.com>
3322
3323         Make LOG() work in WebProcess and NetworkProcess
3324         https://bugs.webkit.org/show_bug.cgi?id=104718
3325
3326         Reviewed by Tim Horton.
3327
3328         * Api/BlackBerryGlobal.cpp: Include InitializeLogging.h
3329
3330 2012-12-11  Kihong Kwon  <kihong.kwon@samsung.com>
3331
3332         Vibration API: IDL type doesn't match implementation type
3333         https://bugs.webkit.org/show_bug.cgi?id=103899
3334
3335         Reviewed by Kentaro Hara.
3336
3337         According to WebIDL, "unsigned long" corresponds to "unsigned" in the platform.
3338         Therefore unsigned long need to be changed to unsigned for the Vibration API.
3339         - Change a parameter type of vibrate function from unsigned long to unsigned.
3340
3341         * WebCoreSupport/VibrationClientBlackBerry.cpp:
3342         (WebCore::VibrationClientBlackBerry::vibrate):
3343         * WebCoreSupport/VibrationClientBlackBerry.h:
3344         (VibrationClientBlackBerry):
3345
3346 2012-12-11  Nima Ghanavatian  <nghanavatian@rim.com>
3347
3348         [BlackBerry] Redraw spell check dialog after rotation.
3349         https://bugs.webkit.org/show_bug.cgi?id=104737
3350
3351         Reviewed by Rob Buis.
3352
3353         After rotating the device, all dialogs are dismissed. We should
3354         restore the spell check dialog as it is still valid after
3355         rotation and the user will expect it there.
3356
3357         Internally reviewed by Mike Fenton and Gen Mak.
3358
3359         * Api/WebPage.cpp:
3360         (BlackBerry::WebKit::WebPage::applyPendingOrientationIfNeeded):
3361
3362 2012-12-11  Nima Ghanavatian  <nghanavatian@rim.com>
3363
3364         [BlackBerry] Shift the spell check dialog to align with text after transformation
3365         https://bugs.webkit.org/show_bug.cgi?id=104716
3366
3367         Reviewed by Rob Buis.
3368
3369         PR245033
3370         As the page is transformed, we should redraw the dialog box to align
3371         with the new text position. We send a message to move the dialog
3372         box from different spots to account for scrolling. This includes
3373         keyboard transitions from hidden to displayed and centering of
3374         focus around a new touch point. We do not reposition on manual user
3375         scrolling of the page, as this simply dismisses the dialog.
3376
3377         Internally reviewed by Mike Fenton and Gen Mak.
3378
3379         * Api/WebPage.cpp:
3380         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
3381         * Api/WebPageClient.h:
3382         * WebCoreSupport/ChromeClientBlackBerry.cpp:
3383         (WebCore::ChromeClientBlackBerry::scroll):
3384         * WebKitSupport/InputHandler.cpp:
3385         (BlackBerry::WebKit::InputHandler::InputHandler):
3386         (BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint):
3387         (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions):
3388         (BlackBerry::WebKit::InputHandler::redrawSpellCheckDialogIfRequired):
3389         (WebKit):
3390         * WebKitSupport/InputHandler.h:
3391         (InputHandler):
3392         (BlackBerry::WebKit::InputHandler::clearDidSpellCheckState):
3393         (BlackBerry::WebKit::InputHandler::didSpellCheckWord):
3394         * WebKitSupport/TouchEventHandler.cpp:
3395         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
3396
3397 2012-12-11  Genevieve Mak  <gmak@rim.com>
3398
3399         [BlackBerry] Avoid multiple calls to fat fingers
3400         https://bugs.webkit.org/show_bug.cgi?id=104703
3401
3402         Reviewed by Rob Buis.
3403
3404         We already run fat fingers on touch start. No need to do it again
3405         in the general use case.
3406
3407         * WebKitSupport/TouchEventHandler.cpp:
3408         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
3409
3410 2012-12-11  Mike West  <mkwst@chromium.org>
3411
3412         Web Inspector: ConsoleTypes should not expose MessageType - it should be priva