Remove support for "desktop-width" in the viewport meta tag
[WebKit-https.git] / Source / WebKit / blackberry / ChangeLog
1 2012-11-07  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2
3         Remove support for "desktop-width" in the viewport meta tag
4         https://bugs.webkit.org/show_bug.cgi?id=101217
5
6         Reviewed by Gyuyoung Kim.
7
8         Sync WebViewportArguments enum with the one in
9         WebCore::ViewportArguments
10
11         * Api/WebViewportArguments.h:
12
13 2012-11-06  Genevieve Mak  <gmak@rim.com>
14
15         [BlackBerry] Crash in InRegionScrollerPrivate.
16         https://bugs.webkit.org/show_bug.cgi?id=101399
17
18         Reviewed by Rob Buis.
19
20         Add a pointer to the enclosing document as the pointer to layer
21         or node along the way may become invalid.
22         Use document pointer in clearDocumentData.
23         PR #238469
24
25         * Api/InRegionScroller.cpp:
26         (BlackBerry::WebKit::InRegionScrollerPrivate::clearDocumentData):
27         * WebKitSupport/InRegionScrollableArea.cpp:
28         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
29         (BlackBerry::WebKit::InRegionScrollableArea::document):
30         (WebKit):
31         * WebKitSupport/InRegionScrollableArea.h:
32         (WebCore):
33         (InRegionScrollableArea):
34
35 2012-11-06  Otto Derek Cheung  <otcheung@rim.com>
36
37         [BlackBerry] Pushing window.external.* events to webplatform
38         https://bugs.webkit.org/show_bug.cgi?id=101386
39
40         Reviewed by Rob Buis.
41
42         Adding calls to trigger window.external events so we can handle them on the
43         browser side.
44
45         PR 170059
46
47         * Api/WebPageClient.h:
48         * WebCoreSupport/ChromeClientBlackBerry.cpp:
49         (WebCore::ChromeClientBlackBerry::addSearchProvider):
50         (WebCore::ChromeClientBlackBerry::isSearchProviderInstalled):
51
52 2012-11-06  Otto Derek Cheung  <otcheung@rim.com>
53
54         [BlackBerry] Adding window.external to our port
55         https://bugs.webkit.org/show_bug.cgi?id=100868
56
57         Reviewed by Rob Buis.
58
59         Patching the method names to match the ones in the spec.
60
61         * WebCoreSupport/ExternalExtension.cpp:
62
63 2012-11-06  Jacky Jiang  <zhajiang@rim.com>
64
65         [BlackBerry] Page can't back to whole screen after zoom out and orientation change
66         https://bugs.webkit.org/show_bug.cgi?id=101350
67
68         Reviewed by Rob Buis.
69         Internally reviewed by Arvid Nilsson.
70
71         PR: 229321
72         When rotating device during touch interaction, bitmap zooming was
73         unexpected ended by resetBitmapZoomScale() so that it couldn't bounce
74         back. The call resetBitmapZoomScale() is ancient, which just resets the
75         scale of the bitmap before. Right now it only ends the bitmap zooming
76         which caused the issue. As UI viewport will be updated by zoomChanged()
77         right after that, we can remove this trouble maker.
78         Update the interaction views if the rotation is being changed so that
79         ZoomHandler can get the updated views.
80
81         * Api/WebPage.cpp:
82         (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint):
83         * Api/WebPageClient.h:
84
85 2012-11-05  Lianghui Chen  <liachen@rim.com>
86
87         [BlackBerry] Do not show error page for main loads denied by client application
88         https://bugs.webkit.org/show_bug.cgi?id=101287
89
90         Internal PR: 237574.
91         Internally reviewed by Arvid Nilsson, Joe Mason.
92         Reviewed by George Staikos.
93
94         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
95         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad):
96
97 2012-11-05  Lianghui Chen  <liachen@rim.com>
98
99         [BlackBerry] Do not display error page for failed downloads
100         https://bugs.webkit.org/show_bug.cgi?id=101246
101
102         Internal PR: 236318
103         Internal reviewed by Joe Mason, Leo Yang.
104         Reviewed by Rob Buis.
105
106         Right now when a main load, including all downloads, failed, it will
107         display an error page. This is not very user friendly, especially for
108         WebWorks application, which want to use its own user interface to info
109         user about the failure.
110         So we just stop displaying error page for downloads.
111
112         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
113         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad):
114
115 2012-11-05  Simon Fraser  <simon.fraser@apple.com>
116
117         Fix layer borders to cleaning appear and disappear on switching
118         https://bugs.webkit.org/show_bug.cgi?id=101136
119
120         Reviewed by Sam Weinig.
121
122         Remove the GraphicsLayerClient methods showDebugBorders() and
123         showRepaintCounter().
124
125         * Api/WebOverlay_p.h:
126         (WebOverlayPrivateWebKitThread):
127         * Api/WebPage.cpp:
128         (BlackBerry::WebKit::WebPagePrivate::notifyFlushRequired):
129         * Api/WebPage_p.h:
130         * WebKitSupport/DefaultTapHighlight.cpp:
131         * WebKitSupport/DefaultTapHighlight.h:
132         (DefaultTapHighlight):
133         * WebKitSupport/InspectorOverlayBlackBerry.cpp:
134         * WebKitSupport/InspectorOverlayBlackBerry.h:
135         (InspectorOverlay):
136         * WebKitSupport/SelectionOverlay.cpp:
137         * WebKitSupport/SelectionOverlay.h:
138         (SelectionOverlay):
139
140 2012-11-05  Rob Buis  <rbuis@rim.com>
141
142         [BlackBerry] screenX/Y gives wrong values
143         https://bugs.webkit.org/show_bug.cgi?id=101259
144
145         Reviewed by Yong Li.
146
147         PR 237071
148
149         Reviewed internally by Gen Mak.
150
151         Do not transform screenPos coordinates.
152
153         * Api/WebPage.cpp:
154         (BlackBerry::WebKit::WebPage::mouseEvent):
155         (BlackBerry::WebKit::WebPage::touchEvent):
156         (BlackBerry::WebKit::WebPage::touchPointAsMouseEvent):
157
158 2012-11-05  Rob Buis  <rbuis@rim.com>
159
160         [BlackBerry] Input date should not popup dialog when readonly is set
161         https://bugs.webkit.org/show_bug.cgi?id=101234
162
163         Reviewed by Yong Li.
164
165         PR 236114
166
167         Reviewed internally by Mike Fenton.
168
169         Suppress popup dialog if the input element has readonly attribute set.
170
171         * WebKitSupport/InputHandler.cpp:
172         (BlackBerry::WebKit::InputHandler::openDatePopup):
173         (BlackBerry::WebKit::InputHandler::openColorPopup):
174
175 2012-11-05  Genevieve Mak  <gmak@rim.com>
176
177         [BLACKBERRY] Update touch code to reflect touch refactor
178         https://bugs.webkit.org/show_bug.cgi?id=101227
179
180         Reviewed by Rob Buis.
181
182         PR #2706785
183         Reviewed Internally by: Mike Lattanzio
184
185         * Api/WebPage.cpp:
186         (BlackBerry::WebKit::WebPage::touchEvent):
187         (BlackBerry::WebKit::WebPagePrivate::dispatchTouchEventToFullScreenPlugin):
188
189 2012-11-05  Konrad Piascik  <kpiascik@rim.com>
190
191         [BlackBerry] Web Inspector: Add InspectorInstrumentaiton calls for timeline compositing.
192         https://bugs.webkit.org/show_bug.cgi?id=101213
193         RIM PR 178131
194
195         Reviewed by Rob Buis.
196
197         Internally Reviewed by Arvid Nilsson.
198
199         Added compositing events to the timeline for BlackBerry.
200
201         * Api/WebPage.cpp:
202         (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
203         (BlackBerry::WebKit::WebPagePrivate::willComposite):
204         (WebKit):
205         (BlackBerry::WebKit::WebPagePrivate::didComposite):
206         * Api/WebPage_p.h:
207         (WebPagePrivate):
208
209 2012-11-03  Alexey Proskuryakov  <ap@apple.com>
210
211         Get rid of USE(CFURLSTORAGESESSIONS)
212         https://bugs.webkit.org/show_bug.cgi?id=101131
213
214         Reviewed by Sam Weinig.
215
216         * WebCoreSupport/AboutDataUseFeatures.in: Not sure what this list is about, but
217         CFURLSTORAGESESSIONS probably doesn't need to stay here.
218
219 2012-11-02  Nima Ghanavatian  <nghanavatian@rim.com>
220
221         [BlackBerry] Fix compile-time warning of a possible empty-body if statement
222         https://bugs.webkit.org/show_bug.cgi?id=101095
223
224         Reviewed by Yong Li.
225         Internally reviewed by Jeff Rogers.
226
227         BBLOG might be compiled out leaving an if statement with an empty
228         body. This is giving us a warning at the moment. Simply putting braces
229         around it will fail as well because then we'd have braces around a
230         single-line if. So, in following with the style observed in other parts
231         of BackingStore.cpp, break up the log message and add braces.
232
233         * Api/BackingStore.cpp:
234         (BlackBerry::WebKit::BackingStorePrivate::blitToWindow):
235         (BlackBerry::WebKit::BackingStorePrivate::fillWindow):
236         (BlackBerry::WebKit::BackingStorePrivate::clearWindow):
237
238 2012-11-02  Nima Ghanavatian  <nghanavatian@rim.com>
239
240         [BlackBerry] Optimize backspace key handling
241         https://bugs.webkit.org/show_bug.cgi?id=101083
242
243         PR233591
244         Optimize backspace key handling. Some of these calls are not
245         required by IMF since the input_service already processes the backspace key
246         and updates the state before passing us the key.
247
248         Internally reviewed by Mike Fenton.
249
250         Reviewed by Yong Li.
251
252         Blocking calls with a flag that we clear immediately after
253         processing a backspace keydown.
254
255         * WebKitSupport/InputHandler.cpp:
256         (BlackBerry::WebKit::InputHandler::nodeTextChanged):
257         (BlackBerry::WebKit::InputHandler::selectionChanged):
258         (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
259         * WebKitSupport/InputHandler.h:
260         (InputHandler):
261
262 2012-11-02  Otto Derek Cheung  <otcheung@rim.com>
263
264         [BlackBerry] Adding window.external to our port
265         https://bugs.webkit.org/show_bug.cgi?id=100868
266
267         Reviewed by Rob Buis.
268         PR 158809
269
270         Patch up an error where we were dereferencing a null pointer.
271
272         * WebCoreSupport/ExternalExtension.cpp:
273         (addSearchProviderMethod):
274         (IsSearchProviderInstalledMethod):
275
276 2012-11-01  Peter Wang  <peter.wang@torchmobile.com.cn>
277
278         [BlackBerry] Simplify the code of returning JSValue in "BlackBerry::WebKit::WebPagePrivate::executeJavaScript"
279         https://bugs.webkit.org/show_bug.cgi?id=100941
280
281         Reviewed by Yong Li.
282
283         Remove the unnecessary steps, just directly deal with returned JSValue.
284
285         * Api/WebPage.cpp:
286         (BlackBerry::WebKit::WebPagePrivate::executeJavaScript):
287         (BlackBerry::WebKit::WebPagePrivate::executeJavaScriptInIsolatedWorld):
288
289 2012-11-01  Otto Derek Cheung  <otcheung@rim.com>
290
291         [BlackBerry] Add a prompt to enable global location services
292         https://bugs.webkit.org/show_bug.cgi?id=100992
293         
294         PR 227897
295
296         Reviewed by Rob Buis.
297
298         Adding a dialog to let the user know location services isn't enabled.
299         Currently, the browser app does not check whether the global setting for
300         location service is enabled. This patch adds a dialog to allow the user
301         to open the settings app and change that setting. This infobar will only
302         show once per session. If the user fails to turn on location services after
303         the first prompt, all geolocation requests will automatically fail.
304
305         Also, adapting GeolocationClientBlackBerry to the removal of GeoTracker.
306         The class now talks directly to the geo handler singleton.
307
308         * Api/WebPageClient.h:
309         * WebCoreSupport/GeolocationClientBlackBerry.cpp:
310         (GeolocationClientBlackBerry::GeolocationClientBlackBerry):
311         (GeolocationClientBlackBerry::geolocationDestroyed):
312         (GeolocationClientBlackBerry::startUpdating):
313         (GeolocationClientBlackBerry::stopUpdating):
314         (GeolocationClientBlackBerry::requestPermission):
315         (GeolocationClientBlackBerry::setEnableHighAccuracy):
316         * WebCoreSupport/GeolocationClientBlackBerry.h:
317         (WebCore::GeolocationClientBlackBerry::requiresHighAccuracy):
318         (GeolocationClientBlackBerry):
319
320 2012-11-01  Michael Matovsky  <mmatovsky@rim.com>
321
322         [BlackBerry] Web page view state should be preserved for pages loaded from page cache
323         https://bugs.webkit.org/show_bug.cgi?id=100694
324         Internal PR: 220488
325
326         Internally reviewed by Lianghui Chen, Joe Mason
327         Reviewed by Rob Buis.
328
329         The web page view specific metadata should be preserved for web pages loaded from page cache (by using back/forward).
330         This requires web page view state to be saved in and restored from the corresponding page cache history item.
331
332         * Api/WebPageClient.h:
333         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
334         (WebCore::FrameLoaderClientBlackBerry::saveViewStateToItem):
335         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
336
337 2012-11-01  Leo Yang  <leoyang@rim.com>
338
339         [BlackBerry] Use clipped background rect in backing store
340         https://bugs.webkit.org/show_bug.cgi?id=100960
341
342         Reviewed by Yong Li.
343         Reviewed internally by Arvid Nilsson.
344
345         We calculated clipped background rect but didn't really use it when painting
346         the background. Use the correct rect to avoid ASSERT failure in platform code.
347
348         * Api/BackingStore.cpp:
349         (BlackBerry::WebKit::BackingStorePrivate::paintDefaultBackground):
350
351 2012-10-31  George Staikos  <staikos@webkit.org>
352
353         [BlackBerry] Crash on html popup form control when element is deleted
354         https://bugs.webkit.org/show_bug.cgi?id=100869
355
356         Reviewed by Yong Li.
357
358         Make the element pointers RefPtr so they don't go away before the popup
359         is closed.
360
361         * WebCoreSupport/ColorPickerClient.h:
362         (ColorPickerClient):
363         * WebCoreSupport/DatePickerClient.h:
364         (DatePickerClient):
365         * WebCoreSupport/SelectPopupClient.h:
366         (SelectPopupClient):
367
368 2012-10-31  Genevieve Mak  <gmak@rim.com>
369
370         [BLACKBERRY] Custom WebWorks context menus don't always work.
371         https://bugs.webkit.org/show_bug.cgi?id=100891
372
373         Reviewed by Rob Buis.
374
375         Walk up the dom tree until we find the webworks attribute or run out
376         of parent nodes.
377         PR# 227732
378
379         * Api/WebPage.cpp:
380         (BlackBerry::WebKit::WebPagePrivate::webContext):
381
382 2012-10-31  Otto Derek Cheung  <otcheung@rim.com>
383
384         [BlackBerry] Adding window.external to our port
385         https://bugs.webkit.org/show_bug.cgi?id=100868
386
387         Reviewed by Rob Buis.
388
389         Attaching the window.external interface to the frame when
390         it loads up.
391
392         When called, the external interface methods call stubs declared
393         in ChromeClientBlackBerry. The method passes in the url of the search
394         provider and the url of the frame. Cross-site check has to be done in the
395         implementation PR.
396
397         * WebCoreSupport/ChromeClientBlackBerry.cpp:
398         (WebCore::ChromeClientBlackBerry::addSearchProvider):
399         (WebCore):
400         (WebCore::ChromeClientBlackBerry::isSearchProviderInstalled):
401         * WebCoreSupport/ChromeClientBlackBerry.h:
402         (ChromeClientBlackBerry):
403         * WebCoreSupport/ExternalExtension.cpp: Added.
404         (addSearchProviderMethod):
405         (IsSearchProviderInstalledMethod):
406         (externalExtensionInitialize):
407         (externalExtensionFinalize):
408         * WebCoreSupport/ExternalExtension.h: Added.
409         (WebCore):
410         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
411         (WebCore::FrameLoaderClientBlackBerry::dispatchDidClearWindowObjectInWorld):
412
413 2012-10-30  Peter Wang  <peter.wang@torchmobile.com.cn>
414
415         [BlackBerry] Clean the code of "JavaScriptDebuggerBlackBerry"
416         https://bugs.webkit.org/show_bug.cgi?id=100724
417
418         Reviewed by Rob Buis.
419
420         Remove the code of JavaScriptDebuggerBlackBerry.
421
422         * Api/WebPage.cpp:
423         * Api/WebPage.h:
424         * Api/WebPage_p.h:
425         (WebCore):
426         (WebPagePrivate):
427         * WebCoreSupport/JavaScriptDebuggerBlackBerry.cpp: Removed.
428         * WebCoreSupport/JavaScriptDebuggerBlackBerry.h: Removed.
429
430 2012-10-29  Rob Buis  <rbuis@rim.com>
431
432         [BlackBerry] Simplify AuthenticationChallengeManager::instance
433         https://bugs.webkit.org/show_bug.cgi?id=100614
434
435         Reviewed by Yong Li.
436         Internally reviewed by Lyon Chen.
437
438         No need to call AuthenticationChallengeManager::init anymore.
439
440         * Api/BlackBerryGlobal.cpp:
441         (BlackBerry::WebKit::globalInitialize):
442
443 2012-10-29  Mike Lattanzio  <mlattanzio@rim.com>
444
445         [BlackBerry] Typo in WebPagePrivate::postponeDocumentRecalcStyle()
446         https://bugs.webkit.org/show_bug.cgi?id=100377
447
448         Reviewed by Adam Treat.
449
450         Should be void, not bool.
451
452         * Api/WebPage.cpp:
453         (BlackBerry::WebKit::WebPagePrivate::postponeDocumentStyleRecalc):
454         * Api/WebPage_p.h:
455         (WebPagePrivate):
456
457 2012-10-29  Robin Cao  <robin.cao@torchmobile.com.cn>
458
459         [BlackBerry] Fix a build error
460         https://bugs.webkit.org/show_bug.cgi?id=100649
461
462         Reviewed by Kentaro Hara.
463
464         r127876 changed the signature of WebCore::EventHandler::hitTestResultAtPoint()
465         and this commit was later reverted. We need to update a call site in the
466         BlackBerry port to make it build.
467
468         * Api/WebPage.cpp:
469         (BlackBerry::WebKit::WebPagePrivate::hitTestResult):
470
471 2012-10-26  Jacky Jiang  <zhajiang@rim.com>
472
473         [BlackBerry][FullScreen] entering/leaving fullscreen results in temporary glitches on the screen
474         https://bugs.webkit.org/show_bug.cgi?id=100421
475
476         Reviewed by Yong Li.
477
478         PR: 231173
479         When leaving fullscreen, we need to suspend screen and backing store
480         updates before setting scroll position and changing transformation and
481         resume after they are done. In which way, we can get rid of a noticeable
482         glitch during the transition.
483
484         * Api/WebPage.cpp:
485         (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
486
487 2012-10-26  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
488
489         [BlackBerry] ASSERT currentThreadIsHoldingLock() failed in MarkedAllocator::allocateSlowCase()
490         https://bugs.webkit.org/show_bug.cgi?id=100504
491
492         Reviewed by Yong Li.
493
494         PR #232038 The similar PR # 200724.
495         Reviewed internally by Petter Wang.
496
497         This issue is same as bug 95492, and this patch is same as its patch.
498         Hold the JSLock for the current thread before we call toRef to avoid
499         the ASSERT failure.
500
501         * Api/WebPage.cpp:
502         (BlackBerry::WebKit::WebPagePrivate::executeJavaScriptInIsolatedWorld):
503         (BlackBerry::WebKit::WebPage::executeJavaScriptFunction):
504
505 2012-10-25  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
506
507         [BlackBerry] WebView process crashed at AuthenticationChallengeManager::pageVisibilityChanged()
508         https://bugs.webkit.org/show_bug.cgi?id=100330
509
510         Reviewed by Rob Buis.
511
512         Reviewed internally by Charles Wei.
513         PR #231232
514
515         Since AuthenticationChallengeManager keeps a map of WebPages, WebPage setting
516         visible needs AuthenticationChallengeManager to update its records, deleting
517         webpage from AuthenticationChallengeManager's map should be done after setting
518         webpage visibility.
519
520         * Api/WebPage.cpp:
521         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
522
523 2012-10-24  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
524
525         [BlackBerry] ASSERT(!needsOneShotDrawingSynchronization()) failed in commitRootLayerIfNeeded()
526         https://bugs.webkit.org/show_bug.cgi?id=100214
527
528         Reviewed by Rob Buis.
529
530         ViewportSize has been changed before committing root layer, it asserts
531         that it needs relayout and render if needed before committing if it
532         Needs One Shot Drawing Synchronization.
533         This patch calls requestLayoutIfNeeded() when resumeScreenAndBackingStoreUpdates().
534
535         Fix a coding style in the BackingStore.cpp as well.
536
537         Reviewed internally by Arvid Nilsson.
538         PR #230253
539
540         * Api/BackingStore.cpp:
541         (BlackBerry::WebKit::BackingStorePrivate::resumeScreenAndBackingStoreUpdates):
542
543 2012-10-24  Otto Derek Cheung  <otcheung@rim.com>
544
545         [BlackBerry] Geolocation is segfaulting
546         https://bugs.webkit.org/show_bug.cgi?id=100305
547
548         Reviewed by Rob Buis.
549
550         We weren't wrapping the Geolocation object in a RefPtr when we call setIsAllowed in
551         GeolocationClientBlackBerry::onPermission.
552
553         This patch also removes all references of the Geolocation object in WebPageClientImpl.
554         One RefPtr<Geolocation> is used to store the reference of the WebCore object on our port.
555
556         We don't need a mapping between origin -> context of Geolocation because in our port,
557         one WebPage.cpp contains one GeolocationController only. 
558
559         * Api/WebPageClient.h:
560         * WebCoreSupport/GeolocationClientBlackBerry.cpp:
561         (frameOrigin):
562         (GeolocationClientBlackBerry::requestPermission):
563         (GeolocationClientBlackBerry::cancelPermissionRequest):
564         (GeolocationClientBlackBerry::onPermission):
565         * WebCoreSupport/GeolocationClientBlackBerry.h:
566         (GeolocationClientBlackBerry):
567
568 2012-10-24  Jacky Jiang  <zhajiang@rim.com>
569
570         [BlackBerry][Fullscreen] Roll out changes to fullscreen which rely on viewport size change [Part II]
571         https://bugs.webkit.org/show_bug.cgi?id=100259
572
573         Reviewed by Rob Buis.
574
575         PR: 219666
576         Revert "[BlackBerry] [FullScreen] entering/leaving fullscreen results in temporary glitches on the screen"
577         This rolls out r128772.
578         The patches relies on the viewport size change of the client side to
579         resume the screen and backing store updates. However, some client
580         sides don't need or wish to resize the WebKit viewport at all which
581         will result in upexpected screen and backing store suspensions.
582
583         * Api/WebPage.cpp:
584         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
585         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
586         * Api/WebPage_p.h:
587         (WebPagePrivate):
588         * WebCoreSupport/ChromeClientBlackBerry.cpp:
589         (WebCore::ChromeClientBlackBerry::enterFullScreenForElement):
590         (WebCore::ChromeClientBlackBerry::exitFullScreenForElement):
591
592 2012-10-24  Jacky Jiang  <zhajiang@rim.com>
593
594         [BlackBerry][Fullscreen] Roll out changes to fullscreen which rely on viewport size change
595         https://bugs.webkit.org/show_bug.cgi?id=100259
596
597         Reviewed by Rob Buis.
598
599         PR: 219666
600         Roll out r130392 and r129909.
601         The patches rely on the viewport size change of the client side to
602         update the scale and scroll position of the video. However, some client
603         sides don't need or wish to resize the WebKit viewport at all.
604
605         * Api/WebPage.cpp:
606         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
607         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
608         (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
609         (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
610         * Api/WebPage_p.h:
611         (WebPagePrivate):
612
613 2012-10-24  Otto Derek Cheung  <otcheung@rim.com>
614
615         [BlackBerry] Rename GeolocationControllerClientBlackBerry to GeolocationClientBlackBerry
616         https://bugs.webkit.org/show_bug.cgi?id=100250
617
618         Reviewed by Rob Buis.
619
620         Rename GeolocationControllerClientBlackBerry to GeolocationClientBlackBerry
621         to prevent confusion.
622         PR 230196
623
624         * Api/WebPage.cpp:
625         (BlackBerry::WebKit::WebPagePrivate::init):
626         * Api/WebPage_p.h:
627         (WebCore):
628         * WebCoreSupport/ChromeClientBlackBerry.cpp:
629         * WebCoreSupport/GeolocationClientBlackBerry.cpp: Renamed from Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.cpp.
630         (frameOrigin):
631         (GeolocationClientBlackBerry::GeolocationClientBlackBerry):
632         (GeolocationClientBlackBerry::geolocationDestroyed):
633         (GeolocationClientBlackBerry::startUpdating):
634         (GeolocationClientBlackBerry::stopUpdating):
635         (GeolocationClientBlackBerry::lastPosition):
636         (GeolocationClientBlackBerry::requestPermission):
637         (GeolocationClientBlackBerry::cancelPermissionRequest):
638         (GeolocationClientBlackBerry::onLocationUpdate):
639         (GeolocationClientBlackBerry::onLocationError):
640         (GeolocationClientBlackBerry::onPermission):
641         (GeolocationClientBlackBerry::setEnableHighAccuracy):
642         * WebCoreSupport/GeolocationClientBlackBerry.h: Renamed from Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.h.
643         (WebKit):
644         (WebCore):
645         (GeolocationClientBlackBerry):
646         (WebCore::GeolocationClientBlackBerry::tracker):
647
648 2012-10-24  Parth Patel  <parpatel@rim.com>
649
650         [BlackBerry] Extending existing ThreadUnsafe singletons in webkit to
651         Generic ThreadUnsafe Singleton
652         https://bugs.webkit.org/show_bug.cgi?id=100145
653
654         Reviewed by Rob Buis.
655
656         Extending the singletons to generic singleton and changing
657         getInstance() in IconDatabaseClientBlackBerry to instance()
658         to match the generic singleton template.
659
660         Reviewed Internally by Yong Li.
661
662         * Api/WebPage.cpp:
663         (BlackBerry::WebKit::WebPage::initializeIconDataBase):
664         * WebCoreSupport/IconDatabaseClientBlackBerry.cpp:
665         (WebCore):
666         * WebCoreSupport/IconDatabaseClientBlackBerry.h:
667         (IconDatabaseClientBlackBerry):
668
669 2012-10-23  Robin Cao  <robin.cao@torchmobile.com.cn>
670
671         [BlackBerry] Web page renders at the wrong zoom level after viewport changes
672         https://bugs.webkit.org/show_bug.cgi?id=100096
673
674         Reviewed by Rob Buis.
675
676         Notify the client of the zoom level change before resuming screen updates.
677         Otherwise, the user interface thread may blit the content at the wrong
678         zoom level in some cases. This can also prevent potential flickering.
679
680         Reviewed internally by Arvid Nilsson.
681
682         PR #225741
683
684         * Api/WebPage.cpp:
685         (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint):
686         (BlackBerry::WebKit::WebPagePrivate::zoomBlock):
687
688 2012-10-23  Mike Lattanzio  <mlattanzio@rim.com>
689
690         [BlackBerry] Cache TouchDown HitTestResult to avoid calling RenderLayer::hitTest unnecessarily
691         https://bugs.webkit.org/show_bug.cgi?id=99649
692
693         Reviewed by George Staikos.
694
695         Random latency before scroll starts on sites like http://pintrest.com
696         Internal PR225398
697
698         The chief problem here is the all the hit testing that we do for
699         touch events and simulated mouse events. If the render tree is dirty
700         hit tests can take a long time in Document::recalcStyle(). Masking
701         the flags that force style recalculations will make them fast, at the
702         expense that they might be happening on stale data.
703
704         Since we are only using these hit tests to look for event handlers -
705         we're not actually modifying anything, it is better to skip the
706         Document::recalcStyle() and save ourselves tons of time.
707
708         * Api/InRegionScroller.cpp:
709         (BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint):
710         * Api/WebPage.cpp:
711         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
712         (BlackBerry::WebKit::WebPage::touchEvent):
713         (BlackBerry::WebKit::WebPagePrivate::setScrollOriginPoint):
714         (BlackBerry::WebKit::WebPagePrivate::postponeDocumentStyleRecalc):
715         (WebKit):
716         (BlackBerry::WebKit::WebPagePrivate::resumeDocumentStyleRecalc):
717         (BlackBerry::WebKit::WebPagePrivate::hitTestResult):
718         (BlackBerry::WebKit::WebPagePrivate::clearCachedHitTestResult):
719         * Api/WebPage_p.h:
720         (WebPagePrivate):
721         * WebKitSupport/FatFingers.cpp:
722         (BlackBerry::WebKit::FatFingers::findBestPoint):
723         (BlackBerry::WebKit::FatFingers::getRelevantInfoFromCachedHitTest):
724         * WebKitSupport/FatFingers.h:
725         * WebKitSupport/TouchEventHandler.cpp:
726         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
727
728 2012-10-23  Rob Buis  <rbuis@rim.com>
729
730         [BlackBerry] Make selection in search input box not overlap cancel button
731         https://bugs.webkit.org/show_bug.cgi?id=100130
732
733         Reviewed by Antonio Gomes.
734
735         This ensures that even when selection is active, the user can still press 'cancel'.
736
737         * WebKitSupport/InputHandler.cpp:
738         (BlackBerry::WebKit::InputHandler::boundingBoxForInputField):
739
740 2012-10-23  Arvid Nilsson  <anilsson@rim.com>
741
742         [BlackBerry] Let WebKit manage the SelectionOverlay
743         https://bugs.webkit.org/show_bug.cgi?id=99585
744
745         Reviewed by Rob Buis.
746
747         The SelectionOverlay was exposed to clients of the BlackBerry::WebKit
748         API. However, all the information and notifications necessary to manage
749         the SelectionOverlay are available within WebKit, so the client does
750         not have to shoulder this responsibility.
751
752         Remove WebSelection and all the related plumbing. Now that nobody is
753         using the class from the user interface thread, remove the message
754         related code in SelectionOverlay.
755
756         Add two calls to SelectionOverlay::hide() that are necessary now that
757         the client is no longer responsible for hiding it.
758
759         RIM PR: 225789
760
761         Reviewed internally by Mike Fenton.
762
763         * Api/WebPage.cpp:
764         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
765         * Api/WebPage.h:
766         (WebKit):
767         * Api/WebPage_p.h:
768         (WebPagePrivate):
769         * Api/WebSelectionOverlay.h: Removed.
770         * WebKitSupport/SelectionHandler.cpp:
771         (BlackBerry::WebKit::SelectionHandler::cancelSelection): Hide the overlay here, because state is reset and selection mode is no longer active
772         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged): Also hide overlay here, to go with the call to cancelSelectionVisuals
773         * WebKitSupport/SelectionOverlay.cpp:
774         (BlackBerry::WebKit::SelectionOverlay::SelectionOverlay):
775         * WebKitSupport/SelectionOverlay.h:
776         (BlackBerry::WebKit::SelectionOverlay::create):
777         (SelectionOverlay):
778
779 2012-10-22  Mike Fenton  <mifenton@rim.com>
780
781         [BlackBerry] Remove specialized handling for isIndex fields.
782         https://bugs.webkit.org/show_bug.cgi?id=100004
783
784         Reviewed by Rob Buis.
785
786         PR 214342.
787
788         Remove special handling for isIndex field as the tag
789         is rewritten.
790
791         Reviewed Internally by Yongxin Dai and Nima Ghanavatian.
792
793         * WebKitSupport/InputHandler.cpp:
794         (BlackBerry::WebKit::inputStyle):
795         (BlackBerry::WebKit::InputHandler::elementType):
796
797 2012-10-22  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
798
799         [Qt] Fix "ASSERTION FAILED: !document->inPageCache()" when loading a page
800         https://bugs.webkit.org/show_bug.cgi?id=98514
801
802         Reviewed by Kenneth Rohde Christiansen.
803
804         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
805         (WebCore::FrameLoaderClientBlackBerry::transitionToCommittedForNewPage):
806
807 2012-10-20  Andrew Lo  <anlo@rim.com>
808
809         [BlackBerry] m_mainFrame should be null checked before use in WebPagePrivate destructor
810         https://bugs.webkit.org/show_bug.cgi?id=99916
811
812         Reviewed by George Staikos.
813         Internally reviewed by Arvid Nilsson.
814
815         Internal PR228029
816         Add null checks for m_mainFrame for things that happen during
817         WebPage destruction.
818
819         * Api/WebPage.cpp:
820         (BlackBerry::WebKit::WebPagePrivate::setVisible):
821         (BlackBerry::WebKit::WebPagePrivate::setCompositorDrawsRootLayer):
822
823 2012-10-19  Mike Fenton  <mifenton@rim.com>
824
825         [BlackBerry] Convert input style to int64_t
826         https://bugs.webkit.org/show_bug.cgi?id=99848
827
828         Reviewed by Yong Li.
829
830         PR 227381.
831
832         Switch input style mask to int64_t to match the the updated definition.
833
834         Reviewed Internally by Nima Ghanavatian.
835
836         * Api/WebPageClient.h:
837         * WebKitSupport/InputHandler.cpp:
838         (BlackBerry::WebKit::inputStyle):
839         * WebKitSupport/InputHandler.h:
840         (InputHandler):
841
842 2012-10-19  Mike Fenton  <mifenton@rim.com>
843
844         [BlackBerry] Move all keyboard type calculations into InputHandler.
845         https://bugs.webkit.org/show_bug.cgi?id=99847
846
847         Reviewed by Yong Li.
848
849         PR 227381.
850
851         Move all keyboard type calculations into webkit and avoid passing type
852         information to the webview.
853
854         Reviewed Internally by Nima Ghanavatian.
855
856         * Api/WebPageClient.h:
857         * WebKitSupport/InputHandler.cpp:
858         (BlackBerry::WebKit::convertInputTypeToVKBType):
859         (WebKit):
860         (BlackBerry::WebKit::InputHandler::setElementFocused):
861
862 2012-10-19  Jacky Jiang  <zhajiang@rim.com>
863
864         [BlackBerry] Page viewport aspect ratio not kept on navigating back
865         https://bugs.webkit.org/show_bug.cgi?id=99760
866
867         Reviewed by Yong Li.
868         Internally reviewed by Konrad Piascik
869
870         PR: 222437
871         This is to fix the second issue on PR222437 that the viewport not kept
872         when navigating back from google after rotation to bloomberg.
873         We were trying to restore the history contents size and scale of
874         bloomberg which has virtual viewport. The scale would be recalculated
875         based on the new screen size. However, we would still use the current
876         contents size if it was greater than the history contents size in
877         FrameView::setContentsSize which made the contents seem to be scaled
878         too much.
879         Actually when we relayout the contents after rotation change, the
880         current contents size which is based on the virtual viewport has taken
881         the screen size into account. Shrinking the contents size will be
882         expensive. So we can ignore screen size based scale calculation here.
883
884         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
885         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
886
887 2012-10-19  Mike Fenton  <mifenton@rim.com>
888
889         [BlackBerry] Add input logs to InputHandler::ensureFocusTextElementVisible.
890         https://bugs.webkit.org/show_bug.cgi?id=99837
891
892         Reviewed by Antonio Gomes.
893
894         Add input logs for InputHandler::ensureFocusTextElementVisible.
895
896         Reviewed Internally by Nima Ghanavatian.
897
898         * WebKitSupport/InputHandler.cpp:
899         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
900
901 2012-10-19  Andrew Lo  <anlo@rim.com>
902
903         [BlackBerry] Should suspend AnimationController when WebPage becomes invisible.
904         https://bugs.webkit.org/show_bug.cgi?id=99844
905
906         Reviewed by Yong Li.
907         Internally reviewed by Arvid Nilsson & Yong Li.
908
909         Suspend animation controller when the tab becomes invisible,
910         in addition to suspending scripted animations.
911
912         * Api/WebPage.cpp:
913         (BlackBerry::WebKit::WebPagePrivate::setVisible):
914
915 2012-10-19  Mike Fenton  <mifenton@rim.com>
916
917         [BlackBerry] Don't attempt to auto scroll on input for Fixed Position elements.
918         https://bugs.webkit.org/show_bug.cgi?id=99833
919
920         Reviewed by Antonio Gomes.
921
922         PR 195024.
923
924         Don't attempt to scroll fixed position elements.
925
926         Reviewed Internally by Arvid Nilsson.
927
928         * WebKitSupport/DOMSupport.cpp:
929         (BlackBerry::WebKit::DOMSupport::isFixedPositionOrHasFixedPositionAncestor):
930         (DOMSupport):
931         * WebKitSupport/DOMSupport.h:
932         (WebCore):
933         * WebKitSupport/InputHandler.cpp:
934         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
935
936 2012-10-18  Jacky Jiang  <zhajiang@rim.com>
937
938         [BlackBerry] Page viewport aspect ratio not kept on navigating back
939         https://bugs.webkit.org/show_bug.cgi?id=99760
940
941         Reviewed by Rob Buis.
942         Internally reviewed by Konrad Piascik.
943
944         PR: 190469
945         This was added in r127628 which was trying to fix some rendering
946         defects on maps.google.com and news.qq.com, however it was very harmful
947         and caused regressions.
948         zoomToFitScale() depends on the current contents size. During history
949         navigation and device rotation, if zoomToFitScale() is based on the
950         final contents size which is expected, there will still be a scale
951         calculation like this afterwards
952         screenSize.width()/screenSize.height()*zoomToFitScale() which will
953         result in a wrong scale. During the history navigation, if
954         zoomToFitScale() isn't based on the final contents size, then we will
955         get the wrong scale as well for sure.
956         This issue will be fixed by removing the wrong calculation.
957         The original issue of r127628 was fixed by the patch of PR225981.
958
959         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
960         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
961
962 2012-10-18  John Griggs  <jgriggs@rim.com>
963
964         2012-10-18  John Griggs  <jgriggs@rim.com>
965
966         Crash in InRegionScrollableArea constructor while loading page
967         https://bugs.webkit.org/show_bug.cgi?id=99733
968
969         Reviewed by Antonio Gomes.
970
971         Check scrollLayer and avoid constructing InRegionScrollableArea when it is NULL.
972
973         * Api/InRegionScroller.cpp:
974         (BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint):
975
976 2012-10-17  Jacky Jiang  <zhajiang@rim.com>
977
978         [BlackBerry] Possible redundant zoomToInitialScaleOnLoad() in WebPagePrivate::setLoadState
979         https://bugs.webkit.org/show_bug.cgi?id=99624
980
981         Reviewed by Rob Buis.
982         Internally reviewed by Arvid Nilsson
983
984         PR: 225981
985         Several reasons to eliminate the ancient unnecessary
986         zoomToInitialScaleOnLoad() in WebPagePrivate::setLoadState committed:
987         - At this point, we have only committed the data we received.
988         - For the new load, we haven't started parsing the tokens and building
989           the DOM tree and the first layout will happen after that.
990         - For the load restored from cache, the first layout will happen after
991           setLoadState committed which is called by
992           FrameLoader::dispatchDidCommitLoad().
993         - zoomToInitialScaleOnLoad() can still be called after the first
994           layout finished.
995         - zoomToInitialScaleOnLoad() is expensive and it will boost the load
996           performance after the removal.
997         - Removal of this can fix some weird rendering defects on yahoo.com,
998           maps.google.com, news.qq.com and so on during load and rotation
999           mentioned on the PR.
1000
1001         * Api/WebPage.cpp:
1002         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
1003
1004 2012-10-17  Mike Fenton  <mifenton@rim.com>
1005
1006         [BlackBerry] Prevent focus zoom on non-userscalable pages.
1007         https://bugs.webkit.org/show_bug.cgi?id=99608
1008
1009         Reviewed by Rob Buis.
1010
1011         PR 222378.
1012
1013         Disable focus zoom when the page is non-user scalable.
1014
1015         Reviewed Internally by Nima Ghanavatian.
1016
1017         * WebKitSupport/InputHandler.cpp:
1018         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
1019
1020 2012-10-16  Mike Lattanzio  <mlattanzio@rim.com>
1021
1022         2012-10-16  Mike Lattanzio  <mlattanzio@rim.com>
1023
1024         [BlackBerry] calculateInRegionScrollableAreasForPoint should use a ReadOnly HitTest
1025         https://bugs.webkit.org/show_bug.cgi?id=99497
1026
1027         Reviewed by Antonio Gomes.
1028
1029         Fix calculateInRegionScrollableAreasForPoint to use a ReadOnly
1030         hit test to improve its performance.
1031
1032         * Api/InRegionScroller.cpp:
1033         (BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint):
1034
1035 2012-10-15  Peter Wang  <peter.wang@torchmobile.com.cn>
1036
1037         [BlackBerry] Web Inspector: Remove the useless preferences items in "inspectorBB.js"
1038         https://bugs.webkit.org/show_bug.cgi?id=99404
1039
1040         Reviewed by George Staikos.
1041
1042         In "inspectorBB.js", remove the useless preferences items to catch up the new code of frontend.
1043
1044         * WebCoreSupport/inspectorBB.js:
1045
1046 2012-10-15  Jakob Petsovits  <jpetsovits@rim.com>
1047
1048         [BlackBerry] Only reallocate buffers that were allocated before suspending
1049         https://bugs.webkit.org/show_bug.cgi?id=99205
1050         RIM PR 99395
1051
1052         Reviewed by Antonio Gomes.
1053
1054         When we call releaseBuffers(), not all of the backingstore
1055         tile buffers might have been allocated yet. Still we try
1056         to release all of them, which causes us to lazy-initialize
1057         the tile buffers so we can release them again.
1058
1059         This is stupid and we should just ignore buffers that
1060         haven't been initialized yet. This patch makes that change.
1061
1062         * WebKitSupport/BackingStoreTile.cpp:
1063         (BlackBerry::WebKit::TileBuffer::wasNativeBufferCreated):
1064         (WebKit):
1065         * WebKitSupport/BackingStoreTile.h:
1066         (TileBuffer):
1067         * WebKitSupport/SurfacePool.cpp:
1068         (BlackBerry::WebKit::SurfacePool::createBuffers):
1069         (BlackBerry::WebKit::SurfacePool::releaseBuffers):
1070
1071 2012-10-15  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1072
1073         [BlackBerry] replace BlackBerry::Platform::log() with BBLOG()
1074         https://bugs.webkit.org/show_bug.cgi?id=99302
1075
1076         Reviewed by Rob Buis.
1077
1078         RIM PR: 210884
1079         The marco BBLOG() is defined as a no-op in release mode which will
1080         save a function call in the release build.
1081         Internally reviewed by Charles Wei.
1082
1083         * Api/BackingStore.cpp:
1084         (BlackBerry::WebKit::bestDivisor):
1085         (BlackBerry::WebKit::BackingStorePrivate::suspendScreenAndBackingStoreUpdates):
1086         (BlackBerry::WebKit::BackingStorePrivate::resumeScreenAndBackingStoreUpdates):
1087         (BlackBerry::WebKit::BackingStorePrivate::repaint):
1088         (BlackBerry::WebKit::BackingStorePrivate::slowScroll):
1089         (BlackBerry::WebKit::BackingStorePrivate::scroll):
1090         (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect):
1091         (BlackBerry::WebKit::BackingStorePrivate::scrollBackingStore):
1092         (BlackBerry::WebKit::BackingStorePrivate::render):
1093         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
1094         (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion):
1095         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
1096         (BlackBerry::WebKit::BackingStorePrivate::blitToWindow):
1097         (BlackBerry::WebKit::BackingStorePrivate::fillWindow):
1098         (BlackBerry::WebKit::BackingStorePrivate::invalidateWindow):
1099         (BlackBerry::WebKit::BackingStorePrivate::clearWindow):
1100         * Api/WebPage.cpp:
1101         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
1102         (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint):
1103         (BlackBerry::WebKit::WebPagePrivate::contentsSizeChanged):
1104         (BlackBerry::WebKit::WebPagePrivate::zoomToInitialScaleOnLoad):
1105         (BlackBerry::WebKit::WebPagePrivate::scheduleRootLayerCommit):
1106         (BlackBerry::WebKit::WebPagePrivate::commitRootLayer):
1107         (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
1108         (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
1109         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1110         (WebCore::ChromeClientBlackBerry::overflowExceedsContentsSize):
1111         (WebCore::ChromeClientBlackBerry::didDiscoverFrameSet):
1112         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1113         (WebCore::FrameLoaderClientBlackBerry::dispatchDidLayout):
1114         * WebKitSupport/FatFingers.cpp:
1115         (BlackBerry::WebKit::FatFingers::checkFingerIntersection):
1116         (BlackBerry::WebKit::FatFingers::findIntersectingRegions):
1117         (BlackBerry::WebKit::FatFingers::checkForText):
1118         * WebKitSupport/RenderQueue.cpp:
1119         (BlackBerry::WebKit::RenderQueue::addToRegularQueue):
1120         (BlackBerry::WebKit::RenderQueue::addToScrollZoomQueue):
1121         (BlackBerry::WebKit::RenderQueue::render):
1122         (BlackBerry::WebKit::RenderQueue::renderAllCurrentRegularRenderJobs):
1123         (BlackBerry::WebKit::RenderQueue::startRegularRenderJobBatchIfNeeded):
1124         (BlackBerry::WebKit::RenderQueue::renderVisibleZoomJob):
1125         (BlackBerry::WebKit::RenderQueue::renderVisibleScrollJob):
1126         (BlackBerry::WebKit::RenderQueue::renderRegularRenderJob):
1127         (BlackBerry::WebKit::RenderQueue::renderNonVisibleScrollJob):
1128         * WebKitSupport/SurfacePool.cpp:
1129         (BlackBerry::WebKit::SurfacePool::initialize):
1130
1131 2012-10-15  Xiaobo Wang  <xbwang@torchmobile.com.cn>
1132
1133         [BlackBerry] [DRT] Skip region of interest zooming when running DRT
1134         https://bugs.webkit.org/show_bug.cgi?id=97663
1135
1136         Reviewed by Rob Buis.
1137
1138         This patch fixes test fast/forms/textarea-scrolled-endline-caret.html, and
1139         1. Add a global function isRunningDrt to check if we're currently running DRT.
1140         2. Use the new function in places where getenv("drtRun") is used.
1141
1142         * Api/BlackBerryGlobal.cpp:
1143         (BlackBerry::WebKit::isRunningDrt):
1144         (WebKit):
1145         * Api/BlackBerryGlobal.h:
1146         (WebKit):
1147         * Api/WebPage.cpp:
1148         (BlackBerry::WebKit::WebPagePrivate::init):
1149         * WebKitSupport/DumpRenderTreeSupport.cpp:
1150         (toGeolocationClientMock):
1151         * WebKitSupport/InputHandler.cpp:
1152         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
1153
1154 2012-10-15  George Staikos  <staikos@webkit.org>
1155
1156         [BlackBerry] Adapt to Platform API changes in string handling
1157         https://bugs.webkit.org/show_bug.cgi?id=99248
1158
1159         Reviewed by Yong Li.
1160
1161         Convert usage of WebString, char* and std::string to BlackBerry::Platform::String.
1162
1163         * Api/BlackBerryGlobal.cpp:
1164         (BlackBerry::WebKit::clearAppCache):
1165         (BlackBerry::WebKit::clearDatabase):
1166         * Api/BlackBerryGlobal.h:
1167         (Platform):
1168         (WebKit):
1169         * Api/JavaScriptVariant.cpp:
1170         (BlackBerry::WebKit::JSValueRefToBlackBerryJavaScriptVariant):
1171         (BlackBerry::WebKit::BlackBerryJavaScriptVariantToJSValueRef):
1172         (BlackBerry::WebKit::JavaScriptVariant::JavaScriptVariant):
1173         (WebKit):
1174         (BlackBerry::WebKit::JavaScriptVariant::~JavaScriptVariant):
1175         (BlackBerry::WebKit::JavaScriptVariant::setType):
1176         (BlackBerry::WebKit::JavaScriptVariant::setString):
1177         (BlackBerry::WebKit::JavaScriptVariant::stringValue):
1178         * Api/JavaScriptVariant.h:
1179         * Api/WebAnimation.cpp:
1180         (BlackBerry::WebKit::WebAnimation::fadeAnimation):
1181         (BlackBerry::WebKit::WebAnimation::name):
1182         * Api/WebAnimation.h:
1183         * Api/WebCookieJar.cpp:
1184         (BlackBerry::WebKit::WebCookieJar::cookies):
1185         (BlackBerry::WebKit::WebCookieJar::setCookies):
1186         * Api/WebCookieJar.h:
1187         (Platform):
1188         (BlackBerry):
1189         (WebKit):
1190         * Api/WebKitMIMETypeConverter.cpp:
1191         (BlackBerry::WebKit::getExtensionForMimeType):
1192         (BlackBerry::WebKit::getMimeTypeForExtension):
1193         * Api/WebKitMIMETypeConverter.h:
1194         (Platform):
1195         (BlackBerry):
1196         (WebKit):
1197         * Api/WebKitTextCodec.cpp:
1198         (BlackBerry::WebKit::base64Decode):
1199         (BlackBerry::WebKit::base64Encode):
1200         (BlackBerry::WebKit::unescapeURL):
1201         (BlackBerry::WebKit::escapeURL):
1202         * Api/WebKitTextCodec.h:
1203         (Platform):
1204         (BlackBerry):
1205         * Api/WebOverlay.cpp:
1206         (BlackBerry::WebKit::WebOverlay::removeAnimation):
1207         * Api/WebOverlay.h:
1208         (Platform):
1209         (BlackBerry):
1210         (WebKit):
1211         * Api/WebOverlayOverride.cpp:
1212         (BlackBerry::WebKit::WebOverlayOverride::removeAnimation):
1213         * Api/WebOverlayOverride.h:
1214         (Platform):
1215         (BlackBerry):
1216         (WebKit):
1217         * Api/WebPage.cpp:
1218         (BlackBerry::WebKit::WebPage::autofillTextField):
1219         (BlackBerry::WebKit::WebPage::renderTreeAsText):
1220         (BlackBerry::WebKit::WebPage::WebPage):
1221         (BlackBerry::WebKit::WebPagePrivate::init):
1222         (BlackBerry::WebKit::WebPagePrivate::load):
1223         (BlackBerry::WebKit::WebPage::load):
1224         (BlackBerry::WebKit::WebPage::loadFile):
1225         (BlackBerry::WebKit::WebPage::download):
1226         (BlackBerry::WebKit::WebPagePrivate::loadString):
1227         (BlackBerry::WebKit::WebPage::loadString):
1228         (BlackBerry::WebKit::WebPagePrivate::executeJavaScript):
1229         (BlackBerry::WebKit::WebPage::executeJavaScript):
1230         (BlackBerry::WebKit::WebPagePrivate::executeJavaScriptInIsolatedWorld):
1231         (BlackBerry::WebKit::WebPage::executeJavaScriptInIsolatedWorld):
1232         (BlackBerry::WebKit::WebPage::executeJavaScriptFunction):
1233         (BlackBerry::WebKit::WebPagePrivate::addOriginAccessWhitelistEntry):
1234         (BlackBerry::WebKit::WebPage::addOriginAccessWhitelistEntry):
1235         (BlackBerry::WebKit::WebPagePrivate::removeOriginAccessWhitelistEntry):
1236         (BlackBerry::WebKit::WebPage::removeOriginAccessWhitelistEntry):
1237         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
1238         (BlackBerry::WebKit::WebPagePrivate::syncProxyCredential):
1239         (BlackBerry::WebKit::WebPagePrivate::notifyPopupAutofillDialog):
1240         (BlackBerry::WebKit::WebPagePrivate::webContext):
1241         (BlackBerry::WebKit::WebPage::setDateTimeInput):
1242         (BlackBerry::WebKit::WebPage::setColorInput):
1243         (BlackBerry::WebKit::WebPage::textEncoding):
1244         (BlackBerry::WebKit::WebPage::forcedTextEncoding):
1245         (BlackBerry::WebKit::WebPage::setForcedTextEncoding):
1246         (BlackBerry::WebKit::WebPage::title):
1247         (BlackBerry::WebKit::WebPage::selectedText):
1248         (BlackBerry::WebKit::WebPage::cutSelectedText):
1249         (BlackBerry::WebKit::WebPage::insertText):
1250         (BlackBerry::WebKit::WebPage::getBackForwardList):
1251         (BlackBerry::WebKit::WebPage::onCertificateStoreLocationSet):
1252         (BlackBerry::WebKit::WebPage::dispatchInspectorMessage):
1253         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
1254         (BlackBerry::WebKit::WebPage::textHasAttribute):
1255         (BlackBerry::WebKit::WebPage::setAllowNotification):
1256         (BlackBerry::WebKit::WebPagePrivate::defaultUserAgent):
1257         * Api/WebPage.h:
1258         * Api/WebPageClient.h:
1259         * Api/WebPage_p.h:
1260         (WebPagePrivate):
1261         * Api/WebSettings.cpp:
1262         (BlackBerry::WebKit::WebSettings::standardSettings):
1263         (BlackBerry::WebKit::WebSettings::addSupportedObjectPluginMIMEType):
1264         (BlackBerry::WebKit::WebSettings::isSupportedObjectMIMEType):
1265         (BlackBerry::WebKit::WebSettings::serifFontFamily):
1266         (BlackBerry::WebKit::WebSettings::setSerifFontFamily):
1267         (BlackBerry::WebKit::WebSettings::fixedFontFamily):
1268         (BlackBerry::WebKit::WebSettings::setFixedFontFamily):
1269         (BlackBerry::WebKit::WebSettings::sansSerifFontFamily):
1270         (BlackBerry::WebKit::WebSettings::setSansSerifFontFamily):
1271         (BlackBerry::WebKit::WebSettings::standardFontFamily):
1272         (BlackBerry::WebKit::WebSettings::setStandardFontFamily):
1273         (BlackBerry::WebKit::WebSettings::userAgentString):
1274         (BlackBerry::WebKit::WebSettings::setUserAgentString):
1275         (BlackBerry::WebKit::WebSettings::defaultTextEncodingName):
1276         (BlackBerry::WebKit::WebSettings::setDefaultTextEncodingName):
1277         (BlackBerry::WebKit::WebSettings::userStyleSheetString):
1278         (BlackBerry::WebKit::WebSettings::setUserStyleSheetString):
1279         (BlackBerry::WebKit::WebSettings::userStyleSheetLocation):
1280         (BlackBerry::WebKit::WebSettings::setUserStyleSheetLocation):
1281         (BlackBerry::WebKit::WebSettings::localStoragePath):
1282         (BlackBerry::WebKit::WebSettings::setLocalStoragePath):
1283         (BlackBerry::WebKit::WebSettings::indexedDataBasePath):
1284         (BlackBerry::WebKit::WebSettings::setIndexedDataBasePath):
1285         (BlackBerry::WebKit::WebSettings::databasePath):
1286         (BlackBerry::WebKit::WebSettings::setDatabasePath):
1287         (BlackBerry::WebKit::WebSettings::appCachePath):
1288         (BlackBerry::WebKit::WebSettings::setAppCachePath):
1289         (BlackBerry::WebKit::WebSettings::pageGroupName):
1290         (BlackBerry::WebKit::WebSettings::setPageGroupName):
1291         * Api/WebSettings.h:
1292         * Api/WebString.cpp: Removed.
1293         * Api/WebString.h: Removed.
1294         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1295         (WebCore::ChromeClientBlackBerry::runJavaScriptPrompt):
1296         (WebCore::ChromeClientBlackBerry::createWindow):
1297         (WebCore::ChromeClientBlackBerry::runOpenPanel):
1298         (WebCore):
1299         * WebCoreSupport/ChromeClientBlackBerry.h:
1300         (ChromeClientBlackBerry):
1301         * WebCoreSupport/ClientExtension.cpp:
1302         (clientExtensionMethod):
1303         * WebCoreSupport/ColorPickerClient.cpp:
1304         (WebCore::ColorPickerClient::ColorPickerClient):
1305         (WebCore::ColorPickerClient::generateHTML):
1306         * WebCoreSupport/ColorPickerClient.h:
1307         (Platform):
1308         (BlackBerry):
1309         (WebKit):
1310         (ColorPickerClient):
1311         * WebCoreSupport/CredentialManager.cpp:
1312         (WebCore::CredentialManager::autofillAuthenticationChallenge):
1313         * WebCoreSupport/CredentialManager.h:
1314         (Platform):
1315         (CredentialManager):
1316         * WebCoreSupport/DatePickerClient.cpp:
1317         (WebCore::DatePickerClient::DatePickerClient):
1318         (WebCore::DatePickerClient::generateHTML):
1319         * WebCoreSupport/DatePickerClient.h:
1320         (Platform):
1321         (BlackBerry):
1322         (WebKit):
1323         (DatePickerClient):
1324         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1325         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForResponse):
1326         (WebCore::FrameLoaderClientBlackBerry::createDocumentLoader):
1327         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFinishLoad):
1328         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad):
1329         (WebCore::FrameLoaderClientBlackBerry::dispatchCreatePage):
1330         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendRequest):
1331         (WebCore::FrameLoaderClientBlackBerry::loadIconExternally):
1332         (WebCore::FrameLoaderClientBlackBerry::startDownload):
1333         (WebCore::FrameLoaderClientBlackBerry::dispatchDidReceiveIcon):
1334         * WebCoreSupport/IconDatabaseClientBlackBerry.cpp:
1335         * WebCoreSupport/NotificationPresenterImpl.cpp:
1336         (WebCore::NotificationPresenterImpl::show):
1337         (WebCore::NotificationPresenterImpl::cancel):
1338         (WebCore::NotificationPresenterImpl::requestPermission):
1339         (WebCore::NotificationPresenterImpl::onPermission):
1340         (WebCore::NotificationPresenterImpl::notificationClicked):
1341         * WebCoreSupport/NotificationPresenterImpl.h:
1342         (Platform):
1343         (NotificationPresenterImpl):
1344         * WebCoreSupport/SelectPopupClient.cpp:
1345         (WebCore::SelectPopupClient::SelectPopupClient):
1346         (WebCore::SelectPopupClient::update):
1347         (WebCore::SelectPopupClient::generateHTML):
1348         * WebCoreSupport/SelectPopupClient.h:
1349         (Platform):
1350         (BlackBerry):
1351         (SelectPopupClient):
1352         * WebCoreSupport/UserMediaClientImpl.cpp:
1353         (WebCore::toMediaStreamSource):
1354         (WebCore::toMediaStreamDescriptor):
1355         (WebCore::UserMediaClientImpl::requestUserMedia):
1356         (WebCore::UserMediaClientImpl::cancelUserMediaRequest):
1357         * WebKitSupport/AboutData.cpp:
1358         (BlackBerry::WebKit::cachePage):
1359         * WebKitSupport/InputHandler.cpp:
1360         (BlackBerry::WebKit::convertStringToWchar):
1361         (BlackBerry::WebKit::convertStringToWcharVector):
1362         (BlackBerry::WebKit::convertSpannableStringToString):
1363         (BlackBerry::WebKit::InputHandler::learnText):
1364         (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
1365         (BlackBerry::WebKit::InputHandler::openDatePopup):
1366         (BlackBerry::WebKit::InputHandler::openSelectPopup):
1367         (BlackBerry::WebKit::InputHandler::setText):
1368         * WebKitSupport/SelectionHandler.cpp:
1369         (BlackBerry::WebKit::SelectionHandler::selectedText):
1370         * WebKitSupport/SelectionHandler.h:
1371         (Platform):
1372         (WebKit):
1373         (SelectionHandler):
1374         * WebKitSupport/SurfacePool.cpp:
1375         (BlackBerry::WebKit::SurfacePool::sharedPixmapGroup):
1376         * WebKitSupport/SurfacePool.h:
1377         (SurfacePool):
1378
1379 2012-10-15  Antonio Gomes  <agomes@rim.com>
1380
1381         [BlackBerry] Clean up BackingStoreClient (part II)
1382         https://bugs.webkit.org/show_bug.cgi?id=99327
1383
1384         Reviewed by Yong Li.
1385
1386         Remove more unneeded BackingStoreClient <-> WebPageClient integration
1387         methods:
1388         - BackingStoreClient* backingStoreClientForFrame(...)
1389         - void addBackingStoreClientForFrame(...)
1390         - void removeBackingStoreClientForFrame(...)
1391
1392         Change places calling WPPriv::backingStoreClientForFrame to directly
1393         access WPPriv::backingStoreClient instead, since only the main frame will
1394         have a BackingStoreClient instance associated with it, and it is owned by
1395         the WKPriv.
1396
1397         Remove non-mainframe only references to BackingStoreClient completely,
1398         since it is dead code now.
1399
1400         * Api/InRegionScroller.cpp:
1401         (BlackBerry::WebKit::InRegionScrollerPrivate::setLayerScrollPosition):
1402         * Api/WebPage.cpp:
1403         (BlackBerry::WebKit::WebPagePrivate::backingStoreClient):
1404         (BlackBerry::WebKit::WebPage::destroy):
1405         * Api/WebPage_p.h:
1406         (WebPagePrivate):
1407         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1408         (WebCore::ChromeClientBlackBerry::invalidateContentsForSlowScroll):
1409         (WebCore::ChromeClientBlackBerry::scroll):
1410         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1411         (WebCore::FrameLoaderClientBlackBerry::transitionToCommittedForNewPage):
1412         (WebCore::FrameLoaderClientBlackBerry::createFrame):
1413         (WebCore::FrameLoaderClientBlackBerry::detachedFromParent2):
1414         * WebKitSupport/BackingStoreClient.cpp:
1415         (BlackBerry::WebKit::BackingStoreClient::create):
1416         (BlackBerry::WebKit::BackingStoreClient::BackingStoreClient):
1417         (BlackBerry::WebKit::BackingStoreClient::~BackingStoreClient):
1418         * WebKitSupport/BackingStoreClient.h:
1419         (BackingStoreClient):
1420         * WebKitSupport/InputHandler.cpp:
1421         (BlackBerry::WebKit::InputHandler::setBatchEditingActive):
1422
1423 2012-10-15  Antonio Gomes  <agomes@rim.com>
1424
1425         [BlackBerry] Clean up BackingStoreClient (part I)
1426         https://bugs.webkit.org/show_bug.cgi?id=99327
1427
1428         Reviewed by Yong Li.
1429
1430         Now that we won't use the BackingStoreClient code path to scroll inner frames at all
1431         (instead we use AC layers!), we can remove all "!isMainFrame" code paths.
1432
1433         No behavior change, since the code path being removed was not in use.
1434
1435         * WebKitSupport/BackingStoreClient.cpp:
1436         (BlackBerry::WebKit::BackingStoreClient::absoluteRect):
1437         (BlackBerry::WebKit::BackingStoreClient::transformedActualVisibleSize):
1438         (BlackBerry::WebKit::BackingStoreClient::viewportSize):
1439         (BlackBerry::WebKit::BackingStoreClient::transformedViewportSize):
1440         (BlackBerry::WebKit::BackingStoreClient::visibleContentsRect):
1441         (BlackBerry::WebKit::BackingStoreClient::transformedVisibleContentsRect):
1442         (BlackBerry::WebKit::BackingStoreClient::checkOriginOfCurrentScrollOperation):
1443
1444 2012-10-13  Jakob Petsovits  <jpetsovits@rim.com>
1445
1446         [BlackBerry] Fetch blit rects from a viewport accessor
1447         https://bugs.webkit.org/show_bug.cgi?id=98581
1448         RIM PR 173292
1449
1450         Reviewed by George Staikos.
1451         Internally reviewed by Arvid Nilsson.
1452
1453         The long-standing userInterfaceBlittedVisibleContentsRect()
1454         method in WebPageClient has long been a major annoyance,
1455         as it returns the source rect for WebKit contents but in
1456         backingstore pixel coordinates. This makes it not only
1457         unwieldy but also terribly fragile, especially when
1458         both pinch zoom and a backingstore re-render both deal
1459         with the same rectangle. On different threads, even.
1460
1461         BlackBerry::Platform now exposes a ViewportAccessor
1462         interface, which can be used to get the various rects
1463         in document coordinates or target pixel coordinates,
1464         both being a better choice than the ones dependent
1465         on an implentation detail.
1466
1467         This commit makes use of this new functionality.
1468         Instead of relying on the passed rectangle to contain
1469         implicit information about the scale factor, we now
1470         track the scale of each backingstore geometry by making
1471         a snapshot of the current WebKit-thread scale when the
1472         geometry is generated. Once the geometry is swapped to
1473         the front, we can then calculate the remaining
1474         backingstore-to-viewport transformation in a threadsafe
1475         way. We now only calculate this if we actually blit from
1476         backingstore tiles and don't go through a configuration
1477         of pure accelerated compositing.
1478
1479         As a result, we are now a lot more robust against
1480         synchonization issues related to backingstore
1481         geometry changes. As an additional gimmick, the scale
1482         is also stored with each tile buffer to doubly secure
1483         that a tile rendered in one scale is not transferred
1484         to a different geometry and then rendered there without
1485         being rerendered at the new scale, even if the rendered
1486         pixel coordinates are still the same.
1487
1488         Having per-geometry scale information also opens up
1489         opportunities to further improve backingstore rendering
1490         later. For instance, we could pre-render a low-res
1491         version of the page onto one buffer and combine that one
1492         with a higher-res array of tiles covering a smaller area.
1493         Or we could steal some tiles from the front geometry to
1494         render them at a new scale while a pinch-zoom operation
1495         is in progress.
1496
1497         No such thing is implemented in this patch though.
1498
1499         In adapting/fixing the backingstore visualization
1500         debug mode and the default background painting in
1501         renderDirectToWindow(), we also introduce new
1502         ViewportAccessor subclasses that can subsequently
1503         be used to replace methods from WebPage and elsewhere.
1504
1505         * Api/BackingStore.cpp:
1506         (BlackBerry::WebKit::BackingStorePrivate::slowScroll):
1507         (BlackBerry::WebKit::BackingStorePrivate::scroll):
1508         (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect):
1509         (BlackBerry::WebKit::BackingStorePrivate::scrollBackingStore):
1510         (BlackBerry::WebKit::BackingStorePrivate::renderDirectToWindow):
1511         (BlackBerry::WebKit::BackingStorePrivate::render):
1512         (BlackBerry::WebKit::BackingStorePrivate::paintDefaultBackground):
1513         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
1514         (BlackBerry::WebKit::BackingStorePrivate::blitHorizontalScrollbar):
1515         (BlackBerry::WebKit::BackingStorePrivate::blitVerticalScrollbar):
1516         (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion):
1517         (BlackBerry::WebKit::BackingStorePrivate::updateTileMatrixIfNeeded):
1518         (BlackBerry::WebKit::BackingStorePrivate::orientationChanged):
1519         (BlackBerry::WebKit::BackingStorePrivate::createSurfaces):
1520         (BlackBerry::WebKit::BackingStorePrivate::invalidateWindow):
1521         * Api/BackingStore_p.h:
1522         (BlackBerry):
1523         (Platform):
1524         (BlackBerry::WebKit::BackingStoreGeometry::BackingStoreGeometry):
1525         (BlackBerry::WebKit::BackingStoreGeometry::scale):
1526         (BlackBerry::WebKit::BackingStoreGeometry::setScale):
1527         (BackingStoreGeometry):
1528         (BackingStorePrivate):
1529         * Api/WebPage.cpp:
1530         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
1531         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
1532         (BlackBerry::WebKit::WebPagePrivate::init):
1533         (BlackBerry::WebKit::WebPage::webkitThreadViewportAccessor):
1534         (WebKit):
1535         * Api/WebPage.h:
1536         (Platform):
1537         * Api/WebPageClient.h:
1538         (Platform):
1539         * Api/WebPageCompositor.cpp:
1540         (BlackBerry::WebKit::WebPageCompositorPrivate::animationFrameChanged):
1541         * Api/WebPage_p.h:
1542         (WebKit):
1543         (WebPagePrivate):
1544         * WebKitSupport/BackingStoreTile.cpp:
1545         (BlackBerry::WebKit::TileBuffer::TileBuffer):
1546         (BlackBerry::WebKit::TileBuffer::isRendered):
1547         * WebKitSupport/BackingStoreTile.h:
1548         (TileBuffer):
1549         (BlackBerry::WebKit::TileBuffer::scale):
1550         (BlackBerry::WebKit::TileBuffer::setScale):
1551         * WebKitSupport/BackingStoreVisualizationViewportAccessor.cpp: Added.
1552         (WebKit):
1553         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::BackingStoreVisualizationViewportAccessor):
1554         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::pixelContentsSize):
1555         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::documentContentsSize):
1556         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::pixelScrollPosition):
1557         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::documentScrollPosition):
1558         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::pixelViewportSize):
1559         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::documentViewportSize):
1560         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::destinationSurfaceOffset):
1561         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::scale):
1562         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::state):
1563         * WebKitSupport/BackingStoreVisualizationViewportAccessor.h: Added.
1564         (BlackBerry):
1565         (Platform):
1566         (WebKit):
1567         (BackingStoreVisualizationViewportAccessor):
1568         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::~BackingStoreVisualizationViewportAccessor):
1569         * WebKitSupport/WebKitThreadViewportAccessor.cpp: Added.
1570         (WebKit):
1571         (BlackBerry::WebKit::WebKitThreadViewportAccessor::WebKitThreadViewportAccessor):
1572         (BlackBerry::WebKit::WebKitThreadViewportAccessor::pixelContentsSize):
1573         (BlackBerry::WebKit::WebKitThreadViewportAccessor::documentContentsSize):
1574         (BlackBerry::WebKit::WebKitThreadViewportAccessor::pixelScrollPosition):
1575         (BlackBerry::WebKit::WebKitThreadViewportAccessor::documentScrollPosition):
1576         (BlackBerry::WebKit::WebKitThreadViewportAccessor::pixelViewportSize):
1577         (BlackBerry::WebKit::WebKitThreadViewportAccessor::documentViewportSize):
1578         (BlackBerry::WebKit::WebKitThreadViewportAccessor::destinationSurfaceOffset):
1579         (BlackBerry::WebKit::WebKitThreadViewportAccessor::scale):
1580         * WebKitSupport/WebKitThreadViewportAccessor.h: Added.
1581         (BlackBerry):
1582         (Platform):
1583         (WebKit):
1584         (WebKitThreadViewportAccessor):
1585         (BlackBerry::WebKit::WebKitThreadViewportAccessor::~WebKitThreadViewportAccessor):
1586
1587 2012-10-11  Peter Wang  <peter.wang@torchmobile.com.cn>
1588
1589         [BlackBerry] Paused in Inspector, Browser doesn't exit cleanly
1590         https://bugs.webkit.org/show_bug.cgi?id=97962
1591
1592         Reviewed by George Staikos.
1593
1594         Before destroying webpage, close the inspector, so if the JSC is paused it will be resumed.
1595
1596         * Api/WebPage.cpp:
1597         (BlackBerry::WebKit::WebPage::destroy):
1598
1599 2012-10-11  Konrad Piascik  <kpiascik@rim.com>
1600
1601         Web Inspector: node search does not work with elements on touch start listener
1602         https://bugs.webkit.org/show_bug.cgi?id=95252
1603
1604         Reviewed by Pavel Feldman.
1605
1606         Removed calls to InspectorInstrumentation that no didn't work anyway.
1607
1608         * Api/WebPage.cpp:
1609         (BlackBerry::WebKit::WebPage::touchEvent):
1610
1611 2012-10-11  Chris Guan  <chris.guan@torchmobile.com.cn>
1612
1613         [Blackberry] makes NavigatorContentUtils work
1614         https://bugs.webkit.org/show_bug.cgi?id=99022
1615
1616         Reviewed by Rob Buis.
1617
1618         Because r126735 renamed RegisterProtocolHandler API to NavigatorContentUtils and 
1619         r122810 added RegisterProtocolHandlerClient to the Modules/protocolhandler,
1620         we need sync up code:
1621         1. Add NavigatorContentUtilsClientBlackBerry class.
1622         2. use new API provideNavigatorContentUtilsTo.
1623
1624         No new tests. Covered by existing tests.
1625
1626         * Api/WebPage.cpp:
1627         (BlackBerry::WebKit::WebPagePrivate::init):
1628         * WebCoreSupport/NavigatorContentUtilsClientBlackBerry.cpp: Added.
1629         (WebCore):
1630         (WebCore::NavigatorContentUtilsClientBlackBerry::NavigatorContentUtilsClientBlackBerry):
1631         (WebCore::NavigatorContentUtilsClientBlackBerry::registerProtocolHandler):
1632         (WebCore::NavigatorContentUtilsClientBlackBerry::isProtocolHandlerRegistered):
1633         (WebCore::NavigatorContentUtilsClientBlackBerry::unregisterProtocolHandler):
1634         * WebCoreSupport/NavigatorContentUtilsClientBlackBerry.h: Added.
1635         (WebKit):
1636         (NavigatorContentUtilsClientBlackBerry):
1637         (WebCore::NavigatorContentUtilsClientBlackBerry::~NavigatorContentUtilsClientBlackBerry):
1638
1639 2012-10-10  Lianghui Chen  <liachen@rim.com>
1640
1641         [BlackBerry] Fix assertion in NetworkJob::notifyChallengeResult.
1642         https://bugs.webkit.org/show_bug.cgi?id=97397
1643         Internal PR: 186597.
1644
1645         Internally reviewed by Yong Li, Joe Mason.
1646         Reviewed by George Staikos.
1647
1648         Update WebPage to use new AuthenticationChallengeManager.
1649         Register page creation/deletion and visibility change to the new
1650             AuthenticationChallengeManager.
1651         Initialize AuthenticationChallengeManager in GlobalInitialize() function.
1652
1653         * Api/BlackBerryGlobal.cpp:
1654         (BlackBerry::WebKit::globalInitialize):
1655         * Api/WebPage.cpp:
1656         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
1657         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
1658         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
1659         (BlackBerry::WebKit::WebPage::setVisible):
1660         * Api/WebPage_p.h:
1661         (WebPagePrivate):
1662
1663 2012-10-10  Andrew Lo  <anlo@rim.com>
1664
1665         [BlackBerry] Do not perform backing store blit for animations during one-shot drawing synchronization
1666         https://bugs.webkit.org/show_bug.cgi?id=98944
1667
1668         Reviewed by Rob Buis.
1669
1670         Internally reviewed by: Arvid Nilsson.
1671         Internal PR 220014
1672         Prevent animations from causing a backing store blit during a
1673         one-shot drawing synchronization.
1674
1675         * Api/WebPageCompositor.cpp:
1676         (BlackBerry::WebKit::WebPageCompositorPrivate::animationFrameChanged):
1677
1678 2012-10-10  Mike Fenton  <mifenton@rim.com>
1679
1680         [BlackBerry] Fix crash for detached node when validating selection change.
1681         https://bugs.webkit.org/show_bug.cgi?id=98926
1682
1683         Reviewed by Rob Buis.
1684
1685         PR 220628.
1686
1687         Guard against detached nodes when generating selection rect.
1688
1689         * WebKitSupport/DOMSupport.cpp:
1690         (BlackBerry::WebKit::DOMSupport::visibleTextQuads):
1691
1692 2012-10-10  Mike Fenton  <mifenton@rim.com>
1693
1694         [BlackBerry] Adjust spell checking location to update after the cursor position is set.
1695         https://bugs.webkit.org/show_bug.cgi?id=98904
1696
1697         Reviewed by Rob Buis.
1698
1699         PR 215172.
1700
1701         Delay calculation of caret position until it is updated on mouse release
1702         handling.
1703
1704         Reviewed Internally by Nima Ghanavatian.
1705
1706         * WebKitSupport/InputHandler.cpp:
1707         (BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint):
1708         (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions):
1709
1710 2012-10-10  Mike Fenton  <mifenton@rim.com>
1711
1712         [BlackBerry] Suppress keyboard requests while processing spell checking suggestions unless focus change is occurring..
1713         https://bugs.webkit.org/show_bug.cgi?id=98903
1714
1715         Reviewed by Rob Buis.
1716
1717         PR 221143.
1718
1719         Suppress keyboard state changes when they are not triggered by
1720         focus changes.
1721
1722         Reviewed Internally by Nima Ghanavatian.
1723
1724         * WebKitSupport/InputHandler.cpp:
1725         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
1726         (BlackBerry::WebKit::InputHandler::setElementFocused):
1727         (BlackBerry::WebKit::InputHandler::notifyClientOfKeyboardVisibilityChange):
1728         * WebKitSupport/InputHandler.h:
1729
1730 2012-10-09  Rob Buis  <rbuis@rim.com>
1731
1732         [BlackBerry] Cleanup FatFingers.cpp
1733         https://bugs.webkit.org/show_bug.cgi?id=98806
1734
1735         Reviewed by Antonio Gomes.
1736
1737         Cleanup namespace usage and sync up FatFingers.cpp.
1738
1739         * WebKitSupport/FatFingers.cpp:
1740         (BlackBerry::WebKit::compareDistanceBetweenPoints):
1741         (BlackBerry::WebKit::FatFingers::findBestPoint):
1742         (BlackBerry::WebKit::FatFingers::checkFingerIntersection):
1743         (BlackBerry::WebKit::FatFingers::findIntersectingRegions):
1744         (BlackBerry::WebKit::FatFingers::checkForClickableElement):
1745         (BlackBerry::WebKit::FatFingers::checkForText):
1746         (BlackBerry::WebKit::FatFingers::getNodesFromRect):
1747         (BlackBerry::WebKit::FatFingers::getRelevantInfoFromPoint):
1748
1749 2012-10-09  Antonio Gomes  <agomes@rim.com>
1750
1751         Get rid of FIXED_POSITION_CREATES_STACKING_CONTEXT in favor of Settings::fixedPositionCreatesStackingContext()
1752         https://bugs.webkit.org/show_bug.cgi?id=98756
1753
1754         Reviewed by Rob Buis.
1755
1756         * Api/WebPage.cpp:
1757         (BlackBerry::WebKit::WebPagePrivate::init):
1758
1759 2012-10-09  Charles Wei  <charles.wei@torchmobile.com.cn>
1760
1761         [BlackBerry] Need API to control the DNS Prefetching
1762         https://bugs.webkit.org/show_bug.cgi?id=98713
1763
1764         Reviewed by George Staikos.
1765
1766         * Api/WebPage.cpp:
1767         (BlackBerry::WebKit::WebPagePrivate::init):
1768         (BlackBerry::WebKit::WebPage::enableDNSPrefetch):
1769         (WebKit):
1770         (BlackBerry::WebKit::WebPage::disableDNSPrefetch):
1771         (BlackBerry::WebKit::WebPage::isDNSPrefetchEnabled):
1772         * Api/WebPage.h:
1773
1774 2012-10-07  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1775
1776         Rename first/second to key/value in HashMap iterators
1777         https://bugs.webkit.org/show_bug.cgi?id=82784
1778
1779         Reviewed by Eric Seidel.
1780
1781         * Api/BackingStore.cpp:
1782         (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect):
1783         (BlackBerry::WebKit::BackingStorePrivate::visibleTilesRect):
1784         (BlackBerry::WebKit::BackingStorePrivate::resetTiles):
1785         (BlackBerry::WebKit::BackingStorePrivate::updateTiles):
1786         (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion):
1787         (BlackBerry::WebKit::BackingStorePrivate::mapFromTransformedContentsToTiles):
1788         * WebCoreSupport/NotificationPresenterImpl.cpp:
1789         (WebCore::NotificationPresenterImpl::cancel):
1790         (WebCore::NotificationPresenterImpl::onPermission):
1791         (WebCore::NotificationPresenterImpl::notificationClicked):
1792         * WebCoreSupport/UserMediaClientImpl.cpp:
1793         (WebCore::UserMediaClientImpl::cancelUserMediaRequest):
1794         * WebKitSupport/AboutData.cpp:
1795         (BlackBerry::WebKit::dumpJSCTypeCountSetToTableHTML):
1796         * WebKitSupport/FrameLayers.cpp:
1797         (BlackBerry::WebKit::FrameLayers::removeLayerByFrame):
1798         (BlackBerry::WebKit::FrameLayers::commitOnWebKitThread):
1799         (BlackBerry::WebKit::FrameLayers::calculateRootLayer):
1800
1801 2012-10-05  Rob Buis  <rbuis@rim.com>
1802
1803         [BlackBerry] Implement TestRunner.setMockDeviceOrientation
1804         https://bugs.webkit.org/show_bug.cgi?id=98542
1805
1806         Reviewed by Antonio Gomes.
1807
1808         PR 120681
1809
1810         Provide framework for mock device motion.
1811
1812         * Api/WebPage.cpp:
1813         (BlackBerry::WebKit::WebPagePrivate::init):
1814         * WebKitSupport/DumpRenderTreeSupport.cpp:
1815         (toDeviceOrientationClientMock):
1816         (DumpRenderTreeSupport::setMockDeviceOrientation):
1817         * WebKitSupport/DumpRenderTreeSupport.h:
1818         (DumpRenderTreeSupport):
1819
1820 2012-10-05  Konrad Piascik  <kpiascik@rim.com>
1821
1822         [BlackBerry] Remove unnecessary html file.
1823         https://bugs.webkit.org/show_bug.cgi?id=98531
1824
1825         Reviewed by Yong Li.
1826
1827         We now just use Source/WebCore/inspector/front-end/inspector.html
1828         instead.
1829
1830         * WebCoreSupport/inspectorBB.html: Removed.
1831
1832 2012-10-05  Antonio Gomes  <agomes@rim.com>
1833
1834         [BlackBerry] Find a proper fix for the WebPagePrivate::enqueueRenderingOfClippedContentOfScrollableNodeAfterInRegionScrolling hack
1835         https://bugs.webkit.org/show_bug.cgi?id=98517
1836         PR #137382
1837
1838         Reviewed by Yong Li.
1839
1840         We've generalized composited in-region scrolling, originally only applicable
1841         to block elements, to inner frames (see PR #197093). Past that, we no longer
1842         need to force repaints of offscreen areas when we finish scrolling, since translating
1843         the Layer takes care of properly invalidating it. Thus, remove this method.
1844
1845         * Api/WebPage.cpp:
1846         (BlackBerry::WebKit::WebPagePrivate::notifyInRegionScrollStopped):
1847         * Api/WebPage_p.h:
1848         (WebPagePrivate):
1849
1850 2012-10-05  Mike Fenton  <mifenton@rim.com>
1851
1852         [BlackBerry] Update default input support style for single line inputs.
1853         https://bugs.webkit.org/show_bug.cgi?id=98510
1854
1855         Reviewed by Antonio Gomes.
1856
1857         PR 219588.
1858
1859         Update style calculations to eliminate automatic changes
1860         by default on single line input fields.
1861
1862         Reviewed Internally by Gen Mak.
1863
1864         * WebKitSupport/InputHandler.cpp:
1865         (BlackBerry::WebKit::inputStyle):
1866
1867 2012-10-04  Simon Fraser  <simon.fraser@apple.com>
1868
1869         Final part of "sync" to "flush" renaming
1870         https://bugs.webkit.org/show_bug.cgi?id=98430
1871
1872         Reviewed by Tim Horton.
1873
1874         Change method names on GraphicsLayer and GraphicsLayerClient that
1875         refer to "sync" to use the term "flush" instead, to be consistent
1876         with the rest of the code.
1877
1878         * Api/WebOverlay.cpp:
1879         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::notifyFlushRequired):
1880         * Api/WebOverlay_p.h:
1881         (WebOverlayPrivateWebKitThread):
1882         * Api/WebPage.cpp:
1883         (BlackBerry::WebKit::WebPagePrivate::notifyFlushRequired):
1884         * Api/WebPage_p.h:
1885         (WebPagePrivate):
1886         * WebKitSupport/DefaultTapHighlight.cpp:
1887         (BlackBerry::WebKit::DefaultTapHighlight::notifyFlushRequired):
1888         * WebKitSupport/DefaultTapHighlight.h:
1889         (DefaultTapHighlight):
1890         * WebKitSupport/InspectorOverlayBlackBerry.cpp:
1891         (BlackBerry::WebKit::InspectorOverlay::notifyFlushRequired):
1892         * WebKitSupport/InspectorOverlayBlackBerry.h:
1893         (InspectorOverlay):
1894         * WebKitSupport/SelectionOverlay.cpp:
1895         (BlackBerry::WebKit::SelectionOverlay::notifyFlushRequired):
1896         * WebKitSupport/SelectionOverlay.h:
1897         (SelectionOverlay):
1898
1899 2012-10-04  Simon Fraser  <simon.fraser@apple.com>
1900
1901         Standardize on "flush" terminology for compositing layer flushing/syncing
1902         https://bugs.webkit.org/show_bug.cgi?id=98321
1903
1904         Reviewed by Simon Fraser.
1905
1906         Rename compositing-related methods that refer to "syncing" to instead
1907         refer to "flushing".
1908
1909         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1910         (WebCore::ChromeClientBlackBerry::scheduleCompositingLayerFlush):
1911         * WebCoreSupport/ChromeClientBlackBerry.h:
1912         (ChromeClientBlackBerry):
1913
1914 2012-10-03  Antonio Gomes  <agomes@rim.com>
1915
1916         [BlackBerry] Exiting fullscreen does not set the correct scroll position (Part II)
1917         https://bugs.webkit.org/show_bug.cgi?id=97917
1918         PR #212920
1919
1920         Reviewed by Yong Li.
1921         Internally reviewed by Jacky Jiang.
1922
1923         Inform the client of transform change so that we avoid
1924         getting stuck on overscroll.
1925
1926         * Api/WebPage.cpp:
1927         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
1928
1929 2012-10-03  Otto Derek Cheung  <otcheung@rim.com>
1930
1931         [BlackBerry] Implementing the NetworkInfo API for BB port
1932         https://bugs.webkit.org/show_bug.cgi?id=98273
1933
1934         Reviewed by Rob Buis.
1935
1936         Adding new class NetworkInfoClientBlackBerry to implement
1937         NetworkInfoClient for the BlackBerry port.
1938
1939         * Api/WebPage.cpp:
1940         (BlackBerry::WebKit::WebPagePrivate::init):
1941         * WebCoreSupport/NetworkInfoClientBlackBerry.cpp: Added.
1942         (WebCore):
1943         (WebCore::NetworkInfoClientBlackBerry::NetworkInfoClientBlackBerry):
1944         (WebCore::NetworkInfoClientBlackBerry::startUpdating):
1945         (WebCore::NetworkInfoClientBlackBerry::stopUpdating):
1946         (WebCore::NetworkInfoClientBlackBerry::bandwidth):
1947         (WebCore::NetworkInfoClientBlackBerry::metered):
1948         (WebCore::NetworkInfoClientBlackBerry::onCurrentNetworkChange):
1949         (WebCore::NetworkInfoClientBlackBerry::onCurrentCellularTypeChange):
1950         * WebCoreSupport/NetworkInfoClientBlackBerry.h: Added.
1951         (WebKit):
1952         (WebCore):
1953         (NetworkInfoClientBlackBerry):
1954         (WebCore::NetworkInfoClientBlackBerry::~NetworkInfoClientBlackBerry):
1955
1956 2012-10-02  Anders Carlsson  <andersca@apple.com>
1957
1958         Change most GraphicsLayer::create calls to use the version that takes a GraphicsLayerFactory
1959         https://bugs.webkit.org/show_bug.cgi?id=98217
1960
1961         Reviewed by Andreas Kling.
1962
1963         * Api/WebPage.cpp:
1964         (BlackBerry::WebKit::WebPagePrivate::overlayLayer):
1965
1966 2012-10-02  Yong Li  <yoli@rim.com>
1967
1968         [BlackBerry] Prevent window.close() from closing pages that are not opened by JS
1969         https://bugs.webkit.org/show_bug.cgi?id=98190
1970
1971         Reviewed by Antonio Gomes.
1972
1973         RIM PR# 217812.
1974         Only pages opened by JS can be closed by JS.
1975
1976         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1977         (WebCore::ChromeClientBlackBerry::closeWindowSoon):
1978
1979 2012-10-01  Brady Eidson  <beidson@apple.com>
1980
1981         Remove the Safari 2 -> Safari 3 icon database import code.
1982         https://bugs.webkit.org/show_bug.cgi?id=98113
1983
1984         Reviewed by Maciej Stachowiak.
1985
1986         Nuke the performImport() IconDatabaseClient method.
1987
1988         * WebCoreSupport/IconDatabaseClientBlackBerry.cpp:
1989         * WebCoreSupport/IconDatabaseClientBlackBerry.h:
1990         (IconDatabaseClientBlackBerry):
1991
1992 2012-10-01  Jakob Petsovits  <jpetsovits@rim.com>
1993
1994         [BlackBerry] Remove unused hasPendingScrollOrZoomEvent() interface.
1995         https://bugs.webkit.org/show_bug.cgi?id=98107
1996         RIM PR 173292
1997
1998         Reviewed by George Staikos.
1999
2000         This method is not referenced anywhere anymore,
2001         so we should stop requiring it from WebPageClient
2002         implementations.
2003
2004         * Api/WebPageClient.h:
2005
2006 2012-10-01  Mike Fenton  <mifenton@rim.com>
2007
2008         [BlackBerry] Remove suppressing of VKB hiding when processing changes.
2009         https://bugs.webkit.org/show_bug.cgi?id=98023
2010
2011         Reviewed by Rob Buis.
2012
2013         PR 215881.
2014
2015         Allow JS to blur the input field while processing key handling.
2016
2017         Reviewed Internally by Chris Hutten-Czapski
2018
2019         * WebKitSupport/InputHandler.cpp:
2020         (BlackBerry::WebKit::InputHandler::notifyClientOfKeyboardVisibilityChange):
2021
2022 2012-09-28  Konrad Piascik  <kpiascik@rim.com>
2023
2024         [BlackBerry] Update the value of window.devicePixelRation when it is set programmatically
2025         https://bugs.webkit.org/show_bug.cgi?id=97512
2026
2027         Reviewed by Rob Buis.
2028
2029         RIM PR 213984
2030         Set the deviceScaleFactor of the page explicity when the
2031         devicePixelRatio is changed.
2032
2033         * Api/WebPage.cpp:
2034         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
2035         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
2036
2037 2012-09-28  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2038
2039         Code inside FrameLoaderClient::canShowMIMEType() implementations can be shared among different WK ports
2040         https://bugs.webkit.org/show_bug.cgi?id=97547
2041
2042         Reviewed by Adam Barth.
2043
2044         Newly added WebCore::MIMETypeRegistry::canShowMIMEType() function is used
2045         inside WebCore::FrameLoaderClientBlackBerry::canShowMIMEType().
2046
2047         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2048         (WebCore::FrameLoaderClientBlackBerry::canShowMIMEType):
2049
2050 2012-09-28  Rob Buis  <rbuis@rim.com>
2051
2052         [BlackBerry] Hard to tap on x to clear a text field
2053         https://bugs.webkit.org/show_bug.cgi?id=97923
2054
2055         Reviewed by Antonio Gomes.
2056
2057         Allow the shadow element for 'X' to be clickable and do not prefer
2058         shadow content-editable div's over the 'X'.
2059
2060         * WebKitSupport/FatFingers.cpp:
2061         (BlackBerry::WebKit::FatFingers::isElementClickable):
2062
2063 2012-09-28  Antonio Gomes  <agomes@rim.com>
2064
2065         [BlackBerry] Extend composited  in-region scrolling to iframes/frames
2066         https://bugs.webkit.org/show_bug.cgi?id=97922
2067         PR #197093
2068
2069         Reviewed by Yong Li.
2070         Internaly reviewed by Arvid Nilsson.
2071
2072         Add support for composited scrolling in a inner frame level:
2073
2074         1) When creating an InRegionScrollableArea, for a inner scrollable frame,
2075         cache and camouflag the appropriated scroll layer (i.e. RenderLayerCompositor::scrollLayer);
2076
2077         2) Differentiate what type of scroll target we are at: BlockElement or
2078         InnerFrame;
2079
2080         3) Change the signature of the public methods to support and newly passed
2081         in ScrollTarget parameter;
2082         As a side note, this parameter is needed in order to know what class to static_cast
2083         the GraphicsLayer::client to: in the case of a composited scrollable inner frame, the client
2084         is a RenderLayerCompositor; in case of a composited scrollable block element, the client
2085         is a RenderLayerBacking.
2086
2087         * Api/InRegionScroller.cpp:
2088         (BlackBerry::WebKit::InRegionScroller::setScrollPositionWebKitThread):
2089         (BlackBerry::WebKit::InRegionScrollerPrivate::setScrollPositionWebKitThread):
2090         * Api/InRegionScroller.h:
2091         * Api/InRegionScroller_p.h:
2092         (InRegionScrollerPrivate):
2093         * WebCoreSupport/ChromeClientBlackBerry.h:
2094         (WebCore::ChromeClientBlackBerry::allowedCompositingTriggers):
2095         * WebKitSupport/InRegionScrollableArea.cpp:
2096         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
2097
2098 2012-09-28  Antonio Gomes  <agomes@rim.com>
2099
2100         [BlackBerry] Exiting fullscreen does not set the correct scroll position
2101         https://bugs.webkit.org/show_bug.cgi?id=97917
2102         PR #212920
2103
2104         Reviewed by Yong Li.
2105         Internally reviewed by Jacky Jiang.
2106
2107         Restore the zoom level and scroll position at the time when know
2108         the fullscreen exit routine has ended (i.e. in ::setViewportSize
2109         instead of ::exitFullScreenForElement).
2110
2111         Also patch caches now the scroll position instead of only the
2112         "x scroll position.
2113
2114         * Api/WebPage.cpp:
2115         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
2116         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
2117         (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
2118         (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
2119         * Api/WebPage_p.h:
2120         (WebPagePrivate):
2121
2122 2012-09-28  Kent Tamura  <tkent@chromium.org>
2123
2124         Clean up Localizer-related functions
2125         https://bugs.webkit.org/show_bug.cgi?id=97899
2126
2127         Reviewed by Kentaro Hara.
2128
2129         * WebCoreSupport/ColorPickerClient.cpp:
2130         (WebCore::ColorPickerClient::localizer): Follow Document::getLocalizer renaming.
2131         * WebCoreSupport/DatePickerClient.cpp:
2132         (WebCore::SelectPopupClient::localizer): ditto.
2133         * WebCoreSupport/SelectPopupClient.cpp:
2134         (WebCore::SelectPopupClient::localizer): ditto.
2135
2136 2012-09-28  Genevieve Mak  <gmak@rim.com>
2137
2138         [BLACKBERRY] Add isVisible method to WebTapHighlight
2139         https://bugs.webkit.org/show_bug.cgi?id=97915
2140
2141         Reviewed by Rob Buis.
2142
2143         Reviewed Internally By Andrew Lo
2144         The isVisible() method lets us avoid dispatching to the webkit thread
2145         if the tap highlight isn't visible.
2146         Always clear tap highlight on Touch up when converting Touch Events
2147         to Mouse Events.
2148
2149         * Api/WebTapHighlight.h:
2150         * WebKitSupport/DefaultTapHighlight.h:
2151         (BlackBerry::WebKit::DefaultTapHighlight::isVisible):
2152         * WebKitSupport/TouchEventHandler.cpp:
2153         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
2154
2155 2012-09-28  Andrew Lo  <anlo@rim.com>
2156
2157         [BlackBerry] Should suspend page's scripted animations when WebPage is invisible
2158         https://bugs.webkit.org/show_bug.cgi?id=97856
2159
2160         Reviewed by Antonio Gomes.
2161
2162         Suspend page animations when setting WebPage invisible, resume when visible.
2163         Internal PR212788.
2164
2165         * Api/WebPage.cpp:
2166         (BlackBerry::WebKit::WebPagePrivate::setVisible):
2167
2168 2012-09-28  Arvid Nilsson  <anilsson@rim.com>
2169
2170         [BlackBerry] Destroy thread-specific data for Platform::Graphics::Buffer on the right thread
2171         https://bugs.webkit.org/show_bug.cgi?id=97674
2172
2173         Reviewed by Rob Buis.
2174
2175         A new API was added to BlackBerry::Platform::Graphics for destroying
2176         thread-specific data generated on the compositing thread when we blit
2177         buffers. The buffers are otherwise created and destroyed on the WebKit
2178         thread, which doesn't give platform any opportunity to destroy the
2179         thread-specific data.
2180
2181         This patch adds calls to the new API to avoid leaking resources.
2182
2183         Reviewed internally by Jakob Petsovits and Filip Spacek.
2184
2185         PR 214644
2186
2187         * WebKitSupport/SurfacePool.cpp:
2188         (BlackBerry::WebKit::SurfacePool::initialize):
2189         (BlackBerry::WebKit::SurfacePool::createPlatformGraphicsContext):
2190         (BlackBerry::WebKit::SurfacePool::lockTileRenderingSurface):
2191         (BlackBerry::WebKit::SurfacePool::releaseTileRenderingSurface):
2192         (BlackBerry::WebKit::SurfacePool::initializeVisibleTileBuffer):
2193         (BlackBerry::WebKit::SurfacePool::createBuffers):
2194         (BlackBerry::WebKit::SurfacePool::releaseBuffers):
2195
2196 2012-09-27  Kent Tamura  <tkent@chromium.org>
2197
2198         Use Localizer in PagePopupController
2199         https://bugs.webkit.org/show_bug.cgi?id=97862
2200
2201         Reviewed by Hajime Morita.
2202
2203         We need to implement PagePopupClient::localizer. These clients know the
2204         host elements. Localizer implementations get Localizer objects from the
2205         owner documents of the elements for the browser locale.
2206
2207         * WebCoreSupport/ColorPickerClient.cpp:
2208         (WebCore::ColorPickerClient::localizer): Added.
2209         * WebCoreSupport/ColorPickerClient.h:
2210         (ColorPickerClient): Declare "localizer."
2211         * WebCoreSupport/DatePickerClient.cpp:
2212         (WebCore::SelectPopupClient::localizer): Added.
2213         * WebCoreSupport/DatePickerClient.h:
2214         (DatePickerClient): Declare "localizer."
2215         * WebCoreSupport/SelectPopupClient.cpp:
2216         (WebCore::SelectPopupClient::localizer): Added.
2217         * WebCoreSupport/SelectPopupClient.h:
2218         (SelectPopupClient): Declare "localizer."
2219
2220 2012-09-27  Charles Wei  <charles.wei@torchmobile.com.cn>
2221
2222         Empty URL gets through to acceptNavigationRequest()
2223         https://bugs.webkit.org/show_bug.cgi?id=97076
2224
2225         Reviewed by George Staikos.
2226
2227         Invalid URLs in iframe src results in an empty URL in platform request, we should reject
2228         such URL as early as we identify it.
2229
2230         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2231         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction):
2232
2233 2012-09-26  Jakob Petsovits  <jpetsovits@rim.com>
2234
2235         [BlackBerry] Remove blitContents() in favor of blitVisibleContents().
2236         https://bugs.webkit.org/show_bug.cgi?id=97718
2237
2238         Reviewed by Antonio Gomes.
2239
2240         After the last calling sites of blitContents() have
2241         been removed or reworked, the actual method itself
2242         can now retire. All blits now go through
2243         blitVisibleContents(). The knowledge that we always
2244         blit the full visible surface can facilitate further
2245         optimizations; we will get to that in time.
2246
2247         * Api/BackingStore.cpp:
2248         (BlackBerry::WebKit::BackingStorePrivate::suspendScreenAndBackingStoreUpdates):
2249         (BlackBerry::WebKit::BackingStorePrivate::resumeScreenAndBackingStoreUpdates):
2250         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
2251         * Api/BackingStore.h:
2252         * Api/BackingStore_p.h:
2253         (BackingStorePrivate):
2254         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2255         (WebCore::FrameLoaderClientBlackBerry::transitionToCommittedForNewPage):
2256
2257 2012-09-26  Mike Fenton  <mifenton@rim.com>
2258
2259         [BlackBerry] Update padding in ensureFocusTextElementVisible to be DPI independent.
2260         https://bugs.webkit.org/show_bug.cgi?id=97684
2261
2262         Reviewed by Rob Buis.
2263
2264         Update padding in ensureFocusTextElementVisible to be DPI
2265         independent and relative to the current zoom level.
2266
2267         Reviewed Internally by Gen Mak.
2268
2269         * WebKitSupport/InputHandler.cpp:
2270         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
2271
2272 2012-09-25  Genevieve Mak  <gmak@rim.com>
2273
2274         Fat Fingers doesn't work on non-scrollable pages.
2275         PR #209609
2276         https://bugs.webkit.org/show_bug.cgi?id=97607
2277
2278         Reviewed by Antonio Gomes.
2279
2280         Only bypass Fat Fingers and use the actual touch point if its specifically
2281         requested and the page has a mouse move listener or if using the Touch Event
2282         Mode meta-tag.
2283
2284         * WebKitSupport/TouchEventHandler.cpp:
2285         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
2286
2287 2012-09-25  Rob Buis  <rbuis@rim.com>
2288
2289         [BlackBerry] Make COMPUTED_GOTO part of the HAVE section
2290         https://bugs.webkit.org/show_bug.cgi?id=97600
2291
2292         Reviewed by Yong Li.
2293
2294         Also get rid of COMPUTED_GOTO_INTERPRETER and add COMPUTED_GOTO_OPCODES.
2295
2296         * WebCoreSupport/AboutDataEnableFeatures.in:
2297         * WebCoreSupport/AboutDataHaveFeatures.in:
2298
2299 2012-09-25  Mike Fenton  <mifenton@rim.com>
2300
2301         [BlackBerry] Suspend the backingstore while adjusting the view on input field focus.
2302         https://bugs.webkit.org/show_bug.cgi?id=97595
2303
2304         Reviewed by Antonio Gomes.
2305
2306         PR 188751.
2307
2308         Avoid jumpiness when both a scroll and zoom are required to
2309         move an input field into focus by suspending the backingstore.
2310
2311         * WebKitSupport/InputHandler.cpp:
2312         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
2313
2314 2012-09-25  Pratik Solanki  <psolanki@apple.com>
2315
2316         Remove HAVE_SBRK since we never set use_sbrk to true
2317         https://bugs.webkit.org/show_bug.cgi?id=97525
2318         <rdar://problem/12363601>
2319
2320         Reviewed by Geoffrey Garen.
2321
2322         * WebCoreSupport/AboutDataHaveFeatures.in: Remove SBRK from list.
2323
2324 2012-09-25  Beth Dakin  <bdakin@apple.com>
2325
2326         https://bugs.webkit.org/show_bug.cgi?id=95397
2327         Need to merge didFirstVisuallyNonEmptyLayout and 
2328         didNewFirstVisuallyNonEmptyLayout
2329         -and corresponding-
2330         <rdar://problem/10791680>
2331
2332         Reviewed by Sam Weinig.
2333
2334         Remove dispatchDidFirstLayout, 
2335         dispatchDidFirstVisuallyNonEmptyLayout, and 
2336         dispatchDidNewFirstVisuallyNonEmptyLayout. Their functionality 
2337         is now replaced by dispatchDidLayout(LayoutMilestoneOptions)
2338         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2339         (WebCore::FrameLoaderClientBlackBerry::dispatchDidLayout):
2340         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
2341         (FrameLoaderClientBlackBerry):
2342
2343         It is now necessary to opt into getting any of the 
2344         "layout milestone" notifications.
2345         * Api/WebPage.cpp:
2346         (BlackBerry::WebKit::WebPagePrivate::init):
2347
2348 2012-09-25  Mike Fenton  <mifenton@rim.com>
2349
2350         [BlackBerry] When zooming into an input field take the current zoom level into account.
2351         https://bugs.webkit.org/show_bug.cgi?id=97594
2352
2353         Reviewed by Antonio Gomes.
2354
2355         PR 188751.
2356
2357         Perform the zoom action prior to scroll to avoid breaking scrolling
2358         rules.  Take the current scale into account when calculating the
2359         zoom factor.
2360
2361         * WebKitSupport/InputHandler.cpp:
2362         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
2363
2364 2012-09-25  Nima Ghanavatian  <nghanavatian@rim.com>
2365
2366         [BlackBerry] Handling required for multiple consecutive whitespace
2367         https://bugs.webkit.org/show_bug.cgi?id=97575
2368
2369         Reviewed by Rob Buis.
2370
2371         PR211670
2372         Need specific handling in the case where we have multiple
2373         consecutive whitespaces which exceeds our character limit. This
2374         breaks some of the functionality employed with the visible_units
2375         methods used here to tranverse the text.
2376
2377         Internally reviewed by Mike Fenton.
2378
2379         * WebKitSupport/DOMSupport.cpp:
2380         (BlackBerry::WebKit::DOMSupport::trimWhitespaceFromRange):
2381         (DOMSupport):
2382         (BlackBerry::WebKit::DOMSupport::isEmptyRangeOrAllSpaces):
2383         * WebKitSupport/DOMSupport.h:
2384         (WebCore):
2385         * WebKitSupport/InputHandler.cpp:
2386         (BlackBerry::WebKit::InputHandler::spellCheckBlock):
2387         (BlackBerry::WebKit::InputHandler::getRangeForSpellCheckWithFineGranularity):
2388
2389 2012-09-24  Mark Lam  <mark.lam@apple.com>
2390
2391         Deleting the classic interpreter and cleaning up some build options.
2392         https://bugs.webkit.org/show_bug.cgi?id=96969.
2393
2394         Reviewed by Geoffrey Garen.
2395
2396         * WebCoreSupport/AboutDataEnableFeatures.in:
2397
2398 2012-09-24  Benjamin Poulain  <bpoulain@apple.com>
2399
2400         Fix Geolocation error reporting in the test support
2401         https://bugs.webkit.org/show_bug.cgi?id=97386
2402
2403         Reviewed by Sam Weinig.
2404
2405         * WebKitSupport/DumpRenderTreeSupport.cpp:
2406         (DumpRenderTreeSupport::setMockGeolocationPositionUnavailableError):
2407         * WebKitSupport/DumpRenderTreeSupport.h:
2408         (DumpRenderTreeSupport):
2409
2410 2012-09-24  Otto Derek Cheung  <otcheung@rim.com>
2411
2412         [BlackBerry] Reverting implementation for 407 error pages
2413         https://bugs.webkit.org/show_bug.cgi?id=97455
2414
2415         Reviewed by Rob Buis.
2416
2417         Revert "[BlackBerry] Really fix bug 95488 that user can get the 
2418         authentication challenge dialog while the other tab has focus."
2419         https://bugs.webkit.org/show_bug.cgi?id=97348
2420
2421         This reverts commit 0cffe01961fb80204138505bcec29a83818efb73.
2422
2423         * Api/BlackBerryGlobal.cpp:
2424         (BlackBerry::WebKit::globalInitialize):
2425         * Api/WebPage.cpp:
2426         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
2427         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
2428         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
2429         (BlackBerry::WebKit::WebPage::setVisible):
2430         * Api/WebPage_p.h:
2431         (WebPagePrivate):
2432
2433 2012-09-24  Arvid Nilsson  <anilsson@rim.com>
2434
2435         [BlackBerry] Add cookie database API
2436         https://bugs.webkit.org/show_bug.cgi?id=97102
2437
2438         Reviewed by Antonio Gomes.
2439
2440         The cookie database is exposed through WebCookieJar, which has only two
2441         methods: cookies() and setCookies().
2442
2443         Also add a new WebString::fromUTF8 overload that takes a const char*
2444         and a length, in order to avoid a strlen call when converting from
2445         other string classes to WebString. This is useful for callers of the
2446         new cookie API when converting cookies to WebString.
2447
2448         Reviewed internally by Otto D. Cheung.
2449
2450         PR 209282
2451
2452         * Api/WebCookieJar.cpp: Added.
2453         (WebKit):
2454         (BlackBerry::WebKit::WebCookieJar::WebCookieJar):
2455         (BlackBerry::WebKit::WebCookieJar::cookies):
2456         (BlackBerry::WebKit::WebCookieJar::setCookies):
2457         * Api/WebCookieJar.h: Added.
2458         (WebKit):
2459         * Api/WebPage.cpp:
2460         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
2461         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
2462         (BlackBerry::WebKit::WebPage::cookieJar):
2463         (WebKit):
2464         * Api/WebPage.h:
2465         (WebKit):
2466         * Api/WebPage_p.h:
2467         (WebKit):
2468         (WebPagePrivate):
2469         * Api/WebString.cpp:
2470         (BlackBerry::WebKit::WebString::fromUtf8):
2471         (WebKit):
2472         * Api/WebString.h:
2473
2474 2012-09-21  Lianghui Chen  <liachen@rim.com>
2475
2476         [BlackBerry] Really fix bug 95488 that user can get the authentication challenge dialog while the other tab has focus.
2477         https://bugs.webkit.org/show_bug.cgi?id=97348
2478         Internal PR: 186597.
2479
2480         Internally reviewed by Yong Li, Joe Mason.
2481         Reviewed by Yong Li.
2482
2483         Update WebPage to use new AuthenticationChallengeManager.
2484         Register page creation/deletion and visibility change to the new
2485             AuthenticationChallengeManager.
2486         Initialize AuthenticationChallengeManager in GlobalInitialize() function.
2487
2488         * Api/BlackBerryGlobal.cpp:
2489         (BlackBerry::WebKit::globalInitialize):
2490         * Api/WebPage.cpp:
2491         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
2492         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
2493         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
2494         (BlackBerry::WebKit::WebPage::setVisible):
2495         * Api/WebPage_p.h:
2496         (WebPagePrivate):
2497
2498 2012-09-21  Charles Wei  <charles.wei@torchmobile.com.cn>
2499
2500         Wrong seperator for viewport meta in Popup scripts
2501         https://bugs.webkit.org/show_bug.cgi?id=97313
2502
2503         Reviewed by Yong Li.
2504
2505         The valid seperator for viewport meta is ',' instead of ';'.
2506
2507         * WebCoreSupport/PagePopupBlackBerry.cpp:
2508         (WebCore::PagePopupBlackBerry::generateHTML):
2509
2510 2012-09-21  Arvid Nilsson  <anilsson@rim.com>
2511
2512         [BlackBerry] Remove obsolete compositing surface code
2513         https://bugs.webkit.org/show_bug.cgi?id=97314
2514
2515         Reviewed by Antonio Gomes.
2516
2517         The removed code allowed rendering of sublayers to a separate offscreen
2518         surface.
2519
2520         Now that we composite root layer and all sublayers to the window
2521         surface, this code is not needed anymore. In addition, we save some
2522         memory by not allocating the unused offscreen surface.
2523
2524         PR 208038.
2525
2526         * Api/BackingStore.cpp:
2527         (BlackBerry::WebKit::BackingStorePrivate::suspendScreenAndBackingStoreUpdates):
2528         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
2529         (BlackBerry::WebKit::BackingStorePrivate::drawAndBlendLayersForDirectRendering):
2530         * Api/BackingStore_p.h:
2531         (BackingStorePrivate):
2532         * Api/WebPage.cpp:
2533         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
2534         (BlackBerry::WebKit::WebPagePrivate::suspendBackingStore):
2535         (BlackBerry::WebKit::WebPagePrivate::resizeSurfaceIfNeeded):
2536         (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
2537         (BlackBerry::WebKit::WebPagePrivate::setRootLayerCompositingThread):
2538         * Api/WebPage_p.h:
2539         (WebPagePrivate):
2540         * WebKitSupport/BackingStoreCompositingSurface.cpp: Removed.
2541         * WebKitSupport/BackingStoreCompositingSurface.h: Removed.
2542         * WebKitSupport/GLES2Context.cpp:
2543         (BlackBerry::WebKit::GLES2Context::buffer):
2544         (BlackBerry::WebKit::GLES2Context::surfaceSize):
2545         (BlackBerry::WebKit::GLES2Context::swapBuffers):
2546         * WebKitSupport/GLES2Context.h:
2547         (GLES2Context):
2548         * WebKitSupport/SurfacePool.cpp:
2549         (WebKit):
2550         (BlackBerry::WebKit::SurfacePool::SurfacePool):
2551         (BlackBerry::WebKit::SurfacePool::initialize):
2552         * WebKitSupport/SurfacePool.h:
2553         (SurfacePool):
2554
2555 2012-09-20  Peter Wang  <peter.wang@torchmobile.com.cn>
2556
2557         [BlackBerry] To support "Frames View" of "TimeLine" panel  in Inspector
2558         https://bugs.webkit.org/show_bug.cgi?id=96077
2559
2560         Reviewed by Pavel Feldman.
2561
2562         A minor modification to make the inspecting results more accurate.
2563         Internally reviewd by Arvid, Robin.C, and Konrad.
2564
2565         * Api/BackingStore.cpp:
2566         (BlackBerry::WebKit::BackingStorePrivate::renderJob):
2567         * Api/WebPage.cpp:
2568         (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
2569         * WebKitSupport/RenderQueue.cpp:
2570         (BlackBerry::WebKit::RenderQueue::render):
2571
2572 2012-09-19  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
2573
2574         [BlackBerry] Basic authentication challenge credentials for stored credentials again after restarting browser
2575         https://bugs.webkit.org/show_bug.cgi?id=96362
2576
2577         Reviewed by Rob Buis.
2578
2579         Make the FrameLoaderClient use credential storage according to the macro
2580         BLACKBERRY_CREDENTIAL_PERSIST
2581
2582         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2583         (WebCore::FrameLoaderClientBlackBerry::shouldUseCredentialStorage):
2584         (WebCore):
2585         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
2586         (FrameLoaderClientBlackBerry):
2587
2588 2012-09-19  Mike Fenton  <mifenton@rim.com>
2589
2590         [BlackBerry] After zooming into an input field, zoom out when focus is lost.
2591         https://bugs.webkit.org/show_bug.cgi?id=97128
2592
2593         Reviewed by Rob Buis.
2594
2595         When the page has automatically zoomed in for input
2596         focus, unzoom it when input focus is lost or keyboard hidden.
2597
2598         Reviewed Internally by Gen Mak.
2599
2600         * WebKitSupport/InputHandler.cpp:
2601         (BlackBerry::WebKit::InputHandler::InputHandler):
2602         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
2603         * WebKitSupport/InputHandler.h:
2604         (InputHandler):
2605
2606 2012-09-19  Nima Ghanavatian  <nghanavatian@rim.com>
2607
2608         [BlackBerry] Clean up the SpellingLog output
2609         https://bugs.webkit.org/show_bug.cgi?id=97129
2610
2611         Reviewed by Rob Buis.
2612
2613         Internally reviewed by Mike Fenton.
2614
2615         * WebKitSupport/InputHandler.cpp:
2616         (BlackBerry::WebKit::InputHandler::spellCheckingRequestCancelled):
2617         (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
2618
2619 2012-09-19  Mike Fenton  <mifenton@rim.com>
2620
2621         [BlackBerry] Add SpellingLog for spell checking options request.
2622         https://bugs.webkit.org/show_bug.cgi?id=97125
2623
2624         Reviewed by Rob Buis.
2625
2626         Add spell checking log to indicate the calculated
2627         text position for spell checking option requests.
2628
2629         Reviewed Internally by Nima Ghanavatian.
2630
2631         * WebKitSupport/InputHandler.cpp:
2632         (BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint):
2633
2634 2012-09-19  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2635
2636         [BlackBerry] Add function playerId() in class PageClientBlackBerry
2637         https://bugs.webkit.org/show_bug.cgi?id=97099
2638
2639         Reviewed by Yong Li.
2640
2641         Implemented PageClientBlackBerry::playerID() in class WebPagePrivate,
2642         and replaced the implementation of FrameLoaderClientBlackBerry::playerId().
2643
2644         Internally reviewed by Charles Wei.
2645
2646         * Api/WebPage.cpp:
2647         (BlackBerry::WebKit::WebPagePrivate::playerID):
2648         (WebKit):
2649         * Api/WebPage_p.h:
2650         (WebPagePrivate):
2651         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2652         (WebCore::FrameLoaderClientBlackBerry::playerId):
2653
2654 2012-09-19  Abbas Sherawala  <asherawala@rim.com>
2655
2656         [BlackBerry] BackingStorePrivate::resumeScreenAndBackingStoreUpdates more atomic
2657         Added a missing 'if' statement.
2658         https://bugs.webkit.org/show_bug.cgi?id=96925
2659
2660         PR #180866
2661
2662         Internally Reviewed by Antonio Gomes.
2663
2664         Adding an 'if' statement which should have been in PR # 180866 (SHA:b9c06af395c22e)
2665
2666         Reviewed by Antonio Gomes.
2667
2668         * Api/BackingStore.cpp:
2669         (BlackBerry::WebKit::BackingStorePrivate::resumeScreenAndBackingStoreUpdates):
2670
2671 2012-09-18  Nima Ghanavatian  <nghanavatian@rim.com>
2672
2673         [BlackBerry] Use didCancel and didSucceed instead of didCheckCancel and didCheckSucceed
2674         https://bugs.webkit.org/show_bug.cgi?id=97033
2675
2676         Reviewed by Rob Buis.
2677
2678         Using these preferred public methods (the latter has a note to be made private) ensures that
2679         the right SpellChecker object is being called during the callback in spellCheckingRequestProcessed
2680         and spellCheckingRequestCancelled.
2681
2682         Internally reviewed by Mike Fenton.
2683
2684         By referencing the TextCheckingRequest object's methods, we don't need to keep track of the associated
2685         SpellChecker for each request. Removing much of the code that was put in place incorrectly to achieve this.
2686
2687         * WebKitSupport/InputHandler.cpp:
2688         (BlackBerry::WebKit::InputHandler::InputHandler):
2689         (BlackBerry::WebKit::InputHandler::requestCheckingOfString):
2690         (BlackBerry::WebKit::InputHandler::spellCheckingRequestCancelled):
2691         (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
2692         (BlackBerry::WebKit::InputHandler::getSpellChecker):
2693         * WebKitSupport/InputHandler.h:
2694         (InputHandler):
2695
2696 2012-09-18  Jessica Cao  <jecao@rim.com>
2697
2698         [BlackBerry] Date picker isn't inputting after 'OK'
2699         https://bugs.webkit.org/show_bug.cgi?id=97031
2700
2701         PR208052
2702
2703         Reviewed by Rob Buis
2704
2705         Checking for !values.contains("-1") will match valid strings like "2012-09-18". Use value != "-1" instead.
2706
2707         * WebCoreSupport/DatePickerClient.cpp:
2708         (WebCore::DatePickerClient::setValueAndClosePopup):
2709
2710 2012-09-18  Yong Li  <yoli@rim.com>
2711
2712         [BlackBerry] Popup page should reference the client with a weak pointer
2713         https://bugs.webkit.org/show_bug.cgi?id=97028
2714
2715         Reviewed by Rob Buis.
2716
2717         RIM PR# 209847.
2718         Internally reviewed by Mike Fenton.
2719
2720         Store the pointer in a ref-coutned shared object, and clear the pointer 
2721         when the client is going to be destroyed, so it won't be accessed by
2722         the JS function afterwards.
2723
2724         * WebCoreSupport/PagePopupBlackBerry.cpp:
2725         (WebCore::PagePopupBlackBerry::PagePopupBlackBerry):
2726         (WebCore::PagePopupBlackBerry::~PagePopupBlackBerry):
2727         (WebCore::PagePopupBlackBerry::init):
2728         (WebCore::setValueAndClosePopupCallback):
2729         (WebCore::popUpExtensionFinalize):
2730         (WebCore::PagePopupBlackBerry::installDOMFunction):
2731         (WebCore::PagePopupBlackBerry::closePopup):
2732         * WebCoreSupport/PagePopupBlackBerry.h:
2733         (PagePopupBlackBerry):
2734         (SharedClientPointer):
2735         (WebCore::PagePopupBlackBerry::SharedClientPointer::SharedClientPointer):
2736         (WebCore::PagePopupBlackBerry::SharedClientPointer::clear):
2737         (WebCore::PagePopupBlackBerry::SharedClientPointer::get):
2738
2739 2012-09-18  Arvid Nilsson  <anilsson@rim.com>
2740
2741         [BlackBerry] Prevent scroll adjustment of input fields when region of interest mechanism active
2742         https://bugs.webkit.org/show_bug.cgi?id=96750
2743
2744         Reviewed by Antonio Gomes.
2745
2746         The region of interest mechanism replaces the scrolling/zooming
2747         functionality in InputHandler::ensureFocusTextElementVisible().
2748
2749         We introduce a new fine-grained setting for the various adjustment
2750         modes. The WebKit embedder can disable all scroll types in favor of the
2751         region of interest mechanism by using the new setting.
2752
2753         PR #208387
2754
2755         Reviewed internally by Mike Fenton.
2756
2757         * WebKitSupport/AboutData.cpp:
2758         (BlackBerry::WebKit::configPage):
2759         * WebKitSupport/InputHandler.cpp:
2760         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
2761         * WebKitSupport/InputHandler.h:
2762
2763 2012-09-17  Jakob Petsovits  <jpetsovits@rim.com>
2764
2765         [BlackBerry] Remove dysfunctional zoom blit in setViewportSize().
2766         https://bugs.webkit.org/show_bug.cgi?id=96954
2767         PR 178411
2768
2769         Reviewed by Antonio Gomes.
2770
2771         The blitContents() call removed by this patch used to
2772         be part of scheduleZoomAboutPoint(). Its goal was to
2773         display a preview of the zoomed contents, primarily
2774         when auto-zoomed after rotation. Nested inside a pair
2775         of screen suspend/resume calls, it has been a pointless
2776         no-op for a while.
2777
2778         Antonio's recent change to remove scheduleZoomAboutPoint()
2779         and call zoomAboutPoint() from setViewportSize() directly
2780         (the only call site) obsoletes the call completely.
2781         The zoomAboutPoint() call itself will cause a re-render
2782         and blit right away, so we don't care about any preview.
2783         zoomAboutPoint() will also take care of the necessary
2784         screen/backingstore suspension.
2785
2786         The result is a vastly simplified block of code.
2787
2788         * Api/WebPage.cpp:
2789         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
2790
2791 2012-09-17  Antonio Gomes  <agomes@rim.com>
2792
2793         [BlackBerry] [FullScreen] entering/leaving fullscreen results in temporary glitches on the screen
2794         https://bugs.webkit.org/show_bug.cgi?id=96927
2795         PR #180866
2796
2797         Reviewed by Yong Li.
2798
2799         Suspend backing store and screen updates while entering fullscreen,
2800         and only resume at the end, when viewport is resized.
2801
2802         * Api/WebPage.cpp:
2803         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
2804         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
2805         * Api/WebPage_p.h:
2806         (WebPagePrivate):
2807         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2808         (WebCore::ChromeClientBlackBerry::enterFullScreenForElement):
2809         (WebCore::ChromeClientBlackBerry::exitFullScreenForElement):
2810
2811 2012-09-17  Rob Buis  <rbuis@rim.com>
2812
2813         [BlackBerry] Fix compile problems in WebKit/blackberry
2814         https://bugs.webkit.org/show_bug.cgi?id=96926
2815
2816         Reviewed by Antonio Gomes.
2817
2818         This code is slightly out of date and so will not compile, fix it.
2819
2820         * WebCoreSupport/BatteryClientBlackBerry.cpp:
2821         (WebCore::BatteryClientBlackBerry::BatteryClientBlackBerry):
2822         * WebCoreSupport/BatteryClientBlackBerry.h:
2823         (WebKit):
2824         * WebCoreSupport/CredentialTransformData.h:
2825         * WebCoreSupport/DeviceOrientationClientBlackBerry.cpp:
2826         (DeviceOrientationClientBlackBerry::onOrientation):
2827         * WebCoreSupport/InspectorClientBlackBerry.h:
2828         * WebCoreSupport/PagePopupBlackBerry.cpp:
2829         * WebKitSupport/DOMSupport.cpp:
2830         (BlackBerry::WebKit::DOMSupport::isDateTimeInputField):
2831         (BlackBerry::WebKit::DOMSupport::isTextBasedContentEditableElement):
2832         * WebKitSupport/DumpRenderTreeSupport.cpp:
2833         (DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests):
2834         * WebKitSupport/InPageSearchManager.cpp:
2835         (BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):
2836
2837 2012-09-17  Antonio Gomes  <agomes@rim.com>
2838
2839         [BlackBerry] BackingStorePrivate::resumeScreenAndBackingStoreUpdates more atomic
2840         https://bugs.webkit.org/show_bug.cgi?id=96925
2841
2842         [FullScreen] entering/leaving fullscreen results in temporary glitches on the screen (part 2/3)
2843         PR #180866
2844
2845         Reviewed by Rob Buis.
2846         Internally reviewed by Arvid Nilsson.
2847
2848         Paraphrasing Arvid "resumeBackingStore will be a truly atomic operation.
2849         Well more atomic than it was before, with regards to a mix of accelerated and
2850         non-accelerated compositing content".
2851
2852         I.e. by committing the root layer (if needed) when resuming the Backing
2853         Store, we call blitVisibleContents right way, so we are actually shortcutting when
2854         AC content will get on screen.
2855
2856         * Api/BackingStore.cpp:
2857         (BlackBerry::WebKit::BackingStorePrivate::resumeScreenAndBackingStoreUpdates):
2858
2859 2012-09-17  Peter Wang  <peter.wang@torchmobile.com.cn>
2860
2861         [BlackBerry] To support "Frames View" of "TimeLine" panel in Inspector
2862         https://bugs.webkit.org/show_bug.cgi?id=96077
2863
2864         Reviewed by Rob Buis.
2865
2866         Invoke the "instrumentBeginFrame" and "instrumentCancelFrame" at the start and end of processing
2867         render message to record one time of page's update.
2868
2869         * Api/BackingStore.cpp:
2870         (BlackBerry::WebKit::BackingStorePrivate::instrumentBeginFrame):
2871         (WebKit):
2872         (BlackBerry::WebKit::BackingStorePrivate::instrumentCancelFrame):
2873         * Api/BackingStore_p.h:
2874         * WebKitSupport/RenderQueue.cpp:
2875         (BlackBerry::WebKit::RenderQueue::render):
2876
2877 2012-09-17  Jakob Petsovits  <jpetsovits@rim.com>
2878
2879         [BlackBerry] Support copying image data in WebOverlay.
2880         https://bugs.webkit.org/show_bug.cgi?id=96684
2881         RIM PR 195444
2882
2883         Reviewed by Rob Buis.
2884         Internally reviewed by Arvid Nilsson.
2885
2886         The publicly exposed WebOverlay class provides a method
2887         setContentsToImage() to assign a pointer to pixel data,
2888         which is later used to provide texture data for the
2889         underlying compositing layer. This works well for static
2890         images that stay in memory and never change, but not
2891         so well for images with changing contents or where the
2892         image data is being reassigned from different image
2893         sources that are not constantly kept around in memory.
2894
2895         Due to the delayed upload and delayed fetching of
2896         EGLImage data by the GPU, we shouldn't assume the caller
2897         to know how long the image should be retained. Instead,
2898         we should offer another method of setting image data
2899         that takes ownership of the pixel data.
2900
2901         This patch adds an option to setContentsToImage() that
2902         copies the passed pixel data and doesn't destroy it
2903         until both the texture is destroyed and the image
2904         contents are changed. Using this method, the caller can
2905         withdraw the passed pixel array right after the
2906         setContentsToImage() call without consequences.
2907
2908         * Api/WebOverlay.cpp:
2909         (BlackBerry::WebKit::WebOverlay::setContentsToImage):
2910         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setContentsToImage):
2911         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::WebOverlayLayerCompositingThreadClient):
2912         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::invalidate):
2913         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::setContents):
2914         (WebKit):
2915         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::clearUploadedContents):
2916         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::setContentsToColor):
2917         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded):
2918         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::deleteTextures):
2919         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setContentsToImage):
2920         * Api/WebOverlay.h:
2921         * Api/WebOverlay_p.h:
2922         (WebOverlayPrivate):
2923         (WebOverlayPrivateWebKitThread):
2924         (WebOverlayLayerCompositingThreadClient):
2925         (WebOverlayPrivateCompositingThread):
2926
2927 2012-09-14  Dana Jansens  <danakj@chromium.org>
2928
2929         Minimize collisions when hashing pairs
2930         https://bugs.webkit.org/show_bug.cgi?id=96022
2931
2932         Reviewed by Adrienne Walker.
2933
2934         Use WTF::pairIntHash() to hash a pair of integers.
2935
2936         * WebKitSupport/TileIndexHash.h:
2937
2938 2012-09-14  Genevieve Mak  <gmak@rim.com>
2939
2940         Always send mouse events on pages that don't scroll even if there
2941         is no mouse move listener attatched.
2942         PR #208228
2943         https://bugs.webkit.org/show_bug.cgi?id=96800
2944
2945         Reviewed by Antonio Gomes.
2946
2947         Reviewed Internally By Antonio Gomes.
2948
2949         * WebKitSupport/TouchEventHandler.cpp:
2950         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
2951
2952 2012-09-14  Mike Fenton  <mifenton@rim.com>
2953
2954         [BlackBerry] Update the minimum zoom scale when focusing an input field.
2955         https://bugs.webkit.org/show_bug.cgi?id=96789
2956
2957         Reviewed by Antonio Gomes.
2958
2959         PR 188751.
2960
2961         Increase the minimum font fix and base it on mm instead of pixels.
2962
2963         Reviewed Internally by Gen Mak.
2964
2965         * WebKitSupport/InputHandler.cpp:
2966         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
2967
2968 2012-09-13  Antonio Gomes  <agomes@rim.com>
2969
2970         [BlackBerry]  Remove the ability to schedule a zoom about point call.
2971         https://bugs.webkit.org/show_bug.cgi?id=96696
2972
2973         [FullScreen] entering/leaving fullscreen results in temporary glitches on the screen (Part I)
2974         PR #180866
2975
2976         Reviewed by Rob Buis.
2977
2978         Internally reviewed by Jacky Jiang and Arvid Nilsson.
2979
2980         Patch replaces the async call to zoomAboutPoint (via scheduling it with a one-shot-0-timer).
2981         Instead, at its single call site, we inline most of the previous scheduleZoomAboutPoint code,
2982         and in the end call zoomAboutPoint directly.
2983
2984         Change was estimulated by Arvid's comment on PRzilla: "There is no longer any reason to have
2985         zoom about point be async.. That was a hack I did for BB6, back when we were doing everything on the WK
2986         thread and needed manual time slicing betwren rendering and user interaction."
2987
2988         The bigger goal though is to be able to remove screen glitches while entering/leaving
2989         fullscreen mode: since we could accurately use the count-based suspend/resume backing
2990         store mechanism to prevent it.
2991
2992         * Api/WebPage.cpp:
2993         (WebKit):
2994         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
2995         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
2996         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
2997         * Api/WebPage_p.h:
2998         (WebPagePrivate):
2999
3000 2012-09-14  Arvid Nilsson  <anilsson@rim.com>
3001
3002         [BlackBerry] Add renderTreeAsText API to WebPage
3003         https://bugs.webkit.org/show_bug.cgi?id=96629
3004
3005         Reviewed by Antonio Gomes.
3006
3007         This will be used for automated testing.
3008
3009         PR #198595
3010
3011         * Api/WebPage.cpp:
3012         (BlackBerry::WebKit::WebPage::renderTreeAsText):
3013         (WebKit):
3014         * Api/WebPage.h:
3015
3016 2012-09-13  Rob Buis  <rbuis@rim.com>
3017
3018         [BlackBerry] Cleanup AboutDataEnableFeatures.in
3019         https://bugs.webkit.org/show_bug.cgi?id=96695
3020
3021         Reviewed by Antonio Gomes.
3022
3023         Remove unused features.
3024
3025         * WebCoreSupport/AboutDataEnableFeatures.in:
3026
3027 2012-09-13  Rob Buis  <rbuis@rim.com>
3028
3029         [BlackBerry] Rename InspectorOverlay in blackberry/WebKitSupport
3030         https://bugs.webkit.org/show_bug.cgi?id=96689
3031
3032         Reviewed by Antonio Gomes.
3033
3034         Rename to InspectorClientBlackBerry to avoid include problems.
3035
3036         * WebCoreSupport/InspectorClientBlackBerry.h:
3037         * WebKitSupport/InspectorOverlayBlackBerry.cpp: Renamed from Source/WebKit/blackberry/WebKitSupport/InspectorOverlay.cpp.
3038         (WebKit):
3039         (BlackBerry::WebKit::InspectorOverlay::create):
3040         (BlackBerry::WebKit::InspectorOverlay::InspectorOverlay):
3041         (BlackBerry::WebKit::InspectorOverlay::notifySyncRequired):
3042         (BlackBerry::WebKit::InspectorOverlay::paintContents):
3043         (BlackBerry::WebKit::InspectorOverlay::showDebugBorders):
3044         (BlackBerry::WebKit::InspectorOverlay::showRepaintCounter):
3045         (BlackBerry::WebKit::InspectorOverlay::~InspectorOverlay):
3046         (BlackBerry::WebKit::InspectorOverlay::clear):
3047         (BlackBerry::WebKit::InspectorOverlay::update):
3048         * WebKitSupport/InspectorOverlayBlackBerry.h: Renamed from Source/WebKit/blackberry/WebKitSupport/InspectorOverlay.h.
3049         (WebCore):
3050         (WebKit):
3051         (InspectorOverlay):
3052         (InspectorOverlayClient):
3053         (BlackBerry::WebKit::InspectorOverlay::setClient):
3054         (BlackBerry::WebKit::InspectorOverlay::notifyAnimationStarted):
3055
3056 2012-09-13  Antonio Gomes  <agomes@rim.com>
3057
3058         Unreviewed, warning fix left over from r128456 (bug 96645)
3059
3060         * Api/InRegionScroller.cpp:
3061         (WebKit):
3062
3063 2012-09-13  Genevieve Mak  <gmak@rim.com>
3064
3065         Continue to send mouse move events to a non-scrollable page
3066         even if they are not consumed.
3067         PR #207024
3068         https://bugs.webkit.org/show_bug.cgi?id=96655
3069
3070         Reviewed by Antonio Gomes.
3071
3072         * WebKitSupport/TouchEventHandler.cpp:
3073         (BlackBerry::WebKit::isMainFrameScrollable):
3074         (WebKit):
3075         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
3076
3077 2012-09-13  Jacky Jiang  <zhajiang@rim.com>
3078
3079         [BlackBerry] Missing conditions in InRegionScrollerPrivate::canScrollRenderBox
3080         https://bugs.webkit.org/show_bug.cgi?id=96660
3081
3082         Reviewed by Antonio Gomes.
3083
3084         PR: 207884
3085         According to RenderBox::canBeScrolledAndHasScrollableArea(), we should
3086         bail out early in InRegionScrollerPrivate::canScrollRenderBox() if the
3087         RenderBox's scroll height equals the client height and the scroll width
3088         equals the client width. Otherwise, we will miss the conditions.
3089
3090         * Api/InRegionScroller.cpp:
3091         (BlackBerry::WebKit::InRegionScrollerPrivate::canScrollRenderBox):
3092
3093 2012-09-13  Jessica Cao  <jecao@rim.com>
3094
3095         [BlackBerry] Page Popup for Month is non-functional.
3096         https://bugs.webkit.org/show_bug.cgi?id=96651
3097
3098         Reviewed by Rob Buis.
3099
3100         Hook up support for Month popup.
3101
3102         * WebCoreSupport/DatePickerClient.cpp:
3103         (WebCore::DatePickerClient::generateHTML):
3104         * WebKitSupport/InputHandler.cpp:
3105         (BlackBerry::WebKit::InputHandler::openDatePopup):
3106
3107 2012-09-13  Antonio Gomes  <agomes@rim.com>
3108
3109         [BlackBerry] ASSERT failure in InRegionScrollableArea::InRegionScrollableArea
3110         https://bugs.webkit.org/show_bug.cgi?id=96645
3111         PR #207307
3112
3113         Reviewed by George Staikos.
3114
3115         We use canScrollRenderBox to promote the layer as scrollable instead
3116         of RenderBox::canScrollAndHasScrollableArea (see comment above the former).
3117         We should assert against the former as well.
3118
3119         * Api/InRegionScroller.cpp:
3120         (BlackBerry::WebKit::InRegionScrollerPrivate::canScrollRenderBox):
3121         * Api/InRegionScroller_p.h:
3122         (WebCore):
3123         (InRegionScrollerPrivate):
3124         * WebKitSupport/InRegionScrollableArea.cpp:
3125         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
3126
3127 2012-09-12  Sheriff Bot  <webkit.review.bot@gmail.com>
3128
3129         Unreviewed, rolling out r127876.
3130         http://trac.webkit.org/changeset/127876
3131         https://bugs.webkit.org/show_bug.cgi?id=96600
3132
3133         mouse click doesn't work for spin button if spin button in
3134         iframe (Requested by yosin on #webkit).
3135
3136         * Api/WebPage.cpp:
3137         (BlackBerry::WebKit::WebPagePrivate::contextNode):
3138         (BlackBerry::WebKit::WebPagePrivate::nodeForZoomUnderPoint):
3139         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
3140         (BlackBerry::WebKit::WebPage::nodeAtPoint):
3141         * WebKitSupport/FatFingers.cpp:
3142         (BlackBerry::WebKit::FatFingers::getNodesFromRect):
3143         (BlackBerry::WebKit::FatFingers::getRelevantInfoFromPoint):
3144         * WebKitSupport/SelectionHandler.cpp:
3145         (BlackBerry::WebKit::visiblePositionForPointIgnoringClipping):
3146
3147 2012-09-12  Sami Kyostila  <skyostil@google.com>
3148
3149         Rename OVERFLOW_SCROLLING as ACCELERATED_OVERFLOW_SCROLLING
3150         https://bugs.webkit.org/show_bug.cgi?id=96251
3151
3152         Reviewed by Simon Fraser.
3153
3154         Rename OVERFLOW_SCROLLING as ACCELERATED_OVERFLOW_SCROLLING to better describe
3155         the feature it controls.
3156
3157         * WebCoreSupport/AboutDataEnableFeatures.in:
3158
3159 2012-09-11  Antonio Gomes  <agomes@rim.com>
3160
3161         [BlackBerry] add a way to overscroll non-overflown content
3162         https://bugs.webkit.org/show_bug.cgi?id=96331
3163         PR #195305
3164
3165         Reviewed by Yong Li.
3166
3167         Check -webkit-overflow-scrolling value for '-blackberry-touch' instead
3168         of checking a custom HTML5 attribute.
3169
3170         No behavioural change. Mostly a rework of r128142.
3171
3172         * Api/InRegionScroller.cpp:
3173         (BlackBerry::WebKit::canScrollRenderBox):
3174
3175 2012-09-11  Rob Buis  <rbuis@rim.com>
3176
3177         [BlackBerry] make pickers/dialogs use appendLiteral
3178         https://bugs.webkit.org/show_bug.cgi?id=96424
3179
3180         Reviewed by Antonio Gomes.
3181
3182         PR 204032
3183
3184         Other pickers were updated in r128204.
3185
3186         * WebCoreSupport/ColorPickerClient.cpp:
3187         (WebCore::ColorPickerClient::generateHTML):
3188         * WebCoreSupport/PagePopupBlackBerry.cpp:
3189         (WebCore::PagePopupBlackBerry::generateHTML):
3190
3191 2012-09-11  Konrad Piascik  <kpiascik@rim.com>
3192
3193         [BlackBerry] Fix history navigation for error pages.
3194         https://bugs.webkit.org/show_bug.cgi?id=96410
3195
3196         Reviewed by Rob Buis.
3197
3198         Fix how history navigation handles restoring view state when navigating between error pages.
3199
3200         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3201         (WebCore::FrameLoaderClientBlackBerry::FrameLoaderClientBlackBerry):
3202         (WebCore::FrameLoaderClientBlackBerry::saveViewStateToItem):
3203         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
3204         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
3205         (FrameLoaderClientBlackBerry):
3206
3207 2012-09-11  Jinwoo Song  <jinwoo7.song@samsung.com>
3208
3209         Deploy StringBuilder::appendNumber() and StringBuilder::appendLiteral() in more places
3210         https://bugs.webkit.org/show_bug.cgi?id=96344
3211
3212         Reviewed by Benjamin Poulain.
3213
3214         Use StringBuilder::appendNumber() instead of String::number(). Also deploy 
3215         StringBuilder::appendLiteral() instead of String::append() in the surrounding code.
3216
3217         * WebCoreSupport/DatePickerClient.cpp:
3218         (WebCore::DatePickerClient::generateHTML):
3219         * WebCoreSupport/SelectPopupClient.cpp:
3220         (WebCore::SelectPopupClient::generateHTML):
3221
3222 2012-09-11  Jacky Jiang  <zhajiang@rim.com>
3223
3224         [BlackBerry] InRegion scrollable area dangling pointers were accessed in UI thread
3225         https://bugs.webkit.org/show_bug.cgi?id=96318
3226
3227         Reviewed by Antonio Gomes.
3228
3229         PR: 204066
3230         Dangling pointers were accessed in UI thread, as the actual InRegion
3231         scrollable areas of WebKit side had been destroyed before that in
3232         WebKit thread after UI thread set scrolling to false.
3233         Notify the client side to clear InRegion scrollable areas before we
3234         destroy them in WebKit side.
3235
3236         Internally reviewed by Gen Mak and George Staikos.
3237
3238         * Api/WebPage.cpp:
3239         (BlackBerry::WebKit::WebPagePrivate::notifyInRegionScrollStopped):
3240         (BlackBerry::WebKit::WebPagePrivate::setScrollOriginPoint):
3241         * Api/WebPageClient.h:
3242
3243 2012-09-11  Mike Fenton  <mifenton@rim.com>
3244
3245         [BlackBerry] Suppress keyboard requests while processing spell checking suggestions.
3246         https://bugs.webkit.org/show_bug.cgi?id=96394
3247
3248         Reviewed by Rob Buis.
3249
3250         Suppress the VKB notification when the touch event
3251         is a spell checking request.
3252
3253         PR 192925.
3254
3255         Reviewed Internally by Gen Mak.
3256
3257         * WebKitSupport/TouchEventHandler.cpp:
3258         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
3259
3260 2012-09-11  Mike Fenton  <mifenton@rim.com>
3261
3262         [BlackBerry] Colour Dialog popup request should return proper state.
3263         https://bugs.webkit.org/show_bug.cgi?id=96392
3264
3265         Reviewed by Rob Buis.
3266
3267         Return proper state from openColorPopup dependent on
3268         whether the popup actually opened.
3269
3270         Reviewed Internally by Chris Hutten-Czapski
3271
3272         * WebKitSupport/InputHandler.cpp:
3273         (BlackBerry::WebKit::InputHandler::openColorPopup):
3274
3275 2012-09-11  Nima Ghanavatian  <nghanavatian@rim.com>
3276
3277         [BlackBerry] Take account for single words that exceed our client character limit
3278         https://bugs.webkit.org/show_bug.cgi?id=96389
3279
3280         Fix to the processing of long single-line text using getRangeForSpellCheckWithFineGranularity.
3281         This was failing if a single word was longer than our maximum allowed limit.
3282
3283         Internally reviewed by Mike Fenton.
3284
3285         Reviewed by Rob Buis.
3286
3287         * WebKitSupport/InputHandler.cpp:
3288         (WebKit):
3289         (BlackBerry::WebKit::InputHandler::getRangeForSpellCheckWithFineGranularity):
3290
3291 2012-09-11  Arvid Nilsson  <anilsson@rim.com>
3292
3293         [BlackBerry] SelectionHandler drops caret change notifications
3294         https://bugs.webkit.org/show_bug.cgi?id=96378
3295
3296         Reviewed by Antonio Gomes.
3297
3298         The selection handler deliberately drops caret change notifications
3299         while the input handler is processing changes, to avoid displaying
3300         intermediate state during a complex change.
3301
3302         However, this meant that the client was never informed of the final
3303         caret position.
3304
3305         Fixed by notifying client about caret change after processing ends, if
3306         one or more caret change notifications were dropped during processing.
3307
3308         PR #205073
3309
3310         Reviewed internally by Mike Fenton.
3311
3312         * WebKitSupport/InputHandler.cpp:
3313         (BlackBerry::WebKit::InputHandler::setProcessingChange):
3314         (WebKit):
3315         * WebKitSupport/InputHandler.h:
3316         (InputHandler):
3317         * WebKitSupport/SelectionHandler.cpp:
3318         (BlackBerry::WebKit::SelectionHandler::SelectionHandler):
3319         (BlackBerry::WebKit::SelectionHandler::inputHandlerDidFinishProcessingChange):
3320         (WebKit):
3321         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
3322         (BlackBerry::WebKit::SelectionHandler::notifyCaretPositionChangedIfNeeded):
3323         * WebKitSupport/SelectionHandler.h:
3324         (SelectionHandler):
3325
3326 2012-09-10  Antonio Gomes  <agomes@rim.com>
3327
3328         [BlackBerry] add a way to overscroll non-overflown content
3329         https://bugs.webkit.org/show_bug.cgi?id=96331
3330         [UxD] Vertical lists should always be scrollable
3331         PR #195305
3332
3333         Reviewed by Yong Li.
3334         Internally reviewed by Gen Mak.
3335
3336         Check if the RenderLayer is composited / hardware acceleratable prior to
3337         check if its contents overflows. If that is the case, check if
3338         our custom data-blackberry-force-overscroll is present.
3339
3340         That makes it possible for us to align to UX requirements: settings
3341         and CCM panels should be always scrollable.
3342
3343         * Api/InRegionScroller.cpp:
3344         (BlackBerry::WebKit::canScrollRenderBox):
3345         * WebKitSupport/InRegionScrollableArea.cpp:
3346         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
3347
3348 2012-09-10  Genevieve Mak  <gmak@rim.com>
3349
3350         Change -data-blackberry-webworks-context to -data-webworks-context
3351         because not all webworks apps are blackberry apps.
3352         https://bugs.webkit.org/show_bug.cgi?id=96297
3353
3354         Reviewed by Antonio Gomes.
3355
3356         PR #193726
3357         Rubber Stamped interally by Mike Fenton.
3358
3359         * WebKitSupport/DOMSupport.cpp:
3360         (BlackBerry::WebKit::DOMSupport::webWorksContext):
3361
3362 2012-09-09  Arvid Nilsson  <anilsson@rim.com>
3363
3364         [BlackBerry] Fix flicker due to introduction of the fence extension.
3365         https://bugs.webkit.org/show_bug.cgi?id=96207
3366
3367         Reviewed by George Staikos.
3368
3369         Don't immediately add fence to garbage list, so it is destroyed
3370         after only one swap, for a set of tiles just because one tile in
3371         the set gets a new fence, the old fence may still not be signalled
3372         and before rendering the other tiles in the set we have to wait for it.
3373
3374         * WebKitSupport/BackingStoreTile.cpp:
3375         (BlackBerry::WebKit::Fence::~Fence):
3376         (WebKit):
3377         * WebKitSupport/BackingStoreTile.h:
3378         (WebKit):
3379         (Fence):
3380         * WebKitSupport/SurfacePool.cpp:
3381         (BlackBerry::WebKit::SurfacePool::initialize):
3382         (BlackBerry::WebKit::SurfacePool::notifyBuffersComposited):
3383         (WebKit):
3384         (BlackBerry::WebKit::SurfacePool::destroyPlatformSync):
3385         * WebKitSupport/SurfacePool.h:
3386         (SurfacePool):
3387
3388 2012-09-08  Max Feil  <mfeil@rim.com>
3389
3390         [BlackBerry] Exiting fullscreen mode can leave user stuck without Browser menus
3391         https://bugs.webkit.org/show_bug.cgi?id=96027
3392
3393         Reviewed by Antonio Gomes.
3394
3395         The changes for bug 87337 (landed as trunk svn revision 119119)
3396         introduced a bug. The same conditions are not checked on enter
3397         fullscreen vs. exit. Web sites such as http://videojs.com
3398         and youtube's mobile HTML5 player make the div container
3399         of the video element go fullscreen. This is allowed in
3400         WebPagePrivate::enterFullScreenForElement() but disallowed in
3401         WebPagePrivate::exitFullScreenForElement(). I am fixing this by
3402         allowing containers of video elements to exit fullscreen.
3403
3404         * Api/WebPage.cpp:
3405         (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
3406
3407 2012-09-07  Ming Xie  <mxie@rim.com>
3408
3409
3410         [BlackBerry] Remove browser from the build info page
3411         https://bugs.webkit.org/show_bug.cgi?id=96162
3412
3413         Reviewed by George Staikos.
3414         Internal reviewed by Jeff Rogers.
3415
3416         WebKit build should not have the build info for browser which is
3417         built on top of webkit.
3418
3419         * WebKitSupport/AboutData.cpp:
3420         (BlackBerry::WebKit::buildPage):
3421
3422 2012-09-07  Yongxin Dai  <yodai@rim.com>
3423
3424         [BlackBerry] Initialize caret rectangle with invalid location
3425         https://bugs.webkit.org/show_bug.cgi?id=96011
3426
3427         Reviewed by Rob Buis.
3428
3429         In SelectionHandler::selectionPositionChanged() method, startCaret and
3430         endCaret are used to notify clients about new caret positions. This patch
3431         initializes startCaret and endCaret with location(-1. -1), and keeps them
3432         empty before they are assigned to valid values. This would help for