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