f154e7e14fe4bba920c8b02aa177725139c0d09b
[WebKit-https.git] / Source / WebKit / blackberry / ChangeLog
1 2012-07-09  Mike Lattanzio  <mlattanzio@rim.com>
2
3         [BlackBerry] meta viewport initial-scale doesn't factor in device pixel ratio
4         https://bugs.webkit.org/show_bug.cgi?id=90575
5
6         Reviewed by Rob Buis.
7
8         Refactor meta viewport handling to multiply the developer
9         specified scale properties by the devicePixelRatio. This
10         required moving the setting of these values until after
11         the call to computeViewportAttributes.
12
13         This fixes an isssue where content wider than the meta viewport
14         would case a zoom-out-to-fit scenario because we misinterpreted
15         the specified initial-scale.
16
17         New test to verify wide content doesn't affect initial-scale:
18         ManualTests/blackberry/meta-viewport-initial-scale-wide-content.html
19
20         Internal review from Konrad Piascik, Arvid Nilsson.
21
22         * Api/WebPage.cpp:
23         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
24         (BlackBerry::WebKit::WebPagePrivate::dispatchViewportPropertiesDidChange):
25
26 2012-07-07  George Staikos  <staikos@webkit.org>
27
28         Detach animation clients properly if we clear the web page pointer.
29         https://bugs.webkit.org/show_bug.cgi?id=90730
30
31         Reviewed by Adam Treat.
32
33         * Api/WebPage.cpp:
34         (BlackBerry::WebKit::WebPagePrivate::destroyCompositor):
35         * Api/WebPageCompositor.cpp:
36         (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
37         (BlackBerry::WebKit::WebPageCompositorPrivate::~WebPageCompositorPrivate):
38         (WebKit):
39         (BlackBerry::WebKit::WebPageCompositorPrivate::detach):
40         (BlackBerry::WebKit::WebPageCompositorPrivate::setPage):
41         * Api/WebPageCompositor_p.h:
42         (WebPageCompositorPrivate):
43
44 2012-07-06  Max Feil  <mfeil@rim.com>
45
46         [BlackBerry] exitFullScreenForElement() is not working for fullscreen elements in iframes
47         https://bugs.webkit.org/show_bug.cgi?id=90327
48
49         Reviewed by Antonio Gomes.
50
51         Fix exit fullscreen problem for elements in iframes. The
52         exitFullScreenForElement() call is passed a null element in
53         this case, instead of the original element which entered
54         fullscreen. If you look in Document.cpp you can see the
55         exitFullScreenForElement() call being made on the topDocument
56         (which has a null m_fullScreenElement) instead of the iframe's
57         document.
58
59         The Chromium and Windows ports get around this problem by
60         storing either the fullscreen element or its frame during
61         enterFullScreenForElement(), so I will bring the BlackBerry port
62         in line with this. See also bug 89817.
63
64         * WebCoreSupport/ChromeClientBlackBerry.cpp:
65         (WebCore::ChromeClientBlackBerry::enterFullScreenForElement):
66         (WebCore::ChromeClientBlackBerry::exitFullScreenForElement):
67         * WebCoreSupport/ChromeClientBlackBerry.h:
68         (ChromeClientBlackBerry):
69
70 2012-07-06  Benjamin C Meyer  <bmeyer@rim.com>
71
72         Add an API to explicitly call a JavaScript function with args.
73         https://bugs.webkit.org/show_bug.cgi?id=90694
74
75         Currently the Blackberry port doesn't expose the JavaScript
76         engine to 3rd parties so they rely upon executeJavaScript
77         which can be slower than necessary and unsafe as eval is used.
78         This new API provides a way to explicitly call a specific
79         JavaScript function with a list of args preventing the case
80         where an argument comes from a untrusted source and tries to
81         escape the arg list to take control of the JavaScript engine.
82
83         In the future if the Blackberry port introduces a formal
84         way to interact with the JavaScript engine this function should
85         be removed.
86
87         PR 149294
88
89         Reviewed by Unreviewed
90
91         * Api/WebPage.cpp:
92         (BlackBerry::WebKit::WebPage::executeJavaScriptFunction):
93         (WebKit):
94         * Api/WebPage.h:
95
96 2012-07-05  Charles Wei  <charles.wei@torchmobile.com.cn>
97
98         [BlackBerry] Fix the build error introduced by enabling CUSTOM_THEME_HANDLER
99         https://bugs.webkit.org/show_bug.cgi?id=90588
100
101         Reviewed by Rob Buis.
102
103         Fix the build error introduced by enabling CUSTOM_THEME_HANDLER.
104         * WebCoreSupport/ChromeClientBlackBerry.cpp:
105         (WebCore::ChromeClientBlackBerry::isProtocolHandlerRegistered):
106
107 2012-07-04  Hanna Ma  <Hanma@rim.com>
108
109         [BlackBerry] Implement device metrics for blackberry.
110         https://bugs.webkit.org/show_bug.cgi?id=90494
111         RIM PR #159034
112
113         Reviewed by Rob Buis.
114
115         Implement calls to the application to change the device metrics for
116         the web inspector.
117
118         * Api/WebPage.cpp:
119         (BlackBerry::WebKit::WebPagePrivate::applySizeOverride):
120         (WebKit):
121         (BlackBerry::WebKit::WebPagePrivate::setTextZoomFactor):
122         * Api/WebPage_p.h:
123         (WebPagePrivate):
124         * WebCoreSupport/InspectorClientBlackBerry.cpp:
125         (WebCore::InspectorClientBlackBerry::InspectorClientBlackBerry):
126         (WebCore::InspectorClientBlackBerry::canOverrideDeviceMetrics):
127         (WebCore):
128         (WebCore::InspectorClientBlackBerry::overrideDeviceMetrics):
129         (WebCore::InspectorClientBlackBerry::supportsFrameInstrumentation):
130         * WebCoreSupport/InspectorClientBlackBerry.h:
131         (InspectorClientBlackBerry):
132
133 2012-07-03  Leo Yang  <leo.yang@torchmobile.com.cn>
134
135         [BlackBerry] Checkerboard shown when clicking on error page buttons
136         https://bugs.webkit.org/show_bug.cgi?id=90152
137         RIM PR #161867
138
139         Reviewed by George Staikos.
140
141         r121514 just made the race occur in lower possibility but can't avoid it.
142         This path is using another approach to fix the problem. When we are resetting
143         backingstore while committing a page we need to suspend backingstore and
144         screen update to make sure no other threads can update backingstore and screen.
145
146         * Api/BackingStore.cpp:
147         (BlackBerry::WebKit::BackingStorePrivate::resetTiles):
148         * Api/WebPage.cpp:
149         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
150
151 2012-07-03  George Staikos  <staikos@webkit.org>
152
153         [BlackBerry] Enable Custom Scheme Handlers for BlackBerry.
154         https://bugs.webkit.org/show_bug.cgi?id=90422
155
156         Reviewed by Rob Buis.
157
158         * WebCoreSupport/ChromeClientBlackBerry.cpp:
159         (WebCore):
160         (WebCore::ChromeClientBlackBerry::isProtocolHandlerRegistered):
161         (WebCore::ChromeClientBlackBerry::unregisterProtocolHandler):
162         * WebCoreSupport/ChromeClientBlackBerry.h:
163         (ChromeClientBlackBerry):
164
165 2012-07-03  George Staikos  <staikos@webkit.org>
166
167         [BlackBerry] Enable RegisterProtocolHandler for BlackBerry.
168         https://bugs.webkit.org/show_bug.cgi?id=90422
169
170         Reviewed by Rob Buis.
171
172         * WebCoreSupport/ChromeClientBlackBerry.cpp:
173         (WebCore):
174         (WebCore::ChromeClientBlackBerry::registerProtocolHandler):
175         * WebCoreSupport/ChromeClientBlackBerry.h:
176         (ChromeClientBlackBerry):
177
178 2012-07-03  Jan Keromnes  <janx@linux.com>
179
180         Web Inspector: WebInspector.TextViewer should be renamed WebInspector.TextEditor
181         https://bugs.webkit.org/show_bug.cgi?id=89939
182
183         Reviewed by Vsevolod Vlasov.
184
185         * WebCoreSupport/inspectorBB.html:
186
187 2012-07-02  Xiaobo Wang  <xbwang@torchmobile.com.cn>
188
189         [BlackBerry] Use PUBLIC_BUILD to enable/disable DRT
190         https://bugs.webkit.org/show_bug.cgi?id=90271
191
192         Reviewed by George Staikos.
193
194         RIM PR #154707
195
196         Currently DRT code will be compiled only if ENABLE_DRT is set, and it's not
197         defined by default.
198         We should enable DRT by default unless PUBLIC_BUILD is set. In this way we don't
199         need to rebuild webkit before running DRT.
200
201         * Api/WebPage.cpp:
202         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
203         (BlackBerry::WebKit::WebPagePrivate::init):
204         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
205         (BlackBerry::WebKit::WebPage::runLayoutTests):
206         * WebCoreSupport/ChromeClientBlackBerry.cpp:
207         (WebCore::ChromeClientBlackBerry::addMessageToConsole):
208         (WebCore::ChromeClientBlackBerry::runJavaScriptAlert):
209         (WebCore::ChromeClientBlackBerry::runJavaScriptConfirm):
210         (WebCore::ChromeClientBlackBerry::runJavaScriptPrompt):
211         (WebCore::ChromeClientBlackBerry::createWindow):
212         (WebCore::ChromeClientBlackBerry::runBeforeUnloadConfirmPanel):
213         (WebCore::ChromeClientBlackBerry::setStatusbarText):
214         (WebCore::ChromeClientBlackBerry::exceededDatabaseQuota):
215         (WebCore::ChromeClientBlackBerry::keyboardUIMode):
216
217 2012-07-02  George Staikos  <staikos@webkit.org>
218
219         [BlackBerry] Implement cancelVibration, and make sure it's canceled on
220         destruction.
221         https://bugs.webkit.org/show_bug.cgi?id=90406
222
223         Reviewed by Rob Buis.
224
225         * WebCoreSupport/VibrationClientBlackBerry.cpp:
226         (WebCore::VibrationClientBlackBerry::cancelVibration):
227         (WebCore::VibrationClientBlackBerry::vibrationDestroyed):
228
229 2012-07-02  Benjamin Poulain  <bpoulain@apple.com>
230
231         Do not do any logging initialization when logging is disabled
232         https://bugs.webkit.org/show_bug.cgi?id=90228
233
234         Reviewed by Simon Fraser.
235
236         * Api/BlackBerryGlobal.cpp:
237         (BlackBerry::WebKit::globalInitialize):
238
239 2012-07-01  George Staikos  <staikos@webkit.org>
240
241         Clear visited links when clearing history.
242         https://bugs.webkit.org/show_bug.cgi?id=90345
243
244         Reviewed by Antonio Gomes.
245
246         * Api/WebPage.cpp:
247         (BlackBerry::WebKit::WebPage::clearHistory):
248
249 2012-06-30  Jason Liu  <jason.liu@torchmobile.com.cn>
250
251         [BlackBerry] WebView/Browser cause blank screen when selecting a dropdown field.
252         https://bugs.webkit.org/show_bug.cgi?id=90241
253
254         This issue is caused by single quotes in option's labels.
255         We should use the escape character of single quotes in JavaScript's string which 
256         starts and ends with single quotes.
257         So we replace lablels' single quotes with its escape character during generating the 
258         select popUp's HTML.
259
260         Reviewed by George Staikos.
261
262         * WebCoreSupport/SelectPopupClient.cpp:
263         (WebCore::SelectPopupClient::generateHTML):
264
265 2012-06-30  Jakob Petsovits  <jpetsovits@rim.com>
266
267         [BlackBerry] Allow surface resizing for use cases other than rotation.
268         https://bugs.webkit.org/show_bug.cgi?id=90295
269         RIM PR 171459
270
271         Reviewed by George Staikos.
272
273         A new API method setHasPendingSurfaceSizeChange() is
274         introduced for that effect, and used inside of
275         setViewportSize() to let the WebPageClient do the
276         resizing. Methods are renamed to reflect that this
277         is not exclusively meant for rotation anymore.
278
279         * Api/WebPage.cpp:
280         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
281         (BlackBerry::WebKit::WebPage::setScreenOrientation):
282         (WebKit):
283         (BlackBerry::WebKit::WebPage::setHasPendingSurfaceSizeChange):
284         (BlackBerry::WebKit::WebPagePrivate::resizeSurfaceIfNeeded):
285         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
286         * Api/WebPage.h:
287         * Api/WebPageClient.h:
288         * Api/WebPage_p.h:
289         (WebPagePrivate):
290
291 2012-06-29  Jacky Jiang  <zhajiang@rim.com>
292
293         [BlackBerry] Page jumps after post-pinch-zoom re-render
294         https://bugs.webkit.org/show_bug.cgi?id=90282
295
296         Reviewed by Antonio Gomes.
297
298         PR: 170255
299         In r120622, we moved ScrollableArea::setConstrainsScrollingToContentEdge(false|true)
300         from WebPage::setScrollPosition() to BackingStorePrivate::setScrollingOrZooming()
301         to address an overscroll reset issue.
302         However, when we are ending bitmap zooming, UI thread can call
303         BackingStorePrivate::setScrollingOrZooming(false) before WebKit thread
304         calls WebPage::setScrollPosition(), in which case it will set
305         ScrollableArea::m_constrainsScrollingToContentEdge to true earlier.
306         To fix this, we can cache ScrollableArea::m_constrainsScrollingToContentEdge
307         and always set it to false before we set scroll position in WebKit
308         thread to avoid scroll position clamping during scrolling, and restore
309         it to what it was after that.
310
311         * Api/WebPage.cpp:
312         (BlackBerry::WebKit::WebPage::setScrollPosition):
313
314 2012-06-29  Jakob Petsovits  <jpetsovits@rim.com>
315
316         Add blitVisibleContents() as public API.
317         https://bugs.webkit.org/show_bug.cgi?id=90211
318
319         Reviewed by Adam Treat.
320
321         We keep blitContents() (with src/dst rectangles)
322         for compatibility with older Cascades sprints for now,
323         but want to switch to always blitting the full viewport
324         and this is a good first step.
325
326         * Api/BackingStore.cpp:
327         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
328         (BlackBerry::WebKit::BackingStore::blitVisibleContents):
329         (WebKit):
330         * Api/BackingStore.h:
331
332 2012-06-29  Konrad Piascik  <kpiascik@rim.com>
333
334         Don't hardcode target dpi of 160 (it should be 96 on desktop)
335         https://bugs.webkit.org/show_bug.cgi?id=88114
336
337         Reviewed by Adam Barth.
338
339         Added new WebSetting to specify what the devicePixelRatio should be.
340         Updated the call to computeViewportAttributes.
341
342         * Api/WebPage.cpp:
343         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
344         * Api/WebSettings.cpp:
345         (WebKit):
346         (BlackBerry::WebKit::WebSettings::standardSettings):
347         (BlackBerry::WebKit::WebSettings::devicePixelRatio):
348         (BlackBerry::WebKit::WebSettings::setDevicePixelRatio):
349         * Api/WebSettings.h:
350         * WebKitSupport/DumpRenderTreeSupport.cpp:
351         (DumpRenderTreeSupport::dumpConfigurationForViewport):
352
353 2012-06-28  Jason Liu  <jason.liu@torchmobile.com.cn>
354
355         [BlackBerry] Selection items show as garbage for non-ascii characters.
356         https://bugs.webkit.org/show_bug.cgi?id=89969
357
358         Add charset utf-8 to the select popup's page.
359
360         Reviewed by Antonio Gomes.
361
362         * WebCoreSupport/SelectPopupClient.cpp:
363         (WebCore::SelectPopupClient::generateHTML):
364
365 2012-06-28  Leo Yang  <leo.yang@torchmobile.com.cn>
366
367         [BlackBerry] Checkerboard shown when clicking on error page buttons
368         https://bugs.webkit.org/show_bug.cgi?id=90152
369         RIM PR #161867
370
371         Reviewed by George Staikos.
372
373         Reset m_hasBlitJobs when resetting tiles to prevent ui thread from drawing checkerboard unintentionally.
374
375         * Api/BackingStore.cpp:
376         (BlackBerry::WebKit::BackingStorePrivate::resetTiles):
377
378 2012-06-27  Andrew Lo  <anlo@rim.com>
379
380         [BlackBerry] Selection overlay can become visible after it has been hidden
381         https://bugs.webkit.org/show_bug.cgi?id=90105
382
383         Reviewed by George Staikos.
384
385         When SelectionOverlay::hide is called from UI thread,
386         rather than setting the override opacity, dispatch to the
387         WebKit thread, which removes the overlay (normal case).
388
389         Internal PR164183.
390         Internally Reviewed by: Arvid Nilsson.
391
392         * Api/WebPage.cpp:
393         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
394         (BlackBerry::WebKit::WebPage::selectionOverlay):
395         * Api/WebPage_p.h:
396         (WebPagePrivate):
397         * Api/WebSelectionOverlay.h:
398         * WebKitSupport/SelectionOverlay.cpp:
399         (BlackBerry::WebKit::SelectionOverlay::SelectionOverlay):
400         (BlackBerry::WebKit::SelectionOverlay::hide):
401         * WebKitSupport/SelectionOverlay.h:
402         (BlackBerry::WebKit::SelectionOverlay::create):
403         (SelectionOverlay):
404
405 2012-06-25  Mark Hahnenberg  <mhahnenberg@apple.com>
406
407         JSLock should be per-JSGlobalData
408         https://bugs.webkit.org/show_bug.cgi?id=89123
409
410         Reviewed by Geoffrey Garen.
411
412         Changed all sites that used JSLock to instead use the new JSLockHolder
413         and pass in the correct JS context that the code is about to interact with that 
414         needs protection. Also added a couple JSLocks to places that didn't already 
415         have it that needed it.
416
417         * Api/BlackBerryGlobal.cpp:
418         (BlackBerry::WebKit::clearMemoryCaches):
419         * WebCoreSupport/ClientExtension.cpp:
420         * WebCoreSupport/PagePopupBlackBerry.cpp:
421         (WebCore::PagePopupBlackBerry::installDomFunction):
422         * WebKitSupport/DumpRenderTreeSupport.cpp:
423         (DumpRenderTreeSupport::computedStyleIncludingVisitedInfo):
424
425 2012-06-27  Jacky Jiang  <zhajiang@rim.com>
426
427         [BlackBerry] Wrong scale after leaving fullscreen <video>
428         https://bugs.webkit.org/show_bug.cgi?id=89546
429
430         Reviewed by Antonio Gomes.
431
432         PR: 164948
433         When we were entering fullscreen, the current scale A was clamped to a
434         greater minimum scale B as we relayouted the contents during the change
435         of the viewport size. When leaving fullscreen, we still used that scale
436         B as the current scale which was incorrect.
437         To fix this, we can save the current scale when entering fullscreen and
438         restore it when leaving fullscreen.
439
440         * Api/WebPage.cpp:
441         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
442         (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
443         (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
444         * Api/WebPage_p.h:
445         (WebPagePrivate):
446
447 2012-06-27  Jacky Jiang  <zhajiang@rim.com>
448
449         [BlackBerry] Scale was incorrect when reloading a simple web page after initial load
450         https://bugs.webkit.org/show_bug.cgi?id=88889
451
452         Reviewed by Antonio Gomes.
453
454         PR: 164442
455         For FrameLoadTypeStandard load, the layout timer can be fired which can
456         call dispatchDidFirstVisuallyNonEmptyLayout() after the load Finished
457         state, in which case the web page will have no chance to zoom to
458         initial scale. We should give it a chance as well as FrameLoadTypeSame
459         load.
460
461         * Api/WebPage.cpp:
462         (BlackBerry::WebKit::WebPagePrivate::shouldZoomToInitialScaleOnLoad):
463
464 2012-06-26  Mike Fenton  <mifenton@rim.com>
465
466         [BlackBerry] Add WebPage interface for Async spell check.
467         https://bugs.webkit.org/show_bug.cgi?id=89999
468
469         Reviewed by Rob Buis.
470
471         PR 124517.
472
473         Add interface for IMS async spell checking.
474
475         Reviewed Internally by Nima Ghanavatian.
476
477         * Api/WebPage.cpp:
478         (BlackBerry::WebKit::WebPage::spellCheckingRequestProcessed):
479         (WebKit):
480         * Api/WebPage.h:
481         * Api/WebPageClient.h:
482         * WebKitSupport/InputHandler.cpp:
483         (WebKit):
484         (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
485         * WebKitSupport/InputHandler.h:
486         (InputHandler):
487
488 2012-06-26  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
489
490         [BlackBerry] Limit session storage quota to 5MB by default
491         https://bugs.webkit.org/show_bug.cgi?id=89941
492
493         Reviewed by Rob Buis.
494
495         Limit session storage quota to 5MB by default for BlackBerry
496         porting.
497         Internally reviewed by George Staikos.
498
499         * Api/WebPage.cpp:
500         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
501         * Api/WebSettings.cpp:
502         (WebKit):
503         (BlackBerry::WebKit::WebSettings::standardSettings):
504         (BlackBerry::WebKit::WebSettings::sessionStorageQuota):
505         (BlackBerry::WebKit::WebSettings::setSessionStorageQuota):
506         * Api/WebSettings.h:
507
508 2012-06-26  Charles Wei  <charles.wei@torchmobile.com.cn>
509
510         [BlackBerry] Use gesture SwipeDown to exit fullscreen for both video and plugin.
511         https://bugs.webkit.org/show_bug.cgi?id=89960
512
513         Reviewed by Antonio Gomes.
514
515         We used to use gesture swipedown to exit fullscreen for plugin, but not fullscreen
516         HTML5 video; When a swipe down happens, it applies this event to all the pluginviews
517         in a page, even though only the one in fullscreen mode will process this.
518
519         With this patch, the SwipeDown gesture will only apply to the fullscreen elemement,
520         which is either a plugin, or an Video element.
521
522         * Api/WebPage.cpp:
523         (BlackBerry::WebKit::WebPage::notifySwipeEvent):
524
525 2012-06-25  Leo Yang  <leo.yang@torchmobile.com.cn>
526
527         [BlackBerry] Fill more data in device motion event
528         https://bugs.webkit.org/show_bug.cgi?id=89857
529
530         Reviewed by Antonio Gomes.
531
532         Reviewed internally by Robin Cao.
533
534         Fill acceleration and rotation rate into DeviceMotionData.
535
536         * WebCoreSupport/DeviceMotionClientBlackBerry.cpp:
537         (DeviceMotionClientBlackBerry::onMotion):
538
539 2012-06-25  Yong Li  <yoli@rim.com>
540
541         [BlackBerry] Add JSC statistics into about:memory
542         https://bugs.webkit.org/show_bug.cgi?id=89779
543
544         Reviewed by Rob Buis.
545
546         Add detailed JS memory statistics to about:memory page.
547
548         * WebCoreSupport/AboutData.cpp:
549         (WebCore::dumpJSCTypeCountSetToTableHTML):
550         (WebCore):
551         (WebCore::memoryPage):
552
553 2012-06-25  Crystal Zhang  <haizhang@rim.com>
554
555         [BlackBerry] Use AIR controls if client doesn't support HTML control
556         https://bugs.webkit.org/show_bug.cgi?id=89777
557
558         Reviewed by Yong Li.
559
560         Currently HTML controls depend on client implementing CreateWindow event, for those clients
561         that don't implement CreateWindow event, use old AIR controls so we don't break them.
562
563         PR 163818.
564
565         Internal reviewed by Mike Fenton.
566
567         * Api/WebPageClient.h:
568         * WebCoreSupport/ChromeClientBlackBerry.cpp:
569         (WebCore::ChromeClientBlackBerry::openPagePopup):
570         * WebCoreSupport/PagePopupBlackBerry.cpp:
571         (WebCore::PagePopupBlackBerry::sendCreatePopupWebViewRequest):
572         * WebCoreSupport/PagePopupBlackBerry.h:
573         (PagePopupBlackBerry):
574         * WebKitSupport/InputHandler.cpp:
575         (BlackBerry::WebKit::InputHandler::openSelectPopup):
576
577 2012-06-25  Rob Buis  <rbuis@rim.com>
578
579         [BlackBerry] Require text editable element to be enabled for VKB
580         https://bugs.webkit.org/show_bug.cgi?id=89876
581
582         Reviewed by Yong Li.
583
584         After bug 58837 got in, children of <fieldset> now can inherit the disabled
585         state of the fieldset. When trying for instance fast/forms/fieldset/fieldset-disabled.html,
586         it can be seen that when they are visually disabled, the input handling can still be triggered. So
587         add an extra check to isTextBasedContentEditableElement that the element is enabled.
588
589         Reviewed internally by Mike Fenton.
590
591         * WebKitSupport/DOMSupport.cpp:
592         (BlackBerry::WebKit::DOMSupport::isTextBasedContentEditableElement):
593
594 2012-06-24  Simon Fraser  <simon.fraser@apple.com>
595
596         Rename isPositioned to isOutOfFlowPositioned for clarity
597         https://bugs.webkit.org/show_bug.cgi?id=89836
598
599         Reviewed by Antti Koivisto.
600         
601         RenderObject and RenderStyle had an isPositioned() method that was
602         confusing, because it excluded relative positioning. Rename to 
603         isOutOfFlowPositioned(), which makes it clearer that it only applies
604         to absolute and fixed positioning.
605
606         Simple rename; no behavior change.
607
608         * Api/WebPage.cpp:
609         (BlackBerry::WebKit::isPositionedContainer):
610         (BlackBerry::WebKit::isNonRenderViewFixedPositionedContainer):
611         (BlackBerry::WebKit::isFixedPositionedContainer):
612
613 2012-06-23  Sheriff Bot  <webkit.review.bot@gmail.com>
614
615         Unreviewed, rolling out r121058.
616         http://trac.webkit.org/changeset/121058
617         https://bugs.webkit.org/show_bug.cgi?id=89809
618
619         Patch causes plugins tests to crash in GTK debug builds
620         (Requested by zdobersek on #webkit).
621
622         * Api/BlackBerryGlobal.cpp:
623         (BlackBerry::WebKit::clearMemoryCaches):
624         * WebCoreSupport/ClientExtension.cpp:
625         * WebCoreSupport/PagePopupBlackBerry.cpp:
626         (WebCore::PagePopupBlackBerry::installDomFunction):
627         * WebKitSupport/DumpRenderTreeSupport.cpp:
628         (DumpRenderTreeSupport::computedStyleIncludingVisitedInfo):
629
630 2012-06-20  Mark Hahnenberg  <mhahnenberg@apple.com>
631
632         JSLock should be per-JSGlobalData
633         https://bugs.webkit.org/show_bug.cgi?id=89123
634
635         Reviewed by Gavin Barraclough.
636
637         Changed all sites that used JSLock to instead use the new JSLockHolder
638         and pass in the correct JS context that the code is about to interact with that 
639         needs protection.
640
641         * Api/BlackBerryGlobal.cpp:
642         (BlackBerry::WebKit::clearMemoryCaches):
643         * WebCoreSupport/ClientExtension.cpp:
644         * WebCoreSupport/PagePopupBlackBerry.cpp:
645         (WebCore::PagePopupBlackBerry::installDomFunction):
646         * WebKitSupport/DumpRenderTreeSupport.cpp:
647         (DumpRenderTreeSupport::computedStyleIncludingVisitedInfo):
648
649 2012-06-22  Andrew Lo  <anlo@rim.com>
650
651         [BlackBerry] Tap highlight fade animations are added to overlay continuously during pinch zoom.
652         https://bugs.webkit.org/show_bug.cgi?id=89772
653
654         Reviewed by Antonio Gomes.
655
656         When pinch zooming, DefaultTapHighlight::hide is continuously
657         called from the UI thread. This resulted in fade animations being
658         created and added to the override overlay continuously.
659
660         This patch moves the m_visible check so that it applies for both
661         threads.
662
663         Internal PR164183
664
665         * WebKitSupport/DefaultTapHighlight.cpp:
666         (BlackBerry::WebKit::DefaultTapHighlight::draw):
667         (BlackBerry::WebKit::DefaultTapHighlight::hide):
668         * WebKitSupport/DefaultTapHighlight.h:
669         (DefaultTapHighlight):
670
671 2012-06-22  Yong Li  <yoli@rim.com>
672
673         [BlackBerry] Set WebSecurityEnabled flag accordingly.
674         https://bugs.webkit.org/show_bug.cgi?id=89602
675
676         Reviewed by Rob Buis.
677
678         Disable web security checks if needed.
679
680         * Api/WebPage.cpp:
681         (BlackBerry::WebKit::WebPagePrivate::init):
682         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
683
684 2012-06-22  Parth Patel  <parpatel@rim.com>
685
686         [Blackberry] BlackBerry::Platform::Settings::get() rename to BlackBerry::Platform::Settings::instance() to make it consistent with our other singletons
687         https://bugs.webkit.org/show_bug.cgi?id=89684
688
689         Reviewed by Yong Li.
690
691         Build Fix-Typo Update setting instance access to use instance() instead of get().
692
693         * WebKitSupport/InputHandler.cpp:
694         (BlackBerry::WebKit::InputHandler::isInputModeEnabled):
695
696 2012-06-22  Amy Ousterhout  <aousterh@chromium.org>
697
698         Renamed DeviceOrientation to DeviceOrientationData
699         https://bugs.webkit.org/show_bug.cgi?id=88663
700
701         Reviewed by Steve Block.
702
703         Updated files to use the renamed DeviceOrientationData instead of DeviceOrientation.
704         This change makes DeviceOrientationData consistent with DeviceMotionData.
705
706         * WebCoreSupport/DeviceOrientationClientBlackBerry.h:
707         (DeviceOrientationClientBlackBerry):
708
709 2012-06-22  Joseph Pecoraro  <pecoraro@apple.com>
710
711         Web Inspector: InspectorState::updateCookie should not do JSON serialization if unsupported
712         https://bugs.webkit.org/show_bug.cgi?id=89743
713
714         Reviewed by Yury Semikhatsky.
715
716         * WebCoreSupport/InspectorClientBlackBerry.cpp:
717         (WebCore::InspectorClientBlackBerry::updateInspectorStateCookie):
718
719 2012-06-21  Parth Patel  <parpatel@rim.com>
720
721         [Blackberry] BlackBerry::Platform::Settings::get() rename to BlackBerry::Platform::Settings::instance() to make it consistent with our other singletons
722         https://bugs.webkit.org/show_bug.cgi?id=89684
723
724         Reviewed by Yong Li.
725    
726         Update setting instance access to use instance() instead of get().
727
728         * Api/BlackBerryGlobal.cpp:
729         (BlackBerry::WebKit::globalInitialize):
730         * Api/WebPage.cpp:
731         (BlackBerry::WebKit::WebPagePrivate::init):
732         (BlackBerry::WebKit::WebPagePrivate::shouldSendResizeEvent):
733         * WebCoreSupport/AboutData.cpp:
734         (WebCore::configPage):
735         * WebCoreSupport/CacheClientBlackBerry.cpp:
736         (WebCore::CacheClientBlackBerry::updateCacheCapacity):
737         * WebKitSupport/FatFingers.cpp:
738         (BlackBerry::WebKit::FatFingers::getPaddings):
739         * WebKitSupport/InputHandler.cpp:
740         (BlackBerry::WebKit::InputHandler::isInputModeEnabled):
741         (BlackBerry::WebKit::InputHandler::setInputModeEnabled):
742         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
743         * WebKitSupport/SurfacePool.cpp:
744         (BlackBerry::WebKit::SurfacePool::initialize):
745
746 2012-06-21  Genevieve Mak  <gmak@rim.com>
747
748         Add a parameter to handletTouchPoint to bypass FatFingers
749         on touch up. There are some cases where the user may drag
750         their finger off the element and we want to use the actual
751         touch point instead of the FatFingers adjusted point.
752         https://bugs.webkit.org/show_bug.cgi?id=89677
753
754         Reviewed by Antonio Gomes.
755
756         * Api/WebPage.cpp:
757         (BlackBerry::WebKit::WebPage::touchPointAsMouseEvent):
758         * Api/WebPage.h:
759         * WebKitSupport/TouchEventHandler.cpp:
760         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
761         * WebKitSupport/TouchEventHandler.h:
762         (TouchEventHandler):
763
764 2012-06-21  Mike Fenton  <mifenton@rim.com>
765
766         [BlackBerry] Input mode should adapt automatically to settings changes
767         https://bugs.webkit.org/show_bug.cgi?id=89595
768
769         Reviewed by Antonio Gomes.
770
771         PR 167540.
772
773         Add helper function to check if input is enabled so that
774         the override settings can be applied at any time.
775
776         Reviewed Internally by Gen Mak.
777
778         * Api/WebPage.cpp:
779         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
780         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
781         * WebKitSupport/InputHandler.cpp:
782         (BlackBerry::WebKit::InputHandler::isInputModeEnabled):
783         (BlackBerry::WebKit::InputHandler::setInputModeEnabled):
784         (BlackBerry::WebKit::InputHandler::setElementFocused):
785         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
786         (BlackBerry::WebKit::InputHandler::notifyClientOfKeyboardVisibilityChange):
787         (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
788         (BlackBerry::WebKit::InputHandler::setComposingText):
789         * WebKitSupport/InputHandler.h:
790         * WebKitSupport/TouchEventHandler.cpp:
791         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
792
793 2012-06-20  Jacky Jiang  <zhajiang@rim.com>
794
795         Add a != operator to ViewportArguments
796         https://bugs.webkit.org/show_bug.cgi?id=87505
797
798         Reviewed by Antonio Gomes.
799         Patch by Jacky Jiang  <zhajiang@rim.com>
800
801         Use != operator of ViewportArguments.
802
803         * Api/WebPage.cpp:
804         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
805         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
806         * Api/WebViewportArguments.cpp:
807         (BlackBerry::WebKit::WebViewportArguments::operator!=):
808
809 2012-06-20  Christopher Hutten-Czapski  <chutten@rim.com>
810
811         [BlackBerry] Add an API to immediately enable cross-site XHR
812         https://bugs.webkit.org/show_bug.cgi?id=89594
813
814         Internally Reviewed by Yong Li.
815         Reviewed by Rob Buis.
816
817         There is no API to disable it as clients may rely on legacy behaviour
818         of not disabling until the next frame load.
819
820         * Api/WebPage.cpp:
821         (BlackBerry::WebKit::enableCrossSiteXHRRecursively):
822         (WebKit):
823         (BlackBerry::WebKit::WebPagePrivate::enableCrossSiteXHR):
824         (BlackBerry::WebKit::WebPage::enableCrossSiteXHR):
825         * Api/WebPage.h:
826         * Api/WebPage_p.h:
827         (WebPagePrivate):
828
829 2012-06-20  Konrad Piascik  <kpiascik@rim.com>
830
831         [BlackBerry] Enable setAcceleratedCompositingForFixedPositionEnabled
832         https://bugs.webkit.org/show_bug.cgi?id=89575
833
834         Reviewed by Antonio Gomes.
835
836         Enable the flag so that we get position:fixed elemetns to be rendered
837         using accelerated compositing.
838
839         * Api/WebPage.cpp:
840         (BlackBerry::WebKit::WebPagePrivate::init):
841
842 2012-06-20  Julien Chaffraix  <jchaffraix@webkit.org>
843
844         Use IntSize in RenderLayer to represent scroll offsets
845         https://bugs.webkit.org/show_bug.cgi?id=89154
846
847         Reviewed by Eric Seidel.
848
849         * Api/WebPage.cpp:
850         (BlackBerry::WebKit::WebPagePrivate::scrollRenderer):
851         Updated to pass an IntSize to scrollToOffset.
852
853 2012-06-19  Yong Li  <yoli@rim.com>
854
855         [BlackBerry] Should check the return value of fromUTF8() before executing the script.
856         https://bugs.webkit.org/show_bug.cgi?id=89500
857
858         Reviewed by Rob Buis.
859         PR# 166623.
860
861         WebPagePrivate::executeJavaScript() should check the return value of fromUTF8()
862         before executing the script to avoid potential crash on invalid script source.
863
864         * Api/WebPage.cpp:
865         (BlackBerry::WebKit::WebPagePrivate::executeJavaScript):
866
867 2012-06-19  Jakob Petsovits  <jpetsovits@rim.com>
868
869         [BlackBerry] Missing notifyContentRendered() when resuming rendering
870         https://bugs.webkit.org/show_bug.cgi?id=89507
871         RIM PR 150049
872
873         Reviewed by Antonio Gomes.
874
875         All the current calls to notifyContentRendered() are
876         located in the RenderQueue, but this omits the case
877         when we force rendering from resumeBackingStore()
878         after rendering had been suspended for a while.
879
880         * Api/WebPage.cpp:
881         (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore):
882
883 2012-06-19  Sergio Villar Senin  <svillar@igalia.com>
884
885         Calling nativeImageForCurrentFrame() causes assertion failure: m_verifier.isSafeToUse()
886         https://bugs.webkit.org/show_bug.cgi?id=67582
887
888         Reviewed by David Levin.
889
890         Use synchronousNativeIconForPageURL() to retrieve favicons.
891
892         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
893         (WebCore::FrameLoaderClientBlackBerry::dispatchDidReceiveIcon):
894
895 2012-06-18  Antonio Gomes  <agomes@rim.com>
896
897        [BlackBerry] Overscroll can get reset while interacting with a page, due to style recalculations and scroll position clamping
898        https://bugs.webkit.org/show_bug.cgi?id=89371
899        PR #166982
900
901        Reviewed by Adam Treat.
902
903        While scrolling, the WebKit thread gets intercalated WebPage::setScrollPosition
904        calls dispatched from the UI thread. These calls are wrapped with
905        ScrollableArea::setConstrainsScrollingToContentEdge(false|true) calls, which
906        can clamp the scroll position (removes overscroll) if set to 'true'.
907
908        The following situation can happen: user is scrolling, and WebKit
909        thread is not in the middle of a WebPage::setScrollPosition call
910        (so setConstrainsScrollingToContentEdge is 'true'), and a relayout happens.
911        In this scenario, the scroll position will get clamped to 0,0, removing any
912        possible overscrolling.
913
914        See the stack trace below, paying special attention to frame 16:
915        #0  ScrollHandlerUserInterfaceThread::updateScrollPosition
916        #1  0x782b4a3e in WebPageClientImpl::scrollChanged
917        #2  0x78147484 in BlackBerry::WebKit::WebPagePrivate::notifyTransformedScrollChanged
918        #3  0x78171f68 in BlackBerry::WebKit::BackingStoreClient::checkOriginOfCurrentScrollOperation
919        #4  0x7816480a in WebCore::ChromeClientBlackBerry::scroll
920        #5  0x7a78b290 in WebCore::Chrome::scroll
921        #6  0x7a7ac8d0 in WebCore::FrameView::scrollContentsFastPath
922        #7  0x7a7eba72 in WebCore::ScrollView::scrollContents
923        #8  0x7a7ebb34 in WebCore::ScrollView::scrollTo
924        #9  0x7a7a8dae in WebCore::FrameView::scrollTo
925        #10 0x7a7e966e in WebCore::ScrollView::setScrollOffset
926        #11 0x7a7e77cc in WebCore::ScrollableArea::scrollPositionChanged
927        #12 0x7a7e7048 in WebCore::ScrollAnimator::notifyPositionChanged
928        #13 0x7a7e700c in WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation
929        #14 0x7a7e7588 in WebCore::ScrollableArea::scrollToOffsetWithoutAnimation
930        #16 WebCore::ScrollView::updateScrollbars
931        #18 WebCore::ScrollView::setContentsSize
932        #19 0x7a7accd8 in WebCore::FrameView::setContentsSize
933        #20 0x7a7a85f4 in WebCore::FrameView::adjustViewSize
934        #22 WebCore::FrameView::layout
935        #23 0x7a59d66e in WebCore::Document::updateLayoutIgnorePendingStylesheets
936        #24 0x7a5ada92 in WebCore::Element::offsetHeight
937        #25 0x7ab226b6 in WebCore::jsElementOffsetHeight
938        #27 JSC::JSValue::get
939        #28 0x796dd662 in JSC::JITStubThunked_op_get_by_id_generic
940
941        Patch fixes this issue by tying ScrollableArea::setConstrainsScrollingToContentEdge
942        to BackingStore::m_isZoomingOrScrolling, when we are sure clamping should not happen.
943
944        * Api/BackingStore.cpp:
945        (BlackBerry::WebKit::BackingStorePrivate::setScrollingOrZooming):
946        * Api/WebPage.cpp:
947        (BlackBerry::WebKit::WebPage::setScrollPosition):
948
949 2012-06-15  Eli Fidler  <efidler@rim.com>
950
951         [BlackBerry] Use platform font settings for the standard settings.
952         https://bugs.webkit.org/show_bug.cgi?id=89232
953
954         Reviewed by Rob Buis.
955
956         RIM PR 159708
957
958         * Api/WebSettings.cpp:
959         (BlackBerry::WebKit::WebSettings::standardSettings):
960
961 2012-06-15  Crystal Zhang  <haizhang@rim.com>
962
963         [BlackBerry] Remove touch events handling hook for popup
964         https://bugs.webkit.org/show_bug.cgi?id=89245
965
966         Reviewed by Rob Buis.
967
968         In the old patches we create our own WebPage for popup, so we need to hook up our own
969         touch handling functions, since we don't use our own WebPage any more, no need to keep
970         the touch handling code, because it just does nothing other than passing out the events
971         which might cause the touch events being handled twice.
972
973         * Api/WebPage.cpp:
974         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
975         * WebCoreSupport/PagePopupBlackBerry.cpp:
976         * WebCoreSupport/PagePopupBlackBerry.h:
977         (PagePopupBlackBerry):
978
979 2012-06-15  Antonio Gomes  <agomes@rim.com>
980
981         [BlackBerry] Disable WebCore::EventHandler synthesized mouse events during touch scrolling
982         https://bugs.webkit.org/show_bug.cgi?id=89227
983         PR #146642
984
985         Reviewed by Rob Buis.
986
987         Make use of the Settings::supportsMouseDevice setting in order to
988         prevent mouse move event to fire as a response to a scroll action.
989         We might still want to dynamically toggle this setting ON, in case for
990         example of a mouse wheel driven scroll action, but we can revisit it
991         when it becomes a fully supported/primary use case.
992
993         Internally reviewed by Eli Fidler.
994
995         * Api/WebPage.cpp:
996         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
997         * Api/WebSettings.cpp:
998         (WebKit):
999         (BlackBerry::WebKit::WebSettings::isDeviceSupportsMouseEnabled):
1000         (BlackBerry::WebKit::WebSettings::setDeviceSupportsMouseEnabled):
1001         * Api/WebSettings.h:
1002
1003 2012-06-15  Jacky Jiang  <zhajiang@rim.com>
1004
1005         [BlackBerry] Certain web pages (i.e., http://www.cloudtweaks.com/) are allowed to be wider than the screen
1006         https://bugs.webkit.org/show_bug.cgi?id=89211
1007
1008         Reviewed by Rob Buis.
1009         Patch by Jacky Jiang <zhajiang@rim.com>
1010
1011         PR: 135215
1012         Make simpler rules for zoom to fit scale:
1013         - Zoom to fit horizontally first without clamping the contents width.
1014         - Zoom to fit vertically instead without clamping the contents height
1015           if the horizontal zoom to fit can cause a grey area below the web
1016           page. Get rid of the virtual viewport guard as there may be cases
1017           that zooming can cause a grey area without a virtual viewport.
1018         - Clamp the scale by the minimum zoom to fit scale 0.25 and apply
1019           this rule to image documents as well. This minimum scale can be
1020           changed if there is a better vaule in the future.
1021         In this way, we can get rid of the issue that many web pages don't fit
1022         the screen.
1023
1024         Reviewed internally by Arvid Nilsson.
1025
1026         * Api/WebPage.cpp:
1027         (WebKit):
1028         (BlackBerry::WebKit::WebPagePrivate::zoomToFitScale):
1029
1030 2012-06-15  Yong Li  <yoli@rim.com>
1031
1032         [BlackBerry] Remove BackingStoreClient::scrollsHorizontally/scrollsVeritically()
1033         https://bugs.webkit.org/show_bug.cgi?id=89210
1034
1035         Reviewed by Antonio Gomes.
1036
1037         Remove BackingStoreClient::scrollsHorizontally()/scrollsVeritically(), because
1038         calling them is neither nessary nor safe.
1039
1040         * Api/BackingStore.cpp:
1041         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
1042         (BlackBerry::WebKit::BackingStorePrivate::blitHorizontalScrollbar):
1043         (BlackBerry::WebKit::BackingStorePrivate::blitVerticalScrollbar):
1044         * WebKitSupport/BackingStoreClient.cpp:
1045         * WebKitSupport/BackingStoreClient.h:
1046         (BackingStoreClient):
1047
1048 2012-06-15  Sheriff Bot  <webkit.review.bot@gmail.com>
1049
1050         Unreviewed, rolling out r120404.
1051         http://trac.webkit.org/changeset/120404
1052         https://bugs.webkit.org/show_bug.cgi?id=89193
1053
1054         This patch breaks [BlackBerry]'s text selection handles moving
1055         in editable elements. (Requested by Sean1 on #webkit).
1056
1057         * WebKitSupport/SelectionHandler.cpp:
1058         (BlackBerry::WebKit::visiblePositionForPointIgnoringClipping):
1059
1060 2012-06-14  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
1061
1062         [BlackBerry] Selection - Crash when manipulating selection by dragging handle
1063         https://bugs.webkit.org/show_bug.cgi?id=89160
1064
1065         RIMBUG:164970
1066         Avoid to set position in shadow tree to the new selection's base. It
1067         crashes when setting a shadow position to a selection' base.
1068
1069         Reviewed by Antonio Gomes.
1070
1071         * WebKitSupport/SelectionHandler.cpp:
1072         (BlackBerry::WebKit::visiblePositionForPointIgnoringClipping):
1073
1074 2012-06-14  Mary Wu  <mary.wu@torchmobile.com.cn>
1075
1076         [BlackBerry] empty plugin cause browser hang
1077         https://bugs.webkit.org/show_bug.cgi?id=89091
1078
1079         Reviewed by Rob Buis.
1080
1081         Add check before clean pluginView in FrameLoaderBlackBerry in case
1082         it didn't have any content.
1083         RIM PR# 165336
1084         Reviewed internally by George Staikos
1085
1086         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1087         (WebCore::FrameLoaderClientBlackBerry::finishedLoading):
1088
1089 2012-06-14  Genevieve Mak  <gmak@rim.com>
1090
1091         Always convert touch events to mouse events if the
1092         meta-tag TouchEventMode::PureWithMouseConversion is set.
1093         Minor style fix.
1094         https://bugs.webkit.org/show_bug.cgi?id=89115
1095
1096         Reviewed by Antonio Gomes.
1097
1098         Reviewed Internally by Antonio Gomes.
1099
1100         * WebKitSupport/TouchEventHandler.cpp:
1101         (BlackBerry::WebKit::TouchEventHandler::touchEventCancel):
1102         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
1103
1104 2012-06-14  Chris Guan  <chris.guan@torchmobile.com.cn>
1105
1106         [Blackberry] add a new Api named setAllowNotification
1107         https://bugs.webkit.org/show_bug.cgi?id=88950
1108
1109         Reviewed by Antonio Gomes.
1110
1111         * Api/WebPage.cpp:
1112         (BlackBerry::WebKit::WebPage::setAllowNotification):
1113         (WebKit):
1114         * Api/WebPage.h:
1115
1116 2012-06-13  Crystal Zhang  <haizhang@rim.com>
1117
1118         [BlackBerry] Apply New Style and JS for Select Popup
1119         https://bugs.webkit.org/show_bug.cgi?id=89020
1120
1121         Reviewed by Rob Buis.
1122
1123         PR 162854
1124
1125         Use new styled CSS files for select popup, also remove most JS functions
1126         to a separate JS file, only pass the parameters to JS, and use new python
1127         script for data generating, as the old one is too simple and problematic.
1128
1129         * WebCoreSupport/SelectPopupClient.cpp:
1130         (WebCore::SelectPopupClient::generateHTML):
1131
1132 2012-06-13  Amy Ousterhout  <aousterh@chromium.org>
1133
1134         Rename currentDeviceMotion to lastMotion in DeviceMotionClient
1135         https://bugs.webkit.org/show_bug.cgi?id=88854
1136
1137         Reviewed by Adam Barth.
1138
1139         Rename the function currentDeviceMotion to lastMotion in DeviceMotionClient.
1140         This makes it consistent with the similar function lastOrientation in DeviceOrientationClient.
1141
1142         * WebCoreSupport/DeviceMotionClientBlackBerry.cpp:
1143         (DeviceMotionClientBlackBerry::lastMotion):
1144         (DeviceMotionClientBlackBerry::onMotion):
1145         * WebCoreSupport/DeviceMotionClientBlackBerry.h:
1146         (DeviceMotionClientBlackBerry):
1147
1148 2012-06-13  Robin Cao  <robin.cao@torchmobile.com.cn>
1149
1150         [BlackBerry] Enable MEDIA_STREAM by default
1151         https://bugs.webkit.org/show_bug.cgi?id=88849
1152
1153         Reviewed by Antonio Gomes.
1154
1155         * Api/WebPage.cpp:
1156         (BlackBerry::WebKit::WebPagePrivate::init):
1157         * WebCoreSupport/UserMediaClientImpl.cpp: Added.
1158         (WebCore):
1159         (WebCore::UserMediaClientImpl::UserMediaClientImpl):
1160         (WebCore::UserMediaClientImpl::~UserMediaClientImpl):
1161         (WebCore::UserMediaClientImpl::pageDestroyed):
1162         (WebCore::UserMediaClientImpl::requestUserMedia):
1163         (WebCore::UserMediaClientImpl::cancelUserMediaRequest):
1164         * WebCoreSupport/UserMediaClientImpl.h: Added.
1165         (WebKit):
1166         (WebCore):
1167         (UserMediaClientImpl):
1168
1169 2012-06-12  Arvid Nilsson  <anilsson@rim.com>
1170
1171         [BlackBerry] Crash when rendering web page that's being destroyed
1172         https://bugs.webkit.org/show_bug.cgi?id=88915
1173
1174         Reviewed by Rob Buis.
1175
1176         PR #164943
1177
1178         This was a null pointer dereference that happened when the compositor
1179         was asked to render after being disconnected from its web page.
1180
1181         * Api/WebPageCompositor.cpp:
1182         (BlackBerry::WebKit::WebPageCompositorPrivate::render):
1183
1184 2012-06-12  Jacky Jiang  <zhajiang@rim.com>
1185
1186         [BlackBerry] Scale was incorrect when reloading a simple web page after initial load
1187         https://bugs.webkit.org/show_bug.cgi?id=88889
1188
1189         Reviewed by Adam Treat.
1190         Patch by Jacky Jiang <zhajiang@rim.com>
1191
1192         PR: 164442
1193         When we were reloading a web page with the load type FrameLoadTypeSame
1194         after the initial load, the first layout timer was fired after the load
1195         Finished state, in which case the web page would have no chance to zoom
1196         to the initial scale during the layout as it was only for load
1197         Committed state. This patch takes care of it.
1198
1199         * Api/WebPage.cpp:
1200         (BlackBerry::WebKit::WebPagePrivate::layoutFinished):
1201         (BlackBerry::WebKit::WebPagePrivate::shouldZoomToInitialScaleOnLoad):
1202         (WebKit):
1203         (BlackBerry::WebKit::WebPagePrivate::zoomToInitialScaleOnLoad):
1204         * Api/WebPage_p.h:
1205         (WebPagePrivate):
1206         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1207         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFirstVisuallyNonEmptyLayout):
1208
1209 2012-06-12  Crystal Zhang  <haizhang@rim.com>
1210
1211         [BlackBerry] Fix crash in InputHandler
1212         https://bugs.webkit.org/show_bug.cgi?id=88808
1213
1214         Reviewed by Antonio Gomes.
1215
1216         m_page is destroyed before InputHandler, so should move the call to destroy popup to chromeDestroyed().
1217
1218         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1219         (WebCore::ChromeClientBlackBerry::chromeDestroyed():
1220         * WebKitSupport/InputHandler.cpp:
1221         (BlackBerry::WebKit::InputHandler::~InputHandler):
1222
1223 2012-06-12  Yong Li  <yoli@rim.com>
1224
1225         [BlackBerry] Use a safer way to shrink JS memory usage
1226         https://bugs.webkit.org/show_bug.cgi?id=88811
1227
1228         Reviewed by Antonio Gomes.
1229
1230         We should just make a GC request and JSC will check if it is safe to do anything.
1231
1232         * Api/BlackBerryGlobal.cpp:
1233         (BlackBerry::WebKit::clearMemoryCaches):
1234
1235 2012-06-11  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1236
1237         [BlackBerry] Autofill feature implementation for BlackBerry porting
1238         https://bugs.webkit.org/show_bug.cgi?id=85577
1239
1240         Reviewed by Rob Buis.
1241
1242         Remove the autofill saving procedure out of dispatchWillSubmitForm, this procedure
1243         is same as the procedure in dispatchWillSendSubmitEvent.
1244         Some sites will redirect to other url in its login process, which will cause the
1245         user get notified to save credentials for this provisional redirecting url if we
1246         put this saving procedure in dispatchWillSubmitForm. So we should remove it to make
1247         sure we only save the autofill data before the submit event is fired.
1248
1249         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1250         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSubmitForm):
1251
1252 2012-06-11  Antonio Gomes  <agomes@rim.com>
1253
1254         [BlackBerry] [BlackBerry] browser video player fullscreen mode (portrait) does not play well with rotation
1255         https://bugs.webkit.org/show_bug.cgi?id=88809
1256
1257         Reviewed by Rob Buis.
1258
1259         Adjust the media container dimensions, whenever the FrameView::frameRect
1260         (aka viewport rect) changes
1261
1262         Reviewed internally by Jacky Jiang.
1263
1264         * Api/WebPage.cpp:
1265         (BlackBerry::WebKit::WebPagePrivate::updateViewportSize):
1266         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1267         (WebCore::ChromeClientBlackBerry::fullScreenRendererChanged):
1268
1269 2012-06-09  Antonio Gomes  <agomes@rim.com>
1270
1271         [BlackBerry] browser video player fullscreen mode (portrait) does not play well with viewport metatag - Controls are off screen so cannot exit fullscreen
1272         https://bugs.webkit.org/show_bug.cgi?id=88719
1273         PR #164026
1274
1275         Reviewed by Rob Buis.
1276
1277         Instead of using WebPage's viewport size, which suffers from
1278         dealing with transformed coordinates, viewport metatag changes,
1279         etc, lets use WebCore::FrameView's visibleContentRect::Size::Width,
1280         which abstract all these variations.
1281
1282         It fixes an overscale issue we were having when video player entered
1283         fullscreen, and webpage had viewport metatag set.
1284
1285         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1286         (WebCore::ChromeClientBlackBerry::fullScreenRendererChanged):
1287
1288 2012-06-11  Sam Weinig  <sam@webkit.org>
1289
1290         Remove support for disconnected/excluded from search frames, they are not used by Safari anymore
1291         https://bugs.webkit.org/show_bug.cgi?id=88723
1292
1293         Reviewed by Dan Bernstein.
1294
1295         * WebKitSupport/InPageSearchManager.cpp:
1296         (BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):
1297
1298 2012-06-10  Antonio Gomes  <agomes@rim.com>
1299
1300         [BlackBerry] Make media (<video> and <audio>) slide draggable again
1301         https://bugs.webkit.org/show_bug.cgi?id=88742
1302         PR #158199
1303
1304         Reviewed by George Staikos.
1305
1306         First check if the element is a range type then gets its
1307         shadow DOM ancestor.
1308
1309         * WebKitSupport/TouchEventHandler.cpp:
1310         (BlackBerry::WebKit::shouldConvertTouchToMouse):
1311
1312 2012-06-08  Crystal Zhang  <haizhang@rim.com>
1313
1314         [BlackBerry] Fix crash on PagePopupChromeClient
1315         https://bugs.webkit.org/show_bug.cgi?id=88675
1316
1317         Reviewed by Antonio Gomes.
1318
1319         PR 163672.
1320
1321         Actually it's the bug inside InputHandler, should delete the old popup and create a new one,
1322         because update() is problematic. Also no need to save pointer in InputHandler.
1323
1324         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1325         (WebCore::ChromeClientBlackBerry::openPagePopup):
1326         (WebCore::ChromeClientBlackBerry::closePagePopup):
1327         * WebKitSupport/InputHandler.cpp:
1328         (BlackBerry::WebKit::InputHandler::InputHandler):
1329         (BlackBerry::WebKit::InputHandler::~InputHandler):
1330         (BlackBerry::WebKit::InputHandler::openSelectPopup):
1331         * WebKitSupport/InputHandler.h:
1332         (WebCore):
1333         (InputHandler):
1334
1335 2012-06-08  Eli Fidler  <efidler@rim.com>
1336
1337         [BlackBerry] Default font settings are getting deleted
1338         https://bugs.webkit.org/show_bug.cgi?id=88670
1339
1340         Reviewed by Rob Buis.
1341
1342         RIM PR: 163720
1343
1344         WebSettings is overriding the default font settings with "", which deletes them.
1345
1346         * Api/WebPage.cpp:
1347         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
1348
1349 2012-06-07  Crystal Zhang  <haizhang@rim.com>
1350
1351         [BlackBerry] Should Use the WebPage Already Created by Client, No Need to Create New One.
1352         https://bugs.webkit.org/show_bug.cgi?id=88576
1353
1354         Reviewed by Rob Buis.
1355
1356         When PagePopupBlackBerry::init() is called, a WebPage is already created, we can just use 
1357         this to load popup, no need to create a new one. The old code is based on an old solution 
1358         which has been abandoned.
1359
1360         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1361         (WebCore::ChromeClientBlackBerry::openPagePopup):
1362         * WebCoreSupport/PagePopupBlackBerry.cpp:
1363         (WebCore::PagePopupBlackBerry::init):
1364         (WebCore::setValueAndClosePopupCallback):
1365         (WebCore::PagePopupBlackBerry::handleMouseEvent):
1366         (WebCore::PagePopupBlackBerry::closePopup):
1367         * WebCoreSupport/PagePopupBlackBerry.h:
1368         (PagePopupBlackBerry):
1369
1370 2012-06-07  Jacky Jiang  <zhajiang@rim.com>
1371
1372         [BlackBerry] Get rid of unused maximumLayoutSize in WebPage
1373         https://bugs.webkit.org/show_bug.cgi?id=88574
1374
1375         Reviewed by Rob Buis.
1376         Patch by Jacky Jiang <zhajiang@rim.com>
1377
1378         PR: 164098
1379         maximumLayoutSize was deprecated when we made use of
1380         WebCore::computeViewportAttributes for
1381         WebPagePrivate::recomputeVirtualViewportFromViewportArguments.
1382         So clean it up.
1383
1384         * Api/WebPage.cpp:
1385         (WebKit):
1386
1387 2012-06-07  Arvid Nilsson  <anilsson@rim.com>
1388
1389         [BlackBerry] User viewport arguments are not respected
1390         https://bugs.webkit.org/show_bug.cgi?id=88530
1391
1392         Reviewed by Antonio Gomes.
1393
1394         RIM PR #163767
1395
1396         Fixed by applying the user supplied viewport arguments if the page
1397         specifies default viewport arguments (i.e. the page has no viewport
1398         meta tag).
1399
1400         If the user didn't supply any viewport arguments either, the behaviour
1401         is the same as before the patch, the caller will successfully reset to
1402         default viewport arguments.
1403
1404         * Api/WebPage.cpp:
1405         (BlackBerry::WebKit::WebPagePrivate::dispatchViewportPropertiesDidChange):
1406
1407 2012-06-07  Arvid Nilsson  <anilsson@rim.com>
1408
1409         [BlackBerry] Allow WebPageCompositor to blend a transparent web page
1410         https://bugs.webkit.org/show_bug.cgi?id=88233
1411
1412         Reviewed by Rob Buis.
1413
1414         RIM PR #159998
1415
1416         Keep track of the web page background color in the compositor so we can
1417         determine whether the contents of the root layer are transparent.
1418
1419         Reviewed internally by Jakob Petsovits.
1420
1421         * Api/BackingStore.cpp:
1422         (BlackBerry::WebKit::BackingStorePrivate::compositeContents):
1423         * Api/BackingStore_p.h:
1424         (BackingStorePrivate):
1425         * Api/WebPage.cpp:
1426         (BlackBerry::WebKit::WebPagePrivate::setCompositor):
1427         (BlackBerry::WebKit::WebPagePrivate::setCompositorBackgroundColor):
1428         (WebKit):
1429         (BlackBerry::WebKit::WebPagePrivate::createCompositor):
1430         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
1431         * Api/WebPageCompositor.cpp:
1432         (BlackBerry::WebKit::WebPageCompositorPrivate::render):
1433         (BlackBerry::WebKit::WebPageCompositorPrivate::setBackgroundColor):
1434         (WebKit):
1435         * Api/WebPageCompositor_p.h:
1436         (BlackBerry::WebKit::WebPageCompositorPrivate::backgroundColor):
1437         (WebPageCompositorPrivate):
1438         * Api/WebPage_p.h:
1439         (WebPagePrivate):
1440
1441 2012-06-07  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1442
1443         [BlackBerry] Add enable credential autofill and enable form autofill feature control in WebSetting
1444         https://bugs.webkit.org/show_bug.cgi?id=88513
1445
1446         Reviewed by Rob Buis.
1447
1448         RIM PR: #163391
1449         Implemented credential autofill setting and form autofill setting.
1450
1451         Internally reviewed by Leo Yang <leo.yang@torchmobile.com.cn>.
1452
1453         * Api/WebPage.cpp:
1454         (BlackBerry::WebKit::WebPage::autofillTextField):
1455         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
1456         (BlackBerry::WebKit::WebPage::clearCredentials):
1457         (BlackBerry::WebKit::WebPage::clearAutofillData):
1458         (BlackBerry::WebKit::WebPage::clearNeverRememberSites):
1459         * Api/WebSettings.cpp:
1460         (WebKit):
1461         (BlackBerry::WebKit::WebSettings::standardSettings):
1462         (BlackBerry::WebKit::WebSettings::isCredentialAutofillEnabled):
1463         (BlackBerry::WebKit::WebSettings::setCredentialAutofillEnabled):
1464         (BlackBerry::WebKit::WebSettings::isFormAutofillEnabled):
1465         (BlackBerry::WebKit::WebSettings::setFormAutofillEnabled):
1466         * Api/WebSettings.h:
1467         * WebCoreSupport/EditorClientBlackBerry.cpp:
1468         (WebCore::EditorClientBlackBerry::textFieldDidEndEditing):
1469         (WebCore::EditorClientBlackBerry::textDidChangeInTextField):
1470         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1471         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFinishLoad):
1472         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSubmitForm):
1473         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendSubmitEvent):
1474
1475 2012-06-06  Antonio Gomes  <agomes@rim.com>
1476
1477         [BlackBerry] browser video player fullscreen mode (portrait) - Controls are off screen so cannot exit fullscreen
1478         https://bugs.webkit.org/show_bug.cgi?id=88488
1479         PR #162991
1480
1481         Reviewed by George Staikos.
1482
1483         When we use width:100%/pageScale as the math to calculate the width of the
1484         FullScreen element, it goes too wide for horizontally scrollable webpages.
1485         The reason is that 100% is relative to the content size here, and we want 100%
1486         relative to the viewport size. However, since there is no such a thing in CSS,
1487         we set an absolute file.
1488
1489         A known problem with this will be rotating the device when in fullscreen mode
1490         that we can address when rotating is supported.
1491
1492         Internally reviewed by Jacky Jiang.
1493
1494         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1495         (WebCore::ChromeClientBlackBerry::fullScreenRendererChanged):
1496
1497 2012-06-05  Antonio Gomes  <agomes@rim.com>
1498
1499        [BlackBerry] Implement a top-down in-region boundary detection in InRegionScrollableArea
1500        https://bugs.webkit.org/show_bug.cgi?id=88254
1501        PR #125237
1502
1503        Reviewed by Rob Buis.
1504
1505        Patch implements a top-down visibleWindowRect calculation for all scrollable
1506        elements hit-tested by a given point.
1507
1508        The reason on why this approach is better is that it calculates the visible
1509        window rect from the outermost scrollable element towards the inner ones, and
1510        that allows it to use the visible window rect of the previous scrollable element
1511        as the clipping rect for the current one.
1512
1513        Patch also changes the return vector to store ScrollViewBase pointers, so
1514        we can make use of static_cast properly. As now also stated in the header
1515        file, the client is responsible for deleting the ScrollViewBase
1516        elements in the vector.
1517
1518        Internally reviewed by Jakob Petsovits.
1519
1520        * Api/WebPage.cpp:
1521        (BlackBerry::WebKit::pushBackInRegionScrollable):
1522        (BlackBerry::WebKit::WebPagePrivate::inRegionScrollableAreasForPoint):
1523        * Api/WebPageClient.h:
1524        * Api/WebPage_p.h:
1525        (WebPagePrivate):
1526        * WebKitSupport/InRegionScrollableArea.cpp:
1527        (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
1528        (BlackBerry::WebKit::InRegionScrollableArea::setVisibleWindowRect):
1529        (WebKit):
1530        (BlackBerry::WebKit::InRegionScrollableArea::visibleWindowRect):
1531        * WebKitSupport/InRegionScrollableArea.h:
1532        (InRegionScrollableArea):
1533
1534 2012-06-06  Charles Wei  <charles.wei@torchmobile.com.cn>
1535
1536         [BlackBerry] IndexedDB file should be sand-boxed to the application data directory.
1537         https://bugs.webkit.org/show_bug.cgi?id=88065
1538
1539         Reviewed by George Staikos.
1540
1541         * Api/WebPage.cpp:
1542         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
1543         * Api/WebSettings.cpp:
1544         (WebKit):
1545         (BlackBerry::WebKit::WebSettings::indexedDataBasePath):
1546         (BlackBerry::WebKit::WebSettings::setIndexedDataBasePath):
1547         * Api/WebSettings.h:
1548
1549 2012-06-05  Crystal Zhang  <haizhang@rim.com>
1550
1551         [BlackBerry]Differentiate options and group options by TypeOption and TypeOptionInGroup
1552         https://bugs.webkit.org/show_bug.cgi?id=88342
1553
1554         Reviewed by Rob Buis.
1555
1556         RIM PR: 163141
1557
1558         Reviewed internally by Mike Fenton.
1559
1560         We set all options' type to TypeOption, which can't tell if an option belongs to a group, 
1561         introduce TypeOptionInGroup to fix it.
1562
1563         * WebKitSupport/InputHandler.cpp:
1564         (BlackBerry::WebKit::InputHandler::openSelectPopup):
1565
1566 2012-06-05  Adam Barth  <abarth@webkit.org>
1567
1568         Remove support for target-densitydpi in the viewport meta tag
1569         https://bugs.webkit.org/show_bug.cgi?id=88047
1570
1571         Reviewed by Kenneth Rohde Christiansen.
1572
1573         * Api/WebPage.cpp:
1574         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
1575         * Api/WebViewportArguments.cpp:
1576         (BlackBerry::WebKit::WebViewportArguments::targetDensityDpi):
1577         (BlackBerry::WebKit::WebViewportArguments::setTargetDensityDpi):
1578         * Api/WebViewportArguments.h:
1579
1580 2012-06-05  Konrad Piascik  <kpiascik@rim.com>
1581
1582         [BlackBerry]Web Inspector highlight is slow
1583         https://bugs.webkit.org/show_bug.cgi?id=88331
1584
1585         Reviewed by Rob Buis.
1586
1587         Highlight is slow on large pages because of constant repaint calls.
1588         Change to use the accelerated layer highlight all the time.
1589
1590         * Api/BackingStore.cpp:
1591         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
1592         * WebCoreSupport/InspectorClientBlackBerry.cpp:
1593         (WebCore::InspectorClientBlackBerry::highlight):
1594         (WebCore::InspectorClientBlackBerry::hideHighlight):
1595         * WebCoreSupport/InspectorOverlay.cpp:
1596         (WebCore::InspectorOverlay::clear):
1597         (WebCore::InspectorOverlay::update):
1598
1599 2012-06-04  Andrew Lo  <anlo@rim.com>
1600
1601         [BlackBerry] Split AnimationFrameRateController into its own file
1602         https://bugs.webkit.org/show_bug.cgi?id=88242
1603
1604         Reviewed by Antonio Gomes.
1605
1606         Include new header file to reflect re-organization of platform animation
1607         header files.
1608
1609         * Api/WebPageCompositor_p.h:
1610
1611 2012-06-02  Antonio Gomes  <agomes@rim.com>
1612
1613         [BlackBerry] browser video player fullscreen mode (portrait) - out of screen/focus - cannot navigate or use the buttons on the screen (PART III)
1614         https://bugs.webkit.org/show_bug.cgi?id=88019
1615
1616         Reviewed by George Staikos.
1617
1618         Enter 'pure-with-mouse-conversion' mode when going fullscreen, so
1619         that it prevents user from scrolling the WebPage, pinch zooming,
1620         touch-and-hold, enter selection mode, etc ...
1621
1622         Internally reviewed by Gen Mak.
1623
1624         * Api/WebPage.cpp:
1625         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
1626         (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
1627         (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
1628         * Api/WebPage_p.h:
1629         (WebPagePrivate):
1630
1631 2012-06-02  Antonio Gomes  <agomes@rim.com>
1632
1633         [BlackBerry] browser video player fullscreen mode (portrait) - out of screen/focus - cannot navigate or use the buttons on the screen (PART II)
1634         https://bugs.webkit.org/show_bug.cgi?id=88019
1635
1636         Reviewed by George Staikos.
1637
1638         When an element goes fullscreen, its wrapper/container obeys all
1639         BlackBerry specific fixed position customizations: we fixed
1640         against Y, but not X. Then, in order to have the wrapper element
1641         properly positioned when entering fullscreen mode, we
1642         temporarily scroll x to 0.
1643
1644         The original x scroll position is restored when we leave
1645         fullscreen.
1646
1647         * Api/WebPage.cpp:
1648         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
1649         (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
1650         (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
1651         * Api/WebPage_p.h:
1652         (WebPagePrivate):
1653
1654 2012-06-02  Antonio Gomes  <agomes@rim.com>
1655
1656         [BlackBerry] browser video player fullscreen mode (portrait) - out of screen/focus - cannot navigate or use the buttons on the screen (PART I)
1657         https://bugs.webkit.org/show_bug.cgi?id=88019
1658         PR #158266
1659
1660         Reviewed by George Staikos.
1661
1662         The way elements go fullscreen with the new FULLSCREEN_API
1663         is that they get cloned and added to an out-of-DOM wrapper
1664         element. The wrapper is a normal fixed position element and
1665         then zoom in/out accordingly to how other layers do: following
1666         WebPage's scale.
1667
1668         When going fullscreen, we have to take the current WebPage scale
1669         into account in order to properly fit the element to the screen,
1670         regardless the web page scale.
1671
1672         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1673         (WebCore):
1674         (WebCore::ChromeClientBlackBerry::fullScreenRendererChanged):
1675         * WebCoreSupport/ChromeClientBlackBerry.h:
1676         (ChromeClientBlackBerry):
1677
1678 2012-06-01  Crystal Zhang  <haizhang@rim.com>
1679
1680         [BlackBerry] Fix the return value checking in SelectPopupClient
1681         https://bugs.webkit.org/show_bug.cgi?id=88130
1682
1683         Reviewed by Rob Buis.
1684
1685         In SelectPopupClient, return '1' means selected, '0' means not selected, 
1686         the ASCII value of '0' is 48, not 32, use '0' to be more readable.
1687
1688         * WebCoreSupport/SelectPopupClient.cpp:
1689         (WebCore::SelectPopupClient::setValueAndClosePopup):
1690
1691 2012-06-01  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1692
1693         [BlackBerry] Add end editing handling into AutofillManager
1694         https://bugs.webkit.org/show_bug.cgi?id=88071
1695
1696         Reviewed by Rob Buis.
1697
1698         RIM PR: 160857
1699         Implemented EditorClientBlackBerry::textFieldDidEndEditing
1700         to notify AutofillManager to send the dismissing autofill
1701         dialog notification to webpage client.
1702
1703         No new tests since there is no behavior changes.
1704
1705         * Api/WebPage.cpp:
1706         (BlackBerry::WebKit::WebPagePrivate::notifyDismissAutofillDialog):
1707         (WebKit):
1708         * Api/WebPageClient.h:
1709         * Api/WebPage_p.h:
1710         (WebPagePrivate):
1711         * WebCoreSupport/AutofillManager.cpp:
1712         (WebCore::AutofillManager::textFieldDidEndEditing):
1713         (WebCore):
1714         * WebCoreSupport/AutofillManager.h:
1715         (AutofillManager):
1716         * WebCoreSupport/EditorClientBlackBerry.cpp:
1717         (WebCore::EditorClientBlackBerry::textFieldDidEndEditing):
1718
1719 2012-05-31  Jacky Jiang  <zhajiang@rim.com>
1720
1721         [BlackBerry] Bridge Apps - Apps do not redraw correctly after orientation change
1722         https://bugs.webkit.org/show_bug.cgi?id=88033
1723
1724         Reviewed by Rob Buis.
1725         Patch by Jacky Jiang <zhajiang@rim.com>
1726
1727         PR: 142961
1728         When bridge apps were in carousel mode, the backing store was inactive
1729         as its memory had been released. When we rotated the device, we would
1730         call WebPagPrivate:setViewportSize and resume screen and backing store
1731         to render and blit visible contents. As backing store was inactive and
1732         the window usage was GLES2Usage, we were neither doing backing store
1733         rendering nor direct rendering. Therefore, we drew layers directly
1734         based on the invalid texture contents when blitting contents if
1735         accelerated compositing was enabled.
1736         This patch forces compositing mode to let the accelerated compositing
1737         layer take care of the rendering which can update texture contents
1738         before drawing when backing store is inactive and is openGL compositing.
1739
1740         Reviewed internally by George Staikos and Arvid Nilsson.
1741
1742         * Api/BackingStore.cpp:
1743         (BlackBerry::WebKit::BackingStorePrivate::resumeScreenAndBackingStoreUpdates):
1744
1745 2012-05-31  Hajime Morrita  <morrita@chromium.org>
1746
1747         REGRESSION(r117572): editing/spelling/spellcheck-async-remove-frame.html crashes on Mac
1748         https://bugs.webkit.org/show_bug.cgi?id=86859
1749
1750         Reviewed by Ryosuke Niwa.
1751
1752         * WebCoreSupport/EditorClientBlackBerry.cpp:
1753         (WebCore::EditorClientBlackBerry::requestCheckingOfString):
1754         * WebCoreSupport/EditorClientBlackBerry.h:
1755         (EditorClientBlackBerry):
1756
1757 2012-05-31  Arvid Nilsson  <anilsson@rim.com>
1758
1759         [BlackBerry] WebGL and 2D canvas output not available to WebPageCompositor
1760         https://bugs.webkit.org/show_bug.cgi?id=88012
1761
1762         Reviewed by George Staikos.
1763
1764         Properly set up resource sharing between WebKit thread EGL contexts and
1765         the compositing thread EGL context, so the texture ID produced by WebGL
1766         and 2D canvas makes sense to the compositing context.
1767
1768         There's no public API to supply an EGLContext yet, so we're lucky that
1769         the embedder never makes its context un-current. Just grab the current
1770         context on the compositing thread and use that as the compositing
1771         context.
1772
1773         * Api/WebPage.cpp:
1774         (BlackBerry::WebKit::WebPagePrivate::setCompositor):
1775         * Api/WebPageCompositor.cpp:
1776         (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor):
1777         (BlackBerry::WebKit::WebPageCompositor::~WebPageCompositor):
1778         * Api/WebPage_p.h:
1779         (WebPagePrivate):
1780
1781 2012-05-31  George Staikos  <staikos@webkit.org>
1782
1783         [Blackberry] Initialize the select client and delete the pointer
1784         in the destructor so it doesn't leak.  Fixes test crashes.
1785         https://bugs.webkit.org/show_bug.cgi?id=87992
1786
1787         Reviewed by Rob Buis.
1788
1789         * WebKitSupport/InputHandler.cpp:
1790         (BlackBerry::WebKit::InputHandler::InputHandler):
1791         (BlackBerry::WebKit::InputHandler::~InputHandler):
1792
1793 2012-05-31  Arvid Nilsson  <anilsson@rim.com>
1794
1795         [BlackBerry] Crash when destroying WebOverlay with active WebOverlayOverride
1796         https://bugs.webkit.org/show_bug.cgi?id=87968
1797
1798         Reviewed by Rob Buis.
1799
1800         The override object is using a compositing thread WebOverlayPrivate
1801         object with no client because the layer doesn't delegate drawing to the
1802         WebOverlayPrivate, it's only used to modify the override properties on
1803         the underlying compositing thread layer.
1804
1805         Since the m_layerCompositingThreadClient is optional, we have to add
1806         null checks.
1807
1808         * Api/WebOverlay.cpp:
1809         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::~WebOverlayPrivateCompositingThread):
1810         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setClient):
1811         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setContentsToImage):
1812         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setContentsToColor):
1813         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setDrawsContent):
1814         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::invalidate):
1815
1816 2012-05-31  Chris Guan  <chris.guan@torchmobile.com.cn>
1817
1818         [Blackberry] WebKit's fullscreen mode needs to notify page client.
1819         https://bugs.webkit.org/show_bug.cgi?id=87337
1820
1821         Reviewed by Antonio Gomes.
1822
1823         Move "fullScreenVideoCapable" into webpagePrivate to make code
1824         clean for "fullScreenForElement/Node" of cromeClientBlackberry,
1825         All Video checks and code path selections are in webpagePrivate now.
1826         For some UX and secure reasons, we could not apply fullscreen capacity
1827         for all elements, So we use client's fullscreenStart/Stop only for
1828         those video elements and those elements containing video tags.
1829
1830         * Api/WebPage.cpp:
1831         (BlackBerry::WebKit::WebPagePrivate::webContext):
1832         (BlackBerry::WebKit::WebPage::notifyFullScreenVideoExited):
1833         (WebKit):
1834         (BlackBerry::WebKit::containsVideoTags):
1835         (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
1836         (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
1837         * Api/WebPageClient.h:
1838         * Api/WebPage_p.h:
1839         (WebCore):
1840         (WebPagePrivate):
1841         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1842         (WebCore::ChromeClientBlackBerry::enterFullScreenForElement):
1843         (WebCore::ChromeClientBlackBerry::exitFullScreenForElement):
1844
1845 2012-05-31  Arvid Nilsson  <anilsson@rim.com>
1846
1847         [BlackBerry] Crash when closing web page if selection is active
1848         https://bugs.webkit.org/show_bug.cgi?id=87962
1849
1850         Reviewed by Antonio Gomes.
1851
1852         The embedder may try to remove a layer from the compositor at a stage
1853         where the compositor has been set to 0.
1854
1855         * Api/WebPage.cpp:
1856         (BlackBerry::WebKit::WebPage::addCompositingThreadOverlay):
1857         (BlackBerry::WebKit::WebPage::removeCompositingThreadOverlay):
1858
1859 2012-05-30  Konrad Piascik  <kpiascik@rim.com>
1860
1861         [BlackBerry] Add an Accelerated Compositing layer for Web Inspector DOM highlight.
1862         https://bugs.webkit.org/show_bug.cgi?id=81001
1863
1864         Reviewed by Antonio Gomes.
1865         
1866         Implemented InspectorOverlay using WebOverlayAPI.
1867
1868         * Api/BackingStore.cpp:
1869         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
1870         * Api/WebPage.cpp:
1871         (BlackBerry::WebKit::WebPagePrivate::updateDelegatedOverlays):
1872         (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
1873         (BlackBerry::WebKit::WebPagePrivate::setInspectorOverlayClient):
1874         (WebKit):
1875         * Api/WebPage_p.h:
1876         (WebCore):
1877         (WebPagePrivate):
1878         * WebCoreSupport/InspectorClientBlackBerry.cpp:
1879         (WebCore::InspectorClientBlackBerry::highlight):
1880         (WebCore::InspectorClientBlackBerry::hideHighlight):
1881         (WebCore::InspectorClientBlackBerry::paintInspectorOverlay):
1882         (WebCore):
1883         * WebCoreSupport/InspectorClientBlackBerry.h:
1884         (InspectorClientBlackBerry):
1885         * WebCoreSupport/InspectorOverlay.cpp: Added.
1886         (WebCore):
1887         (WebCore::InspectorOverlay::create):
1888         (WebCore::InspectorOverlay::InspectorOverlay):
1889         (WebCore::InspectorOverlay::notifySyncRequired):
1890         (WebCore::InspectorOverlay::paintContents):
1891         (WebCore::InspectorOverlay::showDebugBorders):
1892         (WebCore::InspectorOverlay::showRepaintCounter):
1893         (WebCore::InspectorOverlay::contentsVisible):
1894         (WebCore::InspectorOverlay::~InspectorOverlay):
1895         (WebCore::InspectorOverlay::clear):
1896         (WebCore::InspectorOverlay::update):
1897         (WebCore::InspectorOverlay::paintWebFrame):
1898         (WebCore::InspectorOverlay::invalidateWebFrame):
1899         * WebCoreSupport/InspectorOverlay.h: Added.
1900         (WebKit):
1901         (WebCore):
1902         (InspectorOverlay):
1903         (InspectorOverlayClient):
1904         (WebCore::InspectorOverlay::setClient):
1905         (WebCore::InspectorOverlay::notifyAnimationStarted):
1906
1907 2012-05-30  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
1908
1909         [BlackBerry] Browser crashed when selecting in textarea
1910         https://bugs.webkit.org/show_bug.cgi?id=87484
1911
1912         The function FatFingers::checkForText() uses host node's whole text
1913         to checkFingerIntersection(). We should not give the text of shadow
1914         nodes to it.
1915
1916         Reviewed by Antonio Gomes.
1917
1918         * WebKitSupport/FatFingers.cpp:
1919         (BlackBerry::WebKit::FatFingers::getNodesFromRect): Avoid returning
1920         shadow nodes when the context is Text node.
1921
1922 2012-05-30  Zoltan Horvath  <zoltan@webkit.org>
1923
1924         [Qt] Set WebCore imagedecoders as default and add fallback to QImageDecoder
1925         https://bugs.webkit.org/show_bug.cgi?id=80400
1926
1927         Get rid of QT_IMAGE_DECODER flag.
1928
1929         Reviewed by Simon Hausmann.
1930
1931         * WebCoreSupport/AboutDataEnableFeatures.in:
1932
1933 2012-05-29  Max Feil  <mfeil@rim.com>
1934
1935         [BlackBerry] The Page's deviceScaleFactor() is not being properly maintained
1936         https://bugs.webkit.org/show_bug.cgi?id=87817
1937
1938         Reviewed by Antonio Gomes.
1939
1940         This bug fix in WebKit/blackberry is needed by the changes for
1941         fullscreen media control sizing in WebCore (bug 87551). The sizing
1942         of controls depends on the page's deviceScaleFactor(), which was
1943         not being maintained properly due to errors in logic. Viewport
1944         changes from non-default to default were being erroneously
1945         thrown out. Also, when the viewport did change back to default
1946         the deviceScaleFactor was not being updated.
1947
1948         * Api/WebPage.cpp:
1949         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
1950         (BlackBerry::WebKit::WebPagePrivate::dispatchViewportPropertiesDidChange):
1951
1952 2012-05-29  Arvid Nilsson  <anilsson@rim.com>
1953
1954         [BlackBerry] WebOverlay build fixes and bug fixes
1955         https://bugs.webkit.org/show_bug.cgi?id=87780
1956
1957         Reviewed by Rob Buis.
1958
1959         Fix build when accelerated compositing disabled, or debug build.
1960
1961         Also fix a bug where the selection overlay would not disappear properly
1962         because of a typo in WebPage::removeOverlay(). Also convert said method
1963         to early return style.
1964
1965         Debug build fixes contributed by Ming Xie.
1966
1967         * Api/WebOverlay.cpp:
1968         (BlackBerry::WebKit::WebOverlay::addAnimation):
1969         (BlackBerry::WebKit::WebOverlay::setContentsToImage):
1970         (WebKit):
1971         (BlackBerry::WebKit::WebOverlay::setContentsToColor):
1972         (BlackBerry::WebKit::WebOverlay::setDrawsContent):
1973         (BlackBerry::WebKit::WebOverlay::invalidate):
1974         (BlackBerry::WebKit::WebOverlay::setClient):
1975         (BlackBerry::WebKit::WebOverlay::override):
1976         (BlackBerry::WebKit::WebOverlay::resetOverrides):
1977         * Api/WebOverlayOverride.cpp:
1978         (BlackBerry::WebKit::WebOverlayOverride::WebOverlayOverride):
1979         * Api/WebOverlay_p.h:
1980         (BlackBerry::WebKit::WebOverlayPrivate::~WebOverlayPrivate):
1981         * Api/WebPage.cpp:
1982         (BlackBerry::WebKit::WebPage::removeOverlay):
1983         (BlackBerry::WebKit::WebPage::addCompositingThreadOverlay):
1984         (BlackBerry::WebKit::WebPage::removeCompositingThreadOverlay):
1985
1986 2012-05-29  Yong Li  <yoli@rim.com>
1987
1988         [BlackBerry] Add malloc info to about:memory page
1989         https://bugs.webkit.org/show_bug.cgi?id=87676
1990
1991         Reviewed by Rob Buis.
1992
1993         Detailed malloc info can tell us how much memory
1994         in the heaps is being in use.
1995
1996         * WebCoreSupport/AboutData.cpp:
1997         (WebCore::memoryPage):
1998
1999 2012-05-29  Arvid Nilsson  <anilsson@rim.com>
2000
2001         [BlackBerry] Make DefaultTapHighlight use the new WebOverlay API
2002         https://bugs.webkit.org/show_bug.cgi?id=87604
2003
2004         Reviewed by Antonio Gomes.
2005
2006         Also add a new method to allow the embedder to use the default tap
2007         highlight instead of replacing it with a custom one just to keep track
2008         of the "shouldHideAfterScroll" flag.
2009
2010         PR #160262.
2011
2012         * Api/WebTapHighlight.h:
2013         * WebKitSupport/DefaultTapHighlight.cpp:
2014         (BlackBerry::WebKit::DefaultTapHighlight::DefaultTapHighlight):
2015         (BlackBerry::WebKit::DefaultTapHighlight::draw):
2016         (BlackBerry::WebKit::DefaultTapHighlight::hide):
2017         (BlackBerry::WebKit::DefaultTapHighlight::paintContents):
2018         * WebKitSupport/DefaultTapHighlight.h:
2019         (BlackBerry::WebKit::DefaultTapHighlight::shouldHideAfterScroll):
2020         (DefaultTapHighlight):
2021
2022 2012-05-29  Arvid Nilsson  <anilsson@rim.com>
2023
2024         [BlackBerry] WebKit-side implementation of SelectionOverlay
2025         https://bugs.webkit.org/show_bug.cgi?id=87605
2026
2027         Reviewed by Rob Buis.
2028
2029         Leverage the new WebOverlay API to move SelectionOverlay to the WebKit
2030         library, so we always draw selection regardless of which embedder is
2031         integrating WebKit.
2032
2033         PR #160263
2034
2035         * Api/WebPage.cpp:
2036         (BlackBerry::WebKit::WebPagePrivate::init):
2037         (BlackBerry::WebKit::WebPage::selectionOverlay):
2038         (WebKit):
2039         * Api/WebPage.h:
2040         (WebKit):
2041         * Api/WebPage_p.h:
2042         (WebPagePrivate):
2043         * Api/WebSelectionOverlay.h: Added.
2044         (WebKit):
2045         * WebKitSupport/SelectionHandler.cpp:
2046         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
2047         * WebKitSupport/SelectionOverlay.cpp: Added.
2048         (WebKit):
2049         (BlackBerry::WebKit::SelectionOverlay::SelectionOverlay):
2050         (BlackBerry::WebKit::SelectionOverlay::~SelectionOverlay):
2051         (BlackBerry::WebKit::SelectionOverlay::draw):
2052         (BlackBerry::WebKit::SelectionOverlay::hide):
2053         (BlackBerry::WebKit::SelectionOverlay::notifySyncRequired):
2054         (BlackBerry::WebKit::SelectionOverlay::paintContents):
2055         * WebKitSupport/SelectionOverlay.h: Added.
2056         (WebKit):
2057         (SelectionOverlay):
2058         (BlackBerry::WebKit::SelectionOverlay::create):
2059         (BlackBerry::WebKit::SelectionOverlay::notifyAnimationStarted):
2060         (BlackBerry::WebKit::SelectionOverlay::showDebugBorders):
2061         (BlackBerry::WebKit::SelectionOverlay::showRepaintCounter):
2062         (BlackBerry::WebKit::SelectionOverlay::contentsVisible):
2063
2064 2012-05-29  Arvid Nilsson  <anilsson@rim.com>
2065
2066         [BlackBerry] WebOverlay API
2067         https://bugs.webkit.org/show_bug.cgi?id=87603
2068
2069         Reviewed by Rob Buis.
2070
2071         This new API makes it possible to leverage the BlackBerry accelerated
2072         compositing implementation to draw, transform and fluidly animate
2073         overlays in the embedding library or application.
2074
2075         A WebOverlay has an affinity for the thread where it was created. If
2076         the current thread is the WebKit thread, use WebPage::addOverlay() to
2077         add it to the page, and manipulate it only from the WebKit thread, with
2078         exception of the "override" functionality which can be used from the
2079         compositing thread. If the current thread is the compositing thread,
2080         use WebPage::addCompositingThreadOverlay() to add it to the page, and
2081         only manipulate it on the compositing thread.
2082
2083         A WebOverlay can be painted using Skia, or its contents can be set to
2084         an image or a solid color.
2085
2086         PR #156812
2087
2088         * Api/WebAnimation.cpp: Added.
2089         (WebKit):
2090         (BlackBerry::WebKit::WebAnimation::fadeAnimation):
2091         (BlackBerry::WebKit::WebAnimation::name):
2092         (BlackBerry::WebKit::WebAnimation::WebAnimation):
2093         (BlackBerry::WebKit::WebAnimation::~WebAnimation):
2094         (BlackBerry::WebKit::WebAnimation::operator=):
2095         * Api/WebAnimation.h: Added.
2096         (WebKit):
2097         * Api/WebAnimation_p.h: Added.
2098         (WebKit):
2099         (WebAnimationPrivate):
2100         (BlackBerry::WebKit::WebAnimationPrivate::WebAnimationPrivate):
2101         * Api/WebOverlay.cpp: Added.
2102         (WebKit):
2103         (BlackBerry::WebKit::WebOverlay::WebOverlay):
2104         (BlackBerry::WebKit::WebOverlay::~WebOverlay):
2105         (BlackBerry::WebKit::WebOverlay::position):
2106         (BlackBerry::WebKit::WebOverlay::setPosition):
2107         (BlackBerry::WebKit::WebOverlay::anchorPoint):
2108         (BlackBerry::WebKit::WebOverlay::setAnchorPoint):
2109         (BlackBerry::WebKit::WebOverlay::size):
2110         (BlackBerry::WebKit::WebOverlay::setSize):
2111         (BlackBerry::WebKit::WebOverlay::sizeIsScaleInvariant):
2112         (BlackBerry::WebKit::WebOverlay::setSizeIsScaleInvariant):
2113         (BlackBerry::WebKit::WebOverlay::transform):
2114         (BlackBerry::WebKit::WebOverlay::setTransform):
2115         (BlackBerry::WebKit::WebOverlay::opacity):
2116         (BlackBerry::WebKit::WebOverlay::setOpacity):
2117         (BlackBerry::WebKit::WebOverlay::addAnimation):
2118         (BlackBerry::WebKit::WebOverlay::removeAnimation):
2119         (BlackBerry::WebKit::WebOverlay::parent):
2120         (BlackBerry::WebKit::WebOverlay::addChild):
2121         (BlackBerry::WebKit::WebOverlay::removeFromParent):
2122         (BlackBerry::WebKit::WebOverlay::setContentsToImage):
2123         (BlackBerry::WebKit::WebOverlay::setContentsToColor):
2124         (BlackBerry::WebKit::WebOverlay::setDrawsContent):
2125         (BlackBerry::WebKit::WebOverlay::invalidate):
2126         (BlackBerry::WebKit::WebOverlay::setClient):
2127         (BlackBerry::WebKit::WebOverlay::override):
2128         (BlackBerry::WebKit::WebOverlay::resetOverrides):
2129         (BlackBerry::WebKit::WebOverlayPrivate::page):
2130         (BlackBerry::WebKit::WebOverlayPrivate::override):
2131         (BlackBerry::WebKit::WebOverlayPrivate::drawContents):
2132         (BlackBerry::WebKit::WebOverlayPrivate::scheduleCompositingRun):
2133         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::WebOverlayPrivateWebKitThread):
2134         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::override):
2135         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::position):
2136         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setPosition):
2137         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::anchorPoint):
2138         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setAnchorPoint):
2139         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::size):
2140         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setSize):
2141         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::sizeIsScaleInvariant):
2142         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setSizeIsScaleInvariant):
2143         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::transform):
2144         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setTransform):
2145         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::opacity):
2146         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setOpacity):
2147         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::addAnimation):
2148         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::removeAnimation):
2149         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::addChild):
2150         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::removeFromParent):
2151         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setContentsToImage):
2152         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setContentsToColor):
2153         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setDrawsContent):
2154         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::clear):
2155         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::invalidate):
2156         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::resetOverrides):
2157         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::notifySyncRequired):
2158         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::paintContents):
2159         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::WebOverlayLayerCompositingThreadClient):
2160         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::~WebOverlayLayerCompositingThreadClient):
2161         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::setDrawsContent):
2162         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::invalidate):
2163         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::setContents):
2164         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::setContentsToColor):
2165         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::layerCompositingThreadDestroyed):
2166         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::layerVisibilityChanged):
2167         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded):
2168         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::drawTextures):
2169         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::deleteTextures):
2170         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::WebOverlayPrivateCompositingThread):
2171         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::~WebOverlayPrivateCompositingThread):
2172         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setClient):
2173         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::override):
2174         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::position):
2175         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setPosition):
2176         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::anchorPoint):
2177         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setAnchorPoint):
2178         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::size):
2179         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setSize):
2180         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::sizeIsScaleInvariant):
2181         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setSizeIsScaleInvariant):
2182         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::transform):
2183         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setTransform):
2184         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::opacity):
2185         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setOpacity):
2186         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::addAnimation):
2187         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::removeAnimation):
2188         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::addChild):
2189         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::removeFromParent):
2190         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setContentsToImage):
2191         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setContentsToColor):
2192         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setDrawsContent):
2193         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::clear):
2194         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::invalidate):
2195         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::resetOverrides):
2196         * Api/WebOverlay.h: Added.
2197         (WebCore):
2198         (WebKit):
2199         * Api/WebOverlayClient.h: Added.
2200         (WebKit):
2201         * Api/WebOverlayOverride.cpp: Added.
2202         (WebKit):
2203         (BlackBerry::WebKit::WebOverlayOverride::WebOverlayOverride):
2204         (BlackBerry::WebKit::WebOverlayOverride::~WebOverlayOverride):
2205         (BlackBerry::WebKit::WebOverlayOverride::setPosition):
2206         (BlackBerry::WebKit::WebOverlayOverride::setAnchorPoint):
2207         (BlackBerry::WebKit::WebOverlayOverride::setSize):
2208         (BlackBerry::WebKit::WebOverlayOverride::setTransform):
2209         (BlackBerry::WebKit::WebOverlayOverride::setOpacity):
2210         (BlackBerry::WebKit::WebOverlayOverride::addAnimation):
2211         (BlackBerry::WebKit::WebOverlayOverride::removeAnimation):
2212         * Api/WebOverlayOverride.h: Added.
2213         (WebKit):
2214         * Api/WebOverlay_p.h: Added.
2215         (WTF):
2216         (WebCore):
2217         (WebKit):
2218         (WebOverlayPrivate):
2219         (BlackBerry::WebKit::WebOverlayPrivate::WebOverlayPrivate):
2220         (BlackBerry::WebKit::WebOverlayPrivate::~WebOverlayPrivate):
2221         (BlackBerry::WebKit::WebOverlayPrivate::setPage):
2222         (BlackBerry::WebKit::WebOverlayPrivate::setClient):
2223         (BlackBerry::WebKit::WebOverlayPrivate::layerCompositingThread):
2224         (BlackBerry::WebKit::WebOverlayPrivate::graphicsLayer):
2225         (WebOverlayPrivateWebKitThread):
2226         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::graphicsLayer):
2227         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::notifyAnimationStarted):
2228         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::showDebugBorders):
2229         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::showRepaintCounter):
2230         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::contentsVisible):
2231         (WebOverlayLayerCompositingThreadClient):
2232         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::setLayer):
2233         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::setClient):
2234         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::drawsContent):
2235         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::contents):
2236         (WebOverlayPrivateCompositingThread):
2237         * Api/WebPage.cpp:
2238         (BlackBerry::WebKit::WebPage::addOverlay):
2239         (WebKit):
2240         (BlackBerry::WebKit::WebPage::removeOverlay):
2241         (BlackBerry::WebKit::WebPage::addCompositingThreadOverlay):
2242         (BlackBerry::WebKit::WebPage::removeCompositingThreadOverlay):
2243         * Api/WebPage.h:
2244         (WebKit):
2245         * Api/WebPageCompositor.cpp:
2246         (BlackBerry::WebKit::WebPageCompositorPrivate::prepareFrame):
2247         (BlackBerry::WebKit::WebPageCompositorPrivate::render):
2248         (WebKit):
2249         (BlackBerry::WebKit::WebPageCompositorPrivate::compositeLayers):
2250         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
2251         (BlackBerry::WebKit::WebPageCompositorPrivate::addOverlay):
2252         (BlackBerry::WebKit::WebPageCompositorPrivate::removeOverlay):
2253         * Api/WebPageCompositor_p.h:
2254         (BlackBerry::WebKit::WebPageCompositorPrivate::compositingThreadOverlayLayer):
2255         (WebPageCompositorPrivate):
2256
2257 2012-05-28  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2258
2259         [BlackBerry] http authenticate dialog popup only once no matter authentication pass or fail
2260         https://bugs.webkit.org/show_bug.cgi?id=80135
2261
2262         Reviewed by Rob Buis.
2263
2264         RIM PR: 145660
2265         Fixed a regression introduced by r111810, which used the wrong
2266         credential object.
2267
2268         Added the interface function didReceivedAuthenticaitonChallenge()
2269         in interface class DumpRenderTreeClient;
2270         Called m_dumpRenderTree->didReceiveAuthenticationChallenge() in
2271         WebPagePrivate::authenticationChallenge() when DRT is enabled.
2272
2273         Test: reuse existing test cases:
2274         http/tests/loading/basic-credentials-sent-automatically.html
2275         http/tests/loading/basic-auth-resend-wrong-credentials.html
2276
2277         Resubmit the patch reverted by r115104 after the digest infinite loop
2278         issue for BlackBerry porting get identified and fixed.
2279
2280         Internally reviewed by Joe Mason <jmason@rim.com>
2281
2282         * Api/DumpRenderTreeClient.h:
2283         (WebCore):
2284         * Api/WebPage.cpp:
2285         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
2286         * Api/WebPageClient.h:
2287         * Api/WebPage_p.h:
2288         (WebPagePrivate):
2289
2290 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
2291
2292         [BlackBerry] Always create a compositor
2293         https://bugs.webkit.org/show_bug.cgi?id=87598
2294
2295         Reviewed by Rob Buis.
2296
2297         There will likely be compositing layers either due to web content or
2298         due to overlays.
2299
2300         Defer initialization of OpenGL objects (i.e., delay creation of the
2301         LayerRenderer object) until we actually need to draw and there are such
2302         layers, to avoid initializing OpenGL in the unlikely case that there
2303         are no compositing layers or overlay layers.
2304
2305         PR #156811
2306
2307         * Api/WebPage.cpp:
2308         (BlackBerry::WebKit::WebPagePrivate::init):
2309         (BlackBerry::WebKit::WebPagePrivate::createCompositor):
2310         * Api/WebPageCompositor.cpp:
2311         (BlackBerry::WebKit::WebPageCompositorPrivate::setContext):
2312         (BlackBerry::WebKit::WebPageCompositorPrivate::prepareFrame):
2313         (BlackBerry::WebKit::WebPageCompositorPrivate::render):
2314         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
2315         * Api/WebPageCompositor_p.h:
2316         (WebPageCompositorPrivate):
2317
2318 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
2319
2320         [BlackBerry] Dangling pointer in WebPagePrivate::setCompositor() message
2321         https://bugs.webkit.org/show_bug.cgi?id=87590
2322
2323         Reviewed by Rob Buis.
2324
2325         A crash would be seen in GuardedPointerBase::getWithGuardLocked when
2326         attempting to unpickle and execute serialized call to setCompositor.
2327
2328         The problem was that the message had been created with a dangling
2329         pointer as the target. The web page failed to inform its compositor
2330         that it was being destroyed due to an early return in
2331         WebPagePrivate::destroyCompositor.
2332
2333         The root cause was that a method called "destroyCompositor" was being
2334         called in two situations, when navigating to a new page as well as when
2335         actually deleting the web page. And in one case, we really only wanted
2336         to free up some memory by clearing textures, while in the other case we
2337         really did want to destroy the compositor.
2338
2339         Fixed by calling a method to release textures when that's what we want
2340         to do, and calling a method to destroy the compositor when that's what
2341         we want to do, and making that latter method unconditional.
2342
2343         Reviewed internally by Jeff Rogers.
2344
2345         PR #156765
2346
2347         * Api/WebPage.cpp:
2348         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
2349         (BlackBerry::WebKit::WebPagePrivate::destroyCompositor):
2350
2351 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
2352
2353         [BlackBerry] Add a default tap highlight
2354         https://bugs.webkit.org/show_bug.cgi?id=87569
2355
2356         Reviewed by Rob Buis.
2357
2358         We used to require the embedder to implement tap highlight drawing.
2359         Now, a default tap highlight, implemented using the recently added
2360         accelerated compositing overlay layer support, can be used instead.
2361
2362         The tap highlight appears instantly but fades out when hidden.
2363
2364         The default tap highlight can be overridden using the new
2365         WebPage::setTapHighlight() method.
2366
2367         Reviewed internally by Mike Lattanzio and Mike Fenton.
2368
2369         PR #154329
2370
2371         * Api/WebPage.cpp:
2372         (BlackBerry::WebKit::WebPagePrivate::init):
2373         (BlackBerry::WebKit::WebPage::tapHighlight):
2374         (WebKit):
2375         (BlackBerry::WebKit::WebPage::setTapHighlight):
2376         * Api/WebPage.h:
2377         (WebKit):
2378         * Api/WebPageClient.h:
2379         * Api/WebPage_p.h:
2380         (WebCore):
2381         (WebPagePrivate):
2382         * Api/WebTapHighlight.h: Added.
2383         (WebKit):
2384         * WebKitSupport/DefaultTapHighlight.cpp: Added.
2385         (WebKit):
2386         (BlackBerry::WebKit::fadeAnimationName):
2387         (BlackBerry::WebKit::DefaultTapHighlight::DefaultTapHighlight):
2388         (BlackBerry::WebKit::DefaultTapHighlight::~DefaultTapHighlight):
2389         (BlackBerry::WebKit::DefaultTapHighlight::draw):
2390         (BlackBerry::WebKit::DefaultTapHighlight::hide):
2391         (BlackBerry::WebKit::DefaultTapHighlight::notifySyncRequired):
2392         (BlackBerry::WebKit::DefaultTapHighlight::paintContents):
2393         * WebKitSupport/DefaultTapHighlight.h: Added.
2394         (WebKit):
2395         (DefaultTapHighlight):
2396         (BlackBerry::WebKit::DefaultTapHighlight::create):
2397         (BlackBerry::WebKit::DefaultTapHighlight::notifyAnimationStarted):
2398         (BlackBerry::WebKit::DefaultTapHighlight::showDebugBorders):
2399         (BlackBerry::WebKit::DefaultTapHighlight::showRepaintCounter):
2400         (BlackBerry::WebKit::DefaultTapHighlight::contentsVisible):
2401         * WebKitSupport/TouchEventHandler.cpp:
2402         (BlackBerry::WebKit::TouchEventHandler::drawTapHighlight):
2403
2404 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
2405
2406         [BlackBerry] Add an overlay layer
2407         https://bugs.webkit.org/show_bug.cgi?id=87567
2408
2409         Reviewed by Antonio Gomes.
2410
2411         The overlay layer allows us to have compositing layers even though the
2412         web page is not currently using accelerated compositing.
2413
2414         These layers can be used to implement tap highlight, inspector overlay
2415         and more.
2416
2417         Reviewed internally by Filip Spacek.
2418
2419         PR #154335
2420
2421         * Api/WebPage.cpp:
2422         (BlackBerry::WebKit::WebPagePrivate::scheduleRootLayerCommit):
2423         (BlackBerry::WebKit::WebPagePrivate::overlayLayer):
2424         (WebKit):
2425         (BlackBerry::WebKit::WebPagePrivate::commitRootLayer):
2426         (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
2427         * Api/WebPageCompositor.cpp:
2428         (BlackBerry::WebKit::WebPageCompositorPrivate::setOverlayLayer):
2429         (WebKit):
2430         (BlackBerry::WebKit::WebPageCompositorPrivate::prepareFrame):
2431         (BlackBerry::WebKit::WebPageCompositorPrivate::render):
2432         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
2433         * Api/WebPageCompositor_p.h:
2434         (BlackBerry::WebKit::WebPageCompositorPrivate::overlayLayer):
2435         (WebPageCompositorPrivate):
2436         * Api/WebPage_p.h:
2437         (WebPagePrivate):
2438
2439 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
2440
2441         [BlackBerry] Update WebPageCompositor::render() API
2442         https://bugs.webkit.org/show_bug.cgi?id=87565
2443
2444         Reviewed by Rob Buis.
2445
2446         The new API allows the embedder to specify the root transform and many
2447         OpenGL related parameters to be used when rendering the web page.
2448
2449         To honor the transform, we have to implement a way to composite the
2450         BackingStore output using a generic transform. This method,
2451         BackingStorePrivate::compositeContents(), uses a strategy that differs
2452         from blitContents(), because that one is optimized for software
2453         blitting, while this one is optimized for GPU rendering. Specifically,
2454         instead of drawing the checkerboard first, and the rendered subregions
2455         of the tile afterward, we draw the whole tile in one call, and then
2456         draw checkered regions on top, if any.
2457
2458         Removed the blit generation condvar from the new code paths for drawing
2459         BackingStore output using a transform, since the condvar is ineffective
2460         in preventing flicker when we're not in charge of swapping the window.
2461         Instead, another synchronization solution will be implemented in the
2462         future.
2463
2464         Reviewed internally by Filip Spacek.
2465         Some parts reviewed internally by Jacky Jiang and others by
2466         Mike Lattanzio.
2467
2468         PR #151887, #154334
2469
2470         * Api/BackingStore.cpp:
2471         (BlackBerry::WebKit::BackingStorePrivate::render):
2472         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
2473         (WebKit):
2474         (BlackBerry::WebKit::BackingStorePrivate::compositeContents):
2475         * Api/BackingStore_p.h:
2476         (WebCore):
2477         (BackingStorePrivate):
2478         * Api/WebPageCompositor.cpp:
2479         (BlackBerry::WebKit::WebPageCompositorPrivate::setContext):
2480         (BlackBerry::WebKit::WebPageCompositorPrivate::setRootLayer):
2481         (BlackBerry::WebKit::WebPageCompositorPrivate::prepareFrame):
2482         (BlackBerry::WebKit::WebPageCompositorPrivate::render):
2483         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
2484         (BlackBerry::WebKit::WebPageCompositor::prepareFrame):
2485         (BlackBerry::WebKit::WebPageCompositor::render):
2486         * Api/WebPageCompositor.h:
2487         * Api/WebPageCompositorClient.h:
2488         * Api/WebPageCompositor_p.h:
2489         (WebPageCompositorPrivate):
2490         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2491
2492 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
2493
2494         [BlackBerry] Plumb through the return value of makeCurrent to caller
2495         https://bugs.webkit.org/show_bug.cgi?id=87564
2496
2497         Reviewed by Rob Buis.
2498
2499         This way the caller can take appropriate action if makeCurrent fails,
2500         for example because we're running out of memory.
2501
2502         Reviewed internally by George Staikos.
2503
2504         PR #149721
2505
2506         * WebKitSupport/GLES2Context.cpp:
2507         (BlackBerry::WebKit::GLES2Context::makeCurrent):
2508
2509 2012-05-27  Arvid Nilsson  <anilsson@rim.com>
2510
2511         [BlackBerry] Crash when deleting WebPageCompositor
2512         https://bugs.webkit.org/show_bug.cgi?id=87589
2513
2514         Reviewed by Rob Buis.
2515
2516         The WebPageCompositorPrivate is reference counted, so it may outlive
2517         either the WebPage or the WebPageCompositor, depending on who releases
2518         its reference first.
2519
2520         Fixed by disconnecting the objects properly, regardless of who goes
2521         away first.
2522
2523         Reviewed internally by Mike Lattanzio.
2524
2525         PR #156444
2526
2527         * Api/WebPage.cpp:
2528         (BlackBerry::WebKit::WebPagePrivate::setCompositor):
2529         (BlackBerry::WebKit::WebPagePrivate::destroyCompositor):
2530         * Api/WebPageCompositor.cpp:
2531         (BlackBerry::WebKit::WebPageCompositor::~WebPageCompositor):
2532         (BlackBerry::WebKit::WebPageCompositor::client):
2533         * Api/WebPageCompositor_p.h:
2534         (BlackBerry::WebKit::WebPageCompositorPrivate::setPage):
2535
2536 2012-05-27  Arvid Nilsson  <anilsson@rim.com>
2537
2538         2012-04-18  Arvid Nilsson  <anilsson@rim.com>
2539
2540         [BlackBerry] BackingStore accesses tiles even though it's not active
2541         https://bugs.webkit.org/show_bug.cgi?id=87563
2542
2543         Reviewed by Antonio Gomes.
2544
2545         There are many scenarios that can call render and cause tile access,
2546         and they used to be rerouted to the direct rendering code when the
2547         backing store was not active. This was thanks to an implicit check for
2548         isActive() by virtue of calling shouldDirectRenderingToWindow() from
2549         render().
2550
2551         If we're using OpenGL for compositing the backing store contents
2552         however, direct rendering is always disabled and we jump right into the
2553         tile based rendering code.
2554
2555         Fixed by adding an explicit check for isActive() in render(), now that
2556         the implicit check in shouldDirectRenderingToWindow() is conditional on
2557         having raster usage.
2558
2559         Since PR136381/bug83131, when OpenGL compositing is used, and the
2560         backing store is not active, it is not in charge of drawing the root
2561         layer. Instead, we switch off the paintingGoesToWindow flag on the root
2562         RenderLayer so no invalidates will reach the ChromeClient or the
2563         BackingStore any more. Instead, invalidations will cause the root
2564         accelerated compositing layer to be repainted. Any BackingStore render
2565         calls while in this state are pointless, and can safely do an early
2566         return.
2567
2568         Reviewed internally by Jakob Petsovits.
2569
2570         PR #150403
2571
2572         * Api/BackingStore.cpp:
2573         (BlackBerry::WebKit::BackingStorePrivate::render):
2574
2575 2012-05-27  Arvid Nilsson  <anilsson@rim.com>
2576
2577         2012-04-12  Arvid Nilsson  <anilsson@rim.com>
2578
2579         [BlackBerry] Web page fails to render after clicking link with target=_blank
2580         https://bugs.webkit.org/show_bug.cgi?id=87562
2581
2582         Reviewed by Antonio Gomes.
2583
2584         Clicking such a link opens a new tab. The compositor was briefly in
2585         charge of drawing the root layer while the backing store was inactive
2586         and the user was looking at the other tab. The problem was that the
2587         compositor believed it was still painting the root layer even after the
2588         backing store became active again. The flag was not properly cleared
2589         when turning off compositing.
2590
2591         Fixed by returning false from drawsRootLayer() if we don't have a root
2592         layer.
2593
2594         Reviewed internally by Filip Spacek.
2595
2596         PR #149342
2597
2598         * Api/WebPageCompositor.cpp:
2599         (BlackBerry::WebKit::WebPageCompositorPrivate::drawsRootLayer):
2600
2601 2012-05-24  Jacky Jiang  <zhajiang@rim.com>
2602
2603         [BlackBerry] History navigation caused google.com scale not kept
2604         https://bugs.webkit.org/show_bug.cgi?id=87438
2605
2606         Reviewed by Antonio Gomes.
2607         Patch by Jacky Jiang <zhajiang@rim.com>
2608
2609         PR: 159923
2610         For back/forward history navigation, we were trying to keep the values
2611         set by dispatchViewportDataDidChange. However, when we went back from
2612         the previous page, if the current page didn't contain the meta viewport
2613         tag, then those values set by previous page would never be reset.
2614         Although the current page could get correct saved scale when restoring
2615         view state, the scale would still be clamped by zoomToFitScale which
2616         was based on the virtual viewport of the previous page which could make
2617         the scale incorrect.
2618         Since we know the viewport arguments of the current document before
2619         setLoadState on back/forward history navigation, we can reset these
2620         previous values if the document doesn't have viewport arguments during
2621         setLoadState.
2622
2623         * Api/WebPage.cpp:
2624         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
2625
2626 2012-05-25  Mary Wu  <mary.wu@torchmobile.com.cn>
2627
2628         [BlackBerry] Pass http headers to loader in download request
2629         https://bugs.webkit.org/show_bug.cgi?id=87449
2630
2631         Reviewed by Rob Buis.
2632
2633         PR# 149283
2634
2635         This is to support byte-range download and we could pass http headers like
2636         "Range" in download request to loader.
2637
2638         Reviewed internally by Lyon Chen.
2639
2640         * Api/WebPage.cpp:
2641         (BlackBerry::WebKit::WebPage::download):
2642
2643 2012-05-24  Mike Fenton  <mifenton@rim.com>
2644
2645         [BlackBerry] InputHandler can hold a ref on an object when document is cleared.
2646         https://bugs.webkit.org/show_bug.cgi?id=87412
2647
2648         Reviewed by Rob Buis.
2649
2650         PR 145234.
2651
2652         When the document data is cleared, notify the InputHandler
2653         of the associated frame being unloaded.
2654
2655         Reviewed Internally by Nima Ghanavatian.
2656
2657         * Api/WebPage.cpp:
2658         (BlackBerry::WebKit::WebPagePrivate::clearDocumentData):
2659
2660 2012-05-24  Crystal Zhang  <haizhang@rim.com>
2661
2662         [BlackBerry] Implement select popup and remove old hook to air popup
2663         https://bugs.webkit.org/show_bug.cgi?id=87419
2664
2665         Reviewed by Rob Buis.
2666
2667         Introduce new html select popup client, remove the old hook to air popup.
2668
2669         * Api/WebPageClient.h:
2670         * WebCoreSupport/SelectPopupClient.cpp: Added.
2671         (WebCore):
2672         (WebCore::SelectPopupClient::SelectPopupClient):
2673         (WebCore::SelectPopupClient::~SelectPopupClient):
2674         (WebCore::SelectPopupClient::update):
2675         (WebCore::SelectPopupClient::generateHTML):
2676         (WebCore::SelectPopupClient::closePopup):
2677         (WebCore::SelectPopupClient::contentSize):
2678         (WebCore::SelectPopupClient::htmlSource):
2679         (WebCore::SelectPopupClient::setValueAndClosePopup):
2680         (WebCore::SelectPopupClient::didClosePopup):
2681         (WebCore::SelectPopupClient::writeDocument):
2682         * WebCoreSupport/SelectPopupClient.h: Added.
2683         (WebKit):
2684         (WebCore):
2685         (SelectPopupClient):
2686         * WebKitSupport/InputHandler.cpp:
2687         (BlackBerry::WebKit::InputHandler::openSelectPopup):
2688         * WebKitSupport/InputHandler.h:
2689         (WebCore):
2690         (InputHandler):
2691         * WebKitSupport/WebPopupType.h: Added.
2692         (BlackBerry):
2693         (WebKit):
2694
2695 2012-05-24  Antonio Gomes  <agomes@rim.com>
2696
2697         Possible missing layout in Iris browser after hiding VKB
2698         https://bugs.webkit.org/show_bug.cgi?id=87408
2699         PR #153056 / MKS_3674963
2700
2701         Reviewed by Adam Treat.
2702
2703         Also informally reviewed by Mike Fenton.
2704
2705         If we are not rotating and we've started a viewport resize with
2706         the Render tree in dirty state (i.e. it needs layout), lets
2707         reset the needsLayout flag for now but set our own 'needsLayout'.
2708
2709         Reason: calls like ScrollView::setFixedLayoutSize can trigger a layout
2710         if the render tree needs it. We want to avoid it till the viewport resize
2711         is actually done (i.e. ScrollView::setViewportSize gets called
2712         further down the method) so we do not get render artifacts.
2713
2714         Since our WebPage::setViewportSize calls rely on async Virtual
2715         Keyboard responses, we were getting it called with the render
2716         tree sometimes in a dirty state, sometimes not. It was flaky!
2717         Patch ensures a clear render tree state, and sets it as dirty
2718         afterwards as needed, so layout happens at the proper time.
2719
2720         * Api/WebPage.cpp:
2721         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
2722
2723 2012-05-24  Mike Fenton  <mifenton@rim.com>
2724
2725         [BlackBerry] Padding adjustment for determining the relative distance for a point was backwards.
2726         https://bugs.webkit.org/show_bug.cgi?id=87404
2727
2728         Reviewed by Rob Buis.
2729
2730         Fix padding calculation for handle adjustment.
2731
2732         Reviewed Internally by Mike Lattanzio.
2733
2734         * WebKitSupport/SelectionHandler.cpp:
2735         (BlackBerry::WebKit::directionOfPointRelativeToRect):
2736
2737 2012-05-24  Mike Fenton  <mifenton@rim.com>
2738
2739         [BlackBerry] Remove unused API function touchEventCancelAndClearFocusedNode.
2740         https://bugs.webkit.org/show_bug.cgi?id=87379
2741
2742         Reviewed by Antonio Gomes.
2743
2744         Remove unused API, touchEventCancelAndClearFocusedNode.
2745
2746         Reviewed Internally by Gen Mak.
2747
2748         * Api/WebPage.cpp:
2749         * Api/WebPage.h:
2750         * WebKitSupport/TouchEventHandler.cpp:
2751         * WebKitSupport/TouchEventHandler.h:
2752         (TouchEventHandler):
2753
2754 2012-05-23  Genevieve Mak  <gmak@rim.com>
2755
2756         Remove minimum and maximum scroll position as they are no
2757         longer required due to changes in ScrollViewBase.
2758         https://bugs.webkit.org/show_bug.cgi?id=87298
2759
2760         Reviewed by Antonio Gomes.
2761
2762         * WebKitSupport/InRegionScrollableArea.cpp:
2763         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
2764         * WebKitSupport/InRegionScrollableArea.h:
2765         (InRegionScrollableArea):
2766
2767 2012-05-22  Chris Guan  <chris.guan@torchmobile.com.cn>
2768
2769         [Blackberry]Pages contain video or audio tags should be in pageCache
2770         https://bugs.webkit.org/show_bug.cgi?id=87116
2771
2772         Reviewed by George Staikos.
2773         
2774         There is not any reason to disable pageCache for video/audio 
2775         tags probably. By my testing, Back and Forward are working for 
2776         those pages contain video and audio tags.
2777
2778         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2779         (WebCore::FrameLoaderClientBlackBerry::canCachePage):
2780
2781 2012-05-22  Konrad Piascik  <kpaiscik@rim.com>
2782
2783         [BlackBerry] Remove unused/unimplemented methods from InspectorClientBlackberry
2784         https://bugs.webkit.org/show_bug.cgi?id=87125
2785
2786         Reviewed by Rob Buis.
2787
2788         Removed unimplemented methods that are no longer part of InspectorClient and added
2789         a new stub for InspectorStateClient::updateInspectorStateCookie
2790
2791         * WebCoreSupport/InspectorClientBlackBerry.cpp:
2792         (WebCore::InspectorClientBlackBerry::updateInspectorStateCookie):
2793         (WebCore):
2794         * WebCoreSupport/InspectorClientBlackBerry.h:
2795         (InspectorClientBlackBerry):
2796
2797 2012-05-18  Mike Fenton  <mifenton@rim.com>
2798
2799         [BlackBerry] Validation of Last Fat Finger result is needed for selection.
2800         https://bugs.webkit.org/show_bug.cgi?id=86888
2801
2802         Reviewed by Antonio Gomes.
2803
2804         PR 128393.
2805
2806         Cached FatFingersResults must be validatible against
2807         the desired request to ensure the result is both for
2808         the same point and of the same type.
2809
2810         * WebKitSupport/FatFingers.h:
2811         (WebKit):
2812         (FatFingersResult):
2813         (BlackBerry::WebKit::FatFingersResult::FatFingersResult):
2814         (BlackBerry::WebKit::FatFingersResult::reset):
2815         (BlackBerry::WebKit::FatFingersResult::resultMatches):
2816         (BlackBerry::WebKit::FatFingersResult::originPosition):
2817         (BlackBerry::WebKit::FatFingersResult::adjustedPosition):
2818         (BlackBerry::WebKit::FatFingersResult::positionWasAdjusted):
2819         (BlackBerry::WebKit::FatFingersResult::isTextInput):
2820         (BlackBerry::WebKit::FatFingersResult::isValid):
2821         (BlackBerry::WebKit::FatFingersResult::node):
2822         (BlackBerry::WebKit::FatFingersResult::nodeAsElementIfApplicable):
2823         * WebKitSupport/SelectionHandler.cpp:
2824         (BlackBerry::WebKit::SelectionHandler::selectAtPoint):
2825
2826 2012-05-18  MORITA Hajime  <morrita@google.com>
2827
2828         https://bugs.webkit.org/show_bug.cgi?id=85515
2829         Stale frame in WebCore::SpellChecker::didCheckSucceeded
2830
2831         Reviewed by Ryosuke Niwa.
2832
2833         * WebCoreSupport/EditorClientBlackBerry.h:
2834         (WebCore::EditorClientBlackBerry::frameWillDetachPage):
2835
2836 2012-05-17  Jacky Jiang  <zhajiang@rim.com>
2837
2838         [BlackBerry] www.thestar.com/iphone Viewport Weirdness
2839         https://bugs.webkit.org/show_bug.cgi?id=86756
2840
2841         Reviewed by George Staikos.
2842
2843         PR 156710
2844         On high DPI devices, the virtual viewport size of this page was smaller
2845         than screen size. During the refreshing of the page, we reset the scale
2846         when the state was Committed, then layouted and rendered contents based
2847         on the virtual viewport size and default scale 1, which caused a small
2848         size thumbnail before we restored the previous view state.
2849         Fixed it by keeping the previous scale, user scalable and
2850         m_userViewportArguments during the Committed state of refreshing.
2851
2852         * Api/WebPage.cpp:
2853         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
2854
2855 2012-05-17  Mike Fenton  <mifenton@rim.com>
2856
2857         [BlackBerry] Cleanup headers in SelectionHandler.cpp
2858         https://bugs.webkit.org/show_bug.cgi?id=86760
2859
2860         Reviewed by Antonio Gomes.
2861
2862         Clean up includes in SelectionHandler.cpp.
2863
2864         * WebKitSupport/SelectionHandler.cpp:
2865
2866 2012-05-17  Mike Fenton  <mifenton@rim.com>
2867
2868         [BlackBerry] expandSelectionToGranularity should only use VisibleSelection and not range.
2869         https://bugs.webkit.org/show_bug.cgi?id=86759
2870
2871         Reviewed by Antonio Gomes.
2872
2873         expandSelectionToGranularity unnecesarily converted the
2874         selection to range and back. Using the selection
2875         directly is preferred.
2876
2877         * WebKitSupport/SelectionHandler.cpp:
2878         (BlackBerry::WebKit::expandSelectionToGranularity):
2879
2880 2012-05-17  Hironori Bono  <hbono@chromium.org>
2881
2882         [Refactoring] Move platform-specific code in Editor::respondToChangedSelection to the WebKit layer
2883         https://bugs.webkit.org/show_bug.cgi?id=86591
2884
2885         Reviewed by Ryosuke Niwa.
2886
2887         This change adds a TextCheckerClient::shouldEraseMarkersAfterChangeSelection
2888         function to remove platform-specific code from Editor::respondToChangedSelection
2889         function.
2890
2891         No new tests, no change in behavior.
2892
2893         * WebCoreSupport/EditorClientBlackBerry.cpp:
2894         (WebCore::EditorClientBlackBerry::shouldEraseMarkersAfterChangeSelection):
2895         (WebCore):
2896         * WebCoreSupport/EditorClientBlackBerry.h:
2897         (EditorClientBlackBerry):
2898
2899 2012-05-17  Mike Fenton  <mifenton@rim.com>
2900
2901         [BlackBerry] Build fix, SelectionHandler extra debug logs
2902         https://bugs.webkit.org/show_bug.cgi?id=86743
2903
2904         Reviewed by Antonio Gomes.
2905
2906         Add include for BlackBerryPlatformLog to SelectionHandler.cpp
2907
2908
2909         * WebKitSupport/SelectionHandler.cpp:
2910
2911 2012-05-16  Yongxin Dai  <yodai@rim.com>
2912
2913         [BlackBerry] The FCC shows up on an empty input field
2914         https://bugs.webkit.org/show_bug.cgi?id=86657
2915
2916         Reviewed by Antonio Gomes.
2917
2918         Turn off the caret by sending a caret changed notification with empty caret.
2919         PR #120620
2920
2921         Reviewed Internally by Mike Fenton.
2922
2923         * WebKitSupport/SelectionHandler.cpp:
2924         (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
2925
2926 2012-05-16  Eli Fidler  <efidler@rim.com>
2927
2928         [BlackBerry] Don't reset the default font families in WebSettings
2929         https://bugs.webkit.org/show_bug.cgi?id=86660
2930
2931         Reviewed by Rob Buis.
2932
2933         PR 152467
2934         The default families are also set definitively in WebCore/page/blackberry/SettingsBlackBerry.cpp
2935
2936         * Api/WebSettings.cpp:
2937         (BlackBerry::WebKit::WebSettings::standardSettings):
2938
2939 2012-05-16  Genevieve Mak  <gmak@rim.com>
2940
2941         Add missing include that was causing build errors.
2942         https://bugs.webkit.org/show_bug.cgi?id=86502
2943
2944         Reviewed by Rob Buis.
2945         Reviewed Internally by Liam Quinn.
2946
2947         * WebKitSupport/InputHandler.cpp:
2948
2949 2012-05-15  Chris Guan  <chris.guan@torchmobile.com.cn>
2950
2951         [BlackBerry] Enhance an API of BackingStore::drawContents
2952         https://bugs.webkit.org/show_bug.cgi?id=86447
2953
2954         Reviewed by George Staikos.
2955
2956         Enhance the current APIs by adding parameters of id and destination
2957         contentSize, because chrome browser may want different contents from
2958         the same webview at different times.
2959
2960         * Api/BackingStore.cpp:
2961         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
2962         (BlackBerry::WebKit::BackingStore::drawContents):
2963         * Api/BackingStore.h:
2964         * Api/BackingStore_p.h:
2965         (BackingStorePrivate):
2966
2967 2012-05-15  Max Feil  <mfeil@rim.com>
2968
2969         [BlackBerry] Enable the Fullscreen API
2970         https://bugs.webkit.org/show_bug.cgi?id=86129
2971
2972         Reviewed by Antonio Gomes.
2973
2974         This patch enables the new document-based Fullscreen API.
2975         The ENABLE(FULLSCREEN_API) is already enabled in the
2976         BlackBerry WebKit build. My patch turns fullscreen on
2977         in the page settings by default and implements the missing
2978         ChromeClientBlackBerry::{supports,enter,exit}FullScreenForElement()
2979         member functions. I am also plumbing through the existing
2980         "fullScreenVideoCapable" that QNXStageWebView has always been
2981         sending to allow the presence of a native fullscreen video player
2982         to be checked.
2983
2984         * Api/WebPage.cpp:
2985         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
2986         * Api/WebSettings.cpp:
2987         (WebKit):
2988         (BlackBerry::WebKit::WebSettings::standardSettings):
2989         (BlackBerry::WebKit::WebSettings::fullScreenVideoCapable):
2990         (BlackBerry::WebKit::WebSettings::setFullScreenVideoCapable):
2991         * Api/WebSettings.h:
2992         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2993         (WebCore):
2994         (WebCore::ChromeClientBlackBerry::supportsFullScreenForElement):
2995         (WebCore::ChromeClientBlackBerry::enterFullScreenForElement):
2996         (WebCore::ChromeClientBlackBerry::exitFullScreenForElement):
2997         * WebCoreSupport/ChromeClientBlackBerry.h:
2998         (ChromeClientBlackBerry):
2999
3000 2012-05-15  Hanna Ma  <Hanma@rim.com>
3001
3002         [BlackBerry] adding a functionality for web inspector to inspect current selected element
3003         https://bugs.webkit.org/show_bug.cgi?id=86394
3004
3005         Reviewed by Rob Buis.
3006
3007         Add a way to trigger the remote web inspector on selected element.
3008
3009         * Api/WebPage.cpp:
3010         (BlackBerry::WebKit::WebPage::inspectCurrentContextElement):
3011         (WebKit):
3012         * Api/WebPage.h:
3013
3014 2012-05-14  Jacky Jiang  <zhajiang@rim.com>
3015
3016         [BlackBerry] ASSERT failure in FrameView::paintContents when refleshing www.thestar.com/iphone
3017         https://bugs.webkit.org/show_bug.cgi?id=86391
3018
3019         Reviewed by Adam Treat.
3020
3021         PR 156992
3022         Request layout first if needed before painting contents.
3023
3024         * Api/BackingStore.cpp:
3025         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
3026
3027 2012-05-10  Mike Fenton  <mifenton@rim.com>
3028
3029         Caret node boundary should be adjusted to account for the visible region.
3030         https://bugs.webkit.org/show_bug.cgi?id=86116
3031
3032         Reviewed by Antonio Gomes.
3033
3034         PR 138988.
3035
3036         Update the node bounding box to be clipped and adjusted
3037         for the visible region of the frame.
3038
3039         Reviewed Internally by Gen Mak.
3040
3041         * WebKitSupport/SelectionHandler.cpp:
3042         (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
3043
3044 2012-05-10  Antonio Gomes  <agomes@rim.com>
3045
3046         [BlackBerry] Assertions and assumptions in BackingStoreClient around m_frame and m_frame->view() are invalid
3047         https://bugs.webkit.org/show_bug.cgi?id=86096
3048
3049         Reviewed by Rob Buis.
3050
3051         A Frame's FrameView has always to be checked since it is
3052         a volatile object, and gets created and destroyed all the time.
3053
3054         We have been facing a particular issue, where during our automated
3055         interaction tests, the main frame object was being pinch zoomed in
3056         the middle of it creation, and WebKit thread was blocked by a mutex.
3057         In practice, it is a case that would not be possible in a real
3058         world scenario, but shows that the ASSERTs are bogus regardless.
3059
3060         * WebKitSupport/BackingStoreClient.cpp:
3061         (BlackBerry::WebKit::BackingStoreClient::scrollPosition):
3062         (BlackBerry::WebKit::BackingStoreClient::setScrollPosition):
3063         (BlackBerry::WebKit::BackingStoreClient::maximumScrollPosition):
3064         (BlackBerry::WebKit::BackingStoreClient::viewportSize):
3065         (BlackBerry::WebKit::BackingStoreClient::transformedViewportSize):
3066         (BlackBerry::WebKit::BackingStoreClient::visibleContentsRect):
3067         (BlackBerry::WebKit::BackingStoreClient::contentsSize):
3068
3069 2012-05-09  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
3070
3071         [BlackBerry] Autofill feature implementation for BlackBerry porting
3072         https://bugs.webkit.org/show_bug.cgi?id=85577
3073
3074         Reviewed by Rob Buis.
3075
3076         * Api/WebPage.cpp:
3077         (BlackBerry::WebKit::WebPage::autofillTextField): Added this interface
3078         function to auto fill the inputting text field when user selects
3079         a autofill candidate value from autofill context dialog.
3080         (WebKit):
3081         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
3082         (BlackBerry::WebKit::WebPagePrivate::notifyPopupAutofillDialog): Added
3083         this interface function to notify WebPageClient to pop up the autofill
3084         context dialog with the suggested input items.
3085         (BlackBerry::WebKit::WebPage::clearAutofillData):
3086         * Api/WebPage.h:
3087         * Api/WebPageClient.h:
3088         * Api/WebPage_p.h:
3089         (WebCore):
3090         (WebPagePrivate):
3091         * WebCoreSupport/AutofillManager.cpp:
3092         (WebCore::AutofillManager::didChangeInTextField):
3093         * WebCoreSupport/EditorClientBlackBerry.cpp:
3094         (WebCore::EditorClientBlackBerry::textDidChangeInTextField): Implemented
3095         this function to listen to the notification of text field change, and
3096         notify AutofillManager to handle the autofill.
3097         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3098         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSubmitForm):
3099         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendSubmitEvent):
3100         Save the name and value pair of every autofillable input text field when
3101         user submitting a form.
3102
3103 2012-05-09  Crystal Zhang  <haizhang@rim.com>
3104
3105         [BlackBerry] Enable PAGE_POPUP in make file, and implement required methods
3106         https://bugs.webkit.org/show_bug.cgi?id=85907
3107
3108         Reviewed by Rob Buis.
3109
3110         Internal reviewed by Yong Li.
3111
3112         Enable PAGE_POPUP so we can use WebCore::PagePopup and WebCore::PagePopupClient interface.
3113         Implement virtual methods in WebCore::ChromeClientBlackBerry that required for the 
3114         implementation and add methods in WebKit::WebPage that needed for PagePopupClient.
3115
3116         * Api/WebPage.cpp:
3117         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
3118         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
3119         (BlackBerry::WebKit::WebPage::initPopupWebView):
3120         (WebKit):
3121         (BlackBerry::WebKit::WebPage::popupOpened):
3122         (BlackBerry::WebKit::WebPage::popupClosed):
3123         (BlackBerry::WebKit::WebPage::hasOpenedPopup):
3124         (BlackBerry::WebKit::WebPage::popup):
3125         (BlackBerry::WebKit::WebPagePrivate::setParentPopup):
3126         * Api/WebPage.h:
3127         (WebCore):
3128         * Api/WebPage_p.h:
3129         (WebCore):
3130         (WebPagePrivate):
3131         * WebCoreSupport/ChromeClientBlackBerry.cpp:
3132         (WebCore::ChromeClientBlackBerry::hasOpenedPopup):
3133         (WebCore::ChromeClientBlackBerry::openPagePopup):
3134         (WebCore):
3135         (WebCore::ChromeClientBlackBerry::closePagePopup):
3136         * WebCoreSupport/ChromeClientBlackBerry.h:
3137         (WebCore):
3138         (ChromeClientBlackBerry):
3139
3140 2012-05-08  Jason Liu  <jason.liu@torchmobile.com.cn>
3141
3142         [BlackBerry] Auth credentials set in private mode are reused in public mode.
3143         https://bugs.webkit.org/show_bug.cgi?id=84697
3144
3145         Reviewed by Rob Buis.
3146
3147         Add setPrivateMode function for CredentialStorage.
3148
3149         We have to change Private Browsing to test, so have to write a manual test case.
3150         Test: ManualTests/blackberry/http-auth-private-mode-changed.html
3151
3152         * Api/WebPage.cpp:
3153         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
3154
3155 2012-05-08  Crystal Zhang  <haizhang@rim.com>
3156     
3157             [BlackBerry] Implement a popup client for HTML controls
3158             https://bugs.webkit.org/show_bug.cgi?id=85670
3159     
3160             Reviewed by Rob Buis.
3161     
3162             Implement a popup client for HTML controls, which would be used to load
3163             different popups according to popup type.
3164     
3165             * WebCoreSupport/PagePopupBlackBerry.cpp: Added.
3166             (WebCore):
3167             (PagePopupChromeClient):
3168             (WebCore::PagePopupChromeClient::PagePopupChromeClient):
3169             (WebCore::PagePopupChromeClient::closeWindowSoon):
3170             (WebCore::PagePopupChromeClient::webPage):
3171             (WebCore::PagePopupBlackBerry::PagePopupBlackBerry):
3172             (WebCore::PagePopupBlackBerry::~PagePopupBlackBerry):
3173             (WebCore::PagePopupBlackBerry::sendCreatePopupWebViewRequest):
3174             (WebCore::PagePopupBlackBerry::init):
3175             (WebCore::setValueAndClosePopupCallback):
3176             (WebCore::popUpExtensionInitialize):
3177             (WebCore::popUpExtensionFinalize):
3178             (WebCore::PagePopupBlackBerry::installDomFunction):
3179             (WebCore::PagePopupBlackBerry::handleMouseEvent):
3180             (WebCore::PagePopupBlackBerry::closePopup):
3181             (WebCore::PagePopupBlackBerry::closeWebPage):
3182             * WebCoreSupport/PagePopupBlackBerry.h: Added.
3183             (WebKit):
3184             (WebCore):
3185             (PagePopupBlackBerry):
3186
3187 2012-05-08  Andrew Lo  <anlo@rim.com>
3188
3189         [BlackBerry] Over-scroll image should be tiled
3190         https://bugs.webkit.org/show_bug.cgi?id=85860
3191
3192         Reviewed by Rob Buis.
3193
3194         Implement tiling for over-scroll image if image dimension don't match
3195         the surface dimensions.
3196
3197         * Api/BackingStore.cpp:
3198         (WebKit):
3199         (BlackBerry::WebKit::BackingStorePrivate::ensureOverScrollImage):
3200         (BlackBerry::WebKit::BackingStorePrivate::paintDefaultBackground):
3201         * Api/BackingStore_p.h:
3202         (BackingStorePrivate):
3203
3204 2012-05-08  Chris Guan  <chris.guan@torchmobile.com.cn>
3205
3206         [Blackberry] remove m_isRequestedByPlugin in ResourceRequest
3207         https://bugs.webkit.org/show_bug.cgi?id=84559
3208
3209         Reviewed by Antonio Gomes.
3210
3211         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3212         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNewWindowAction):
3213
3214 2012-05-08  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
3215
3216         [BlackBerry] AutofillManager implementation upstream
3217         https://bugs.webkit.org/show_bug.cgi?id=85576
3218
3219         Reviewed by Rob Buis.
3220
3221         RIM PR: 136405
3222         Implemented class AutofillManager to handle the form autofill
3223         interactions.
3224         It listens to text changed notification from text input, searches
3225         autofill database for the suggested autofill candidate value,
3226         and notifies WebPageClient to pop up a context dialog for user;
3227         it also responds to user's choice by autofilling the text input.
3228
3229         * WebCoreSupport/AutofillManager.cpp: Added.
3230         (WebCore):
3231         (WebCore::AutofillManager::create):
3232         (WebCore::AutofillManager::didChangeInTextField):
3233         (WebCore::AutofillManager::autofillTextField):
3234         (WebCore::AutofillManager::saveTextFields):
3235         (WebCore::AutofillManager::clear):
3236         * WebCoreSupport/AutofillManager.h: Added.
3237         (WTF):
3238         (WebKit):
3239         (WebCore):
3240         (AutofillManager):
3241         (WebCore::AutofillManager::m_element):
3242
3243 2012-05-07  Andrew Lo  <anlo@rim.com>
3244
3245         [BlackBerry] Delete previous buffer when new over-scroll image path is set
3246         https://bugs.webkit.org/show_bug.cgi?id=85812
3247
3248         Reviewed by Rob Buis.
3249
3250         When a new over-scroll image path is set, delete old buffer before creating
3251         a new one.
3252
3253         * Api/BackingStore.cpp:
3254         (BlackBerry::WebKit::BackingStorePrivate::ensureOverScrollImage):
3255
3256 2012-05-07  Andrew Lo  <anlo@rim.com>
3257
3258         [BlackBerry] Over-scroll image path property should be relative to local application directory
3259         https://bugs.webkit.org/show_bug.cgi?id=85814
3260
3261         Reviewed by Rob Buis.
3262
3263         Over-scroll image path web setting should be relative to the local directory.
3264
3265         * Api/BackingStore.cpp:
3266         (BlackBerry::WebKit::BackingStorePrivate::ensureOverScrollImage):
3267
3268 2012-05-07  Crystal Zhang  <haizhang@rim.com>
3269
3270         [BlackBerry] Add methods need by client side
3271         https://bugs.webkit.org/show_bug.cgi?id=85661
3272
3273         Reviewed by Antonio Gomes.
3274
3275         Add methods needed by client side when create and close HTML popup dialogs.
3276         PR 154360
3277
3278         * Api/WebPageClient.h:
3279
3280 2012-05-06  Mary Wu  <mary.wu@torchmobile.com.cn>
3281
3282         [BlackBerry] Support html5 download attribute.
3283         https://bugs.webkit.org/show_bug.cgi?id=85044
3284
3285         Reviewed by Antonio Gomes.
3286
3287         If a link has download attribute, we should pass that value and be able to
3288         save file with the name according to HTML5:
3289         http://updates.html5rocks.com/2011/08/Downloading-resources-in-HTML5-a-download
3290
3291         * Api/WebPage.cpp:
3292         (BlackBerry::WebKit::WebPagePrivate::load):
3293         (BlackBerry::WebKit::WebPage::download):
3294         * Api/WebPage_p.h:
3295         (WebPagePrivate):
3296         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3297         (WebCore::FrameLoaderClientBlackBerry::startDownload):
3298
3299 2012-05-06  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
3300
3301         [BlackBerry] Autofill backing store implementation upstream
3302         https://bugs.webkit.org/show_bug.cgi?id=85575
3303
3304         Reviewed by Rob Buis.
3305
3306         Replaced calling static function CredentialBackingStore::instance()
3307         with calling the helper function credentialBackingStore().
3308
3309         * WebCoreSupport/CredentialManager.cpp:
3310         (WebCore::CredentialManager::autofillAuthenticationChallenge):
3311         (WebCore::CredentialManager::autofillPasswordForms):
3312         (WebCore::CredentialManager::saveCredentialIfConfirmed):
3313         (WebCore::CredentialManager::clearCredentials):
3314         (WebCore::CredentialManager::clearNeverRememberSites):
3315
3316 2012-05-06  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
3317
3318         [BlackBerry] Enable credential persistance and auto fill
3319         https://bugs.webkit.org/show_bug.cgi?id=85572
3320
3321         Reviewed by Rob Buis.
3322
3323         Set autofilled status of credential input fields when credential
3324         information is auto filled by CredentialManager.
3325         By doing this the input element will get painted with yellow background
3326         which can notify user this input field is auto filled by the browser.
3327
3328         No behavior changes, so no new test.
3329
3330         * WebCoreSupport/CredentialTransformData.cpp:
3331         (WebCore::CredentialTransformData::setCredential):
3332
3333 2012-05-04  Andrew Lo  <anlo@rim.com>
3334
3335         [Blackberry] Implement over-scroll background image
3336         https://bugs.webkit.org/show_bug.cgi?id=85538
3337
3338         Reviewed by Rob Buis.
3339
3340         Use over-scroll image when set instead of the solid colour.
3341         Internal PR146652
3342
3343         * Api/BackingStore.cpp:
3344         (WebKit):
3345         (BlackBerry::WebKit::BackingStorePrivate::ensureOverScrollImage):
3346         (BlackBerry::WebKit::BackingStorePrivate::paintDefaultBackground):
3347         * Api/BackingStore_p.h:
3348         (BackingStorePrivate):
3349         * Api/WebSettings.cpp:
3350         (WebKit):
3351         (BlackBerry::WebKit::WebSettings::standardSettings):
3352         (BlackBerry::WebKit::WebSettings::overScrollImagePath):
3353         (BlackBerry::WebKit::WebSettings::setOverScrollImagePath):
3354         * Api/WebSettings.h:
3355
3356 2012-05-04  Rob Buis  <rbuis@rim.com>
3357
3358         [BlackBerry] Rendering bmp file as text file when Content-Type:image/x-ms-bmp from apache web server.
3359         https://bugs.webkit.org/show_bug.cgi?id=85036
3360
3361         Reviewed by Antonio Gomes.
3362
3363         Move getNormalizedMIMEType into WebCore::MIMETypeRegistry.
3364
3365         * Api/WebSettings.cpp:
3366         (WebKit):
3367         (BlackBerry::WebKit::WebSettings::isSupportedObjectMIMEType):
3368         * Api/WebSettings.h:
3369         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3370         (WebCore::FrameLoaderClientBlackBerry::createPlugin):
3371         (WebCore::FrameLoaderClientBlackBerry::canShowMIMEType):
3372         (WebCore::FrameLoaderClientBlackBerry::objectContentType):
3373
3374 2012-05-04  Nate Chapin  <japhet@chromium.org>
3375
3376         Don't require FrameLoaderClient to manufacture a commitData() call for empty documents.
3377         https://bugs.webkit.org/show_bug.cgi?id=85533
3378
3379         Reviewed by Alexey Proskuryakov.
3380
3381         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3382         (WebCore::FrameLoaderClientBlackBerry::finishedLoading):
3383
3384 2012-05-04  Sheriff Bot  <webkit.review.bot@gmail.com>
3385
3386         Unreviewed, rolling out r116085, r116091, and r116095.
3387         http://trac.webkit.org/changeset/116085
3388         http://trac.webkit.org/changeset/116091
3389         http://trac.webkit.org/changeset/116095
3390         https://bugs.webkit.org/show_bug.cgi?id=85628
3391
3392         We are not ready with dependencies on all platform yet (mac) +
3393         problems with debug builds. (Requested by Zoltan on #webkit).
3394
3395         * WebCoreSupport/AboutDataEnableFeatures.in:
3396
3397 2012-05-04  Zoltan Horvath  <zoltan@webkit.org>
3398
3399         [Qt] Set WebCore imagedecoders as default and add fallback to QImageDecoder
3400         https://bugs.webkit.org/show_bug.cgi?id=80400
3401
3402         Get rid off QT_IMAGE_DECODER flag.
3403
3404         Reviewed by Simon Hausmann.
3405
3406         * WebCoreSupport/AboutDataEnableFeatures.in:
3407
3408 2012-05-03  Fady Samuel  <fsamuel@chromium.org>
3409
3410         Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport
3411         https://bugs.webkit.org/show_bug.cgi?id=70609
3412
3413         Reviewed by Kenneth Rohde Christiansen.
3414
3415         * WebKitSupport/DumpRenderTreeSupport.cpp:
3416         (DumpRenderTreeSupport::dumpConfigurationForViewport):
3417
3418 2012-05-03  Mike Fenton  <mifenton@rim.com>
3419
3420         [BlackBerry] Add special attribute for alternate selection touch handling.
3421         https://bugs.webkit.org/show_bug.cgi?id=85284
3422
3423         Reviewed by Rob Buis.
3424
3425         Rename the custom attribute and make it a data- attribute.
3426
3427         * WebKitSupport/SelectionHandler.cpp:
3428         (BlackBerry::WebKit::SelectionHandler::inputNodeOverridesTouch):
3429
3430 2012-04-18  Jon Honeycutt  <jhoneycutt@apple.com>
3431
3432         FrameLoaderClient::dispatchWillSendSubmitEvent() should be given more
3433         information about the form being submitted
3434         https://bugs.webkit.org/show_bug.cgi?id=84297
3435
3436         Reviewed by Andy Estes.
3437
3438         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3439         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendSubmitEvent):
3440         Updated to use the FormState.
3441
3442         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
3443         (FrameLoaderClientBlackBerry):
3444         Updated method declaration.
3445
3446 2012-05-02  Jacky Jiang  <zhajiang@rim.com>
3447
3448         [BlackBerry] Double tap zooming does nothing on small size table
3449         https://bugs.webkit.org/show_bug.cgi?id=85383
3450
3451         Reviewed by George Staikos.
3452
3453         PR: 153232
3454         When we search the best node for block zoom, if the initial node's new
3455         scale exceeds the maximum block zoom scale, we will try to walk through
3456         it's ancestors and pick the acceptable one. But the reality is that the
3457         acceptable ancestor's size can be too close to the size of the actual
3458         contents, we will do nothing for it. As we will still select the
3459         minimum of the new scale and the maximum block zoom scale as block zoom
3460         scale, we can ignore such kind of node and use the initial node instead.
3461
3462         * Api/WebPage.cpp:
3463         (BlackBerry::WebKit::WebPagePrivate::adjustedBlockZoomNodeForZoomLimits):
3464
3465 2012-05-01  Mike Fenton  <mifenton@rim.com>
3466
3467         Add special attribute for alternate selection touch handling.
3468         https://bugs.webkit.org/show_bug.cgi?id=85284
3469
3470         Reviewed by Antonio Gomes.
3471
3472         PR 152975.
3473
3474         Add attribute -bb-selection-touchoverride to override
3475         touch handling on selection overlay.
3476
3477         Reviewed Internally by Gen Mak.
3478
3479         * Api/WebPageClient.h:
3480         * WebKitSupport/SelectionHandler.cpp:
3481         (BlackBerry::WebKit::SelectionHandler::inputNodeOverridesTouch):
3482         (WebKit):
3483         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
3484         * WebKitSupport/SelectionHandler.h:
3485         (SelectionHandler):
3486
3487 2012-04-30  Benjamin Poulain  <benjamin@webkit.org>
3488
3489         Add String::startsWith() and endsWith() for string literals
3490         https://bugs.webkit.org/show_bug.cgi?id=85154
3491
3492         Reviewed by Darin Adler.
3493
3494         * WebKitSupport/DOMSupport.cpp:
3495         (BlackBerry::WebKit::DOMSupport::elementPatternMatches):
3496
3497 2012-04-27  Jacky Jiang  <zhajiang@rim.com>
3498
3499         [BlackBerry] Double tap zooming does nothing on table element on bustedtees.com
3500         https://bugs.webkit.org/show_bug.cgi?id=85104
3501
3502         Reviewed by George Staikos.
3503
3504         PR: 147006
3505         This was caused by the incorrect fix master_33/SHA:612caec4.
3506         Calculations like this "originalArea / pageArea" would always return 0
3507         so that the incorrect node and blockRect were used by block zoom. This
3508         patch takes care of it.
3509
3510         * Api/WebPage.cpp:
3511         (BlackBerry::WebKit::WebPagePrivate::blockZoomRectForNode):
3512         (BlackBerry::WebKit::WebPage::blockZoom):
3513
3514 2012-04-27  Nima Ghanavatian  <nghanavatian@rim.com>
3515
3516         [BlackBerry] Improve log output in InputHandler.cpp
3517         https://bugs.webkit.org/show_bug.cgi?id=85007
3518
3519         Reviewed by Antonio Gomes.
3520
3521         PR 138292
3522         Improving logging in InputHandler.
3523         In setText we had an early return which wasn't being captured.
3524         Also, cleaning up the output to make it more clear and descriptive.
3525
3526         Internally reviewed by Mike Fenton.
3527
3528         * WebKitSupport/InputHandler.cpp:
3529         (BlackBerry::WebKit::InputHandler::learnText):
3530         (BlackBerry::WebKit::InputHandler::enableInputMode):
3531         (BlackBerry::WebKit::InputHandler::setText):
3532
3533 2012-04-27  Chris Guan  <chris.guan@torchmobile.com.cn>
3534
3535         [Blackberry] remove redundant returns
3536         https://bugs.webkit.org/show_bug.cgi?id=85033
3537
3538         Reviewed by Antonio Gomes.
3539
3540         Remove two redundant returns which were added by accident.
3541
3542         No new test cases, because no behaviour has changed.
3543
3544         * Api/WebPage.cpp:
3545         (BlackBerry::WebKit::WebPage::setSelection):
3546         (BlackBerry::WebKit::WebPage::setCaretPosition):
3547
3548 2012-04-27  Andy Chen  <andchen@rim.com>
3549
3550         [BlackBerry] Find-in-page fails to deactivate the old active match when moving backwards
3551         https://bugs.webkit.org/show_bug.cgi?id=84892
3552
3553         Reviewed by Antonio Gomes.
3554
3555         Find in page fails to deactivate the old active match when moving backwards
3556         because searchStartingPoint was incorrectly initialized.
3557         Create a real range object instead of referencing other range object.
3558         PR 152009
3559
3560         Internally reviewed by Yongxin Dai.
3561
3562         * WebKitSupport/InPageSearchManager.cpp:
3563         (BlackBerry::WebKit::InPageSearchManager::findNextString):
3564
3565 2012-04-26  Yong Li  <yoli@rim.com>
3566
3567         [BlackBerry] A quick fix to the previous patch r115245.
3568         https://bugs.webkit.org/show_bug.cgi?id=84862
3569
3570         Reviewed by Antonio Gomes.
3571
3572         Fix an obvious bug in previous patch: DeferredTaskLoadManualScript
3573         was using a wrong flag.
3574
3575         * Api/WebPage.cpp:
3576         * Api/WebPage_p.h:
3577         (WebPagePrivate):
3578
3579 2012-04-25  Chris Guan  <chris.guan@torchmobile.com.cn>
3580
3581         [Blackberry] add a new function in BackingStore
3582         https://bugs.webkit.org/show_bug.cgi?id=84818
3583
3584         Reviewed by Antonio Gomes.
3585
3586         Adding two functions in BackingStorePrivate and
3587         BackingStore, which could render out webpage contents
3588         into BlackBerry::Platform::Graphics::Drawable.
3589
3590         * Api/BackingStore.cpp:
3591         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
3592         (WebKit):
3593         (BlackBerry::WebKit::BackingStore::drawContents):
3594         * Api/BackingStore.h:
3595         * Api/BackingStore_p.h:
3596         (BackingStorePrivate):
3597
3598 2012-04-25  Charles Wei  <charles.wei@torchmobile.com.cn>
3599
3600         [BlackBerry] Input Range element expects mouse events
3601         https://bugs.webkit.org/show_bug.cgi?id=84571
3602
3603         Reviewed by Antonio Gomes.
3604
3605         This just cleans up the code a bit to make it less code and more readable.
3606         * WebKitSupport/TouchEventHandler.cpp:
3607         (BlackBerry::WebKit::shouldConvertTouchToMouse):
3608         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
3609         (BlackBerry::WebKit::TouchEventHandler::spellCheck):
3610
3611 2012-04-25  Yong Li  <yoli@rim.com>
3612
3613         [BlackBerry] Possible JS re-entrancy caused by UI events.
3614         https://bugs.webkit.org/show_bug.cgi?id=84862
3615
3616         Reviewed by Antonio Gomes.
3617
3618         1. block UI events when running in nested event loop
3619         2. defer some tasks we still want to perform when it is safe to do,
3620            with cached data.
3621         3. deferred task can be cancelled by clearing the flag. duplicate tasks
3622            is not a problem because they share same flag and data.
3623         4. move deferred manual script from FrameLoaderClientBlackBerry to WebPagePrivate
3624            and make it a deferred task
3625
3626         * Api/WebPage.cpp:
3627         (WebKit):
3628         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
3629         (BlackBerry::WebKit::WebPagePrivate::load):
3630         (BlackBerry::WebKit::WebPagePrivate::stopCurrentLoad):
3631         (BlackBerry::WebKit::WebPagePrivate::willDeferLoading):
3632         (BlackBerry::WebKit::WebPagePrivate::didResumeLoading):
3633         (BlackBerry::WebKit::WebPagePrivate::deferredTasksTimerFired):
3634         (BlackBerry::WebKit::WebPage::assignFocus):
3635         (BlackBerry::WebKit::WebPagePrivate::setPageVisibilityState):
3636         (BlackBerry::WebKit::WebPage::setInputSelection):
3637         (BlackBerry::WebKit::WebPage::popupListClosed):
3638         (BlackBerry::WebKit::WebPage::setDateTimeInput):
3639         (BlackBerry::WebKit::WebPage::setColorInput):
3640         (BlackBerry::WebKit::WebPage::mouseEvent):
3641         (BlackBerry::WebKit::WebPage::touchEvent):
3642         (BlackBerry::WebKit::WebPage::touchPointAsMouseEvent):
3643         (BlackBerry::WebKit::WebPage::touchEventCancel):
3644         (BlackBerry::WebKit::WebPage::touchEventCancelAndClearFocusedNode):
3645         (BlackBerry::WebKit::WebPage::keyEvent):
3646         (BlackBerry::WebKit::WebPage::deleteTextRelativeToCursor):
3647         (BlackBerry::WebKit::WebPage::setComposingText):
3648         (BlackBerry::WebKit::WebPage::commitText):
3649         (BlackBerry::WebKit::WebPage::selectionCancelled):
3650         (BlackBerry::WebKit::WebPage::cutSelectedText):
3651         (BlackBerry::WebKit::WebPage::insertText):
3652         (BlackBerry::WebKit::WebPage::clearCurrentInputField):
3653         (BlackBerry::WebKit::WebPage::cut):
3654         (BlackBerry::WebKit::WebPage::paste):
3655         (BlackBerry::WebKit::WebPage::setSelection):
3656         (BlackBerry::WebKit::WebPage::setCaretPosition):
3657         (BlackBerry::WebKit::WebPage::selectAtPoint):
3658         (BlackBerry::WebKit::WebPage::setFocused):
3659         * Api/WebPage.h:
3660         * Api/WebPage_p.h:
3661         (WebCore):
3662         (WebPagePrivate):
3663         (DeferredTaskBase):
3664         (BlackBerry::WebKit::WebPagePrivate::DeferredTaskBase::perform):
3665         (BlackBerry::WebKit::WebPagePrivate::DeferredTaskBase::DeferredTaskBase):
3666         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3667         (WebCore::FrameLoaderClientBlackBerry::FrameLoaderClientBlackBerry):
3668         (WebCore::FrameLoaderClientBlackBerry::~FrameLoaderClientBlackBerry):
3669         (WebCore::FrameLoaderClientBlackBerry::willDeferLoading):
3670         (WebCore::FrameLoaderClientBlackBerry::didResumeLoading):
3671         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
3672         (FrameLoaderClientBlackBerry):
3673         * WebKitSupport/InputHandler.cpp:
3674         (BlackBerry::WebKit::InputHandler::setPopupListIndexes):
3675         * WebKitSupport/InputHandler.h:
3676         (InputHandler):
3677
3678 2012-04-24  Nima Ghanavatian  <nghanavatian@rim.com>
3679
3680         [BlackBerry] Perform spellcheck before handling TouchRelease event
3681         https://bugs.webkit.org/show_bug.cgi?id=84744
3682
3683         After rebasing to master_35, it appears as though some code had been moved around.
3684         Here, we were handling the TouchReleased event before calling spellcheck.  This
3685         meant that when we finally got the call to spellcheck, the fatFinger result had been
3686         reset and the spelling markers had been removed.
3687
3688         In addition, based on https://bugs.webkit.org/show_bug.cgi?id=66330
3689         I am also updating the BlackBerry specific documentMarkerContainingPoint to use
3690         LayoutPoint instead of IntPoint.
3691
3692         Internally reviewed by Mike Fenton.
3693
3694         Reviewed by Antonio Gomes.
3695
3696         * WebKitSupport/TouchEventHandler.cpp:
3697         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
3698         (BlackBerry::WebKit::TouchEventHandler::spellCheck):
3699         * dom/DocumentMarkerController.cpp:
3700         (WebCore::DocumentMarkerController::markerContainingPoint):
3701         * dom/DocumentMarkerController.h:
3702
3703 2012-04-24  Mike Lattanzio  <mlattanzio@rim.com>
3704
3705         [BlackBerry] setUserViewportArguments not always respected.
3706         https://bugs.webkit.org/show_bug.cgi?id=84738
3707
3708         Reviewed by Antonio Gomes.
3709
3710         Remove the unnecessary logic in
3711         WebPagePrivate::recomputeVirtualViewportFromViewportArguments().
3712         Instead it is much simpler to just set the m_viewportArguments to
3713         m_userViewportArguments on LoadCommitted. If there is a viewport
3714         tag in the content, m_viewportArguments will be replaced with it
3715         as usual during normal page load.
3716
3717         * Api/WebPage.cpp:
3718         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
3719         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
3720
3721 2012-04-24  Joe Mason  <jmason@rim.com>
3722
3723         [BlackBerry] Revert broken changes to authentication dialog
3724         https://bugs.webkit.org/show_bug.cgi?id=80135
3725
3726         Reviewed by Antonio Gomes.
3727
3728         The previous patches from this bug caused an infinite loop when using digest auth;
3729         apparently they were only tested with basic.
3730
3731         * Api/DumpRenderTreeClient.h:
3732         * Api/WebPage.cpp:
3733         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
3734         * Api/WebPageClient.h:
3735         * Api/WebPage_p.h:
3736         (WebPagePrivate):
3737
3738 2012-04-24  Mike Fenton  <mifenton@rim.com>
3739
3740         [BlackBerry] Add additional details including the bounds of the box for caretPositionChanged.
3741         https://bugs.webkit.org/show_bug.cgi?id=84728
3742
3743         Reviewed by Antonio Gomes.
3744
3745         PR 138988.
3746
3747         Update caretPositionChanged to include the limit of the input field
3748         for single line inputs.
3749
3750         Reviewed Internally by Gen Mak.
3751
3752         * Api/WebPageClient.h:
3753         * WebKitSupport/InputHandler.cpp:
3754         (BlackBerry::WebKit::InputHandler::boundingBoxForInputField):
3755         (WebKit):
3756         * WebKitSupport/InputHandler.h:
3757         (InputHandler):
3758         * WebKitSupport/SelectionHandler.cpp:
3759         (BlackBerry::WebKit::SelectionHandler::clippingRectForVisibleContent):
3760         (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
3761
3762 2012-04-24  Charles Wei  <charles.wei@torchmobile.com.cn>
3763
3764         [BlackBerry] Input Range element expects mouse events
3765         https://bugs.webkit.org/show_bug.cgi?id=84571
3766
3767         Reviewed by Antonio Gomes.
3768
3769         Input element with Range type expects mouse events to
3770         drag the handle. Note that Input Range could appear
3771         in both the web page directly, or in some shadow tree,
3772         like the MediaControlTimeline and MediaControlVolume.
3773         * WebKitSupport/TouchEventHandler.cpp:
3774         (BlackBerry::WebKit::isRangeControlElement):
3775         (WebKit):
3776         (BlackBerry::WebKit::elementExpectsMouseEvents):
3777         (BlackBerry::WebKit::shouldConvertTouchToMouse):
3778
3779 2012-04-23  Charles Wei  <charles.wei@torchmobile.com.cn>
3780
3781         [BlackBerry] Build failure when DEBUG_FAT_FINGER is enabled
3782         https://bugs.webkit.org/show_bug.cgi?id=84563
3783
3784         Reviewed by Antonio Gomes.
3785
3786         Fat Finger log code uses obsolete IntRect::toString() for logging,
3787         which was first implemented interally and removed later.
3788
3789         * WebKitSupport/FatFingers.cpp:
3790         (BlackBerry::WebKit::FatFingers::findIntersectingRegions):
3791
3792 2012-04-21  Benjamin C Meyer  <bmeyer@rim.com>
3793
3794         Don't hard code the plugins that blackberry supports.
3795         https://bugs.webkit.org/show_bug.cgi?id=84535
3796
3797         Use the existing PluginDatabase to query for the plugins we can handle.
3798
3799         The original implemention of FrameLoaderClientBlackBerry::createPlugin
3800         was a partial copy from another port.  In the Qt port there is some
3801         workarounds for flash which is why this exists there.  Sadly the bits
3802         that were copied made it so only flash worked, but as flash was the only
3803         plugin on the system this issue was not noticed until QNX tried to get
3804         jnext working.  Tracing it down to this bit of code rather then
3805         correcting it they hardcoded the jnext into the same block as flash was.
3806
3807         The blackberry port isn't specifically suppose to only allow jnext and
3808         flash, but was an accident due to the way this code was developed.
3809
3810         Reviewed by Adam Treat.
3811
3812         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3813         (WebCore::FrameLoaderClientBlackBerry::createPlugin):
3814
3815 2012-04-20  Brady Eidson  <beidson@apple.com>
3816
3817         https://bugs.webkit.org/show_bug.cgi?id=84512
3818         Repurpose ActiveDOMObject::WillShowDialog to WillDeferLoading
3819
3820         Reviewed by Eric Carlson.
3821
3822         PageGroupLoadDeferrer's don't take a ReasonForSuspension argument anymore;
3823         They just use WillDeferLoading by default.
3824
3825         * Api/WebPageGroupLoadDeferrer.cpp:
3826         (BlackBerry::WebKit::WebPageGroupLoadDeferrer::WebPageGroupLoadDeferrer):
3827
3828         * WebCoreSupport/ChromeClientBlackBerry.cpp:
3829         (WebCore::ChromeClientBlackBerry::createWindow):
3830         (WebCore::ChromeClientBlackBerry::runOpenPanel):
3831
3832 2012-04-20  Brady Eidson  <beidson@apple.com>
3833
3834         https://bugs.webkit.org/show_bug.cgi?id=84490
3835         PageGroupLoadDeferrer needs to take a ReasonForSuspension argument
3836
3837         Reviewed by Anders Carlsson.
3838
3839         * Api/WebPageGroupLoadDeferrer.cpp:
3840         (BlackBerry::WebKit::WebPageGroupLoadDeferrer::WebPageGroupLoadDeferrer): Pass along ActiveDOMObject::WillShowDialog,
3841           which used to be the default
3842
3843         * WebCoreSupport/ChromeClientBlackBerry.cpp:
3844         (WebCore::ChromeClientBlackBerry::createWindow): Pass along ActiveDOMObject::WillShowDialog, which used to be the default.
3845         (WebCore::ChromeClientBlackBerry::runOpenPanel): Ditto.
3846
3847 2012-04-20  Mike Lattanzio  <mlattanzio@rim.com>
3848
3849         [BlackBerry] Expose WebViewportArguments to WebPageClient
3850         https://bugs.webkit.org/show_bug.cgi?id=84471
3851
3852         Reviewed by Antonio Gomes.
3853
3854         Implement the ability for the WebPageClient to specify a fallback
3855         virtual viewport to be used whenever a meta viewport tag is not
3856         present in the HTML. This can drastically impact apparent layout.
3857         This patch is designed to provide a classic "Column View" style of
3858         layout without breaking the web by simply exposing meta viewport
3859         arguments to WebPageClients.
3860
3861         Note: As a side effect of this change. the WebPagePrivate::
3862         recomputeVirtualViewportFromViewportArguments method no longer
3863         modifies the targetDensityDpi property of the m_viewportArguments.
3864         However this does not affect the class because that property itself
3865         means nothing to us. Only the computeViewportArguments method from
3866         WebCore uses it, and the currentViewportArguments object we pass
3867         into that method has the adjusted targetDensityDpi value as before.
3868
3869         * Api/WebPage.cpp:
3870         (BlackBerry::WebKit::WebPage::setUserViewportArguments):
3871         (WebKit):
3872         (BlackBerry::WebKit::WebPage::resetUserViewportArguments):
3873         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
3874         * Api/WebPage.h:
3875         (WebKit):
3876         * Api/WebPage_p.h:
3877         (WebPagePrivate):
3878         * Api/WebViewportArguments.cpp: Added.
3879         (WebKit):
3880         (BlackBerry::WebKit:::d):
3881         (BlackBerry::WebKit::WebViewportArguments::~WebViewportArguments):
3882         (BlackBerry::WebKit::WebViewportArguments::initialScale):
3883         (BlackBerry::WebKit::WebViewportArguments::setInitialScale):
3884         (BlackBerry::WebKit::WebViewportArguments::minimumScale):
3885         (BlackBerry::WebKit::WebViewportArguments::setMinimumScale):
3886         (BlackBerry::WebKit::WebViewportArguments::maximumScale):
3887         (BlackBerry::WebKit::WebViewportArguments::setMaximumScale):
3888         (BlackBerry::WebKit::WebViewportArguments::width):
3889         (BlackBerry::WebKit::WebViewportArguments::setWidth):
3890         (BlackBerry::WebKit::WebViewportArguments::height):
3891         (BlackBerry::WebKit::WebViewportArguments::setHeight):
3892         (BlackBerry::WebKit::WebViewportArguments::targetDensityDpi):
3893         (BlackBerry::WebKit::WebViewportArguments::setTargetDensityDpi):
3894         (BlackBerry::WebKit::WebViewportArguments::userScalable):
3895         (BlackBerry::WebKit::WebViewportArguments::setUserScalable):
3896         (BlackBerry::WebKit::WebViewportArguments::operator==):
3897         (BlackBerry::WebKit::WebViewportArguments::operator!=):
3898         * Api/WebViewportArguments.h: Added.
3899         (WebCore):
3900         (WebKit):
3901
3902 2012-04-19  Arvid Nilsson  <anilsson@rim.com>
3903
3904         [BlackBerry] Always use the AnimationFrameRateController for accelerated animations
3905         https://bugs.webkit.org/show_bug.cgi?id=84323
3906
3907         Reviewed by Antonio Gomes.
3908
3909         PR 150750
3910         Regardless of whether there's a WebPageCompositorClient, we want the
3911         AnimationFrameRateController to manage animation frames.
3912         Reviewed internally by Andrew Lo.
3913
3914         * Api/BackingStore.cpp:
3915         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
3916         * Api/WebPageCompositor.cpp:
3917         (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
3918         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
3919         * Api/WebPageCompositor_p.h:
3920         (WebPageCompositorPrivate):
3921
3922 2012-04-18  Max Feil  <mfeil@rim.com>
3923
3924         [BlackBerry] Tab awareness for HTML5 concurrent audio
3925         https://bugs.webkit.org/show_bug.cgi?id=82930
3926         Support for concurrent HTML5 audio improvements being made in
3927         the platform library, which need to be aware of tabs and tab
3928         visibility. PR96004.
3929
3930         Reviewed by George Staikos.
3931
3932         * Api/WebPageClient.h:
3933         * Api/WebPage_p.h:
3934         (BlackBerry::WebKit::WebPagePrivate::isVisible):
3935
3936 2012-04-17  Jacky Jiang  <zhajiang@rim.com>
3937
3938         [BlackBerry] Viewport metatag doesn't disable double-tap zoom
3939         https://bugs.webkit.org/show_bug.cgi?id=84199
3940
3941         Reviewed by George Staikos.
3942
3943         PR: 148279
3944         When we set "user-scalable=no" in viewport meta-tag and change any
3945         other WebSettings, the WebPage can turn to be scalable.
3946         This is a regression of the change master_32/SHA:fa0f8ee9. In that
3947         change, we used setUserScalable(webSettings->isUserScalable())
3948         in WebPagePrivate::didChangeSettings which was incorrect for non-DRT
3949         case, as webSettings->isUserScalable() would always return true by
3950         default.
3951         Create a new API WebPage::setUserScalable which will be used in
3952         DumpRenderTree.cpp.
3953
3954         * Api/WebPage.cpp:
3955         (BlackBerry::WebKit::WebPage::setUserScalable):
3956         (WebKit):
3957         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
3958         * Api/WebPage.h:
3959
3960 2012-04-17  Mike Fenton  <mifenton@rim.com>
3961
3962         [BlackBerry] Pattern matching should be applied to numbers
3963         https://bugs.webkit.org/show_bug.cgi?id=84152
3964
3965         Reviewed by Antonio Gomes.
3966
3967         PR 148906.
3968
3969         Add pattern matching for number based on [0-9] to trigger
3970         input help matching number fields.
3971
3972         * WebKitSupport/DOMSupport.cpp:
3973         (BlackBerry::WebKit::DOMSupport::elementPatternIndicatesNumber):
3974         (DOMSupport):
3975         (BlackBerry::WebKit::DOMSupport::elementPatternIndicatesHexadecimal):
3976         (BlackBerry::WebKit::DOMSupport::elementPatternMatches):
3977         * WebKitSupport/DOMSupport.h:
3978         * WebKitSupport/InputHandler.cpp:
3979         (BlackBerry::WebKit::convertInputType):
3980
3981 2012-04-17  George Staikos  <staikos@webkit.org>
3982
3983         Export the initialization function so it can be called earlier.
3984         https://bugs.webkit.org/show_bug.cgi?id=84134
3985
3986         Reviewed by Nikolas Zimmermann.
3987
3988         * Api/BlackBerryGlobal.h: export globalInitialize()
3989         (WebKit):
3990
3991 2012-04-16  Antonio Gomes  <agomes@rim.com>
3992
3993         Screen shift down when VKB shows by clicking in a input box MKS_3601371
3994         https://bugs.webkit.org/show_bug.cgi?id=84057
3995
3996         Reviewed by Rob Buis.
3997
3998   &nbs