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