[BlackBerry] Viewport metatag doesn't disable double-tap zoom
[WebKit-https.git] / Source / WebKit / blackberry / ChangeLog
1 2012-04-17  Jacky Jiang  <zhajiang@rim.com>
2
3         [BlackBerry] Viewport metatag doesn't disable double-tap zoom
4         https://bugs.webkit.org/show_bug.cgi?id=84199
5
6         Reviewed by George Staikos.
7
8         PR: 148279
9         When we set "user-scalable=no" in viewport meta-tag and change any
10         other WebSettings, the WebPage can turn to be scalable.
11         This is a regression of the change master_32/SHA:fa0f8ee9. In that
12         change, we used setUserScalable(webSettings->isUserScalable())
13         in WebPagePrivate::didChangeSettings which was incorrect for non-DRT
14         case, as webSettings->isUserScalable() would always return true by
15         default.
16         Create a new API WebPage::setUserScalable which will be used in
17         DumpRenderTree.cpp.
18
19         * Api/WebPage.cpp:
20         (BlackBerry::WebKit::WebPage::setUserScalable):
21         (WebKit):
22         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
23         * Api/WebPage.h:
24
25 2012-04-17  Mike Fenton  <mifenton@rim.com>
26
27         [BlackBerry] Pattern matching should be applied to numbers
28         https://bugs.webkit.org/show_bug.cgi?id=84152
29
30         Reviewed by Antonio Gomes.
31
32         PR 148906.
33
34         Add pattern matching for number based on [0-9] to trigger
35         input help matching number fields.
36
37         * WebKitSupport/DOMSupport.cpp:
38         (BlackBerry::WebKit::DOMSupport::elementPatternIndicatesNumber):
39         (DOMSupport):
40         (BlackBerry::WebKit::DOMSupport::elementPatternIndicatesHexadecimal):
41         (BlackBerry::WebKit::DOMSupport::elementPatternMatches):
42         * WebKitSupport/DOMSupport.h:
43         * WebKitSupport/InputHandler.cpp:
44         (BlackBerry::WebKit::convertInputType):
45
46 2012-04-17  George Staikos  <staikos@webkit.org>
47
48         Export the initialization function so it can be called earlier.
49         https://bugs.webkit.org/show_bug.cgi?id=84134
50
51         Reviewed by Nikolas Zimmermann.
52
53         * Api/BlackBerryGlobal.h: export globalInitialize()
54         (WebKit):
55
56 2012-04-16  Antonio Gomes  <agomes@rim.com>
57
58         Screen shift down when VKB shows by clicking in a input box MKS_3601371
59         https://bugs.webkit.org/show_bug.cgi?id=84057
60
61         Reviewed by Rob Buis.
62
63         After switching from ScrollView::canOverscroll to ScrollView::constrainsScrollingToContentEdge
64         we had a less restricted code path allowing/disallowing overscrolling. That caused
65         some webpages like google.com to get on overscroll when adjusting the scroll
66         position to ensure the focused input field is visible.
67
68         Patch restricts the way we allow overscrolling to the bottom, where the virtual
69         keyboard pops up from, clamping it to 0, 0 if it tries to
70         overscroll upwards, and to maximum scroll position if it overscrolls
71         downwards.
72
73         PR #149846
74         Internally reviewed by Mike Fenton.
75
76         * WebKitSupport/InputHandler.cpp:
77         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
78
79 2012-04-16  Yongxin Dai  <yodai@rim.com>
80
81         [BlackBerry] Increase padding for text element
82         https://bugs.webkit.org/show_bug.cgi?id=83903
83
84         Reviewed by Antonio Gomes.
85         
86         PR 125888
87         
88         Increase the padding value for focused text element to make selection handle
89         at least partially visible when the user is dragging at edge of viewport
90         in in-region scoll mode.
91  
92         Reviewed internally by Mike Fenton.
93
94         * WebKitSupport/InputHandler.cpp:
95         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
96
97 2012-04-16  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
98
99         [BlackBerry] Add ability for DRT to handle HTTP authentication challenges.
100         https://bugs.webkit.org/show_bug.cgi?id=84031
101
102         Reviewed by Rob Buis.
103
104         Added the interface function didReceivedAuthenticaitonChallenge()
105         in interface class DumpRenderTreeClient;
106         Called m_dumpRenderTree->didReceiveAuthenticationChallenge() in
107         WebPagePrivate::authenticationChallenge() when DRT is enabled.
108
109         Test: reuse existing test cases:
110         http/tests/loading/basic-credentials-sent-automatically.html
111         http/tests/loading/basic-auth-resend-wrong-credentials.html
112
113         * Api/DumpRenderTreeClient.h:
114         (WebCore):
115         * Api/WebPage.cpp:
116         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
117
118 2012-04-16  Arvid Nilsson  <anilsson@rim.com>
119
120         [BlackBerry] Accelerated compositing layers fail to render in direct rendering mode
121         https://bugs.webkit.org/show_bug.cgi?id=83933
122
123         Reviewed by Adam Treat.
124
125         RIM PR: 149609
126         This was because I accidentally dropped an exclamation mark when
127         upstreaming the patch for PR 136381 (bug #83131). Fixed by adding back
128         the exclamation mark.
129
130         * Api/WebPage.cpp:
131         (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
132
133 2012-04-12  Konrad Piascik  <kpiascik@rim.com>
134
135         [BlackBerry] Web Inspector messages incorrectly converted
136         https://bugs.webkit.org/show_bug.cgi?id=83796
137
138         Reviewed by Rob Buis.
139
140         The JSON sent over from the remote Web Inspector front-end was being
141         mis interpreted as ISO-8859-1.  This caused all non ascii characters to
142         become garbled when using the String constructor, so we use fromtUTF8 instead.
143
144         * Api/WebPage.cpp:
145         (BlackBerry::WebKit::WebPage::dispatchInspectorMessage):
146
147 2012-04-12  Mike Fenton  <mifenton@rim.com>
148
149         [BlackBerry] Speed up processing of Selection region generation.
150         https://bugs.webkit.org/show_bug.cgi?id=82766
151
152         Reviewed by Rob Buis.
153
154         PR 136593.
155
156         Re-speed up text selection.  The previous patch had a merge
157         error causing text selection not to function.  The fix
158         implemented removed the optimization.  This fixes the error
159         in the original patch and removes the temporary fix.
160
161         Make style updated as suggested by Antonio Gomes.
162
163         Reviewed Internally by Gen Mak.
164
165         * WebKitSupport/SelectionHandler.cpp:
166         (BlackBerry::WebKit::SelectionHandler::regionForTextQuads):
167         (BlackBerry::WebKit::regionRectListContainsPoint):
168
169 2012-04-12  Mike Fenton  <mifenton@rim.com>
170
171         Pattern matching for hexadecimal should include * as an allowable count.
172         https://bugs.webkit.org/show_bug.cgi?id=83779
173
174         Reviewed by Rob Buis.
175
176         Update pattern matching check to allow wildcard for number
177         of characters allowed.
178
179         PR 148907.
180
181         Reviewed Internally by Gen Mak.
182
183         * WebKitSupport/DOMSupport.cpp:
184         (BlackBerry::WebKit::DOMSupport::elementPatternIndicatesHexadecimal):
185
186 2012-04-11  Joe Mason  <jmason@rim.com>
187
188         [BlackBerry] Update to the thread-safe GuardedPointer API
189         https://bugs.webkit.org/show_bug.cgi?id=83603
190
191         Reviewed by Rob Buis.
192
193         RIM PR: 134984
194         Make the destructors of all objects inheriting GuardedPointerBase protected or
195         private, and delete them using BlackBerry::Platform::deleteGuardedObject.
196         Access all GuardedPointers through GuardedPointerLocker.
197
198         No new tests, refactor.
199
200         Reviewed internally by Yong Li and George Staikos.
201
202         * Api/BackingStore.cpp:
203         (BlackBerry::WebKit::BackingStore::~BackingStore):
204         * Api/BackingStore_p.h:
205         (BackingStorePrivate):
206         * Api/WebPage.cpp:
207         (BlackBerry::WebKit::WebPage::~WebPage):
208         (BlackBerry::WebKit::WebPage::destroy):
209         * Api/WebPage.h:
210         * Api/WebPage_p.h:
211         (WebPagePrivate):
212
213 2012-04-10  Arvid Nilsson  <anilsson@rim.com>
214
215         [BlackBerry] Crash when tearing down web page rendered using WebPageCompositor
216         https://bugs.webkit.org/show_bug.cgi?id=83567
217
218         Reviewed by Antonio Gomes.
219
220         Fixed by checking if there's a layer renderer before calling into it.
221
222         * Api/WebPageCompositor.cpp:
223         (BlackBerry::WebKit::WebPageCompositorPrivate::releaseLayerResources):
224
225 2012-04-09  Eli Fidler  <efidler@rim.com>
226
227         [BlackBerry] Update about:config page
228         https://bugs.webkit.org/show_bug.cgi?id=83515
229
230         Reviewed by Rob Buis.
231
232         * WebCoreSupport/AboutData.cpp:
233         (WebCore::configPage):
234         * WebCoreSupport/AboutDataEnableFeatures.in:
235         * WebCoreSupport/AboutDataHaveFeatures.in:
236         * WebCoreSupport/AboutDataUseFeatures.in:
237
238 2012-04-07  Rob Buis  <rbuis@rim.com>
239
240         [BlackBerry] Add Battery Status API support
241         https://bugs.webkit.org/show_bug.cgi?id=82615
242
243         Reviewed by George Staikos.
244
245         Add client implementation for Battery API.
246
247         * Api/WebPage.cpp:
248         (BlackBerry::WebKit::WebPagePrivate::init):  initialize BatteryClient.
249         * WebCoreSupport/BatteryClientBlackBerry.cpp: Added.
250         (WebCore):
251         (WebCore::BatteryClientBlackBerry::BatteryClientBlackBerry):
252         (WebCore::BatteryClientBlackBerry::setController):
253         (WebCore::BatteryClientBlackBerry::startUpdating):
254         (WebCore::BatteryClientBlackBerry::stopUpdating):
255         (WebCore::BatteryClientBlackBerry::batteryControllerDestroyed):
256         (WebCore::BatteryClientBlackBerry::onLevelChange):
257         (WebCore::BatteryClientBlackBerry::onChargingChange):
258         (WebCore::BatteryClientBlackBerry::onChargingTimeChange):
259         (WebCore::BatteryClientBlackBerry::onDischargingTimeChange):
260         * WebCoreSupport/BatteryClientBlackBerry.h: Added.
261         (WebCore):
262         (BatteryClientBlackBerry):
263         (WebCore::BatteryClientBlackBerry::~BatteryClientBlackBerry):
264
265 2012-04-06  Benjamin Poulain  <bpoulain@apple.com>
266
267         Get rid of the useless flag PREEMPT_GEOLOCATION_PERMISSION
268         https://bugs.webkit.org/show_bug.cgi?id=83325
269
270         Reviewed by Ryosuke Niwa.
271
272         * WebCoreSupport/AboutDataUseFeatures.in:
273
274 2012-04-06  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
275
276         [BlackBerry] Text selection - Can't select texts
277         https://bugs.webkit.org/show_bug.cgi?id=83355
278
279         Fix the problem of not sending out the result of the function 
280         SelectionHandler::regionForTextQuads(). This regression issue
281         is introduced by the git commit f9446b7d671d48a833ab0acf12b1e20637e0a910.
282
283         Reviewed by George Staikos.
284
285         * WebKitSupport/SelectionHandler.cpp:
286         (BlackBerry::WebKit::SelectionHandler::regionForTextQuads):
287             Add code to return the function result.
288
289 2012-04-05  Jason Liu  <jason.liu@torchmobile.com.cn>
290
291         [BlackBerry] Empty Referrer should not be set into ResourceRequest when loading a main resource.
292         https://bugs.webkit.org/show_bug.cgi?id=83252
293
294         Reviewed by George Staikos.
295
296         Test: http/tests/misc/resources/referrer-main-resource.php
297
298         * Api/WebPage.cpp:
299         (BlackBerry::WebKit::WebPagePrivate::load):
300
301 2012-04-05  George Staikos  <staikos@webkit.org>
302
303         Add a vibration client for BlackBerry and enable it.
304         https://bugs.webkit.org/show_bug.cgi?id=83340
305
306         Reviewed by Rob Buis.
307
308         * Api/WebPage.cpp:
309         (BlackBerry::WebKit::WebPagePrivate::init): enable the client
310         * WebCoreSupport/VibrationClientBlackBerry.cpp: Added.
311         (WebCore):
312         (WebCore::VibrationClientBlackBerry::VibrationClientBlackBerry):
313         (WebCore::VibrationClientBlackBerry::vibrate):
314         (WebCore::VibrationClientBlackBerry::cancelVibration):
315         (WebCore::VibrationClientBlackBerry::vibrationDestroyed):
316         * WebCoreSupport/VibrationClientBlackBerry.h: Added.
317         (WebCore):
318         (VibrationClientBlackBerry):
319         (WebCore::VibrationClientBlackBerry::~VibrationClientBlackBerry):
320
321 2012-04-05  Arvid Nilsson  <anilsson@rim.com>
322
323         [BlackBerry] Force compositing mode when backing store is not active
324         https://bugs.webkit.org/show_bug.cgi?id=83131
325
326         Reviewed by George Staikos.
327
328         RIM PR: 136381
329         Normally, the BlackBerry WebKit port resorts to direct rendering when
330         the backing store is not active. However, direct rendering is broken
331         with the OpenGL code path. This prevented multiple web pages from being
332         displayed at once with the new WebPageCompositor API.
333
334         Fixed by using accelerated compositing layer to render the root layer
335         instead of backing store. This will give us a tiled layer backing the
336         root layer, which for some use cases is even better than direct
337         rendering.
338
339         Reviewed internally by Filip Spacek.
340
341         * Api/BackingStore.cpp:
342         (BlackBerry::WebKit::BackingStorePrivate::shouldDirectRenderingToWindow):
343         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
344         * Api/WebPage.cpp:
345         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
346         (BlackBerry::WebKit::WebPage::setVisible):
347         (BlackBerry::WebKit::WebPagePrivate::suspendBackingStore):
348         (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore):
349         (BlackBerry::WebKit::WebPagePrivate::compositorDrawsRootLayer):
350         (WebKit):
351         (BlackBerry::WebKit::WebPagePrivate::setCompositorDrawsRootLayer):
352         (BlackBerry::WebKit::WebPagePrivate::drawLayersOnCommit):
353         (BlackBerry::WebKit::WebPagePrivate::scheduleRootLayerCommit):
354         (BlackBerry::WebKit::WebPagePrivate::commitRootLayer):
355         (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
356         (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
357         (BlackBerry::WebKit::WebPagePrivate::setRootLayerCompositingThread):
358         (BlackBerry::WebKit::WebPagePrivate::createCompositor):
359         (BlackBerry::WebKit::WebPagePrivate::suspendRootLayerCommit):
360         (BlackBerry::WebKit::WebPagePrivate::setNeedsOneShotDrawingSynchronization):
361         * Api/WebPageCompositor.cpp:
362         (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
363         (BlackBerry::WebKit::WebPageCompositorPrivate::drawsRootLayer):
364         (WebKit):
365         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
366         * Api/WebPageCompositor_p.h:
367         (BlackBerry::WebKit::WebPageCompositorPrivate::rootLayer):
368         (WebPageCompositorPrivate):
369         (BlackBerry::WebKit::WebPageCompositorPrivate::setDrawsRootLayer):
370         * Api/WebPage_p.h:
371         (WebPagePrivate):
372
373 2012-04-05  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
374
375         [BlackBerry] Clear local storage won't take effect until browser exit and relaunch
376         https://bugs.webkit.org/show_bug.cgi?id=83253
377
378         Reviewed by Rob Buis.
379
380         RIM PR: #146871
381         Cleared the local storage namespace of a WebPage's PageGroup
382         when WebPage::clearLocalStorage() get called.
383         Also deleted unused global function clearLocalStorage().
384
385         * Api/BlackBerryGlobal.cpp:
386         * Api/BlackBerryGlobal.h:
387         (WebKit):
388         * Api/WebPage.cpp:
389         (BlackBerry::WebKit::WebPage::clearLocalStorage):
390
391 2012-04-04  Rob Buis  <rbuis@rim.com>
392
393         [BlackBerry] Make the switch statement in WebPage::notifyAppActivationStateChange() stronger
394         https://bugs.webkit.org/show_bug.cgi?id=83085
395
396         Reviewed by Antonio Gomes.
397
398         PR 121109
399
400         This way when we add something to the enum and forget to add to the switch we'll get a compile error.
401
402         * Api/WebPage.cpp:
403         (BlackBerry::WebKit::WebPage::notifyAppActivationStateChange):
404
405 2012-04-03  Mike Lattanzio  <mlattanzio@rim.com>
406
407         [BlackBerry] Expose CaseSensitive, Wrap, and HighlightAllMatches in WebPage::findNextString()
408         https://bugs.webkit.org/show_bug.cgi?id=82643
409
410         Enhance BlackBerry::WebKit::WebPage::findNextString()
411
412         This patch adds support for toggling case sensitivity,
413         search wrapping, and whether or not to highlight all matches
414         in addition to the next found match.
415
416         I refactored and renamed the new setActiveMatchAndMarker() method
417         to move the active match from one range to another. This was
418         required because in the case of a non wrapped search we do not
419         want to adjust the m_activeMatch if another match is not found.
420
421         Internal Review by Andy Chen.
422
423         Reviewed by Rob Buis.
424
425         * Api/WebPage.cpp:
426         (BlackBerry::WebKit::WebPage::findNextString):
427         * Api/WebPage.h:
428         * WebKitSupport/InPageSearchManager.cpp:
429         (BlackBerry::WebKit::InPageSearchManager::InPageSearchManager):
430         (BlackBerry::WebKit::InPageSearchManager::findNextString):
431         (BlackBerry::WebKit::InPageSearchManager::findAndMarkText):
432         (BlackBerry::WebKit::InPageSearchManager::setActiveMatchAndMarker):
433         (BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):
434         * WebKitSupport/InPageSearchManager.h:
435         (InPageSearchManager):
436
437 2012-04-02  Jacky Jiang  <zhajiang@rim.com>
438
439         [BlackBerry] Adapt WebPagePrivate::webContext to the API change of r109570
440         https://bugs.webkit.org/show_bug.cgi?id=82945
441
442         Reviewed by Rob Buis.
443
444         RIM PR: 147163
445         Adapt WebPagePrivate::webContext to the API change of the security
446         cherry-pick of r109570 and r112023.
447
448         * Api/WebPage.cpp:
449         (BlackBerry::WebKit::WebPagePrivate::webContext):
450
451 2012-04-02  Lianghui Chen  <liachen@rim.com>
452
453         [BlackBerry] Set ResourceRequest TargetType in WebPagePrivate::load()
454         https://bugs.webkit.org/show_bug.cgi?id=80519
455
456         Set the right TargetType for main loads if they are not already set in
457         dispatchWillSendRequest().
458
459         Also adjust NetworkRequest TargetType for decidePolicyForExternalLoad()
460         and dispatchDecidePolicyForNavigationAction() as they are called before
461         dispatchWillSendRequest() is called. Patch to change ResourceRequest
462         TargetType earlier has been rejected as in WebKit bug
463         https://bugs.webkit.org/show_bug.cgi?id=80713
464
465         Reviewed by Rob Buis.
466
467         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
468         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction):
469         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendRequest):
470         (WebCore::FrameLoaderClientBlackBerry::decidePolicyForExternalLoad):
471
472 2012-04-01  Arvid Nilsson  <anilsson@rim.com>
473
474         [BlackBerry] Simplify the code that gets accelerated compositing output onto the screen
475         https://bugs.webkit.org/show_bug.cgi?id=82845
476
477         Reviewed by Rob Buis.
478
479         RIM PR: 136381
480         The code accounted for a now obsolete setup where we used one OpenGL
481         window for accelerated compositing and one native window for backing
482         store output, and let the windowing system composite those two. In that
483         setup an optimization to try and only update the window that had
484         changed was viable.
485
486         Nowadays, we either use an offscreen surface for accelerated
487         compositing output, which we blend onto the window containing the
488         backing store output, or render both backing store and accelerated
489         compositing output directly to one OpenGL window. We always have to
490         blit the backingstore contents and draw the accelerated compositing
491         output every frame with these code paths, so don't try to be clever
492         about it.
493
494         Even when we use an OpenGL window, the compositing surface can be non-
495         null, so don't try to glFinish() and swap the compositing surface when
496         the GLES2Context is tied to a window.
497
498         * Api/BackingStore.cpp:
499         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
500         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
501         (WebKit):
502         * Api/BackingStore_p.h:
503         (BackingStorePrivate):
504         * Api/WebPage.cpp:
505         (BlackBerry::WebKit::WebPagePrivate::drawLayersOnCommit):
506         * WebKitSupport/GLES2Context.cpp:
507         (BlackBerry::WebKit::GLES2Context::swapBuffers):
508
509 2012-03-31  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
510
511         [BlackBerry] http authenticate dialog popup only once no matter authentication pass or fail
512         https://bugs.webkit.org/show_bug.cgi?id=80135
513
514         Reviewed by Rob Buis.
515
516         RIM PR: 145660
517         Fixed a regression introduced by r111810, which used the wrong
518         credential object.
519
520         * Api/WebPage.cpp:
521         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
522
523 2012-03-30  Mike Fenton  <mifenton@rim.com>
524
525         [BlackBerry] Speed up processing of Selection region generation.
526         https://bugs.webkit.org/show_bug.cgi?id=82766
527
528         Reviewed by Rob Buis.
529
530         PR 136593.
531
532         Refactor generation of Selection IntRectRegion to avoid
533         the need for IntRectRegion's helper functions which were
534         not available when using it as a container without
535         unioning the rects.
536
537         This greatly speeds up rendering by maintaining the distinct
538         rects as the union operation was length with large numbers of
539         rects.
540
541         Reviewed Internally by Gen Mak, Mike Lattanzio and Tyler Abbott.
542
543         * WebKitSupport/DOMSupport.cpp:
544         (BlackBerry::WebKit::DOMSupport::visibleTextQuads):
545         (DOMSupport):
546         * WebKitSupport/DOMSupport.h:
547         * WebKitSupport/SelectionHandler.cpp:
548         (BlackBerry::WebKit::SelectionHandler::clippingRectForVisibleContent):
549         (BlackBerry::WebKit::SelectionHandler::regionForTextQuads):
550         (BlackBerry::WebKit::SelectionHandler::setSelection):
551         (WebKit):
552         (BlackBerry::WebKit::regionRectListContainsPoint):
553         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
554         (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
555         * WebKitSupport/SelectionHandler.h:
556         (WebCore):
557         (SelectionHandler):
558
559 2012-03-30  Mark Pilgrim  <pilgrim@chromium.org>
560
561         GEOLOCATION should be implemented as Page Supplement
562         https://bugs.webkit.org/show_bug.cgi?id=82228
563
564         Reviewed by Adam Barth.
565
566         Geolocation is now a Supplement in Page so the interface
567         has changed for setting up the page's geolocation client
568         initially and accessing the controller later.
569
570         * Api/WebPage.cpp:
571         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
572         (BlackBerry::WebKit::WebPagePrivate::init):
573         * WebCoreSupport/GeolocationControllerClientBlackBerry.cpp:
574         (GeolocationControllerClientBlackBerry::onLocationUpdate):
575         (GeolocationControllerClientBlackBerry::onLocationError):
576         * WebKitSupport/DumpRenderTreeSupport.cpp:
577         (DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests):
578         (DumpRenderTreeSupport::resetGeolocationMock):
579         (DumpRenderTreeSupport::setMockGeolocationError):
580         (DumpRenderTreeSupport::setMockGeolocationPermission):
581         (DumpRenderTreeSupport::setMockGeolocationPosition):
582
583 2012-03-30  Keishi Hattori  <keishi@webkit.org>
584
585         Change ENABLE_INPUT_COLOR to ENABLE_INPUT_TYPE_COLOR and enable it for chromium
586         https://bugs.webkit.org/show_bug.cgi?id=80972
587
588         Reviewed by Kent Tamura.
589
590         * WebCoreSupport/AboutDataEnableFeatures.in:
591         * WebCoreSupport/ChromeClientBlackBerry.h:
592         (ChromeClientBlackBerry):
593         * WebKitSupport/DOMSupport.cpp:
594         (BlackBerry::WebKit::DOMSupport::isColorInputField):
595         * WebKitSupport/InputHandler.cpp:
596         (BlackBerry::WebKit::convertInputType):
597
598 2012-03-29  Sheriff Bot  <webkit.review.bot@gmail.com>
599
600         Unreviewed, rolling out r111259.
601         http://trac.webkit.org/changeset/111259
602         https://bugs.webkit.org/show_bug.cgi?id=82650
603
604         Caused selection regression in calculations due to
605         misconstructed IntRectRegion. (Requested by mfenton on
606         #webkit).
607
608         * WebKitSupport/SelectionHandler.cpp:
609         (BlackBerry::WebKit::SelectionHandler::getConsolidatedRegionOfTextQuadsForSelection):
610
611 2012-03-29  Sheriff Bot  <webkit.review.bot@gmail.com>
612
613         Unreviewed, rolling out r112553.
614         http://trac.webkit.org/changeset/112553
615         https://bugs.webkit.org/show_bug.cgi?id=82638
616
617         It made all tests crash on Qt WK2 (Requested by Ossy_away on
618         #webkit).
619
620         * Api/WebPage.cpp:
621         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
622         (BlackBerry::WebKit::WebPagePrivate::init):
623         * WebCoreSupport/GeolocationControllerClientBlackBerry.cpp:
624         (GeolocationControllerClientBlackBerry::onLocationUpdate):
625         (GeolocationControllerClientBlackBerry::onLocationError):
626         * WebKitSupport/DumpRenderTreeSupport.cpp:
627         (DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests):
628         (DumpRenderTreeSupport::resetGeolocationMock):
629         (DumpRenderTreeSupport::setMockGeolocationError):
630         (DumpRenderTreeSupport::setMockGeolocationPermission):
631         (DumpRenderTreeSupport::setMockGeolocationPosition):
632
633 2012-03-29  Mark Pilgrim  <pilgrim@chromium.org>
634
635         GEOLOCATION should be implemented as Page Supplement
636         https://bugs.webkit.org/show_bug.cgi?id=82228
637
638         Reviewed by Adam Barth.
639
640         Geolocation is now a Supplement in Page so the interface
641         has changed for setting up the page's geolocation client
642         initially and accessing the controller later.
643
644         * Api/WebPage.cpp:
645         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
646         (BlackBerry::WebKit::WebPagePrivate::init):
647         * WebCoreSupport/GeolocationControllerClientBlackBerry.cpp:
648         (GeolocationControllerClientBlackBerry::onLocationUpdate):
649         (GeolocationControllerClientBlackBerry::onLocationError):
650         * WebKitSupport/DumpRenderTreeSupport.cpp:
651         (DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests):
652         (DumpRenderTreeSupport::resetGeolocationMock):
653         (DumpRenderTreeSupport::setMockGeolocationError):
654         (DumpRenderTreeSupport::setMockGeolocationPermission):
655         (DumpRenderTreeSupport::setMockGeolocationPosition):
656
657 2012-03-28  Nate Chapin  <japhet@chromium.org>
658
659         Remove dispatchDidLoadMainResource callback, since no
660         port implements it.
661         https://bugs.webkit.org/show_bug.cgi?id=82539
662
663         Reviewed by Alexey Proskuryakov.
664
665         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
666         (FrameLoaderClientBlackBerry):
667
668 2012-03-28  Leo Yang  <leo.yang@torchmobile.com.cn>
669
670         [BlackBerry] Use WebCore::PlatformMouseEvent::globalPosition() instead of WebCore::PlatformMouseEvent::globalPos() in WebPage.cpp
671         https://bugs.webkit.org/show_bug.cgi?id=82420
672
673         Reviewed by Rob Buis.
674
675         In PlatformMouseEvent.h the blackberry porting added globalPos() (but not upstreamed yet)
676         for PlatformMouseEvent, but this method is same as globalPosition() that is available for
677         every porting. We should use globalPosition().
678
679         * Api/WebPage.cpp:
680         (BlackBerry::WebKit::WebPagePrivate::updateCursor):
681
682 2012-03-27  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
683
684         [BlackBerry] Text selection - selection gets broken in test.com/individuals.htm
685         https://bugs.webkit.org/show_bug.cgi?id=82292
686
687         Change to check and avoid text selection across frames.
688
689         Internal reviewed by Mike Fenton
690
691         Reviewed by Rob Buis.
692
693         * WebKitSupport/SelectionHandler.cpp:
694         (BlackBerry::WebKit::visiblePositionForPointIgnoringClipping):
695             support selection across frames, so check if the *framePoint* is in
696             the *frame*.
697         (BlackBerry::WebKit::SelectionHandler::setSelection):
698             function returns a null VisablePosition, it stands for a invalid position
699             or a position in the different frames, therefor we don't execute setting
700             handle's position.
701
702 2012-03-27  Andrew Lo  <anlo@rim.com>
703
704         [BlackBerry] Switch WebPageCompositor to use AnimationFrameRateController instead of timer
705         https://bugs.webkit.org/show_bug.cgi?id=82350
706
707         Switch timer in WebPageCompositor to use AnimationFrameRateController.
708
709         Reviewed by Rob Buis.
710
711         * Api/WebPageCompositor.cpp:
712         (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
713         (BlackBerry::WebKit::WebPageCompositorPrivate::~WebPageCompositorPrivate):
714         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
715         (BlackBerry::WebKit::WebPageCompositorPrivate::animationFrameChanged):
716         * Api/WebPageCompositor_p.h:
717         (WebPageCompositorPrivate):
718
719 2012-03-27  Chris Guan  <chris.guan@torchmobile.com.cn>
720
721         A page containing multiparts with "multipart/x-mixed-replace" should not be cached.
722         https://bugs.webkit.org/show_bug.cgi?id=82291
723
724         Reviewed by Rob Buis.
725
726         If we have a multiPart reponse with multipart/x-mixed-replace, 
727         the current page should not be cached. I use isMultipartPayload() 
728         API which was supposed to be set in NetworkJob to decide to 
729         cache page or not.
730
731         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
732         (WebCore::FrameLoaderClientBlackBerry::canCachePage):
733
734 2012-03-25  Arvid Nilsson  <anilsson@rim.com>
735
736         [BlackBerry] Accelerated compositing layers fail to render when using WebPageCompositor
737         https://bugs.webkit.org/show_bug.cgi?id=82104
738         RIM PR: 145963
739
740         Reviewed by Rob Buis.
741
742         The root layer may be set before we have a layer renderer, because the
743         latter is not created until we get an OpenGL context from the embedder.
744
745         Fixed by setting the root layer on the layer renderer when it's created
746         instead of assuming a certain order of events.
747
748         * Api/WebPageCompositor.cpp:
749         (BlackBerry::WebKit::WebPageCompositorPrivate::setContext):
750         (BlackBerry::WebKit::WebPageCompositorPrivate::setRootLayer):
751
752 2012-03-23  Arvid Nilsson  <anilsson@rim.com>
753
754         [BlackBerry] Add WebPageCompositor class to BlackBerry WebKit API
755         https://bugs.webkit.org/show_bug.cgi?id=81121
756         RIM PR: 136687
757
758         Reviewed by Rob Buis.
759
760         The idea is for the API client to use a WebPageCompositor object to
761         render the WebPage when there's no screen window available.
762
763         The WebPageCompositorPrivate becomes reference counted in order to be
764         kept alive either because it's used for accelerated compositing layers
765         or used for the WebPageCompositor API. It can still work standalone.
766
767         Clean up some code - no need to keep track of a separate boolean
768         WebPagePrivate::m_isAcceleratedCompositingActive when the state of
769         m_compositor can tell you.
770
771         Also remove duplicated code from WebPagePrivate - go directly to the
772         compositor object instead, if you need to draw the AC layers.
773
774         Reviewed internally by Robin Cao and the hasBlitJobs/blitOnIdle change
775         by Filip Spacek.
776
777         * Api/BackingStore.cpp:
778         (BlackBerry::WebKit::BackingStore::hasBlitJobs):
779         (BlackBerry::WebKit::BackingStore::blitOnIdle):
780         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
781         (BlackBerry::WebKit::BackingStorePrivate::drawSubLayers):
782         (BlackBerry::WebKit::BackingStorePrivate::drawAndBlendLayersForDirectRendering):
783         (BlackBerry::WebKit::BackingStorePrivate::surfaceSize):
784         (BlackBerry::WebKit::BackingStorePrivate::buffer):
785         * Api/WebPage.cpp:
786         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
787         (BlackBerry::WebKit::WebPagePrivate::drawLayersOnCommit):
788         (BlackBerry::WebKit::WebPagePrivate::setCompositor):
789         (BlackBerry::WebKit::WebPagePrivate::setRootLayerCompositingThread):
790         (BlackBerry::WebKit::WebPagePrivate::createCompositor):
791         (BlackBerry::WebKit::WebPagePrivate::destroyCompositor):
792         * Api/WebPage.h:
793         * Api/WebPageCompositor.cpp:
794         (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
795         (BlackBerry::WebKit::WebPageCompositorPrivate::setContext):
796         (BlackBerry::WebKit::WebPageCompositorPrivate::hardwareCompositing):
797         (BlackBerry::WebKit::WebPageCompositorPrivate::setRootLayer):
798         (BlackBerry::WebKit::WebPageCompositorPrivate::render):
799         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
800         (BlackBerry::WebKit::WebPageCompositorPrivate::animationTimerFired):
801         (BlackBerry::WebKit::WebPageCompositorPrivate::compositorDestroyed):
802         (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor):
803         (BlackBerry::WebKit::WebPageCompositor::~WebPageCompositor):
804         (BlackBerry::WebKit::WebPageCompositor::client):
805         (BlackBerry::WebKit::WebPageCompositor::prepareFrame):
806         (BlackBerry::WebKit::WebPageCompositor::render):
807         (BlackBerry::WebKit::WebPageCompositor::cleanup):
808         (BlackBerry::WebKit::WebPageCompositor::contextLost):
809         * Api/WebPageCompositor.h: Added.
810         * Api/WebPageCompositorClient.h: Added.
811         * Api/WebPageCompositor_p.h:
812         (BlackBerry::WebKit::WebPageCompositorPrivate::create):
813         (BlackBerry::WebKit::WebPageCompositorPrivate::context):
814         (BlackBerry::WebKit::WebPageCompositorPrivate::animationFrameTimestamp):
815         (BlackBerry::WebKit::WebPageCompositorPrivate::page):
816         (BlackBerry::WebKit::WebPageCompositorPrivate::client):
817         * Api/WebPage_p.h:
818         (BlackBerry::WebKit::WebPagePrivate::client):
819         (BlackBerry::WebKit::WebPagePrivate::isAcceleratedCompositingActive):
820         (BlackBerry::WebKit::WebPagePrivate::compositor):
821
822 2012-03-22  Charles Wei  <charles.wei@torchmobile.com.cn>
823
824         [BlackBerry] Need to store the meta info of a page in the ViewState of the history
825         https://bugs.webkit.org/show_bug.cgi?id=82000
826
827         Reviewed by Rob Buis.
828
829         Internally reviewed by George Staikos.
830
831         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
832         (WebCore::FrameLoaderClientBlackBerry::saveViewStateToItem):
833         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
834
835 2012-03-22  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
836
837         [BlackBerry] add interface clearCredentials() and clearNeverRememberSites()
838         https://bugs.webkit.org/show_bug.cgi?id=81887
839
840         Reviewed by Rob Buis.
841
842         Added two interface functions clearCredentials() and
843         clearNeverRememberSites() into class WebPage, which
844         should be used by UI to clear the stored credential
845         information and never remember sites.
846         Also implemented the corresponding functions in class
847         CredentialManager to call CredentialBackingStore
848         to perform the actual clear table work.
849
850         * Api/WebPage.cpp:
851         (BlackBerry::WebKit::WebPage::clearCredentials):
852         (WebKit):
853         (BlackBerry::WebKit::WebPage::clearNeverRememberSites):
854         * Api/WebPage.h:
855         * WebCoreSupport/CredentialManager.cpp:
856         (WebCore::CredentialManager::clearCredentials):
857         (WebCore):
858         (WebCore::CredentialManager::clearNeverRememberSites):
859         * WebCoreSupport/CredentialManager.h:
860         (CredentialManager):
861
862 2012-03-22  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
863
864         [BlackBerry] http authenticate dialog popup only once no matter authentication pass or fail
865         https://bugs.webkit.org/show_bug.cgi?id=80135
866
867         Reviewed by Rob Buis.
868
869         Modified the interface function authenticationChallenge() in
870         class WebPagePrivate by returning a bool to indicate if user
871         pressed Ok button or not, and moved the Credential from return
872         value to the reference parameter.
873         Also updated the corresponding interface functions in class
874         WebPageClient.
875
876         * Api/WebPage.cpp:
877         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
878         * Api/WebPageClient.h:
879         * Api/WebPage_p.h:
880         (WebPagePrivate):
881
882 2012-03-22  Mike Lattanzio  <mlattanzio@rim.com>
883
884         [BlackBerry] DeviceDPI Scaling is broken on mobile.
885         https://bugs.webkit.org/show_bug.cgi?id=81966
886
887         Fix our viewport argument handling to only override the
888         targetDensityDpi on tablet devices. Allow WebCore to use
889         dpi scaling for smaller screen mobile devices.
890
891         Reviewed by Rob Buis.
892
893         * Api/WebPage.cpp:
894         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
895
896 2012-03-22  Mike Fenton  <mifenton@rim.com>
897
898         [BlackBerry] Add pattern matching for hexadecimal type input fields
899         https://bugs.webkit.org/show_bug.cgi?id=81944
900
901         Reviewed by Rob Buis.
902
903         PR 98504.
904
905         Add mapping of patterns matching hexadecimal input
906         to a specialized type and provide input styling based
907         on that format.
908
909         Reviewed Internally by Gen Mak.
910
911         * WebKitSupport/DOMSupport.cpp:
912         (BlackBerry::WebKit::DOMSupport::elementPatternIndicatesHexadecimal):
913         (DOMSupport):
914         * WebKitSupport/DOMSupport.h:
915         * WebKitSupport/InputHandler.cpp:
916         (BlackBerry::WebKit::convertInputType):
917         (BlackBerry::WebKit::inputStyle):
918
919 2012-03-22  Mike Fenton  <mifenton@rim.com>
920
921         [BlackBerry] DOMSupport isPositionInNode should have early returns for null nodes
922         https://bugs.webkit.org/show_bug.cgi?id=81929
923
924         Reviewed by Rob Buis.
925
926         Make suggested style clean up and move int offset = 0 directly
927         above is actual usage.
928
929         * WebKitSupport/DOMSupport.cpp:
930         (BlackBerry::WebKit::DOMSupport::isPositionInNode):
931
932 2012-03-22  Mike Fenton  <mifenton@rim.com>
933
934         [BlackBerry] DOMSupport isPositionInNode should have early returns for null nodes
935         https://bugs.webkit.org/show_bug.cgi?id=81929
936
937         Reviewed by Rob Buis.
938
939         Add early returns in isPositionInNode when either
940         node or the position node is null.
941
942         * WebKitSupport/DOMSupport.cpp:
943         (BlackBerry::WebKit::DOMSupport::isPositionInNode):
944
945 2012-03-21  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
946
947         [BlackBerry] Credential save and autofill implemetation
948         https://bugs.webkit.org/show_bug.cgi?id=80401
949
950         Reviewed by Rob Buis.
951
952         This patch is intended to implement the credential persist
953         and autofill feature for BlackBerry porting.
954
955         Moved interface authenticationChallenge() from class
956         FrameLoaderClientBlackBerry to WebPagePrivate (derived from
957         PageClientBlackBerry as changes made in its parent interface class);
958         Implemented notifyShouldSaveCredential() in WebPagePrivate
959         and WebPageClient as well.
960         Added credentialManager() to retrive CredentialManager instance
961         as a global singleton; removed its m_frameLoaderClient which is
962         replaced with a passed in PageClientBlackBerry pointer, and modified
963         the interface function accordingly.
964
965         For the http authentication, autofill the input dialog in
966         function authenticationChallenge() and save the credential
967         information in the same function;
968         For the in-form authentication, autofill the username and
969         password input fields in function dispatchDidFinishLoad(),
970         and save the credential information in function
971         dispatchWillSubmitForm() or dispatchWillSendSubmitEvent().
972
973         * Api/WebPage.cpp:
974         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
975         (WebKit):
976         (BlackBerry::WebKit::WebPagePrivate::notifyShouldSaveCredential):
977         * Api/WebPageClient.h:
978         * Api/WebPage_p.h:
979         (WebPagePrivate):
980         * WebCoreSupport/CredentialManager.cpp:
981         (WebCore::credentialManager):
982         (WebCore::CredentialManager::saveCredentialIfConfirmed):
983         * WebCoreSupport/CredentialManager.h:
984         (CredentialManager):
985         (WebCore::CredentialManager::CredentialManager):
986         (WebCore):
987         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
988         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFinishLoad):
989         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSubmitForm):
990         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendSubmitEvent):
991         (WebCore):
992         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
993         (FrameLoaderClientBlackBerry):
994
995 2012-03-20  Jacky Jiang  <zhajiang@rim.com>
996
997         [BlackBerry] Dijit crash WebCore::CookieManager::getRawCookies
998         https://bugs.webkit.org/show_bug.cgi?id=81686
999
1000         Reviewed by Rob Buis.
1001
1002         When deciding the policy for navigation action, if the url of the
1003         request is null, ignore it to avoid the ASSERT failure in
1004         MainResourceLoader::willSendRequest.
1005
1006         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1007         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction):
1008
1009 2012-03-20  Konrad Piascik  <kpiascik@rim.com>
1010
1011         [BlackBerry] BlackBerry can clear cookies and cache from the Web Inspector
1012         https://bugs.webkit.org/show_bug.cgi?id=81670
1013
1014         Reviewed by Rob Buis.
1015
1016         * WebCoreSupport/InspectorClientBlackBerry.h:
1017         (WebCore::InspectorClientBlackBerry::canClearBrowserCache):
1018         (WebCore::InspectorClientBlackBerry::canClearBrowserCookies):
1019
1020 2012-03-20  Nima Ghanavatian  <nghanavatian@rim.com>
1021
1022         [BlackBerry] Removing doubly defined methods in BackingStore.cpp
1023         https://bugs.webkit.org/show_bug.cgi?id=81664
1024
1025         Reviewed by Rob Buis.
1026
1027         * Api/BackingStore.cpp:
1028         (BlackBerry::WebKit::BackingStorePrivate::drawAndBlendLayersForDirectRendering):
1029
1030 2012-03-20  Mike Fenton  <mifenton@rim.com>
1031
1032         [BlackBerry] Crash when dragging the FCC caret over an invalid node.
1033         https://bugs.webkit.org/show_bug.cgi?id=81654
1034
1035         Reviewed by Rob Buis.
1036
1037         PR 144505.
1038
1039         The position did not have a valid container node and was causing
1040         a crash.  Validate the node pointer before using it.
1041
1042         * WebKitSupport/DOMSupport.cpp:
1043         (BlackBerry::WebKit::DOMSupport::DOMContainerNodeForPosition):
1044
1045 2012-03-20  Jason Liu  <jason.liu@torchmobile.com.cn>
1046
1047         [BlackBerry]Cookies shouldn't be set into each of webcore's request and platform's request. And this makes a regression.
1048         https://bugs.webkit.org/show_bug.cgi?id=80800
1049
1050         Reviewed by George Staikos.
1051
1052         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1053         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction):
1054         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendRequest):
1055         (WebCore::FrameLoaderClientBlackBerry::decidePolicyForExternalLoad):
1056
1057 2012-03-19  Adam Barth  <abarth@webkit.org>
1058
1059         Remove support for "magic" iframe
1060         https://bugs.webkit.org/show_bug.cgi?id=81590
1061
1062         Reviewed by Eric Seidel.
1063
1064         Remove FrameLoaderClient methods that no longer exist.
1065
1066         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1067         (WebCore):
1068         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
1069         (FrameLoaderClientBlackBerry):
1070         (WebCore::FrameLoaderClientBlackBerry::didDetectXSS):
1071
1072 2012-03-19  Tyler Abbott  <tabbott@rim.com>
1073
1074         [BlackBerry] speed up text selection for large selections
1075         https://bugs.webkit.org/show_bug.cgi?id=81536
1076
1077         When selecting large disjoint areas of text the cost
1078         of calculating the IntRectRegion union becomes very
1079         expensive. Simply placing all of the text quads into
1080         the IntRectRegion is faster despite the larger memory
1081         footprint and the additional calculations at render
1082         time.
1083
1084         Reviewed by Rob Buis.
1085
1086         * WebKitSupport/SelectionHandler.cpp:
1087         (BlackBerry::WebKit::SelectionHandler::getConsolidatedRegionOfTextQuadsForSelection):
1088
1089 2012-03-19  Mike Lattanzio  <mlattanzio@rim.com>
1090
1091         [BlackBerry] Use BlackBerry::Platform::DeviceInfo to generate UserAgent
1092         https://bugs.webkit.org/show_bug.cgi?id=81269
1093
1094         Generate the UserAgent lazily, using it as the default for the
1095         WebSettings object. BlackBerry::Platform::DeviceInfo is used
1096         to ensure the information is accurate to the specific device.
1097
1098         Remove the !isEmpty() assert when fetching the UA from the
1099         WebSettings object, as it will now always be properly initialized.
1100
1101         Add a static initializer block to ensure defaultUserAgent() is
1102         thread-safe from that moment onward.
1103
1104         Reviewed by Rob Buis.
1105
1106         * Api/WebPage.cpp:
1107         (WebKit):
1108         (BlackBerry::WebKit::WebPagePrivate::init):
1109         (BlackBerry::WebKit::WebPagePrivate::defaultUserAgent):
1110         * Api/WebPage_p.h:
1111         (WebPagePrivate):
1112         * Api/WebSettings.cpp:
1113         (BlackBerry::WebKit::WebSettings::setUserAgentString):
1114         * Api/WebSettings.h:
1115
1116 2012-03-19  Mike Fenton  <mifenton@rim.com>
1117
1118         [BlackBerry] Input fields with id of e-mail and url should be styled as such.
1119         https://bugs.webkit.org/show_bug.cgi?id=81364
1120
1121         Reviewed by Rob Buis.
1122
1123         Be less aggressive on matching url, and update as suggested by Rob.
1124
1125         * WebKitSupport/DOMSupport.cpp:
1126         (BlackBerry::WebKit::DOMSupport::matchesReservedStringUrl):
1127         * WebKitSupport/InputHandler.cpp:
1128         (BlackBerry::WebKit::inputStyle):
1129
1130 2012-03-19  Arvid Nilsson  <anilsson@rim.com>
1131
1132         [BlackBerry] Remove obsolete optimization in WebPageCompositorPrivate
1133         https://bugs.webkit.org/show_bug.cgi?id=81115
1134
1135         Reviewed by Benjamin Poulain.
1136
1137         The compositor tried to avoid rendering the same stuff twice, using a
1138         mechanism that didn't work properly and has been redundant since we
1139         introduced deferred blits. Remove this code.
1140
1141         Reviewed internally by Robin Cao.
1142
1143         * Api/WebPageCompositor.cpp:
1144         (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
1145         (BlackBerry::WebKit::WebPageCompositorPrivate::commit):
1146         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
1147         * Api/WebPageCompositor_p.h:
1148
1149 2012-03-17  Charles Wei  <charles.wei@torchmobile.com.cn>
1150
1151         [BlackBerry] Enable Web Timing for performance profiling and improvement.
1152         https://bugs.webkit.org/show_bug.cgi?id=81085
1153
1154         Reviewed by Rob Buis.
1155
1156         * Api/WebPage.cpp:
1157         (BlackBerry::WebKit::WebPagePrivate::init):
1158
1159 2012-03-16  Arvid Nilsson  <anilsson@rim.com>
1160
1161         [BlackBerry] Rename the existing WebPageCompositor class to WebPageCompositorPrivate
1162         https://bugs.webkit.org/show_bug.cgi?id=81108
1163         RIM PR: 136687
1164
1165         Reviewed by Rob Buis.
1166
1167         This is done in anticipation of a new WebPageCompositor class in the
1168         public API. The existing internal class will serve to d-pointerize the
1169         new public API. In addition, it is and will be possible to create only
1170         the private class, for cases where existing code paths require
1171         OpenGL compositing (i.e. due to accelerated compositing layers being
1172         added to the page).
1173
1174         Reviewed internally by Robin Cao.
1175
1176         * Api/BackingStore.h:
1177         * Api/WebPage.cpp:
1178         (BlackBerry::WebKit::WebPagePrivate::setIsAcceleratedCompositingActive):
1179         * Api/WebPageCompositor.cpp: Renamed from Source/WebKit/blackberry/WebKitSupport/WebPageCompositor.cpp.
1180         (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
1181         (BlackBerry::WebKit::WebPageCompositorPrivate::~WebPageCompositorPrivate):
1182         (BlackBerry::WebKit::WebPageCompositorPrivate::hardwareCompositing):
1183         (BlackBerry::WebKit::WebPageCompositorPrivate::setRootLayer):
1184         (BlackBerry::WebKit::WebPageCompositorPrivate::setBackingStoreUsesOpenGL):
1185         (BlackBerry::WebKit::WebPageCompositorPrivate::commit):
1186         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
1187         (BlackBerry::WebKit::WebPageCompositorPrivate::releaseLayerResources):
1188         (BlackBerry::WebKit::WebPageCompositorPrivate::animationTimerFired):
1189         * Api/WebPageCompositor_p.h: Renamed from Source/WebKit/blackberry/WebKitSupport/WebPageCompositor.h.
1190         (BlackBerry::WebKit::WebPageCompositorPrivate::layoutRectForCompositing):
1191         (BlackBerry::WebKit::WebPageCompositorPrivate::setLayoutRectForCompositing):
1192         (BlackBerry::WebKit::WebPageCompositorPrivate::contentsSizeForCompositing):
1193         (BlackBerry::WebKit::WebPageCompositorPrivate::setContentsSizeForCompositing):
1194         (BlackBerry::WebKit::WebPageCompositorPrivate::lastCompositingResults):
1195         (BlackBerry::WebKit::WebPageCompositorPrivate::setLastCompositingResults):
1196         * Api/WebPage_p.h:
1197         * CMakeListsBlackBerry.txt:
1198
1199 2012-03-16  Nima Ghanavatian  <nghanavatian@rim.com>
1200
1201         [BlackBerry] Syncing up left over bits in WebKitSupport from our local branch to upstream
1202         https://bugs.webkit.org/show_bug.cgi?id=81118
1203
1204         Reviewed by Rob Buis.
1205
1206         This is a consolidation of various changes that are in our local dev branch
1207         but do not appear in our upstreamed port.
1208
1209         * WebKitSupport/DumpRenderTreeSupport.cpp:
1210         (DumpRenderTreeSupport::computedStyleIncludingVisitedInfo):
1211         * WebKitSupport/FatFingers.cpp:
1212         (BlackBerry::WebKit::FatFingers::isElementClickable):
1213         * WebKitSupport/InputHandler.cpp:
1214         (BlackBerry::WebKit::InputHandler::spannableTextInRange):
1215         * WebKitSupport/SurfacePool.cpp:
1216         (BlackBerry::WebKit::SurfacePool::createBuffers):
1217         (BlackBerry::WebKit::SurfacePool::releaseBuffers):
1218         * WebKitSupport/TouchEventHandler.cpp:
1219         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
1220         (BlackBerry::WebKit::TouchEventHandler::handleFatFingerPressed):
1221         * WebKitSupport/WebPageCompositor.cpp:
1222         (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor):
1223         * WebKitSupport/WebPageCompositor.h:
1224         (WebPageCompositor):
1225
1226 2012-03-16  Nima Ghanavatian  <nghanavatian@rim.com>
1227
1228         [BlackBerry] Syncing up left over bits in WebCoreSupport from our local branch to upstream
1229         https://bugs.webkit.org/show_bug.cgi?id=81120
1230
1231         Reviewed by Rob Buis.
1232
1233         This is a consolidation of various changes that are in our local dev branch
1234         but do not appear in our upstreamed port.
1235
1236         * WebCoreSupport/AboutDataEnableFeatures.in:
1237         * WebCoreSupport/AboutDataHaveFeatures.in:
1238         * WebCoreSupport/AboutDataUseFeatures.in:
1239         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1240         (WebCore::ChromeClientBlackBerry::hasOpenedPopup):
1241         (WebCore):
1242         (WebCore::ChromeClientBlackBerry::screenToRootView):
1243         (WebCore::ChromeClientBlackBerry::rootViewToScreen):
1244         (WebCore::ChromeClientBlackBerry::invalidateRootView):
1245         (WebCore::ChromeClientBlackBerry::invalidateContentsAndRootView):
1246         (WebCore::ChromeClientBlackBerry::invalidateContentsForSlowScroll):
1247         (WebCore::ChromeClientBlackBerry::scrollableAreasDidChange):
1248         (WebCore::ChromeClientBlackBerry::createColorChooser):
1249         * WebCoreSupport/ChromeClientBlackBerry.h:
1250         (ChromeClientBlackBerry):
1251         (WebCore::ChromeClientBlackBerry::numTouchEventHandlersChanged):
1252         * WebCoreSupport/EditorClientBlackBerry.cpp:
1253         (WebCore::EditorClientBlackBerry::registerUndoStep):
1254         (WebCore::EditorClientBlackBerry::registerRedoStep):
1255         (WebCore::EditorClientBlackBerry::undo):
1256         (WebCore::EditorClientBlackBerry::redo):
1257         * WebCoreSupport/EditorClientBlackBerry.h:
1258         (EditorClientBlackBerry):
1259         * WebCoreSupport/GeolocationControllerClientBlackBerry.cpp:
1260         (GeolocationControllerClientBlackBerry::requestPermission):
1261         (GeolocationControllerClientBlackBerry::cancelPermissionRequest):
1262         * WebCoreSupport/GeolocationControllerClientBlackBerry.h:
1263         * WebCoreSupport/InspectorClientBlackBerry.cpp:
1264         (WebCore::InspectorClientBlackBerry::closeInspectorFrontend):
1265         (WebCore):
1266         (WebCore::InspectorClientBlackBerry::bringFrontendToFront):
1267         * WebCoreSupport/InspectorClientBlackBerry.h:
1268         (InspectorClientBlackBerry):
1269         * WebCoreSupport/NotificationPresenterImpl.cpp:
1270         (WebCore::NotificationPresenterImpl::show):
1271
1272 2012-03-16  Mike Fenton  <mifenton@rim.com>
1273
1274         [BlackBerry] Input fields with id of e-mail and url should be styled as such.
1275         https://bugs.webkit.org/show_bug.cgi?id=81364
1276
1277         Reviewed by Rob Buis.
1278
1279         Treat fields that have name/id's that match url or
1280         email as url or email fields providing the appropriate
1281         keyboard.
1282
1283         PR 137259.
1284
1285         Reviewed Internally by Gen Mak and Nima Ghanavatian.
1286
1287         * WebKitSupport/DOMSupport.cpp:
1288         (BlackBerry::WebKit::DOMSupport::matchesReservedStringEmail):
1289         (DOMSupport):
1290         (BlackBerry::WebKit::DOMSupport::matchesReservedStringUrl):
1291         (BlackBerry::WebKit::DOMSupport::elementIdOrNameIndicatesEmail):
1292         (BlackBerry::WebKit::DOMSupport::elementIdOrNameIndicatesUrl):
1293         (BlackBerry::WebKit::DOMSupport::matchesReservedStringPreventingAutocomplete):
1294         * WebKitSupport/DOMSupport.h:
1295         (WebCore):
1296         * WebKitSupport/InputHandler.cpp:
1297         (BlackBerry::WebKit::convertInputType):
1298         (BlackBerry::WebKit::inputStyle):
1299
1300 2012-03-16  Nima Ghanavatian  <nghanavatian@rim.com>
1301
1302         [BlackBerry] Syncing up left over bits in Api from our local branch to upstream
1303         https://bugs.webkit.org/show_bug.cgi?id=81105
1304
1305         Reviewed by Rob Buis.
1306
1307         This patches fixes up a previous sync done in this directory and adds some new bits
1308         as well.  This is accurate as of ddea1528b37b29925638fe1183318b3c3994f1f8 in our
1309         local repo.
1310
1311         * Api/BackingStore.cpp:
1312         (BlackBerry::WebKit::BackingStorePrivate::drawAndBlendLayersForDirectRendering):
1313         (WebKit):
1314         (BlackBerry::WebKit::BackingStorePrivate::drawLayersOnCommitIfNeeded):
1315         * Api/WebPage.cpp:
1316         (BlackBerry::WebKit::WebPagePrivate::webContext):
1317         (BlackBerry::WebKit::WebPage::webContext):
1318         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
1319         * Api/WebPage.h:
1320         * Api/WebPage_p.h:
1321         (WebPagePrivate):
1322
1323 2012-03-16  Mike Fenton  <mifenton@rim.com>
1324
1325         [BlackBerry] Input processing mode should be cancelled when processing hot keys
1326         https://bugs.webkit.org/show_bug.cgi?id=81348
1327
1328         Reviewed by Rob Buis.
1329
1330         Don't suppress IMF notifications if we are handling
1331         the event as a hotkey.
1332
1333         Reviewed Internally by Nima Ghanavatian.
1334
1335         * WebCoreSupport/EditorClientBlackBerry.cpp:
1336         (WebCore::EditorClientBlackBerry::handleKeyboardEvent):
1337
1338 2012-03-16  Robin Cao  <robin.cao@torchmobile.com.cn>
1339
1340         [BlackBerry] Can not open certain links from bridge applications
1341         https://bugs.webkit.org/show_bug.cgi?id=81197
1342
1343         Reviewed by Rob Buis.
1344
1345         Currently, the engine asks the client to handle some type of requests externally.
1346         But WebPageClient::handleStringPattern is not yet implemented and exposed to
1347         the client. Before that, we still need to give the client a chance to decide
1348         how to handle requests such as 'mailto:'.
1349
1350         To address this problem, r108763 introduced a change that ask the client to
1351         decide how to handle the navigation in dispatchDecidePolicyForNewWindowAction().
1352         This is not intuitive and will bring troubles, because this navigation will
1353         happen in the new page. So the new page client is to decide how to handle
1354         the navigation, not the old one.
1355
1356         This patch reverts r108763 and skips calling WebPageClient::handleStringPattern
1357         since it's not implemented.
1358
1359         This way the new window action will continue, and the logic in
1360         dispatchDecidePolicyForNavigationAction() will handle the navigation correctly.
1361
1362         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1363         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNewWindowAction):
1364         (WebCore::FrameLoaderClientBlackBerry::decidePolicyForExternalLoad):
1365
1366 2012-03-16  Leo Yang  <leo.yang@torchmobile.com.cn>
1367
1368         [BlackBerry] Crash when going back from an xhtml document containing <img>
1369         https://bugs.webkit.org/show_bug.cgi?id=81297
1370
1371         Reviewed by Rob Buis.
1372
1373         This is manually reverting the offending internal commit which checked-in before upstreaming.
1374
1375         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1376         (WebCore::FrameLoaderClientBlackBerry::canCachePage):
1377
1378 2012-03-16  Genevieve Mak  <gmak@rim.com>
1379
1380         [BlackBerry] viewportRect has changed to viewportSize
1381         https://bugs.webkit.org/show_bug.cgi?id=81262
1382
1383         Reviewed by Antonio Gomes.
1384
1385         Set size instead of rect in constructor.
1386         * WebKitSupport/InRegionScrollableArea.cpp:
1387         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
1388
1389 2012-03-16  Andrew Lo  <anlo@rim.com>
1390
1391         [BlackBerry] Enable PAGE_VISIBILITY_API
1392         https://bugs.webkit.org/show_bug.cgi?id=81257
1393
1394         Set Page visibility state for BlackBerry port.
1395
1396         Reviewed by Rob Buis.
1397
1398         * Api/WebPage.cpp:
1399         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
1400         (WebKit):
1401         (BlackBerry::WebKit::WebPagePrivate::setPageVisibilityState):
1402         (BlackBerry::WebKit::WebPagePrivate::setVisible):
1403         (BlackBerry::WebKit::WebPage::setVisible):
1404         (BlackBerry::WebKit::WebPagePrivate::notifyAppActivationStateChange):
1405         (BlackBerry::WebKit::WebPage::notifyAppActivationStateChange):
1406         * Api/WebPage_p.h:
1407         (WebPagePrivate):
1408
1409 2012-03-14  Arvid Nilsson  <anilsson@rim.com>
1410
1411         [BlackBerry] Make sure WebPage and BackingStore don't crash without a Window
1412         https://bugs.webkit.org/show_bug.cgi?id=81099
1413
1414         Reviewed by Rob Buis.
1415
1416         Also rename the "compositing/blitting to main window" variables to
1417         instead refer to OpenGL compositing. The code paths it triggers are
1418         related to the BackingStore using OpenGL compositing, and can be useful
1419         even when there's no window.
1420
1421         * Api/BackingStore.cpp:
1422         (BlackBerry::WebKit::BackingStorePrivate::isOpenGLCompositing):
1423         (BlackBerry::WebKit::BackingStorePrivate::render):
1424         (BlackBerry::WebKit::BackingStorePrivate::copyPreviousContentsToBackSurfaceOfWindow):
1425         (BlackBerry::WebKit::BackingStorePrivate::paintDefaultBackground):
1426         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
1427         (BlackBerry::WebKit::BackingStorePrivate::blitTileRect):
1428         (BlackBerry::WebKit::BackingStorePrivate::blendCompositingSurface):
1429         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
1430         (BlackBerry::WebKit::BackingStorePrivate::blitToWindow):
1431         (BlackBerry::WebKit::BackingStorePrivate::checkerWindow):
1432         (BlackBerry::WebKit::BackingStorePrivate::invalidateWindow):
1433         (BlackBerry::WebKit::BackingStorePrivate::clearWindow):
1434         (BlackBerry::WebKit::BackingStorePrivate::drawSubLayers):
1435         (BlackBerry::WebKit::BackingStorePrivate::surfaceSize):
1436         (BlackBerry::WebKit::BackingStorePrivate::buffer):
1437         * Api/BackingStore_p.h:
1438         * Api/WebPage.cpp:
1439         (BlackBerry::WebKit::WebPagePrivate::didPluginEnterFullScreen):
1440         (BlackBerry::WebKit::WebPagePrivate::didPluginExitFullScreen):
1441         (BlackBerry::WebKit::WebPagePrivate::drawLayersOnCommit):
1442         (BlackBerry::WebKit::WebPagePrivate::drawSubLayers):
1443         (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
1444         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1445         (WebCore::ChromeClientBlackBerry::windowRect):
1446         (WebCore::ChromeClientBlackBerry::screenToWindow):
1447         (WebCore::ChromeClientBlackBerry::windowToScreen):
1448         * WebKitSupport/GLES2Context.cpp:
1449         (BlackBerry::WebKit::GLES2Context::GLES2Context):
1450         * WebKitSupport/TouchEventHandler.h:
1451         * WebKitSupport/WebPageCompositor.cpp:
1452         (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor):
1453         (BlackBerry::WebKit::WebPageCompositor::setBackingStoreUsesOpenGL):
1454         (BlackBerry::WebKit::WebPageCompositor::drawLayers):
1455         * WebKitSupport/WebPageCompositor.h:
1456
1457 2012-03-13  Jon Lee  <jonlee@apple.com>
1458
1459         Separate NOTIFICATIONS and LEGACY_NOTIFICATIONS
1460         https://bugs.webkit.org/show_bug.cgi?id=80922
1461         <rdar://problem/11035082>
1462
1463         Reviewed by Jian Li.
1464
1465         You can include either NOTIFICATIONS or LEGACY_NOTIFICATIONS and have a complete API.
1466         LEGACY_NOTIFICATIONS should cover all of the previous functionality, and NOTIFICATIONS will cover the
1467         new API. Therefore, APIs that are common between the two will have:
1468         #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
1469
1470         This patch initially sets both to be exactly the same. As other bugs with patches begin to migrate to
1471         the new API, the defines will begin to split. This allows ports to decide which set of APIs to include.
1472
1473         Update everything to be #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
1474         * Api/WebPage.cpp:
1475         (BlackBerry::WebKit::WebPagePrivate::init):
1476         * WebCoreSupport/NotificationPresenterImpl.cpp:
1477         * WebCoreSupport/NotificationPresenterImpl.h:
1478
1479 2012-03-14  Nima Ghanavatian  <nghanavatian@rim.com>
1480
1481         [BlackBerry] Syncing up left over bits in Api from our local branch to upstream
1482         https://bugs.webkit.org/show_bug.cgi?id=81105
1483
1484         Reviewed by Rob Buis.
1485
1486         * Api/BackingStore.cpp:
1487         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
1488         (BlackBerry::WebKit::BackingStorePrivate::isActive):
1489         (BlackBerry::WebKit::BackingStore::createBackingStoreMemory):
1490         (WebKit):
1491         (BlackBerry::WebKit::BackingStore::releaseBackingStoreMemory):
1492         * Api/BackingStore.h:
1493         * Api/WebPage.cpp:
1494         (BlackBerry::WebKit::toWebCoreMouseEventType):
1495         (BlackBerry::WebKit::WebPagePrivate::init):
1496         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
1497         (BlackBerry::WebKit::WebPagePrivate::activeNodeContext):
1498         (BlackBerry::WebKit::WebPage::activeNodeContext):
1499         (BlackBerry::WebKit::WebPagePrivate::updateCursor):
1500         (BlackBerry::WebKit::WebPagePrivate::contextNode):
1501         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
1502         * Api/WebPage.h:
1503         * Api/WebPage_p.h:
1504         (WebPagePrivate):
1505
1506 2012-03-14  Andrew Lo  <anlo@rim.com>
1507
1508         [BlackBerry] Implement REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR using AnimationFrameRateController
1509         https://bugs.webkit.org/show_bug.cgi?id=81000
1510
1511         Set the platform display ID, needed for DisplayRefreshMonitor.
1512
1513         Reviewed by Antonio Gomes.
1514
1515         * Api/WebPage.cpp:
1516         (BlackBerry::WebKit::WebPagePrivate::init):
1517
1518 2012-03-14  Leo Yang  <leo.yang@torchmobile.com.cn>
1519
1520         [BlackBerry] Upstream the BlackBerry change to platform/Cursor.h
1521         https://bugs.webkit.org/show_bug.cgi?id=81086
1522
1523         Reviewed by Rob Buis.
1524
1525         There was an alias named PlatformCursorHandle for PlatformCursor
1526         in the internal version of Cursor.h. But it's not necessary so it's
1527         not included in the upstreaming version of Cursor.h. As a result,
1528         use PlatformCursor directly.
1529
1530         * Api/WebPage.cpp:
1531         (BlackBerry::WebKit::WebPagePrivate::setCursor):
1532         * Api/WebPage_p.h:
1533         (WebPagePrivate):
1534
1535 2012-03-13  Mike Fenton  <mifenton@rim.com>
1536
1537         [BlackBerry] Input focus state should unfocus the frame selection instead of the field.
1538         https://bugs.webkit.org/show_bug.cgi?id=81023
1539
1540         Reviewed by Antonio Gomes.
1541
1542         PR 137400.
1543
1544         Prevent cursor drawing by unfocusing the frame selection
1545         when input mode is not ready.
1546
1547         Greatly simplify the decision to focus input fields by removing
1548         all ties to the page load state and base it on input.  Input mode
1549         is disabled when a page load begins and enabled on any user input.
1550
1551         The field is focused and ready for input immediately, only the
1552         frame selection (or cursor) is unfocused.
1553
1554         Reviewed Internally by Gen Mak, Antonio Gomes and Nima Ghanavatian.
1555
1556         * Api/WebPage.cpp:
1557         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
1558         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
1559         * Api/WebPageClient.h:
1560         * WebCoreSupport/EditorClientBlackBerry.cpp:
1561         (WebCore::EditorClientBlackBerry::shouldBeginEditing):
1562         * WebKitSupport/InputHandler.cpp:
1563         (BlackBerry::WebKit::InputHandler::InputHandler):
1564         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
1565         (BlackBerry::WebKit::InputHandler::enableInputMode):
1566         (BlackBerry::WebKit::InputHandler::setElementFocused):
1567         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
1568         (BlackBerry::WebKit::InputHandler::notifyClientOfKeyboardVisibilityChange):
1569         (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
1570         (BlackBerry::WebKit::InputHandler::setComposingText):
1571         * WebKitSupport/InputHandler.h:
1572         (InputHandler):
1573         * WebKitSupport/TouchEventHandler.cpp:
1574         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
1575
1576 2012-03-13  Adam Barth  <abarth@webkit.org> && Benjamin Poulain  <bpoulain@apple.com>
1577
1578         Always enable ENABLE(CLIENT_BASED_GEOLOCATION)
1579         https://bugs.webkit.org/show_bug.cgi?id=78853
1580
1581         Reviewed by Adam Barth.
1582
1583         * Api/WebPage.cpp:
1584         (BlackBerry::WebKit::WebPagePrivate::init):
1585         * WebCoreSupport/AboutDataEnableFeatures.in:
1586         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1587         * WebCoreSupport/ChromeClientBlackBerry.h:
1588         (ChromeClientBlackBerry):
1589         * WebKitSupport/DumpRenderTreeSupport.cpp:
1590         (toGeolocationClientMock):
1591         (DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests):
1592         (DumpRenderTreeSupport::resetGeolocationMock):
1593         (DumpRenderTreeSupport::setMockGeolocationError):
1594         (DumpRenderTreeSupport::setMockGeolocationPermission):
1595         (DumpRenderTreeSupport::setMockGeolocationPosition):
1596
1597 2012-03-13  Mike Lattanzio  <mlattanzio@rim.com>
1598
1599         Remove ActiveNodeContext in favour of BlackBerry::Platform::WebContext
1600         https://bugs.webkit.org/show_bug.cgi?id=80984
1601
1602         Remove ActiveNodeContext, and switch the implementation to
1603         provide a BlackBerry::Platform::WebContext. The new object
1604         adds an explicit IsImage flag, as well as IsAudio and IsVideo
1605         for the HTML5 elements.
1606
1607         Note that for many videos both IsVideo and IsAudio will be true,
1608         as videos typically have audio streams as well.
1609
1610         Reviewed by George Staikos.
1611
1612         * Api/ActiveNodeContext.h: Removed.
1613         * Api/WebPage.cpp:
1614         (BlackBerry::WebKit::WebPagePrivate::webContext):
1615         (BlackBerry::WebKit::WebPage::webContext):
1616         * Api/WebPage.h:
1617         * Api/WebPage_p.h:
1618
1619 2012-03-12  Andy Chen  <andchen@rim.com>
1620
1621         [Blackberry] Make the process of marking all matches interruptible and asynchronous for find-in-page
1622         https://bugs.webkit.org/show_bug.cgi?id=80831
1623
1624         Reviewed by Antonio Gomes.
1625
1626         * WebKitSupport/InPageSearchManager.cpp:
1627         (BlackBerry::WebKit::InPageSearchManager::DeferredScopeStringMatches::DeferredScopeStringMatches):
1628         (BlackBerry::WebKit::InPageSearchManager::DeferredScopeStringMatches::doTimeout):
1629         (BlackBerry::WebKit::InPageSearchManager::InPageSearchManager):
1630         (BlackBerry::WebKit::InPageSearchManager::~InPageSearchManager):
1631         (BlackBerry::WebKit::InPageSearchManager::findNextString):
1632         (BlackBerry::WebKit::InPageSearchManager::shouldSearchForText):
1633         (BlackBerry::WebKit::InPageSearchManager::findAndMarkText):
1634         (BlackBerry::WebKit::InPageSearchManager::clearTextMatches):
1635         (BlackBerry::WebKit::InPageSearchManager::frameUnloaded):
1636         (BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):
1637         (BlackBerry::WebKit::InPageSearchManager::scopeStringMatchesSoon):
1638         (BlackBerry::WebKit::InPageSearchManager::callScopeStringMatches):
1639         (BlackBerry::WebKit::InPageSearchManager::cancelPendingScopingEffort):
1640         * WebKitSupport/InPageSearchManager.h:
1641
1642 2012-03-09  Jon Lee  <jonlee@apple.com>
1643
1644         Rename NotificationPresenter to NotificationClient
1645         https://bugs.webkit.org/show_bug.cgi?id=80488
1646         <rdar://problem/10965558>
1647
1648         Reviewed by Kentaro Hara.
1649
1650         Refactor to use renamed WebCore::NotificationClient.
1651         * WebCoreSupport/NotificationPresenterImpl.cpp:
1652         (WebCore::NotificationPresenterImpl::instance):
1653         (WebCore::NotificationPresenterImpl::show):
1654         (WebCore::NotificationPresenterImpl::checkPermission):
1655         * WebCoreSupport/NotificationPresenterImpl.h:
1656         (NotificationPresenterImpl):
1657
1658 2012-03-09  Charles Wei  <charles.wei@torchmobile.com.cn>
1659
1660         [BlackBerry] Web Notification not working after rebase
1661         https://bugs.webkit.org/show_bug.cgi?id=80690
1662
1663         Reviewed by George Staikos.
1664
1665         1. NotificationPresenterImpl should be in namespace WebCore
1666         2. Need to connect NotificationPresenterImpl to webcore the new way:
1667            WebCore::provideNotification(Page*, NotificationPresenter*)
1668         3. Remove the old way of connecting the Notification:
1669            ChromeClientBlackBerry::notificationPresenter()
1670
1671         * Api/WebPage.cpp:
1672         (BlackBerry::WebKit::WebPagePrivate::init):
1673         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1674         (WebCore):
1675         * WebCoreSupport/ChromeClientBlackBerry.h:
1676         (ChromeClientBlackBerry):
1677         * WebCoreSupport/NotificationPresenterImpl.cpp:
1678         * WebCoreSupport/NotificationPresenterImpl.h:
1679
1680 2012-03-08  Mike Fenton  <mifenton@rim.com>
1681
1682         [BlackBerry] Always use the current focused node when processing focus changes
1683         https://bugs.webkit.org/show_bug.cgi?id=80594
1684
1685         Reviewed by Antonio Gomes.
1686
1687         Guard against toRange or fromRange being null when called
1688         as part of a clear event.
1689
1690         * WebCoreSupport/EditorClientBlackBerry.cpp:
1691         (WebCore::EditorClientBlackBerry::shouldChangeSelectedRange):
1692
1693 2012-03-08  Yong Li  <yoli@rim.com>
1694
1695         [BlackBerry] Block file-to-file access by default
1696         https://bugs.webkit.org/show_bug.cgi?id=80605
1697
1698         Reviewed by Rob Buis.
1699
1700         Turn off allowFileAccessFromFileURLs() by default.
1701
1702         * Api/WebPage.cpp:
1703         (BlackBerry::WebKit::WebPagePrivate::init):
1704
1705 2012-03-08  Mike Fenton  <mifenton@rim.com>
1706
1707         [BlackBerry] Always use the current focused node when processing focus changes
1708         https://bugs.webkit.org/show_bug.cgi?id=80594
1709
1710         Reviewed by Antonio Gomes.
1711
1712         Update InputHandler focused node handling to strictly use
1713         the currently focused node.  This prevents a handling loop
1714         when JS is modifying the focus and we get a late notification
1715         of a past change from ChromeClientBlackBerry with the previously
1716         unfocused node.
1717
1718         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1719         (WebCore::ChromeClientBlackBerry::focusedNodeChanged):
1720         * WebCoreSupport/EditorClientBlackBerry.cpp:
1721         (WebCore::EditorClientBlackBerry::shouldChangeSelectedRange):
1722         (WebCore::EditorClientBlackBerry::setInputMethodState):
1723         * WebKitSupport/InputHandler.cpp:
1724         (BlackBerry::WebKit::InputHandler::focusedNodeChanged):
1725         * WebKitSupport/InputHandler.h:
1726
1727 2012-03-07  Jacky Jiang  <zhajiang@rim.com>
1728
1729         [BlackBerry] WebKit rendering problem when show/hide VKB
1730         https://bugs.webkit.org/show_bug.cgi?id=80448
1731         RIM PR: 141727
1732
1733         Reviewed by Antonio Gomes.
1734
1735         When setting viewport size, layout happens inside
1736         WebPagePrivate::setDefaultLayoutSize(), in this way, the layout is
1737         outside of the code path of "needsLayout" so that the contents are
1738         not rendered into the backing store. This is a regression of r108718,
1739         switch back to do the layout inside the public API
1740         WebPage::setDefaultLayoutSize().
1741
1742         We haven't upstreamed the manual tests directory yet, therefore,
1743         the new manual test case will be upstreamed later.
1744
1745         * Api/WebPage.cpp:
1746         (BlackBerry::WebKit::WebPagePrivate::setDefaultLayoutSize):
1747         (BlackBerry::WebKit::WebPage::setDefaultLayoutSize):
1748
1749 2012-03-06  Lianghui Chen  <liachen@rim.com>
1750
1751         [BlackBerry] Set correct ResourceRequest target type.
1752         https://bugs.webkit.org/show_bug.cgi?id=80430
1753
1754         Reviewed by Rob Buis.
1755
1756         Removed unused code in dispatchWillSendRequest(). These codes are too
1757         late as the target type has already been referred to when calling
1758         ResourceRequest::initializePlatformRequest().
1759
1760         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1761         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendRequest):
1762
1763 2012-03-06  Lianghui Chen  <liachen@rim.com>
1764
1765         [BlackBerry] Remove unused and unneeded WebPageClient::downloadRequested(NetworkRequest&)
1766         https://bugs.webkit.org/show_bug.cgi?id=80438
1767
1768         Reviewed by Antonio Gomes.
1769
1770         * Api/WebPageClient.h:
1771
1772 2012-03-06  Jakob Petsovits  <jpetsovits@rim.com>
1773
1774         [BlackBerry] Don't suspend accel comp when backgrounding a page.
1775         https://bugs.webkit.org/show_bug.cgi?id=80369
1776         RIM PR: 137609
1777
1778         Reviewed by Adam Treat.
1779
1780         Just because the page is in the background doesn't mean
1781         it's invisible, doesn't mean it won't have to be redrawn
1782         at some point - on rotation, for instance.
1783
1784         We still suspend accelerated compositing on setVisible(false).
1785
1786         * Api/WebPage.cpp:
1787         (BlackBerry::WebKit::WebPage::notifyPageBackground):
1788         (BlackBerry::WebKit::WebPage::notifyPageForeground):
1789
1790 2012-03-06  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1791
1792         [BlackBerry] function rename issue after MediaPlayerPrivateBlackBerry.[cpp\h] upstream
1793         https://bugs.webkit.org/show_bug.cgi?id=80377
1794
1795         Reviewed by Rob Buis.
1796
1797         As some of the function names changed in class MediaPlayerPrivate
1798         with the upstream of MediaPlayerPrivateBlackBerry.[cpp|h], we
1799         should update WebKit/blackberry/Api/WebPage.cpp which uses these
1800         functions accordingly.
1801         Renamed functions in class MediaPlayerPrivate:
1802         windowGet() -> getWindow()
1803         windowPositionGet() -> getWindowPosition()
1804         mmrContextNameGet() -> mmrContextName()
1805
1806         * Api/WebPage.cpp:
1807         (BlackBerry::WebKit::WebPagePrivate::enterFullscreenForNode):
1808
1809 2012-03-05  Eli Fidler  <efidler@rim.com>
1810
1811         The minimum font size WebSetting should actually change the LOGICAL font size in WebCore.
1812         https://bugs.webkit.org/show_bug.cgi?id=80312
1813         RIM PR: 139874
1814
1815         Reviewed by George Staikos.
1816
1817         * Api/WebPage.cpp:
1818         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
1819
1820 2012-03-05  Jakob Petsovits  <jpetsovits@rim.com>
1821
1822         Make accelerated compositing work again with direct rendering.
1823         https://bugs.webkit.org/show_bug.cgi?id=80181
1824         RIM PR: 139110
1825
1826         Reviewed by Antonio Gomes.
1827         Internally reviewed by Arvid Nilsson.
1828
1829         The significant amount of refactoring and optimization work
1830         that has gone into accelerated compositing missed out on
1831         some of the code paths that are being used in direct rendering.
1832
1833         Animations were relying on blitVisibleContents() only (which
1834         is a no-op in direct rendering mode). There were early returns
1835         which are suitable to determine whether screen contents need
1836         to be updated at all; however, when we're already forcing a
1837         re-render then those checks would cause the composition surface
1838         not to appear at all, or avoid drawing new animation frames.
1839
1840         We went through dispatchMessage(), potentially causing
1841         mismatches between rendered (but not yet posted) back content
1842         and layers composited on top of it. As we're rendering onto
1843         the sole target surface (the window) directly and posting
1844         from the same thread, we have to wait for compositing on the
1845         UI thread to finish before posting the window.
1846
1847         In turn, this patch combines both drawSubLayers() and
1848         blendCompositingSurface() calls into one method, reducing
1849         the number of messages to the UI thread within
1850         renderDirectToWindow() to one.
1851
1852         blendCompositingMessage() in renderDirectToScreen() was called
1853         with contents coordinates rather than viewport coordinates.
1854         That caused some of the composited content to be cut off when
1855         the scroll position wasn't (0, 0).
1856
1857         We called copyPreviousContentsToBackSurfaceOfWindow() twice for
1858         one frame, in both renderDirectToWindow() and invalidateWindow().
1859         Only one of those (the latter one) is necessary.
1860
1861         * Api/BackingStore.cpp:
1862         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
1863         (BlackBerry::WebKit::BackingStorePrivate::renderDirectToWindow):
1864         (BlackBerry::WebKit::BackingStorePrivate::drawSubLayers):
1865         (WebKit):
1866         (BlackBerry::WebKit::BackingStorePrivate::drawAndBlendLayersForDirectRendering):
1867         * Api/BackingStore.h:
1868         (WebKit):
1869         * Api/BackingStore_p.h:
1870         (BackingStorePrivate):
1871         (BlackBerry::WebKit::BackingStorePrivate::isDirectRenderingAnimationMessageScheduled):
1872         (BlackBerry::WebKit::BackingStorePrivate::setDirectRenderingAnimationMessageScheduled):
1873         * Api/WebPage_p.h:
1874         (BlackBerry::WebKit::WebPagePrivate::isAcceleratedCompositingActive):
1875         (WebPagePrivate):
1876         * WebKitSupport/WebPageCompositor.cpp:
1877         (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor):
1878         (BlackBerry::WebKit::WebPageCompositor::~WebPageCompositor):
1879         (BlackBerry::WebKit::WebPageCompositor::drawLayers):
1880         (BlackBerry::WebKit::WebPageCompositor::animationTimerFired):
1881         * WebKitSupport/WebPageCompositor.h:
1882         (WebPageCompositor):
1883
1884 2012-03-05  George Staikos  <gstaikos@rim.com>
1885
1886         [BlackBerry] DOMSupport visibleSelectionForRangeInputElement incorrectly dereferences a null range.
1887         https://bugs.webkit.org/show_bug.cgi?id=80274
1888
1889         Reviewed by Antonio Gomes.
1890
1891         A null range can be returned so we should not blindly deref it.
1892         Reviewed Internally by Mike Fenton.
1893
1894         * WebKitSupport/DOMSupport.cpp:
1895         (BlackBerry::WebKit::DOMSupport::visibleSelectionForRangeInputElement):
1896
1897 2012-03-04  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1898
1899         [BlackBerry] upstream CredentialManager and CredentialTransformData implementation
1900         https://bugs.webkit.org/show_bug.cgi?id=80107
1901
1902         Reviewed by Antonio Gomes.
1903
1904         Initial upstream of CredentialManager.[h|cpp] and
1905         CredentialTransformData.[h|cpp].
1906         No new test.
1907
1908         * WebCoreSupport/CredentialManager.cpp: Added.
1909         (WebCore):
1910         (WebCore::CredentialManager::CredentialManager):
1911         (WebCore::CredentialManager::autofillAuthenticationChallenge):
1912         (WebCore::CredentialManager::autofillPasswordForms):
1913         (WebCore::CredentialManager::saveCredentialIfConfirmed):
1914         * WebCoreSupport/CredentialManager.h: Added.
1915         (WebKit):
1916         (WebCore):
1917         (CredentialManager):
1918         * WebCoreSupport/CredentialTransformData.cpp: Added.
1919         (WebCore::CredentialTransformData::CredentialTransformData):
1920         (WebCore):
1921         (WebCore::CredentialTransformData::url):
1922         (WebCore::CredentialTransformData::credential):
1923         (WebCore::CredentialTransformData::setCredential):
1924         (WebCore::CredentialTransformData::findPasswordFormFields):
1925         * WebCoreSupport/CredentialTransformData.h: Added.
1926         (WebCore):
1927         (CredentialTransformData):
1928         (WebCore::CredentialTransformData::isValid):
1929         (WebCore::CredentialTransformData::protectionSpace):
1930
1931 2012-03-04  Antonio Gomes  <agomes@rim.com>
1932
1933         [BlackBerry] Fixed positioned element not correctly positioned after orientation change, when viewport metatag is used
1934         https://bugs.webkit.org/show_bug.cgi?id=80228
1935         PR #138865
1936
1937         Reviewed by George Staikos.
1938
1939         Viewport size changes in two main scenarios:
1940         - orientation changes;
1941         - virtual keyboard pop up/hide.
1942
1943         When we are setting a new viewport size, we need to
1944         update the FixedReportedSize of the mainframe. This size
1945         is used to return innerWidth|Heigth as well as to calculate
1946         the fixed position elements height relative to the RenderView [1].
1947
1948         [1] RenderBox::containingBlockLogicalHeightForPositioned.
1949
1950         When we are rotating, we need to delay setting the new FixedReportedSize
1951         till we layout and are able to figure out the new contents size. At this
1952         time we call setFixedReportedSize, but we do not reposition the fixed elemts
1953         afterwards.
1954
1955         Patch adds a call to FrameView::repaintFixedElementsAfterScrolling, after
1956         setting the new size.
1957
1958         Source/WebKit/blackberry:
1959         * Api/WebPage.cpp:
1960         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
1961
1962 2012-03-02  Mike Fenton  <mifenton@rim.com>
1963
1964         [BlackBerry] Expose WebInspector state to client and clean up WebSettings
1965         https://bugs.webkit.org/show_bug.cgi?id=80177
1966
1967         Reviewed by Antonio Gomes.
1968
1969         Expose the Web Inspector state to WebPage client's and
1970         re-order initialization of WebSettings to be alphabetical
1971         matching their definitions.
1972
1973         * Api/WebPage.cpp:
1974         (BlackBerry::WebKit::WebPage::isWebInspectorEnabled):
1975         * Api/WebPage.h:
1976         * Api/WebSettings.cpp:
1977         (BlackBerry::WebKit::WebSettings::standardSettings):
1978
1979 2012-03-02  Arvid Nilsson  <anilsson@rim.com>
1980
1981         Accelerated compositing: Checkerboard never goes away
1982         https://bugs.webkit.org/show_bug.cgi?id=79020
1983         RIM PR #134164
1984
1985         Reviewed by Adam Treat.
1986
1987         Checkerboard appears in accelerated compositing layers when there's no
1988         texture for (part of) a layer. The layer renderer queues up some render
1989         jobs and schedules a commit to make the WebKit thread process those
1990         jobs. Render jobs performed during commit cause texture upload jobs to
1991         be scheduled on the UI thread. Texture uploads are performed when next
1992         drawing the layers.
1993
1994         Unfortunately, sometimes commit operation happens without a subsequent
1995         call draw the layers.
1996
1997         In order to implement one-shot drawing sync, I added a call to
1998         commitRootLayerIfNeeded() in BackingStore::renderContents(), and
1999         I was lucky that most of the time, renderContents() is followed by
2000         blit(Visible)Contents() which in turn draws the layers.
2001         However, render is not always followed by a blit, for example when
2002         rendering offscreen tiles in BackingStore::renderOnIdle(), and in
2003         direct rendering mode.
2004
2005         Fixed by making sure that every call to commitRootLayerIfNeeded() that
2006         returns true is followed by a call to drawLayersOnCommit(), unless a
2007         blit was requested already.
2008
2009         Also tweak the logic for one-shot drawing sync to make the code in
2010         drawLayersOnCommit() reusable outside of rootLayerCommitTimerFired().
2011
2012         * Api/BackingStore.cpp:
2013         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
2014         (BlackBerry::WebKit::BackingStorePrivate::renderOnTimer):
2015         (BlackBerry::WebKit::BackingStorePrivate::renderOnIdle):
2016         (BlackBerry::WebKit::BackingStorePrivate::willFireTimer):
2017         (BlackBerry::WebKit::BackingStorePrivate::renderDirectToWindow):
2018         (BlackBerry::WebKit::BackingStorePrivate::render):
2019         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
2020         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
2021         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
2022         (WebKit):
2023         (BlackBerry::WebKit::BackingStorePrivate::drawLayersOnCommitIfNeeded):
2024         * Api/BackingStore_p.h:
2025         (BackingStorePrivate):
2026         (BlackBerry::WebKit::BackingStorePrivate::willDrawLayersOnCommit):
2027
2028 2012-03-02  Adam Treat  <atreat@rim.com>
2029
2030         https://bugs.webkit.org/show_bug.cgi?id=80161
2031         PR: 141157
2032
2033         BlackBerryPlatformScreen.h API has been updated.  Reflect those
2034         changes in our usage.
2035
2036         Reviewed by Antonio Gomes.
2037         Internally reviewed by Jakob Petsovits.
2038
2039         * Api/BackingStore.cpp:
2040         (BlackBerry::WebKit::BackingStorePrivate::tileWidth):
2041         (BlackBerry::WebKit::BackingStorePrivate::tileHeight):
2042         * Api/WebPage.cpp:
2043         (BlackBerry::WebKit::WebPagePrivate::init):
2044         (BlackBerry::WebKit::WebPagePrivate::transformedViewportSize):
2045         (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize):
2046         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
2047         (BlackBerry::WebKit::WebPagePrivate::setDefaultLayoutSize):
2048         (BlackBerry::WebKit::WebPagePrivate::defaultMaxLayoutSize):
2049         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2050         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
2051         * WebKitSupport/SurfacePool.cpp:
2052         (BlackBerry::WebKit::createCompositingSurface):
2053
2054 2012-03-02  Konrad Piascik  <kpiascik@rim.com>
2055
2056         [BlackBerry] Set the devicePixelRatio from the results of computeViewportAttributes
2057         https://bugs.webkit.org/show_bug.cgi?id=80160
2058
2059         Reviewed by Antonio Gomes.
2060
2061         Tested by going to layout test fast/viewport/viewport-95.html and viewport-93.html
2062         Previously when executing window.devicePixelRatio these two pages returned 1 now
2063         they report the devicePixelRatio returned by computeViewportAttributes.
2064
2065         * Api/WebPage.cpp:
2066         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
2067
2068 2012-03-02  Jacky Jiang  <zhajiang@rim.com>
2069
2070         Fix a warning in InputHandler::learnText()
2071         https://bugs.webkit.org/show_bug.cgi?id=80049
2072
2073         Reviewed by Antonio Gomes.
2074
2075         Fix a warning of the comparison "textInField.length() <=
2076         MaxLearnTextDataSize" in InputHandler::learnText().
2077
2078         Rubber-stamped internally by Mike Fenton.
2079
2080         * WebKitSupport/InputHandler.cpp:
2081         (BlackBerry::WebKit::InputHandler::learnText):
2082
2083 2012-03-01  Andy Chen  <andchen@rim.com>
2084
2085         [BlackBerry] Implement features for find-in-page
2086         https://bugs.webkit.org/show_bug.cgi?id=79820
2087
2088         Reviewed by Antonio Gomes.
2089
2090         - Make it be able to search text around the whole page instead of single frame.
2091         - Make it be able to start new search from active selection and last active match.
2092
2093         No new tests as this patch doesn't change behavior.
2094
2095         * Api/WebPage.cpp:
2096         (BlackBerry::WebKit::WebPagePrivate::frameUnloaded):
2097         * Api/WebPage_p.h:
2098         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2099         (WebCore::FrameLoaderClientBlackBerry::dispatchWillClose):
2100         (WebCore::FrameLoaderClientBlackBerry::detachedFromParent2):
2101         * WebKitSupport/DOMSupport.cpp:
2102         (BlackBerry::WebKit::DOMSupport::incrementFrame):
2103         * WebKitSupport/DOMSupport.h:
2104         * WebKitSupport/InPageSearchManager.cpp:
2105         (BlackBerry::WebKit::InPageSearchManager::findNextString):
2106         (BlackBerry::WebKit::InPageSearchManager::shouldSearchForText):
2107         (BlackBerry::WebKit::InPageSearchManager::findAndMarkText):
2108         (BlackBerry::WebKit::InPageSearchManager::setMarkerActive):
2109         (BlackBerry::WebKit::InPageSearchManager::frameUnloaded):
2110         * WebKitSupport/InPageSearchManager.h:
2111         * WebKitSupport/InputHandler.cpp:
2112         (BlackBerry::WebKit::InputHandler::frameUnloaded):
2113         * WebKitSupport/InputHandler.h:
2114
2115 2012-03-01  Charles Wei  <charles.wei@torchmobile.com.cn>
2116
2117         [BlackBerry] Web Notification crashes the browser.
2118         https://bugs.webkit.org/show_bug.cgi?id=79897
2119
2120         Reviewed by Antonio Gomes.
2121
2122         The reason of the crash is that it still uses the iterator
2123         after been removed from the container, which invalidates the
2124         iterator. 
2125         We should stop processing after we have found the element
2126         and removed from the container through the iterator.
2127
2128         This patch only fixes the crash issue, but not any notification
2129         functionality issue, which is tracked seperatly.
2130
2131         Test case: http://sandbox.gtaero.net/chrome/notifications.php
2132
2133         * WebCoreSupport/NotificationPresenterImpl.cpp:
2134         (WebKit::NotificationPresenterImpl::onPermission):
2135         (WebKit::NotificationPresenterImpl::notificationClicked):
2136
2137 2012-03-01  Mike Fenton  <mifenton@rim.com>
2138
2139         Autocomplete attribute should apply to textarea's.
2140         https://bugs.webkit.org/show_bug.cgi?id=79929
2141
2142         Reviewed by Antonio Gomes.
2143
2144         Add local static Qualified name for autocorrect attribute.
2145
2146         * WebKitSupport/DOMSupport.cpp:
2147         (BlackBerry::WebKit::DOMSupport::elementSupportsAutocorrect):
2148
2149 2012-02-29  Mike Fenton  <mifenton@rim.com>
2150
2151         Autocomplete attribute should apply to textarea's.
2152         https://bugs.webkit.org/show_bug.cgi?id=79929
2153
2154         Reviewed by Antonio Gomes.
2155
2156         Allow the autocomplete attribute to bubble back to the form setting.
2157
2158         Expand support to include checking autocorrect, autocomplete and
2159         name/id matching to text areas.
2160
2161         Reviewed internally by Nima Ghanavatian and Gen Mak.
2162
2163         * WebKitSupport/DOMSupport.cpp:
2164         (BlackBerry::WebKit::DOMSupport::elementSupportsAutocorrect):
2165         (BlackBerry::WebKit::DOMSupport::elementSupportsAutocomplete):
2166         (BlackBerry::WebKit::DOMSupport::elementAttributeState):
2167         * WebKitSupport/DOMSupport.h:
2168         * WebKitSupport/InputHandler.cpp:
2169         (BlackBerry::WebKit::inputStyle):
2170
2171 2012-02-29  Max Feil  <mfeil@rim.com>
2172
2173         [BlackBerry] Add support for FLAC audio and OGG/Vorbis audio
2174         https://bugs.webkit.org/show_bug.cgi?id=79519
2175
2176         Reviewed by Antonio Gomes.
2177
2178         * Api/WebSettings.cpp:
2179         (BlackBerry::WebKit::mimeTypeAssociationMap):
2180
2181 2012-02-28  Konrad Piascik  <kpiascik@rim.com>
2182
2183         [BlackBerry] Change the API to use std::string
2184         https://bugs.webkit.org/show_bug.cgi?id=79818
2185
2186         Reviewed by Antonio Gomes.
2187
2188         * Api/WebPage.cpp:
2189         (BlackBerry::WebKit::WebPage::dispatchInspectorMessage):
2190         * Api/WebPage.h:
2191
2192 2012-02-28  Jacky Jiang  <zhajiang@rim.com>
2193
2194         [BlackBerry] x86 build fix after cleaning up WebPage.cpp
2195         https://bugs.webkit.org/show_bug.cgi?id=79814
2196
2197         Reviewed by Antonio Gomes.
2198
2199         x86 build fix, keep WebPage::destroyWebPageCompositor() method where it
2200         was which was outside of USE(ACCELERATED_COMPOSITING).
2201
2202         * Api/WebPage.cpp:
2203         (BlackBerry::WebKit::WebPage::destroyWebPageCompositor):
2204         (WebKit):
2205
2206 2012-02-28  Mike Fenton  <mifenton@rim.com>
2207
2208         [BlackBerry] Remove unused focusedNodeChange notifications from the Chrome client.
2209         https://bugs.webkit.org/show_bug.cgi?id=79794
2210
2211         Reviewed by Rob Buis.
2212
2213         Remove unused notification for focusedNodeChanged.
2214
2215         Internally reviewed by Gen Mak.
2216
2217         * Api/WebPageClient.h:
2218         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2219         (WebCore::ChromeClientBlackBerry::focusedNodeChanged):
2220
2221 2012-02-27  Jacky Jiang  <zhajiang@rim.com>
2222
2223         [BlackBerry] Upstream BlackBerry API web page related files
2224         https://bugs.webkit.org/show_bug.cgi?id=74380
2225
2226         Reviewed by Antonio Gomes.
2227
2228         Clean up WebPage.{h, cpp} and WebPage_p.h.
2229         - Remove WebPage::mainFrame() as it is bad to expose WebCore::Frame in
2230           the public API, adapt to the change by adding a new method
2231           WebPagePrivate::core(Const WebPage*) and expose it to
2232           DumpRenderTreeSupport.
2233         - Rename WebPage::spellCheckingEnabled to
2234           WebPage::setSpellCheckingEnabled.
2235         - Remove unused WebPage::focusNodeRect().
2236         - Remove extra blank lines.
2237         - Put WebPage methods and their associated WebPagePrivate methods
2238           together.
2239
2240         No new tests as this patch doesn't change behavior.
2241
2242         * Api/WebPage.cpp:
2243         (BlackBerry::WebKit::WebPage::WebPage):
2244         (WebKit):
2245         (BlackBerry::WebKit::WebPage::~WebPage):
2246         (BlackBerry::WebKit::WebPagePrivate::core):
2247         (BlackBerry::WebKit::WebPage::load):
2248         (BlackBerry::WebKit::WebPage::loadExtended):
2249         (BlackBerry::WebKit::WebPage::loadFile):
2250         (BlackBerry::WebKit::WebPage::download):
2251         (BlackBerry::WebKit::WebPage::loadString):
2252         (BlackBerry::WebKit::WebPage::executeJavaScript):
2253         (BlackBerry::WebKit::WebPage::executeJavaScriptInIsolatedWorld):
2254         (BlackBerry::WebKit::WebPage::stopLoading):
2255         (BlackBerry::WebKit::WebPage::prepareToDestroy):
2256         (BlackBerry::WebKit::WebPage::setScrollPosition):
2257         (BlackBerry::WebKit::WebPage::scrollBy):
2258         (BlackBerry::WebKit::WebPage::notifyInRegionScrollStatusChanged):
2259         (BlackBerry::WebKit::WebPage::zoomToFitScale):
2260         (BlackBerry::WebKit::WebPage::initialScale):
2261         (BlackBerry::WebKit::WebPage::maximumScale):
2262         (BlackBerry::WebKit::WebPage::scrollPosition):
2263         (BlackBerry::WebKit::WebPage::viewportSize):
2264         (BlackBerry::WebKit::WebPage::activeNodeContext):
2265         (BlackBerry::WebKit::WebPage::assignFocus):
2266         (BlackBerry::WebKit::WebPage::blockZoomAnimationFinished):
2267         (BlackBerry::WebKit::WebPage::onInputLocaleChanged):
2268         (BlackBerry::WebKit::WebPage::setScreenOrientation):
2269         (BlackBerry::WebKit::WebPage::applyPendingOrientationIfNeeded):
2270         (BlackBerry::WebKit::WebPage::setViewportSize):
2271         (BlackBerry::WebKit::WebPage::setDefaultLayoutSize):
2272         (BlackBerry::WebKit::WebPage::setScrollOriginPoint):
2273         (BlackBerry::WebKit::WebPage::textEncoding):
2274         (BlackBerry::WebKit::WebPage::forcedTextEncoding):
2275         (BlackBerry::WebKit::WebPage::setForcedTextEncoding):
2276         (BlackBerry::WebKit::WebPage::setSpellCheckingEnabled):
2277         (BlackBerry::WebKit::parentLayer):
2278         (BlackBerry::WebKit::WebPagePrivate::inRegionScrollableAreasForPoint):
2279         (BlackBerry::WebKit::WebPage::destroyWebPageCompositor):
2280         * Api/WebPage.h:
2281         (WebCore):
2282         (WebKit):
2283         * Api/WebPage_p.h:
2284         (WebCore):
2285         (WebKit):
2286         * WebKitSupport/DumpRenderTreeSupport.cpp:
2287         (DumpRenderTreeSupport::corePage):
2288         (DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests):
2289         (DumpRenderTreeSupport::resetGeolocationMock):
2290         (DumpRenderTreeSupport::setMockGeolocationError):
2291         (DumpRenderTreeSupport::setMockGeolocationPermission):
2292         (DumpRenderTreeSupport::setMockGeolocationPosition):
2293         (DumpRenderTreeSupport::scalePageBy):
2294         * WebKitSupport/DumpRenderTreeSupport.h:
2295         (WebCore):
2296         (DumpRenderTreeSupport):
2297
2298 2012-02-27  Mike Fenton  <mifenton@rim.com>
2299
2300         [BlackBerry] Selection handling should be entirely directional
2301         https://bugs.webkit.org/show_bug.cgi?id=79692
2302
2303         Reviewed by Antonio Gomes.
2304
2305         Make all VisibleSelections directional.
2306
2307         * WebKitSupport/SelectionHandler.cpp:
2308         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
2309         (BlackBerry::WebKit::SelectionHandler::setSelection):
2310
2311 2012-02-27  Ed Baker  <edbaker@rim.com>
2312
2313         [BlackBerry] Dragging a selection handle outside of the content bounding box does not update the selection range correctly
2314         https://bugs.webkit.org/show_bug.cgi?id=78608
2315
2316         Ensure that when selection handles leave the content bounding box that
2317         the handle not being dragged remains fixed. Do not apply padding to a
2318         direction that would cause the selection to shrink when performing the
2319         handle direction detection.
2320
2321         Reviewed by Antonio Gomes.
2322
2323         * WebKitSupport/DOMSupport.cpp:
2324         (BlackBerry::WebKit::DOMSupport::convertPointToFrame):
2325         * WebKitSupport/DOMSupport.h:
2326         * WebKitSupport/SelectionHandler.cpp:
2327         (BlackBerry::WebKit::clamp):
2328         (BlackBerry::WebKit::directionalVisiblePositionAtExtentOfBox):
2329         (BlackBerry::WebKit::SelectionHandler::extendSelectionToFieldBoundary):
2330         (BlackBerry::WebKit::SelectionHandler::setSelection):
2331         (BlackBerry::WebKit::SelectionHandler::clipPointToVisibleContainer):
2332         * WebKitSupport/SelectionHandler.h:
2333
2334 2012-02-27  Leo Yang  <leo.yang@torchmobile.com.cn>
2335
2336         [BlackBerry] Upstream accelerated compositing helper class
2337         https://bugs.webkit.org/show_bug.cgi?id=78448
2338
2339         Reviewed by Antonio Gomes.
2340
2341         Initial upstream, no new tests.
2342
2343         * WebKitSupport/FrameLayers.cpp: Added.
2344         * WebKitSupport/FrameLayers.h: Added.
2345
2346 2012-02-26  Hajime Morrita  <morrita@chromium.org>
2347
2348         Move ChromeClient::showContextMenu() to ContextMenuClient
2349         https://bugs.webkit.org/show_bug.cgi?id=79427
2350
2351         Reviewed by Adam Barth.
2352
2353         * WebCoreSupport/ChromeClientBlackBerry.h:
2354         (ChromeClientBlackBerry):
2355
2356 2012-02-24  Mike Fenton  <mifenton@rim.com>
2357
2358         [BlackBerry] Eliminate excessive BlackBerry::Platform use in InputHandler
2359         https://bugs.webkit.org/show_bug.cgi?id=79393
2360
2361         Reviewed by Antonio Gomes.
2362
2363         Cleanup usage of BlackBerry::Platform in InputHandler.
2364
2365         * WebKitSupport/InputHandler.cpp:
2366         (BlackBerry::WebKit::convertStringToWchar):
2367         (BlackBerry::WebKit::convertStringToWcharVector):
2368         (BlackBerry::WebKit::convertSpannableStringToString):
2369         (BlackBerry::WebKit::InputHandler::learnText):
2370         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
2371         (BlackBerry::WebKit::InputHandler::shouldAcceptInputFocus):
2372         (BlackBerry::WebKit::InputHandler::setElementFocused):
2373         (BlackBerry::WebKit::InputHandler::nodeTextChanged):
2374         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
2375         (BlackBerry::WebKit::InputHandler::frameUnloaded):
2376         (BlackBerry::WebKit::InputHandler::selectionChanged):
2377         (BlackBerry::WebKit::InputHandler::setSelection):
2378         (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
2379         (BlackBerry::WebKit::InputHandler::deleteTextRelativeToCursor):
2380         (BlackBerry::WebKit::InputHandler::deleteText):
2381         (BlackBerry::WebKit::InputHandler::spannableTextInRange):
2382         (BlackBerry::WebKit::InputHandler::setComposingRegion):
2383         (BlackBerry::WebKit::InputHandler::finishComposition):
2384         (BlackBerry::WebKit::InputHandler::setText):
2385         (BlackBerry::WebKit::InputHandler::setTextAttributes):
2386         (BlackBerry::WebKit::InputHandler::setRelativeCursorPosition):
2387         (BlackBerry::WebKit::InputHandler::setSpannableTextAndRelativeCursor):
2388         (BlackBerry::WebKit::InputHandler::setComposingText):
2389         (BlackBerry::WebKit::InputHandler::commitText):
2390
2391 2012-02-24  Mike Fenton  <mifenton@rim.com>
2392
2393         [BlackBerry] Eliminate excessive BlackBerry::Platform use in SelectionHandler.
2394         https://bugs.webkit.org/show_bug.cgi?id=79391
2395
2396         Reviewed by Antonio Gomes.
2397
2398         Clean up usage of BlackBerry::Platform in SelectionHandler and
2399         explicitly define what namespace to use for ambiguous objects like
2400         IntRect and IntPoint.
2401
2402         * WebKitSupport/SelectionHandler.cpp:
2403         (BlackBerry::WebKit::SelectionHandler::cancelSelection):
2404         (BlackBerry::WebKit::SelectionHandler::getConsolidatedRegionOfTextQuadsForSelection):
2405         (BlackBerry::WebKit::visiblePositionForPointIgnoringClipping):
2406         (BlackBerry::WebKit::directionOfPointRelativeToRect):
2407         (BlackBerry::WebKit::SelectionHandler::shouldUpdateSelectionOrCaretForPoint):
2408         (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
2409         (BlackBerry::WebKit::directionalVisiblePositionAtExtentOfBox):
2410         (BlackBerry::WebKit::pointIsOutsideOfBoundingBoxInDirection):
2411         (BlackBerry::WebKit::SelectionHandler::extendSelectionToFieldBoundary):
2412         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
2413         (BlackBerry::WebKit::SelectionHandler::clipPointToFocusNode):
2414         (BlackBerry::WebKit::SelectionHandler::setSelection):
2415         (BlackBerry::WebKit::SelectionHandler::selectAtPoint):
2416         (BlackBerry::WebKit::SelectionHandler::selectObject):
2417         (BlackBerry::WebKit::comparePointsToReferencePoint):
2418         (BlackBerry::WebKit::minXMinYCorner):
2419         (BlackBerry::WebKit::maxXMinYCorner):
2420         (BlackBerry::WebKit::minXMaxYCorner):
2421         (BlackBerry::WebKit::maxXMaxYCorner):
2422         (BlackBerry::WebKit::caretLocationForRect):
2423         (BlackBerry::WebKit::caretComparisonPointForRect):
2424         (BlackBerry::WebKit::adjustCaretRects):
2425         (BlackBerry::WebKit::SelectionHandler::clipRegionToVisibleContainer):
2426         (BlackBerry::WebKit::referencePoint):
2427         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
2428         (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
2429         (BlackBerry::WebKit::SelectionHandler::selectionContains):
2430
2431 2012-02-24  Shinya Kawanaka  <shinyak@chromium.org>
2432
2433         SpellCheckRequest needs to know the context where the spellcheck happened.
2434         https://bugs.webkit.org/show_bug.cgi?id=79320
2435
2436         Reviewed by Hajime Morita.
2437
2438         * WebCoreSupport/EditorClientBlackBerry.cpp:
2439         (WebCore::EditorClientBlackBerry::requestCheckingOfString):
2440         * WebCoreSupport/EditorClientBlackBerry.h:
2441         (EditorClientBlackBerry):
2442
2443 2012-02-24  Charles Wei  <charles.wei@torchmobile.com.cn>
2444
2445         [BlackBerry] Anchor mailto: with target set won't launch Messaging application when clicked
2446         https://bugs.webkit.org/show_bug.cgi?id=79318
2447
2448         Need to give the client a chance to decide how to handle the new window request.
2449
2450         Reviewed by Rob Buis.
2451
2452         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2453         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNewWindowAction):
2454
2455 2012-02-23  Mike Fenton  <mifenton@rim.com>
2456
2457         [BlackBerry] Selection handler has compile failure with logs enabled.
2458         https://bugs.webkit.org/show_bug.cgi?id=79392
2459
2460         Reviewed by Antonio Gomes.
2461
2462         Build Fix.  Update log to avoid usage of toString which was removed.
2463
2464         * WebKitSupport/SelectionHandler.cpp:
2465         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
2466
2467 2012-02-19  Antonio Gomes  <agomes@rim.com>
2468
2469         Fat fingers - Add a clearer way to distinguish the node we want (shadow or non-shadow)
2470         https://bugs.webkit.org/show_bug.cgi?id=79256
2471         PR #127814 / MKS_2587410
2472
2473         Reviewed by Rob Buis.
2474
2475         Patch adds a cleaner way for call sites of FatFingersResult to
2476         query for the appropriated target node: shadow or non-shadow DOM nodes.
2477
2478         It also renames FatFingersResults::validNode to ::node, assuming
2479         that "invalid" nodes are not applicable in any context.
2480
2481         * Api/WebPage.cpp:
2482         (BlackBerry::WebKit::WebPagePrivate::clearDocumentData):
2483         (BlackBerry::WebKit::WebPagePrivate::contextNode):
2484         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
2485         * WebKitSupport/FatFingers.h:
2486         (FatFingersResult):
2487         (BlackBerry::WebKit::FatFingersResult::node):
2488         (BlackBerry::WebKit::FatFingersResult::nodeAsElementIfApplicable):
2489         * WebKitSupport/SelectionHandler.cpp:
2490         (BlackBerry::WebKit::SelectionHandler::selectAtPoint):
2491         * WebKitSupport/TouchEventHandler.cpp:
2492         (BlackBerry::WebKit::TouchEventHandler::touchHoldEvent):
2493         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
2494
2495 2012-02-23  Jacky Jiang  <zhajiang@rim.com>
2496
2497         [BlackBerry] Upstream BlackBerry API web page related files
2498         https://bugs.webkit.org/show_bug.cgi?id=74380
2499
2500         Reviewed by Antonio Gomes.
2501
2502         Initial upstream, no new tests.
2503
2504         * Api/WebPage.cpp: Added.
2505         * Api/WebPage.h: Added.
2506         * Api/WebPage_p.h: Added.
2507
2508 2012-02-23  Leo Yang  <leo.yang@torchmobile.com.cn>
2509
2510         [BlackBerry] Remove unused ChromeClientBlackBerry::platformCompositingWindow(), platformWindow() and WebPageClient::compositingWindow()
2511         https://bugs.webkit.org/show_bug.cgi?id=78681
2512
2513         Reviewed by Antonio Gomes.
2514
2515         * Api/WebPageClient.h:
2516         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2517         (WebCore):
2518         * WebCoreSupport/ChromeClientBlackBerry.h:
2519         (ChromeClientBlackBerry):
2520
2521 2012-02-23  Leo Yang  <leo.yang@torchmobile.com.cn>
2522
2523         [BlackBerry] Upstream GLES2Context.{h, cpp}
2524         https://bugs.webkit.org/show_bug.cgi?id=79196
2525
2526         Reviewed by Rob Buis.
2527
2528         Initial upstream, no new tests.
2529
2530         * WebKitSupport/GLES2Context.cpp: Added.
2531         * WebKitSupport/GLES2Context.h: Added.
2532
2533 2012-02-23  Mike Fenton  <mifenton@rim.com>
2534
2535         [BlackBerry] InputHandler requires cleanup of Navigation Mode handling.
2536         https://bugs.webkit.org/show_bug.cgi?id=79366
2537
2538         Reviewed by Rob Buis.
2539
2540         Cleanup InputHandler navigation based code.
2541
2542         1) Remove the concept of NavigationMode and replace it
2543            with simple showKeyboard calls.
2544
2545         2) Remove navigation move events and replace with standard
2546            key events.
2547
2548         3) Standardize function/variable names and remove obsolete
2549            functions.
2550
2551         * Api/WebPageClient.h:
2552         * WebKitSupport/InputHandler.cpp:
2553         (BlackBerry::WebKit::InputHandler::InputHandler):
2554         (BlackBerry::WebKit::InputHandler::nodeFocused):
2555         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
2556         (BlackBerry::WebKit::InputHandler::setElementFocused):
2557         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
2558         (BlackBerry::WebKit::InputHandler::setDelayKeyboardVisibilityChange):
2559         (BlackBerry::WebKit::InputHandler::processPendingKeyboardVisibilityChange):
2560         (BlackBerry::WebKit::InputHandler::notifyClientOfKeyboardVisibilityChange):
2561         * WebKitSupport/InputHandler.h:
2562         (InputHandler):
2563         * WebKitSupport/SelectionHandler.cpp:
2564         (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
2565         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
2566         * WebKitSupport/TouchEventHandler.cpp:
2567         (BlackBerry::WebKit::TouchEventHandler::touchEventCancel):
2568         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
2569
2570 2012-02-21  Ryosuke Niwa  <rniwa@webkit.org>
2571
2572         Remove the remaining uses of CSSStyleDeclaration in Editor
2573         https://bugs.webkit.org/show_bug.cgi?id=78939
2574
2575         Reviewed by Enrica Casucci.
2576
2577         * WebCoreSupport/EditorClientBlackBerry.cpp:
2578         (WebCore::EditorClientBlackBerry::shouldApplyStyle):
2579         * WebCoreSupport/EditorClientBlackBerry.h:
2580         (EditorClientBlackBerry):
2581
2582 2012-02-22  Mike Fenton  <mifenton@rim.com>
2583
2584         [BlackBerry] InputHandler has signed vs unsigned comparison.
2585         https://bugs.webkit.org/show_bug.cgi?id=79261
2586
2587         Fix warning by casting the unsigned int to an int.
2588
2589         Reviewed by Rob Buis.
2590
2591         * WebKitSupport/InputHandler.cpp:
2592         (BlackBerry::WebKit::InputHandler::rectForCaret):
2593
2594 2012-02-22  Ryosuke Niwa  <rniwa@webkit.org>
2595
2596         Remove the remaining uses of CSSStyleDeclaration in Editor
2597         https://bugs.webkit.org/show_bug.cgi?id=78939
2598
2599         Reviewed by Enrica Casucci.
2600
2601         * WebCoreSupport/EditorClientBlackBerry.cpp:
2602         (WebCore::EditorClientBlackBerry::shouldApplyStyle):
2603         * WebCoreSupport/EditorClientBlackBerry.h:
2604         (EditorClientBlackBerry):
2605
2606 2012-02-18  Antonio Gomes  <agomes@rim.com>
2607
2608         Fat fingers - cache the first rect-based hit test so we do not need to do it again
2609         https://bugs.webkit.org/show_bug.cgi?id=79115
2610
2611         Reviewed by Adam Treat.
2612
2613         Our FatFingers implementation runs currently in two phases:
2614         the first checks for the elements intrinsically clickable;
2615         the second checks for elements made clickable by the page
2616         (for example, a div with a onclick event listener attached to it).
2617         For each phase, we perform a rect hittest, which is not needed since
2618         the result of each is the same.
2619
2620         Patch introduces a caching mechanism so we avoid on rect hittest:
2621         when the first phase runs, it caches each nodeset per document in
2622         a hashmap. This second phase works with the cached results.
2623
2624         No behavioral change, but performance is better since we
2625         avoid one (possibly expensive) rect hittest.
2626
2627         I measured the performance gain on https://www.kvd.se/, and we
2628         save up to 0.04 seconds, by caching and re-using the results.
2629
2630         * WebKitSupport/FatFingers.cpp:
2631         (BlackBerry::WebKit::dumpHitTestResult):
2632         (BlackBerry::WebKit::FatFingers::findBestPoint):
2633         (BlackBerry::WebKit::FatFingers::findIntersectingRegions):
2634         (BlackBerry::WebKit::FatFingers::cachingStrategy):
2635         (WebKit):
2636         (BlackBerry::WebKit::FatFingers::getNodesFromRect):
2637         * WebKitSupport/FatFingers.h:
2638
2639 2012-02-20  Antonio Gomes  <agomes@rim.com>
2640
2641         All default video/audio control elements should be rect-hit testable (Part II)
2642         PR #139518 / MKS_3005538
2643
2644         Reviewed by George Staikos.
2645
2646         Add HTMLInputElement::isMediaControlElement as a criteria
2647         to consider a element as clickable.
2648
2649         Note that is should be only used while in the "ClickableByDefault"
2650         phase of FatFingers.
2651
2652         * WebKitSupport/FatFingers.cpp:
2653         (BlackBerry::WebKit::FatFingers::isElementClickable):
2654
2655 2012-02-16  Antonio Gomes  <agomes@rim.com>
2656
2657         [BlackBerry] Implemented a way to defer client navigation change client notifications
2658         https://bugs.webkit.org/show_bug.cgi?id=78848
2659
2660         Reviewed by Rob Buis.
2661
2662         Currently we postpone touch_down till touch_up if user touches
2663         the screen and an input field has the WebKit focus. This is done
2664         so we can scroll the page without hidding the vkb needlessly.
2665
2666         However, it breaks the conversion of touch to mouse events
2667         if an input field has the focus in the following scenario:
2668         an <input type=text> is focused and an user grab and-drag
2669         a <input type=range> knob/slide. It does not work until the
2670         user unfocuses the currently focused edit field.
2671
2672         Patch introduces a way to unfocus a currently focused input field,
2673         without requesting the client to show or hide the virtual keyboard
2674         right way. Instead it gets a delayed notification of the vkb mode requested
2675         at either touch_released/mouse_up or touch_cancel time.
2676
2677         For now, due to content side issues with major web sites,
2678         only delay navigation mode notification changes if we are not dealing with
2679         input modes.
2680
2681         * WebKitSupport/InputHandler.cpp:
2682         (BlackBerry::WebKit::InputHandler::InputHandler):
2683         (BlackBerry::WebKit::InputHandler::nodeFocused):
2684         (BlackBerry::WebKit::InputHandler::setElementFocused):
2685         (BlackBerry::WebKit::InputHandler::setNavigationMode):
2686         (WebKit):
2687         (BlackBerry::WebKit::InputHandler::setDelayClientNotificationOfNavigationModeChange):
2688         (BlackBerry::WebKit::InputHandler::processPendingClientNavigationModeChangeNotification):
2689         (BlackBerry::WebKit::InputHandler::notifyClientOfNavigationModeChange):
2690         (BlackBerry::WebKit::InputHandler::willOpenPopupForNode):
2691         (BlackBerry::WebKit::InputHandler::setPopupListIndexes):
2692         (BlackBerry::WebKit::InputHandler::spannableTextInRange):
2693         (BlackBerry::WebKit::InputHandler::removeComposedText):
2694         (BlackBerry::WebKit::InputHandler::firstSpanInString):
2695         (BlackBerry::WebKit::InputHandler::setText):
2696         (BlackBerry::WebKit::InputHandler::setRelativeCursorPosition):
2697         * WebKitSupport/InputHandler.h:
2698         (InputHandler):
2699
2700 2012-02-16  Antonio Gomes  <agomes@rim.com>
2701
2702         Crash @WebPagePrivate::enqueueRenderingOfClippedContentOfScrollableNodeAfterInRegionScrolling MKS_2986818
2703         https://bugs.webkit.org/show_bug.cgi?id=78845
2704
2705         Reviewed by Rob Buis.
2706
2707         We were trying to operate on a cached Node when its page/frame/document
2708         were gone to PageCache already. To avoid such problems, lets clean up
2709         any document data we have cached when the Frame goes into the cache.
2710
2711         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2712         (WebCore::FrameLoaderClientBlackBerry::didSaveToPageCache):
2713         (WebCore):
2714         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
2715         (FrameLoaderClientBlackBerry):
2716
2717 2012-02-16  Antonio Gomes  <agomes@rim.com>
2718
2719         [BlackBerry] Upstream touch handling related classes
2720         https://bugs.webkit.org/show_bug.cgi?id=78509
2721
2722         Reviewed by Adam Treat and Rob Buis.
2723
2724         FatFingers is the class responsible to the whole touch
2725         accuracy of the BlackBerry port. Initial upstream.
2726
2727         * WebKitSupport/FatFingers.cpp: Added.
2728         (WebKit):
2729         (BlackBerry::WebKit::FatFingers::fingerRectForPoint):
2730         (BlackBerry::WebKit::hasMousePressListener):
2731         (BlackBerry::WebKit::FatFingers::isElementClickable):
2732         (BlackBerry::WebKit::isFieldWithText):
2733         (BlackBerry::WebKit::distanceBetweenPoints):
2734         (BlackBerry::WebKit::compareDistanceBetweenPoints):
2735         (BlackBerry::WebKit::isValidFrameOwner):
2736         (BlackBerry::WebKit::FatFingers::FatFingers):
2737         (BlackBerry::WebKit::FatFingers::~FatFingers):
2738         (BlackBerry::WebKit::FatFingers::findBestPoint):
2739         (BlackBerry::WebKit::FatFingers::checkFingerIntersection):
2740         (BlackBerry::WebKit::FatFingers::findIntersectingRegions):
2741         (BlackBerry::WebKit::FatFingers::checkForClickableElement):
2742         (BlackBerry::WebKit::FatFingers::checkForText):
2743         (BlackBerry::WebKit::FatFingers::getPaddings):
2744         (BlackBerry::WebKit::FatFingers::nodesFromRect):
2745         (BlackBerry::WebKit::FatFingers::getRelevantInfoFromPoint):
2746         (BlackBerry::WebKit::FatFingers::setSuccessfulFatFingersResult):
2747         * WebKitSupport/FatFingers.h: Added.
2748         (WebCore):
2749         (WebKit):
2750         (FatFingersResult):
2751         (BlackBerry::WebKit::FatFingersResult::FatFingersResult):
2752         (BlackBerry::WebKit::FatFingersResult::reset):
2753         (BlackBerry::WebKit::FatFingersResult::originPosition):
2754         (BlackBerry::WebKit::FatFingersResult::adjustedPosition):
2755         (BlackBerry::WebKit::FatFingersResult::positionWasAdjusted):
2756         (BlackBerry::WebKit::FatFingersResult::isTextInput):
2757         (BlackBerry::WebKit::FatFingersResult::isValid):
2758         (BlackBerry::WebKit::FatFingersResult::validNode):
2759         (BlackBerry::WebKit::FatFingersResult::nodeAsElementIfApplicable):
2760         (FatFingers):
2761
2762 2012-02-16  Antonio Gomes  <agomes@rim.com>
2763
2764         [BlackBerry] Upstream touch handling related classes
2765         https://bugs.webkit.org/show_bug.cgi?id=78509
2766
2767         Reviewed by Adam Treat.
2768
2769         Initial upstream of the Blackberry specific single touch event
2770         handler class.
2771
2772         * blackberry/WebKitSupport/TouchEventHandler.cpp: Added.
2773         (WebKit):
2774         (BlackBerry::WebKit::hasMouseMoveListener):
2775         (BlackBerry::WebKit::hasTouchListener):
2776         (BlackBerry::WebKit::elementExpectsMouseEvents):
2777         (BlackBerry::WebKit::shouldConvertTouchToMouse):
2778         (BlackBerry::WebKit::TouchEventHandler::TouchEventHandler):
2779         (BlackBerry::WebKit::TouchEventHandler::~TouchEventHandler):
2780         (BlackBerry::WebKit::TouchEventHandler::shouldSuppressMouseDownOnTouchDown):
2781         [BlackBerry] Upstream touch handling related classes
2782         https://bugs.webkit.org/show_bug.cgi?id=78509
2783
2784         Reviewed by Rob Buis.
2785
2786         InRegionScrollableArea specializes the BlackBerry specific ScrollViewBase,
2787         working as a read-only wrapper object for a scrollable areas in the page.
2788         It is used in our client side to control in-region scrolling (scrollable boxes,
2789         inner frames, etc).
2790
2791         Initial upstream.
2792
2793         * WebKitSupport/InRegionScrollableArea.cpp: Added.
2794         (WebKit):
2795         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
2796         (BlackBerry::WebKit::InRegionScrollableArea::calculateMinimumScrollPosition):
2797         (BlackBerry::WebKit::InRegionScrollableArea::calculateMaximumScrollPosition):
2798         (BlackBerry::WebKit::InRegionScrollableArea::layer):
2799         (BlackBerry):
2800         * WebKitSupport/InRegionScrollableArea.h: Added.
2801         (WebCore):
2802         (WebKit):
2803         (InRegionScrollableArea):
2804
2805 2012-02-16  Antonio Gomes  <agomes@rim.com>
2806
2807         (BlackBerry::WebKit::TouchEventHandler::touchEventCancel):
2808         (BlackBerry::WebKit::TouchEventHandler::touchHoldEvent):
2809         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
2810         (BlackBerry::WebKit::TouchEventHandler::spellCheck):
2811         (BlackBerry::WebKit::TouchEventHandler::handleFatFingerPressed):
2812         (BlackBerry::WebKit::elementForTapHighlight):
2813         (BlackBerry::WebKit::TouchEventHandler::drawTapHighlight):
2814         * blackberry/WebKitSupport/TouchEventHandler.h: Added.
2815         (WebCore):
2816         (WebKit):
2817         (TouchEventHandler):
2818         (BlackBerry::WebKit::TouchEventHandler::lastFatFingersResult):
2819         (BlackBerry::WebKit::TouchEventHandler::resetLastFatFingersResult):
2820