8bda833bd7cc11920cc592655f9d74d7c66b921c
[WebKit-https.git] / Source / WebKit / blackberry / ChangeLog
1 2012-09-05  Leo Yang  <leoyang@rim.com>
2
3         [BlackBerry] Rotation and then reload causes less sized webpage (PR 190469)
4         https://bugs.webkit.org/show_bug.cgi?id=95870
5
6         Reviewed by George Staikos.
7         Reviewed internally by Jacky Jiang.
8
9         Use the new zoom to fit scale if the page was zoomed to fit initial scale
10         When a page is reloaded the layout size may be changed. So the contents
11         size on which the initial scale depends may be changed. Use the new initial
12         scale in this case to make sure the page will be zoomed to correct scale.
13
14         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
15         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
16
17 2012-09-05  Robin Cao  <robin.cao@torchmobile.com.cn>
18
19         [BlackBerry] Do not release shared backingstore memory prematurely
20         https://bugs.webkit.org/show_bug.cgi?id=95841
21         PR #202517
22
23         Reviewed by George Staikos.
24
25         The BackingStore memory is shared by all web pages. We should check if
26         the current backingStore is active before create/release this shared memory.
27
28         * Api/BackingStore.cpp:
29         (BlackBerry::WebKit::BackingStore::createBackingStoreMemory):
30         (BlackBerry::WebKit::BackingStore::releaseBackingStoreMemory):
31
32 2012-09-05  Andy Chen  <andchen@rim.com>
33
34         [BlackBerry] Implement number of matches and current active match index for find-on-page
35         https://bugs.webkit.org/show_bug.cgi?id=95801
36
37         Reviewed by Antonio Gomes.
38
39         - Calculate current match index for find-on-page
40         - Notify client when number of matches and current match index update.
41         PR 162090 162091.
42         Internally reviewed by Mike Fenton and Joe Mason
43
44         * Api/WebPageClient.h:
45         * WebKitSupport/InPageSearchManager.cpp:
46         (BlackBerry::WebKit::InPageSearchManager::DeferredScopeStringMatches::DeferredScopeStringMatches):
47         (BlackBerry::WebKit::InPageSearchManager::DeferredScopeStringMatches::doTimeout):
48         (InPageSearchManager::DeferredScopeStringMatches):
49         (BlackBerry::WebKit::InPageSearchManager::findNextString):
50         (BlackBerry::WebKit::InPageSearchManager::findAndMarkText):
51         (BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):
52         (BlackBerry::WebKit::InPageSearchManager::scopeStringMatchesSoon):
53         (BlackBerry::WebKit::InPageSearchManager::callScopeStringMatches):
54         * WebKitSupport/InPageSearchManager.h:
55         (InPageSearchManager):
56
57 2012-09-04  Rob Buis  <rbuis@rim.com>
58
59         [BlackBerry] FatFingers::cachingStrategy uses incorrect enum value
60         https://bugs.webkit.org/show_bug.cgi?id=95783
61
62         Reviewed by Antonio Gomes.
63
64         Use the correct enum values.
65
66         * WebKitSupport/FatFingers.cpp:
67         (BlackBerry::WebKit::FatFingers::cachingStrategy):
68
69 2012-09-04  Antonio Gomes  <agomes@rim.com>
70
71         [BlackBerry] Use child/ScrollableContent layer's position instead of parent/ScrollLayer's boundsOrigin
72         https://bugs.webkit.org/show_bug.cgi?id=95778
73         PR #202252
74
75         Reviewed by Rob Buis.
76         Internally reviewed by Arvid Nilsson.
77
78         Upstream has switch away from using the parent scroll layer's bounds origin
79         in order to translate contents of all its child layers. Instead now, it directly
80         sets the scroll position of the child scrollable contents layer.
81
82         Source/WebKit/blackberry:
83         * Api/InRegionScroller.cpp:
84         (BlackBerry::WebKit::InRegionScrollerPrivate::setScrollPositionCompositingThread):
85         * WebKitSupport/InRegionScrollableArea.cpp:
86         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
87
88         No new tests, since it is a catch-up with upstreaming code.
89
90 2012-09-04  George Staikos  <staikos@webkit.org>
91
92         [BlackBerry] Fix memory leak in InputHandler
93         https://bugs.webkit.org/show_bug.cgi?id=95771
94
95         Reviewed by Rob Buis.
96
97         Simply delete the arrays at function exit.
98
99         * WebKitSupport/InputHandler.cpp:
100         (BlackBerry::WebKit::InputHandler::openSelectPopup):
101
102 2012-09-04  George Staikos  <staikos@webkit.org>
103
104         [BlackBerry] pass isMainFrame() through to notifyDocumentOnLoad()
105         https://bugs.webkit.org/show_bug.cgi?id=95766
106
107         Reviewed by Rob Buis.
108
109         Passing the frame status through will allow the client to make better
110         decisions about how to act on the onload.
111
112         * Api/WebPageClient.h:
113         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
114         (WebCore::FrameLoaderClientBlackBerry::dispatchDidHandleOnloadEvents):
115
116 2012-09-04  Rob Buis  <rbuis@rim.com>
117
118         [BlackBerry] Provide virtual dtor for DumpRenderTreeClient
119         https://bugs.webkit.org/show_bug.cgi?id=95769
120
121         Reviewed by Yong Li.
122
123         Also remove WTF prefixes.
124
125         * Api/DumpRenderTreeClient.h:
126
127 2012-09-04  Mary Wu  <mary.wu@torchmobile.com.cn>
128
129         [BlackBerry] Add webplatform and browser to build info
130         https://bugs.webkit.org/show_bug.cgi?id=95715
131
132         Reviewed by George Staikos.
133
134         PR# 202102
135
136         * WebKitSupport/AboutData.cpp:
137         (BlackBerry::WebKit::buildPage):
138
139 2012-08-31  Jacky Jiang  <zhajiang@rim.com>
140
141         [BlackBerry] ASSERT failure in RenderBlock::checkPositionedObjectsNeedLayout
142         https://bugs.webkit.org/show_bug.cgi?id=95611
143
144         Reviewed by Antonio Gomes.
145
146         PR:200127
147         Remove r118405 now as we already have a new fix webkit/43f8394b for
148         that issue and it is not reproducible anymore after the removal.
149         In this way, we can get rid of this ASSERT failure as well.
150         Thanks Antonio for the suggestion.
151
152         * Api/WebPage.cpp:
153         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
154
155 2012-08-31  Joshua Netterfield  <jnetterfield@rim.com>
156
157         [BlackBerry] Eliminate WebGL IT policy
158         https://bugs.webkit.org/show_bug.cgi?id=95604
159         Internal RIM PR #198764
160
161         Reviewed by Rob Buis.
162
163         This is no longer a requirement for the BlackBerry port.
164
165         * Api/WebPage.cpp:
166         (BlackBerry::WebKit::WebPagePrivate::init):
167         (BlackBerry::WebKit::WebPage::setWebGLEnabled):
168         * WebKitSupport/AboutData.cpp:
169         (BlackBerry::WebKit::configPage):
170
171 2012-08-30  Benjamin Poulain  <bpoulain@apple.com>
172
173         Replace JSC::UString by WTF::String
174         https://bugs.webkit.org/show_bug.cgi?id=95271
175
176         Reviewed by Geoffrey Garen.
177
178         Replace UString by String.
179
180         * WebCoreSupport/ClientExtension.cpp:
181         * WebCoreSupport/PagePopupBlackBerry.cpp:
182         (WebCore::PagePopupBlackBerry::installDomFunction):
183
184 2012-08-30  Jacky Jiang  <zhajiang@rim.com>
185
186         [BlackBerry] ASSERT failure in JSC::MarkedAllocator::allocateSlowCase
187         https://bugs.webkit.org/show_bug.cgi?id=95492
188
189         Reviewed by Yong Li.
190
191         PR: 200724
192         Hold the JSLock for the current thread before we call toRef to avoid
193         the ASSERT failure.
194
195         * Api/WebPage.cpp:
196         (BlackBerry::WebKit::WebPagePrivate::executeJavaScript):
197
198 2012-08-30  Antonio Gomes  <agomes@rim.com>
199
200         [BlackBerry] Remove unneeded force-immediate-repaint from InRegionScroller::setLayerScrollPosition
201         https://bugs.webkit.org/show_bug.cgi?id=95476
202         PR #200704
203
204         Reviewed by Yong Li.
205
206         This code is not needed at this point for neither the fast nor slow in-region
207         scroll codepaths, and it is a huge performance beast as it forces all
208         containers to get full-repainted per scroll call (in webkit thread).
209
210         Patch also take this opportunity to remove an early-return we
211         have in the {i}frame slow scrolling code path so that we can
212         adjust the selection handles in this case as well.
213
214         * Api/InRegionScroller.cpp:
215         (BlackBerry::WebKit::InRegionScrollerPrivate::setLayerScrollPosition):
216
217 2012-08-30  Hanna Ma  <Hanma@rim.com>
218
219         [BlackBerry] node search does not work with elements on touch start listener
220         https://bugs.webkit.org/show_bug.cgi?id=95252
221
222         Reviewed by Antonio Gomes.
223
224         Fix the node search function of web insepctor on elements with touch start listener.
225         Add methods from webPage to check if the node search functionality is enabled before handling touch events.
226         PR194107
227
228         * Api/WebPage.cpp:
229         (BlackBerry::WebKit::WebPage::touchEvent):
230
231 2012-08-30  Arvid Nilsson  <anilsson@rim.com>
232
233         [BlackBerry] One shot drawing sync flag never cleared when there's no layers
234         https://bugs.webkit.org/show_bug.cgi?id=95447
235
236         Reviewed by Antonio Gomes.
237
238         PR 199866
239         When we remove the layers, WebKit could tell us we need a one shot
240         drawing sync to repaint the BackingStore with the content that was
241         previously drawn by layers. We also sometimes set the one shot drawing
242         sync flag manually.
243
244         We would bail from commit if there were no layers and not actually
245         perform the osds, so it left the osds flag set forever and the
246         situation prevails, because nobody will ever clear the osds flag.
247
248         The BackingStore surrenders the responsibility of blitting to the AC
249         commit mechanism when a one shot drawing sync is pending, because we
250         want the operations render, commit and blit to happen in the correct
251         order with no intermediate blits.
252
253         So, no commit means no blit, and the result of regular rendering did
254         not show up on screen.
255
256         Fixed by not bailing from commit if there's no layers, instead clearing
257         the "needs commit" and osds flags and performing a blit.
258
259         Reviewed internally by Andrew Lo.
260
261         * Api/WebPage.cpp:
262         (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
263
264 2012-08-30  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
265
266         Use ASCIILiteral for DEFINE_STATIC_LOCAL string
267         https://bugs.webkit.org/show_bug.cgi?id=95420
268
269         Reviewed by Benjamin Poulain.
270
271         As recommended by http://trac.webkit.org/wiki/EfficientStrings,
272         WebKit needs to use ASCIILiteral for the string of DEFINE_STATIC_LOCAL.
273
274         * Api/WebSettings.cpp:
275         (WebKit):
276
277 2012-08-29  Nima Ghanavatian  <nghanavatian@rim.com>
278
279         [BlackBerry] Do not use the shadow tree when retrieving the underlying element for FatFinger.
280         https://bugs.webkit.org/show_bug.cgi?id=95372
281
282         By using the shadow tree we were getting a mismatch between elements of the
283         current element under focus and the one return to us from FatFingers.
284         Passing ShadowContentNotAllowed to get the right handle.
285
286         Reviewed by Antonio Gomes.
287
288         * WebKitSupport/TouchEventHandler.cpp:
289         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
290
291 2012-08-29  Robin Cao  <robin.cao@torchmobile.com.cn>
292
293         [BlackBerry] Move the handling of UserMedia requests to the client
294         https://bugs.webkit.org/show_bug.cgi?id=95317
295         PR #197283
296
297         Reviewed by George Staikos.
298
299         Internally reviewed by George Staikos.
300
301         Move the logic for user media requests handling to the client, as it requires
302         inputs from users. Also adds a origin field to WebUserMediaRequest.
303
304         * Api/WebPageClient.h:
305         (Platform):
306         * WebCoreSupport/UserMediaClientImpl.cpp:
307         (WebCore::UserMediaClientImpl::UserMediaClientImpl):
308         (WebCore::UserMediaClientImpl::~UserMediaClientImpl):
309         (WebCore::UserMediaClientImpl::requestUserMedia):
310         (WebCore::UserMediaClientImpl::cancelUserMediaRequest):
311         * WebCoreSupport/UserMediaClientImpl.h:
312         (UserMediaClientImpl):
313
314 2012-08-29  Antonio Gomes  <agomes@rim.com>
315
316         [BlackBerry] Replace blackberry specific HitTestRequest::FingerUp by TouchEvent + Release
317         https://bugs.webkit.org/show_bug.cgi?id=95383
318
319         Reviewed by Rob Buis.
320
321         * WebKitSupport/TouchEventHandler.cpp:
322         (BlackBerry::WebKit::TouchEventHandler::touchEventCancel):
323
324 2012-08-29  Rob Buis  <rbuis@rim.com>
325
326         [BlackBerry] Adjust wtf include header style
327         https://bugs.webkit.org/show_bug.cgi?id=95368
328
329         Reviewed by Yong Li.
330
331         Switch to #include <wtf/...> like the other ports.
332
333         * Api/BlackBerryGlobal.cpp:
334         * Api/WebPage.cpp:
335         * WebCoreSupport/ChromeClientBlackBerry.cpp:
336         * WebCoreSupport/GeolocationControllerClientBlackBerry.h:
337         * WebCoreSupport/SelectPopupClient.h:
338         * WebKitSupport/AboutData.cpp:
339         * WebKitSupport/DOMSupport.cpp:
340         * WebKitSupport/GLES2Context.cpp:
341         * WebKitSupport/InPageSearchManager.h:
342         * WebKitSupport/InputHandler.cpp:
343
344 2012-08-29  Jacky Jiang  <zhajiang@rim.com>
345
346         [BlackBerry] Remove unused tapGesture in WebPage.cpp
347         https://bugs.webkit.org/show_bug.cgi?id=95357
348
349         Reviewed by Rob Buis.
350
351         Remove unused variable tapGesture in WebPage.cpp.
352         Internally reviewed by Gen Mak.
353
354         * Api/WebPage.cpp:
355         (BlackBerry::WebKit::WebPage::touchEvent):
356
357 2012-08-28  Antonio Gomes  <agomes@rim.com>
358
359         [BlackBerry] crash while trying to scroll any inner frame
360         https://bugs.webkit.org/show_bug.cgi?id=95287
361         PR #198510
362
363         Reviewed by George Staikos.
364
365         Set the starting point of scrolling (slow path only still)
366         for inner frames. It was left over as set to 0 by r126474.
367
368         In practice, patch fixes a crash on gmail.com desktop edition.
369
370         * WebKitSupport/InRegionScrollableArea.cpp:
371         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
372
373 2012-08-28  Sheriff Bot  <webkit.review.bot@gmail.com>
374
375         Unreviewed, rolling out r126914.
376         http://trac.webkit.org/changeset/126914
377         https://bugs.webkit.org/show_bug.cgi?id=95239
378
379         it breaks everything and fixes nothing (Requested by pizlo on
380         #webkit).
381
382         * Api/BackingStore.cpp:
383         (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect):
384         (BlackBerry::WebKit::BackingStorePrivate::visibleTilesRect):
385         (BlackBerry::WebKit::BackingStorePrivate::resetTiles):
386         (BlackBerry::WebKit::BackingStorePrivate::updateTiles):
387         (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion):
388         (BlackBerry::WebKit::BackingStorePrivate::mapFromTransformedContentsToTiles):
389         * WebCoreSupport/NotificationPresenterImpl.cpp:
390         (WebCore::NotificationPresenterImpl::cancel):
391         (WebCore::NotificationPresenterImpl::onPermission):
392         (WebCore::NotificationPresenterImpl::notificationClicked):
393         * WebCoreSupport/UserMediaClientImpl.cpp:
394         (WebCore::UserMediaClientImpl::cancelUserMediaRequest):
395         * WebKitSupport/AboutData.cpp:
396         (BlackBerry::WebKit::dumpJSCTypeCountSetToTableHTML):
397         * WebKitSupport/FrameLayers.cpp:
398         (BlackBerry::WebKit::FrameLayers::removeLayerByFrame):
399         (BlackBerry::WebKit::FrameLayers::commitOnWebKitThread):
400         (BlackBerry::WebKit::FrameLayers::calculateRootLayer):
401
402 2012-08-28  Nima Ghanavatian  <nghanavatian@rim.com>
403
404         [BlackBerry] Spellcheck should be enabled if undefined in content.
405         https://bugs.webkit.org/show_bug.cgi?id=95139
406
407         Currently we only enable spellcheck if it is defined as such in
408         the web content explicitly.
409         Making this change to enable by default, and only turn off if it is
410         explicitly set, or if we expect the field to be a username, email or
411         url.
412
413         Internally reviewed by Mike Fenton.
414
415         Reviewed by Rob Buis.
416
417         * WebKitSupport/InputHandler.cpp:
418         (BlackBerry::WebKit::InputHandler::requestCheckingOfString):
419         (BlackBerry::WebKit::InputHandler::setElementFocused):
420         (BlackBerry::WebKit::InputHandler::unlockSequenceMap):
421         (WebKit):
422         (BlackBerry::WebKit::InputHandler::shouldSpellCheckElement):
423         * WebKitSupport/InputHandler.h:
424         (InputHandler):
425
426 2012-08-28  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
427
428         Rename first/second to key/value in HashMap iterators
429         https://bugs.webkit.org/show_bug.cgi?id=82784
430
431         Reviewed by Eric Seidel.
432
433         * Api/BackingStore.cpp:
434         (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect):
435         (BlackBerry::WebKit::BackingStorePrivate::visibleTilesRect):
436         (BlackBerry::WebKit::BackingStorePrivate::resetTiles):
437         (BlackBerry::WebKit::BackingStorePrivate::updateTiles):
438         (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion):
439         (BlackBerry::WebKit::BackingStorePrivate::mapFromTransformedContentsToTiles):
440         * WebCoreSupport/NotificationPresenterImpl.cpp:
441         (WebCore::NotificationPresenterImpl::cancel):
442         (WebCore::NotificationPresenterImpl::onPermission):
443         (WebCore::NotificationPresenterImpl::notificationClicked):
444         * WebKitSupport/AboutData.cpp:
445         (BlackBerry::WebKit::dumpJSCTypeCountSetToTableHTML):
446         * WebKitSupport/FrameLayers.cpp:
447         (BlackBerry::WebKit::FrameLayers::removeLayerByFrame):
448         (BlackBerry::WebKit::FrameLayers::commitOnWebKitThread):
449         (BlackBerry::WebKit::FrameLayers::calculateRootLayer):
450         * WebCoreSupport/UserMediaClientImpl.cpp:
451         (WebCore::UserMediaClientImpl::cancelUserMediaRequest):
452
453 2012-08-28  Nima Ghanavatian  <nghanavatian@rim.com>
454
455         [BlackBerry] Range boundaries should use endOfBlock instead of endOfLine.
456         https://bugs.webkit.org/show_bug.cgi?id=95135
457
458         The original implementation used nextLinePosition to iterate
459         through the field from the start of each line, and was bounded in
460         comparison to the endOfLine. This works fine as long as there aren't any
461         empty lines between paragraphs of text, since these will have
462         startOfLine == endOfLine and break out.
463
464         Also, protect map access with a mutex in case we get a response
465         before updating the map. Further, we should check the Range pointer
466         before using it, since its not guaranteed to be valid.
467
468         Internally reviewed by Mike Fenton.
469
470         Reviewed by Antonio Gomes.
471
472         * WebKitSupport/InputHandler.cpp:
473         (BlackBerry::WebKit::InputHandler::spellCheckBlock):
474
475 2012-08-28  Andrew Lo  <anlo@rim.com>
476
477         [BlackBerry] One shot drawing synchronization broken
478         https://bugs.webkit.org/show_bug.cgi?id=95179
479
480         Reviewed by Antonio Gomes.
481         Internally reviewed by Arvid Nilsson.
482
483         Make sure no backing store blits happen during one shot drawing
484         synchronization.
485         Since we always blit during commit now, make sure we don't blit if
486         we commit after a render.
487         We no longer need a deferred blit since we don't commit during renderContents
488         now. Instead, we only commit & blit once after a full render job.
489
490         * Api/BackingStore.cpp:
491         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
492         (BlackBerry::WebKit::BackingStorePrivate::repaint):
493         (BlackBerry::WebKit::BackingStorePrivate::slowScroll):
494         (BlackBerry::WebKit::BackingStorePrivate::renderJob):
495         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
496         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
497         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
498         (WebKit):
499         (BlackBerry::WebKit::BackingStorePrivate::drawAndBlendLayersForDirectRendering):
500         (BlackBerry::WebKit::BackingStorePrivate::didRenderContent):
501         * Api/BackingStore_p.h:
502         (BackingStorePrivate):
503         * Api/WebPage.cpp:
504         (WebKit):
505         (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
506         * Api/WebPage_p.h:
507         (WebPagePrivate):
508         * WebKitSupport/RenderQueue.cpp:
509         (BlackBerry::WebKit::RenderQueue::renderAllCurrentRegularRenderJobs):
510         (BlackBerry::WebKit::RenderQueue::renderRegularRenderJob):
511         (BlackBerry::WebKit::RenderQueue::visibleScrollJobsCompleted):
512
513 2012-08-28  Parth Patel  <parpatel@rim.com>
514
515         [BlackBerry] Removing unnecessary include of Class BlackBerryPlatformClient
516         https://bugs.webkit.org/show_bug.cgi?id=95113
517
518         Reviewed by Kentaro Hara.
519
520         Refactoring has lead to relocation of many or all methods from Class
521         BlackBerryPlatformClient to other classes. Some files include
522         BlackBerryPlatformClient but does not use its instance thus these
523         includes has to be removed.
524
525         * Api/BackingStore.cpp:
526
527 2012-08-28  Andy Chen  <andchen@rim.com>
528
529         [BlackBerry] UpdateViewport uses wrong size for frameView
530         https://bugs.webkit.org/show_bug.cgi?id=95138
531
532         Reviewed by Antonio Gomes.
533         Internally reviewed by Jakob Petsovits.
534
535         Use actual visible size instead of screen size when updating viewport size,
536         otherwise, frameView size would be too big.
537
538         * Api/WebPage.cpp:
539         (BlackBerry::WebKit::WebPagePrivate::updateViewportSize):
540
541 2012-08-28  Andy Chen  <andchen@rim.com>
542
543         [BlackBerry] Pseudo class "active" is broken
544         https://bugs.webkit.org/show_bug.cgi?id=95142
545
546         Reviewed by Antonio Gomes.
547
548         Check if an element is affected by active rule before cancelling
549         the touch event.
550         PR 198544.
551
552         * WebKitSupport/TouchEventHandler.cpp:
553         (BlackBerry::WebKit::TouchEventHandler::touchEventCancel):
554
555 2012-08-27  Sheriff Bot  <webkit.review.bot@gmail.com>
556
557         Unreviewed, rolling out r126836.
558         http://trac.webkit.org/changeset/126836
559         https://bugs.webkit.org/show_bug.cgi?id=95163
560
561         Broke all Apple ports, EFL, and Qt. (Requested by tkent on
562         #webkit).
563
564         * Api/BackingStore.cpp:
565         (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect):
566         (BlackBerry::WebKit::BackingStorePrivate::visibleTilesRect):
567         (BlackBerry::WebKit::BackingStorePrivate::resetTiles):
568         (BlackBerry::WebKit::BackingStorePrivate::updateTiles):
569         (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion):
570         (BlackBerry::WebKit::BackingStorePrivate::mapFromTransformedContentsToTiles):
571         * WebCoreSupport/NotificationPresenterImpl.cpp:
572         (WebCore::NotificationPresenterImpl::cancel):
573         (WebCore::NotificationPresenterImpl::onPermission):
574         (WebCore::NotificationPresenterImpl::notificationClicked):
575         * WebKitSupport/AboutData.cpp:
576         (BlackBerry::WebKit::dumpJSCTypeCountSetToTableHTML):
577         * WebKitSupport/FrameLayers.cpp:
578         (BlackBerry::WebKit::FrameLayers::removeLayerByFrame):
579         (BlackBerry::WebKit::FrameLayers::commitOnWebKitThread):
580         (BlackBerry::WebKit::FrameLayers::calculateRootLayer):
581
582 2012-08-27  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
583
584         Rename first/second to key/value in HashMap iterators
585         https://bugs.webkit.org/show_bug.cgi?id=82784
586
587         Reviewed by Eric Seidel.
588
589         * Api/BackingStore.cpp:
590         (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect):
591         (BlackBerry::WebKit::BackingStorePrivate::visibleTilesRect):
592         (BlackBerry::WebKit::BackingStorePrivate::resetTiles):
593         (BlackBerry::WebKit::BackingStorePrivate::updateTiles):
594         (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion):
595         (BlackBerry::WebKit::BackingStorePrivate::mapFromTransformedContentsToTiles):
596         * WebCoreSupport/NotificationPresenterImpl.cpp:
597         (WebCore::NotificationPresenterImpl::cancel):
598         (WebCore::NotificationPresenterImpl::onPermission):
599         (WebCore::NotificationPresenterImpl::notificationClicked):
600         * WebKitSupport/AboutData.cpp:
601         (BlackBerry::WebKit::dumpJSCTypeCountSetToTableHTML):
602         * WebKitSupport/FrameLayers.cpp:
603         (BlackBerry::WebKit::FrameLayers::removeLayerByFrame):
604         (BlackBerry::WebKit::FrameLayers::commitOnWebKitThread):
605         (BlackBerry::WebKit::FrameLayers::calculateRootLayer):
606
607 2012-08-27  Sheriff Bot  <webkit.review.bot@gmail.com>
608
609         Unreviewed, rolling out r126772.
610         http://trac.webkit.org/changeset/126772
611         https://bugs.webkit.org/show_bug.cgi?id=95137
612
613         "This change breaks news.qq.com" (Requested by leoyang on
614         #webkit).
615
616         * Api/WebPage.cpp:
617         (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize):
618
619 2012-08-27  Leo Yang  <leoyang@rim.com>
620
621         [BlackBerry] Not using absoluteVisibleOverSize when rotating
622         https://bugs.webkit.org/show_bug.cgi?id=95092
623         PR #190469
624
625         Reviewed by Antonio Gomes.
626         Reviewed internally by Arvid Nilsson.
627
628         When we are rotating don't count absolute overflow visible size
629         into fixed layout size because we are in a transient state. The
630         absolute overflow visible size remains old size during rotation.
631
632         * Api/WebPage.cpp:
633         (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize):
634
635 2012-08-25  Antonio Gomes  <agomes@rim.com>
636
637         [BlackBerry] Remove the 'in region scrollable starting node' concept from InRegionScroller
638         https://bugs.webkit.org/show_bug.cgi?id=95020
639
640         Reviewed by Rob Buis.
641
642         'In-region start scrolling node' is an obsolete concept, and we can remove it
643         in favor of using the information from the cached layers.
644
645         * Api/InRegionScroller.cpp:
646         (WebKit):
647         (BlackBerry::WebKit::InRegionScrollerPrivate::reset): Adjusted as it used to clear
648         the cached 'node'.
649         (BlackBerry::WebKit::InRegionScrollerPrivate::isActive): Added method to be
650         checked directly instead of only null-checking the previously cached 'node'.
651         (BlackBerry::WebKit::InRegionScrollerPrivate::clearDocumentData): New method to
652         clear the cached resources if its document is done.
653         (BlackBerry::WebKit::InRegionScrollerPrivate::pushBackInRegionScrollable): Adjusted
654         to not care about the cached 'node' anymore.
655         * Api/InRegionScroller_p.h:
656         (InRegionScrollerPrivate):
657         * Api/WebPage.cpp:
658         (BlackBerry::WebKit::WebPagePrivate::notifyInRegionScrollStopped): Check ::isActive instead
659         of ::hasNode, since the later is gone.
660         (BlackBerry::WebKit::WebPagePrivate::enqueueRenderingOfClippedContentOfScrollableAreaAfterInRegionScrolling):
661         Changed the method signature, given that we do have a cached 'node' to pass in as parameter anymore.
662         (BlackBerry::WebKit::WebPagePrivate::clearDocumentData): Delegate all the related work to InRegionScroller.
663         * Api/WebPage_p.h:
664         (WebPagePrivate):
665         * WebKitSupport/TouchEventHandler.cpp:
666         (BlackBerry::WebKit::TouchEventHandler::drawTapHighlight):
667 .
668 2012-08-25  Antonio Gomes  <agomes@rim.com>
669
670         BlackBerry] Shrink the in-region nested scrollable list as soon as we can
671         https://bugs.webkit.org/show_bug.cgi?id=95019
672
673         Reviewed by Rob Buis.
674
675         We cache all possible nested scrollable in-region layers given a point.
676         It is up to the client to pick a view, based on the scroll position and limits
677         of each layer, and on the direction user swipes its finger.
678         From the point we pick a view on, we stick with it, and any other
679         possibly cached layer can be uncached, as it won't be needed.
680         Patch provides a simple solution to that.
681
682         * Api/InRegionScroller.cpp:
683         (BlackBerry::WebKit::InRegionScrollerPrivate::InRegionScrollerPrivate):
684         (BlackBerry::WebKit::InRegionScrollerPrivate::reset):
685         (BlackBerry::WebKit::InRegionScrollerPrivate::setScrollPositionWebKitThread):
686         (BlackBerry::WebKit::InRegionScrollerPrivate::calculateActiveAndShrinkCachedScrollableAreas):
687         (WebKit):
688         (BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint):
689         * Api/InRegionScroller_p.h:
690         (InRegionScrollerPrivate):
691
692 2012-08-25  Antonio Gomes  <agomes@rim.com>
693
694         For convenience, make RenderLayer::enclosingElement a public method.
695         https://bugs.webkit.org/show_bug.cgi?id=95018
696
697         Reviewed by George Staikos.
698
699         Make use of the new public RenderLayer::enclosingElement method and
700         remove duplicated code.
701
702         * WebKitSupport/InRegionScrollableArea.cpp:
703         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
704
705 2012-08-27  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
706
707         Rename RegisterProtocolHandler API to NavigatorContentUtils
708         https://bugs.webkit.org/show_bug.cgi?id=94920
709
710         Reviewed by Adam Barth.
711
712         Renaming whatever RegisterProtocolHandler-prefixed to NavigatorContentUtils-prefixed.
713
714         * WebCoreSupport/AboutDataEnableFeatures.in:
715         * WebCoreSupport/ChromeClientBlackBerry.cpp:
716         (WebCore):
717         (WebCore::ChromeClientBlackBerry::registerProtocolHandler):
718         * WebCoreSupport/ChromeClientBlackBerry.h:
719         (ChromeClientBlackBerry):
720
721 2012-08-26  Arvid Nilsson  <anilsson@rim.com>
722
723         [BlackBerry] ASSERT failed in WebPagePrivate::commitRootLayerIfNeeded()
724         https://bugs.webkit.org/show_bug.cgi?id=94921
725
726         PR 104676
727         As visibility changed due to WebPage::setVisible(true),
728         resumeRootLayerCommit() would call commitRootLayerIfNeeded(), without
729         layouting or rendering. If a one shot drawing sync was pending at this
730         time, it would cause the condition
731         ASSERT(!needsOneShotDrawingSynchronization()) to fail.
732
733         The comment immediately before the assert states that "In case of one
734         shot drawing synchronization, you should first layoutIfNeeded, render,
735         then commit and draw the layers". However, resumeRootLayerCommit() did
736         no such thing.
737
738         Fixed by removing the call to commitRootLayerIfNeeded() from
739         resumeRootLayerCommit(), because the latter is only called in a code
740         path where we're going to layout, render and then commit anyway. These
741         operations will be performed from resumeBackingStore() which is called
742         at the end of setVisible().
743
744         Reviewed by George Staikos.
745
746         * Api/WebPage.cpp:
747         (BlackBerry::WebKit::WebPagePrivate::resumeRootLayerCommit):
748
749 2012-08-24  Adam Treat  <atreat@rim.com>
750
751         [BlackBerry] Web pages are zoomed out to much on initial load
752         https://bugs.webkit.org/show_bug.cgi?id=94830
753
754         The previous patch caused a slight regression to the calculation we do
755         for the default splitting factor in the render queue.  The default value
756         we use to represent the max area should be the tile size.  This was true
757         with the old calculation of default max layout width since it was the
758         screen size.  The fix is to be explicit and use the tile size directly.
759
760         Reviewed by George Staikos.
761
762         * WebKitSupport/RenderQueue.cpp:
763         (BlackBerry::WebKit::RenderQueue::splittingFactor):
764
765 2012-08-24  Parth Patel  <parpatel@rim.com>
766
767         [BlackBerry] Changes resulting from moving network related methods
768         from platform client to platform settings.
769         https://bugs.webkit.org/show_bug.cgi?id=94963
770
771         Reviewed by Yong Li.
772
773         Changes in response to Network methods moved from
774         class BlackBerryPlatformClient to class BlackBerryPlatformSettings
775         in platform repository.
776
777         * WebKitSupport/AboutData.cpp:
778         (BlackBerry::WebKit::cachePage):
779
780 2012-08-24  Liam Quinn  <lquinn@rim.com>
781
782         [BlackBerry] Debug assertion fires in BackingStorePrivate::renderJob()
783         https://bugs.webkit.org/show_bug.cgi?id=94960
784
785         Reviewed by Adam Treat.
786
787         Change the assertion into an early return as recommended by Adam Treat.
788
789         * Api/BackingStore.cpp:
790         (BlackBerry::WebKit::BackingStorePrivate::renderJob):
791
792 2012-08-24  Andrew Lo  <anlo@rim.com>
793
794         [BlackBerry] Animation & UI lag when rendering
795         https://bugs.webkit.org/show_bug.cgi?id=94943
796
797         Reviewed by Rob Buis.
798
799         Schedule a backing store blit & composite when commiting root layer.
800         This results in compositing not having to wait until after a long render
801         operation, increasing responsiveness & fixing animations which skip to
802         the last frame due to lag.
803
804         This can cause a blit during a "one shot drawing synchronization", which is
805         a render & commit on the AC layers, which may result in flashing.
806         However, this can happen in other situations as well, and we feel that
807         the responsiveness, reduced lag, and smoothness of animations is
808         more important.
809
810         Internal PR194209
811         Internally reviewed by: George Staikos.
812
813         * Api/WebPage.cpp:
814         (BlackBerry::WebKit::WebPagePrivate::commitRootLayer):
815
816 2012-08-24  Parth Patel  <parpatel@rim.com>
817
818         [BlackBerry] Changes resulting from moving application directory methods from platform client to platform settings.
819         https://bugs.webkit.org/show_bug.cgi?id=94249
820
821         Reviewed by Rob Buis.
822
823         PR# 170160
824         Changes in response to Application Directory methods moved from
825         Class BlackBerryPlatformClient to BlackBerryPlatformSettings in
826         platform respository since these methods are more appropriate in
827         class BlackBerryPlatformSettings.
828
829         * WebCoreSupport/IconDatabaseClientBlackBerry.cpp:
830         (WebCore::IconDatabaseClientBlackBerry::initIconDatabase):
831
832 2012-08-24  Antonio Gomes  <agomes@rim.com>
833
834         [BlackBerry] Touch cancel can cause huge and needless invalidations
835         https://bugs.webkit.org/show_bug.cgi?id=94938
836         PR #198051
837
838         Reviewed by George Staikos.
839         Internally reviewed by Gen Mak.
840
841         In order to remove the possible hover effect on touch_cancel, we always
842         invalidate the node under the fat finger, being the fat finger valid or not.
843
844         Point is: having a valid fat finger node does not mean the original touch
845         position was actually adjust for clicking or that the fat finger is actually
846         valid. We set the fat finger node to be the result of the point-based hit-test
847         regardless if it is a click target or not (in order to make our mouse-move
848         machinery to work).
849
850         We should can less aggressively invalidate the fat finger node, since it can
851         be rather an expensive call (longer than 1s in the worst scenario).
852
853         * WebKitSupport/TouchEventHandler.cpp:
854         (BlackBerry::WebKit::TouchEventHandler::touchEventCancel):
855
856 2012-08-24  Arvid Nilsson  <anilsson@rim.com>
857
858         [BlackBerry] Add WebPage API to reset block zoom
859         https://bugs.webkit.org/show_bug.cgi?id=94863
860
861         PR 187478
862         This is an alternative to WebPage::blockZoomAnimationFinished() when
863         it's desirable to avoid rerendering of the whole web page at the end
864         of block zoom. This is the case when the planned "incremental zoom
865         factor" is used instead of zoomAboutPoint and it's relatives.
866
867         Ideally, the block zoom algorithm would be clever enough not to need
868         a reset or any form of callback when the animation finishes, but that
869         requires the implementation of said incremental zoom factor, which is
870         not done yet.
871
872         Reviewed by Antonio Gomes.
873
874         * Api/WebPage.cpp:
875         (BlackBerry::WebKit::WebPage::resetBlockZoom):
876         (WebKit):
877         * Api/WebPage.h:
878
879 2012-08-23  Antonio Gomes  <agomes@rim.com>
880
881         [BlackBerry] Obsolete the in-region scroll codepath prior to BB10's
882         https://bugs.webkit.org/show_bug.cgi?id=94839
883         PR #197775
884
885         Reviewed by George Staikos.
886
887         This codepath is not needed anymore, so lets let it RIP.
888
889         The only code addition is due to some code I've moved from WebPagePrivate::scrollNodeRecursively
890         and WebPagePrivate::scrollBy to InRegionScrollerPrivate::setLayerScrollPosition.
891         Rest is code removal ...
892
893         * Api/InRegionScroller.cpp:
894         (BlackBerry::WebKit::InRegionScrollerPrivate::setLayerScrollPosition):
895         * Api/InRegionScroller_p.h:
896         (InRegionScrollerPrivate):
897         * Api/WebPage.cpp:
898         (BlackBerry::WebKit::WebPagePrivate::scrollBy):
899         (BlackBerry::WebKit::WebPage::scrollBy):
900         * Api/WebPage.h:
901         * Api/WebPage_p.h:
902         (WebPagePrivate):
903
904 2012-08-23  Adam Treat  <atreat@rim.com>
905
906         [BlackBerry] Replace the three different rendering mechanisms for clearing the render queue
907         https://bugs.webkit.org/show_bug.cgi?id=94837
908
909         Reviewed by George Staikos.
910
911         PR 197738
912
913         Currently, we have three different mechanisms for clearing the render queue.
914         The first mechanism is render on idle.  Whenever the webkit thread becomes idle
915         (read: no more events in its queue) we render the next job in the render queue.
916          This is the primary means we use for clearing the render queue.  However, this
917         mechanism has a flaw, it is such a low priority mechanism that sometimes the
918         queue grows so fast due to higher priority events adding rects to the queue
919         that this mechanism can't possibly keep up.  That is what leads to the second
920         mechanism: rendering right before a timer is fired when we discover that the
921         render queue is under pressure and rendering on idle can't keep up.  However,
922         there are still degenerate cases where even this mechanism does not allow us to
923         keep up.  That brings us to the third mechanism: rendering based on a timer
924         that is a catch-all.
925
926         The second and third mechanisms lead to very large render jobs as they try and
927         clear the queue faster when it comes under pressure.  These very large render
928         jobs end up keeping the webkit thread busy with a message that can take large
929         fractions of a second to resolve.
930
931         These three mechanisms were put in place when the backingstore had a different
932         overall design that was not truly asynchronous.  This patch replaces these
933         three mechanisms with a single one that uses the platform messaging classes to
934         full purpose - a uniquely coalescing message that has a higher priority level
935         than timers making sure the render queue can never come under pressure.
936
937         * Api/BackingStore.cpp:
938         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
939         (WebKit):
940         (RenderJobMessage):
941         (BlackBerry::WebKit::RenderJobMessage::RenderJobMessage):
942         (BlackBerry::WebKit::BackingStorePrivate::dispatchRenderJob):
943         (BlackBerry::WebKit::BackingStorePrivate::renderJob):
944         (BlackBerry::WebKit::BackingStore::blitContents):
945         * Api/BackingStore.h:
946         * Api/BackingStore_p.h:
947         (BackingStorePrivate):
948         * Api/WebPage.cpp:
949         * Api/WebPage.h:
950         * WebKitSupport/RenderQueue.cpp:
951         (BlackBerry::WebKit::RenderQueue::reset):
952         (BlackBerry::WebKit::RenderQueue::addToRegularQueue):
953         (BlackBerry::WebKit::RenderQueue::addToScrollZoomQueue):
954         (BlackBerry::WebKit::RenderQueue::clear):
955         (BlackBerry::WebKit::RenderQueue::clearVisibleZoom):
956         (BlackBerry::WebKit::RenderQueue::render):
957
958 2012-08-23  Antonio Gomes  <agomes@rim.com>
959
960         [BlackBerry] Unify slow and fast in-region scrolling code paths
961         https://bugs.webkit.org/show_bug.cgi?id=94834
962         PR #197662
963
964         Reviewed by Rob Buis.
965
966         Internally reviewed by Arvid Nilsson.
967
968         In order to be able to remove a bunch of obsolete code from
969         InRegionScroller.cpp, we need to unify the codepaths for slow
970         and fast in-region scrolling.
971
972         This patch caches the root scrollable node of each scrollable block
973         in InRegionScrollableArea also for the non-composited-scrolling case now too
974         (analogly to the way we cache LayerWebKitThread for the composited scrolling case).
975
976         Now the client (libwebview) can dispatch an in-region scrolling with one single code path,
977         making use of a boolean (argh!) to inform if the scroll of the given
978         layer supports compositing or not. Later on, this boolean is used to casting the proper element.
979
980         * Api/InRegionScroller.cpp:
981         (BlackBerry::WebKit::InRegionScroller::setScrollPositionWebKitThread):
982         (BlackBerry::WebKit::InRegionScrollerPrivate::setScrollPositionWebKitThread):
983         * Api/InRegionScroller.h:
984         * Api/InRegionScroller_p.h:
985         (InRegionScrollerPrivate):
986         * WebKitSupport/InRegionScrollableArea.cpp:
987         (WebKit):
988         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
989         (BlackBerry::WebKit::enclosingLayerNode):
990         * WebKitSupport/InRegionScrollableArea.h:
991         (WebCore):
992         (InRegionScrollableArea):
993
994 2012-08-23  Jacky Jiang  <zhajiang@rim.com>
995
996         [BlackBerry] Web pages are zoomed out to much on initial load
997         https://bugs.webkit.org/show_bug.cgi?id=94830
998
999         Reviewed by Adam Treat.
1000
1001         PR: 193943
1002         Browser continuously adds paddings to the left and right sides of the
1003         main contents which makes the main contents even smaller.
1004         The issue can be reproduced on the desktop websites such as
1005         huffingtonpost.ca, bloomberg.com, online.wsj.com, nytimes.com,
1006         yahoo.com, thestar.com, sina.com.cn, sohu.com and so on.
1007         The root cause is that we layout those contents at the width of 1280
1008         although the fixed width of the main contents of those websites is
1009         less than 1000, which results in adding the paddings.
1010         To fix this, we need to get back to the default max layout size
1011         1024 * 768, which will make the main contents of those popular websites
1012         take full advantage of the screen real estate and look much better.
1013
1014         Internally reviewed by Adam Treat.
1015
1016         * Api/WebPage.cpp:
1017         (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize):
1018         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
1019         * Api/WebPage_p.h:
1020         (WebPagePrivate):
1021         * WebKitSupport/RenderQueue.cpp:
1022         (BlackBerry::WebKit::RenderQueue::splittingFactor):
1023
1024 2012-08-22  Crystal Zhang  <haizhang@rim.com>
1025
1026         [BlackBerry] Make all pickers non-zoomable
1027         https://bugs.webkit.org/show_bug.cgi?id=94729
1028
1029         Reviewed by Antonio Gomes.
1030
1031         Move HTML header initialization to PagePopupBlackBerry as that part are all the same, and make all pickers non-zoomable.
1032
1033         * Api/WebPage.cpp:
1034         (BlackBerry::WebKit::WebPagePrivate::screenSize):
1035         (WebKit):
1036         * Api/WebPage_p.h:
1037         (WebPagePrivate):
1038         * WebCoreSupport/DatePickerClient.cpp:
1039         (WebCore::DatePickerClient::generateHTML):
1040         (WebCore::DatePickerClient::writeDocument):
1041         * WebCoreSupport/PagePopupBlackBerry.cpp:
1042         (WebCore::PagePopupBlackBerry::init):
1043         (WebCore::PagePopupBlackBerry::generateHTML):
1044         (WebCore):
1045         * WebCoreSupport/PagePopupBlackBerry.h:
1046         (PagePopupBlackBerry):
1047         * WebCoreSupport/SelectPopupClient.cpp:
1048         (WebCore::SelectPopupClient::generateHTML):
1049         (WebCore::SelectPopupClient::writeDocument):
1050
1051 2012-08-21  Benjamin C Meyer  <bmeyer@rim.com>
1052
1053         [BlackBerry] Add option to only add JavaScript object 'qnx' to private webviews
1054         https://bugs.webkit.org/show_bug.cgi?id=94621
1055
1056         Reviewed by Yong Li.
1057
1058         * Api/WebPage.cpp:
1059         (BlackBerry::WebKit::WebPage::enableQnxJavaScriptObject):
1060         (WebKit):
1061         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
1062         * Api/WebPage.h:
1063         * Api/WebPage_p.h:
1064         (WebPagePrivate):
1065         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1066         (WebCore::FrameLoaderClientBlackBerry::dispatchDidClearWindowObjectInWorld):
1067
1068 2012-08-21  Robin Cao  <robin.cao@torchmobile.com.cn>
1069
1070         [BlackBerry] Add support for getUserMedia
1071         https://bugs.webkit.org/show_bug.cgi?id=94591
1072
1073         Reviewed by George Staikos.
1074
1075         Implement getUserMedia feature using the platform API.
1076
1077         PR #153571
1078
1079         Reviewed internally by George Staikos.
1080
1081         * WebCoreSupport/UserMediaClientImpl.cpp:
1082         (WebCore):
1083         (WebCore::userMediaRequestsMap):
1084         (WebCore::toMediaStreamSource):
1085         (WebCore::toMediaStreamDescriptor):
1086         (WebUserMediaRequestClientImpl):
1087         (WebCore::WebUserMediaRequestClientImpl::WebUserMediaRequestClientImpl):
1088         (WebCore::WebUserMediaRequestClientImpl::requestSucceeded):
1089         (WebCore::WebUserMediaRequestClientImpl::requestFailed):
1090         (WebCore::UserMediaClientImpl::UserMediaClientImpl):
1091         (WebCore::UserMediaClientImpl::~UserMediaClientImpl):
1092         (WebCore::UserMediaClientImpl::requestUserMedia):
1093         (WebCore::UserMediaClientImpl::cancelUserMediaRequest):
1094         (WebCore::UserMediaClientImpl::webUserMedia):
1095         * WebCoreSupport/UserMediaClientImpl.h:
1096         (BlackBerry):
1097         (Platform):
1098         (UserMediaClientImpl):
1099
1100 2012-08-21  Kihong Kwon  <kihong.kwon@samsung.com>
1101
1102         [EFL][GTK][BlackBerry] Fix build error in the DeviceOrientationClient
1103         https://bugs.webkit.org/show_bug.cgi?id=94586
1104
1105         Reviewed by Kentaro Hara.
1106
1107         Fix build error in the DeviceOrientationClientBlackBerry.cpp.
1108         It is occured because DeviceOrientation is changed to DeviceOrientationData in the WebCore.
1109
1110         * WebCoreSupport/DeviceOrientationClientBlackBerry.cpp:
1111         (DeviceOrientationClientBlackBerry::lastOrientation):
1112
1113 2012-08-21  Jacky Jiang  <zhajiang@rim.com>
1114
1115         [BlackBerry] about:memory and about:memory-live should show numbers for the chrome process
1116         https://bugs.webkit.org/show_bug.cgi?id=94531
1117
1118         Reviewed by Rob Buis.
1119         Patch by Jacky Jiang  <zhajiang@rim.com>
1120
1121         PR: 190504
1122         Add total committed memory of chrome process into about:memory and add
1123         its peak into about:memory-live.
1124
1125         Internally reviewed by Yong Li and George Staikos.
1126
1127         * WebKitSupport/AboutData.cpp:
1128         (BlackBerry::WebKit::memoryPage):
1129         (BlackBerry::WebKit::MemoryTracker::clear):
1130         (MemoryTracker):
1131         (BlackBerry::WebKit::MemoryTracker::peakTotalCommittedMemoryOfCurrentProcess):
1132         (BlackBerry::WebKit::MemoryTracker::peakTotalCommittedMemoryOfChromeProcess):
1133         (BlackBerry::WebKit::MemoryTracker::MemoryTracker):
1134         (BlackBerry::WebKit::MemoryTracker::updateMemoryPeaks):
1135         (BlackBerry::WebKit::memoryPeaksToHtmlTable):
1136
1137 2012-08-21  Antonio Gomes  <agomes@rim.com>
1138
1139         [BlackBerry] Accelerated In-Region Scrolling does not render correctly on rotation
1140         https://bugs.webkit.org/show_bug.cgi?id=94608
1141         PR #194754
1142
1143         Reviewed by Goerge Staikos.
1144
1145         When one translates/scrolls a HW accelerated scrollable layer, it makes use of
1146         the OVERRIDE mechanism. Suppose the following scenario:
1147
1148         - In landscape, the overflow menu is scrollable. Then the user scrolls it so
1149         that is has scroll position of 0, -100.
1150         - when he rotates to portrait, the menus fit well to the available space but it
1151         still has the OVERRIDE set, so it keeps the layer translated at 0, -100.
1152
1153         Fix is simple: clear the override when we stop scrolling a HW accelerated layer,
1154         when we destroy the objects.
1155
1156         * WebKitSupport/InRegionScrollableArea.cpp:
1157         (BlackBerry::WebKit::InRegionScrollableArea::~InRegionScrollableArea):
1158
1159 2012-08-21  Antonio Gomes  <agomes@rim.com>
1160
1161         [BlackBerry] Properly notify WebKit when Client stops in-region scrolling
1162         https://bugs.webkit.org/show_bug.cgi?id=94603
1163         PR #195813
1164
1165         Reviewed by Goerge Staikos.
1166
1167         Simplify the API to get a notification of when a in-region
1168         scrolling has finished.
1169
1170         * Api/WebPage.cpp:
1171         (BlackBerry::WebKit::WebPagePrivate::notifyInRegionScrollStopped):
1172         Removed an unneeded parameter.
1173         (BlackBerry::WebKit::WebPage::notifyInRegionScrollStopped):
1174         Ditto.
1175         * Api/WebPage.h:
1176         * Api/WebPage_p.h:
1177         (WebPagePrivate):
1178
1179 2012-08-20  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
1180
1181         [BlackBerry] Select popup shows blank content when its option tags contain '\' characters
1182         https://bugs.webkit.org/show_bug.cgi?id=94321
1183
1184         Reviewed by George Staikos.
1185
1186         PR 194224
1187
1188         When the SelectPopupClient generates HTML, if there is a character '\' in the select options'
1189         description, we should escape it to avoid the character being interpreted as an escape character.
1190
1191         * WebCoreSupport/SelectPopupClient.cpp:
1192         (WebCore::SelectPopupClient::generateHTML):
1193
1194 2012-08-20  Genevieve Mak  <gmak@rim.com>
1195
1196         [BLACKBERRY] Add notification if an element does not have touch move or mouse move handlers.
1197         https://bugs.webkit.org/show_bug.cgi?id=94529
1198
1199         Reviewed by George Staikos.
1200
1201         Send a notification to the client if the fat finger element does
1202         not have a mouse move or touch move handler or if it is empty.
1203         PR #177701
1204
1205         Reviewed Internally By Mike Lattanzio and Antonio Gomes.
1206
1207         * Api/WebPageClient.h:
1208         * WebKitSupport/TouchEventHandler.cpp:
1209         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
1210
1211 2012-08-17  Antonio Gomes  <agomes@rim.com>
1212
1213         [BlackBerry] Allow in-region accelerated scrolling take advantage of defer_blits
1214         https://bugs.webkit.org/show_bug.cgi?id=94379
1215         PR #194595
1216
1217         Reviewed by Yong Li.
1218
1219         Client does the blitting now.
1220
1221         * Api/InRegionScroller.cpp:
1222         (BlackBerry::WebKit::InRegionScrollerPrivate::setScrollPositionCompositingThread):
1223
1224 2012-08-17  Jacky Jiang  <zhajiang@rim.com>
1225
1226         [BlackBerry] On reload, www.sohu.com renders part white background, part overscroll pattern
1227         https://bugs.webkit.org/show_bug.cgi?id=94348
1228
1229         Reviewed by Yong Li.
1230         Jacky Jiang  <zhajiang@rim.com>
1231
1232         PR: 179200
1233         This can fix the reload issues of sohu.com, yahoo.com and
1234         thestar.com/iphone(PR158041). And it is also related with PR178305.
1235
1236         Internally reviewed by George Staikos.
1237
1238         * Api/WebPage.cpp:
1239         (BlackBerry::WebKit::WebPagePrivate::setLoadState):  Keeping scales for
1240         reload was doing more harm than good. Two reasons to remove this:
1241         (1) During reload, contents rect is changing due to layout updates,
1242         it is possible that the contents or the white background can't cover
1243         the whole screen if we are using the previous scales.
1244         (2) Before reload, the source of the web page can be changed, therefore
1245         previous scales won't be valid anymore.
1246         Remove shouldRestoreViewState() as this check here is useless now.
1247         (BlackBerry::WebKit::WebPagePrivate::zoomToInitialScaleOnLoad):  During
1248         reload, we should give it a chance to zoom to fit the screen,
1249         otherwise, it happens that the contents can't cover the whole screen
1250         until we restore the view state, see PR158041.
1251         Remove shouldRestoreViewState() as the error page issue PR178305 can be
1252         covered by reload now.
1253         * WebCoreSupport/FrameLoaderClientBlackBerry.h: Remove unused shouldRestoreViewState().
1254
1255 2012-08-16  Mike Fenton  <mifenton@rim.com>
1256
1257         [BlackBerry] Use form state to determine the VKB enter key.
1258         https://bugs.webkit.org/show_bug.cgi?id=94239
1259
1260         Reviewed by Rob Buis.
1261
1262         PR 188234.
1263
1264         If the enter key for the VKB is not explicitly set, use
1265         submit if we are in a single line input and a default
1266         button exists for the form.
1267
1268         Reviewed Internally by Gen Mak.
1269
1270         * WebKitSupport/InputHandler.cpp:
1271         (BlackBerry::WebKit::InputHandler::setElementFocused):
1272
1273 2012-08-16  Konrad Piascik  <kpiascik@rim.com>
1274
1275         [BlackBerry] Reload valid page from Error Page keeps history ViewState and zoom.
1276         https://bugs.webkit.org/show_bug.cgi?id=94123
1277
1278         Reviewed by Antonio Gomes.
1279
1280         Reviewed internally by Leo Yang, Jacky Jiang.
1281         PR 178305
1282
1283         * Api/WebPage.cpp:
1284         (BlackBerry::WebKit::WebPagePrivate::setLoadState):Reset the scales and
1285         the user scalable flag if we're reloading from an error page.
1286         (BlackBerry::WebKit::WebPagePrivate::updateViewportSize): Don't update the
1287         viewport size if we're still in the WebPagePrivate::init method.
1288         (BlackBerry::WebKit::WebPagePrivate::zoomToInitialScaleOnLoad):
1289         Properly set the shouldZoom flag if we're not going to restore the
1290         view state.
1291         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1292         (WebCore::FrameLoaderClientBlackBerry::FrameLoaderClientBlackBerry):
1293         (WebCore::FrameLoaderClientBlackBerry::dispatchDidCommitLoad): Set the
1294         ViewState's shouldSaveViewState flag if we're coming from an error page.
1295         (WebCore::FrameLoaderClientBlackBerry::saveViewStateToItem): Set the
1296         new member variable m_shouldRestoreViewState based on the ViewState's
1297         shouldSaveViewState flag.
1298         (WebCore::FrameLoaderClientBlackBerry::restoreViewState): Added early
1299         return if m_shouldRestoreViewState is false.
1300         * WebCoreSupport/FrameLoaderClientBlackBerry.h: Add new method to have
1301         the client track whether we should restore the view state.
1302         (WebCore::FrameLoaderClientBlackBerry::shouldRestoreViewState):
1303         (FrameLoaderClientBlackBerry):
1304
1305 2012-08-16  Leo Yang  <leoyang@rim.com>
1306
1307         [BlackBerry] Remove Mobile mode from WebPage.cpp and WebPage_p.h
1308         https://bugs.webkit.org/show_bug.cgi?id=94223
1309         PR #192773
1310
1311         Reviewed by Rob Buis.
1312         Reviewed internally by Arvid Nilsson.
1313
1314         Remove Mobile mode as it's not been used. Also remove code that
1315         handle top-level SVG document because now we can handle it in Desktop mode.
1316
1317         * Api/WebPage.cpp:
1318         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
1319         (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize):
1320         * Api/WebPage_p.h:
1321
1322 2012-08-16  Arvid Nilsson  <anilsson@rim.com>
1323
1324         [BlackBerry] SurfacePool::waitForBuffer() sometimes waits for deleted EGLSyncKHR object
1325         https://bugs.webkit.org/show_bug.cgi?id=94208
1326
1327         Reviewed by Rob Buis.
1328
1329         SurfacePool::notifyBuffersComposited() adds a tile's previous
1330         sync object to the garbage list before replacing it with a new one.
1331         However, it failed to thoroughly clear all tiles that were referencing
1332         the old sync object.
1333
1334         Thus it could happen that if a set of tiles A was composited, then
1335         another set of tiles B was composited, only the intersection of A and B
1336         was cleared of the soon-to-be-deleted sync object, and the subtraction
1337         A - B would reference an invalid sync object in case the BackingStore
1338         decided to render to one of the tiles in A - B before they were
1339         composited again.
1340
1341         Fixed by storing each individual sync object in only one place so we
1342         don't have to rummage through all tiles and remove stale references to
1343         sync objects that are about to be destroyed.
1344
1345         A new reference counted Fence class is added for this purpose, to store
1346         a sync object. Tiles refer to Fence instances instead of holding a sync
1347         object directly. Since Fence is reference counted, several tiles can
1348         refer to the same Fence instance, and clearing its sync object will
1349         instantly remove it from the grasp of all tiles that depend on that
1350         Fence.
1351
1352         Since there's no point in waiting for the same Fence twice, the only
1353         operation provided on Fence is takePlatformSync() which returns the
1354         sync object and clears the Fence of its sync object.
1355
1356         Reviewed internally by Filip Spacek.
1357
1358         PR 193610
1359
1360         * WebKitSupport/BackingStoreTile.cpp:
1361         (BlackBerry::WebKit::TileBuffer::TileBuffer):
1362         * WebKitSupport/BackingStoreTile.h:
1363         (BlackBerry):
1364         (Fence):
1365         (BlackBerry::Fence::create):
1366         (BlackBerry::Fence::takePlatformSync):
1367         (BlackBerry::Fence::Fence):
1368         (BlackBerry::WebKit::TileBuffer::fence):
1369         (BlackBerry::WebKit::TileBuffer::setFence):
1370         (TileBuffer):
1371         * WebKitSupport/SurfacePool.cpp:
1372         (BlackBerry::WebKit::SurfacePool::waitForBuffer):
1373         (BlackBerry::WebKit::SurfacePool::notifyBuffersComposited):
1374         * WebKitSupport/SurfacePool.h:
1375         (SurfacePool):
1376
1377 2012-08-16  Rob Buis  <rbuis@rim.com>
1378
1379         [BlackBerry] Suppress non DRT JS Console output.
1380         https://bugs.webkit.org/show_bug.cgi?id=94058
1381
1382         Reviewed by Yong Li.
1383         Reviewed internally by Ming Xie.
1384
1385         Some actual test results show JS Console showing up twice, for
1386         instance traversal/moz-bug559526.html. Only print the DRT specific
1387         Console message.
1388
1389         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1390         (WebCore::ChromeClientBlackBerry::addMessageToConsole):
1391
1392 2012-08-16  Arvid Nilsson  <anilsson@rim.com>
1393
1394         [BlackBerry] WebGL and Canvas fail to display after being restored from page cache
1395         https://bugs.webkit.org/show_bug.cgi?id=94105
1396
1397         Reviewed by George Staikos.
1398
1399         The EGLImage was being destroyed when releasing layer resources on the
1400         compositing thread, but the WebKit thread layer never found out and
1401         failed to create a new image.
1402
1403         Fixed by extending the release layer resources mechanism to also make a
1404         pass on the WebKit thread so that thread's layers have a chance to
1405         delete their textures and related resources.
1406
1407         Reviewed internally by Filip Spacek.
1408
1409         PR 192899
1410
1411         * Api/WebPage.cpp:
1412         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
1413         (BlackBerry::WebKit::WebPagePrivate::releaseLayerResources):
1414         (WebKit):
1415         (BlackBerry::WebKit::WebPagePrivate::releaseLayerResourcesCompositingThread):
1416         (BlackBerry::WebKit::WebPagePrivate::suspendRootLayerCommit):
1417         * Api/WebPage_p.h:
1418         (WebPagePrivate):
1419         * WebKitSupport/FrameLayers.cpp:
1420         (BlackBerry::WebKit::FrameLayers::releaseLayerResources):
1421         (WebKit):
1422         * WebKitSupport/FrameLayers.h:
1423         (FrameLayers):
1424
1425 2012-08-16  Pierre Rossi  <pierre.rossi@gmail.com>
1426
1427         [Qt] Remove FontQt4, HAVE_QRAWFONT flag and the related dead code
1428         https://bugs.webkit.org/show_bug.cgi?id=93960
1429
1430         Reviewed by Simon Hausmann.
1431
1432         Following the removal of Qt 4 support from trunk in r124879.
1433
1434         * WebCoreSupport/AboutDataHaveFeatures.in: Remove all traces of HAVE_QRAWFONT's existence.
1435
1436 2012-08-15  Benjamin C Meyer  <bmeyer@rim.com>
1437
1438         [BlackBerry] When there is an exception we want to check if the ref is 0, not the
1439         value as JSObjectCallAsFunction returns 0 in that case.
1440         https://bugs.webkit.org/show_bug.cgi?id=94153
1441
1442         Reviewed by Yong Li.
1443
1444         * Api/WebPage.cpp:
1445         (BlackBerry::WebKit::WebPage::executeJavaScriptFunction):
1446
1447 2012-08-15  Yong Li  <yoli@rim.com>
1448
1449         [BlackBerry] Upstream FrameLoaderClientBlackBerry::securityOriginForNewDocument()
1450         https://bugs.webkit.org/show_bug.cgi?id=94139
1451
1452         Reviewed by Antonio Gomes.
1453
1454         Keep same security origin when a file URL automatically redirects to its child folder.
1455         This patch will be reverted when we finish the better solution.
1456         PR# 172333 and PR# 180590.
1457
1458         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1459         (WebCore::FrameLoaderClientBlackBerry::FrameLoaderClientBlackBerry):
1460         (WebCore::FrameLoaderClientBlackBerry::dispatchDidStartProvisionalLoad):
1461         (WebCore::FrameLoaderClientBlackBerry::securityOriginForNewDocument):
1462         (WebCore):
1463         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
1464         (FrameLoaderClientBlackBerry):
1465
1466 2012-08-15  Yong Li  <yoli@rim.com>
1467
1468         [BlackBerry] Should not keep recreating GeoTracker in setEnableHighAccuracy()
1469         https://bugs.webkit.org/show_bug.cgi?id=94136
1470
1471         Reviewed by Rob Buis.
1472         Internally reviewed by Lyon Chen.
1473
1474         PR# 192401.
1475         1. The prototype of GeoTracker::create() has changed.
1476         2. Fix the issue that it could recreate tracker unnecessarily when
1477            setEnableHighAccuracy() is called but accuracy requirment hasn't
1478            changed.
1479         3. Fix the issue setEnableHighAccuracy() could start tracking when
1480            tracker was suspended.
1481
1482         * WebCoreSupport/GeolocationControllerClientBlackBerry.cpp:
1483         (GeolocationControllerClientBlackBerry::startUpdating):
1484         (GeolocationControllerClientBlackBerry::setEnableHighAccuracy):
1485
1486 2012-08-15  Mike Fenton  <mifenton@rim.com>
1487
1488         [BlackBerry] Use the unconverted attribute instead of composing when deciding to how to handle key input.
1489         https://bugs.webkit.org/show_bug.cgi?id=94132
1490
1491         Reviewed by Rob Buis.
1492
1493         PR 139838.
1494
1495         Switch direct key input handling to be based on the unconverted
1496         attribute being present.  Converted keys, even during composition
1497         are now input directly.
1498
1499         Reviewed Internally by Nima Ghanavatian.
1500
1501         * WebKitSupport/InputHandler.cpp:
1502         (BlackBerry::WebKit::InputHandler::setText):
1503
1504 2012-08-15  Joshua Netterfield  <jnetterfield@rim.com>
1505
1506         [BlackBerry] Upstream BlackBerry build fixes
1507         https://bugs.webkit.org/show_bug.cgi?id=94121
1508
1509         Reviewed by Rob Buis.
1510
1511         This includes several build fixes due to incorrect upstream patches.
1512         These mistakes were never present downstream.
1513
1514         No new tests, because no new functionality is added.
1515
1516         * WebCoreSupport/AboutDataEnableFeatures.in:
1517         * WebCoreSupport/AboutTemplate.html.cpp:
1518         (writeHeader):
1519
1520 2012-08-15  Leo Yang  <leoyang@rim.com>
1521
1522         [BlackBerry] Use nested layout when rotating
1523         https://bugs.webkit.org/show_bug.cgi?id=94117
1524
1525         Partially patched by Arvid Nilsson.
1526
1527         Reviewed by George Staikos.
1528         Reviewed internally by Arvid Nilsson.
1529
1530         When rotating the content width used for fixedLayoutSize is not
1531         correct because we are changing the rotation and the content with
1532         should be determined after layout. So we set the with to 0 if we
1533         are rotating and beginning the nested layout. And in setViewportSize
1534         we need a nested layout loop to trigger zoom-to-fit.
1535
1536         * Api/WebPage.cpp:
1537         (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize):
1538         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
1539
1540 2012-08-14  Antonio Gomes  <agomes@rim.com>
1541
1542         [BlackBerry] Stop copying ScrollViewBase vector all over
1543         https://bugs.webkit.org/show_bug.cgi?id=94021
1544
1545         Reviewed by Rob Buis.
1546
1547         It outlives long enough in WebKit that we can
1548         just pass a const+ref of it.
1549
1550         Internally reviewed by Gen Mak.
1551
1552         * Api/WebPageClient.h:
1553
1554 2012-08-14  Antonio Gomes  <agomes@rim.com>
1555
1556         [BlackBerry] Robust-fy the LayerWebKitThread ownership with InRegionScroller
1557         https://bugs.webkit.org/show_bug.cgi?id=93983
1558         PR #191737
1559
1560         Reviewed by Yong Li.
1561
1562         Patch changes the way we currently keep track of the active scrollable area
1563         objects: before, we acquired the scrollable areas and just passed them in a vector up
1564         to the client, copying it over and over again. Also, it was a client responsability to
1565         delete stuff (BAD!).
1566         Now, we keep track of vector within InRegionScroller, as a class member, which allows us to
1567         avoid copies (in follow up patch), and control until when these objects outlive.
1568
1569         Patch also changes InRegionScrollableArea to "retptr" the composited layer
1570         associated to it (if any). This ensure we have a non-null scrollable element always.
1571
1572         As mentioned, InRegionScroller is now responsible for deleting and vector of scrollable areas.
1573
1574         Internally reviewed by Arvid Nilsson.
1575
1576         * Api/InRegionScroller.cpp:
1577         (WebKit):
1578         (BlackBerry::WebKit::InRegionScrollerPrivate::reset): Method is now responsible for
1579         deleting the tracked scrollable areas.
1580         (BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint):
1581         Renamed from 'inRegionScrollableAreasForPoint'. It was changed in order to store the
1582         scrollable area objects instead of just pass a copy of them up to the client.
1583         (BlackBerry::WebKit::InRegionScrollerPrivate::activeInRegionScrollableAreas): Getter.
1584         (BlackBerry::WebKit::InRegionScrollerPrivate::pushBackInRegionScrollable): It was
1585         promoted to a class method instead of a local helper.
1586         * Api/InRegionScroller_p.h:
1587         (WebKit):
1588         (InRegionScrollerPrivate):
1589         * Api/WebPage.cpp:
1590         (BlackBerry::WebKit::WebPagePrivate::setScrollOriginPoint): Adjustments needed due to the
1591         above changed.
1592         * WebKitSupport/InRegionScrollableArea.cpp:
1593         (BlackBerry::WebKit::InRegionScrollableArea::~InRegionScrollableArea): Clear up the cached layer.
1594         (WebKit):
1595         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
1596         * WebKitSupport/InRegionScrollableArea.h:
1597         (InRegionScrollableArea):
1598
1599 2012-08-15  Nima Ghanavatian  <nghanavatian@rim.com>
1600
1601         [BlackBerry] Check for valid field focus before processing a spellcheck request
1602         https://bugs.webkit.org/show_bug.cgi?id=94115
1603
1604         Reviewed by Rob Buis.
1605
1606         PR192891
1607         Checking for valid field focus before processing the spellcheck
1608         request.
1609
1610         Internally reviewed by Mike Fenton.
1611
1612         * WebKitSupport/InputHandler.cpp:
1613         (BlackBerry::WebKit::InputHandler::requestCheckingOfString):
1614
1615 2012-08-14  Adam Barth  <abarth@webkit.org>
1616
1617         Delete Frame::domWindow() and Frame::existingDOMWindow()
1618         https://bugs.webkit.org/show_bug.cgi?id=93990
1619
1620         Reviewed by Eric Seidel.
1621
1622         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1623         (WebCore::toOriginString):
1624         (WebCore::ChromeClientBlackBerry::runJavaScriptAlert):
1625         (WebCore::ChromeClientBlackBerry::runJavaScriptConfirm):
1626         (WebCore::ChromeClientBlackBerry::runJavaScriptPrompt):
1627         (WebCore::ChromeClientBlackBerry::runBeforeUnloadConfirmPanel):
1628         (WebCore::ChromeClientBlackBerry::requestWebGLPermission):
1629
1630 2012-08-14  Leo Yang  <leoyang@rim.com>
1631
1632         [BlackBerry] Checkerboard flashes on Go Back
1633         https://bugs.webkit.org/show_bug.cgi?id=94018
1634
1635         Reviewed by Yong Li.
1636         Reviewed internally by Yong Li.
1637
1638         The backing store need to be suspended before the
1639         WebPagePrivate::restoreHistoryViewState() is called to avoid UI thread
1640         drawing checkerboard.
1641
1642         * Api/WebPage.cpp:
1643         (BlackBerry::WebKit::WebPagePrivate::restoreHistoryViewState):
1644         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1645         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
1646
1647 2012-08-14  Mike Fenton  <mifenton@rim.com>
1648
1649         [BlackBerry] Remove unnecessary \n's from InputHandler log messages.
1650         https://bugs.webkit.org/show_bug.cgi?id=94015
1651
1652         Reviewed by Rob Buis.
1653
1654         Remove many unnecessary \n's from the end of log messages.
1655
1656         Reviewed Internally by Nima Ghanavatian.
1657
1658         * WebKitSupport/InputHandler.cpp:
1659         (BlackBerry::WebKit::convertStringToWcharVector):
1660         (BlackBerry::WebKit::convertSpannableStringToString):
1661         (BlackBerry::WebKit::InputHandler::spannableTextInRange):
1662         (BlackBerry::WebKit::InputHandler::setText):
1663         (BlackBerry::WebKit::InputHandler::setSpannableTextAndRelativeCursor):
1664
1665 2012-08-14  Nima Ghanavatian  <nghanavatian@rim.com>
1666
1667         [BlackBerry] Queue spellcheck requests with char-count limitations
1668         https://bugs.webkit.org/show_bug.cgi?id=93866
1669
1670         Reviewed by Rob Buis.
1671
1672         PR184196
1673         Making spellcheck a little more granular so as to work around
1674         the limitations of the inputservice.
1675         Also, spellcheck the entire field on focus only if
1676         spellcheck="on" is explicitly set.
1677
1678         Internally reviewed by Mike Fenton.
1679
1680         * WebKitSupport/InputHandler.cpp:
1681         (BlackBerry::WebKit::InputHandler::requestCheckingOfString):
1682         (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
1683
1684 2012-08-14  Mike Fenton  <mifenton@rim.com>
1685
1686         [BlackBerry] Use Form helper functions to determine state in DOMSupport::isTextBasedContentEditableElement
1687         https://bugs.webkit.org/show_bug.cgi?id=93992
1688
1689         Reviewed by Antonio Gomes.
1690
1691         Use form control helper functions to determine the editable state
1692         of the input field.
1693
1694         * WebKitSupport/DOMSupport.cpp:
1695         (BlackBerry::WebKit::DOMSupport::isTextBasedContentEditableElement):
1696
1697 2012-08-14  Mike Fenton  <mifenton@rim.com>
1698
1699         [BlackBerry] Use constructor to initialize rect in TouchEventHandler::drawTapHighlight()
1700         https://bugs.webkit.org/show_bug.cgi?id=93988
1701
1702         Reviewed by Antonio Gomes.
1703
1704         Use constructor to initialize rect in TouchEventHandler::drawTapHighlight()
1705
1706         * WebKitSupport/TouchEventHandler.cpp:
1707         (BlackBerry::WebKit::TouchEventHandler::drawTapHighlight):
1708
1709 2012-08-14  Mike Fenton  <mifenton@rim.com>
1710
1711         [BlackBerry] Fix use of endsWith to use string instead of char.
1712         https://bugs.webkit.org/show_bug.cgi?id=93994
1713
1714         Reviewed by Antonio Gomes.
1715
1716         Regex comparison should use string instead of char comparison.
1717
1718         * WebKitSupport/DOMSupport.cpp:
1719         (BlackBerry::WebKit::DOMSupport::elementPatternMatches):
1720
1721 2012-08-14  Jacky Jiang  <zhajiang@rim.com>
1722
1723         [BlackBerry] Double-tap zoom on blocks on cnn.com desktop page doesn't work
1724         https://bugs.webkit.org/show_bug.cgi?id=93895
1725
1726         Reviewed by Antonio Gomes.
1727         Patch by Jacky Jiang  <zhajiang@rim.com>
1728
1729         PR: 188232
1730         When adjusting block zoom node, don't choose a node if the width of the
1731         node size is very close to the width of the actual visible size as
1732         block zoom can do nothing on such kind of node. This condition is more
1733         restrictive than the one based on area and can bail out early.
1734         In this way, we can get a better node for double-tap zoom.
1735
1736         * Api/WebPage.cpp:
1737         (BlackBerry::WebKit::WebPagePrivate::bestNodeForZoomUnderPoint):
1738         (BlackBerry::WebKit::WebPagePrivate::adjustedBlockZoomNodeForZoomAndExpandingRatioLimits):
1739         * Api/WebPage_p.h:
1740         (WebPagePrivate):
1741
1742 2012-08-14  Konrad Piascik  <kpiascik@rim.com>
1743
1744         [BlackBerry] Change the call to setUserScalable to use the setting.
1745         https://bugs.webkit.org/show_bug.cgi?id=93974
1746
1747         Reviewed by Rob Buis.
1748
1749         We should be using the WebSetting and not the current value of m_userScalable.
1750
1751         * Api/WebPage.cpp:
1752         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
1753
1754 2012-08-14  Charles Wei  <charles.wei@torchmobile.com.cn>
1755
1756         [BlackBerry] Some callback of Select onchange doesn't work
1757         https://bugs.webkit.org/show_bug.cgi?id=93944
1758
1759         Reviewed by George Staikos.
1760
1761         The Selection element is implemented with PagePopup, an HTML-based WebView with
1762         some Javascripts to make the UI of the select and option lists; The selection
1763         change is initiated from the javascript code in the Select Webview, and back to
1764         the native code of SelectPopupClient, which now in turn dispatches
1765         FormControlChangeEvent to the select element directly, and that causes the
1766         javascript callback been invoked in the same cycle as the javascript in the
1767         Popup View, and causes some Javascript Context problem.
1768
1769         The solution is to send the FormControlChangeEvent asynchronously by a timer, 
1770         when the JavaScript in the Popup view finishes execution, we then send the
1771         FormControlChangeEvent to the select element in the content page, that avoids
1772         the concurrent Javascript context issue.
1773
1774         * WebCoreSupport/SelectPopupClient.cpp:
1775         (WebCore::SelectPopupClient::SelectPopupClient):
1776         (WebCore::SelectPopupClient::setValueAndClosePopup):
1777         (WebCore):
1778         (WebCore::SelectPopupClient::notifySelectionChange):
1779         * WebCoreSupport/SelectPopupClient.h:
1780         (SelectPopupClient):
1781
1782 2012-08-14  Arvid Nilsson  <anilsson@rim.com>
1783
1784         [BlackBerry] Get rid of glCopyTexImage2D in Canvas and WebGL code paths
1785         https://bugs.webkit.org/show_bug.cgi?id=93614
1786
1787         Reviewed by Antonio Gomes.
1788
1789         We used to set up resource sharing between the compositing thread
1790         context and the Canvas and WebGL contexts, and use glCopyTexImage2D to
1791         get a copy of the framebuffer to use as front buffer for compositing
1792         purposes.
1793
1794         Now we instead create an EGLImage and blit the Canvas/WebGL output to
1795         it. The compositing thread creates a texture from the EGLImage in order
1796         to composite the output.
1797
1798         This allows us to turn off resource sharing, so the WebPageCompositor
1799         no longer needs to pass the compositing thread context to the webkit
1800         thread.
1801
1802         Reviewed internally by Filip Spacek.
1803
1804         PR 188472
1805
1806         * Api/WebPage.cpp:
1807         (BlackBerry::WebKit::WebPagePrivate::setCompositor):
1808         (BlackBerry::WebKit::WebPagePrivate::setCompositorHelper):
1809         * Api/WebPageCompositor.cpp:
1810         (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor):
1811         (BlackBerry::WebKit::WebPageCompositor::~WebPageCompositor):
1812         * Api/WebPage_p.h:
1813         (WebPagePrivate):
1814
1815 2012-08-14  Charles Wei  <charles.wei@torchmobile.com.cn>
1816
1817         [BlackBerry] Enable DNS prefetch
1818         https://bugs.webkit.org/show_bug.cgi?id=93846
1819
1820         Reviewed by George Staikos.
1821
1822
1823         * Api/WebPage.cpp:
1824         (BlackBerry::WebKit::WebPagePrivate::init):
1825
1826 2012-08-13  Tom Sepez  <tsepez@chromium.org>
1827
1828         [chromium] release FrameLoaderClientImpl::m_pluginWidget refptr upon Plugin Document detach.
1829         https://bugs.webkit.org/show_bug.cgi?id=93283
1830
1831         Reviewed by Eric Seidel.
1832
1833         Change the client redirectDataToPlugin method(s) to expect the possibility of
1834         a NULL argument, keeping existing behaviour otherwise.
1835
1836         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1837         (WebCore::FrameLoaderClientBlackBerry::redirectDataToPlugin):
1838
1839 2012-08-13  Mike Fenton  <mifenton@rim.com>
1840
1841         [BlackBerry] Update API for spell checking suggestions again.
1842         https://bugs.webkit.org/show_bug.cgi?id=93877
1843
1844         Reviewed by Antonio Gomes.
1845
1846         PR 163283.
1847
1848         Update the spell checking options request API
1849         to include the caret positions.
1850
1851         Reviewed internally by Nima Ghanavatian.
1852
1853         * Api/WebPageClient.h:
1854         * WebKitSupport/InputHandler.cpp:
1855         (BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint):
1856         (WebKit):
1857         (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions):
1858         * WebKitSupport/InputHandler.h:
1859         (Platform):
1860         (InputHandler):
1861         * WebKitSupport/TouchEventHandler.cpp:
1862         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
1863         * WebKitSupport/TouchEventHandler.h:
1864         (TouchEventHandler):
1865
1866 2012-08-13  Antonio Gomes  <agomes@rim.com>
1867
1868         [BlackBerry] Rounding error somewhere when translating CompositingLayer 's for in-region scrolling
1869         https://bugs.webkit.org/show_bug.cgi?id=93848
1870         PR #190986
1871
1872         Reviewed by Yong Li.
1873
1874         Patch adds a WebKit thread setScrollPosition-like API to InRegionScroller.
1875         It fixes a mismatch we had of setting a layer's scroll positing directly via
1876         ::setScrollPosition on the UI thread, but dispatching a coalesceable
1877         scrollBy(delta) message to WebKit thread.
1878
1879         * Api/InRegionScroller.cpp:
1880         (BlackBerry::WebKit::InRegionScroller::setScrollPositionCompositingThread):
1881         Changed the API name to match other thread specific methods naming.
1882         (WebKit):
1883         (BlackBerry::WebKit::InRegionScroller::setScrollPositionWebKitThread):
1884         Added a setScrollPosition-like method to InRegionScroller public API. Used
1885         together with its UI-thread counterpart, it can fix some rounding
1886         errors we have due to mixing ::setScrollPosition and ::scrollBy methods.
1887         (BlackBerry::WebKit::InRegionScrollerPrivate::setScrollPositionCompositingThread):
1888         Method renamed. See reasons above.
1889         (BlackBerry::WebKit::InRegionScrollerPrivate::setScrollPositionWebKitThread):
1890         Calls fowards the call to ::setLayerScrollPosition (below).
1891         (BlackBerry::WebKit::InRegionScrollerPrivate::setLayerScrollPosition):
1892         Sets the scroll position of a given RenderLayer.
1893         * Api/InRegionScroller.h:
1894         (InRegionScroller):
1895         * Api/InRegionScroller_p.h:
1896         (WebCore):
1897         (InRegionScrollerPrivate):
1898         * WebKitSupport/InRegionScrollableArea.cpp:
1899         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
1900         Cache the RenderLayer object associated to a given scrollable area
1901         instead of its LayerCompositingThread. This way we can use it for
1902         scrolling from both Compositing/UI and WebKit threads.
1903
1904 2012-08-12  Arvid Nilsson  <anilsson@rim.com>
1905
1906         [BlackBerry] Tap highlight flashes checkerboard after pinch zoom
1907         https://bugs.webkit.org/show_bug.cgi?id=93601
1908
1909         Reviewed by Antonio Gomes.
1910
1911         Since the tap highlight is usually rather small, we can reimplement
1912         GraphicsLayerClient::contentsVisible() to always return true in order
1913         to keep all AC layer tiles cached all the time.
1914
1915         PR 189895
1916
1917         * WebKitSupport/DefaultTapHighlight.cpp:
1918         (BlackBerry::WebKit::DefaultTapHighlight::contentsVisible):
1919         (WebKit):
1920         * WebKitSupport/DefaultTapHighlight.h:
1921         (DefaultTapHighlight):
1922
1923 2012-08-12  Arvid Nilsson  <anilsson@rim.com>
1924
1925         [BlackBerry] Tap highlight sometimes doesn't disappear
1926         https://bugs.webkit.org/show_bug.cgi?id=93711
1927
1928         Reviewed by Antonio Gomes.
1929
1930         The WebOverlayOverride implementation just changes properties of a
1931         LayerCompositingThread directly, which means the changes will
1932         immediately be overwritten on the next commit. Therefore, when the tap
1933         highlight implementation adds a fade out animation, that animation will
1934         instantly be removed again if a commit happens for any reason.
1935
1936         The reason is I totally botched the implementation of
1937         WebOverlayOverride, it's not wrapping WebCore::LayerOverride at all,
1938         instead for some reason it's manipulating the LayerCompositingThread
1939         directly.
1940
1941         Fixed by actually mapping WebOverlayOverride calls to the corresponding
1942         WebCore::LayerOverride method, and scheduling a compositing run to make
1943         the change visible and kick off animations.
1944
1945         Reviewed internally by Sean Wang.
1946
1947         PR 188453
1948
1949         * Api/WebOverlay.cpp:
1950         (BlackBerry::WebKit::WebOverlayPrivate::override):
1951         * Api/WebOverlayOverride.cpp:
1952         (BlackBerry::WebKit::WebOverlayOverride::WebOverlayOverride):
1953         (BlackBerry::WebKit::WebOverlayOverride::~WebOverlayOverride):
1954         (BlackBerry::WebKit::WebOverlayOverride::setPosition):
1955         (BlackBerry::WebKit::WebOverlayOverride::setAnchorPoint):
1956         (BlackBerry::WebKit::WebOverlayOverride::setSize):
1957         (BlackBerry::WebKit::WebOverlayOverride::setTransform):
1958         (BlackBerry::WebKit::WebOverlayOverride::setOpacity):
1959         (BlackBerry::WebKit::WebOverlayOverride::addAnimation):
1960         (BlackBerry::WebKit::WebOverlayOverride::removeAnimation):
1961         * Api/WebOverlayOverride.h:
1962         * Api/WebOverlay_p.h:
1963         (WebOverlayPrivate):
1964         (WebOverlayPrivateWebKitThread):
1965         (WebOverlayPrivateCompositingThread):
1966
1967 2012-08-10  Benjamin C Meyer  <bmeyer@rim.com>
1968
1969         Introduce JavaScriptVariant object.
1970         https://bugs.webkit.org/show_bug.cgi?id=93644
1971
1972         The JavaScriptVariant can be used for functions that return results from
1973         JavaScript such as executeJavaScript or functions that take arguments
1974         to pass a variable to JavaScript and they want to make sure the type
1975         is correct.
1976
1977         Convert executeJavaScriptFunction() to use this data type as the
1978         example, other functions will be converted in the future.
1979
1980         PR 14929
1981
1982         Internally reviewed by Joe Mason
1983         Reviewed by Adam Treat
1984
1985         * Api/JavaScriptVariant.cpp: Added.
1986         (WebKit):
1987         (BlackBerry::WebKit::JSValueRefToBlackBerryJavaScriptVariant):
1988         (BlackBerry::WebKit::BlackBerryJavaScriptVariantToJSValueRef):
1989         (BlackBerry::WebKit::JavaScriptVariant::JavaScriptVariant):
1990         (BlackBerry::WebKit::JavaScriptVariant::~JavaScriptVariant):
1991         (BlackBerry::WebKit::JavaScriptVariant::operator=):
1992         (BlackBerry::WebKit::JavaScriptVariant::setType):
1993         (BlackBerry::WebKit::JavaScriptVariant::type):
1994         (BlackBerry::WebKit::JavaScriptVariant::setDouble):
1995         (BlackBerry::WebKit::JavaScriptVariant::doubleValue):
1996         (BlackBerry::WebKit::JavaScriptVariant::setString):
1997         (BlackBerry::WebKit::JavaScriptVariant::stringValue):
1998         (BlackBerry::WebKit::JavaScriptVariant::setBoolean):
1999         (BlackBerry::WebKit::JavaScriptVariant::booleanValue):
2000         * Api/JavaScriptVariant.h: Added.
2001         (WebKit):
2002         * Api/JavaScriptVariant_p.h: Added.
2003         (WebKit):
2004         * Api/WebPage.cpp:
2005         (BlackBerry::WebKit::WebPage::executeJavaScriptFunction):
2006         * Api/WebPage.h:
2007
2008 2012-08-09  Leo Yang  <leoyang@rim.com>
2009
2010         [BlackBerry] Export InRegionScroller to fix build
2011         https://bugs.webkit.org/show_bug.cgi?id=93635
2012
2013         Reviewed by Antonio Gomes.
2014
2015         Build fix.
2016
2017         * Api/InRegionScroller.h:
2018
2019 2012-08-08  Jacky Jiang  <zhajiang@rim.com>
2020
2021         [BlackBerry] Implement about:memory-live
2022         https://bugs.webkit.org/show_bug.cgi?id=93153
2023
2024         Reviewed by Yong Li.
2025         Patch by Jacky Jiang  <zhajiang@rim.com>
2026
2027         Implementing about:memory-live to track memory peaks:
2028         - about:memory-live/start: start tracking memory peaks.
2029         - about:memory-live: show memory peaks every 30ms.
2030         - about:memory-live/stop: stop tracking and show memory peaks.
2031
2032         Mainly track the following memory peaks:
2033         - Total used memory (malloc + JSC).
2034         - Total committed memory.
2035         - Total mapped memory.
2036
2037         Add total committed memory for about:memory
2038
2039         * WebKitSupport/AboutData.cpp:
2040         (BlackBerry::WebKit::memoryPage):
2041         (WebKit):
2042         (MemoryTracker):
2043         (BlackBerry::WebKit::MemoryTracker::isActive):
2044         (BlackBerry::WebKit::MemoryTracker::clear):
2045         (BlackBerry::WebKit::MemoryTracker::peakTotalUsedMemory):
2046         (BlackBerry::WebKit::MemoryTracker::peakTotalCommittedMemory):
2047         (BlackBerry::WebKit::MemoryTracker::peakTotalMappedMemory):
2048         (BlackBerry::WebKit::MemoryTracker::MemoryTracker):
2049         (BlackBerry::WebKit::MemoryTracker::instance):
2050         (BlackBerry::WebKit::MemoryTracker::start):
2051         (BlackBerry::WebKit::MemoryTracker::stop):
2052         (BlackBerry::WebKit::MemoryTracker::updateMemoryPeaks):
2053         (BlackBerry::WebKit::memoryPeaksToHtmlTable):
2054         (BlackBerry::WebKit::memoryLivePage):
2055         (BlackBerry::WebKit::aboutData):
2056
2057 2012-08-08  Antonio Gomes  <agomes@rim.com>
2058
2059         [BlackBerry] Tie up the scrolling machinery to the graphics tree when applicable for in-region scroll
2060         https://bugs.webkit.org/show_bug.cgi?id=93482
2061         PR #187672
2062         Make InRegionScroller a simple public webkit/ API
2063         PR #188677
2064
2065         Reviewed by Rob Buis.
2066
2067         In order to prepare InRegionScroller to be a public API
2068         in webkit/, the patch:
2069
2070         1) Renamed the current InRegionScroller class to InRegionScrollerPrivate;
2071         2) Moved InRegionScroller.cpp|h from WebKitSupport/ to Api/;
2072         3) Renamed InRegionScroller.h to InRegionScroller_p.h;
2073         4) Added a new public class implementation to InRegionScroller.h;
2074         5) Adapted WebPage and TouchEventHandler classes to use InRegionScroller::d directly.
2075
2076         The most important API here is '::compositedSetScrollPosition'
2077
2078         It is a  UI/Compositing thread method only and sets the associated LayerCompositingThread
2079         (camouflaged as a unsigned) for each created InRegionScrollableArea that supports
2080         composited scrolling.
2081
2082         The way ::compositedSetScrollPosition "scrolls" a layer is by setting the boundsOrigin
2083         property to the LayerCompositingThread's 'override' property in the UI/Compositing thread.
2084
2085         * Api/InRegionScroller.cpp: Renamed from Source/WebKit/blackberry/WebKitSupport/InRegionScroller.cpp.
2086         (WebKit):
2087         (BlackBerry::WebKit::InRegionScroller::InRegionScroller):
2088         (BlackBerry::WebKit::InRegionScroller::~InRegionScroller):
2089         (BlackBerry::WebKit::InRegionScroller::compositedSetScrollPosition):
2090         (BlackBerry::WebKit::InRegionScrollerPrivate::InRegionScrollerPrivate):
2091         (BlackBerry::WebKit::InRegionScrollerPrivate::setNode):
2092         (BlackBerry::WebKit::InRegionScrollerPrivate::node):
2093         (BlackBerry::WebKit::InRegionScrollerPrivate::reset):
2094         (BlackBerry::WebKit::InRegionScrollerPrivate::hasNode):
2095         (BlackBerry::WebKit::InRegionScrollerPrivate::canScroll):
2096         (BlackBerry::WebKit::InRegionScrollerPrivate::compositedSetScrollPosition):
2097         (BlackBerry::WebKit::InRegionScrollerPrivate::scrollBy):
2098         (BlackBerry::WebKit::InRegionScrollerPrivate::inRegionScrollableAreasForPoint):
2099         (BlackBerry::WebKit::InRegionScrollerPrivate::scrollNodeRecursively):
2100         (BlackBerry::WebKit::InRegionScrollerPrivate::scrollRenderer):
2101         (BlackBerry::WebKit::InRegionScrollerPrivate::adjustScrollDelta):
2102         (BlackBerry::WebKit::canScrollInnerFrame):
2103         (BlackBerry::WebKit::canScrollRenderBox):
2104         (BlackBerry::WebKit::parentLayer):
2105         (BlackBerry::WebKit::enclosingLayerNode):
2106         (BlackBerry::WebKit::isNonRenderViewFixedPositionedContainer):
2107         (BlackBerry::WebKit::pushBackInRegionScrollable):
2108         * Api/InRegionScroller.h: Copied from Source/WebKit/blackberry/WebKitSupport/InRegionScroller.h.
2109         (WebKit):
2110         (InRegionScroller):
2111         * Api/InRegionScroller_p.h: Renamed from Source/WebKit/blackberry/WebKitSupport/InRegionScroller.h.
2112         (WebCore):
2113         (WebKit):
2114         (InRegionScrollerPrivate):
2115         * Api/WebPage.cpp:
2116         (BlackBerry::WebKit::WebPagePrivate::scrollBy):
2117         (BlackBerry::WebKit::WebPagePrivate::notifyInRegionScrollStatusChanged):
2118         (BlackBerry::WebKit::WebPagePrivate::clearDocumentData):
2119         (BlackBerry::WebKit::WebPagePrivate::setScrollOriginPoint):
2120         (BlackBerry::WebKit::WebPage::inRegionScroller):
2121         (WebKit):
2122         * Api/WebPage.h:
2123         (WebKit):
2124         * WebKitSupport/InRegionScrollableArea.cpp:
2125         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
2126         * WebKitSupport/TouchEventHandler.cpp:
2127         (BlackBerry::WebKit::TouchEventHandler::drawTapHighlight):
2128
2129 2012-08-08  Antonio Gomes  <agomes@rim.com>
2130
2131         [BlackBerry] Make WebOverlayPrivate::scheduleCompositingRun a WebPagePrivate method.
2132         https://bugs.webkit.org/show_bug.cgi?id=93480
2133         PR #188682
2134
2135         Reviewed by Rob Buis.
2136
2137         ... this way it can be used by others.
2138
2139         No behavioural change. Another preparation patch.
2140
2141         * Api/WebOverlay.cpp:
2142         (BlackBerry::WebKit::WebOverlayPrivate::scheduleCompositingRun):
2143         * Api/WebPage.cpp:
2144         (WebKit):
2145         (BlackBerry::WebKit::WebPagePrivate::scheduleCompositingRun):
2146         * Api/WebPage_p.h:
2147         (WebPagePrivate):
2148
2149 2012-08-08  Sheriff Bot  <webkit.review.bot@gmail.com>
2150
2151         Unreviewed, rolling out r124887.
2152         http://trac.webkit.org/changeset/124887
2153         https://bugs.webkit.org/show_bug.cgi?id=93504
2154
2155         Dependent API being removed. (Requested by mfenton on
2156         #webkit).
2157
2158         * Api/WebPageClient.h:
2159         * WebKitSupport/InputHandler.cpp:
2160         * WebKitSupport/InputHandler.h:
2161         (InputHandler):
2162         * WebKitSupport/TouchEventHandler.cpp:
2163         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
2164         (BlackBerry::WebKit::TouchEventHandler::spellCheck):
2165         (WebKit):
2166         * WebKitSupport/TouchEventHandler.h:
2167         (TouchEventHandler):
2168
2169 2012-08-08  Ed Baker  <edbaker@rim.com>
2170
2171         [BlackBerry] Add relayout after updating fixed reported size
2172         https://bugs.webkit.org/show_bug.cgi?id=93116
2173         PR #160059
2174         
2175         Reviewed by Antonio Gomes.
2176         
2177         Reviewed internally by Antonio Gomes.
2178
2179         On an orientation change and after fixed reported size is
2180         updated perform a layout and update the fixed elements after
2181         scrolling. This will recalculate the height and width of
2182         fixed position elements using percentage values with the
2183         new fixed reported size. Otherwise using the old fixed reported
2184         size in the new orientation overflowing or clipping could occur.
2185         
2186         * Api/WebPage.cpp:
2187         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
2188
2189 2012-08-07  Charles Wei  <charles.wei@torchmobile.com.cn>
2190
2191         [BlackBerry] always set PolicyAction to PolicyIgnore if the chrome returns false for acceptNavigationRequest
2192         https://bugs.webkit.org/show_bug.cgi?id=93251
2193
2194         Reviewed by George Staikos.
2195
2196         In acceptNavigationRequest(), webkit will ask if the chrome will accept the navigation request.
2197         We will take this chance to see if the request is an internal-webkit protocol, otherwise,
2198         we will try to launch an external application to handle the request, and ask webkit to ignore
2199         the request by returning false in acceptNavigationRequest().
2200
2201         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2202         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction):
2203
2204 2012-08-07  Konrad Piascik  <kpiascik@rim.com>
2205
2206         [BlackBerry] Change how devicePixelRatio is set.
2207         https://bugs.webkit.org/show_bug.cgi?id=93385
2208
2209         Reviewed by Antonio Gomes.
2210
2211         Change devicePixelRatio to be set immediately after the page is created based
2212         on the WebSetting.
2213
2214         * Api/WebPage.cpp:
2215         (BlackBerry::WebKit::WebPagePrivate::init):
2216         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
2217
2218 2012-08-07  Antonio Gomes  <agomes@rim.com>
2219
2220         [BlackBerry] [FullScreen] No need to scroll 'x' to 0 before entering fullscreen
2221         https://bugs.webkit.org/show_bug.cgi?id=91750
2222         PR #178293
2223
2224         Reviewed by Rob Buis.
2225
2226         We are not adjusting the 'left' CSS property of the fullscreen wrapper
2227         properly, so no need to scroll 'x' to 0 anymore.
2228
2229         Internally reviewed by Jacky Jiang.
2230
2231         * Api/WebPage.cpp:
2232         (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
2233
2234 2012-08-07  Antonio Gomes  <agomes@rim.com>
2235
2236         [BlackBerry][FullScreen] Remove the set/reset of touch modes code when entering/leaving fullscreen
2237         https://bugs.webkit.org/show_bug.cgi?id=92520
2238         PR #184511
2239
2240         Reviewed by Yong Li.
2241         Internally reviewed by Gen Mak.
2242
2243         Remove touch mode set/reset when entering/leaving fullscreen
2244         for media elements through the new FULLSCREEN_API code path.
2245         The client now handles it.
2246
2247         * Api/WebPage.cpp:
2248         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
2249         (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
2250         (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
2251         * Api/WebPage_p.h:
2252         (WebPagePrivate):
2253
2254 2012-08-07  Konrad Piascik  <kpiascik@rim.com>
2255
2256         [BlackBerry] Add missing include in FrameLoaderClienBlackBerry after Base64 moved.
2257         https://bugs.webkit.org/show_bug.cgi?id=93383
2258
2259         Reviewed by Rob Buis.
2260
2261         Base64 moved from platform/text to wtf/text, need to add mssing
2262         include.
2263
2264         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2265
2266 2012-08-07  Konrad Piascik  <kpiascik@rim.com>
2267
2268         [BlackBerry] InspectorOverlay class duplicated in WebCore
2269         https://bugs.webkit.org/show_bug.cgi?id=93124
2270
2271         Reviewed by Rob Buis.
2272
2273         Moved files to better align with namespace names.
2274
2275         * WebKitSupport/InspectorOverlay.cpp: Renamed from Source/WebKit/blackberry/WebCoreSupport/InspectorOverlay.cpp.
2276         (WebKit):
2277         (BlackBerry::WebKit::InspectorOverlay::create):
2278         (BlackBerry::WebKit::InspectorOverlay::InspectorOverlay):
2279         (BlackBerry::WebKit::InspectorOverlay::notifySyncRequired):
2280         (BlackBerry::WebKit::InspectorOverlay::paintContents):
2281         (BlackBerry::WebKit::InspectorOverlay::showDebugBorders):
2282         (BlackBerry::WebKit::InspectorOverlay::showRepaintCounter):
2283         (BlackBerry::WebKit::InspectorOverlay::~InspectorOverlay):
2284         (BlackBerry::WebKit::InspectorOverlay::clear):
2285         (BlackBerry::WebKit::InspectorOverlay::update):
2286         * WebKitSupport/InspectorOverlay.h: Renamed from Source/WebKit/blackberry/WebCoreSupport/InspectorOverlay.h.
2287         (WebCore):
2288         (WebKit):
2289         (InspectorOverlay):
2290         (InspectorOverlayClient):
2291         (BlackBerry::WebKit::InspectorOverlay::setClient):
2292         (BlackBerry::WebKit::InspectorOverlay::notifyAnimationStarted):
2293
2294 2012-08-07  Mike Fenton  <mifenton@rim.com>
2295
2296         [BlackBerry] Update API for spell checking suggestions.
2297         https://bugs.webkit.org/show_bug.cgi?id=93356
2298
2299         Reviewed by Antonio Gomes.
2300
2301         PR 163283.
2302
2303         Add connections for updated spell checking options request API.  Move
2304         all this logic into InputHandler.
2305
2306         Reviewed Internally by Gen Mak and Nima Ghanavatian.
2307
2308         * Api/WebPageClient.h:
2309         * WebKitSupport/InputHandler.cpp:
2310         (BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint):
2311         (WebKit):
2312         (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions):
2313         * WebKitSupport/InputHandler.h:
2314         (Platform):
2315         (InputHandler):
2316         * WebKitSupport/TouchEventHandler.cpp:
2317         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
2318         * WebKitSupport/TouchEventHandler.h:
2319         (TouchEventHandler):
2320
2321 2012-08-06  Charles Wei  <charles.wei@torchmobile.com.cn>
2322
2323         [BlackBerry] About: shows PAGE_CACHE not enabled.
2324         https://bugs.webkit.org/show_bug.cgi?id=93216
2325
2326         Reviewed by Antonio Gomes.
2327
2328         Page cache is a feature that can be enabled/disabled at runtime, there's no
2329         MACRO named PAGE_CACHE to control the feature.
2330
2331         * WebCoreSupport/AboutDataEnableFeatures.in:
2332
2333 2012-08-03  Yong Li  <yoli@rim.com>
2334
2335         [BlackBerry] FrameLoaderClient::restoreViewState() shouldn't trigger painting
2336         https://bugs.webkit.org/show_bug.cgi?id=93141
2337
2338         Reviewed by Rob Buis.
2339
2340         PR# 172041.
2341         It is not always safe to render the page at this point. So we post a message
2342         instead.
2343
2344         * Api/WebPage.cpp:
2345         (WebKit):
2346         (BlackBerry::WebKit::WebPagePrivate::restoreHistoryViewState):
2347         * Api/WebPage_p.h:
2348         (WebPagePrivate):
2349         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2350         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
2351
2352 2012-08-03  Konrad Piascik  <kpiascik@rim.com>
2353
2354         [BlackBerry] InspectorOverlay class duplicated in WebCore
2355         https://bugs.webkit.org/show_bug.cgi?id=93124
2356
2357         Reviewed by Rob Buis.
2358
2359         Changed namespace of InspectorOverlay from WebCore to
2360         BlackBerry::WebKit
2361
2362         * Api/WebPage.cpp:
2363         (WebKit):
2364         (BlackBerry::WebKit::WebPagePrivate::setInspectorOverlayClient):
2365         * Api/WebPage_p.h:
2366         (WebPagePrivate):
2367         * WebCoreSupport/InspectorClientBlackBerry.h:
2368         * WebCoreSupport/InspectorOverlay.cpp:
2369         (BlackBerry::WebKit::InspectorOverlay::create):
2370         (BlackBerry::WebKit::InspectorOverlay::InspectorOverlay):
2371         (BlackBerry::WebKit::InspectorOverlay::notifySyncRequired):
2372         (BlackBerry::WebKit::InspectorOverlay::paintContents):
2373         (BlackBerry::WebKit::InspectorOverlay::showDebugBorders):
2374         (BlackBerry::WebKit::InspectorOverlay::showRepaintCounter):
2375         (BlackBerry::WebKit::InspectorOverlay::contentsVisible):
2376         (BlackBerry::WebKit::InspectorOverlay::update):
2377         * WebCoreSupport/InspectorOverlay.h:
2378         (WebKit):
2379         (InspectorOverlayClient):
2380         (InspectorOverlay):
2381         (BlackBerry::WebKit::InspectorOverlay::notifyAnimationStarted):
2382
2383 2012-08-03  Arvid Nilsson  <anilsson@rim.com>
2384
2385         [BlackBerry] Overlays display checkerboard that doesn't resolve
2386         https://bugs.webkit.org/show_bug.cgi?id=93099
2387
2388         Reviewed by Antonio Gomes.
2389
2390         The WebKit-thread overlays, like tap highlight, inspector highlight and
2391         selection are all part of a separate graphics layer tree rooted in
2392         WebPagePrivate::m_overlayLayer.
2393
2394         When LayerRenderer needs to schedule a commit to reactively render
2395         tiles and resolve checkerboard, it does so through the root layer.
2396         Since the overlay layer root didn't have a GraphicsLayerClient, there
2397         was no implementation of GraphicsLayerClient::notifySyncRequired() to
2398         call, and a commit was never scheduled, thus checkerboard never
2399         resolved.
2400
2401         Fixed by adding a fallback implementation of GraphicsLayerClient in
2402         WebPagePrivate and hooking up the overlay root to it. Also, this
2403         implementation can be shared by the various overlays to avoide code
2404         duplication, specifically to implement notifySyncRequired(),
2405         showDebugBorders() and showRepaintCounter() only once.
2406
2407         Fixing this revealed a bug where the web page would get stuck in an
2408         endless sequence of commits. It turned out that
2409         WebPagePrivate::updateDelegatedOverlays() was called right in the
2410         middle of the commit operation, after performing the webkit thread part
2411         of the commit operation but before we continued on the compositing
2412         thread. Since updateDelegatedOverlays() typically mutates layers, this
2413         is very bad (layers should not be mutated mid-commit). The mutations
2414         also cause a new commit to scheduled from within the current, which
2415         results in an endless sequence of commits.
2416
2417         Fixed this latter bug by moving the updateDelegatedOverlays() call to
2418         the beginning of the method where it can cause no harm. This is before
2419         we mark the web page as no longer needing commit, so even if the
2420         implementation flips the "needs commit" bit, we will immediately flip
2421         it back and proceed with commit as usual.
2422
2423         PR 187458, 184377
2424
2425         * Api/WebPage.cpp:
2426         (BlackBerry::WebKit::WebPagePrivate::overlayLayer):
2427         (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
2428         (WebKit):
2429         (BlackBerry::WebKit::WebPagePrivate::notifySyncRequired):
2430         (BlackBerry::WebKit::WebPagePrivate::showDebugBorders):
2431         (BlackBerry::WebKit::WebPagePrivate::showRepaintCounter):
2432         * Api/WebPage_p.h:
2433         (WebPagePrivate):
2434         (BlackBerry::WebKit::WebPagePrivate::notifyAnimationStarted):
2435         (BlackBerry::WebKit::WebPagePrivate::paintContents):
2436         * WebCoreSupport/InspectorOverlay.cpp:
2437         (WebCore::InspectorOverlay::notifySyncRequired):
2438         (WebCore::InspectorOverlay::showDebugBorders):
2439         (WebCore::InspectorOverlay::showRepaintCounter):
2440         * WebKitSupport/DefaultTapHighlight.cpp:
2441         (BlackBerry::WebKit::DefaultTapHighlight::notifySyncRequired):
2442         (BlackBerry::WebKit::DefaultTapHighlight::showDebugBorders):
2443         (WebKit):
2444         (BlackBerry::WebKit::DefaultTapHighlight::showRepaintCounter):
2445         * WebKitSupport/DefaultTapHighlight.h:
2446         (DefaultTapHighlight):
2447         * WebKitSupport/SelectionOverlay.cpp:
2448         (BlackBerry::WebKit::SelectionOverlay::notifySyncRequired):
2449         (BlackBerry::WebKit::SelectionOverlay::showDebugBorders):
2450         (WebKit):
2451         (BlackBerry::WebKit::SelectionOverlay::showRepaintCounter):
2452         * WebKitSupport/SelectionOverlay.h:
2453         (SelectionOverlay):
2454
2455 2012-08-02  Arvid Nilsson  <anilsson@rim.com>
2456
2457         [BlackBerry] Add default implementation of GraphicsLayerClient::contentsVisible()
2458         https://bugs.webkit.org/show_bug.cgi?id=93036
2459
2460         Reviewed by George Staikos.
2461
2462         Remove implementation of GraphicsLayerClient::contentsVisible() now
2463         that it has a default implementation.
2464
2465         This also fixes a bug where memory usage for the inspector highlight
2466         overlay would balloon because it returned true from contentsVisible()
2467         which would cause the LayerTiler to populate all tiles. The default
2468         implementation returns false instead.
2469
2470         PR 187458, 184377
2471
2472         * WebCoreSupport/InspectorOverlay.cpp:
2473         (WebCore::InspectorOverlay::showRepaintCounter):
2474         * WebCoreSupport/InspectorOverlay.h:
2475         (InspectorOverlay):
2476         * WebKitSupport/DefaultTapHighlight.h:
2477         * WebKitSupport/SelectionOverlay.h:
2478
2479 2012-08-02  Antonio Gomes  <agomes@rim.com>
2480
2481         Unreviewed debug build fix (bug 92889)
2482
2483         * WebKitSupport/InRegionScroller.cpp:
2484         (BlackBerry::WebKit::pushBackInRegionScrollable):
2485
2486 2012-08-02  Leo Yang  <leoyang@rim.com>
2487
2488         [BlackBerry] Rounding error of destination rect of checkerboard
2489         https://bugs.webkit.org/show_bug.cgi?id=93012
2490
2491         Reviewed by Rob Buis.
2492
2493         Reviewed internally by Jakob Petsovits.
2494
2495         Intersect with the destination rectangle to eliminate the rounding error.
2496
2497         * Api/BackingStore.cpp:
2498         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
2499
2500 2012-08-01  Antonio Gomes  <agomes@rim.com>
2501
2502         [BlackBerry] Implement InRegionScroller class as a in-region scroll controller
2503         https://bugs.webkit.org/show_bug.cgi?id=92889
2504         PR #186587
2505
2506         Reviewed by Yong Li.
2507
2508         Internally reviewed by Arvid Nilsson.
2509
2510         Moved all in-region scrolling code out of WebPagePrivate to the just
2511         created InRegionScroller class. This class aims to:
2512
2513         1) Centralize all in-region scroll code and clean up WebPagePrivate as a consequence.
2514         2) Be the bases to add UI/Compositing thread driven scrolls to in-region.
2515
2516         The patch does not change any functionallity change.
2517
2518         * Api/WebPage.cpp:
2519         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
2520         (BlackBerry::WebKit::WebPagePrivate::init):
2521         (BlackBerry::WebKit::WebPagePrivate::scrollBy):
2522         (BlackBerry::WebKit::WebPagePrivate::notifyInRegionScrollStatusChanged):
2523         (BlackBerry::WebKit::WebPagePrivate::clearDocumentData):
2524         (BlackBerry::WebKit::WebPagePrivate::setScrollOriginPoint):
2525         * Api/WebPage_p.h:
2526         (WebPagePrivate):
2527         * WebKitSupport/InRegionScrollableArea.cpp:
2528         (BlackBerry::WebKit::InRegionScrollableArea::layer):
2529         * WebKitSupport/InRegionScroller.cpp: Added.
2530         (WebKit):
2531         (BlackBerry::WebKit::canScrollInnerFrame):
2532         (BlackBerry::WebKit::canScrollRenderBox):
2533         (BlackBerry::WebKit::parentLayer):
2534         (BlackBerry::WebKit::enclosingLayerNode):
2535         (BlackBerry::WebKit::isNonRenderViewFixedPositionedContainer):
2536         (BlackBerry::WebKit::pushBackInRegionScrollable):
2537         (BlackBerry::WebKit::InRegionScroller::InRegionScroller):
2538         (BlackBerry::WebKit::InRegionScroller::setNode):
2539         (BlackBerry::WebKit::InRegionScroller::node):
2540         (BlackBerry::WebKit::InRegionScroller::reset):
2541         (BlackBerry::WebKit::InRegionScroller::isNull):
2542         (BlackBerry::WebKit::InRegionScroller::scrollBy):
2543         (BlackBerry::WebKit::InRegionScroller::inRegionScrollableAreasForPoint):
2544         (BlackBerry::WebKit::InRegionScroller::scrollNodeRecursively):
2545         (BlackBerry::WebKit::InRegionScroller::scrollRenderer):
2546         (BlackBerry::WebKit::InRegionScroller::adjustScrollDelta):
2547         * WebKitSupport/InRegionScroller.h: Added.
2548         (WebCore):
2549         (WebKit):
2550         (InRegionScroller):
2551         * WebKitSupport/TouchEventHandler.cpp:
2552         (BlackBerry::WebKit::TouchEventHandler::drawTapHighlight):
2553
2554 2012-08-01  Charles Wei  <charles.wei@torchmobile.com.cn>
2555
2556         [BlackBerry] Favicon should be Base64 encoded for cross-process passing
2557         https://bugs.webkit.org/show_bug.cgi?id=92857
2558
2559         Reviewed by George Staikos.
2560
2561         The current implementation just passes the internal of SkPixels data to the client,
2562         which can't be passed accross the process boundary to chrome for processing.
2563         This patch makes the favicon Base64 encoded so that can be passed to chrome in another process.
2564
2565         * Api/WebPageClient.h:
2566         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2567         (WebCore::FrameLoaderClientBlackBerry::dispatchDidReceiveIcon):
2568
2569 2012-08-01  Jacky Jiang  <zhajiang@rim.com>
2570
2571         [BlackBerry] Allow client side to add and remove origin access whitelist entries
2572         https://bugs.webkit.org/show_bug.cgi?id=92790
2573
2574         Reviewed by Yong Li.
2575
2576         PR: 172658
2577         Add two new APIs to add and remove origin access whitelist entries.
2578         Initialize the BlackBerryAllowCrossSiteRequests WebSetting to false.
2579
2580         * Api/WebPage.cpp:
2581         (BlackBerry::WebKit::WebPagePrivate::addOriginAccessWhitelistEntry):
2582         (WebKit):
2583         (BlackBerry::WebKit::WebPage::addOriginAccessWhitelistEntry):
2584         (BlackBerry::WebKit::WebPagePrivate::removeOriginAccessWhitelistEntry):
2585         (BlackBerry::WebKit::WebPage::removeOriginAccessWhitelistEntry):
2586         * Api/WebPage.h:
2587         * Api/WebPage_p.h:
2588         (WebPagePrivate):
2589         * Api/WebSettings.cpp:
2590         (BlackBerry::WebKit::WebSettings::standardSettings):
2591
2592 2012-08-01  Mike Fenton  <mifenton@rim.com>
2593
2594         [BlackBerry] Consolidate suppression of keyboard requests.
2595         https://bugs.webkit.org/show_bug.cgi?id=92871
2596
2597         Reviewed by Antonio Gomes.
2598
2599         Reduce VKB requests even more by applying the filter on
2600         all requests during processing.
2601
2602         Reviewed Internally by Gen Mak.
2603
2604         * WebKitSupport/InputHandler.cpp:
2605         (BlackBerry::WebKit::InputHandler::focusedNodeChanged):
2606         (BlackBerry::WebKit::InputHandler::notifyClientOfKeyboardVisibilityChange):
2607
2608 2012-08-01  Arvid Nilsson  <anilsson@rim.com>
2609
2610         [BlackBerry] Disable tap highlight when transparent color is specified
2611         https://bugs.webkit.org/show_bug.cgi?id=92849
2612
2613         Reviewed by Antonio Gomes.
2614
2615         When the web page specifies -webkit-tap-highlight-color:rgba(0,0,0,0)
2616         or any color with alpha value 0, we should disable the tap highlight.
2617
2618         * WebKitSupport/DefaultTapHighlight.cpp:
2619         (BlackBerry::WebKit::DefaultTapHighlight::draw):
2620
2621 2012-07-31  Robin Cao  <robin.cao@torchmobile.com.cn>
2622
2623         [BlackBerry] Pass all file chooser settings to clients
2624         https://bugs.webkit.org/show_bug.cgi?id=92237
2625
2626         Reviewed by Rob Buis.
2627
2628         Expose all file chooser settings to clients.
2629
2630         * Api/WebPageClient.h:
2631         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2632         (WebCore::ChromeClientBlackBerry::runOpenPanel):
2633
2634 2012-07-31  Mike Fenton  <mifenton@rim.com>
2635
2636         [BlackBerry] Fix crash in InputHandler spell checking.
2637         https://bugs.webkit.org/show_bug.cgi?id=92763
2638
2639         Reviewed by Antonio Gomes.
2640
2641         PR 185574.
2642
2643         Fix crash in getSpellChecker by guarding the calling paths
2644         to ensure that m_currentFocusElement is valid.
2645
2646         Also add ASSERTs for previous crash.
2647
2648         * WebKitSupport/InputHandler.cpp:
2649         (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
2650         (BlackBerry::WebKit::InputHandler::spellCheckingRequestCancelled):
2651         (BlackBerry::WebKit::InputHandler::getSpellChecker):
2652
2653 2012-07-31  Genevieve Mak  <gmak@rim.com>
2654
2655         Send an onContextMenu event to the page content
2656         so that context menus can be prevented. We use
2657         the node's event handler because we want to use
2658         the fat finger's node. If we use  the EventHandler's
2659         sendContextMenuEvent it will hit test with the mouse
2660         position which may not be what we want.
2661         PR #184032
2662         https://bugs.webkit.org/show_bug.cgi?id=92766
2663
2664         Reviewed by Antonio Gomes.
2665         Reviewed Internally by Antonio Gomes.
2666
2667         * Api/WebPage.cpp:
2668         (BlackBerry::WebKit::WebPagePrivate::webContext):
2669         (BlackBerry::WebKit::WebPagePrivate::contextNode):
2670
2671 2012-07-31  Arvid Nilsson  <anilsson@rim.com>
2672
2673         [BlackBerry] Backing store output flickers when using WebPageCompositor
2674         https://bugs.webkit.org/show_bug.cgi?id=90291
2675
2676         Reviewed by Antonio Gomes.
2677
2678         The backing store doesn't know when the API client swaps the buffers,
2679         so it doesn't know when to signal the blit generation condition
2680         variable. Fixed by using EGL fence sync instead, when available, so we
2681         don't have to know.
2682
2683         Reviewed internally by Filip Spacek.
2684
2685         * Api/BackingStore.cpp:
2686         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
2687         (BlackBerry::WebKit::BackingStorePrivate::~BackingStorePrivate):
2688         (BlackBerry::WebKit::BackingStorePrivate::render):
2689         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
2690         (BlackBerry::WebKit::BackingStorePrivate::compositeContents):
2691         * Api/BackingStore_p.h:
2692         (BackingStorePrivate):
2693         * WebKitSupport/BackingStoreTile.cpp:
2694         (BlackBerry::WebKit::TileBuffer::TileBuffer):
2695         * WebKitSupport/BackingStoreTile.h:
2696         (BlackBerry::WebKit::TileBuffer::syncObject):
2697         (BlackBerry::WebKit::TileBuffer::setSyncObject):
2698         (TileBuffer):
2699         * WebKitSupport/SurfacePool.cpp:
2700         (WebKit):
2701         (BlackBerry::WebKit::SurfacePool::SurfacePool):
2702         (BlackBerry::WebKit::SurfacePool::initialize):
2703         (BlackBerry::WebKit::SurfacePool::waitForBuffer):
2704         (BlackBerry::WebKit::SurfacePool::notifyBuffersComposited):
2705         * WebKitSupport/SurfacePool.h:
2706         (SurfacePool):
2707
2708 2012-07-30  Yoshifumi Inoue  <yosin@chromium.org>
2709
2710         [Forms] Get rid of Element::isReadOnlyFormControl other than CSS related
2711         https://bugs.webkit.org/show_bug.cgi?id=92612
2712
2713         Reviewed by Kent Tamura.
2714
2715         This patch replaces Element::isReadOnlyFormControl() to
2716         HTMLFormControlElement::readOnly() for preparation of introducing
2717         Element::shouldMatchReadWriteSelector(), bug 92602.
2718
2719         * WebKitSupport/DOMSupport.cpp:
2720         (BlackBerry::WebKit::DOMSupport::isTextBasedContentEditableElement): Replaced isReadOnlyFormControl() by HTMLTextFormControlElement::readOnly().
2721
2722 2012-07-30  Mike Fenton  <mifenton@rim.com>
2723
2724         [BlackBerry] Optimize the generation of selection details generation.
2725         https://bugs.webkit.org/show_bug.cgi?id=92522
2726
2727         Reviewed by Antonio Gomes.
2728
2729         PR 179264.
2730
2731         Reduce the number of times we generate selection details notifications.
2732
2733         This removes several notifications that are handled by the standard
2734         notification path and makes skipping duplicate notifications the default
2735         so that only those that must generate a response do.
2736
2737         Reviewed Internally by Gen Mak.
2738
2739         * Api/WebPage.cpp:
2740         (BlackBerry::WebKit::WebPagePrivate::notifyTransformedContentsSizeChanged):
2741         (BlackBerry::WebKit::WebPagePrivate::updateDelegatedOverlays):
2742         * WebKitSupport/InputHandler.cpp:
2743         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
2744         * WebKitSupport/SelectionHandler.cpp:
2745         (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
2746         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
2747         (BlackBerry::WebKit::SelectionHandler::setSelection):
2748         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
2749         * WebKitSupport/SelectionHandler.h:
2750         (SelectionHandler):
2751
2752 2012-07-30  Robin Cao  <robin.cao@torchmobile.com.cn>
2753
2754         [BlackBerry] Adapt to changes in the SharedArray platform API
2755         https://bugs.webkit.org/show_bug.cgi?id=92631
2756
2757         Reviewed by Rob Buis.
2758
2759         Adapt to changes in the SharedArray platform API. No behavioural change.
2760
2761         Reviewed internally by Joe Mason.
2762
2763         * Api/WebPage.cpp:
2764         (BlackBerry::WebKit::WebPage::getBackForwardList):
2765         * Api/WebPage.h:
2766         * Api/WebPageClient.h:
2767         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2768         (WebCore::ChromeClientBlackBerry::runOpenPanel):
2769
2770 2012-07-30  Patrick Gansterer  <paroga@webkit.org>
2771
2772         Replace UnicodeWinCE with UnicodeWchar
2773         https://bugs.webkit.org/show_bug.cgi?id=92539
2774
2775         Reviewed by Ryosuke Niwa.
2776
2777         UnicodeWinCE never contained WinCE specific code. UnicodeWchar
2778         is a replacement for it, which is mainly based on the functions
2779         from <wchar.h>. It is ment as a minimal Unicode backend, which
2780         can be used very easy and has no external dependencies.
2781
2782         * WebCoreSupport/AboutDataUseFeatures.in:
2783
2784 2012-07-27  Eli Fidler  <efidler@rim.com>
2785
2786         [BlackBerry] Adapt to change in the FontInfo platform API.
2787         https://bugs.webkit.org/show_bug.cgi?id=92547
2788
2789         Reviewed by Yong Li
2790
2791         RIM PR 161263
2792
2793         * Api/WebSettings.cpp:
2794         (BlackBerry::WebKit::WebSettings::standardSettings):
2795
2796 2012-07-27  Yong Li  <yoli@rim.com>
2797
2798         [BlackBerry] Should support onbeforeunload event and show confirmation dialog
2799         https://bugs.webkit.org/show_bug.cgi?id=92510
2800
2801         Reviewed by Antonio Gomes.
2802
2803         RIM PR# 155878.
2804         1. Export dispatchBeforeUnloadEvent() so client can call it before going to close the page.
2805         2. Forward runBeforeUnloadConfirmPanel() call to client so it can show a dialog.
2806
2807         * Api/WebPage.cpp:
2808         (BlackBerry::WebKit::WebPage::dispatchBeforeUnloadEvent):
2809         (WebKit):
2810         * Api/WebPage.h:
2811         * Api/WebPageClient.h:
2812         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2813         (WebCore::ChromeClientBlackBerry::canRunBeforeUnloadConfirmPanel):
2814         (WebCore::ChromeClientBlackBerry::runBeforeUnloadConfirmPanel):
2815
2816 2012-07-27  Mike Fenton  <mifenton@rim.com>
2817
2818         [BlackBerry] Switch InputHandler malloc use to fastMalloc for cases that should never fail
2819         https://bugs.webkit.org/show_bug.cgi?id=92508
2820
2821         Reviewed by Yong Li.
2822
2823         Replace common uses of malloc with fastMalloc rather
2824         than trying to recover gracefully.  If we are truly
2825         out of memory, crash before corruption occurs.
2826
2827         * WebKitSupport/InputHandler.cpp:
2828         (BlackBerry::WebKit::InputHandler::spannableTextInRange):
2829         (BlackBerry::WebKit::InputHandler::extractedTextRequest):
2830
2831 2012-07-26  Nima Ghanavatian  <nghanavatian@rim.com>
2832
2833         [BlackBerry] Remove synchronous spellchecking code
2834         https://bugs.webkit.org/show_bug.cgi?id=92415
2835
2836         Removing synchronous spellchecking code path.
2837
2838         Reviewed by Rob Buis.
2839
2840         Internally reviewed by Mike Fenton.
2841
2842         * Api/WebPageClient.h:
2843         * WebCoreSupport/EditorClientBlackBerry.cpp:
2844         (WebCore::EditorClientBlackBerry::checkSpellingOfString):
2845
2846 2012-07-26  Nima Ghanavatian  <nghanavatian@rim.com>
2847
2848         [BlackBerry] Support async spellcheck for the blackberry port
2849         https://bugs.webkit.org/show_bug.cgi?id=92160
2850
2851         PR124517
2852         Implementing support for async spellcheck.
2853
2854         Reviewed by Rob Buis.
2855
2856         Internally reviewed by Mike Fenton.
2857
2858         * Api/WebPage.cpp:
2859         (BlackBerry::WebKit::WebPage::spellCheckingRequestCancelled):
2860         (WebKit):
2861         (BlackBerry::WebKit::WebPage::spellCheckingRequestProcessed):
2862         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
2863         * Api/WebPage.h:
2864         * Api/WebSettings.cpp:
2865         (WebKit):
2866         (BlackBerry::WebKit::WebSettings::standardSettings):
2867         (BlackBerry::WebKit::WebSettings::isAsynchronousSpellCheckingEnabled):
2868         (BlackBerry::WebKit::WebSettings::setAsynchronousSpellCheckingEnabled):
2869         * Api/WebSettings.h:
2870         * WebCoreSupport/EditorClientBlackBerry.cpp:
2871         (WebCore):
2872         (WebCore::EditorClientBlackBerry::requestCheckingOfString):
2873         (WebCore::EditorClientBlackBerry::checkTextOfParagraph):
2874         * WebCoreSupport/EditorClientBlackBerry.h:
2875         (EditorClientBlackBerry):
2876         * WebKitSupport/InputHandler.cpp:
2877         (BlackBerry::WebKit::InputHandler::requestCheckingOfString):
2878         (BlackBerry::WebKit::InputHandler::convertTransactionIdToSequenceId):
2879         (WebKit):
2880         (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
2881         (BlackBerry::WebKit::InputHandler::spellCheckingRequestCancelled):
2882         (BlackBerry::WebKit::InputHandler::getSpellChecker):
2883         * WebKitSupport/InputHandler.h:
2884         (WebCore):
2885         (InputHandler):
2886
2887 2012-07-26  Mike Fenton  <mifenton@rim.com>
2888
2889         [BlackBerry] Improve the logs in Selection Handler.
2890         https://bugs.webkit.org/show_bug.cgi?id=92405
2891
2892         Reviewed by Rob Buis.
2893
2894         Clean up selection logging, fix priority and style
2895         of helper function.
2896
2897         Reviewed Internally by Nima Ghanavatian.
2898
2899         * WebKitSupport/SelectionHandler.cpp:
2900         (BlackBerry::WebKit::SelectionHandler::cancelSelection):
2901         (BlackBerry::WebKit::SelectionHandler::shouldUpdateSelectionOrCaretForPoint):
2902         (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
2903         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
2904         (BlackBerry::WebKit::SelectionHandler::setSelection):
2905         (BlackBerry::WebKit::SelectionHandler::selectObject):
2906         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
2907         (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
2908
2909 2012-07-26  Mike Fenton  <mifenton@rim.com>
2910
2911         [BlackBerry] Add timing logs to SelectionHandler.
2912         https://bugs.webkit.org/show_bug.cgi?id=92404
2913
2914         Reviewed by Rob Buis.
2915
2916         Add selection timing logs.
2917
2918         Reviewed Internally by Nima Ghanavatian.
2919
2920         * WebKitSupport/SelectionHandler.cpp:
2921         (BlackBerry::WebKit::SelectionHandler::setSelection):
2922         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
2923         * WebKitSupport/SelectionHandler.h:
2924         (SelectionHandler):
2925
2926 2012-07-26  Mike Fenton  <mifenton@rim.com>
2927
2928         [BlackBerry] InputHandler failure logs should be logAlways and critical.
2929         https://bugs.webkit.org/show_bug.cgi?id=92403
2930
2931         Reviewed by Rob Buis.
2932
2933         Update Log level for failures and fix mask in log.
2934
2935         Reviewed Internally by Nima Ghanavatian.
2936
2937         * WebKitSupport/InputHandler.cpp:
2938         (BlackBerry::WebKit::convertStringToWchar):
2939         (BlackBerry::WebKit::convertStringToWcharVector):
2940         (BlackBerry::WebKit::convertSpannableStringToString):
2941         (BlackBerry::WebKit::InputHandler::spannableTextInRange):
2942         (BlackBerry::WebKit::InputHandler::setTextAttributes):
2943
2944 2012-07-26  Arvid Nilsson  <anilsson@rim.com>
2945
2946         [BlackBerry] Refactor BackingStorePrivate::BackingStorePrivate::clearAndUpdateTileOfNotRenderedRegion() to avoid touching tile frontbuffer
2947         https://bugs.webkit.org/show_bug.cgi?id=92095
2948
2949         Reviewed by George Staikos.
2950
2951         PR: 141439
2952         Specifically, we want to avoid changing the rendered region of the
2953         front buffer without proper synchronization.
2954
2955         The method is trying to force checkerboard to appear on screen because
2956         an area was invalidated but the render job was dropped, so the tile
2957         contents are now invalid.
2958
2959         Unfortunately it did this in a way which is not thread safe. Fixed by
2960         making it thread safe, in a way that minimizes memory bandwidth usage.
2961
2962         Instead of using the customary sequence of copy-back, modify and swap,
2963         we send a synchronous message to the compositing thread to avoid the
2964         copy-back step and save memory bandwidth. The trade-off is that the
2965         WebKit thread might wait a little longer for the compositing thread
2966         than it would from a waitForCurrentMessage() call.
2967
2968         The way we synchronize this is rather expensive for the WebKit thread,
2969         and this method is called rather carelessly, so add various early
2970         returns to avoid doing it redundantly.
2971
2972         Internally reviewed by Jakob Petsovits and Adam Treat.
2973
2974         * Api/BackingStore.cpp:
2975         (BlackBerry::WebKit::BackingStorePrivate::indexOfTile):
2976         (BlackBerry::WebKit::BackingStorePrivate::clearAndUpdateTileOfNotRenderedRegion):
2977         * Api/BackingStore_p.h:
2978         (BackingStorePrivate):
2979
2980 2012-07-26  Arvid Nilsson  <anilsson@rim.com>
2981
2982         [BlackBerry] Refactor BackingStorePrivate::render() to avoid touching tile frontbuffer
2983         https://bugs.webkit.org/show_bug.cgi?id=91989
2984
2985         Reviewed by George Staikos.
2986
2987         PR: 141439
2988         Specifically, we want to avoid changing the rendered region of the
2989         front buffer. The code only touched the front buffer rendered region
2990         if the tile was not committed.
2991
2992         Instead of immediately marking the tile as committed, and clearing the
2993         front buffer's rendered region to make it appear as checkerboard, we
2994         leave the front buffer alone and only mark the tile as committed once
2995         the front buffer has valid content. Un-committed tiles will also be
2996         rendered as checkerboard, so leaving it uncommitted is equivalent to
2997         clearing the front buffer rendered region here.
2998
2999         In addition to the main change, some related changes follow naturally.
3000
3001         The copyPreviousContentsToBackSurfaceOfTile() call only makes sense if
3002         the tile is committed, and the front buffer has valid content.
3003         Otherwise, clearing the back buffer is equivalent. The code has been
3004         updated to this effect.
3005
3006         Since copyPreviousContentsToBackSurfaceOfTile() always sets the
3007         rendered region to the union of the front and back buffer regions,
3008         there is no point in the "backBufferIsValid" check. It has been turned
3009         into an ASSERT instead, just to make sure.
3010
3011         Internally reviewed by Jakob Petsovits.
3012
3013         * Api/BackingStore.cpp:
3014         (BlackBerry::WebKit::BackingStorePrivate::render):
3015
3016 2012-07-25  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
3017
3018         [BlackBerry] Support RTSP in browser
3019         https://bugs.webkit.org/show_bug.cgi?id=92233
3020
3021         Reviewed by Rob Buis.
3022
3023         Handle URL scheme "rtsp://" before creating the DocumentLoader
3024         and send the request to webkit. As we don't have any application
3025         which can deal with rtsp invocation for now, we need to create
3026         a media document to wrap the rtsp url within a video tag which
3027         makes it load as a normal video clip.
3028
3029         RIM PR: 169669
3030         Internally reviewed by Charles Wei <charles.wei@torchmobile.com.cn>.
3031
3032         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3033         (WebCore::FrameLoaderClientBlackBerry::createDocumentLoader):
3034
3035 2012-07-25  Jakob Petsovits  <jpetsovits@rim.com>
3036
3037         [BlackBerry] Rephrase suspend/resume condition to guard against crashes
3038         https://bugs.webkit.org/show_bug.cgi?id=92300
3039         PR 182125
3040
3041         Reviewed by George Staikos.
3042
3043         When the compositor is removed from a WebPage, it might
3044         already have unset its context, and issuing a call to
3045         BackingStore::buffer() would therefore cause a crash.
3046         Just guarding buffer() from this crash isn't fully
3047         correct, because then we wouldn't suspend rendering
3048         for a compositor that had been previously enabled.
3049
3050         Instead, change the condition to suspend/resume in
3051         WebPagePrivate::setCompositor() to focus on the
3052         object that delivers us the buffer. If we can't
3053         listen to the context or buffer being set, better
3054         just take the compositor object itself to determine
3055         whether we have something valid or not... and hope
3056         that they give us a valid context & buffer in all
3057         situations when we can actually be rendering.
3058
3059         Also check compositor->context() in buffer() to be
3060         non-zero before accessing the context's buffer,
3061         because more defensive coding can't hurt here.
3062
3063         * Api/BackingStore.cpp:
3064         (BlackBerry::WebKit::BackingStorePrivate::buffer):
3065         * Api/WebPage.cpp:
3066         (BlackBerry::WebKit::WebPagePrivate::setCompositor):
3067
3068 2012-07-25  Joshua Netterfield  <jnetterfield@rim.com>
3069
3070         [BlackBerry] Update about:config lists
3071         https://bugs.webkit.org/show_bug.cgi?id=92118
3072
3073         Reviewed by Rob Buis.
3074
3075         Remove features from list that have either been removed from WebKit
3076         or that have been moved from one list to another.
3077
3078         * WebCoreSupport/AboutDataEnableFeatures.in:
3079         * WebCoreSupport/AboutDataHaveFeatures.in:
3080         * WebCoreSupport/AboutDataUseFeatures.in:
3081
3082 2012-07-25  Jacky Jiang  <zhajiang@rim.com>
3083
3084         [BlackBerry] clock_gettime() in BackingStore.cpp should use CLOCK_MONOTONIC
3085         https://bugs.webkit.org/show_bug.cgi?id=91898
3086
3087         Reviewed by Yong Li.
3088
3089         Let pthread condition variable in BackingStore.cpp use monotonic clock
3090         to fix a regression caused by r123266.
3091
3092         * Api/BackingStore.cpp:
3093         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
3094
3095 2012-07-25  Andy Chen  <andchen@rim.com>
3096
3097         [BlackBerry] Add "SelectAll" to WebPage
3098         https://bugs.webkit.org/show_bug.cgi?id=92246
3099
3100         Reviewed by Antonio Gomes.
3101
3102         Add "Select All" editor command to WebPage.
3103         Internally reviewed by Mike Fenton.
3104
3105         * Api/WebPage.cpp:
3106         (BlackBerry::WebKit::WebPage::selectAll):
3107         (WebKit):
3108         * Api/WebPage.h:
3109         * WebKitSupport/InputHandler.cpp:
3110         (BlackBerry::WebKit::InputHandler::selectAll):
3111         (WebKit):
3112         * WebKitSupport/InputHandler.h:
3113
3114 2012-07-25  Arvid Nilsson  <anilsson@rim.com>
3115
3116         [BlackBerry] Don't touch a tile buffer while it's still on its way to the GPU
3117         https://bugs.webkit.org/show_bug.cgi?id=91992
3118
3119         Reviewed by Adam Treat.
3120
3121         PR: 141439
3122         The copyPreviousContentsToBackSurfaceOfTile() call will also modify
3123         buffer contents, move it after the blit generation condvar to make sure
3124         we've waited for the buffer to become available first.
3125
3126         This is done as part of some general BackingStorePrivate::render()
3127         cleanup in PR 141439.
3128
3129         Internally reviewed by Jakob Petsovits.
3130
3131         * Api/BackingStore.cpp:
3132         (BlackBerry::WebKit::BackingStorePrivate::render):
3133
3134 2012-07-25  Jakob Petsovits  <jpetsovits@rim.com>
3135
3136         [BlackBerry] notifyContentRendered() call missing in two spots
3137         https://bugs.webkit.org/show_bug.cgi?id=92153
3138         RIM PR 173340
3139
3140         Reviewed by Antonio Gomes.
3141
3142         In dispatchDidFirstVisualLayout() and repaint() in
3143         immediate mode, we render but don't notify the
3144         WebPageClient that the content was modified.
3145
3146         In the long run, we should probably keep track of
3147         the modified reason from within render() itself
3148         and use this to automatically notify the client
3149         from within blitContents() and/or invalidateWindow(),
3150         depending on the rendering path. That's somewhat of
3151         a medium-size undertaking though; for now, adding
3152         the call directly to the renderVisibleContents()
3153         call sites will do.
3154
3155         This patch also adds a blitVisibleContents() to
3156         dispatchDidFirstVisualLayout() where it was
3157         inexplicably missing, probably on account of
3158         old code that was never updated.
3159
3160         * Api/BackingStore.cpp:
3161         (BlackBerry::WebKit::BackingStorePrivate::repaint):
3162         * Api/WebPage.cpp:
3163         (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore):
3164         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3165         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFirstVisuallyNonEmptyLayout):
3166
3167 2012-07-24  Rob Buis  <rbuis@rim.com>
3168
3169         [BlackBerry] Do not call settings setters twice on page construction
3170         https://bugs.webkit.org/show_bug.cgi?id=92157
3171
3172         Reviewed by Yong Li.
3173
3174         The WebPagePrivate init method sets some settings value that were
3175         already set in didChangeSettings. setUseHixie76WebSocketProtocol just
3176         sets the default value, no need to set it again.
3177         Also call didChangeSettings explicitly from init, before that we are
3178         not calling it since the delegate is not set yet.
3179
3180         * Api/WebPage.cpp:
3181         (BlackBerry::WebKit::WebPagePrivate::init):
3182
3183 2012-07-24  Mike Fenton  <mifenton@rim.com>
3184
3185         Throttle calls to request the virtual keyboard be shown.
3186         https://bugs.webkit.org/show_bug.cgi?id=92138
3187
3188         Reviewed by Rob Buis.
3189
3190         PR 178465.
3191
3192         Do not request keyboard visibility change when
3193         we are actively processing an input event.
3194
3195         Reviewed Internally by Gen Mak.
3196
3197         * WebKitSupport/InputHandler.cpp:
3198         (BlackBerry::WebKit::InputHandler::focusedNodeChanged):
3199
3200 2012-07-24  Joshua Netterfield  <jnetterfield@rim.com>
3201
3202         [BlackBerry] Update about:config lists
3203         https://bugs.webkit.org/show_bug.cgi?id=92118
3204
3205         Reviewed by Rob Buis.
3206
3207         We want to have all flags which could be used / have been used by any platform. These lists were created by running:
3208
3209         * WebCoreSupport/AboutDataEnableFeatures.in: `git grep "ENABLE(" | cut -d "(" -f2 | cut -d ")" -f1 | sort -u`
3210         * WebCoreSupport/AboutDataHaveFeatures.in: `git grep "HAVE(" | cut -d "(" -f2 | cut -d ")" -f1 | sort -u`
3211         * WebCoreSupport/AboutDataUseFeatures.in: `git grep "USE(" | cut -d "(" -f2 | cut -d ")" -f1 | sort -u`
3212
3213 2012-07-24  Arvid Nilsson  <anilsson@rim.com>
3214
3215         [BlackBerry] Remove unused variable in BackingStore.cpp
3216         https://bugs.webkit.org/show_bug.cgi?id=91987
3217
3218         Reviewed by Antonio Gomes.
3219
3220         PR: 141439
3221         This is done as part of some general BackingStorePrivate::render()
3222         cleanup in PR 141439.
3223
3224         * Api/BackingStore.cpp:
3225         (BlackBerry::WebKit::BackingStorePrivate::render):
3226
3227 2012-07-23  Yong Li  <yoli@rim.com>
3228
3229         [BlackBerry] Move about: URL handling out of WebCore
3230         https://bugs.webkit.org/show_bug.cgi?id=91541
3231
3232         Reviewed by Rob Buis.
3233
3234         PR# 181304.
3235         Move about: URL handling to the right place (FrameLoaderClientBlackBerry::createDocumentLoader), so
3236         reload and history navigation can work.
3237         Other changes: Remove about:version which makes little sense. Make about:memory partially visible.
3238
3239         * Api/WebPage.cpp:
3240         (BlackBerry::WebKit::WebPage::load): Remove the call to loadAbout()
3241         * Api/WebPage_p.h: Remove loadAbout()
3242         (WebPagePrivate):
3243         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3244         (WebCore::FrameLoaderClientBlackBerry::createDocumentLoader): Construct about: data here.
3245         * WebKitSupport/AboutData.cpp:
3246         (BlackBerry::WebKit::numberToHTMLTr): Make it static
3247         (BlackBerry::WebKit::configPage): Make it static
3248         (BlackBerry::WebKit::memoryPage): Make it static
3249         (BlackBerry::WebKit::cachePage):
3250         (BlackBerry::WebKit::buildPage):
3251         (BlackBerry::WebKit::creditsPage):
3252         (BlackBerry::WebKit::cookiePage):
3253         (BlackBerry::WebKit::aboutData): The only export function that returns HTML source for a given about: URL.
3254         (WebKit):
3255         * WebKitSupport/AboutData.h:
3256         (WebKit):
3257
3258 2012-07-23  Pierre Rossi  <pierre.rossi@gmail.com>
3259
3260         Unify numTouchEventHandlersChanged and needTouchEvents in the chrome client
3261         https://bugs.webkit.org/show_bug.cgi?id=91006
3262
3263         Reviewed by Ryosuke Niwa.
3264
3265         Removed numTouchEventHandlersChanged stub.
3266
3267         * WebCoreSupport/ChromeClientBlackBerry.h:
3268
3269 2012-07-22  Kent Tamura  <tkent@chromium.org>
3270
3271         Rename ENABLE_METER_TAG and ENABLE_PROGRESS_TAG to ENABLE_METER_ELEMENT and ENABLE_PROGRESS_ELEMENT respectively
3272         https://bugs.webkit.org/show_bug.cgi?id=91941
3273
3274         Reviewed by Kentaro Hara.
3275
3276         A flag name for an elmement should be ENABLE_*_ELEMENT.
3277
3278         * WebCoreSupport/AboutDataEnableFeatures.in:
3279
3280 2012-07-20  Jacky Jiang  <zhajiang@rim.com>
3281
3282         [BlackBerry] clock_gettime() in BackingStore.cpp should use CLOCK_MONOTONIC
3283         https://bugs.webkit.org/show_bug.cgi?id=91898
3284
3285         Reviewed by Yong Li.
3286
3287         PR: 181043
3288         Use CLOCK_MONOTONIC when we do expect a monotonic timer.
3289
3290         * Api/BackingStore.cpp:
3291         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
3292
3293 2012-07-20  Crystal Zhang  <haizhang@rim.com>
3294
3295         [BlackBerry] Add Cancel button for Select popup
3296         https://bugs.webkit.org/show_bug.cgi?id=91887
3297
3298         Reviewed by Yong Li.
3299
3300         PR 177706
3301
3302         * WebCoreSupport/SelectPopupClient.cpp:
3303         (WebCore::SelectPopupClient::generateHTML):
3304         (WebCore::SelectPopupClient::setValueAndClosePopup):
3305
3306 2012-07-19  Mary Wu  <mary.wu@torchmobile.com.cn>
3307
3308         [BlackBerry] Make sure to send favicon when go back/forward
3309         https://bugs.webkit.org/show_bug.cgi?id=91808
3310
3311         Reviewed by George Staikos.
3312
3313         When go back/forward, if the page was in page cache, it would have no chance
3314         to send favicon. So we'll send it in commitLoad right after send the blank
3315         icon.
3316         RIM PR# 177495
3317
3318         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3319         (WebCore::FrameLoaderClientBlackBerry::dispatchDidCommitLoad):
3320
3321 2012-07-19  Jakob Petsovits  <jpetsovits@rim.com>
3322
3323         [BlackBerry] Suspend when there's no target buffer until an external compositor is set
3324         https://bugs.webkit.org/show_bug.cgi?id=91686
3325         RIM PR 174365
3326
3327         Reviewed by Antonio Gomes.
3328
3329         If we don't have a client window (i.e. rendering to
3330         GL directly) and a WebPageCompositor is only set
3331         after a rendering operation, then we'll try to render
3332         to BackingStorePrivate::buffer() which doesn't exist
3333         at this point. That's bad, and gets us various
3334         assertions and possibly worse.
3335
3336         Fix it by starting in a screen-suspended state and only
3337         resuming screen and backingstore once a compositor is
3338         actually set.
3339
3340         So, in effect, with this patch applied, the sequence
3341         of events will look like this:
3342
3343         1) WebPage & BackingStore are initialize, neither window
3344            nor compositor exists, therefore buffer() returns 0.
3345            createSurface() therefore suspends screen and
3346            backingstore.
3347         2) loadURL() or loadData() is called, web page is
3348            fully loaded, however we don't try to render because
3349            we're still suspended, still have no target buffer.
3350         3) A WebPageCompositor is being set from outside.
3351            At the beginning of WebPage::setCompositor() we still
3352            don't have a buffer() so there's nothing to suspend,
3353            however, after the sync call to setCompositorHelper()
3354            the compositor is set so buffer() will return a
3355            nonzero value, causing us to resume at this point.
3356
3357         Using the existence of a target buffer to determine
3358         whether or not to enable rendering or keep it suspended
3359         seems like a good idea, and the implementation (while
3360         not quite perfect yet) is a step forward from before.
3361
3362         * Api/BackingStore.cpp:
3363         (BlackBerry::WebKit::BackingStorePrivate::createSurfaces):
3364         * Api/WebPage.cpp:
3365         (BlackBerry::WebKit::WebPagePrivate::setCompositor):
3366         (BlackBerry::WebKit::WebPagePrivate::setCompositorHelper):
3367         * Api/WebPage_p.h:
3368         (WebPagePrivate):
3369
3370 2012-07-19  Jakob Petsovits  <jpetsovits@rim.com>
3371
3372         [BlackBerry] Allow nested suspend/resume screen & backingstore calls.
3373         https://bugs.webkit.org/show_bug.cgi?id=91644
3374         RIM PR 174365
3375
3376         Reviewed by Adam Treat and Antonio Gomes.
3377
3378         We expose suspendScreenAndBackingStoreUpdates() to the
3379         outside API, but also use it internally when reacting
3380         to a number of happenings, i.e. zooming, viewport resize,
3381         resetting view state on Committed state or when restoring
3382         it from previous pages, etc.
3383
3384         These two can clash. For instance, if we get a suspend
3385         call from outside that suspends us for app inactivity,
3386         or we are told to suspend because the main target surface
3387         is not available at the time, and while being suspended
3388         we try to rotate, finish loading a page, the we'll end up
3389         resuming operations even though we shouldn't.
3390
3391         This patch changes the suspend flag to be a counter
3392         instead, allowing nested suspend/resume calls and making
3393         suspend/resume more robust this way. It also changes
3394         several call sites to make sure suspend/resume calls are
3395         paired up correctly.
3396
3397         * Api/BackingStore.cpp:
3398         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
3399         (BlackBerry::WebKit::BackingStorePrivate::suspendScreenAndBackingStoreUpdates):
3400         (BlackBerry::WebKit::BackingStorePrivate::resumeScreenAndBackingStoreUpdates):
3401         * Api/BackingStore_p.h:
3402         (BackingStorePrivate):
3403         * Api/WebPage.cpp:
3404         (BlackBerry::WebKit::WebPagePrivate::shouldZoomAboutPoint):
3405         (BlackBerry::WebKit::WebPagePrivate::zoomAboutPointTimerFired):
3406         (BlackBerry::WebKit::WebPagePrivate::blockZoomRectForNode):
3407         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3408         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
3409
3410 2012-07-18  Yong Li  <yoli@rim.com>
3411
3412         [BlackBerry] Move about: URL handling out of WebCore
3413         https://bugs.webkit.org/show_bug.cgi?id=91541
3414
3415         Reviewed by Rob Buis.
3416
3417         Move about URL handling code to WebKit/blackberry. Now when WebPage is asked to load an about URL,
3418         it directly calls loadString() with the generated source.
3419
3420         Also move AboutData.h/cpp from WebCoreSupport to WebKitSupport and change their namespace from WebCore
3421         to BlackBerry::WebKit.
3422
3423         The change is very mechanical except "procss total memory usage" in about:memory now only accounts used
3424         bytes and ignore free spaces in malloc.
3425
3426         * Api/WebPage.cpp:
3427         (BlackBerry::WebKit::WebPagePrivate::loadAbout):
3428         (WebKit):
3429         (BlackBerry::WebKit::WebPage::load):
3430         * Api/WebPage_p.h:
3431         (WebPagePrivate):
3432         * WebKitSupport/AboutData.cpp: Renamed from Source/WebKit/blackberry/WebCoreSupport/AboutData.cpp.
3433         (WebKit):
3434         (BlackBerry::WebKit::writeFeatures):
3435         (BlackBerry::WebKit::numberToHTMLTr):
3436         (BlackBerry::WebKit::bool):
3437         (BlackBerry::WebKit::configPage):
3438         (BlackBerry::WebKit::cacheTypeStatisticToHTMLTr):
3439         (BlackBerry::WebKit::dumpJSCTypeCountSetToTableHTML):
3440         (BlackBerry::WebKit::memoryPage):
3441         * WebKitSupport/AboutData.h: Renamed from Source/WebKit/blackberry/WebCoreSupport/AboutData.h.
3442         (WebKit):
3443
3444 2012-07-17  Jakob Petsovits  <jpetsovits@rim.com>
3445
3446         [BlackBerry] Remove unnecessary clearWindow() calls and the method itself
3447         https://bugs.webkit.org/show_bug.cgi?id=91540
3448         RIM PR 174365
3449
3450         Reviewed by Adam Treat.
3451
3452         If we resume the backingstore right afterwards with
3453         RenderAndBlit then that'll fill the whole visible area
3454         with content, making a clearWindow() call unnecessary.
3455         This call is a remnant from ages ago, and is well suited
3456         to disappear into nothingness.
3457
3458         (There is still a clearWindow() call, with rect argument,
3459         which we continue using. This commit only removes the
3460         rect-less version.)
3461
3462         * Api/BackingStore.cpp:
3463         * Api/BackingStore_p.h:
3464         (BackingStorePrivate):
3465         * Api/WebPage.cpp:
3466         (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint):
3467         (BlackBerry::WebKit::WebPagePrivate::zoomBlock):
3468
3469 2012-07-17  Vivek Galatage  <vivekgalatage@gmail.com>
3470
3471         Web Inspector: refactor InspectorController::connectFrontend() to accept InspectorFrontendChannel.
3472         https://bugs.webkit.org/show_bug.cgi?id=91196
3473
3474         Reviewed by Pavel Feldman.
3475
3476         Refactoring InspectorClients. InspectorClient::openInspectorFrontend
3477         now returning the InspectorFrontendChannel.
3478
3479         * Api/WebPage.cpp:
3480         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
3481         (BlackBerry::WebKit::WebPagePrivate::init):
3482         (BlackBerry::WebKit::WebPage::enableWebInspector):
3483         * Api/WebPage_p.h:
3484         (WebPagePrivate):
3485         * WebCoreSupport/InspectorClientBlackBerry.cpp:
3486         (WebCore::InspectorClientBlackBerry::openInspectorFrontend):
3487         * WebCoreSupport/InspectorClientBlackBerry.h:
3488         (InspectorClientBlackBerry):
3489
3490 2012-07-17  Chris Guan  <chris.guan@torchmobile.com.cn>
3491
3492         [BlackBerry] Enable registerProtocolHandler for Blackberry
3493         https://bugs.webkit.org/show_bug.cgi?id=90422
3494
3495         Reviewed by George Staikos.
3496
3497         Implements APIs were added in Custom Scheme Handler specification
3498         which is at http://dev.w3.org/html5/spec/Overview.html#custom-handlers.
3499
3500         Test cases:
3501         fast/dom/register-protocol-handler.html
3502         fast/dom/unregister-protocol-handler.html
3503
3504         * Api/WebPageClient.h:
3505         * WebCoreSupport/ChromeClientBlackBerry.cpp:
3506         (WebCore::ChromeClientBlackBerry::isProtocolHandlerRegistered):
3507         (WebCore::ChromeClientBlackBerry::unregisterProtocolHandler):
3508         (WebCore::ChromeClientBlackBerry::registerProtocolHandler):
3509         * WebCoreSupport/ChromeClientBlackBerry.h:
3510         (ChromeClientBlackBerry):
3511
3512 2012-07-16  Benjamin C Meyer  <bmeyer@rim.com>
3513
3514         Any webpage can crash webkit via qnx.callExtensionMethod assuming 'this' is the 'qnx' object.
3515         https://bugs.webkit.org/show_bug.cgi?id=91419
3516
3517         Run the following in inspector to crash WebKit
3518
3519         qnx.callExtensionMethod.apply(window, []);
3520
3521         In the c++ that handles the function it assumes that when callExtensionMethod
3522         is called that 'this' is the object 'qnx'.  The qnx object has a hidden
3523         variable that the code casts and uses, but when 'this' is not qnx such as the
3524         example this will cause a crash.  Any website can insert the above JavaScript
3525         to cause the crash.
3526
3527         Reviewed by Yong Li.
3528
3529         * WebCoreSupport/ClientExtension.cpp:
3530         (clientExtensionMethod):
3531
3532 2012-07-16  Yong Li  <yoli@rim.com>
3533
3534         [BlackBerry] Improve about:memory page
3535         https://bugs.webkit.org/show_bug.cgi?id=87676
3536
3537         Reviewed by Rob Buis.
3538
3539         Add a table for process memory usage summary for easy read.
3540
3541         * WebCoreSupport/AboutData.cpp:
3542         (WebCore::memoryPage):
3543
3544 2012-07-16  Kihong Kwon  <kihong.kwon@samsung.com>
3545
3546         Remove setController from BatteryClient
3547         https://bugs.webkit.org/show_bug.cgi?id=90944
3548
3549         Reviewed by Adam Barth.
3550
3551         BatteryClient doesn't need to keep m_controller,
3552         because BatteryController can be accessed using BatteryController::from().
3553         Remove m_controller and Add webPagePrivate to BatteryClientBlackBerry.
3554         And change all m_controller to BatteryController::from.
3555
3556         * Api/WebPage.cpp:
3557         (BlackBerry::WebKit::WebPagePrivate::init):
3558         * WebCoreSupport/BatteryClientBlackBerry.cpp:
3559         (WebCore::BatteryClientBlackBerry::BatteryClientBlackBerry):
3560         (WebCore::BatteryClientBlackBerry::onLevelChange):
3561         (WebCore::BatteryClientBlackBerry::onChargingChange):
3562         (WebCore::BatteryClientBlackBerry::onChargingTimeChange):
3563         (WebCore::BatteryClientBlackBerry::onDischargingTimeChange):
3564         * WebCoreSupport/BatteryClientBlackBerry.h:
3565         (BatteryClientBlackBerry):
3566
3567 2012-07-16  Yongxin Dai  <yodai@rim.com>
3568
3569         [BlackBerry] Text selection with touch hold does not start on text field in some cases
3570         https://bugs.webkit.org/show_bug.cgi?id=91267
3571
3572         Reviewed by Antonio Gomes.
3573
3574         Input fields host node is by spec non-editable unless the field itself has content editable enabled.
3575         We enable selection if the shadow tree for the input field is selectable.
3576         PR # 173450
3577
3578         Reviewed Internally by Mike Fenton.
3579
3580         * Api/WebPage.cpp:
3581         (BlackBerry::WebKit::WebPagePrivate::webContext):
3582         * Api/WebPage.cpp:
3583         (BlackBerry::WebKit::WebPagePrivate::webContext):
3584
3585 2012-07-15  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
3586
3587         [BlackBerry] Move icon database to application data directory.
3588         https://bugs.webkit.org/show_bug.cgi?id=91195
3589
3590         Reviewed by Rob Buis.
3591
3592         RIM PR: 156852
3593         Create icon database in application data directory instead of
3594         database or local storage directory, by doing this we can make
3595         things easier when clearing database or local storage data files.
3596
3597         Internally reviewed by Charles Wei <charles.wei@torchmobile.com.cn>
3598
3599         * WebCoreSupport/IconDatabaseClientBlackBerry.cpp:
3600         (WebCore::IconDatabaseClientBlackBerry::initIconDatabase):
3601
3602 2012-07-13  Xianzhu Wang  <wangxianzhu@chromium.org>
3603
3604         Move WebCore/platform/text/Base64 to WTF/wtf/text
3605         https://bugs.webkit.org/show_bug.cgi?id=91162
3606
3607         Reviewed by Adam Barth.
3608
3609         * Api/WebKitTextCodec.cpp:
3610         (BlackBerry::WebKit::base64DecodePolicyForWTF):
3611         (BlackBerry::WebKit::base64Decode):
3612         (BlackBerry::WebKit::base64EncodePolicyForWTF):
3613         (BlackBerry::WebKit::base64Encode):
3614         * Api/WebSettings.cpp:
3615         (BlackBerry::WebKit::WebSettings::setUserStyleSheetString):
3616         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3617
3618 2012-07-13  George Staikos  <staikos@webkit.org>
3619
3620         [BlackBerry] Fix crash due to unguarded use of renderer in select
3621         popup.
3622         https://bugs.webkit.org/show_bug.cgi?id=91287
3623
3624         Reviewed by Rob Buis.
3625
3626         No known testcase for this.  Found in the wild.
3627
3628         * WebCoreSupport/SelectPopupClient.cpp:
3629         (WebCore::SelectPopupClient::setValueAndClosePopup):
3630
3631 2012-07-13  Mike Fenton  <mifenton@rim.com>
3632
3633         [BlackBerry] Add support for attributes to define keyboard and enter key type on the Virtual Keyboard
3634         https://bugs.webkit.org/show_bug.cgi?id=91248
3635
3636         Reviewed by Antonio Gomes.
3637
3638         PR 174733.
3639
3640         Add data-blackberry-virtual-keyboard-type and
3641         data-blackberry-virtual-keyboard-enter-key to
3642         enable configuration of the desired virtual keyboard
3643         using element attributes.
3644
3645         Reviewed Internally by Gen Mak.
3646
3647         * Api/WebPageClient.h:
3648         * WebKitSupport/InputHandler.cpp:
3649         (BlackBerry::WebKit::convertStringToKeyboardType):
3650         (WebKit):
3651         (BlackBerry::WebKit::keyboardTypeAttribute):
3652         (BlackBerry::WebKit::convertStringToKeyboardEnterKeyType):
3653         (BlackBerry::WebKit::keyboardEnterKeyTypeAttribute):
3654         (BlackBerry::WebKit::InputHandler::setElementFocused):
3655
3656 2012-07-13  Jacky Jiang  <zhajiang@rim.com>
3657
3658         [BlackBerry] resetBitmapZoomScale called while zooming preventing pinch zoom
3659         https://bugs.webkit.org/show_bug.cgi?id=91247
3660
3661         Reviewed by Antonio Gomes.
3662
3663         PR: 175432
3664         On yahoo.com, the web page stopped zooming while trying to pinch as
3665         WebPageClient::resetBitmapZoomScale(double) was being called by
3666         WebPagePrivate::zoomToInitialScaleOnLoad() after load finished.
3667         And also yahoo.com was keeping updating layout, which made it really
3668         bad that zoomToInitialScaleOnLoad() was called many times when load
3669         finished and the load type was FrameLoadTypeStandard or FrameLoadTypeSame.
3670         As we only care about the situation that dispatchDidFirstVisuallyNonEmptyLayout()
3671         happens after load finished, we can move the code to that method and
3672         set a flag for WebPage layoutFinished() and zoomToInitialScaleOnLoad()
3673         instead. In this way, we can ensure that the flag is only enabled when
3674         dispatchDidFirstVisuallyNonEmptyLayout() is called after load finished
3675         and get rid of calling zoomToInitialScaleOnLoad() lots of times when
3676         keeping updating layout in such kind of situation.
3677
3678         Internally reviewed by Arvid Nilsson
3679
3680         * Api/WebPage.cpp:
3681         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
3682         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
3683         (BlackBerry::WebKit::WebPagePrivate::layoutFinished):
3684         * Api/WebPage_p.h:
3685         (BlackBerry::WebKit::WebPagePrivate::shouldZoomToInitialScaleOnLoad):
3686         (BlackBerry::WebKit::WebPagePrivate::setShouldZoomToInitialScaleAfterLoadFinished):
3687         (WebPagePrivate):
3688         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3689         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFirstVisuallyNonEmptyLayout):
3690
3691 2012-07-13  Jakob Petsovits  <jpetsovits@rim.com>
3692
3693         [BlackBerry] Use fillBuffer() instead of a user-defined background image.
3694         https://bugs.webkit.org/show_bug.cgi?id=91180
3695         RIM PR 171458
3696
3697         Reviewed by Rob Buis.
3698         Internally reviewed by Andrew Lo.
3699
3700         By using Platform::Graphics::fillBuffer() to fill the
3701         overscroll area, we save graphics memory for the buffer
3702         that the background image was occupying.
3703
3704         Also adapt checkerboard drawing as it is now done using
3705         fillBuffer() which replaces checkerBuffer().
3706
3707         In the same go, use the opportunity of the WebSettings
3708         API change to make it more consistent, renaming the
3709         OverZoomColor setting to OverScrollColor.
3710
3711         * Api/BackingStore.cpp:
3712         (WebKit):
3713         (BlackBerry::WebKit::BackingStorePrivate::paintDefaultBackground):
3714         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
3715         (BlackBerry::WebKit::BackingStorePrivate::fillWindow):
3716         * Api/BackingStore_p.h:
3717         (BackingStorePrivate):
3718         * Api/WebSettings.cpp:
3719         (WebKit):
3720         (BlackBerry::WebKit::WebSettings::standardSettings):
3721         (BlackBerry::WebKit::WebSettings::overScrollColor):
3722         (BlackBerry::WebKit::WebSettings::setOverScrollColor):
3723         (BlackBerry::WebKit::WebSettings::isEnableDefaultOverScrollBackground):
3724         (BlackBerry::WebKit::WebSettings::setEnableDefaultOverScrollBackground):
3725         * Api/WebSettings.h:
3726
3727 2012-07-13  Joshua Netterfield  <jnetterfield@rim.com>
3728
3729         [BlackBerry] Update about:* pages
3730         https://bugs.webkit.org/show_bug.cgi?id=91121
3731
3732         Reviewed by Yong Li.
3733
3734         Update the about:config pages, and improve the aesthetics of the about:build, about:version, about:credits, about:memory, about:config, and similar pages.
3735
3736         No new tests, because there is no new funtionality.
3737
3738         * WebCoreSupport/AboutData.cpp:
3739         (WebCore):
3740         (WebCore::writeFeatures):
3741         (WebCore::numberToHTMLTr): Converted to template function, added bool specialization to write "true" and "false" instead of "1" and "0"
3742         (WebCore::configPage):
3743         (WebCore::memoryPage):
3744         * WebCoreSupport/AboutTemplate.html.cpp: Template for BlackBerry about:* pages.
3745
3746 2012-07-12  Benjamin C Meyer  <bmeyer@rim.com>
3747
3748         WebPage::executeJavaScriptFunction crashes when there is an exception
3749         https://bugs.webkit.org/show_bug.cgi?id=91098
3750         RIM PR #149294
3751
3752         When there is an exception currently the code tries to get the string of
3753         the exception via JSValueToStringCopy to pass back, but this cases a
3754         crash inside JavaScriptCore, so change it to simply return false and not
3755         set the return value with the exception string.
3756
3757         Reviewed by George Staikos.
3758
3759         * Api/WebPage.cpp:
3760         (BlackBerry::WebKit::WebPage::executeJavaScriptFunction):
3761
3762 2012-07-12  Pawel Chomicki  <pchomicki@rim.com>
3763
3764         [BlackBerry] WebPage::touchEvent() should use Platform::TouchEvent's toString() for debugging.
3765         https://bugs.webkit.org/show_bug.cgi?id=91002
3766
3767         Reviewed by Antonio Gomes.
3768         Reviewed internally by Genevieve Mak.
3769
3770         Updated DEBUG_TOUCH_EVENTS section of touchEvent method to utilize
3771         Platform::TouchEvent's toString method.
3772
3773         * Api/WebPage.cpp:
3774         (BlackBerry::WebKit::WebPage::touchEvent):
3775
3776 2012-07-12  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
3777
3778         [BlackBerry] Cannot use digest proxy auth and NTLM auth at the same time
3779         https://bugs.webkit.org/show_bug.cgi?id=91054
3780
3781         Reviewed by George Staikos.
3782
3783         Implemented interface function syncProxyCredential() derived
3784         from class PageClientBlackBerry.
3785
3786         Internally reviewed by Jason Liu <jason.liu@torchmobile.com.cn>
3787
3788         * Api/WebPage.cpp:
3789         (BlackBerry::WebKit::WebPagePrivate::syncProxyCredential):
3790         (WebKit):
3791         * Api/WebPageClient.h:
3792         * Api/WebPage_p.h:
3793         (WebPagePrivate):
3794
3795 2012-07-11  Mike Lattanzio  <mlattanzio@rim.com>
3796
3797         [BlackBerry] UserViewportArguments are not properly respected.
3798         https://bugs.webkit.org/show_bug.cgi?id=91005
3799
3800         Reviewed by Rob Buis.
3801
3802         PR# 170088.
3803         Move scale and zooming reset on Committed before applying
3804         the user viewport to avoid overriding it immediately.
3805
3806         Internal review by Konrad Piascik, Jacky Jiang.
3807
3808         * Api/WebPage.cpp:
3809         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
3810
3811 2012-07-11  Crystal Zhang  <haizhang@rim.com>
3812
3813         [BlackBerry] Implement Date/Time picker
3814         https://bugs.webkit.org/show_bug.cgi?id=90911
3815
3816         Reviewed by Rob Buis.
3817
3818         Implement HTML Date/Time picker, also should delete popup when closing popup.
3819
3820         * WebCoreSupport/ChromeClientBlackBerry.cpp:
3821         (WebCore::ChromeClientBlackBerry::closePagePopup):
3822         * WebCoreSupport/DatePickerClient.cpp: Added.
3823         (WebCore):
3824         (WebCore::DatePickerClient::DatePickerClient):
3825         (WebCore::DatePickerClient::~DatePickerClient):
3826         (WebCore::DatePickerClient::generateHTML):
3827         (WebCore::DatePickerClient::closePopup):
3828         (WebCore::DatePickerClient::contentSize):
3829         (WebCore::DatePickerClient::htmlSource):
3830         (WebCore::DatePickerClient::setValueAndClosePopup):
3831         (WebCore::DatePickerClient::didClosePopup):
3832         (WebCore::DatePickerClient::writeDocument):
3833         * WebCoreSupport/DatePickerClient.h: Added.
3834         (WebKit):
3835         (WebCore):
3836         (DatePickerClient):
3837         * WebKitSupport/InputHandler.cpp:
3838         (BlackBerry::WebKit::InputHandler::openDatePopup):
3839
3840 2012-07-10  Adam Barth  <abarth@webkit.org>
3841
3842         WebCore::Settings for Hixie76 WebSocket protocol doesn't do anything and should be removed
3843         https://bugs.webkit.org/show_bug.cgi?id=90910
3844
3845         Reviewed by Eric Seidel.
3846
3847         * Api/WebPage.cpp:
3848         (BlackBerry::WebKit::WebPagePrivate::init):
3849
3850 2012-07-10  Adam Barth  <abarth@webkit.org>
3851
3852         LayoutTestController.dumpConfigurationForViewport should move to Internals
3853         https://bugs.webkit.org/show_bug.cgi?id=45652
3854
3855         Reviewed by Eric Seidel.
3856
3857         * WebKitSupport/DumpRenderTreeSupport.cpp:
3858         * WebKitSupport/DumpRenderTreeSupport.h:
3859         (DumpRenderTreeSupport):
3860
3861 2012-07-09  Yong Li  <yoli@rim.com>
3862
3863         [BlackBerry] PagePopupBlackBerry::closePopup() should always clear the pointer in WebPagePrivate
3864         https://bugs.webkit.org/show_bug.cgi?id=90817
3865
3866         Reviewed by Rob Buis.
3867
3868         PR# 174085.
3869         PagePopupBlackBerry::closePopup() should always clear the pointer in WebPagePrivate to avoid crashes.
3870         This patch also removes unused variable m_parentPopup and its setter.
3871
3872         * Api/WebPage.cpp:
3873         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): Remove m_parentPopup.
3874         * Api/WebPage_p.h:
3875         (WebPagePrivate):
3876         * WebCoreSupport/ChromeClientBlackBerry.cpp:
3877         (WebCore::ChromeClientBlackBerry::closePagePopup):
3878         * WebCoreSupport/PagePopupBlackBerry.cpp:
3879         (WebCore::PagePopupBlackBerry::init): Remove the setParentPopup() call.
3880         (WebCore::PagePopupBlackBerry::closePopup): Clear the reference in WebPagePrivate.
3881         * WebCoreSupport/SelectPopupClient.cpp:
3882         (WebCore::SelectPopupClient::setValueAndClosePopup): Add an assert for valid m_element.
3883
3884 2012-07-09  Mike Lattanzio  <mlattanzio@rim.com>
3885
3886         [BlackBerry] meta viewport initial-scale doesn't factor in device pixel ratio
3887         https://bugs.webkit.org/show_bug.cgi?id=90575
3888
3889         Reviewed by Rob Buis.
3890
3891         Refactor meta viewport handling to multiply the developer
3892         specified scale properties by the devicePixelRatio. This
3893         required moving the setting of these values until after
3894         the call to computeViewportAttributes.
3895
3896         This fixes an isssue where content wider than the meta viewport
3897         would case a zoom-out-to-fit scenario because we misinterpreted
3898         the specified initial-scale.
3899
3900         New test to verify wide content doesn't affect initial-scale:
3901         ManualTests/blackberry/meta-viewport-initial-scale-wide-content.html
3902
3903         Internal review from Konrad Piascik, Arvid Nilsson.
3904
3905         * Api/WebPage.cpp:
3906         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
3907         (BlackBerry::WebKit::WebPagePrivate::dispatchViewportPropertiesDidChange):
3908
3909 2012-07-07  George Staikos  <staikos@webkit.org>
3910
3911         Detach animation clients properly if we clear the web page pointer.
3912         https://bugs.webkit.org/show_bug.cgi?id=90730
3913
3914         Reviewed by Adam Treat.
3915
3916         * Api/WebPage.cpp:
3917         (BlackBerry::WebKit::WebPagePrivate::destroyCompositor):
3918         * Api/WebPageCompositor.cpp:
3919         (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
3920         (BlackBerry::WebKit::WebPageCompositorPrivate::~WebPageCompositorPrivate):
3921         (WebKit):
3922         (BlackBerry::WebKit::WebPageCompositorPrivate::detach):
3923         (BlackBerry::WebKit::WebPageCompositorPrivate::setPage):
3924         * Api/WebPageCompositor_p.h:
3925         (WebPageCompositorPrivate):
3926
3927 2012-07-06  Max Feil  <mfeil@rim.com>
3928
3929         [BlackBerry] exitFullScreenForElement() is not working for fullscreen elements in iframes
3930         https://bugs.webkit.org/show_bug.cgi?id=90327
3931
3932         Reviewed by Antonio Gomes.
3933
3934         Fix exit fullscreen problem for elements in iframes. The
3935         exitFullScreenForElement() call is passed a null element in
3936         this case, instead of the original element which entered
3937         fullscreen. If you look in Document.cpp you can see the
3938         exitFullScreenForElement() call being made on the topDocument
3939         (which has a null m_fullScreenElement) instead of the iframe's
3940         document.
3941
3942         The Chromium and Windows ports get around this problem by
3943         storing either the fullscreen element or its frame during
3944         enterFullScreenForElement(), so I will bring the BlackBerry port
3945         in line with this. See also bug 89817.
3946
3947         * WebCoreSupport/ChromeClientBlackBerry.cpp:
3948         (WebCore::ChromeClientBlackBerry::enterFullScreenForElement):
3949         (WebCore::ChromeClientBlackBerry::exitFullScreenForElement):
3950         * WebCoreSupport/ChromeClientBlackBerry.h:
3951         (ChromeClientBlackBerry):
3952
3953 2012-07-06  Benjamin C Meyer  <bmeyer@rim.com>
3954
3955         Add an API to explicitly call a JavaScript function with args.
3956         https://bugs.webkit.org/show_bug.cgi?id=90694
3957
3958         Currently the Blackberry port doesn't expose the JavaScript
3959         engine to 3rd parties so they rely upon executeJavaScript
3960         which can be slower than necessary and unsafe as eval is used.
3961         This new API provides a way to explicitly call a specific
3962         JavaScript function with a list of args preventing the case
3963         where an argument comes from a untrusted source and tries to
3964         escape the arg list to take control of the JavaScript engine.
3965
3966         In the future if the Blackberry port introduces a formal
3967         way to interact with the JavaScript engine this function should
3968         be removed.
3969
3970         PR 149294
3971
3972         Reviewed by Unreviewed
3973
3974         * Api/WebPage.cpp:
3975