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