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