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