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