[BlackBerry] Remove Mobile mode from WebPage.cpp and WebPage_p.h
[WebKit-https.git] / Source / WebKit / blackberry / ChangeLog
1 2012-08-16  Leo Yang  <leoyang@rim.com>
2
3         [BlackBerry] Remove Mobile mode from WebPage.cpp and WebPage_p.h
4         https://bugs.webkit.org/show_bug.cgi?id=94223
5         PR #192773
6
7         Reviewed by Rob Buis.
8         Reviewed internally by Arvid Nilsson.
9
10         Remove Mobile mode as it's not been used. Also remove code that
11         handle top-level SVG document because now we can handle it in Desktop mode.
12
13         * Api/WebPage.cpp:
14         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
15         (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize):
16         * Api/WebPage_p.h:
17
18 2012-08-16  Arvid Nilsson  <anilsson@rim.com>
19
20         [BlackBerry] SurfacePool::waitForBuffer() sometimes waits for deleted EGLSyncKHR object
21         https://bugs.webkit.org/show_bug.cgi?id=94208
22
23         Reviewed by Rob Buis.
24
25         SurfacePool::notifyBuffersComposited() adds a tile's previous
26         sync object to the garbage list before replacing it with a new one.
27         However, it failed to thoroughly clear all tiles that were referencing
28         the old sync object.
29
30         Thus it could happen that if a set of tiles A was composited, then
31         another set of tiles B was composited, only the intersection of A and B
32         was cleared of the soon-to-be-deleted sync object, and the subtraction
33         A - B would reference an invalid sync object in case the BackingStore
34         decided to render to one of the tiles in A - B before they were
35         composited again.
36
37         Fixed by storing each individual sync object in only one place so we
38         don't have to rummage through all tiles and remove stale references to
39         sync objects that are about to be destroyed.
40
41         A new reference counted Fence class is added for this purpose, to store
42         a sync object. Tiles refer to Fence instances instead of holding a sync
43         object directly. Since Fence is reference counted, several tiles can
44         refer to the same Fence instance, and clearing its sync object will
45         instantly remove it from the grasp of all tiles that depend on that
46         Fence.
47
48         Since there's no point in waiting for the same Fence twice, the only
49         operation provided on Fence is takePlatformSync() which returns the
50         sync object and clears the Fence of its sync object.
51
52         Reviewed internally by Filip Spacek.
53
54         PR 193610
55
56         * WebKitSupport/BackingStoreTile.cpp:
57         (BlackBerry::WebKit::TileBuffer::TileBuffer):
58         * WebKitSupport/BackingStoreTile.h:
59         (BlackBerry):
60         (Fence):
61         (BlackBerry::Fence::create):
62         (BlackBerry::Fence::takePlatformSync):
63         (BlackBerry::Fence::Fence):
64         (BlackBerry::WebKit::TileBuffer::fence):
65         (BlackBerry::WebKit::TileBuffer::setFence):
66         (TileBuffer):
67         * WebKitSupport/SurfacePool.cpp:
68         (BlackBerry::WebKit::SurfacePool::waitForBuffer):
69         (BlackBerry::WebKit::SurfacePool::notifyBuffersComposited):
70         * WebKitSupport/SurfacePool.h:
71         (SurfacePool):
72
73 2012-08-16  Rob Buis  <rbuis@rim.com>
74
75         [BlackBerry] Suppress non DRT JS Console output.
76         https://bugs.webkit.org/show_bug.cgi?id=94058
77
78         Reviewed by Yong Li.
79         Reviewed internally by Ming Xie.
80
81         Some actual test results show JS Console showing up twice, for
82         instance traversal/moz-bug559526.html. Only print the DRT specific
83         Console message.
84
85         * WebCoreSupport/ChromeClientBlackBerry.cpp:
86         (WebCore::ChromeClientBlackBerry::addMessageToConsole):
87
88 2012-08-16  Arvid Nilsson  <anilsson@rim.com>
89
90         [BlackBerry] WebGL and Canvas fail to display after being restored from page cache
91         https://bugs.webkit.org/show_bug.cgi?id=94105
92
93         Reviewed by George Staikos.
94
95         The EGLImage was being destroyed when releasing layer resources on the
96         compositing thread, but the WebKit thread layer never found out and
97         failed to create a new image.
98
99         Fixed by extending the release layer resources mechanism to also make a
100         pass on the WebKit thread so that thread's layers have a chance to
101         delete their textures and related resources.
102
103         Reviewed internally by Filip Spacek.
104
105         PR 192899
106
107         * Api/WebPage.cpp:
108         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
109         (BlackBerry::WebKit::WebPagePrivate::releaseLayerResources):
110         (WebKit):
111         (BlackBerry::WebKit::WebPagePrivate::releaseLayerResourcesCompositingThread):
112         (BlackBerry::WebKit::WebPagePrivate::suspendRootLayerCommit):
113         * Api/WebPage_p.h:
114         (WebPagePrivate):
115         * WebKitSupport/FrameLayers.cpp:
116         (BlackBerry::WebKit::FrameLayers::releaseLayerResources):
117         (WebKit):
118         * WebKitSupport/FrameLayers.h:
119         (FrameLayers):
120
121 2012-08-16  Pierre Rossi  <pierre.rossi@gmail.com>
122
123         [Qt] Remove FontQt4, HAVE_QRAWFONT flag and the related dead code
124         https://bugs.webkit.org/show_bug.cgi?id=93960
125
126         Reviewed by Simon Hausmann.
127
128         Following the removal of Qt 4 support from trunk in r124879.
129
130         * WebCoreSupport/AboutDataHaveFeatures.in: Remove all traces of HAVE_QRAWFONT's existence.
131
132 2012-08-15  Benjamin C Meyer  <bmeyer@rim.com>
133
134         [BlackBerry] When there is an exception we want to check if the ref is 0, not the
135         value as JSObjectCallAsFunction returns 0 in that case.
136         https://bugs.webkit.org/show_bug.cgi?id=94153
137
138         Reviewed by Yong Li.
139
140         * Api/WebPage.cpp:
141         (BlackBerry::WebKit::WebPage::executeJavaScriptFunction):
142
143 2012-08-15  Yong Li  <yoli@rim.com>
144
145         [BlackBerry] Upstream FrameLoaderClientBlackBerry::securityOriginForNewDocument()
146         https://bugs.webkit.org/show_bug.cgi?id=94139
147
148         Reviewed by Antonio Gomes.
149
150         Keep same security origin when a file URL automatically redirects to its child folder.
151         This patch will be reverted when we finish the better solution.
152         PR# 172333 and PR# 180590.
153
154         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
155         (WebCore::FrameLoaderClientBlackBerry::FrameLoaderClientBlackBerry):
156         (WebCore::FrameLoaderClientBlackBerry::dispatchDidStartProvisionalLoad):
157         (WebCore::FrameLoaderClientBlackBerry::securityOriginForNewDocument):
158         (WebCore):
159         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
160         (FrameLoaderClientBlackBerry):
161
162 2012-08-15  Yong Li  <yoli@rim.com>
163
164         [BlackBerry] Should not keep recreating GeoTracker in setEnableHighAccuracy()
165         https://bugs.webkit.org/show_bug.cgi?id=94136
166
167         Reviewed by Rob Buis.
168         Internally reviewed by Lyon Chen.
169
170         PR# 192401.
171         1. The prototype of GeoTracker::create() has changed.
172         2. Fix the issue that it could recreate tracker unnecessarily when
173            setEnableHighAccuracy() is called but accuracy requirment hasn't
174            changed.
175         3. Fix the issue setEnableHighAccuracy() could start tracking when
176            tracker was suspended.
177
178         * WebCoreSupport/GeolocationControllerClientBlackBerry.cpp:
179         (GeolocationControllerClientBlackBerry::startUpdating):
180         (GeolocationControllerClientBlackBerry::setEnableHighAccuracy):
181
182 2012-08-15  Mike Fenton  <mifenton@rim.com>
183
184         [BlackBerry] Use the unconverted attribute instead of composing when deciding to how to handle key input.
185         https://bugs.webkit.org/show_bug.cgi?id=94132
186
187         Reviewed by Rob Buis.
188
189         PR 139838.
190
191         Switch direct key input handling to be based on the unconverted
192         attribute being present.  Converted keys, even during composition
193         are now input directly.
194
195         Reviewed Internally by Nima Ghanavatian.
196
197         * WebKitSupport/InputHandler.cpp:
198         (BlackBerry::WebKit::InputHandler::setText):
199
200 2012-08-15  Joshua Netterfield  <jnetterfield@rim.com>
201
202         [BlackBerry] Upstream BlackBerry build fixes
203         https://bugs.webkit.org/show_bug.cgi?id=94121
204
205         Reviewed by Rob Buis.
206
207         This includes several build fixes due to incorrect upstream patches.
208         These mistakes were never present downstream.
209
210         No new tests, because no new functionality is added.
211
212         * WebCoreSupport/AboutDataEnableFeatures.in:
213         * WebCoreSupport/AboutTemplate.html.cpp:
214         (writeHeader):
215
216 2012-08-15  Leo Yang  <leoyang@rim.com>
217
218         [BlackBerry] Use nested layout when rotating
219         https://bugs.webkit.org/show_bug.cgi?id=94117
220
221         Partially patched by Arvid Nilsson.
222
223         Reviewed by George Staikos.
224         Reviewed internally by Arvid Nilsson.
225
226         When rotating the content width used for fixedLayoutSize is not
227         correct because we are changing the rotation and the content with
228         should be determined after layout. So we set the with to 0 if we
229         are rotating and beginning the nested layout. And in setViewportSize
230         we need a nested layout loop to trigger zoom-to-fit.
231
232         * Api/WebPage.cpp:
233         (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize):
234         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
235
236 2012-08-14  Antonio Gomes  <agomes@rim.com>
237
238         [BlackBerry] Stop copying ScrollViewBase vector all over
239         https://bugs.webkit.org/show_bug.cgi?id=94021
240
241         Reviewed by Rob Buis.
242
243         It outlives long enough in WebKit that we can
244         just pass a const+ref of it.
245
246         Internally reviewed by Gen Mak.
247
248         * Api/WebPageClient.h:
249
250 2012-08-14  Antonio Gomes  <agomes@rim.com>
251
252         [BlackBerry] Robust-fy the LayerWebKitThread ownership with InRegionScroller
253         https://bugs.webkit.org/show_bug.cgi?id=93983
254         PR #191737
255
256         Reviewed by Yong Li.
257
258         Patch changes the way we currently keep track of the active scrollable area
259         objects: before, we acquired the scrollable areas and just passed them in a vector up
260         to the client, copying it over and over again. Also, it was a client responsability to
261         delete stuff (BAD!).
262         Now, we keep track of vector within InRegionScroller, as a class member, which allows us to
263         avoid copies (in follow up patch), and control until when these objects outlive.
264
265         Patch also changes InRegionScrollableArea to "retptr" the composited layer
266         associated to it (if any). This ensure we have a non-null scrollable element always.
267
268         As mentioned, InRegionScroller is now responsible for deleting and vector of scrollable areas.
269
270         Internally reviewed by Arvid Nilsson.
271
272         * Api/InRegionScroller.cpp:
273         (WebKit):
274         (BlackBerry::WebKit::InRegionScrollerPrivate::reset): Method is now responsible for
275         deleting the tracked scrollable areas.
276         (BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint):
277         Renamed from 'inRegionScrollableAreasForPoint'. It was changed in order to store the
278         scrollable area objects instead of just pass a copy of them up to the client.
279         (BlackBerry::WebKit::InRegionScrollerPrivate::activeInRegionScrollableAreas): Getter.
280         (BlackBerry::WebKit::InRegionScrollerPrivate::pushBackInRegionScrollable): It was
281         promoted to a class method instead of a local helper.
282         * Api/InRegionScroller_p.h:
283         (WebKit):
284         (InRegionScrollerPrivate):
285         * Api/WebPage.cpp:
286         (BlackBerry::WebKit::WebPagePrivate::setScrollOriginPoint): Adjustments needed due to the
287         above changed.
288         * WebKitSupport/InRegionScrollableArea.cpp:
289         (BlackBerry::WebKit::InRegionScrollableArea::~InRegionScrollableArea): Clear up the cached layer.
290         (WebKit):
291         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
292         * WebKitSupport/InRegionScrollableArea.h:
293         (InRegionScrollableArea):
294
295 2012-08-15  Nima Ghanavatian  <nghanavatian@rim.com>
296
297         [BlackBerry] Check for valid field focus before processing a spellcheck request
298         https://bugs.webkit.org/show_bug.cgi?id=94115
299
300         Reviewed by Rob Buis.
301
302         PR192891
303         Checking for valid field focus before processing the spellcheck
304         request.
305
306         Internally reviewed by Mike Fenton.
307
308         * WebKitSupport/InputHandler.cpp:
309         (BlackBerry::WebKit::InputHandler::requestCheckingOfString):
310
311 2012-08-14  Adam Barth  <abarth@webkit.org>
312
313         Delete Frame::domWindow() and Frame::existingDOMWindow()
314         https://bugs.webkit.org/show_bug.cgi?id=93990
315
316         Reviewed by Eric Seidel.
317
318         * WebCoreSupport/ChromeClientBlackBerry.cpp:
319         (WebCore::toOriginString):
320         (WebCore::ChromeClientBlackBerry::runJavaScriptAlert):
321         (WebCore::ChromeClientBlackBerry::runJavaScriptConfirm):
322         (WebCore::ChromeClientBlackBerry::runJavaScriptPrompt):
323         (WebCore::ChromeClientBlackBerry::runBeforeUnloadConfirmPanel):
324         (WebCore::ChromeClientBlackBerry::requestWebGLPermission):
325
326 2012-08-14  Leo Yang  <leoyang@rim.com>
327
328         [BlackBerry] Checkerboard flashes on Go Back
329         https://bugs.webkit.org/show_bug.cgi?id=94018
330
331         Reviewed by Yong Li.
332         Reviewed internally by Yong Li.
333
334         The backing store need to be suspended before the
335         WebPagePrivate::restoreHistoryViewState() is called to avoid UI thread
336         drawing checkerboard.
337
338         * Api/WebPage.cpp:
339         (BlackBerry::WebKit::WebPagePrivate::restoreHistoryViewState):
340         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
341         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
342
343 2012-08-14  Mike Fenton  <mifenton@rim.com>
344
345         [BlackBerry] Remove unnecessary \n's from InputHandler log messages.
346         https://bugs.webkit.org/show_bug.cgi?id=94015
347
348         Reviewed by Rob Buis.
349
350         Remove many unnecessary \n's from the end of log messages.
351
352         Reviewed Internally by Nima Ghanavatian.
353
354         * WebKitSupport/InputHandler.cpp:
355         (BlackBerry::WebKit::convertStringToWcharVector):
356         (BlackBerry::WebKit::convertSpannableStringToString):
357         (BlackBerry::WebKit::InputHandler::spannableTextInRange):
358         (BlackBerry::WebKit::InputHandler::setText):
359         (BlackBerry::WebKit::InputHandler::setSpannableTextAndRelativeCursor):
360
361 2012-08-14  Nima Ghanavatian  <nghanavatian@rim.com>
362
363         [BlackBerry] Queue spellcheck requests with char-count limitations
364         https://bugs.webkit.org/show_bug.cgi?id=93866
365
366         Reviewed by Rob Buis.
367
368         PR184196
369         Making spellcheck a little more granular so as to work around
370         the limitations of the inputservice.
371         Also, spellcheck the entire field on focus only if
372         spellcheck="on" is explicitly set.
373
374         Internally reviewed by Mike Fenton.
375
376         * WebKitSupport/InputHandler.cpp:
377         (BlackBerry::WebKit::InputHandler::requestCheckingOfString):
378         (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
379
380 2012-08-14  Mike Fenton  <mifenton@rim.com>
381
382         [BlackBerry] Use Form helper functions to determine state in DOMSupport::isTextBasedContentEditableElement
383         https://bugs.webkit.org/show_bug.cgi?id=93992
384
385         Reviewed by Antonio Gomes.
386
387         Use form control helper functions to determine the editable state
388         of the input field.
389
390         * WebKitSupport/DOMSupport.cpp:
391         (BlackBerry::WebKit::DOMSupport::isTextBasedContentEditableElement):
392
393 2012-08-14  Mike Fenton  <mifenton@rim.com>
394
395         [BlackBerry] Use constructor to initialize rect in TouchEventHandler::drawTapHighlight()
396         https://bugs.webkit.org/show_bug.cgi?id=93988
397
398         Reviewed by Antonio Gomes.
399
400         Use constructor to initialize rect in TouchEventHandler::drawTapHighlight()
401
402         * WebKitSupport/TouchEventHandler.cpp:
403         (BlackBerry::WebKit::TouchEventHandler::drawTapHighlight):
404
405 2012-08-14  Mike Fenton  <mifenton@rim.com>
406
407         [BlackBerry] Fix use of endsWith to use string instead of char.
408         https://bugs.webkit.org/show_bug.cgi?id=93994
409
410         Reviewed by Antonio Gomes.
411
412         Regex comparison should use string instead of char comparison.
413
414         * WebKitSupport/DOMSupport.cpp:
415         (BlackBerry::WebKit::DOMSupport::elementPatternMatches):
416
417 2012-08-14  Jacky Jiang  <zhajiang@rim.com>
418
419         [BlackBerry] Double-tap zoom on blocks on cnn.com desktop page doesn't work
420         https://bugs.webkit.org/show_bug.cgi?id=93895
421
422         Reviewed by Antonio Gomes.
423         Patch by Jacky Jiang  <zhajiang@rim.com>
424
425         PR: 188232
426         When adjusting block zoom node, don't choose a node if the width of the
427         node size is very close to the width of the actual visible size as
428         block zoom can do nothing on such kind of node. This condition is more
429         restrictive than the one based on area and can bail out early.
430         In this way, we can get a better node for double-tap zoom.
431
432         * Api/WebPage.cpp:
433         (BlackBerry::WebKit::WebPagePrivate::bestNodeForZoomUnderPoint):
434         (BlackBerry::WebKit::WebPagePrivate::adjustedBlockZoomNodeForZoomAndExpandingRatioLimits):
435         * Api/WebPage_p.h:
436         (WebPagePrivate):
437
438 2012-08-14  Konrad Piascik  <kpiascik@rim.com>
439
440         [BlackBerry] Change the call to setUserScalable to use the setting.
441         https://bugs.webkit.org/show_bug.cgi?id=93974
442
443         Reviewed by Rob Buis.
444
445         We should be using the WebSetting and not the current value of m_userScalable.
446
447         * Api/WebPage.cpp:
448         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
449
450 2012-08-14  Charles Wei  <charles.wei@torchmobile.com.cn>
451
452         [BlackBerry] Some callback of Select onchange doesn't work
453         https://bugs.webkit.org/show_bug.cgi?id=93944
454
455         Reviewed by George Staikos.
456
457         The Selection element is implemented with PagePopup, an HTML-based WebView with
458         some Javascripts to make the UI of the select and option lists; The selection
459         change is initiated from the javascript code in the Select Webview, and back to
460         the native code of SelectPopupClient, which now in turn dispatches
461         FormControlChangeEvent to the select element directly, and that causes the
462         javascript callback been invoked in the same cycle as the javascript in the
463         Popup View, and causes some Javascript Context problem.
464
465         The solution is to send the FormControlChangeEvent asynchronously by a timer, 
466         when the JavaScript in the Popup view finishes execution, we then send the
467         FormControlChangeEvent to the select element in the content page, that avoids
468         the concurrent Javascript context issue.
469
470         * WebCoreSupport/SelectPopupClient.cpp:
471         (WebCore::SelectPopupClient::SelectPopupClient):
472         (WebCore::SelectPopupClient::setValueAndClosePopup):
473         (WebCore):
474         (WebCore::SelectPopupClient::notifySelectionChange):
475         * WebCoreSupport/SelectPopupClient.h:
476         (SelectPopupClient):
477
478 2012-08-14  Arvid Nilsson  <anilsson@rim.com>
479
480         [BlackBerry] Get rid of glCopyTexImage2D in Canvas and WebGL code paths
481         https://bugs.webkit.org/show_bug.cgi?id=93614
482
483         Reviewed by Antonio Gomes.
484
485         We used to set up resource sharing between the compositing thread
486         context and the Canvas and WebGL contexts, and use glCopyTexImage2D to
487         get a copy of the framebuffer to use as front buffer for compositing
488         purposes.
489
490         Now we instead create an EGLImage and blit the Canvas/WebGL output to
491         it. The compositing thread creates a texture from the EGLImage in order
492         to composite the output.
493
494         This allows us to turn off resource sharing, so the WebPageCompositor
495         no longer needs to pass the compositing thread context to the webkit
496         thread.
497
498         Reviewed internally by Filip Spacek.
499
500         PR 188472
501
502         * Api/WebPage.cpp:
503         (BlackBerry::WebKit::WebPagePrivate::setCompositor):
504         (BlackBerry::WebKit::WebPagePrivate::setCompositorHelper):
505         * Api/WebPageCompositor.cpp:
506         (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor):
507         (BlackBerry::WebKit::WebPageCompositor::~WebPageCompositor):
508         * Api/WebPage_p.h:
509         (WebPagePrivate):
510
511 2012-08-14  Charles Wei  <charles.wei@torchmobile.com.cn>
512
513         [BlackBerry] Enable DNS prefetch
514         https://bugs.webkit.org/show_bug.cgi?id=93846
515
516         Reviewed by George Staikos.
517
518
519         * Api/WebPage.cpp:
520         (BlackBerry::WebKit::WebPagePrivate::init):
521
522 2012-08-13  Tom Sepez  <tsepez@chromium.org>
523
524         [chromium] release FrameLoaderClientImpl::m_pluginWidget refptr upon Plugin Document detach.
525         https://bugs.webkit.org/show_bug.cgi?id=93283
526
527         Reviewed by Eric Seidel.
528
529         Change the client redirectDataToPlugin method(s) to expect the possibility of
530         a NULL argument, keeping existing behaviour otherwise.
531
532         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
533         (WebCore::FrameLoaderClientBlackBerry::redirectDataToPlugin):
534
535 2012-08-13  Mike Fenton  <mifenton@rim.com>
536
537         [BlackBerry] Update API for spell checking suggestions again.
538         https://bugs.webkit.org/show_bug.cgi?id=93877
539
540         Reviewed by Antonio Gomes.
541
542         PR 163283.
543
544         Update the spell checking options request API
545         to include the caret positions.
546
547         Reviewed internally by Nima Ghanavatian.
548
549         * Api/WebPageClient.h:
550         * WebKitSupport/InputHandler.cpp:
551         (BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint):
552         (WebKit):
553         (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions):
554         * WebKitSupport/InputHandler.h:
555         (Platform):
556         (InputHandler):
557         * WebKitSupport/TouchEventHandler.cpp:
558         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
559         * WebKitSupport/TouchEventHandler.h:
560         (TouchEventHandler):
561
562 2012-08-13  Antonio Gomes  <agomes@rim.com>
563
564         [BlackBerry] Rounding error somewhere when translating CompositingLayer 's for in-region scrolling
565         https://bugs.webkit.org/show_bug.cgi?id=93848
566         PR #190986
567
568         Reviewed by Yong Li.
569
570         Patch adds a WebKit thread setScrollPosition-like API to InRegionScroller.
571         It fixes a mismatch we had of setting a layer's scroll positing directly via
572         ::setScrollPosition on the UI thread, but dispatching a coalesceable
573         scrollBy(delta) message to WebKit thread.
574
575         * Api/InRegionScroller.cpp:
576         (BlackBerry::WebKit::InRegionScroller::setScrollPositionCompositingThread):
577         Changed the API name to match other thread specific methods naming.
578         (WebKit):
579         (BlackBerry::WebKit::InRegionScroller::setScrollPositionWebKitThread):
580         Added a setScrollPosition-like method to InRegionScroller public API. Used
581         together with its UI-thread counterpart, it can fix some rounding
582         errors we have due to mixing ::setScrollPosition and ::scrollBy methods.
583         (BlackBerry::WebKit::InRegionScrollerPrivate::setScrollPositionCompositingThread):
584         Method renamed. See reasons above.
585         (BlackBerry::WebKit::InRegionScrollerPrivate::setScrollPositionWebKitThread):
586         Calls fowards the call to ::setLayerScrollPosition (below).
587         (BlackBerry::WebKit::InRegionScrollerPrivate::setLayerScrollPosition):
588         Sets the scroll position of a given RenderLayer.
589         * Api/InRegionScroller.h:
590         (InRegionScroller):
591         * Api/InRegionScroller_p.h:
592         (WebCore):
593         (InRegionScrollerPrivate):
594         * WebKitSupport/InRegionScrollableArea.cpp:
595         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
596         Cache the RenderLayer object associated to a given scrollable area
597         instead of its LayerCompositingThread. This way we can use it for
598         scrolling from both Compositing/UI and WebKit threads.
599
600 2012-08-12  Arvid Nilsson  <anilsson@rim.com>
601
602         [BlackBerry] Tap highlight flashes checkerboard after pinch zoom
603         https://bugs.webkit.org/show_bug.cgi?id=93601
604
605         Reviewed by Antonio Gomes.
606
607         Since the tap highlight is usually rather small, we can reimplement
608         GraphicsLayerClient::contentsVisible() to always return true in order
609         to keep all AC layer tiles cached all the time.
610
611         PR 189895
612
613         * WebKitSupport/DefaultTapHighlight.cpp:
614         (BlackBerry::WebKit::DefaultTapHighlight::contentsVisible):
615         (WebKit):
616         * WebKitSupport/DefaultTapHighlight.h:
617         (DefaultTapHighlight):
618
619 2012-08-12  Arvid Nilsson  <anilsson@rim.com>
620
621         [BlackBerry] Tap highlight sometimes doesn't disappear
622         https://bugs.webkit.org/show_bug.cgi?id=93711
623
624         Reviewed by Antonio Gomes.
625
626         The WebOverlayOverride implementation just changes properties of a
627         LayerCompositingThread directly, which means the changes will
628         immediately be overwritten on the next commit. Therefore, when the tap
629         highlight implementation adds a fade out animation, that animation will
630         instantly be removed again if a commit happens for any reason.
631
632         The reason is I totally botched the implementation of
633         WebOverlayOverride, it's not wrapping WebCore::LayerOverride at all,
634         instead for some reason it's manipulating the LayerCompositingThread
635         directly.
636
637         Fixed by actually mapping WebOverlayOverride calls to the corresponding
638         WebCore::LayerOverride method, and scheduling a compositing run to make
639         the change visible and kick off animations.
640
641         Reviewed internally by Sean Wang.
642
643         PR 188453
644
645         * Api/WebOverlay.cpp:
646         (BlackBerry::WebKit::WebOverlayPrivate::override):
647         * Api/WebOverlayOverride.cpp:
648         (BlackBerry::WebKit::WebOverlayOverride::WebOverlayOverride):
649         (BlackBerry::WebKit::WebOverlayOverride::~WebOverlayOverride):
650         (BlackBerry::WebKit::WebOverlayOverride::setPosition):
651         (BlackBerry::WebKit::WebOverlayOverride::setAnchorPoint):
652         (BlackBerry::WebKit::WebOverlayOverride::setSize):
653         (BlackBerry::WebKit::WebOverlayOverride::setTransform):
654         (BlackBerry::WebKit::WebOverlayOverride::setOpacity):
655         (BlackBerry::WebKit::WebOverlayOverride::addAnimation):
656         (BlackBerry::WebKit::WebOverlayOverride::removeAnimation):
657         * Api/WebOverlayOverride.h:
658         * Api/WebOverlay_p.h:
659         (WebOverlayPrivate):
660         (WebOverlayPrivateWebKitThread):
661         (WebOverlayPrivateCompositingThread):
662
663 2012-08-10  Benjamin C Meyer  <bmeyer@rim.com>
664
665         Introduce JavaScriptVariant object.
666         https://bugs.webkit.org/show_bug.cgi?id=93644
667
668         The JavaScriptVariant can be used for functions that return results from
669         JavaScript such as executeJavaScript or functions that take arguments
670         to pass a variable to JavaScript and they want to make sure the type
671         is correct.
672
673         Convert executeJavaScriptFunction() to use this data type as the
674         example, other functions will be converted in the future.
675
676         PR 14929
677
678         Internally reviewed by Joe Mason
679         Reviewed by Adam Treat
680
681         * Api/JavaScriptVariant.cpp: Added.
682         (WebKit):
683         (BlackBerry::WebKit::JSValueRefToBlackBerryJavaScriptVariant):
684         (BlackBerry::WebKit::BlackBerryJavaScriptVariantToJSValueRef):
685         (BlackBerry::WebKit::JavaScriptVariant::JavaScriptVariant):
686         (BlackBerry::WebKit::JavaScriptVariant::~JavaScriptVariant):
687         (BlackBerry::WebKit::JavaScriptVariant::operator=):
688         (BlackBerry::WebKit::JavaScriptVariant::setType):
689         (BlackBerry::WebKit::JavaScriptVariant::type):
690         (BlackBerry::WebKit::JavaScriptVariant::setDouble):
691         (BlackBerry::WebKit::JavaScriptVariant::doubleValue):
692         (BlackBerry::WebKit::JavaScriptVariant::setString):
693         (BlackBerry::WebKit::JavaScriptVariant::stringValue):
694         (BlackBerry::WebKit::JavaScriptVariant::setBoolean):
695         (BlackBerry::WebKit::JavaScriptVariant::booleanValue):
696         * Api/JavaScriptVariant.h: Added.
697         (WebKit):
698         * Api/JavaScriptVariant_p.h: Added.
699         (WebKit):
700         * Api/WebPage.cpp:
701         (BlackBerry::WebKit::WebPage::executeJavaScriptFunction):
702         * Api/WebPage.h:
703
704 2012-08-09  Leo Yang  <leoyang@rim.com>
705
706         [BlackBerry] Export InRegionScroller to fix build
707         https://bugs.webkit.org/show_bug.cgi?id=93635
708
709         Reviewed by Antonio Gomes.
710
711         Build fix.
712
713         * Api/InRegionScroller.h:
714
715 2012-08-08  Jacky Jiang  <zhajiang@rim.com>
716
717         [BlackBerry] Implement about:memory-live
718         https://bugs.webkit.org/show_bug.cgi?id=93153
719
720         Reviewed by Yong Li.
721         Patch by Jacky Jiang  <zhajiang@rim.com>
722
723         Implementing about:memory-live to track memory peaks:
724         - about:memory-live/start: start tracking memory peaks.
725         - about:memory-live: show memory peaks every 30ms.
726         - about:memory-live/stop: stop tracking and show memory peaks.
727
728         Mainly track the following memory peaks:
729         - Total used memory (malloc + JSC).
730         - Total committed memory.
731         - Total mapped memory.
732
733         Add total committed memory for about:memory
734
735         * WebKitSupport/AboutData.cpp:
736         (BlackBerry::WebKit::memoryPage):
737         (WebKit):
738         (MemoryTracker):
739         (BlackBerry::WebKit::MemoryTracker::isActive):
740         (BlackBerry::WebKit::MemoryTracker::clear):
741         (BlackBerry::WebKit::MemoryTracker::peakTotalUsedMemory):
742         (BlackBerry::WebKit::MemoryTracker::peakTotalCommittedMemory):
743         (BlackBerry::WebKit::MemoryTracker::peakTotalMappedMemory):
744         (BlackBerry::WebKit::MemoryTracker::MemoryTracker):
745         (BlackBerry::WebKit::MemoryTracker::instance):
746         (BlackBerry::WebKit::MemoryTracker::start):
747         (BlackBerry::WebKit::MemoryTracker::stop):
748         (BlackBerry::WebKit::MemoryTracker::updateMemoryPeaks):
749         (BlackBerry::WebKit::memoryPeaksToHtmlTable):
750         (BlackBerry::WebKit::memoryLivePage):
751         (BlackBerry::WebKit::aboutData):
752
753 2012-08-08  Antonio Gomes  <agomes@rim.com>
754
755         [BlackBerry] Tie up the scrolling machinery to the graphics tree when applicable for in-region scroll
756         https://bugs.webkit.org/show_bug.cgi?id=93482
757         PR #187672
758         Make InRegionScroller a simple public webkit/ API
759         PR #188677
760
761         Reviewed by Rob Buis.
762
763         In order to prepare InRegionScroller to be a public API
764         in webkit/, the patch:
765
766         1) Renamed the current InRegionScroller class to InRegionScrollerPrivate;
767         2) Moved InRegionScroller.cpp|h from WebKitSupport/ to Api/;
768         3) Renamed InRegionScroller.h to InRegionScroller_p.h;
769         4) Added a new public class implementation to InRegionScroller.h;
770         5) Adapted WebPage and TouchEventHandler classes to use InRegionScroller::d directly.
771
772         The most important API here is '::compositedSetScrollPosition'
773
774         It is a  UI/Compositing thread method only and sets the associated LayerCompositingThread
775         (camouflaged as a unsigned) for each created InRegionScrollableArea that supports
776         composited scrolling.
777
778         The way ::compositedSetScrollPosition "scrolls" a layer is by setting the boundsOrigin
779         property to the LayerCompositingThread's 'override' property in the UI/Compositing thread.
780
781         * Api/InRegionScroller.cpp: Renamed from Source/WebKit/blackberry/WebKitSupport/InRegionScroller.cpp.
782         (WebKit):
783         (BlackBerry::WebKit::InRegionScroller::InRegionScroller):
784         (BlackBerry::WebKit::InRegionScroller::~InRegionScroller):
785         (BlackBerry::WebKit::InRegionScroller::compositedSetScrollPosition):
786         (BlackBerry::WebKit::InRegionScrollerPrivate::InRegionScrollerPrivate):
787         (BlackBerry::WebKit::InRegionScrollerPrivate::setNode):
788         (BlackBerry::WebKit::InRegionScrollerPrivate::node):
789         (BlackBerry::WebKit::InRegionScrollerPrivate::reset):
790         (BlackBerry::WebKit::InRegionScrollerPrivate::hasNode):
791         (BlackBerry::WebKit::InRegionScrollerPrivate::canScroll):
792         (BlackBerry::WebKit::InRegionScrollerPrivate::compositedSetScrollPosition):
793         (BlackBerry::WebKit::InRegionScrollerPrivate::scrollBy):
794         (BlackBerry::WebKit::InRegionScrollerPrivate::inRegionScrollableAreasForPoint):
795         (BlackBerry::WebKit::InRegionScrollerPrivate::scrollNodeRecursively):
796         (BlackBerry::WebKit::InRegionScrollerPrivate::scrollRenderer):
797         (BlackBerry::WebKit::InRegionScrollerPrivate::adjustScrollDelta):
798         (BlackBerry::WebKit::canScrollInnerFrame):
799         (BlackBerry::WebKit::canScrollRenderBox):
800         (BlackBerry::WebKit::parentLayer):
801         (BlackBerry::WebKit::enclosingLayerNode):
802         (BlackBerry::WebKit::isNonRenderViewFixedPositionedContainer):
803         (BlackBerry::WebKit::pushBackInRegionScrollable):
804         * Api/InRegionScroller.h: Copied from Source/WebKit/blackberry/WebKitSupport/InRegionScroller.h.
805         (WebKit):
806         (InRegionScroller):
807         * Api/InRegionScroller_p.h: Renamed from Source/WebKit/blackberry/WebKitSupport/InRegionScroller.h.
808         (WebCore):
809         (WebKit):
810         (InRegionScrollerPrivate):
811         * Api/WebPage.cpp:
812         (BlackBerry::WebKit::WebPagePrivate::scrollBy):
813         (BlackBerry::WebKit::WebPagePrivate::notifyInRegionScrollStatusChanged):
814         (BlackBerry::WebKit::WebPagePrivate::clearDocumentData):
815         (BlackBerry::WebKit::WebPagePrivate::setScrollOriginPoint):
816         (BlackBerry::WebKit::WebPage::inRegionScroller):
817         (WebKit):
818         * Api/WebPage.h:
819         (WebKit):
820         * WebKitSupport/InRegionScrollableArea.cpp:
821         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
822         * WebKitSupport/TouchEventHandler.cpp:
823         (BlackBerry::WebKit::TouchEventHandler::drawTapHighlight):
824
825 2012-08-08  Antonio Gomes  <agomes@rim.com>
826
827         [BlackBerry] Make WebOverlayPrivate::scheduleCompositingRun a WebPagePrivate method.
828         https://bugs.webkit.org/show_bug.cgi?id=93480
829         PR #188682
830
831         Reviewed by Rob Buis.
832
833         ... this way it can be used by others.
834
835         No behavioural change. Another preparation patch.
836
837         * Api/WebOverlay.cpp:
838         (BlackBerry::WebKit::WebOverlayPrivate::scheduleCompositingRun):
839         * Api/WebPage.cpp:
840         (WebKit):
841         (BlackBerry::WebKit::WebPagePrivate::scheduleCompositingRun):
842         * Api/WebPage_p.h:
843         (WebPagePrivate):
844
845 2012-08-08  Sheriff Bot  <webkit.review.bot@gmail.com>
846
847         Unreviewed, rolling out r124887.
848         http://trac.webkit.org/changeset/124887
849         https://bugs.webkit.org/show_bug.cgi?id=93504
850
851         Dependent API being removed. (Requested by mfenton on
852         #webkit).
853
854         * Api/WebPageClient.h:
855         * WebKitSupport/InputHandler.cpp:
856         * WebKitSupport/InputHandler.h:
857         (InputHandler):
858         * WebKitSupport/TouchEventHandler.cpp:
859         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
860         (BlackBerry::WebKit::TouchEventHandler::spellCheck):
861         (WebKit):
862         * WebKitSupport/TouchEventHandler.h:
863         (TouchEventHandler):
864
865 2012-08-08  Ed Baker  <edbaker@rim.com>
866
867         [BlackBerry] Add relayout after updating fixed reported size
868         https://bugs.webkit.org/show_bug.cgi?id=93116
869         PR #160059
870         
871         Reviewed by Antonio Gomes.
872         
873         Reviewed internally by Antonio Gomes.
874
875         On an orientation change and after fixed reported size is
876         updated perform a layout and update the fixed elements after
877         scrolling. This will recalculate the height and width of
878         fixed position elements using percentage values with the
879         new fixed reported size. Otherwise using the old fixed reported
880         size in the new orientation overflowing or clipping could occur.
881         
882         * Api/WebPage.cpp:
883         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
884
885 2012-08-07  Charles Wei  <charles.wei@torchmobile.com.cn>
886
887         [BlackBerry] always set PolicyAction to PolicyIgnore if the chrome returns false for acceptNavigationRequest
888         https://bugs.webkit.org/show_bug.cgi?id=93251
889
890         Reviewed by George Staikos.
891
892         In acceptNavigationRequest(), webkit will ask if the chrome will accept the navigation request.
893         We will take this chance to see if the request is an internal-webkit protocol, otherwise,
894         we will try to launch an external application to handle the request, and ask webkit to ignore
895         the request by returning false in acceptNavigationRequest().
896
897         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
898         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction):
899
900 2012-08-07  Konrad Piascik  <kpiascik@rim.com>
901
902         [BlackBerry] Change how devicePixelRatio is set.
903         https://bugs.webkit.org/show_bug.cgi?id=93385
904
905         Reviewed by Antonio Gomes.
906
907         Change devicePixelRatio to be set immediately after the page is created based
908         on the WebSetting.
909
910         * Api/WebPage.cpp:
911         (BlackBerry::WebKit::WebPagePrivate::init):
912         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
913
914 2012-08-07  Antonio Gomes  <agomes@rim.com>
915
916         [BlackBerry] [FullScreen] No need to scroll 'x' to 0 before entering fullscreen
917         https://bugs.webkit.org/show_bug.cgi?id=91750
918         PR #178293
919
920         Reviewed by Rob Buis.
921
922         We are not adjusting the 'left' CSS property of the fullscreen wrapper
923         properly, so no need to scroll 'x' to 0 anymore.
924
925         Internally reviewed by Jacky Jiang.
926
927         * Api/WebPage.cpp:
928         (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
929
930 2012-08-07  Antonio Gomes  <agomes@rim.com>
931
932         [BlackBerry][FullScreen] Remove the set/reset of touch modes code when entering/leaving fullscreen
933         https://bugs.webkit.org/show_bug.cgi?id=92520
934         PR #184511
935
936         Reviewed by Yong Li.
937         Internally reviewed by Gen Mak.
938
939         Remove touch mode set/reset when entering/leaving fullscreen
940         for media elements through the new FULLSCREEN_API code path.
941         The client now handles it.
942
943         * Api/WebPage.cpp:
944         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
945         (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
946         (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
947         * Api/WebPage_p.h:
948         (WebPagePrivate):
949
950 2012-08-07  Konrad Piascik  <kpiascik@rim.com>
951
952         [BlackBerry] Add missing include in FrameLoaderClienBlackBerry after Base64 moved.
953         https://bugs.webkit.org/show_bug.cgi?id=93383
954
955         Reviewed by Rob Buis.
956
957         Base64 moved from platform/text to wtf/text, need to add mssing
958         include.
959
960         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
961
962 2012-08-07  Konrad Piascik  <kpiascik@rim.com>
963
964         [BlackBerry] InspectorOverlay class duplicated in WebCore
965         https://bugs.webkit.org/show_bug.cgi?id=93124
966
967         Reviewed by Rob Buis.
968
969         Moved files to better align with namespace names.
970
971         * WebKitSupport/InspectorOverlay.cpp: Renamed from Source/WebKit/blackberry/WebCoreSupport/InspectorOverlay.cpp.
972         (WebKit):
973         (BlackBerry::WebKit::InspectorOverlay::create):
974         (BlackBerry::WebKit::InspectorOverlay::InspectorOverlay):
975         (BlackBerry::WebKit::InspectorOverlay::notifySyncRequired):
976         (BlackBerry::WebKit::InspectorOverlay::paintContents):
977         (BlackBerry::WebKit::InspectorOverlay::showDebugBorders):
978         (BlackBerry::WebKit::InspectorOverlay::showRepaintCounter):
979         (BlackBerry::WebKit::InspectorOverlay::~InspectorOverlay):
980         (BlackBerry::WebKit::InspectorOverlay::clear):
981         (BlackBerry::WebKit::InspectorOverlay::update):
982         * WebKitSupport/InspectorOverlay.h: Renamed from Source/WebKit/blackberry/WebCoreSupport/InspectorOverlay.h.
983         (WebCore):
984         (WebKit):
985         (InspectorOverlay):
986         (InspectorOverlayClient):
987         (BlackBerry::WebKit::InspectorOverlay::setClient):
988         (BlackBerry::WebKit::InspectorOverlay::notifyAnimationStarted):
989
990 2012-08-07  Mike Fenton  <mifenton@rim.com>
991
992         [BlackBerry] Update API for spell checking suggestions.
993         https://bugs.webkit.org/show_bug.cgi?id=93356
994
995         Reviewed by Antonio Gomes.
996
997         PR 163283.
998
999         Add connections for updated spell checking options request API.  Move
1000         all this logic into InputHandler.
1001
1002         Reviewed Internally by Gen Mak and Nima Ghanavatian.
1003
1004         * Api/WebPageClient.h:
1005         * WebKitSupport/InputHandler.cpp:
1006         (BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint):
1007         (WebKit):
1008         (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions):
1009         * WebKitSupport/InputHandler.h:
1010         (Platform):
1011         (InputHandler):
1012         * WebKitSupport/TouchEventHandler.cpp:
1013         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
1014         * WebKitSupport/TouchEventHandler.h:
1015         (TouchEventHandler):
1016
1017 2012-08-06  Charles Wei  <charles.wei@torchmobile.com.cn>
1018
1019         [BlackBerry] About: shows PAGE_CACHE not enabled.
1020         https://bugs.webkit.org/show_bug.cgi?id=93216
1021
1022         Reviewed by Antonio Gomes.
1023
1024         Page cache is a feature that can be enabled/disabled at runtime, there's no
1025         MACRO named PAGE_CACHE to control the feature.
1026
1027         * WebCoreSupport/AboutDataEnableFeatures.in:
1028
1029 2012-08-03  Yong Li  <yoli@rim.com>
1030
1031         [BlackBerry] FrameLoaderClient::restoreViewState() shouldn't trigger painting
1032         https://bugs.webkit.org/show_bug.cgi?id=93141
1033
1034         Reviewed by Rob Buis.
1035
1036         PR# 172041.
1037         It is not always safe to render the page at this point. So we post a message
1038         instead.
1039
1040         * Api/WebPage.cpp:
1041         (WebKit):
1042         (BlackBerry::WebKit::WebPagePrivate::restoreHistoryViewState):
1043         * Api/WebPage_p.h:
1044         (WebPagePrivate):
1045         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1046         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
1047
1048 2012-08-03  Konrad Piascik  <kpiascik@rim.com>
1049
1050         [BlackBerry] InspectorOverlay class duplicated in WebCore
1051         https://bugs.webkit.org/show_bug.cgi?id=93124
1052
1053         Reviewed by Rob Buis.
1054
1055         Changed namespace of InspectorOverlay from WebCore to
1056         BlackBerry::WebKit
1057
1058         * Api/WebPage.cpp:
1059         (WebKit):
1060         (BlackBerry::WebKit::WebPagePrivate::setInspectorOverlayClient):
1061         * Api/WebPage_p.h:
1062         (WebPagePrivate):
1063         * WebCoreSupport/InspectorClientBlackBerry.h:
1064         * WebCoreSupport/InspectorOverlay.cpp:
1065         (BlackBerry::WebKit::InspectorOverlay::create):
1066         (BlackBerry::WebKit::InspectorOverlay::InspectorOverlay):
1067         (BlackBerry::WebKit::InspectorOverlay::notifySyncRequired):
1068         (BlackBerry::WebKit::InspectorOverlay::paintContents):
1069         (BlackBerry::WebKit::InspectorOverlay::showDebugBorders):
1070         (BlackBerry::WebKit::InspectorOverlay::showRepaintCounter):
1071         (BlackBerry::WebKit::InspectorOverlay::contentsVisible):
1072         (BlackBerry::WebKit::InspectorOverlay::update):
1073         * WebCoreSupport/InspectorOverlay.h:
1074         (WebKit):
1075         (InspectorOverlayClient):
1076         (InspectorOverlay):
1077         (BlackBerry::WebKit::InspectorOverlay::notifyAnimationStarted):
1078
1079 2012-08-03  Arvid Nilsson  <anilsson@rim.com>
1080
1081         [BlackBerry] Overlays display checkerboard that doesn't resolve
1082         https://bugs.webkit.org/show_bug.cgi?id=93099
1083
1084         Reviewed by Antonio Gomes.
1085
1086         The WebKit-thread overlays, like tap highlight, inspector highlight and
1087         selection are all part of a separate graphics layer tree rooted in
1088         WebPagePrivate::m_overlayLayer.
1089
1090         When LayerRenderer needs to schedule a commit to reactively render
1091         tiles and resolve checkerboard, it does so through the root layer.
1092         Since the overlay layer root didn't have a GraphicsLayerClient, there
1093         was no implementation of GraphicsLayerClient::notifySyncRequired() to
1094         call, and a commit was never scheduled, thus checkerboard never
1095         resolved.
1096
1097         Fixed by adding a fallback implementation of GraphicsLayerClient in
1098         WebPagePrivate and hooking up the overlay root to it. Also, this
1099         implementation can be shared by the various overlays to avoide code
1100         duplication, specifically to implement notifySyncRequired(),
1101         showDebugBorders() and showRepaintCounter() only once.
1102
1103         Fixing this revealed a bug where the web page would get stuck in an
1104         endless sequence of commits. It turned out that
1105         WebPagePrivate::updateDelegatedOverlays() was called right in the
1106         middle of the commit operation, after performing the webkit thread part
1107         of the commit operation but before we continued on the compositing
1108         thread. Since updateDelegatedOverlays() typically mutates layers, this
1109         is very bad (layers should not be mutated mid-commit). The mutations
1110         also cause a new commit to scheduled from within the current, which
1111         results in an endless sequence of commits.
1112
1113         Fixed this latter bug by moving the updateDelegatedOverlays() call to
1114         the beginning of the method where it can cause no harm. This is before
1115         we mark the web page as no longer needing commit, so even if the
1116         implementation flips the "needs commit" bit, we will immediately flip
1117         it back and proceed with commit as usual.
1118
1119         PR 187458, 184377
1120
1121         * Api/WebPage.cpp:
1122         (BlackBerry::WebKit::WebPagePrivate::overlayLayer):
1123         (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
1124         (WebKit):
1125         (BlackBerry::WebKit::WebPagePrivate::notifySyncRequired):
1126         (BlackBerry::WebKit::WebPagePrivate::showDebugBorders):
1127         (BlackBerry::WebKit::WebPagePrivate::showRepaintCounter):
1128         * Api/WebPage_p.h:
1129         (WebPagePrivate):
1130         (BlackBerry::WebKit::WebPagePrivate::notifyAnimationStarted):
1131         (BlackBerry::WebKit::WebPagePrivate::paintContents):
1132         * WebCoreSupport/InspectorOverlay.cpp:
1133         (WebCore::InspectorOverlay::notifySyncRequired):
1134         (WebCore::InspectorOverlay::showDebugBorders):
1135         (WebCore::InspectorOverlay::showRepaintCounter):
1136         * WebKitSupport/DefaultTapHighlight.cpp:
1137         (BlackBerry::WebKit::DefaultTapHighlight::notifySyncRequired):
1138         (BlackBerry::WebKit::DefaultTapHighlight::showDebugBorders):
1139         (WebKit):
1140         (BlackBerry::WebKit::DefaultTapHighlight::showRepaintCounter):
1141         * WebKitSupport/DefaultTapHighlight.h:
1142         (DefaultTapHighlight):
1143         * WebKitSupport/SelectionOverlay.cpp:
1144         (BlackBerry::WebKit::SelectionOverlay::notifySyncRequired):
1145         (BlackBerry::WebKit::SelectionOverlay::showDebugBorders):
1146         (WebKit):
1147         (BlackBerry::WebKit::SelectionOverlay::showRepaintCounter):
1148         * WebKitSupport/SelectionOverlay.h:
1149         (SelectionOverlay):
1150
1151 2012-08-02  Arvid Nilsson  <anilsson@rim.com>
1152
1153         [BlackBerry] Add default implementation of GraphicsLayerClient::contentsVisible()
1154         https://bugs.webkit.org/show_bug.cgi?id=93036
1155
1156         Reviewed by George Staikos.
1157
1158         Remove implementation of GraphicsLayerClient::contentsVisible() now
1159         that it has a default implementation.
1160
1161         This also fixes a bug where memory usage for the inspector highlight
1162         overlay would balloon because it returned true from contentsVisible()
1163         which would cause the LayerTiler to populate all tiles. The default
1164         implementation returns false instead.
1165
1166         PR 187458, 184377
1167
1168         * WebCoreSupport/InspectorOverlay.cpp:
1169         (WebCore::InspectorOverlay::showRepaintCounter):
1170         * WebCoreSupport/InspectorOverlay.h:
1171         (InspectorOverlay):
1172         * WebKitSupport/DefaultTapHighlight.h:
1173         * WebKitSupport/SelectionOverlay.h:
1174
1175 2012-08-02  Antonio Gomes  <agomes@rim.com>
1176
1177         Unreviewed debug build fix (bug 92889)
1178
1179         * WebKitSupport/InRegionScroller.cpp:
1180         (BlackBerry::WebKit::pushBackInRegionScrollable):
1181
1182 2012-08-02  Leo Yang  <leoyang@rim.com>
1183
1184         [BlackBerry] Rounding error of destination rect of checkerboard
1185         https://bugs.webkit.org/show_bug.cgi?id=93012
1186
1187         Reviewed by Rob Buis.
1188
1189         Reviewed internally by Jakob Petsovits.
1190
1191         Intersect with the destination rectangle to eliminate the rounding error.
1192
1193         * Api/BackingStore.cpp:
1194         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
1195
1196 2012-08-01  Antonio Gomes  <agomes@rim.com>
1197
1198         [BlackBerry] Implement InRegionScroller class as a in-region scroll controller
1199         https://bugs.webkit.org/show_bug.cgi?id=92889
1200         PR #186587
1201
1202         Reviewed by Yong Li.
1203
1204         Internally reviewed by Arvid Nilsson.
1205
1206         Moved all in-region scrolling code out of WebPagePrivate to the just
1207         created InRegionScroller class. This class aims to:
1208
1209         1) Centralize all in-region scroll code and clean up WebPagePrivate as a consequence.
1210         2) Be the bases to add UI/Compositing thread driven scrolls to in-region.
1211
1212         The patch does not change any functionallity change.
1213
1214         * Api/WebPage.cpp:
1215         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
1216         (BlackBerry::WebKit::WebPagePrivate::init):
1217         (BlackBerry::WebKit::WebPagePrivate::scrollBy):
1218         (BlackBerry::WebKit::WebPagePrivate::notifyInRegionScrollStatusChanged):
1219         (BlackBerry::WebKit::WebPagePrivate::clearDocumentData):
1220         (BlackBerry::WebKit::WebPagePrivate::setScrollOriginPoint):
1221         * Api/WebPage_p.h:
1222         (WebPagePrivate):
1223         * WebKitSupport/InRegionScrollableArea.cpp:
1224         (BlackBerry::WebKit::InRegionScrollableArea::layer):
1225         * WebKitSupport/InRegionScroller.cpp: Added.
1226         (WebKit):
1227         (BlackBerry::WebKit::canScrollInnerFrame):
1228         (BlackBerry::WebKit::canScrollRenderBox):
1229         (BlackBerry::WebKit::parentLayer):
1230         (BlackBerry::WebKit::enclosingLayerNode):
1231         (BlackBerry::WebKit::isNonRenderViewFixedPositionedContainer):
1232         (BlackBerry::WebKit::pushBackInRegionScrollable):
1233         (BlackBerry::WebKit::InRegionScroller::InRegionScroller):
1234         (BlackBerry::WebKit::InRegionScroller::setNode):
1235         (BlackBerry::WebKit::InRegionScroller::node):
1236         (BlackBerry::WebKit::InRegionScroller::reset):
1237         (BlackBerry::WebKit::InRegionScroller::isNull):
1238         (BlackBerry::WebKit::InRegionScroller::scrollBy):
1239         (BlackBerry::WebKit::InRegionScroller::inRegionScrollableAreasForPoint):
1240         (BlackBerry::WebKit::InRegionScroller::scrollNodeRecursively):
1241         (BlackBerry::WebKit::InRegionScroller::scrollRenderer):
1242         (BlackBerry::WebKit::InRegionScroller::adjustScrollDelta):
1243         * WebKitSupport/InRegionScroller.h: Added.
1244         (WebCore):
1245         (WebKit):
1246         (InRegionScroller):
1247         * WebKitSupport/TouchEventHandler.cpp:
1248         (BlackBerry::WebKit::TouchEventHandler::drawTapHighlight):
1249
1250 2012-08-01  Charles Wei  <charles.wei@torchmobile.com.cn>
1251
1252         [BlackBerry] Favicon should be Base64 encoded for cross-process passing
1253         https://bugs.webkit.org/show_bug.cgi?id=92857
1254
1255         Reviewed by George Staikos.
1256
1257         The current implementation just passes the internal of SkPixels data to the client,
1258         which can't be passed accross the process boundary to chrome for processing.
1259         This patch makes the favicon Base64 encoded so that can be passed to chrome in another process.
1260
1261         * Api/WebPageClient.h:
1262         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1263         (WebCore::FrameLoaderClientBlackBerry::dispatchDidReceiveIcon):
1264
1265 2012-08-01  Jacky Jiang  <zhajiang@rim.com>
1266
1267         [BlackBerry] Allow client side to add and remove origin access whitelist entries
1268         https://bugs.webkit.org/show_bug.cgi?id=92790
1269
1270         Reviewed by Yong Li.
1271
1272         PR: 172658
1273         Add two new APIs to add and remove origin access whitelist entries.
1274         Initialize the BlackBerryAllowCrossSiteRequests WebSetting to false.
1275
1276         * Api/WebPage.cpp:
1277         (BlackBerry::WebKit::WebPagePrivate::addOriginAccessWhitelistEntry):
1278         (WebKit):
1279         (BlackBerry::WebKit::WebPage::addOriginAccessWhitelistEntry):
1280         (BlackBerry::WebKit::WebPagePrivate::removeOriginAccessWhitelistEntry):
1281         (BlackBerry::WebKit::WebPage::removeOriginAccessWhitelistEntry):
1282         * Api/WebPage.h:
1283         * Api/WebPage_p.h:
1284         (WebPagePrivate):
1285         * Api/WebSettings.cpp:
1286         (BlackBerry::WebKit::WebSettings::standardSettings):
1287
1288 2012-08-01  Mike Fenton  <mifenton@rim.com>
1289
1290         [BlackBerry] Consolidate suppression of keyboard requests.
1291         https://bugs.webkit.org/show_bug.cgi?id=92871
1292
1293         Reviewed by Antonio Gomes.
1294
1295         Reduce VKB requests even more by applying the filter on
1296         all requests during processing.
1297
1298         Reviewed Internally by Gen Mak.
1299
1300         * WebKitSupport/InputHandler.cpp:
1301         (BlackBerry::WebKit::InputHandler::focusedNodeChanged):
1302         (BlackBerry::WebKit::InputHandler::notifyClientOfKeyboardVisibilityChange):
1303
1304 2012-08-01  Arvid Nilsson  <anilsson@rim.com>
1305
1306         [BlackBerry] Disable tap highlight when transparent color is specified
1307         https://bugs.webkit.org/show_bug.cgi?id=92849
1308
1309         Reviewed by Antonio Gomes.
1310
1311         When the web page specifies -webkit-tap-highlight-color:rgba(0,0,0,0)
1312         or any color with alpha value 0, we should disable the tap highlight.
1313
1314         * WebKitSupport/DefaultTapHighlight.cpp:
1315         (BlackBerry::WebKit::DefaultTapHighlight::draw):
1316
1317 2012-07-31  Robin Cao  <robin.cao@torchmobile.com.cn>
1318
1319         [BlackBerry] Pass all file chooser settings to clients
1320         https://bugs.webkit.org/show_bug.cgi?id=92237
1321
1322         Reviewed by Rob Buis.
1323
1324         Expose all file chooser settings to clients.
1325
1326         * Api/WebPageClient.h:
1327         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1328         (WebCore::ChromeClientBlackBerry::runOpenPanel):
1329
1330 2012-07-31  Mike Fenton  <mifenton@rim.com>
1331
1332         [BlackBerry] Fix crash in InputHandler spell checking.
1333         https://bugs.webkit.org/show_bug.cgi?id=92763
1334
1335         Reviewed by Antonio Gomes.
1336
1337         PR 185574.
1338
1339         Fix crash in getSpellChecker by guarding the calling paths
1340         to ensure that m_currentFocusElement is valid.
1341
1342         Also add ASSERTs for previous crash.
1343
1344         * WebKitSupport/InputHandler.cpp:
1345         (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
1346         (BlackBerry::WebKit::InputHandler::spellCheckingRequestCancelled):
1347         (BlackBerry::WebKit::InputHandler::getSpellChecker):
1348
1349 2012-07-31  Genevieve Mak  <gmak@rim.com>
1350
1351         Send an onContextMenu event to the page content
1352         so that context menus can be prevented. We use
1353         the node's event handler because we want to use
1354         the fat finger's node. If we use  the EventHandler's
1355         sendContextMenuEvent it will hit test with the mouse
1356         position which may not be what we want.
1357         PR #184032
1358         https://bugs.webkit.org/show_bug.cgi?id=92766
1359
1360         Reviewed by Antonio Gomes.
1361         Reviewed Internally by Antonio Gomes.
1362
1363         * Api/WebPage.cpp:
1364         (BlackBerry::WebKit::WebPagePrivate::webContext):
1365         (BlackBerry::WebKit::WebPagePrivate::contextNode):
1366
1367 2012-07-31  Arvid Nilsson  <anilsson@rim.com>
1368
1369         [BlackBerry] Backing store output flickers when using WebPageCompositor
1370         https://bugs.webkit.org/show_bug.cgi?id=90291
1371
1372         Reviewed by Antonio Gomes.
1373
1374         The backing store doesn't know when the API client swaps the buffers,
1375         so it doesn't know when to signal the blit generation condition
1376         variable. Fixed by using EGL fence sync instead, when available, so we
1377         don't have to know.
1378
1379         Reviewed internally by Filip Spacek.
1380
1381         * Api/BackingStore.cpp:
1382         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
1383         (BlackBerry::WebKit::BackingStorePrivate::~BackingStorePrivate):
1384         (BlackBerry::WebKit::BackingStorePrivate::render):
1385         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
1386         (BlackBerry::WebKit::BackingStorePrivate::compositeContents):
1387         * Api/BackingStore_p.h:
1388         (BackingStorePrivate):
1389         * WebKitSupport/BackingStoreTile.cpp:
1390         (BlackBerry::WebKit::TileBuffer::TileBuffer):
1391         * WebKitSupport/BackingStoreTile.h:
1392         (BlackBerry::WebKit::TileBuffer::syncObject):
1393         (BlackBerry::WebKit::TileBuffer::setSyncObject):
1394         (TileBuffer):
1395         * WebKitSupport/SurfacePool.cpp:
1396         (WebKit):
1397         (BlackBerry::WebKit::SurfacePool::SurfacePool):
1398         (BlackBerry::WebKit::SurfacePool::initialize):
1399         (BlackBerry::WebKit::SurfacePool::waitForBuffer):
1400         (BlackBerry::WebKit::SurfacePool::notifyBuffersComposited):
1401         * WebKitSupport/SurfacePool.h:
1402         (SurfacePool):
1403
1404 2012-07-30  Yoshifumi Inoue  <yosin@chromium.org>
1405
1406         [Forms] Get rid of Element::isReadOnlyFormControl other than CSS related
1407         https://bugs.webkit.org/show_bug.cgi?id=92612
1408
1409         Reviewed by Kent Tamura.
1410
1411         This patch replaces Element::isReadOnlyFormControl() to
1412         HTMLFormControlElement::readOnly() for preparation of introducing
1413         Element::shouldMatchReadWriteSelector(), bug 92602.
1414
1415         * WebKitSupport/DOMSupport.cpp:
1416         (BlackBerry::WebKit::DOMSupport::isTextBasedContentEditableElement): Replaced isReadOnlyFormControl() by HTMLTextFormControlElement::readOnly().
1417
1418 2012-07-30  Mike Fenton  <mifenton@rim.com>
1419
1420         [BlackBerry] Optimize the generation of selection details generation.
1421         https://bugs.webkit.org/show_bug.cgi?id=92522
1422
1423         Reviewed by Antonio Gomes.
1424
1425         PR 179264.
1426
1427         Reduce the number of times we generate selection details notifications.
1428
1429         This removes several notifications that are handled by the standard
1430         notification path and makes skipping duplicate notifications the default
1431         so that only those that must generate a response do.
1432
1433         Reviewed Internally by Gen Mak.
1434
1435         * Api/WebPage.cpp:
1436         (BlackBerry::WebKit::WebPagePrivate::notifyTransformedContentsSizeChanged):
1437         (BlackBerry::WebKit::WebPagePrivate::updateDelegatedOverlays):
1438         * WebKitSupport/InputHandler.cpp:
1439         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
1440         * WebKitSupport/SelectionHandler.cpp:
1441         (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
1442         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
1443         (BlackBerry::WebKit::SelectionHandler::setSelection):
1444         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
1445         * WebKitSupport/SelectionHandler.h:
1446         (SelectionHandler):
1447
1448 2012-07-30  Robin Cao  <robin.cao@torchmobile.com.cn>
1449
1450         [BlackBerry] Adapt to changes in the SharedArray platform API
1451         https://bugs.webkit.org/show_bug.cgi?id=92631
1452
1453         Reviewed by Rob Buis.
1454
1455         Adapt to changes in the SharedArray platform API. No behavioural change.
1456
1457         Reviewed internally by Joe Mason.
1458
1459         * Api/WebPage.cpp:
1460         (BlackBerry::WebKit::WebPage::getBackForwardList):
1461         * Api/WebPage.h:
1462         * Api/WebPageClient.h:
1463         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1464         (WebCore::ChromeClientBlackBerry::runOpenPanel):
1465
1466 2012-07-30  Patrick Gansterer  <paroga@webkit.org>
1467
1468         Replace UnicodeWinCE with UnicodeWchar
1469         https://bugs.webkit.org/show_bug.cgi?id=92539
1470
1471         Reviewed by Ryosuke Niwa.
1472
1473         UnicodeWinCE never contained WinCE specific code. UnicodeWchar
1474         is a replacement for it, which is mainly based on the functions
1475         from <wchar.h>. It is ment as a minimal Unicode backend, which
1476         can be used very easy and has no external dependencies.
1477
1478         * WebCoreSupport/AboutDataUseFeatures.in:
1479
1480 2012-07-27  Eli Fidler  <efidler@rim.com>
1481
1482         [BlackBerry] Adapt to change in the FontInfo platform API.
1483         https://bugs.webkit.org/show_bug.cgi?id=92547
1484
1485         Reviewed by Yong Li
1486
1487         RIM PR 161263
1488
1489         * Api/WebSettings.cpp:
1490         (BlackBerry::WebKit::WebSettings::standardSettings):
1491
1492 2012-07-27  Yong Li  <yoli@rim.com>
1493
1494         [BlackBerry] Should support onbeforeunload event and show confirmation dialog
1495         https://bugs.webkit.org/show_bug.cgi?id=92510
1496
1497         Reviewed by Antonio Gomes.
1498
1499         RIM PR# 155878.
1500         1. Export dispatchBeforeUnloadEvent() so client can call it before going to close the page.
1501         2. Forward runBeforeUnloadConfirmPanel() call to client so it can show a dialog.
1502
1503         * Api/WebPage.cpp:
1504         (BlackBerry::WebKit::WebPage::dispatchBeforeUnloadEvent):
1505         (WebKit):
1506         * Api/WebPage.h:
1507         * Api/WebPageClient.h:
1508         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1509         (WebCore::ChromeClientBlackBerry::canRunBeforeUnloadConfirmPanel):
1510         (WebCore::ChromeClientBlackBerry::runBeforeUnloadConfirmPanel):
1511
1512 2012-07-27  Mike Fenton  <mifenton@rim.com>
1513
1514         [BlackBerry] Switch InputHandler malloc use to fastMalloc for cases that should never fail
1515         https://bugs.webkit.org/show_bug.cgi?id=92508
1516
1517         Reviewed by Yong Li.
1518
1519         Replace common uses of malloc with fastMalloc rather
1520         than trying to recover gracefully.  If we are truly
1521         out of memory, crash before corruption occurs.
1522
1523         * WebKitSupport/InputHandler.cpp:
1524         (BlackBerry::WebKit::InputHandler::spannableTextInRange):
1525         (BlackBerry::WebKit::InputHandler::extractedTextRequest):
1526
1527 2012-07-26  Nima Ghanavatian  <nghanavatian@rim.com>
1528
1529         [BlackBerry] Remove synchronous spellchecking code
1530         https://bugs.webkit.org/show_bug.cgi?id=92415
1531
1532         Removing synchronous spellchecking code path.
1533
1534         Reviewed by Rob Buis.
1535
1536         Internally reviewed by Mike Fenton.
1537
1538         * Api/WebPageClient.h:
1539         * WebCoreSupport/EditorClientBlackBerry.cpp:
1540         (WebCore::EditorClientBlackBerry::checkSpellingOfString):
1541
1542 2012-07-26  Nima Ghanavatian  <nghanavatian@rim.com>
1543
1544         [BlackBerry] Support async spellcheck for the blackberry port
1545         https://bugs.webkit.org/show_bug.cgi?id=92160
1546
1547         PR124517
1548         Implementing support for async spellcheck.
1549
1550         Reviewed by Rob Buis.
1551
1552         Internally reviewed by Mike Fenton.
1553
1554         * Api/WebPage.cpp:
1555         (BlackBerry::WebKit::WebPage::spellCheckingRequestCancelled):
1556         (WebKit):
1557         (BlackBerry::WebKit::WebPage::spellCheckingRequestProcessed):
1558         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
1559         * Api/WebPage.h:
1560         * Api/WebSettings.cpp:
1561         (WebKit):
1562         (BlackBerry::WebKit::WebSettings::standardSettings):
1563         (BlackBerry::WebKit::WebSettings::isAsynchronousSpellCheckingEnabled):
1564         (BlackBerry::WebKit::WebSettings::setAsynchronousSpellCheckingEnabled):
1565         * Api/WebSettings.h:
1566         * WebCoreSupport/EditorClientBlackBerry.cpp:
1567         (WebCore):
1568         (WebCore::EditorClientBlackBerry::requestCheckingOfString):
1569         (WebCore::EditorClientBlackBerry::checkTextOfParagraph):
1570         * WebCoreSupport/EditorClientBlackBerry.h:
1571         (EditorClientBlackBerry):
1572         * WebKitSupport/InputHandler.cpp:
1573         (BlackBerry::WebKit::InputHandler::requestCheckingOfString):
1574         (BlackBerry::WebKit::InputHandler::convertTransactionIdToSequenceId):
1575         (WebKit):
1576         (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
1577         (BlackBerry::WebKit::InputHandler::spellCheckingRequestCancelled):
1578         (BlackBerry::WebKit::InputHandler::getSpellChecker):
1579         * WebKitSupport/InputHandler.h:
1580         (WebCore):
1581         (InputHandler):
1582
1583 2012-07-26  Mike Fenton  <mifenton@rim.com>
1584
1585         [BlackBerry] Improve the logs in Selection Handler.
1586         https://bugs.webkit.org/show_bug.cgi?id=92405
1587
1588         Reviewed by Rob Buis.
1589
1590         Clean up selection logging, fix priority and style
1591         of helper function.
1592
1593         Reviewed Internally by Nima Ghanavatian.
1594
1595         * WebKitSupport/SelectionHandler.cpp:
1596         (BlackBerry::WebKit::SelectionHandler::cancelSelection):
1597         (BlackBerry::WebKit::SelectionHandler::shouldUpdateSelectionOrCaretForPoint):
1598         (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
1599         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
1600         (BlackBerry::WebKit::SelectionHandler::setSelection):
1601         (BlackBerry::WebKit::SelectionHandler::selectObject):
1602         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
1603         (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
1604
1605 2012-07-26  Mike Fenton  <mifenton@rim.com>
1606
1607         [BlackBerry] Add timing logs to SelectionHandler.
1608         https://bugs.webkit.org/show_bug.cgi?id=92404
1609
1610         Reviewed by Rob Buis.
1611
1612         Add selection timing logs.
1613
1614         Reviewed Internally by Nima Ghanavatian.
1615
1616         * WebKitSupport/SelectionHandler.cpp:
1617         (BlackBerry::WebKit::SelectionHandler::setSelection):
1618         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
1619         * WebKitSupport/SelectionHandler.h:
1620         (SelectionHandler):
1621
1622 2012-07-26  Mike Fenton  <mifenton@rim.com>
1623
1624         [BlackBerry] InputHandler failure logs should be logAlways and critical.
1625         https://bugs.webkit.org/show_bug.cgi?id=92403
1626
1627         Reviewed by Rob Buis.
1628
1629         Update Log level for failures and fix mask in log.
1630
1631         Reviewed Internally by Nima Ghanavatian.
1632
1633         * WebKitSupport/InputHandler.cpp:
1634         (BlackBerry::WebKit::convertStringToWchar):
1635         (BlackBerry::WebKit::convertStringToWcharVector):
1636         (BlackBerry::WebKit::convertSpannableStringToString):
1637         (BlackBerry::WebKit::InputHandler::spannableTextInRange):
1638         (BlackBerry::WebKit::InputHandler::setTextAttributes):
1639
1640 2012-07-26  Arvid Nilsson  <anilsson@rim.com>
1641
1642         [BlackBerry] Refactor BackingStorePrivate::BackingStorePrivate::clearAndUpdateTileOfNotRenderedRegion() to avoid touching tile frontbuffer
1643         https://bugs.webkit.org/show_bug.cgi?id=92095
1644
1645         Reviewed by George Staikos.
1646
1647         PR: 141439
1648         Specifically, we want to avoid changing the rendered region of the
1649         front buffer without proper synchronization.
1650
1651         The method is trying to force checkerboard to appear on screen because
1652         an area was invalidated but the render job was dropped, so the tile
1653         contents are now invalid.
1654
1655         Unfortunately it did this in a way which is not thread safe. Fixed by
1656         making it thread safe, in a way that minimizes memory bandwidth usage.
1657
1658         Instead of using the customary sequence of copy-back, modify and swap,
1659         we send a synchronous message to the compositing thread to avoid the
1660         copy-back step and save memory bandwidth. The trade-off is that the
1661         WebKit thread might wait a little longer for the compositing thread
1662         than it would from a waitForCurrentMessage() call.
1663
1664         The way we synchronize this is rather expensive for the WebKit thread,
1665         and this method is called rather carelessly, so add various early
1666         returns to avoid doing it redundantly.
1667
1668         Internally reviewed by Jakob Petsovits and Adam Treat.
1669
1670         * Api/BackingStore.cpp:
1671         (BlackBerry::WebKit::BackingStorePrivate::indexOfTile):
1672         (BlackBerry::WebKit::BackingStorePrivate::clearAndUpdateTileOfNotRenderedRegion):
1673         * Api/BackingStore_p.h:
1674         (BackingStorePrivate):
1675
1676 2012-07-26  Arvid Nilsson  <anilsson@rim.com>
1677
1678         [BlackBerry] Refactor BackingStorePrivate::render() to avoid touching tile frontbuffer
1679         https://bugs.webkit.org/show_bug.cgi?id=91989
1680
1681         Reviewed by George Staikos.
1682
1683         PR: 141439
1684         Specifically, we want to avoid changing the rendered region of the
1685         front buffer. The code only touched the front buffer rendered region
1686         if the tile was not committed.
1687
1688         Instead of immediately marking the tile as committed, and clearing the
1689         front buffer's rendered region to make it appear as checkerboard, we
1690         leave the front buffer alone and only mark the tile as committed once
1691         the front buffer has valid content. Un-committed tiles will also be
1692         rendered as checkerboard, so leaving it uncommitted is equivalent to
1693         clearing the front buffer rendered region here.
1694
1695         In addition to the main change, some related changes follow naturally.
1696
1697         The copyPreviousContentsToBackSurfaceOfTile() call only makes sense if
1698         the tile is committed, and the front buffer has valid content.
1699         Otherwise, clearing the back buffer is equivalent. The code has been
1700         updated to this effect.
1701
1702         Since copyPreviousContentsToBackSurfaceOfTile() always sets the
1703         rendered region to the union of the front and back buffer regions,
1704         there is no point in the "backBufferIsValid" check. It has been turned
1705         into an ASSERT instead, just to make sure.
1706
1707         Internally reviewed by Jakob Petsovits.
1708
1709         * Api/BackingStore.cpp:
1710         (BlackBerry::WebKit::BackingStorePrivate::render):
1711
1712 2012-07-25  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1713
1714         [BlackBerry] Support RTSP in browser
1715         https://bugs.webkit.org/show_bug.cgi?id=92233
1716
1717         Reviewed by Rob Buis.
1718
1719         Handle URL scheme "rtsp://" before creating the DocumentLoader
1720         and send the request to webkit. As we don't have any application
1721         which can deal with rtsp invocation for now, we need to create
1722         a media document to wrap the rtsp url within a video tag which
1723         makes it load as a normal video clip.
1724
1725         RIM PR: 169669
1726         Internally reviewed by Charles Wei <charles.wei@torchmobile.com.cn>.
1727
1728         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1729         (WebCore::FrameLoaderClientBlackBerry::createDocumentLoader):
1730
1731 2012-07-25  Jakob Petsovits  <jpetsovits@rim.com>
1732
1733         [BlackBerry] Rephrase suspend/resume condition to guard against crashes
1734         https://bugs.webkit.org/show_bug.cgi?id=92300
1735         PR 182125
1736
1737         Reviewed by George Staikos.
1738
1739         When the compositor is removed from a WebPage, it might
1740         already have unset its context, and issuing a call to
1741         BackingStore::buffer() would therefore cause a crash.
1742         Just guarding buffer() from this crash isn't fully
1743         correct, because then we wouldn't suspend rendering
1744         for a compositor that had been previously enabled.
1745
1746         Instead, change the condition to suspend/resume in
1747         WebPagePrivate::setCompositor() to focus on the
1748         object that delivers us the buffer. If we can't
1749         listen to the context or buffer being set, better
1750         just take the compositor object itself to determine
1751         whether we have something valid or not... and hope
1752         that they give us a valid context & buffer in all
1753         situations when we can actually be rendering.
1754
1755         Also check compositor->context() in buffer() to be
1756         non-zero before accessing the context's buffer,
1757         because more defensive coding can't hurt here.
1758
1759         * Api/BackingStore.cpp:
1760         (BlackBerry::WebKit::BackingStorePrivate::buffer):
1761         * Api/WebPage.cpp:
1762         (BlackBerry::WebKit::WebPagePrivate::setCompositor):
1763
1764 2012-07-25  Joshua Netterfield  <jnetterfield@rim.com>
1765
1766         [BlackBerry] Update about:config lists
1767         https://bugs.webkit.org/show_bug.cgi?id=92118
1768
1769         Reviewed by Rob Buis.
1770
1771         Remove features from list that have either been removed from WebKit
1772         or that have been moved from one list to another.
1773
1774         * WebCoreSupport/AboutDataEnableFeatures.in:
1775         * WebCoreSupport/AboutDataHaveFeatures.in:
1776         * WebCoreSupport/AboutDataUseFeatures.in:
1777
1778 2012-07-25  Jacky Jiang  <zhajiang@rim.com>
1779
1780         [BlackBerry] clock_gettime() in BackingStore.cpp should use CLOCK_MONOTONIC
1781         https://bugs.webkit.org/show_bug.cgi?id=91898
1782
1783         Reviewed by Yong Li.
1784
1785         Let pthread condition variable in BackingStore.cpp use monotonic clock
1786         to fix a regression caused by r123266.
1787
1788         * Api/BackingStore.cpp:
1789         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
1790
1791 2012-07-25  Andy Chen  <andchen@rim.com>
1792
1793         [BlackBerry] Add "SelectAll" to WebPage
1794         https://bugs.webkit.org/show_bug.cgi?id=92246
1795
1796         Reviewed by Antonio Gomes.
1797
1798         Add "Select All" editor command to WebPage.
1799         Internally reviewed by Mike Fenton.
1800
1801         * Api/WebPage.cpp:
1802         (BlackBerry::WebKit::WebPage::selectAll):
1803         (WebKit):
1804         * Api/WebPage.h:
1805         * WebKitSupport/InputHandler.cpp:
1806         (BlackBerry::WebKit::InputHandler::selectAll):
1807         (WebKit):
1808         * WebKitSupport/InputHandler.h:
1809
1810 2012-07-25  Arvid Nilsson  <anilsson@rim.com>
1811
1812         [BlackBerry] Don't touch a tile buffer while it's still on its way to the GPU
1813         https://bugs.webkit.org/show_bug.cgi?id=91992
1814
1815         Reviewed by Adam Treat.
1816
1817         PR: 141439
1818         The copyPreviousContentsToBackSurfaceOfTile() call will also modify
1819         buffer contents, move it after the blit generation condvar to make sure
1820         we've waited for the buffer to become available first.
1821
1822         This is done as part of some general BackingStorePrivate::render()
1823         cleanup in PR 141439.
1824
1825         Internally reviewed by Jakob Petsovits.
1826
1827         * Api/BackingStore.cpp:
1828         (BlackBerry::WebKit::BackingStorePrivate::render):
1829
1830 2012-07-25  Jakob Petsovits  <jpetsovits@rim.com>
1831
1832         [BlackBerry] notifyContentRendered() call missing in two spots
1833         https://bugs.webkit.org/show_bug.cgi?id=92153
1834         RIM PR 173340
1835
1836         Reviewed by Antonio Gomes.
1837
1838         In dispatchDidFirstVisualLayout() and repaint() in
1839         immediate mode, we render but don't notify the
1840         WebPageClient that the content was modified.
1841
1842         In the long run, we should probably keep track of
1843         the modified reason from within render() itself
1844         and use this to automatically notify the client
1845         from within blitContents() and/or invalidateWindow(),
1846         depending on the rendering path. That's somewhat of
1847         a medium-size undertaking though; for now, adding
1848         the call directly to the renderVisibleContents()
1849         call sites will do.
1850
1851         This patch also adds a blitVisibleContents() to
1852         dispatchDidFirstVisualLayout() where it was
1853         inexplicably missing, probably on account of
1854         old code that was never updated.
1855
1856         * Api/BackingStore.cpp:
1857         (BlackBerry::WebKit::BackingStorePrivate::repaint):
1858         * Api/WebPage.cpp:
1859         (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore):
1860         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1861         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFirstVisuallyNonEmptyLayout):
1862
1863 2012-07-24  Rob Buis  <rbuis@rim.com>
1864
1865         [BlackBerry] Do not call settings setters twice on page construction
1866         https://bugs.webkit.org/show_bug.cgi?id=92157
1867
1868         Reviewed by Yong Li.
1869
1870         The WebPagePrivate init method sets some settings value that were
1871         already set in didChangeSettings. setUseHixie76WebSocketProtocol just
1872         sets the default value, no need to set it again.
1873         Also call didChangeSettings explicitly from init, before that we are
1874         not calling it since the delegate is not set yet.
1875
1876         * Api/WebPage.cpp:
1877         (BlackBerry::WebKit::WebPagePrivate::init):
1878
1879 2012-07-24  Mike Fenton  <mifenton@rim.com>
1880
1881         Throttle calls to request the virtual keyboard be shown.
1882         https://bugs.webkit.org/show_bug.cgi?id=92138
1883
1884         Reviewed by Rob Buis.
1885
1886         PR 178465.
1887
1888         Do not request keyboard visibility change when
1889         we are actively processing an input event.
1890
1891         Reviewed Internally by Gen Mak.
1892
1893         * WebKitSupport/InputHandler.cpp:
1894         (BlackBerry::WebKit::InputHandler::focusedNodeChanged):
1895
1896 2012-07-24  Joshua Netterfield  <jnetterfield@rim.com>
1897
1898         [BlackBerry] Update about:config lists
1899         https://bugs.webkit.org/show_bug.cgi?id=92118
1900
1901         Reviewed by Rob Buis.
1902
1903         We want to have all flags which could be used / have been used by any platform. These lists were created by running:
1904
1905         * WebCoreSupport/AboutDataEnableFeatures.in: `git grep "ENABLE(" | cut -d "(" -f2 | cut -d ")" -f1 | sort -u`
1906         * WebCoreSupport/AboutDataHaveFeatures.in: `git grep "HAVE(" | cut -d "(" -f2 | cut -d ")" -f1 | sort -u`
1907         * WebCoreSupport/AboutDataUseFeatures.in: `git grep "USE(" | cut -d "(" -f2 | cut -d ")" -f1 | sort -u`
1908
1909 2012-07-24  Arvid Nilsson  <anilsson@rim.com>
1910
1911         [BlackBerry] Remove unused variable in BackingStore.cpp
1912         https://bugs.webkit.org/show_bug.cgi?id=91987
1913
1914         Reviewed by Antonio Gomes.
1915
1916         PR: 141439
1917         This is done as part of some general BackingStorePrivate::render()
1918         cleanup in PR 141439.
1919
1920         * Api/BackingStore.cpp:
1921         (BlackBerry::WebKit::BackingStorePrivate::render):
1922
1923 2012-07-23  Yong Li  <yoli@rim.com>
1924
1925         [BlackBerry] Move about: URL handling out of WebCore
1926         https://bugs.webkit.org/show_bug.cgi?id=91541
1927
1928         Reviewed by Rob Buis.
1929
1930         PR# 181304.
1931         Move about: URL handling to the right place (FrameLoaderClientBlackBerry::createDocumentLoader), so
1932         reload and history navigation can work.
1933         Other changes: Remove about:version which makes little sense. Make about:memory partially visible.
1934
1935         * Api/WebPage.cpp:
1936         (BlackBerry::WebKit::WebPage::load): Remove the call to loadAbout()
1937         * Api/WebPage_p.h: Remove loadAbout()
1938         (WebPagePrivate):
1939         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1940         (WebCore::FrameLoaderClientBlackBerry::createDocumentLoader): Construct about: data here.
1941         * WebKitSupport/AboutData.cpp:
1942         (BlackBerry::WebKit::numberToHTMLTr): Make it static
1943         (BlackBerry::WebKit::configPage): Make it static
1944         (BlackBerry::WebKit::memoryPage): Make it static
1945         (BlackBerry::WebKit::cachePage):
1946         (BlackBerry::WebKit::buildPage):
1947         (BlackBerry::WebKit::creditsPage):
1948         (BlackBerry::WebKit::cookiePage):
1949         (BlackBerry::WebKit::aboutData): The only export function that returns HTML source for a given about: URL.
1950         (WebKit):
1951         * WebKitSupport/AboutData.h:
1952         (WebKit):
1953
1954 2012-07-23  Pierre Rossi  <pierre.rossi@gmail.com>
1955
1956         Unify numTouchEventHandlersChanged and needTouchEvents in the chrome client
1957         https://bugs.webkit.org/show_bug.cgi?id=91006
1958
1959         Reviewed by Ryosuke Niwa.
1960
1961         Removed numTouchEventHandlersChanged stub.
1962
1963         * WebCoreSupport/ChromeClientBlackBerry.h:
1964
1965 2012-07-22  Kent Tamura  <tkent@chromium.org>
1966
1967         Rename ENABLE_METER_TAG and ENABLE_PROGRESS_TAG to ENABLE_METER_ELEMENT and ENABLE_PROGRESS_ELEMENT respectively
1968         https://bugs.webkit.org/show_bug.cgi?id=91941
1969
1970         Reviewed by Kentaro Hara.
1971
1972         A flag name for an elmement should be ENABLE_*_ELEMENT.
1973
1974         * WebCoreSupport/AboutDataEnableFeatures.in:
1975
1976 2012-07-20  Jacky Jiang  <zhajiang@rim.com>
1977
1978         [BlackBerry] clock_gettime() in BackingStore.cpp should use CLOCK_MONOTONIC
1979         https://bugs.webkit.org/show_bug.cgi?id=91898
1980
1981         Reviewed by Yong Li.
1982
1983         PR: 181043
1984         Use CLOCK_MONOTONIC when we do expect a monotonic timer.
1985
1986         * Api/BackingStore.cpp:
1987         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
1988
1989 2012-07-20  Crystal Zhang  <haizhang@rim.com>
1990
1991         [BlackBerry] Add Cancel button for Select popup
1992         https://bugs.webkit.org/show_bug.cgi?id=91887
1993
1994         Reviewed by Yong Li.
1995
1996         PR 177706
1997
1998         * WebCoreSupport/SelectPopupClient.cpp:
1999         (WebCore::SelectPopupClient::generateHTML):
2000         (WebCore::SelectPopupClient::setValueAndClosePopup):
2001
2002 2012-07-19  Mary Wu  <mary.wu@torchmobile.com.cn>
2003
2004         [BlackBerry] Make sure to send favicon when go back/forward
2005         https://bugs.webkit.org/show_bug.cgi?id=91808
2006
2007         Reviewed by George Staikos.
2008
2009         When go back/forward, if the page was in page cache, it would have no chance
2010         to send favicon. So we'll send it in commitLoad right after send the blank
2011         icon.
2012         RIM PR# 177495
2013
2014         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2015         (WebCore::FrameLoaderClientBlackBerry::dispatchDidCommitLoad):
2016
2017 2012-07-19  Jakob Petsovits  <jpetsovits@rim.com>
2018
2019         [BlackBerry] Suspend when there's no target buffer until an external compositor is set
2020         https://bugs.webkit.org/show_bug.cgi?id=91686
2021         RIM PR 174365
2022
2023         Reviewed by Antonio Gomes.
2024
2025         If we don't have a client window (i.e. rendering to
2026         GL directly) and a WebPageCompositor is only set
2027         after a rendering operation, then we'll try to render
2028         to BackingStorePrivate::buffer() which doesn't exist
2029         at this point. That's bad, and gets us various
2030         assertions and possibly worse.
2031
2032         Fix it by starting in a screen-suspended state and only
2033         resuming screen and backingstore once a compositor is
2034         actually set.
2035
2036         So, in effect, with this patch applied, the sequence
2037         of events will look like this:
2038
2039         1) WebPage & BackingStore are initialize, neither window
2040            nor compositor exists, therefore buffer() returns 0.
2041            createSurface() therefore suspends screen and
2042            backingstore.
2043         2) loadURL() or loadData() is called, web page is
2044            fully loaded, however we don't try to render because
2045            we're still suspended, still have no target buffer.
2046         3) A WebPageCompositor is being set from outside.
2047            At the beginning of WebPage::setCompositor() we still
2048            don't have a buffer() so there's nothing to suspend,
2049            however, after the sync call to setCompositorHelper()
2050            the compositor is set so buffer() will return a
2051            nonzero value, causing us to resume at this point.
2052
2053         Using the existence of a target buffer to determine
2054         whether or not to enable rendering or keep it suspended
2055         seems like a good idea, and the implementation (while
2056         not quite perfect yet) is a step forward from before.
2057
2058         * Api/BackingStore.cpp:
2059         (BlackBerry::WebKit::BackingStorePrivate::createSurfaces):
2060         * Api/WebPage.cpp:
2061         (BlackBerry::WebKit::WebPagePrivate::setCompositor):
2062         (BlackBerry::WebKit::WebPagePrivate::setCompositorHelper):
2063         * Api/WebPage_p.h:
2064         (WebPagePrivate):
2065
2066 2012-07-19  Jakob Petsovits  <jpetsovits@rim.com>
2067
2068         [BlackBerry] Allow nested suspend/resume screen & backingstore calls.
2069         https://bugs.webkit.org/show_bug.cgi?id=91644
2070         RIM PR 174365
2071
2072         Reviewed by Adam Treat and Antonio Gomes.
2073
2074         We expose suspendScreenAndBackingStoreUpdates() to the
2075         outside API, but also use it internally when reacting
2076         to a number of happenings, i.e. zooming, viewport resize,
2077         resetting view state on Committed state or when restoring
2078         it from previous pages, etc.
2079
2080         These two can clash. For instance, if we get a suspend
2081         call from outside that suspends us for app inactivity,
2082         or we are told to suspend because the main target surface
2083         is not available at the time, and while being suspended
2084         we try to rotate, finish loading a page, the we'll end up
2085         resuming operations even though we shouldn't.
2086
2087         This patch changes the suspend flag to be a counter
2088         instead, allowing nested suspend/resume calls and making
2089         suspend/resume more robust this way. It also changes
2090         several call sites to make sure suspend/resume calls are
2091         paired up correctly.
2092
2093         * Api/BackingStore.cpp:
2094         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
2095         (BlackBerry::WebKit::BackingStorePrivate::suspendScreenAndBackingStoreUpdates):
2096         (BlackBerry::WebKit::BackingStorePrivate::resumeScreenAndBackingStoreUpdates):
2097         * Api/BackingStore_p.h:
2098         (BackingStorePrivate):
2099         * Api/WebPage.cpp:
2100         (BlackBerry::WebKit::WebPagePrivate::shouldZoomAboutPoint):
2101         (BlackBerry::WebKit::WebPagePrivate::zoomAboutPointTimerFired):
2102         (BlackBerry::WebKit::WebPagePrivate::blockZoomRectForNode):
2103         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2104         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
2105
2106 2012-07-18  Yong Li  <yoli@rim.com>
2107
2108         [BlackBerry] Move about: URL handling out of WebCore
2109         https://bugs.webkit.org/show_bug.cgi?id=91541
2110
2111         Reviewed by Rob Buis.
2112
2113         Move about URL handling code to WebKit/blackberry. Now when WebPage is asked to load an about URL,
2114         it directly calls loadString() with the generated source.
2115
2116         Also move AboutData.h/cpp from WebCoreSupport to WebKitSupport and change their namespace from WebCore
2117         to BlackBerry::WebKit.
2118
2119         The change is very mechanical except "procss total memory usage" in about:memory now only accounts used
2120         bytes and ignore free spaces in malloc.
2121
2122         * Api/WebPage.cpp:
2123         (BlackBerry::WebKit::WebPagePrivate::loadAbout):
2124         (WebKit):
2125         (BlackBerry::WebKit::WebPage::load):
2126         * Api/WebPage_p.h:
2127         (WebPagePrivate):
2128         * WebKitSupport/AboutData.cpp: Renamed from Source/WebKit/blackberry/WebCoreSupport/AboutData.cpp.
2129         (WebKit):
2130         (BlackBerry::WebKit::writeFeatures):
2131         (BlackBerry::WebKit::numberToHTMLTr):
2132         (BlackBerry::WebKit::bool):
2133         (BlackBerry::WebKit::configPage):
2134         (BlackBerry::WebKit::cacheTypeStatisticToHTMLTr):
2135         (BlackBerry::WebKit::dumpJSCTypeCountSetToTableHTML):
2136         (BlackBerry::WebKit::memoryPage):
2137         * WebKitSupport/AboutData.h: Renamed from Source/WebKit/blackberry/WebCoreSupport/AboutData.h.
2138         (WebKit):
2139
2140 2012-07-17  Jakob Petsovits  <jpetsovits@rim.com>
2141
2142         [BlackBerry] Remove unnecessary clearWindow() calls and the method itself
2143         https://bugs.webkit.org/show_bug.cgi?id=91540
2144         RIM PR 174365
2145
2146         Reviewed by Adam Treat.
2147
2148         If we resume the backingstore right afterwards with
2149         RenderAndBlit then that'll fill the whole visible area
2150         with content, making a clearWindow() call unnecessary.
2151         This call is a remnant from ages ago, and is well suited
2152         to disappear into nothingness.
2153
2154         (There is still a clearWindow() call, with rect argument,
2155         which we continue using. This commit only removes the
2156         rect-less version.)
2157
2158         * Api/BackingStore.cpp:
2159         * Api/BackingStore_p.h:
2160         (BackingStorePrivate):
2161         * Api/WebPage.cpp:
2162         (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint):
2163         (BlackBerry::WebKit::WebPagePrivate::zoomBlock):
2164
2165 2012-07-17  Vivek Galatage  <vivekgalatage@gmail.com>
2166
2167         Web Inspector: refactor InspectorController::connectFrontend() to accept InspectorFrontendChannel.
2168         https://bugs.webkit.org/show_bug.cgi?id=91196
2169
2170         Reviewed by Pavel Feldman.
2171
2172         Refactoring InspectorClients. InspectorClient::openInspectorFrontend
2173         now returning the InspectorFrontendChannel.
2174
2175         * Api/WebPage.cpp:
2176         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
2177         (BlackBerry::WebKit::WebPagePrivate::init):
2178         (BlackBerry::WebKit::WebPage::enableWebInspector):
2179         * Api/WebPage_p.h:
2180         (WebPagePrivate):
2181         * WebCoreSupport/InspectorClientBlackBerry.cpp:
2182         (WebCore::InspectorClientBlackBerry::openInspectorFrontend):
2183         * WebCoreSupport/InspectorClientBlackBerry.h:
2184         (InspectorClientBlackBerry):
2185
2186 2012-07-17  Chris Guan  <chris.guan@torchmobile.com.cn>
2187
2188         [BlackBerry] Enable registerProtocolHandler for Blackberry
2189         https://bugs.webkit.org/show_bug.cgi?id=90422
2190
2191         Reviewed by George Staikos.
2192
2193         Implements APIs were added in Custom Scheme Handler specification
2194         which is at http://dev.w3.org/html5/spec/Overview.html#custom-handlers.
2195
2196         Test cases:
2197         fast/dom/register-protocol-handler.html
2198         fast/dom/unregister-protocol-handler.html
2199
2200         * Api/WebPageClient.h:
2201         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2202         (WebCore::ChromeClientBlackBerry::isProtocolHandlerRegistered):
2203         (WebCore::ChromeClientBlackBerry::unregisterProtocolHandler):
2204         (WebCore::ChromeClientBlackBerry::registerProtocolHandler):
2205         * WebCoreSupport/ChromeClientBlackBerry.h:
2206         (ChromeClientBlackBerry):
2207
2208 2012-07-16  Benjamin C Meyer  <bmeyer@rim.com>
2209
2210         Any webpage can crash webkit via qnx.callExtensionMethod assuming 'this' is the 'qnx' object.
2211         https://bugs.webkit.org/show_bug.cgi?id=91419
2212
2213         Run the following in inspector to crash WebKit
2214
2215         qnx.callExtensionMethod.apply(window, []);
2216
2217         In the c++ that handles the function it assumes that when callExtensionMethod
2218         is called that 'this' is the object 'qnx'.  The qnx object has a hidden
2219         variable that the code casts and uses, but when 'this' is not qnx such as the
2220         example this will cause a crash.  Any website can insert the above JavaScript
2221         to cause the crash.
2222
2223         Reviewed by Yong Li.
2224
2225         * WebCoreSupport/ClientExtension.cpp:
2226         (clientExtensionMethod):
2227
2228 2012-07-16  Yong Li  <yoli@rim.com>
2229
2230         [BlackBerry] Improve about:memory page
2231         https://bugs.webkit.org/show_bug.cgi?id=87676
2232
2233         Reviewed by Rob Buis.
2234
2235         Add a table for process memory usage summary for easy read.
2236
2237         * WebCoreSupport/AboutData.cpp:
2238         (WebCore::memoryPage):
2239
2240 2012-07-16  Kihong Kwon  <kihong.kwon@samsung.com>
2241
2242         Remove setController from BatteryClient
2243         https://bugs.webkit.org/show_bug.cgi?id=90944
2244
2245         Reviewed by Adam Barth.
2246
2247         BatteryClient doesn't need to keep m_controller,
2248         because BatteryController can be accessed using BatteryController::from().
2249         Remove m_controller and Add webPagePrivate to BatteryClientBlackBerry.
2250         And change all m_controller to BatteryController::from.
2251
2252         * Api/WebPage.cpp:
2253         (BlackBerry::WebKit::WebPagePrivate::init):
2254         * WebCoreSupport/BatteryClientBlackBerry.cpp:
2255         (WebCore::BatteryClientBlackBerry::BatteryClientBlackBerry):
2256         (WebCore::BatteryClientBlackBerry::onLevelChange):
2257         (WebCore::BatteryClientBlackBerry::onChargingChange):
2258         (WebCore::BatteryClientBlackBerry::onChargingTimeChange):
2259         (WebCore::BatteryClientBlackBerry::onDischargingTimeChange):
2260         * WebCoreSupport/BatteryClientBlackBerry.h:
2261         (BatteryClientBlackBerry):
2262
2263 2012-07-16  Yongxin Dai  <yodai@rim.com>
2264
2265         [BlackBerry] Text selection with touch hold does not start on text field in some cases
2266         https://bugs.webkit.org/show_bug.cgi?id=91267
2267
2268         Reviewed by Antonio Gomes.
2269
2270         Input fields host node is by spec non-editable unless the field itself has content editable enabled.
2271         We enable selection if the shadow tree for the input field is selectable.
2272         PR # 173450
2273
2274         Reviewed Internally by Mike Fenton.
2275
2276         * Api/WebPage.cpp:
2277         (BlackBerry::WebKit::WebPagePrivate::webContext):
2278         * Api/WebPage.cpp:
2279         (BlackBerry::WebKit::WebPagePrivate::webContext):
2280
2281 2012-07-15  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2282
2283         [BlackBerry] Move icon database to application data directory.
2284         https://bugs.webkit.org/show_bug.cgi?id=91195
2285
2286         Reviewed by Rob Buis.
2287
2288         RIM PR: 156852
2289         Create icon database in application data directory instead of
2290         database or local storage directory, by doing this we can make
2291         things easier when clearing database or local storage data files.
2292
2293         Internally reviewed by Charles Wei <charles.wei@torchmobile.com.cn>
2294
2295         * WebCoreSupport/IconDatabaseClientBlackBerry.cpp:
2296         (WebCore::IconDatabaseClientBlackBerry::initIconDatabase):
2297
2298 2012-07-13  Xianzhu Wang  <wangxianzhu@chromium.org>
2299
2300         Move WebCore/platform/text/Base64 to WTF/wtf/text
2301         https://bugs.webkit.org/show_bug.cgi?id=91162
2302
2303         Reviewed by Adam Barth.
2304
2305         * Api/WebKitTextCodec.cpp:
2306         (BlackBerry::WebKit::base64DecodePolicyForWTF):
2307         (BlackBerry::WebKit::base64Decode):
2308         (BlackBerry::WebKit::base64EncodePolicyForWTF):
2309         (BlackBerry::WebKit::base64Encode):
2310         * Api/WebSettings.cpp:
2311         (BlackBerry::WebKit::WebSettings::setUserStyleSheetString):
2312         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2313
2314 2012-07-13  George Staikos  <staikos@webkit.org>
2315
2316         [BlackBerry] Fix crash due to unguarded use of renderer in select
2317         popup.
2318         https://bugs.webkit.org/show_bug.cgi?id=91287
2319
2320         Reviewed by Rob Buis.
2321
2322         No known testcase for this.  Found in the wild.
2323
2324         * WebCoreSupport/SelectPopupClient.cpp:
2325         (WebCore::SelectPopupClient::setValueAndClosePopup):
2326
2327 2012-07-13  Mike Fenton  <mifenton@rim.com>
2328
2329         [BlackBerry] Add support for attributes to define keyboard and enter key type on the Virtual Keyboard
2330         https://bugs.webkit.org/show_bug.cgi?id=91248
2331
2332         Reviewed by Antonio Gomes.
2333
2334         PR 174733.
2335
2336         Add data-blackberry-virtual-keyboard-type and
2337         data-blackberry-virtual-keyboard-enter-key to
2338         enable configuration of the desired virtual keyboard
2339         using element attributes.
2340
2341         Reviewed Internally by Gen Mak.
2342
2343         * Api/WebPageClient.h:
2344         * WebKitSupport/InputHandler.cpp:
2345         (BlackBerry::WebKit::convertStringToKeyboardType):
2346         (WebKit):
2347         (BlackBerry::WebKit::keyboardTypeAttribute):
2348         (BlackBerry::WebKit::convertStringToKeyboardEnterKeyType):
2349         (BlackBerry::WebKit::keyboardEnterKeyTypeAttribute):
2350         (BlackBerry::WebKit::InputHandler::setElementFocused):
2351
2352 2012-07-13  Jacky Jiang  <zhajiang@rim.com>
2353
2354         [BlackBerry] resetBitmapZoomScale called while zooming preventing pinch zoom
2355         https://bugs.webkit.org/show_bug.cgi?id=91247
2356
2357         Reviewed by Antonio Gomes.
2358
2359         PR: 175432
2360         On yahoo.com, the web page stopped zooming while trying to pinch as
2361         WebPageClient::resetBitmapZoomScale(double) was being called by
2362         WebPagePrivate::zoomToInitialScaleOnLoad() after load finished.
2363         And also yahoo.com was keeping updating layout, which made it really
2364         bad that zoomToInitialScaleOnLoad() was called many times when load
2365         finished and the load type was FrameLoadTypeStandard or FrameLoadTypeSame.
2366         As we only care about the situation that dispatchDidFirstVisuallyNonEmptyLayout()
2367         happens after load finished, we can move the code to that method and
2368         set a flag for WebPage layoutFinished() and zoomToInitialScaleOnLoad()
2369         instead. In this way, we can ensure that the flag is only enabled when
2370         dispatchDidFirstVisuallyNonEmptyLayout() is called after load finished
2371         and get rid of calling zoomToInitialScaleOnLoad() lots of times when
2372         keeping updating layout in such kind of situation.
2373
2374         Internally reviewed by Arvid Nilsson
2375
2376         * Api/WebPage.cpp:
2377         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
2378         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
2379         (BlackBerry::WebKit::WebPagePrivate::layoutFinished):
2380         * Api/WebPage_p.h:
2381         (BlackBerry::WebKit::WebPagePrivate::shouldZoomToInitialScaleOnLoad):
2382         (BlackBerry::WebKit::WebPagePrivate::setShouldZoomToInitialScaleAfterLoadFinished):
2383         (WebPagePrivate):
2384         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2385         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFirstVisuallyNonEmptyLayout):
2386
2387 2012-07-13  Jakob Petsovits  <jpetsovits@rim.com>
2388
2389         [BlackBerry] Use fillBuffer() instead of a user-defined background image.
2390         https://bugs.webkit.org/show_bug.cgi?id=91180
2391         RIM PR 171458
2392
2393         Reviewed by Rob Buis.
2394         Internally reviewed by Andrew Lo.
2395
2396         By using Platform::Graphics::fillBuffer() to fill the
2397         overscroll area, we save graphics memory for the buffer
2398         that the background image was occupying.
2399
2400         Also adapt checkerboard drawing as it is now done using
2401         fillBuffer() which replaces checkerBuffer().
2402
2403         In the same go, use the opportunity of the WebSettings
2404         API change to make it more consistent, renaming the
2405         OverZoomColor setting to OverScrollColor.
2406
2407         * Api/BackingStore.cpp:
2408         (WebKit):
2409         (BlackBerry::WebKit::BackingStorePrivate::paintDefaultBackground):
2410         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
2411         (BlackBerry::WebKit::BackingStorePrivate::fillWindow):
2412         * Api/BackingStore_p.h:
2413         (BackingStorePrivate):
2414         * Api/WebSettings.cpp:
2415         (WebKit):
2416         (BlackBerry::WebKit::WebSettings::standardSettings):
2417         (BlackBerry::WebKit::WebSettings::overScrollColor):
2418         (BlackBerry::WebKit::WebSettings::setOverScrollColor):
2419         (BlackBerry::WebKit::WebSettings::isEnableDefaultOverScrollBackground):
2420         (BlackBerry::WebKit::WebSettings::setEnableDefaultOverScrollBackground):
2421         * Api/WebSettings.h:
2422
2423 2012-07-13  Joshua Netterfield  <jnetterfield@rim.com>
2424
2425         [BlackBerry] Update about:* pages
2426         https://bugs.webkit.org/show_bug.cgi?id=91121
2427
2428         Reviewed by Yong Li.
2429
2430         Update the about:config pages, and improve the aesthetics of the about:build, about:version, about:credits, about:memory, about:config, and similar pages.
2431
2432         No new tests, because there is no new funtionality.
2433
2434         * WebCoreSupport/AboutData.cpp:
2435         (WebCore):
2436         (WebCore::writeFeatures):
2437         (WebCore::numberToHTMLTr): Converted to template function, added bool specialization to write "true" and "false" instead of "1" and "0"
2438         (WebCore::configPage):
2439         (WebCore::memoryPage):
2440         * WebCoreSupport/AboutTemplate.html.cpp: Template for BlackBerry about:* pages.
2441
2442 2012-07-12  Benjamin C Meyer  <bmeyer@rim.com>
2443
2444         WebPage::executeJavaScriptFunction crashes when there is an exception
2445         https://bugs.webkit.org/show_bug.cgi?id=91098
2446         RIM PR #149294
2447
2448         When there is an exception currently the code tries to get the string of
2449         the exception via JSValueToStringCopy to pass back, but this cases a
2450         crash inside JavaScriptCore, so change it to simply return false and not
2451         set the return value with the exception string.
2452
2453         Reviewed by George Staikos.
2454
2455         * Api/WebPage.cpp:
2456         (BlackBerry::WebKit::WebPage::executeJavaScriptFunction):
2457
2458 2012-07-12  Pawel Chomicki  <pchomicki@rim.com>
2459
2460         [BlackBerry] WebPage::touchEvent() should use Platform::TouchEvent's toString() for debugging.
2461         https://bugs.webkit.org/show_bug.cgi?id=91002
2462
2463         Reviewed by Antonio Gomes.
2464         Reviewed internally by Genevieve Mak.
2465
2466         Updated DEBUG_TOUCH_EVENTS section of touchEvent method to utilize
2467         Platform::TouchEvent's toString method.
2468
2469         * Api/WebPage.cpp:
2470         (BlackBerry::WebKit::WebPage::touchEvent):
2471
2472 2012-07-12  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2473
2474         [BlackBerry] Cannot use digest proxy auth and NTLM auth at the same time
2475         https://bugs.webkit.org/show_bug.cgi?id=91054
2476
2477         Reviewed by George Staikos.
2478
2479         Implemented interface function syncProxyCredential() derived
2480         from class PageClientBlackBerry.
2481
2482         Internally reviewed by Jason Liu <jason.liu@torchmobile.com.cn>
2483
2484         * Api/WebPage.cpp:
2485         (BlackBerry::WebKit::WebPagePrivate::syncProxyCredential):
2486         (WebKit):
2487         * Api/WebPageClient.h:
2488         * Api/WebPage_p.h:
2489         (WebPagePrivate):
2490
2491 2012-07-11  Mike Lattanzio  <mlattanzio@rim.com>
2492
2493         [BlackBerry] UserViewportArguments are not properly respected.
2494         https://bugs.webkit.org/show_bug.cgi?id=91005
2495
2496         Reviewed by Rob Buis.
2497
2498         PR# 170088.
2499         Move scale and zooming reset on Committed before applying
2500         the user viewport to avoid overriding it immediately.
2501
2502         Internal review by Konrad Piascik, Jacky Jiang.
2503
2504         * Api/WebPage.cpp:
2505         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
2506
2507 2012-07-11  Crystal Zhang  <haizhang@rim.com>
2508
2509         [BlackBerry] Implement Date/Time picker
2510         https://bugs.webkit.org/show_bug.cgi?id=90911
2511
2512         Reviewed by Rob Buis.
2513
2514         Implement HTML Date/Time picker, also should delete popup when closing popup.
2515
2516         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2517         (WebCore::ChromeClientBlackBerry::closePagePopup):
2518         * WebCoreSupport/DatePickerClient.cpp: Added.
2519         (WebCore):
2520         (WebCore::DatePickerClient::DatePickerClient):
2521         (WebCore::DatePickerClient::~DatePickerClient):
2522         (WebCore::DatePickerClient::generateHTML):
2523         (WebCore::DatePickerClient::closePopup):
2524         (WebCore::DatePickerClient::contentSize):
2525         (WebCore::DatePickerClient::htmlSource):
2526         (WebCore::DatePickerClient::setValueAndClosePopup):
2527         (WebCore::DatePickerClient::didClosePopup):
2528         (WebCore::DatePickerClient::writeDocument):
2529         * WebCoreSupport/DatePickerClient.h: Added.
2530         (WebKit):
2531         (WebCore):
2532         (DatePickerClient):
2533         * WebKitSupport/InputHandler.cpp:
2534         (BlackBerry::WebKit::InputHandler::openDatePopup):
2535
2536 2012-07-10  Adam Barth  <abarth@webkit.org>
2537
2538         WebCore::Settings for Hixie76 WebSocket protocol doesn't do anything and should be removed
2539         https://bugs.webkit.org/show_bug.cgi?id=90910
2540
2541         Reviewed by Eric Seidel.
2542
2543         * Api/WebPage.cpp:
2544         (BlackBerry::WebKit::WebPagePrivate::init):
2545
2546 2012-07-10  Adam Barth  <abarth@webkit.org>
2547
2548         LayoutTestController.dumpConfigurationForViewport should move to Internals
2549         https://bugs.webkit.org/show_bug.cgi?id=45652
2550
2551         Reviewed by Eric Seidel.
2552
2553         * WebKitSupport/DumpRenderTreeSupport.cpp:
2554         * WebKitSupport/DumpRenderTreeSupport.h:
2555         (DumpRenderTreeSupport):
2556
2557 2012-07-09  Yong Li  <yoli@rim.com>
2558
2559         [BlackBerry] PagePopupBlackBerry::closePopup() should always clear the pointer in WebPagePrivate
2560         https://bugs.webkit.org/show_bug.cgi?id=90817
2561
2562         Reviewed by Rob Buis.
2563
2564         PR# 174085.
2565         PagePopupBlackBerry::closePopup() should always clear the pointer in WebPagePrivate to avoid crashes.
2566         This patch also removes unused variable m_parentPopup and its setter.
2567
2568         * Api/WebPage.cpp:
2569         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): Remove m_parentPopup.
2570         * Api/WebPage_p.h:
2571         (WebPagePrivate):
2572         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2573         (WebCore::ChromeClientBlackBerry::closePagePopup):
2574         * WebCoreSupport/PagePopupBlackBerry.cpp:
2575         (WebCore::PagePopupBlackBerry::init): Remove the setParentPopup() call.
2576         (WebCore::PagePopupBlackBerry::closePopup): Clear the reference in WebPagePrivate.
2577         * WebCoreSupport/SelectPopupClient.cpp:
2578         (WebCore::SelectPopupClient::setValueAndClosePopup): Add an assert for valid m_element.
2579
2580 2012-07-09  Mike Lattanzio  <mlattanzio@rim.com>
2581
2582         [BlackBerry] meta viewport initial-scale doesn't factor in device pixel ratio
2583         https://bugs.webkit.org/show_bug.cgi?id=90575
2584
2585         Reviewed by Rob Buis.
2586
2587         Refactor meta viewport handling to multiply the developer
2588         specified scale properties by the devicePixelRatio. This
2589         required moving the setting of these values until after
2590         the call to computeViewportAttributes.
2591
2592         This fixes an isssue where content wider than the meta viewport
2593         would case a zoom-out-to-fit scenario because we misinterpreted
2594         the specified initial-scale.
2595
2596         New test to verify wide content doesn't affect initial-scale:
2597         ManualTests/blackberry/meta-viewport-initial-scale-wide-content.html
2598
2599         Internal review from Konrad Piascik, Arvid Nilsson.
2600
2601         * Api/WebPage.cpp:
2602         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
2603         (BlackBerry::WebKit::WebPagePrivate::dispatchViewportPropertiesDidChange):
2604
2605 2012-07-07  George Staikos  <staikos@webkit.org>
2606
2607         Detach animation clients properly if we clear the web page pointer.
2608         https://bugs.webkit.org/show_bug.cgi?id=90730
2609
2610         Reviewed by Adam Treat.
2611
2612         * Api/WebPage.cpp:
2613         (BlackBerry::WebKit::WebPagePrivate::destroyCompositor):
2614         * Api/WebPageCompositor.cpp:
2615         (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
2616         (BlackBerry::WebKit::WebPageCompositorPrivate::~WebPageCompositorPrivate):
2617         (WebKit):
2618         (BlackBerry::WebKit::WebPageCompositorPrivate::detach):
2619         (BlackBerry::WebKit::WebPageCompositorPrivate::setPage):
2620         * Api/WebPageCompositor_p.h:
2621         (WebPageCompositorPrivate):
2622
2623 2012-07-06  Max Feil  <mfeil@rim.com>
2624
2625         [BlackBerry] exitFullScreenForElement() is not working for fullscreen elements in iframes
2626         https://bugs.webkit.org/show_bug.cgi?id=90327
2627
2628         Reviewed by Antonio Gomes.
2629
2630         Fix exit fullscreen problem for elements in iframes. The
2631         exitFullScreenForElement() call is passed a null element in
2632         this case, instead of the original element which entered
2633         fullscreen. If you look in Document.cpp you can see the
2634         exitFullScreenForElement() call being made on the topDocument
2635         (which has a null m_fullScreenElement) instead of the iframe's
2636         document.
2637
2638         The Chromium and Windows ports get around this problem by
2639         storing either the fullscreen element or its frame during
2640         enterFullScreenForElement(), so I will bring the BlackBerry port
2641         in line with this. See also bug 89817.
2642
2643         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2644         (WebCore::ChromeClientBlackBerry::enterFullScreenForElement):
2645         (WebCore::ChromeClientBlackBerry::exitFullScreenForElement):
2646         * WebCoreSupport/ChromeClientBlackBerry.h:
2647         (ChromeClientBlackBerry):
2648
2649 2012-07-06  Benjamin C Meyer  <bmeyer@rim.com>
2650
2651         Add an API to explicitly call a JavaScript function with args.
2652         https://bugs.webkit.org/show_bug.cgi?id=90694
2653
2654         Currently the Blackberry port doesn't expose the JavaScript
2655         engine to 3rd parties so they rely upon executeJavaScript
2656         which can be slower than necessary and unsafe as eval is used.
2657         This new API provides a way to explicitly call a specific
2658         JavaScript function with a list of args preventing the case
2659         where an argument comes from a untrusted source and tries to
2660         escape the arg list to take control of the JavaScript engine.
2661
2662         In the future if the Blackberry port introduces a formal
2663         way to interact with the JavaScript engine this function should
2664         be removed.
2665
2666         PR 149294
2667
2668         Reviewed by Unreviewed
2669
2670         * Api/WebPage.cpp:
2671         (BlackBerry::WebKit::WebPage::executeJavaScriptFunction):
2672         (WebKit):
2673         * Api/WebPage.h:
2674
2675 2012-07-05  Charles Wei  <charles.wei@torchmobile.com.cn>
2676
2677         [BlackBerry] Fix the build error introduced by enabling CUSTOM_THEME_HANDLER
2678         https://bugs.webkit.org/show_bug.cgi?id=90588
2679
2680         Reviewed by Rob Buis.
2681
2682         Fix the build error introduced by enabling CUSTOM_THEME_HANDLER.
2683         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2684         (WebCore::ChromeClientBlackBerry::isProtocolHandlerRegistered):
2685
2686 2012-07-04  Hanna Ma  <Hanma@rim.com>
2687
2688         [BlackBerry] Implement device metrics for blackberry.
2689         https://bugs.webkit.org/show_bug.cgi?id=90494
2690         RIM PR #159034
2691
2692         Reviewed by Rob Buis.
2693
2694         Implement calls to the application to change the device metrics for
2695         the web inspector.
2696
2697         * Api/WebPage.cpp:
2698         (BlackBerry::WebKit::WebPagePrivate::applySizeOverride):
2699         (WebKit):
2700         (BlackBerry::WebKit::WebPagePrivate::setTextZoomFactor):
2701         * Api/WebPage_p.h:
2702         (WebPagePrivate):
2703         * WebCoreSupport/InspectorClientBlackBerry.cpp:
2704         (WebCore::InspectorClientBlackBerry::InspectorClientBlackBerry):
2705         (WebCore::InspectorClientBlackBerry::canOverrideDeviceMetrics):
2706         (WebCore):
2707         (WebCore::InspectorClientBlackBerry::overrideDeviceMetrics):
2708         (WebCore::InspectorClientBlackBerry::supportsFrameInstrumentation):
2709         * WebCoreSupport/InspectorClientBlackBerry.h:
2710         (InspectorClientBlackBerry):
2711
2712 2012-07-03  Leo Yang  <leo.yang@torchmobile.com.cn>
2713
2714         [BlackBerry] Checkerboard shown when clicking on error page buttons
2715         https://bugs.webkit.org/show_bug.cgi?id=90152
2716         RIM PR #161867
2717
2718         Reviewed by George Staikos.
2719
2720         r121514 just made the race occur in lower possibility but can't avoid it.
2721         This path is using another approach to fix the problem. When we are resetting
2722         backingstore while committing a page we need to suspend backingstore and
2723         screen update to make sure no other threads can update backingstore and screen.
2724
2725         * Api/BackingStore.cpp:
2726         (BlackBerry::WebKit::BackingStorePrivate::resetTiles):
2727         * Api/WebPage.cpp:
2728         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
2729
2730 2012-07-03  George Staikos  <staikos@webkit.org>
2731
2732         [BlackBerry] Enable Custom Scheme Handlers for BlackBerry.
2733         https://bugs.webkit.org/show_bug.cgi?id=90422
2734
2735         Reviewed by Rob Buis.
2736
2737         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2738         (WebCore):
2739         (WebCore::ChromeClientBlackBerry::isProtocolHandlerRegistered):
2740         (WebCore::ChromeClientBlackBerry::unregisterProtocolHandler):
2741         * WebCoreSupport/ChromeClientBlackBerry.h:
2742         (ChromeClientBlackBerry):
2743
2744 2012-07-03  George Staikos  <staikos@webkit.org>
2745
2746         [BlackBerry] Enable RegisterProtocolHandler for BlackBerry.
2747         https://bugs.webkit.org/show_bug.cgi?id=90422
2748
2749         Reviewed by Rob Buis.
2750
2751         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2752         (WebCore):
2753         (WebCore::ChromeClientBlackBerry::registerProtocolHandler):
2754         * WebCoreSupport/ChromeClientBlackBerry.h:
2755         (ChromeClientBlackBerry):
2756
2757 2012-07-03  Jan Keromnes  <janx@linux.com>
2758
2759         Web Inspector: WebInspector.TextViewer should be renamed WebInspector.TextEditor
2760         https://bugs.webkit.org/show_bug.cgi?id=89939
2761
2762         Reviewed by Vsevolod Vlasov.
2763
2764         * WebCoreSupport/inspectorBB.html:
2765
2766 2012-07-02  Xiaobo Wang  <xbwang@torchmobile.com.cn>
2767
2768         [BlackBerry] Use PUBLIC_BUILD to enable/disable DRT
2769         https://bugs.webkit.org/show_bug.cgi?id=90271
2770
2771         Reviewed by George Staikos.
2772
2773         RIM PR #154707
2774
2775         Currently DRT code will be compiled only if ENABLE_DRT is set, and it's not
2776         defined by default.
2777         We should enable DRT by default unless PUBLIC_BUILD is set. In this way we don't
2778         need to rebuild webkit before running DRT.
2779
2780         * Api/WebPage.cpp:
2781         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
2782         (BlackBerry::WebKit::WebPagePrivate::init):
2783         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
2784         (BlackBerry::WebKit::WebPage::runLayoutTests):
2785         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2786         (WebCore::ChromeClientBlackBerry::addMessageToConsole):
2787         (WebCore::ChromeClientBlackBerry::runJavaScriptAlert):
2788         (WebCore::ChromeClientBlackBerry::runJavaScriptConfirm):
2789         (WebCore::ChromeClientBlackBerry::runJavaScriptPrompt):
2790         (WebCore::ChromeClientBlackBerry::createWindow):
2791         (WebCore::ChromeClientBlackBerry::runBeforeUnloadConfirmPanel):
2792         (WebCore::ChromeClientBlackBerry::setStatusbarText):
2793         (WebCore::ChromeClientBlackBerry::exceededDatabaseQuota):
2794         (WebCore::ChromeClientBlackBerry::keyboardUIMode):
2795
2796 2012-07-02  George Staikos  <staikos@webkit.org>
2797
2798         [BlackBerry] Implement cancelVibration, and make sure it's canceled on
2799         destruction.
2800         https://bugs.webkit.org/show_bug.cgi?id=90406
2801
2802         Reviewed by Rob Buis.
2803
2804         * WebCoreSupport/VibrationClientBlackBerry.cpp:
2805         (WebCore::VibrationClientBlackBerry::cancelVibration):
2806         (WebCore::VibrationClientBlackBerry::vibrationDestroyed):
2807
2808 2012-07-02  Benjamin Poulain  <bpoulain@apple.com>
2809
2810         Do not do any logging initialization when logging is disabled
2811         https://bugs.webkit.org/show_bug.cgi?id=90228
2812
2813         Reviewed by Simon Fraser.
2814
2815         * Api/BlackBerryGlobal.cpp:
2816         (BlackBerry::WebKit::globalInitialize):
2817
2818 2012-07-01  George Staikos  <staikos@webkit.org>
2819
2820         Clear visited links when clearing history.
2821         https://bugs.webkit.org/show_bug.cgi?id=90345
2822
2823         Reviewed by Antonio Gomes.
2824
2825         * Api/WebPage.cpp:
2826         (BlackBerry::WebKit::WebPage::clearHistory):
2827
2828 2012-06-30  Jason Liu  <jason.liu@torchmobile.com.cn>
2829
2830         [BlackBerry] WebView/Browser cause blank screen when selecting a dropdown field.
2831         https://bugs.webkit.org/show_bug.cgi?id=90241
2832
2833         This issue is caused by single quotes in option's labels.
2834         We should use the escape character of single quotes in JavaScript's string which 
2835         starts and ends with single quotes.
2836         So we replace lablels' single quotes with its escape character during generating the 
2837         select popUp's HTML.
2838
2839         Reviewed by George Staikos.
2840
2841         * WebCoreSupport/SelectPopupClient.cpp:
2842         (WebCore::SelectPopupClient::generateHTML):
2843
2844 2012-06-30  Jakob Petsovits  <jpetsovits@rim.com>
2845
2846         [BlackBerry] Allow surface resizing for use cases other than rotation.
2847         https://bugs.webkit.org/show_bug.cgi?id=90295
2848         RIM PR 171459
2849
2850         Reviewed by George Staikos.
2851
2852         A new API method setHasPendingSurfaceSizeChange() is
2853         introduced for that effect, and used inside of
2854         setViewportSize() to let the WebPageClient do the
2855         resizing. Methods are renamed to reflect that this
2856         is not exclusively meant for rotation anymore.
2857
2858         * Api/WebPage.cpp:
2859         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
2860         (BlackBerry::WebKit::WebPage::setScreenOrientation):
2861         (WebKit):
2862         (BlackBerry::WebKit::WebPage::setHasPendingSurfaceSizeChange):
2863         (BlackBerry::WebKit::WebPagePrivate::resizeSurfaceIfNeeded):
2864         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
2865         * Api/WebPage.h:
2866         * Api/WebPageClient.h:
2867         * Api/WebPage_p.h:
2868         (WebPagePrivate):
2869
2870 2012-06-29  Jacky Jiang  <zhajiang@rim.com>
2871
2872         [BlackBerry] Page jumps after post-pinch-zoom re-render
2873         https://bugs.webkit.org/show_bug.cgi?id=90282
2874
2875         Reviewed by Antonio Gomes.
2876
2877         PR: 170255
2878         In r120622, we moved ScrollableArea::setConstrainsScrollingToContentEdge(false|true)
2879         from WebPage::setScrollPosition() to BackingStorePrivate::setScrollingOrZooming()
2880         to address an overscroll reset issue.
2881         However, when we are ending bitmap zooming, UI thread can call
2882         BackingStorePrivate::setScrollingOrZooming(false) before WebKit thread
2883         calls WebPage::setScrollPosition(), in which case it will set
2884         ScrollableArea::m_constrainsScrollingToContentEdge to true earlier.
2885         To fix this, we can cache ScrollableArea::m_constrainsScrollingToContentEdge
2886         and always set it to false before we set scroll position in WebKit
2887         thread to avoid scroll position clamping during scrolling, and restore
2888         it to what it was after that.
2889
2890         * Api/WebPage.cpp:
2891         (BlackBerry::WebKit::WebPage::setScrollPosition):
2892
2893 2012-06-29  Jakob Petsovits  <jpetsovits@rim.com>
2894
2895         Add blitVisibleContents() as public API.
2896         https://bugs.webkit.org/show_bug.cgi?id=90211
2897
2898         Reviewed by Adam Treat.
2899
2900         We keep blitContents() (with src/dst rectangles)
2901         for compatibility with older Cascades sprints for now,
2902         but want to switch to always blitting the full viewport
2903         and this is a good first step.
2904
2905         * Api/BackingStore.cpp:
2906         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
2907         (BlackBerry::WebKit::BackingStore::blitVisibleContents):
2908         (WebKit):
2909         * Api/BackingStore.h:
2910
2911 2012-06-29  Konrad Piascik  <kpiascik@rim.com>
2912
2913         Don't hardcode target dpi of 160 (it should be 96 on desktop)
2914         https://bugs.webkit.org/show_bug.cgi?id=88114
2915
2916         Reviewed by Adam Barth.
2917
2918         Added new WebSetting to specify what the devicePixelRatio should be.
2919         Updated the call to computeViewportAttributes.
2920
2921         * Api/WebPage.cpp:
2922         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
2923         * Api/WebSettings.cpp:
2924         (WebKit):
2925         (BlackBerry::WebKit::WebSettings::standardSettings):
2926         (BlackBerry::WebKit::WebSettings::devicePixelRatio):
2927         (BlackBerry::WebKit::WebSettings::setDevicePixelRatio):
2928         * Api/WebSettings.h:
2929         * WebKitSupport/DumpRenderTreeSupport.cpp:
2930         (DumpRenderTreeSupport::dumpConfigurationForViewport):
2931
2932 2012-06-28  Jason Liu  <jason.liu@torchmobile.com.cn>
2933
2934         [BlackBerry] Selection items show as garbage for non-ascii characters.
2935         https://bugs.webkit.org/show_bug.cgi?id=89969
2936
2937         Add charset utf-8 to the select popup's page.
2938
2939         Reviewed by Antonio Gomes.
2940
2941         * WebCoreSupport/SelectPopupClient.cpp:
2942         (WebCore::SelectPopupClient::generateHTML):
2943
2944 2012-06-28  Leo Yang  <leo.yang@torchmobile.com.cn>
2945
2946         [BlackBerry] Checkerboard shown when clicking on error page buttons
2947         https://bugs.webkit.org/show_bug.cgi?id=90152
2948         RIM PR #161867
2949
2950         Reviewed by George Staikos.
2951
2952         Reset m_hasBlitJobs when resetting tiles to prevent ui thread from drawing checkerboard unintentionally.
2953
2954         * Api/BackingStore.cpp:
2955         (BlackBerry::WebKit::BackingStorePrivate::resetTiles):
2956
2957 2012-06-27  Andrew Lo  <anlo@rim.com>
2958
2959         [BlackBerry] Selection overlay can become visible after it has been hidden
2960         https://bugs.webkit.org/show_bug.cgi?id=90105
2961
2962         Reviewed by George Staikos.
2963
2964         When SelectionOverlay::hide is called from UI thread,
2965         rather than setting the override opacity, dispatch to the
2966         WebKit thread, which removes the overlay (normal case).
2967
2968         Internal PR164183.
2969         Internally Reviewed by: Arvid Nilsson.
2970
2971         * Api/WebPage.cpp:
2972         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
2973         (BlackBerry::WebKit::WebPage::selectionOverlay):
2974         * Api/WebPage_p.h:
2975         (WebPagePrivate):
2976         * Api/WebSelectionOverlay.h:
2977         * WebKitSupport/SelectionOverlay.cpp:
2978         (BlackBerry::WebKit::SelectionOverlay::SelectionOverlay):
2979         (BlackBerry::WebKit::SelectionOverlay::hide):
2980         * WebKitSupport/SelectionOverlay.h:
2981         (BlackBerry::WebKit::SelectionOverlay::create):
2982         (SelectionOverlay):
2983
2984 2012-06-25  Mark Hahnenberg  <mhahnenberg@apple.com>
2985
2986         JSLock should be per-JSGlobalData
2987         https://bugs.webkit.org/show_bug.cgi?id=89123
2988
2989         Reviewed by Geoffrey Garen.
2990
2991         Changed all sites that used JSLock to instead use the new JSLockHolder
2992         and pass in the correct JS context that the code is about to interact with that 
2993         needs protection. Also added a couple JSLocks to places that didn't already 
2994         have it that needed it.
2995
2996         * Api/BlackBerryGlobal.cpp:
2997         (BlackBerry::WebKit::clearMemoryCaches):
2998         * WebCoreSupport/ClientExtension.cpp:
2999         * WebCoreSupport/PagePopupBlackBerry.cpp:
3000         (WebCore::PagePopupBlackBerry::installDomFunction):
3001         * WebKitSupport/DumpRenderTreeSupport.cpp:
3002         (DumpRenderTreeSupport::computedStyleIncludingVisitedInfo):
3003
3004 2012-06-27  Jacky Jiang  <zhajiang@rim.com>
3005
3006         [BlackBerry] Wrong scale after leaving fullscreen <video>
3007         https://bugs.webkit.org/show_bug.cgi?id=89546
3008
3009         Reviewed by Antonio Gomes.
3010
3011         PR: 164948
3012         When we were entering fullscreen, the current scale A was clamped to a
3013         greater minimum scale B as we relayouted the contents during the change
3014         of the viewport size. When leaving fullscreen, we still used that scale
3015         B as the current scale which was incorrect.
3016         To fix this, we can save the current scale when entering fullscreen and
3017         restore it when leaving fullscreen.
3018
3019         * Api/WebPage.cpp:
3020         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
3021         (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
3022         (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
3023         * Api/WebPage_p.h:
3024         (WebPagePrivate):
3025
3026 2012-06-27  Jacky Jiang  <zhajiang@rim.com>
3027
3028         [BlackBerry] Scale was incorrect when reloading a simple web page after initial load
3029         https://bugs.webkit.org/show_bug.cgi?id=88889
3030
3031         Reviewed by Antonio Gomes.
3032
3033         PR: 164442
3034         For FrameLoadTypeStandard load, the layout timer can be fired which can
3035         call dispatchDidFirstVisuallyNonEmptyLayout() after the load Finished
3036         state, in which case the web page will have no chance to zoom to
3037         initial scale. We should give it a chance as well as FrameLoadTypeSame
3038         load.
3039
3040         * Api/WebPage.cpp:
3041         (BlackBerry::WebKit::WebPagePrivate::shouldZoomToInitialScaleOnLoad):
3042
3043 2012-06-26  Mike Fenton  <mifenton@rim.com>
3044
3045         [BlackBerry] Add WebPage interface for Async spell check.
3046         https://bugs.webkit.org/show_bug.cgi?id=89999
3047
3048         Reviewed by Rob Buis.
3049
3050         PR 124517.
3051
3052         Add interface for IMS async spell checking.
3053
3054         Reviewed Internally by Nima Ghanavatian.
3055
3056         * Api/WebPage.cpp:
3057         (BlackBerry::WebKit::WebPage::spellCheckingRequestProcessed):
3058         (WebKit):
3059         * Api/WebPage.h:
3060         * Api/WebPageClient.h:
3061         * WebKitSupport/InputHandler.cpp:
3062         (WebKit):
3063         (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
3064         * WebKitSupport/InputHandler.h:
3065         (InputHandler):
3066
3067 2012-06-26  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
3068
3069         [BlackBerry] Limit session storage quota to 5MB by default
3070         https://bugs.webkit.org/show_bug.cgi?id=89941
3071
3072         Reviewed by Rob Buis.
3073
3074         Limit session storage quota to 5MB by default for BlackBerry
3075         porting.
3076         Internally reviewed by George Staikos.
3077
3078         * Api/WebPage.cpp:
3079         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
3080         * Api/WebSettings.cpp:
3081         (WebKit):
3082         (BlackBerry::WebKit::WebSettings::standardSettings):
3083         (BlackBerry::WebKit::WebSettings::sessionStorageQuota):
3084         (BlackBerry::WebKit::WebSettings::setSessionStorageQuota):
3085         * Api/WebSettings.h:
3086
3087 2012-06-26  Charles Wei  <charles.wei@torchmobile.com.cn>
3088
3089         [BlackBerry] Use gesture SwipeDown to exit fullscreen for both video and plugin.
3090         https://bugs.webkit.org/show_bug.cgi?id=89960
3091
3092         Reviewed by Antonio Gomes.
3093
3094         We used to use gesture swipedown to exit fullscreen for plugin, but not fullscreen
3095         HTML5 video; When a swipe down happens, it applies this event to all the pluginviews
3096         in a page, even though only the one in fullscreen mode will process this.
3097
3098         With this patch, the SwipeDown gesture will only apply to the fullscreen elemement,
3099         which is either a plugin, or an Video element.
3100
3101         * Api/WebPage.cpp:
3102         (BlackBerry::WebKit::WebPage::notifySwipeEvent):
3103
3104 2012-06-25  Leo Yang  <leo.yang@torchmobile.com.cn>
3105
3106         [BlackBerry] Fill more data in device motion event
3107         https://bugs.webkit.org/show_bug.cgi?id=89857
3108
3109         Reviewed by Antonio Gomes.
3110
3111         Reviewed internally by Robin Cao.
3112
3113         Fill acceleration and rotation rate into DeviceMotionData.
3114
3115         * WebCoreSupport/DeviceMotionClientBlackBerry.cpp:
3116         (DeviceMotionClientBlackBerry::onMotion):
3117
3118 2012-06-25  Yong Li  <yoli@rim.com>
3119
3120         [BlackBerry] Add JSC statistics into about:memory
3121         https://bugs.webkit.org/show_bug.cgi?id=89779
3122
3123         Reviewed by Rob Buis.
3124
3125         Add detailed JS memory statistics to about:memory page.
3126
3127         * WebCoreSupport/AboutData.cpp:
3128         (WebCore::dumpJSCTypeCountSetToTableHTML):
3129         (WebCore):
3130         (WebCore::memoryPage):
3131
3132 2012-06-25  Crystal Zhang  <haizhang@rim.com>
3133
3134         [BlackBerry] Use AIR controls if client doesn't support HTML control
3135         https://bugs.webkit.org/show_bug.cgi?id=89777
3136
3137         Reviewed by Yong Li.
3138
3139         Currently HTML controls depend on client implementing CreateWindow event, for those clients
3140         that don't implement CreateWindow event, use old AIR controls so we don't break them.
3141
3142         PR 163818.
3143
3144         Internal reviewed by Mike Fenton.
3145
3146         * Api/WebPageClient.h:
3147         * WebCoreSupport/ChromeClientBlackBerry.cpp:
3148         (WebCore::ChromeClientBlackBerry::openPagePopup):
3149         * WebCoreSupport/PagePopupBlackBerry.cpp:
3150         (WebCore::PagePopupBlackBerry::sendCreatePopupWebViewRequest):
3151         * WebCoreSupport/PagePopupBlackBerry.h:
3152         (PagePopupBlackBerry):
3153         * WebKitSupport/InputHandler.cpp:
3154         (BlackBerry::WebKit::InputHandler::openSelectPopup):
3155
3156 2012-06-25  Rob Buis  <rbuis@rim.com>
3157
3158         [BlackBerry] Require text editable element to be enabled for VKB
3159         https://bugs.webkit.org/show_bug.cgi?id=89876
3160
3161         Reviewed by Yong Li.
3162
3163         After bug 58837 got in, children of <fieldset> now can inherit the disabled
3164         state of the fieldset. When trying for instance fast/forms/fieldset/fieldset-disabled.html,
3165         it can be seen that when they are visually disabled, the input handling can still be triggered. So
3166         add an extra check to isTextBasedContentEditableElement that the element is enabled.
3167
3168         Reviewed internally by Mike Fenton.
3169
3170         * WebKitSupport/DOMSupport.cpp:
3171         (BlackBerry::WebKit::DOMSupport::isTextBasedContentEditableElement):
3172
3173 2012-06-24  Simon Fraser  <simon.fraser@apple.com>
3174
3175         Rename isPositioned to isOutOfFlowPositioned for clarity
3176         https://bugs.webkit.org/show_bug.cgi?id=89836
3177
3178         Reviewed by Antti Koivisto.
3179         
3180         RenderObject and RenderStyle had an isPositioned() method that was
3181         confusing, because it excluded relative positioning. Rename to 
3182         isOutOfFlowPositioned(), which makes it clearer that it only applies
3183         to absolute and fixed positioning.
3184
3185         Simple rename; no behavior change.
3186
3187         * Api/WebPage.cpp:
3188         (BlackBerry::WebKit::isPositionedContainer):
3189         (BlackBerry::WebKit::isNonRenderViewFixedPositionedContainer):
3190         (BlackBerry::WebKit::isFixedPositionedContainer):
3191
3192 2012-06-23  Sheriff Bot  <webkit.review.bot@gmail.com>
3193
3194         Unreviewed, rolling out r121058.
3195         http://trac.webkit.org/changeset/121058
3196         https://bugs.webkit.org/show_bug.cgi?id=89809
3197
3198         Patch causes plugins tests to crash in GTK debug builds
3199         (Requested by zdobersek on #webkit).
3200
3201         * Api/BlackBerryGlobal.cpp:
3202         (BlackBerry::WebKit::clearMemoryCaches):
3203         * WebCoreSupport/ClientExtension.cpp:
3204         * WebCoreSupport/PagePopupBlackBerry.cpp:
3205         (WebCore::PagePopupBlackBerry::installDomFunction):
3206         * WebKitSupport/DumpRenderTreeSupport.cpp:
3207         (DumpRenderTreeSupport::computedStyleIncludingVisitedInfo):
3208
3209 2012-06-20  Mark Hahnenberg  <mhahnenberg@apple.com>
3210
3211         JSLock should be per-JSGlobalData
3212         https://bugs.webkit.org/show_bug.cgi?id=89123
3213
3214         Reviewed by Gavin Barraclough.
3215
3216         Changed all sites that used JSLock to instead use the new JSLockHolder
3217         and pass in the correct JS context that the code is about to interact with that 
3218         needs protection.
3219
3220         * Api/BlackBerryGlobal.cpp:
3221         (BlackBerry::WebKit::clearMemoryCaches):
3222         * WebCoreSupport/ClientExtension.cpp:
3223         * WebCoreSupport/PagePopupBlackBerry.cpp:
3224         (WebCore::PagePopupBlackBerry::installDomFunction):
3225         * WebKitSupport/DumpRenderTreeSupport.cpp:
3226         (DumpRenderTreeSupport::computedStyleIncludingVisitedInfo):
3227
3228 2012-06-22  Andrew Lo  <anlo@rim.com>
3229
3230         [BlackBerry] Tap highlight fade animations are added to overlay continuously during pinch zoom.
3231         https://bugs.webkit.org/show_bug.cgi?id=89772
3232
3233         Reviewed by Antonio Gomes.
3234
3235         When pinch zooming, DefaultTapHighlight::hide is continuously
3236         called from the UI thread. This resulted in fade animations being
3237         created and added to the override overlay continuously.
3238
3239         This patch moves the m_visible check so that it applies for both
3240         threads.
3241
3242         Internal PR164183
3243
3244         * WebKitSupport/DefaultTapHighlight.cpp:
3245         (BlackBerry::WebKit::DefaultTapHighlight::draw):
3246         (BlackBerry::WebKit::DefaultTapHighlight::hide):
3247         * WebKitSupport/DefaultTapHighlight.h:
3248         (DefaultTapHighlight):
3249
3250 2012-06-22  Yong Li  <yoli@rim.com>
3251
3252         [BlackBerry] Set WebSecurityEnabled flag accordingly.
3253         https://bugs.webkit.org/show_bug.cgi?id=89602
3254
3255         Reviewed by Rob Buis.
3256
3257         Disable web security checks if needed.
3258
3259         * Api/WebPage.cpp:
3260         (BlackBerry::WebKit::WebPagePrivate::init):
3261         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
3262
3263 2012-06-22  Parth Patel  <parpatel@rim.com>
3264
3265         [Blackberry] BlackBerry::Platform::Settings::get() rename to BlackBerry::Platform::Settings::instance() to make it consistent with our other singletons
3266         https://bugs.webkit.org/show_bug.cgi?id=89684
3267
3268         Reviewed by Yong Li.
3269
3270         Build Fix-Typo Update setting instance access to use instance() instead of get().
3271
3272         * WebKitSupport/InputHandler.cpp:
3273         (BlackBerry::WebKit::InputHandler::isInputModeEnabled):
3274
3275 2012-06-22  Amy Ousterhout  <aousterh@chromium.org>
3276
3277         Renamed DeviceOrientation to DeviceOrientationData
3278         https://bugs.webkit.org/show_bug.cgi?id=88663
3279
3280         Reviewed by Steve Block.
3281
3282         Updated files to use the renamed DeviceOrientationData instead of DeviceOrientation.
3283         This change makes DeviceOrientationData consistent with DeviceMotionData.
3284
3285         * WebCoreSupport/DeviceOrientationClientBlackBerry.h:
3286         (DeviceOrientationClientBlackBerry):
3287
3288 2012-06-22  Joseph Pecoraro  <pecoraro@apple.com>
3289
3290         Web Inspector: InspectorState::updateCookie should not do JSON serialization if unsupported
3291         https://bugs.webkit.org/show_bug.cgi?id=89743
3292
3293         Reviewed by Yury Semikhatsky.
3294
3295         * WebCoreSupport/InspectorClientBlackBerry.cpp:
3296         (WebCore::InspectorClientBlackBerry::updateInspectorStateCookie):
3297
3298 2012-06-21  Parth Patel  <parpatel@rim.com>
3299
3300         [Blackberry] BlackBerry::Platform::Settings::get() rename to BlackBerry::Platform::Settings::instance() to make it consistent with our other singletons
3301         https://bugs.webkit.org/show_bug.cgi?id=89684
3302
3303         Reviewed by Yong Li.
3304    
3305         Update setting instance access to use instance() instead of get().
3306
3307         * Api/BlackBerryGlobal.cpp:
3308         (BlackBerry::WebKit::globalInitialize):
3309         * Api/WebPage.cpp:
3310         (BlackBerry::WebKit::WebPagePrivate::init):
3311         (BlackBerry::WebKit::WebPagePrivate::shouldSendResizeEvent):
3312         * WebCoreSupport/AboutData.cpp:
3313         (WebCore::configPage):
3314         * WebCoreSupport/CacheClientBlackBerry.cpp:
3315         (WebCore::CacheClientBlackBerry::updateCacheCapacity):
3316         * WebKitSupport/FatFingers.cpp:
3317         (BlackBerry::WebKit::FatFingers::getPaddings):
3318         * WebKitSupport/InputHandler.cpp:
3319         (BlackBerry::WebKit::InputHandler::isInputModeEnabled):
3320         (BlackBerry::WebKit::InputHandler::setInputModeEnabled):
3321         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
3322         * WebKitSupport/SurfacePool.cpp:
3323         (BlackBerry::WebKit::SurfacePool::initialize):
3324
3325 2012-06-21  Genevieve Mak  <gmak@rim.com>
3326
3327         Add a parameter to handletTouchPoint to bypass FatFingers
3328         on touch up. There are some cases where the user may drag
3329         their finger off the element and we want to use the actual
3330         touch point instead of the FatFingers adjusted point.
3331         https://bugs.webkit.org/show_bug.cgi?id=89677
3332
3333         Reviewed by Antonio Gomes.
3334
3335         * Api/WebPage.cpp:
3336         (BlackBerry::WebKit::WebPage::touchPointAsMouseEvent):
3337         * Api/WebPage.h:
3338         * WebKitSupport/TouchEventHandler.cpp:
3339         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
3340         * WebKitSupport/TouchEventHandler.h:
3341         (TouchEventHandler):
3342
3343 2012-06-21  Mike Fenton  <mifenton@rim.com>
3344
3345         [BlackBerry] Input mode should adapt automatically to settings changes
3346         https://bugs.webkit.org/show_bug.cgi?id=89595
3347
3348         Reviewed by Antonio Gomes.
3349
3350         PR 167540.
3351
3352         Add helper function to check if input is enabled so that
3353         the override settings can be applied at any time.
3354
3355         Reviewed Internally by Gen Mak.
3356
3357         * Api/WebPage.cpp:
3358         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
3359         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
3360         * WebKitSupport/InputHandler.cpp:
3361         (BlackBerry::WebKit::InputHandler::isInputModeEnabled):
3362         (BlackBerry::WebKit::InputHandler::setInputModeEnabled):
3363         (BlackBerry::WebKit::InputHandler::setElementFocused):
3364         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
3365         (BlackBerry::WebKit::InputHandler::notifyClientOfKeyboardVisibilityChange):
3366         (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
3367         (BlackBerry::WebKit::InputHandler::setComposingText):
3368         * WebKitSupport/InputHandler.h:
3369         * WebKitSupport/TouchEventHandler.cpp:
3370         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
3371
3372 2012-06-20  Jacky Jiang  <zhajiang@rim.com>
3373
3374         Add a != operator to ViewportArguments
3375         https://bugs.webkit.org/show_bug.cgi?id=87505
3376
3377         Reviewed by Antonio Gomes.
3378         Patch by Jacky Jiang  <zhajiang@rim.com>
3379
3380         Use != operator of ViewportArguments.
3381
3382         * Api/WebPage.cpp:
3383         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
3384         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
3385         * Api/WebViewportArguments.cpp:
3386         (BlackBerry::WebKit::WebViewportArguments::operator!=):
3387
3388 2012-06-20  Christopher Hutten-Czapski  <chutten@rim.com>
3389
3390         [BlackBerry] Add an API to immediately enable cross-site XHR
3391         https://bugs.webkit.org/show_bug.cgi?id=89594
3392
3393         Internally Reviewed by Yong Li.
3394         Reviewed by Rob Buis.
3395
3396         There is no API to disable it as clients may rely on legacy behaviour
3397         of not disabling until the next frame load.
3398
3399         * Api/WebPage.cpp:
3400         (BlackBerry::WebKit::enableCrossSiteXHRRecursively):
3401         (WebKit):
3402         (BlackBerry::WebKit::WebPagePrivate::enableCrossSiteXHR):
3403         (BlackBerry::WebKit::WebPage::enableCrossSiteXHR):
3404         * Api/WebPage.h:
3405         * Api/WebPage_p.h:
3406         (WebPagePrivate):
3407
3408 2012-06-20  Konrad Piascik  <kpiascik@rim.com>
3409
3410         [BlackBerry] Enable setAcceleratedCompositingForFixedPositionEnabled
3411         https://bugs.webkit.org/show_bug.cgi?id=89575
3412
3413         Reviewed by Antonio Gomes.
3414
3415         Enable the flag so that we get position:fixed elemetns to be rendered
3416         using accelerated compositing.
3417
3418         * Api/WebPage.cpp:
3419         (BlackBerry::WebKit::WebPagePrivate::init):
3420
3421 2012-06-20  Julien Chaffraix  <jchaffraix@webkit.org>