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