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