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