[BlackBerry] GeolocationClientBB should show file system path in prompts when host...
[WebKit.git] / Source / WebKit / blackberry / ChangeLog
1 2012-12-07  Otto Derek Cheung  <otcheung@rim.com>
2
3         [BlackBerry] GeolocationClientBB should show file system path in prompts when host is not avaliable
4         https://bugs.webkit.org/show_bug.cgi?id=103785
5
6         PR 247656
7
8         Reviewed by Rob Buis.
9
10         Adding a special case for origins with protocol "file". We will use the filepath as
11         an origin when asking for geolocation permission.
12
13         If the origin is unique (ie. from a sandboxed iframe), we will fail the location request
14         right away.
15
16         * WebCoreSupport/GeolocationClientBlackBerry.cpp:
17         (getOrigin):
18         (GeolocationClientBlackBerry::requestPermission):
19         (GeolocationClientBlackBerry::cancelPermissionRequest):
20
21 2012-12-07  Mike Lattanzio  <mlattanzio@rim.com>
22
23         [BlackBerry] Update BlackBerry Port to use new Graphics::createBuffer BufferType enum values.
24         https://bugs.webkit.org/show_bug.cgi?id=104121
25
26         Reviewed by Rob Buis.
27
28         Update createBuffer calls to reflect new BufferType enum.
29         Set buffers opaque if possible to avoid unnecessary blends.
30         Internal PR 254649
31         Internal Review: Jakob Petsovits
32
33         * WebKitSupport/BackingStoreTile.cpp:
34         (BlackBerry::WebKit::TileBuffer::nativeBuffer):
35
36 2012-12-07  Andrew Lo  <anlo@rim.com>
37
38         [BlackBerry] Double zoom animation when focusing on input field.
39         https://bugs.webkit.org/show_bug.cgi?id=104375
40
41         Reviewed by Rob Buis.
42         Internally reviewed by Jakob Petsovits.
43
44         UI thread does not need to be notified of a scale change if the WebKit
45         thread scale has not changed.
46
47         This caused issues when two viewport resizes occured one after the other.
48         Before the scale change due to the first resize could be set in the WK
49         thread's scale value, it caused WK thread to dispatch a scaleChanged,
50         overwritting & resetting the new UI thread scale value, resulting in the
51         double zoom animation.
52
53         The larger issue dealing with synchronization between the threads where
54         scale changes could occur on either thread, however that is beyond the
55         scope of this change.
56
57         Internal PR253122
58
59         * Api/WebPage.cpp:
60         (BlackBerry::WebKit::WebPagePrivate::shouldZoomAboutPoint):
61
62 2012-12-07  Xiaobo Wang  <xbwang@torchmobile.com.cn>
63
64         [BlackBerry] DRT - Update implementation of TestRunner.setCustomPolicyDelegate()
65         https://bugs.webkit.org/show_bug.cgi?id=104243
66
67         RIM PR 259337
68
69         Reviewed by Rob Buis.
70
71         1. Add DRT callback in dispatchDecidePolicyForResponse.
72         2. Pass frame pointer to DRT callback in
73         dispatchDecidePolicyForNavigationAction, so that it can be used to
74         calculate originating.
75         3. Fix some webkit style errors.
76
77         The patch fixed the following tests:
78         - http/tests/download
79         - fast/forms/mailto/formenctype-attribute-button-html.html
80         - fast/forms/mailto/formenctype-attribute-input-html.html
81         - fast/encoding/mailto-always-utf-8.html
82
83         * Api/DumpRenderTreeClient.h:
84         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
85         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForResponse):
86         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction):
87         (WebCore::FrameLoaderClientBlackBerry::transitionToCommittedForNewPage):
88         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFinishLoad):
89         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad):
90         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendRequest):
91         (WebCore::FrameLoaderClientBlackBerry::decidePolicyForExternalLoad):
92
93 2012-12-07  Mary Wu  <mary.wu@torchmobile.com.cn>
94
95         [BlackBerry] new target window would cause the url being loaded twice
96         https://bugs.webkit.org/show_bug.cgi?id=104086
97
98         Reviewed by Yong Li.
99
100         When webkit need to open window for a new target like "_blank", it would
101         load the url subsequently after createWindow. But the chrome browser would
102         load the url again when it get the OpenWindowEvent from native, which
103         causes the url being loaded twice. We should make sure that createWindow() be
104         used to create a new window only, not loading url, so we pass empty url
105         as parameter.
106
107         RIM PR# 257329
108         Internally reviewed by Charles Wei.
109
110         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
111         (WebCore::FrameLoaderClientBlackBerry::dispatchCreatePage):
112
113 2012-12-05  Otto Derek Cheung  <otcheung@rim.com>
114
115         [BlackBerry] Geolocation prompts won't respond to the correct geolocation object if the user opens two pages and respond in the reversed order
116         https://bugs.webkit.org/show_bug.cgi?id=104162
117
118         PR 257505
119         Reviewed by Yong Li.
120
121         GeolocationClientBlackBerry will register itself to GeolocationHandler when it has
122         a pending request. When browser responds with WebPageClientImpl::setAllowGeolocation,
123         we go through the list and let all the pending GeolocationListeners know that a certain
124         origin has been aceepted/denied.
125
126         * WebCoreSupport/GeolocationClientBlackBerry.cpp:
127         (GeolocationClientBlackBerry::geolocationDestroyed):
128         (GeolocationClientBlackBerry::requestPermission):
129         (GeolocationClientBlackBerry::cancelPermissionRequest):
130         (GeolocationClientBlackBerry::onPermission):
131
132 2012-12-05  Jakob Petsovits  <jpetsovits@rim.com>
133
134         [BlackBerry] Better crash fix for resetting tiles on a backingstore takeover.
135         https://bugs.webkit.org/show_bug.cgi?id=103969
136         RIM PR 258415
137
138         Reviewed by Adam Treat.
139
140         The previous attempt for releasing tile buffers from the
141         previously active backingstore did not take into account
142         that resetTiles() would sometimes return early without
143         having swapped the tiles and thus reclaiming them.
144
145         This patch removes the early returns, because it's safe
146         to swap in an empty geometry at any time and we should
147         always take the chance when we get it.
148
149         Also put the code that calls resetTiles() on an owner
150         switch right into setCurrentBackingStoreOwner(), so that
151         it will also release the buffers when the BackingStore
152         is destroyed (the function is then called with 0).
153
154         * Api/BackingStore.cpp:
155         (BlackBerry::WebKit::BackingStorePrivate::resetTiles):
156         (WebKit):
157         (BlackBerry::WebKit::BackingStorePrivate::setCurrentBackingStoreOwner):
158         * Api/BackingStore.h: Had to add the friend here to make the moved code work from the static function.
159         * Api/BackingStore_p.h:
160         (BackingStorePrivate):
161         * Api/WebPage.cpp:
162         (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore):
163
164 2012-12-05  Jakob Petsovits  <jpetsovits@rim.com>
165
166         [BlackBerry] Keep screen updates suspended until after a viewport resize.
167         https://bugs.webkit.org/show_bug.cgi?id=104041
168
169         Reviewed by Adam Treat.
170
171         Now that screen and backing store updates can be suspended
172         and resumed separately from each other, prevent blits for
173         the whole duration of setViewportSize() and always issue
174         a blit at the end.
175
176         Makes WebPage::setViewportSize() more robust in threaded usage,
177         easier to read/understand, and gets rid of a couple of FIXMEs.
178
179         * Api/WebPage.cpp:
180         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
181
182 2012-12-05  Andrew Lo  <anlo@rim.com>
183
184         [BlackBerry] Scroll position shifts while FCC & selection handle are dragged
185         https://bugs.webkit.org/show_bug.cgi?id=104156
186
187         Reviewed by Rob Buis.
188         Internally reviewed by Mike Fenton.
189
190         Only ensureFocusTextElementVisible on selectionChanged when
191         an element is being re-focused.
192         Internal PR256329
193
194         * WebKitSupport/InputHandler.cpp:
195         (BlackBerry::WebKit::InputHandler::InputHandler):
196         (BlackBerry::WebKit::InputHandler::setElementFocused):
197         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
198         (BlackBerry::WebKit::InputHandler::selectionChanged):
199         * WebKitSupport/InputHandler.h:
200         (InputHandler):
201
202 2012-12-05  Leo Yang  <leoyang@rim.com>
203
204         [BlackBerry] Enable CSS_IMAGE_RESOLUTION
205         https://bugs.webkit.org/show_bug.cgi?id=104132
206
207         Reviewed by Yong Li.
208
209         * WebCoreSupport/AboutDataEnableFeatures.in:
210
211 2012-12-05  Jacky Jiang  <zhajiang@rim.com>
212
213         [BlackBerry] meta viewport pages are rendered at a bad initial scale
214         https://bugs.webkit.org/show_bug.cgi?id=104122
215
216         Reviewed by Rob Buis.
217         Internally reviewed by Arvid Nilsson.
218
219         PR: 240378
220         Many websites are rendered at a very bad initial scale because they
221         both specify meta viewport tag and have large width elements. In such
222         a case we will think the meta viewport tag is broken if the width of
223         any element is larger than the calculated layout viewport width.
224         The fix to this is straightforward that we will zoom the page to fit
225         the screen to have better user experience instead of respecting the
226         meta viewport. This can fix the issue on the websites such as
227         www.travelpod.com, www.forbes.com, interfacelift.com, www.sky.com,
228         raphaeljs.com and so on.
229         If non-empty m_userViewportArguments is applied, then we will force to
230         respect the viewport arguments. In this way we will restrict the fix to
231         browser only.
232
233         * Api/WebPage.cpp:
234         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
235         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
236         (BlackBerry::WebKit::WebPagePrivate::respectViewport):
237         (WebKit):
238         (BlackBerry::WebKit::WebPagePrivate::initialScale):
239         (BlackBerry::WebKit::WebPagePrivate::maximumScale):
240         (BlackBerry::WebKit::WebPagePrivate::dispatchViewportPropertiesDidChange):
241         * Api/WebPage_p.h:
242         (BlackBerry::WebKit::WebPagePrivate::isUserScalable):
243         (WebPagePrivate):
244         (BlackBerry::WebKit::WebPagePrivate::minimumScale):
245
246 2012-12-05  Otto Derek Cheung  <otcheung@rim.com>
247
248         [BlackBerry] GeolocationClientBB only holding the latest geolocation permission request
249         https://bugs.webkit.org/show_bug.cgi?id=104123
250
251         PR 256089
252
253         Reviewed by Yong Li.
254
255         Add a mapping between origin URL and it's geolocation object so we could
256         respond to the correct geolocation when libwebview responds with onPermission
257         in GeolocationClient.
258
259         Using the mapping, we could also prevent requestGeolocation requests from the same origin
260         to be sent twice. This prevents pages that hold two iframes to the same resource to request
261         geolocation permission on the same security origin twice.
262
263         Tested this by running a page that includes 2 or more iframes that requests geolocation
264         permission.
265
266         * WebCoreSupport/GeolocationClientBlackBerry.cpp:
267         (GeolocationClientBlackBerry::requestPermission):
268         (GeolocationClientBlackBerry::cancelPermissionRequest):
269         (GeolocationClientBlackBerry::onPermission):
270         * WebCoreSupport/GeolocationClientBlackBerry.h:
271         (GeolocationClientBlackBerry):
272
273 2012-12-05  Yongxin Dai  <yodai@rim.com>
274
275         [BlackBerry] Avoid showing FCC on empty text field in a different way
276         https://bugs.webkit.org/show_bug.cgi?id=104019
277
278         Reviewed by Rob Buis.
279
280         PR #222796
281
282         Add text field empty flag along with the caret change notification so that
283         FineCursorContnrol is able to avoid showing FCC on empty text filed.
284         Previous approach, notifying client with empty caret on empty text field,
285         causes problem. Its code is removed.
286
287         Reviewed Internally by Mike Fenton.
288
289         * Api/WebPageClient.h:
290         * WebKitSupport/SelectionHandler.cpp:
291         (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
292
293 2012-12-04  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
294         [BlackBerry] VKB flickers in and out when tapping on webview after text selection on URL bar
295         https://bugs.webkit.org/show_bug.cgi?id=103874
296         PR245678
297
298         Reviewed by Rob Buis.
299         Internally reviewed by Mike Fenton.
300
301         When the virtual keyboard is hiding, the viewport is changed and the page needs
302         to relayout.At the same time, the user interface thread  is executing compositeLayers
303         and it will dispatch the updateDelegatedOverlays() to webkit thread which will trigger
304         the selectionPositionChanged() in webkit thread.
305
306         When the selectionPositionChanged() calls frame->selection()->selection().
307         visibleStart() and frame->selection()->selection().visibleEnd(), it will
308         trigger page relayout and return the relayouted selection start and end position.
309         These positions are out of the range which is recorded before its relayout.
310         As a result it think the selection start and end are all clipped out and it send
311         out an "empty selection"(not selected) changing event.
312
313         When the WebPageClient receives the empty selection changing event, it will consider
314         the selection process aborted and might cancel selection-related user interaction.
315         This is not what we intend to happen.
316
317         This patch stops the changing handling process and returns when the page needs relayout,
318         and the selection will be updated again when the page finishs relayout.
319
320         * WebKitSupport/SelectionHandler.cpp:
321         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
322
323 2012-12-04  Andrew Lo  <anlo@rim.com>
324
325         [BlackBerry] Scroll adjustments while typing scroll off page, then bounce back.
326         https://bugs.webkit.org/show_bug.cgi?id=104045
327
328         Reviewed by Rob Buis.
329         Internally reviewed by Mike Fenton & Jakob Petsovits.
330
331         Internal PR253845
332         The main frame's view should only be temporarily set to
333         not constrain scrolling to the content edge while the
334         scroll position is set at the end of the scroll animation.
335
336         Remove ensureFocusTextElementVisible from setSpannableTextAndRelativeCursor
337         in InputHandler since FrameSelection::revealSelection
338         already implements scroll adjustments due to typing.
339
340         * Api/WebPage.cpp:
341         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
342         (BlackBerry::WebKit::WebPagePrivate::zoomBlock):
343         (BlackBerry::WebKit::WebPagePrivate::resetBlockZoom):
344         * Api/WebPage_p.h:
345         (WebPagePrivate):
346         * WebKitSupport/InputHandler.cpp:
347         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
348         (BlackBerry::WebKit::InputHandler::setSpannableTextAndRelativeCursor):
349
350 2012-12-04  Mike Fenton  <mifenton@rim.com>
351
352         [BlackBerry] Remove assert and fix conditional for out of bounds requests in InputHandler::spannableTextInRange
353         https://bugs.webkit.org/show_bug.cgi?id=104001
354
355         Reviewed by Rob Buis.
356
357         PR 257723.
358
359         Remove assert and update early return to allow out of bounds
360         request at end of field.
361
362         Reviewed Internally by Gen Mak.
363
364         * WebKitSupport/InputHandler.cpp:
365         (BlackBerry::WebKit::InputHandler::spannableTextInRange):
366
367 2012-12-04  Jakob Petsovits  <jpetsovits@rim.com>
368
369         [BlackBerry] Store rendered regions in pixel contents coordinates.
370         https://bugs.webkit.org/show_bug.cgi?id=103930
371         PR 253496
372
373         Reviewed by Rob Buis.
374         Internally reviewed by Adam Treat.
375
376         Previously, the rendered region of a tile used to be
377         stored in coordinates relative to the tile origin.
378         This brings no benefits whatsoever and causes a lot
379         of unnecessary transformations, together with the
380         potential of incorrectly transforming rendered regions.
381
382         By storing the rendered region as what it is,
383         everything is more compact, easier to understand
384         and easier to use with other existing functionality.
385
386         * Api/BackingStore.cpp:
387         (BlackBerry::WebKit::BackingStorePrivate::clearAndUpdateTileOfNotRenderedRegion):
388         (BlackBerry::WebKit::BackingStorePrivate::isCurrentVisibleJob):
389         (BlackBerry::WebKit::BackingStorePrivate::render):
390         (BlackBerry::WebKit::BackingStorePrivate::renderVisibleContents):
391         (BlackBerry::WebKit::BackingStorePrivate::copyPreviousContentsToTileBuffer):
392         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
393         (BlackBerry::WebKit::BackingStorePrivate::compositeContents):
394         (BlackBerry::WebKit::BackingStorePrivate::blitTileRect):
395         (BlackBerry::WebKit::BackingStorePrivate::isTileVisible):
396         (BlackBerry::WebKit::BackingStorePrivate::visibleTilesRect):
397         (BlackBerry::WebKit::BackingStorePrivate::tileVisibleContentsRect):
398         (BlackBerry::WebKit::BackingStorePrivate::tileContentsRect):
399         (BlackBerry::WebKit::BackingStorePrivate::updateTiles):
400         (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion):
401         (BlackBerry::WebKit::BackingStorePrivate::mapFromPixelContentsToTiles):
402         (BlackBerry::WebKit::BackingStorePrivate::transformChanged):
403         (BlackBerry::WebKit::BackingStorePrivate::blitToWindow):
404         * Api/BackingStore_p.h:
405         (BackingStorePrivate):
406         * WebKitSupport/BackingStoreTile.cpp:
407         (BlackBerry::WebKit::TileBuffer::surfaceRect):
408         (BlackBerry::WebKit::TileBuffer::pixelContentsRect):
409         (WebKit):
410         (BlackBerry::WebKit::TileBuffer::isRendered):
411         (BlackBerry::WebKit::TileBuffer::notRenderedRegion):
412         * WebKitSupport/BackingStoreTile.h:
413         (TileBuffer):
414
415 2012-12-04  Jakob Petsovits  <jpetsovits@rim.com>
416
417         [BlackBerry] Use updated API for backingstore tiles.
418         https://bugs.webkit.org/show_bug.cgi?id=103970
419         PR 212369
420
421         Reviewed by George Staikos.
422         Internally reviewed by Arvid Nilsson.
423
424         We now make use of Platform::Settings::tileSize() in the
425         backingstore and don't hardcode the number of back buffers
426         like we used to.
427
428         * Api/BackingStore.cpp:
429         (BlackBerry::WebKit::bestDivisor):
430         (BlackBerry::WebKit::BackingStorePrivate::tileWidth):
431         (BlackBerry::WebKit::BackingStorePrivate::tileHeight):
432         (BlackBerry::WebKit::BackingStorePrivate::tileSize):
433         * WebKitSupport/AboutData.cpp:
434         (BlackBerry::WebKit::configPage):
435         * WebKitSupport/SurfacePool.cpp:
436         (BlackBerry::WebKit::SurfacePool::SurfacePool):
437         (BlackBerry::WebKit::SurfacePool::numberOfBackingStoreFrontBuffers):
438         (BlackBerry::WebKit::SurfacePool::initialize):
439         * WebKitSupport/SurfacePool.h:
440         (SurfacePool):
441
442 2012-12-04  Jakob Petsovits  <jpetsovits@rim.com>
443
444         [BlackBerry] On taking over a backingstore, reset the previous page's tiles.
445         https://bugs.webkit.org/show_bug.cgi?id=103969
446         RIM PR 253496
447
448         Reviewed by George Staikos.
449
450         With buffers being explicitly reclaimed from backingstore
451         geometries, we have to make sure that the previously
452         active backingstore releases its front buffers for use
453         in the newly active one.
454
455         Previously, this clearing of backingstore tiles occurred
456         after the dormant backingstore is reactivated,
457         the backingstore active in the meantime would just use
458         the back buffer anyway and leave the dormant one with
459         dangling pointers that would just not be shown.
460         Now that we have a counted list of back buffers,
461         we need to be explicit about this thing upfront.
462
463         Fixes a crash that would occur after switching ownership
464         of the backingstore to a different WebPage.
465
466         * Api/WebPage.cpp:
467         (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore):
468
469 2012-12-03  Jakob Petsovits  <jpetsovits@rim.com>
470
471         [BlackBerry] Refactor the backingstore to swap full geometries.
472         https://bugs.webkit.org/show_bug.cgi?id=103924
473         RIM PR 253496
474
475         Reviewed by Yong Li.
476         Internally reviewed by Adam Treat and Arvid Nilsson.
477
478         The backingstore had a working split between front and
479         back state, but it was multilayered and hard to grasp.
480         This commit cleanly divides the responsibilities of
481         BackingStoreGeometry and TileBuffer, with the latter
482         now being able to function on its own without the help
483         of its geometry. The BackingStoreTile class was an
484         unnecessary middleman and can be removed wholesale.
485
486         A BackingStoreGeometry can now function with null tiles
487         being assigned to its indices, which enables us to reclaim
488         tile buffers outside of the visible contents area as back
489         buffers. This reduces the need to swap and block when the
490         backingstore size exceeds the contents size, and also lets
491         us use more tiles for initial rendering after a call to
492         resetTiles() which is now implemented as swapping in a
493         geometry with only null buffers.
494
495         setBackingStoreRect() was the only function that had to
496         get a change of behavior. Because we're now constructing
497         new BackingStoreGeometry objects every time the front
498         geometry is being exchanged for a new one, it is only
499         safe to call other functions reliant on the new geometry
500         after it has been finalized and put in place. Therefore,
501         updateTilesForScrollOrNotRenderedRegion() takes on the
502         render queue maintenance tasks that setBackingStoreRect()
503         had performed previously. It was already doing something
504         very similar so only few changes to the function were
505         necessary.
506
507         This commit will make subsequent changes to the
508         backingstore geometry and tile logic a lot easier.
509
510         * Api/BackingStore.cpp:
511         (BlackBerry::WebKit::BackingStoreGeometry::isTileCorrespondingToBuffer):
512         (WebKit):
513         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
514         (BlackBerry::WebKit::BackingStorePrivate::~BackingStorePrivate):
515         (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect):
516         (BlackBerry::WebKit::BackingStorePrivate::updateTilesAfterBackingStoreRectChange):
517         (BlackBerry::WebKit::BackingStorePrivate::clearAndUpdateTileOfNotRenderedRegion):
518         (BlackBerry::WebKit::BackingStorePrivate::clearRenderedRegion):
519         (BlackBerry::WebKit::BackingStorePrivate::isCurrentVisibleJob):
520         (BlackBerry::WebKit::BackingStorePrivate::render):
521         (BlackBerry::WebKit::BackingStorePrivate::copyPreviousContentsToTileBuffer):
522         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
523         (BlackBerry::WebKit::BackingStorePrivate::compositeContents):
524         (BlackBerry::WebKit::BackingStorePrivate::blitTileRect):
525         (BlackBerry::WebKit::BackingStorePrivate::tileVisibleContentsRect):
526         (BlackBerry::WebKit::BackingStorePrivate::resetTiles):
527         (BlackBerry::WebKit::BackingStorePrivate::updateTiles):
528         (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion):
529         (BlackBerry::WebKit::BackingStorePrivate::mapFromTilesToTransformedContents):
530         (BlackBerry::WebKit::BackingStorePrivate::mapFromTransformedContentsToTiles):
531         (BlackBerry::WebKit::BackingStorePrivate::transformChanged):
532         (BlackBerry::WebKit::BackingStorePrivate::createSurfaces):
533         (BlackBerry::WebKit::BackingStoreGeometry::originOfTile):
534         (BlackBerry::WebKit::BackingStorePrivate::adoptAsFrontState):
535         * Api/BackingStore_p.h:
536         (WebKit):
537         (BackingStoreGeometry):
538         (BlackBerry::WebKit::BackingStoreGeometry::tileBufferAt):
539         (BackingStorePrivate):
540         * Api/WebPage.cpp:
541         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
542         (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore):
543         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
544         * Api/WebPage_p.h:
545         (WebKit):
546         * WebKitSupport/BackingStoreTile.cpp:
547         (BlackBerry::WebKit::TileBuffer::TileBuffer):
548         (BlackBerry::WebKit::TileBuffer::~TileBuffer):
549         (BlackBerry::WebKit::TileBuffer::isRendered):
550         (BlackBerry::WebKit::TileBuffer::nativeBuffer):
551         (BlackBerry::WebKit::TileBuffer::wasNativeBufferCreated):
552         (BlackBerry::WebKit::TileBuffer::paintBackground):
553         * WebKitSupport/BackingStoreTile.h:
554         (BlackBerry::WebKit::TileBuffer::lastRenderOrigin):
555         (BlackBerry::WebKit::TileBuffer::setLastRenderOrigin):
556         (BlackBerry::WebKit::TileBuffer::lastRenderScale):
557         (BlackBerry::WebKit::TileBuffer::setLastRenderScale):
558         (TileBuffer):
559         (BlackBerry::WebKit::TileBuffer::backgroundPainted):
560         * WebKitSupport/SurfacePool.cpp:
561         (BlackBerry::WebKit::SurfacePool::SurfacePool):
562         (BlackBerry::WebKit::SurfacePool::size):
563         (WebKit):
564         (BlackBerry::WebKit::SurfacePool::initialize):
565         (BlackBerry::WebKit::SurfacePool::initializeVisibleTileBuffer):
566         (BlackBerry::WebKit::SurfacePool::hasBackBuffer):
567         (BlackBerry::WebKit::SurfacePool::takeBackBuffer):
568         (BlackBerry::WebKit::SurfacePool::addBackBuffer):
569         (BlackBerry::WebKit::SurfacePool::createBuffers):
570         (BlackBerry::WebKit::SurfacePool::releaseBuffers):
571         (BlackBerry::WebKit::SurfacePool::notifyBuffersComposited):
572         * WebKitSupport/SurfacePool.h:
573         (BlackBerry::WebKit::SurfacePool::isActive):
574         (BlackBerry::WebKit::SurfacePool::isEmpty):
575         (SurfacePool):
576         (BlackBerry::WebKit::SurfacePool::visibleTileBuffer):
577
578 2012-12-03  Cosmin Truta  <ctruta@rim.com>
579
580         [BlackBerry] Enable HIDDEN_PAGE_DOM_TIMER_THROTTLING
581         https://bugs.webkit.org/show_bug.cgi?id=103842
582
583         Reviewed by Yong Li.
584
585         Add HIDDEN_PAGE_DOM_TIMER_THROTTLING.
586
587         * WebCoreSupport/AboutDataEnableFeatures.in:
588
589 2012-12-02  Tiancheng Jiang  <tijiang@rim.com>
590
591         [BlackBerry]Tap highlight
592         https://bugs.webkit.org/show_bug.cgi?id=103787
593
594         Reviewed by Rob Buis.
595
596         RIM PR 248626
597         Internally Reviewed by Genevieve Mak.
598
599         Draw tap highlight as soon as tap on element.
600
601         * Api/WebPage.cpp:
602         (BlackBerry::WebKit::WebPage::touchEvent):
603         * WebKitSupport/TouchEventHandler.cpp:
604         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
605         * WebKitSupport/TouchEventHandler.h:
606         (TouchEventHandler):
607
608 2012-11-28  Cosmin Truta  <ctruta@rim.com>
609
610         [BlackBerry] Set the minimal DOM timer interval to 4 milliseconds
611         https://bugs.webkit.org/show_bug.cgi?id=103534
612
613         Reviewed by Yong Li.
614
615         We align this behavior with other platforms.
616
617         * Api/BlackBerryGlobal.cpp:
618         (BlackBerry::WebKit::globalInitialize):
619
620 2012-11-29  Jacky Jiang  <zhajiang@rim.com>
621
622         [BlackBerry] window.open can load url twice which can cause security and timing issues
623         https://bugs.webkit.org/show_bug.cgi?id=103670
624
625         Reviewed by Yong Li.
626
627         PR: 252234
628         When we call window.open() in JS, DOMWindow will create a window and
629         change the url to load the resources. However, during the window
630         creation, we dispatch an OpenWindow event with the url to browser side
631         and browser side loads the url thereafter as well.
632         DOMWindow::createWindow() is only required to create the window not to
633         load url as far as I can tell. This is unneccessary and can cause
634         unexpected issues. So just pass an empty url instead to avoid
635         the double-load issue.
636
637         * WebCoreSupport/ChromeClientBlackBerry.cpp:
638         (WebCore::ChromeClientBlackBerry::createWindow):
639
640 2012-11-29  Otto Derek Cheung  <otcheung@rim.com>
641
642         [BlackBerry] Modifying GeoClientBlackBerry to switch between high and low accuracy
643         https://bugs.webkit.org/show_bug.cgi?id=103666
644
645         Reviewed by Yong Li.
646
647         Internally reviewed by Yong Li.
648
649         PR 243420
650
651         Updating GeolocationClientBlackBerry to switch accuracy when GeolocationController
652         calls setEnableHighAccuracy.
653
654         * WebCoreSupport/GeolocationClientBlackBerry.cpp:
655         (GeolocationClientBlackBerry::startUpdating):
656         (GeolocationClientBlackBerry::setEnableHighAccuracy):
657
658 2012-11-29  Andrew Lo  <anlo@rim.com>
659
660         [BlackBerry] Do not adjust scroll position on viewport resizes that are not orientation change related
661         https://bugs.webkit.org/show_bug.cgi?id=103659
662
663         Reviewed by Rob Buis.
664         Internally reviewed by Gen Mak.
665
666         Internal PR253893.
667         Only adjust scroll position during an orientation change
668         when setting viewport size.
669         We don't want the scroll position jumping around when opening
670         & closing the VKB.
671
672         * Api/WebPage.cpp:
673         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
674
675 2012-11-28  Otto Derek Cheung  <otcheung@rim.com>
676
677         [BlackBerry] CookieJarBlackBerry will use document settings for cookiesEnabled
678         https://bugs.webkit.org/show_bug.cgi?id=103560
679
680         Reviewed by Rob Buis.
681
682         PR 253490
683
684         Syncing platform Websetting's cookieEnabled value with Page->setting's cookieEnabled
685         value.
686
687         * Api/WebPage.cpp:
688         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
689
690 2012-11-27  James Simonsen  <simonjam@chromium.org>
691
692         Consolidate FrameLoader::load() into one function taking a FrameLoadRequest
693         https://bugs.webkit.org/show_bug.cgi?id=102151
694
695         Reviewed by Adam Barth.
696
697         * Api/WebPage.cpp:
698         (BlackBerry::WebKit::WebPagePrivate::load):
699         (BlackBerry::WebKit::WebPagePrivate::loadString):
700         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
701         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad):
702
703 2012-11-27  Jacky Jiang  <zhajiang@rim.com>
704
705         [BlackBerry] http:// origins can navigate to privileged local:// origins
706         https://bugs.webkit.org/show_bug.cgi?id=103437
707
708         Reviewed by Yong Li.
709
710         PR: 251489
711         When we aren't allowed to display the destination origin, we shouldn't
712         even create the window for it. In this way we can block the remote
713         origins(like http://) window.open local origins(like file:// and
714         local://) and avoid further security issues.
715         Chrome and Safari will open a blank window and fail to load. Firefox
716         will fail to open the window and report a load failure error which has
717         the same behavior as us. I would prefer this way as the window would
718         be useless and the calls after that would be harmful to us.
719
720         * WebCoreSupport/ChromeClientBlackBerry.cpp:
721         (WebCore::ChromeClientBlackBerry::createWindow):
722
723 2012-11-27  Andrew Lo  <anlo@rim.com>
724
725         [BlackBerry] Remove unnecessary backing store suspension in InputHandler::ensureFocusTextElementVisible
726         https://bugs.webkit.org/show_bug.cgi?id=103441
727
728         Reviewed by Rob Buis.
729         Internally reviewed by Mike Fenton.
730
731         Remove unnecessary backing store suspension in
732         InputHandler::ensureFocusTextElementVisible.
733
734         Not necessary anymore since both zoom and scroll adjustments
735         happen in an animation.
736
737         * WebKitSupport/InputHandler.cpp:
738         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
739
740 2012-11-27  Sheriff Bot  <webkit.review.bot@gmail.com>
741
742         Unreviewed, rolling out r135786.
743         http://trac.webkit.org/changeset/135786
744         https://bugs.webkit.org/show_bug.cgi?id=103379
745
746         It made 3 plugin tests timeout on several platforms (Requested
747         by Ossy on #webkit).
748
749         * Api/WebPage.cpp:
750         (BlackBerry::WebKit::WebPagePrivate::load):
751         (BlackBerry::WebKit::WebPagePrivate::loadString):
752         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
753         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad):
754
755 2012-11-26  James Simonsen  <simonjam@chromium.org>
756
757         Consolidate FrameLoader::load() into one function taking a FrameLoadRequest
758         https://bugs.webkit.org/show_bug.cgi?id=102151
759
760         Reviewed by Adam Barth.
761
762         * Api/WebPage.cpp:
763         (BlackBerry::WebKit::WebPagePrivate::load):
764         (BlackBerry::WebKit::WebPagePrivate::loadString):
765         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
766         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad):
767
768 2012-11-26  Genevieve Mak  <gmak@rim.com>
769
770         [BlackBerry] Form controls don't show pressed state.
771         https://bugs.webkit.org/show_bug.cgi?id=103292
772
773         Reviewed by Rob Buis.
774
775         Reviewed internally by Eli Fidler and Mike Lattanzio.
776         We weren't sending touch events to webpages unless they
777         had JS touch event listeners which form controls don't have.
778         Now send them always and do a little cleanup.
779         PR #249791
780
781         * Api/WebPage.cpp:
782         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
783         (BlackBerry::WebKit::WebPage::touchEvent):
784         * Api/WebPageClient.h:
785         * Api/WebPage_p.h:
786         (WebPagePrivate):
787         * WebCoreSupport/ChromeClientBlackBerry.cpp:
788         (WebCore::ChromeClientBlackBerry::needTouchEvents):
789
790 2012-11-26  Nima Ghanavatian  <nghanavatian@rim.com>
791
792         [BlackBerry] Null check calls associated with retrieving the caret rect.
793         https://bugs.webkit.org/show_bug.cgi?id=103281
794
795         Reviewed by Rob Buis.
796
797         Some of these calls can return null, which could lead to a crash.
798
799         Internally reviewed by Gen Mak.
800
801         * WebKitSupport/InputHandler.cpp:
802         (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions):
803
804 2012-11-26  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
805
806         [BlackBerry] Should not autofill username and password when there're more than one password inputs on the same page
807         https://bugs.webkit.org/show_bug.cgi?id=103104
808
809         Reviewed by Rob Buis.
810
811         RIM PR: 245334
812         Added the oldPassword detection back into the password input
813         detection logic, which was removed for simplicity when imported
814         those pieces of codes from Chromium. And we won't do autofill
815         when there're more than one password field detected.
816
817         Internally reviewed by Rob Buis.
818
819         * WebCoreSupport/CredentialTransformData.cpp:
820         (WebCore::CredentialTransformData::CredentialTransformData):
821         (WebCore::CredentialTransformData::findPasswordFormFields):
822         * WebCoreSupport/CredentialTransformData.h:
823         (CredentialTransformData):
824         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
825         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendSubmitEvent):
826
827 2012-11-25  Jacky Jiang  <zhajiang@rim.com>
828
829         [BlackBerry] Get rid of resetBitmapZoomScale()
830         https://bugs.webkit.org/show_bug.cgi?id=103200
831
832         Reviewed by Rob Buis.
833         Internally reviewed by Gen Mak.
834
835         PR: 235707
836         Right now, resetBitmapZoomScale() takes an unused paramter and
837         dispatches a message to end the bitmap zooming. However, the
838         interaction has its own state machine to start bitmap zooming when it
839         is active and end bitmap zooming when it is inactive. This is
840         expecially for pinch zoom and scroll. From WebKit side, block zoom
841         which will call zoomBlock when the bitmap zoom finished doesn't even
842         need to dispatch the useless ending message to ZoomHandler.
843         resetBitmapZoomScale() is basically a noop for block zoom. And likewise
844         that is useless for zoomToInitialScaleOnLoad(). It can also potentially
845         cause problem if it is used somewhere else in the future and
846         incidentally breaks the interaction's own state machine. So just remove
847         this completely.
848
849         * Api/WebPage.cpp:
850         (BlackBerry::WebKit::WebPagePrivate::zoomToInitialScaleOnLoad):
851         (BlackBerry::WebKit::WebPagePrivate::zoomBlock):
852         * Api/WebPageClient.h:
853
854 2012-11-24  Andy Chen  <andchen@rim.com>
855
856         [BlackBerry] Find-on-page keeps stale pointer
857         https://bugs.webkit.org/show_bug.cgi?id=103190
858
859         Reviewed by Rob Buis.
860
861         Find on page: pendingScopingEffort stores stale pointer when frames unload,
862         we need to cancel those scoping efforts.
863         PR 250807.
864
865         Internally reviewed by Yongxin Dai and Mike Fenton.
866
867         * WebKitSupport/InPageSearchManager.cpp:
868         (InPageSearchManager::DeferredScopeStringMatches):
869         (BlackBerry::WebKit::InPageSearchManager::frameUnloaded):
870
871 2012-11-24  Genevieve Mak  <gmak@rim.com>
872
873         [BlackBerry] Text not selected when input field focused.
874         https://bugs.webkit.org/show_bug.cgi?id=103182
875
876         Reviewed by George Staikos.
877
878         Reviewed Internally by: Mike Fenton, Eli Fidler
879         PR #250163
880
881         * WebKitSupport/SelectionHandler.cpp:
882         (BlackBerry::WebKit::SelectionHandler::selectObject):
883
884 2012-11-23  Nima Ghanavatian  <nghanavatian@rim.com>
885
886         [BlackBerry] Define platform limitations in platform layer
887         https://bugs.webkit.org/show_bug.cgi?id=103160
888
889         Reviewed by Rob Buis.
890
891         Taking length as const unsigned in checkSpellingOfStringAsync.
892         This value is unchanging and should never be less than 0, even
893         in an error case.
894
895         Internally reviewed by Mike Fenton.
896
897         * Api/WebPageClient.h:
898         * WebKitSupport/InputHandler.cpp:
899         (BlackBerry::WebKit::InputHandler::requestCheckingOfString):
900
901 2012-11-23  Jacky Jiang  <zhajiang@rim.com>
902
903         [BlackBerry] Meta viewport can't be changed dynamically
904         https://bugs.webkit.org/show_bug.cgi?id=103098
905
906         Reviewed by Rob Buis.
907         Internally reviewed by Arvid Nilsson.
908
909         PR: 237072
910         Reset m_userPerformedManualZoom and enable
911         m_shouldZoomToInitialScaleAfterLoadFinished so that we can relayout the
912         page and zoom it to fit the screen when we dynamically change the meta
913         viewport after the load is finished.
914
915         * Api/WebPage.cpp:
916         (BlackBerry::WebKit::WebPagePrivate::dispatchViewportPropertiesDidChange):
917
918 2012-11-23  Genevieve Mak  <gmak@rim.com>
919
920         [BlackBerry] Drop Synchronous Mouse Events
921         https://bugs.webkit.org/show_bug.cgi?id=102980
922
923         Reviewed by Rob Buis.
924
925         Reviewed Internally by George Staikos and Mike Lattanzio.
926         Don't send actual Touch Events to fullscreen plugins unless
927         its a Touch Cancel, DoubleTap or TouchHold.
928         Instead send mouse events as long as its a single finger.
929         PR #242781
930
931         * Api/WebPage.cpp:
932         (BlackBerry::WebKit::WebPage::touchPointAsMouseEvent):
933         (BlackBerry::WebKit::WebPagePrivate::dispatchTouchEventToFullScreenPlugin):
934         (WebKit):
935         (BlackBerry::WebKit::WebPagePrivate::dispatchTouchPointAsMouseEventToFullScreenPlugin):
936
937 2012-11-23  Andrew Lo  <anlo@rim.com>
938
939         [BlackBerry] InputHandler::ensureFocusTextElementVisible incorrectly used y coordinate as x coordinate
940         https://bugs.webkit.org/show_bug.cgi?id=103091
941
942         Reviewed by Yong Li.
943
944         Internally reviewed by Mike Fenton.
945         Internal PR249523
946         Incorrectly used y coordinate as x coordinate in
947         InputHandler::ensureFocusTextElementVisible.
948
949         * WebKitSupport/InputHandler.cpp:
950         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
951
952 2012-11-22  Jeff Rogers  <jrogers@rim.com>
953
954         [BlackBerry] Update Web Notifications Implementation
955         https://bugs.webkit.org/show_bug.cgi?id=102621
956
957         Reviewed by George Staikos.
958
959         Reviewed internally by George Staikos and Joe Mason
960         Internal PR 172120
961         Add new notifications implementation for the BlackBerry port. Rename
962         existing class to match Client naming. Adds NotificationManager
963         implementation for managing notifications and permissions, and logic
964         for passing the notifications to the platform provider.
965
966         * Api/WebPage.cpp:
967         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
968         (BlackBerry::WebKit::WebPagePrivate::init):
969         (BlackBerry::WebKit::WebPage::updateNotificationPermission):
970         (WebKit):
971         (BlackBerry::WebKit::WebPage::notificationClicked):
972         (BlackBerry::WebKit::WebPage::notificationClosed):
973         (BlackBerry::WebKit::WebPage::notificationError):
974         (BlackBerry::WebKit::WebPage::notificationShown):
975         * Api/WebPage.h:
976         * Api/WebPageClient.h:
977         * Api/WebPage_p.h:
978         (WebPagePrivate):
979         (BlackBerry::WebKit::WebPagePrivate::notificationManager):
980         * WebCoreSupport/NotificationClientBlackBerry.cpp: Added.
981         (WebCore):
982         (WebCore::NotificationClientBlackBerry::NotificationClientBlackBerry):
983         (WebCore::NotificationClientBlackBerry::show):
984         (WebCore::NotificationClientBlackBerry::cancel):
985         (WebCore::NotificationClientBlackBerry::clearNotifications):
986         (WebCore::NotificationClientBlackBerry::notificationObjectDestroyed):
987         (WebCore::NotificationClientBlackBerry::notificationControllerDestroyed):
988         (WebCore::NotificationClientBlackBerry::requestPermission):
989         (WebCore::NotificationClientBlackBerry::cancelRequestsForPermission):
990         (WebCore::NotificationClientBlackBerry::checkPermission):
991         * WebCoreSupport/NotificationClientBlackBerry.h: Added.
992         (WebKit):
993         (WebCore):
994         (NotificationClientBlackBerry):
995         * WebCoreSupport/NotificationPresenterImpl.cpp: Removed.
996         * WebCoreSupport/NotificationPresenterImpl.h: Removed.
997         * WebKitSupport/NotificationManager.cpp: Added.
998         (WebKit):
999         (BlackBerry::WebKit::NotificationManager::NotificationManager):
1000         (BlackBerry::WebKit::NotificationManager::~NotificationManager):
1001         (BlackBerry::WebKit::NotificationManager::show):
1002         (BlackBerry::WebKit::NotificationManager::cancel):
1003         (BlackBerry::WebKit::NotificationManager::clearNotifications):
1004         (BlackBerry::WebKit::NotificationManager::notificationObjectDestroyed):
1005         (BlackBerry::WebKit::NotificationManager::requestPermission):
1006         (BlackBerry::WebKit::NotificationManager::cancelRequestsForPermission):
1007         (BlackBerry::WebKit::NotificationManager::checkPermission):
1008         (BlackBerry::WebKit::NotificationManager::updatePermission):
1009         (BlackBerry::WebKit::NotificationManager::notificationClicked):
1010         (BlackBerry::WebKit::NotificationManager::notificationClosed):
1011         (BlackBerry::WebKit::NotificationManager::notificationError):
1012         (BlackBerry::WebKit::NotificationManager::notificationShown):
1013         (BlackBerry::WebKit::NotificationManager::removeNotificationFromContextMap):
1014         * WebKitSupport/NotificationManager.h: Added.
1015         (WebKit):
1016         (NotificationManager):
1017
1018 2012-11-22  Mike Fenton  <mifenton@rim.com>
1019
1020         [BlackBerry] Guard against a lost focusedNode that input handler isn't yet informed of.
1021         https://bugs.webkit.org/show_bug.cgi?id=103071
1022
1023         Reviewed by Rob Buis.
1024
1025         Fix potential for a crash if input mode is active but
1026         we can't get a focusedNode.
1027
1028         Reviewed Internally by Gen Mak.
1029
1030         * WebKitSupport/SelectionHandler.cpp:
1031         (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
1032
1033 2012-11-21  Genevieve Mak  <gmak@rim.com>
1034
1035         [BlackBerry] Drop Synchronous Mouse Events
1036         https://bugs.webkit.org/show_bug.cgi?id=102980
1037
1038         Reviewed by Rob Buis.
1039
1040         Reviewed Internally by George Staikos, Mike Lattanzio and Mike Fenton.
1041         Get rid of unneeded methods and simplify code.
1042         Send click if getting context over an empty text field
1043         so that it will be focused and have a caret.
1044         PR #242781
1045
1046         * Api/WebPage.cpp:
1047         (BlackBerry::WebKit::WebPagePrivate::webContext):
1048         (BlackBerry::WebKit::WebPage::touchEvent):
1049         (BlackBerry::WebKit::WebPage::touchPointAsMouseEvent):
1050         (BlackBerry::WebKit::WebPage::touchEventCancel):
1051         * Api/WebPage.h:
1052         * WebKitSupport/TouchEventHandler.cpp:
1053         (BlackBerry::WebKit::TouchEventHandler::TouchEventHandler):
1054         (BlackBerry::WebKit::TouchEventHandler::doFatFingers):
1055         (BlackBerry::WebKit::TouchEventHandler::sendClickAtFatFingersPoint):
1056         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
1057         (BlackBerry::WebKit::TouchEventHandler::handleFatFingerPressed):
1058         * WebKitSupport/TouchEventHandler.h:
1059         (TouchEventHandler):
1060
1061 2012-11-21  Konrad Piascik  <kpiascik@rim.com>
1062
1063         [BlackBerry] Prevent screen from dimming on device when inspector front-end is connected
1064         https://bugs.webkit.org/show_bug.cgi?id=102978
1065
1066         Reviewed by Rob Buis.
1067
1068         Internal PR 200848
1069         We prevent screen from going dim when the front-end is connected and return to normal when
1070         the front-end disconnects.
1071
1072         * Api/WebPage.cpp:
1073         (BlackBerry::WebKit::WebPage::enableWebInspector):
1074         (BlackBerry::WebKit::WebPage::disableWebInspector):
1075
1076 2012-11-21  Konrad Piascik  <kpiascik@rim.com>
1077
1078         [BlackBerry] Don't add empty rects to the tap highlight region.
1079         https://bugs.webkit.org/show_bug.cgi?id=102966
1080
1081         Reviewed by George Staikos.
1082
1083         Internal PR 246960
1084         Tap highlight is way too large sometimes.
1085         When we add an empty rect it inflates by 2 and causes the tap region to extend to the origin.
1086
1087         * WebKitSupport/TouchEventHandler.cpp:
1088         (BlackBerry::WebKit::TouchEventHandler::drawTapHighlight):
1089
1090 2012-11-21  Mike Fenton  <mifenton@rim.com>
1091
1092         [BlackBerry] Switch to point instead of VisiblePosition comparison for input bounds check
1093         https://bugs.webkit.org/show_bug.cgi?id=102962
1094
1095         Reviewed by Rob Buis.
1096
1097         PR 247270.
1098
1099         Switch from using VisiblePosition to determine if we are in a node
1100         to a comparison of the field bounds.  This fixes the case where
1101         there is no node before the target node to match.
1102
1103         Reviewed Internally by Gen Mak.
1104
1105         * WebKitSupport/DOMSupport.cpp:
1106         * WebKitSupport/DOMSupport.h:
1107         * WebKitSupport/SelectionHandler.cpp:
1108         (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
1109
1110 2012-11-20  Andrew Lo  <anlo@rim.com>
1111
1112         [BlackBerry] Animated gifs pause on scroll or zoom and sometimes don't resume after scroll or zoom completes
1113         https://bugs.webkit.org/show_bug.cgi?id=102838
1114
1115         Reviewed by Rob Buis.
1116
1117         Internally reviewed by Adam Treat.
1118         Internal PR244646
1119         When entering scrolling & zooming, we suspend regular render jobs
1120         in order to pause animations. When finishing scrolling or zooming,
1121         dispatch a render job in order to resume those animations.
1122
1123         If an animation requests a repaint while the backing store is suspended,
1124         add the regular render job to the render queue so that it can be
1125         processed later.
1126
1127         * Api/BackingStore.cpp:
1128         (BlackBerry::WebKit::BackingStorePrivate::repaint):
1129         (BlackBerry::WebKit::BackingStorePrivate::setScrollingOrZooming):
1130
1131 2012-11-20  Sheriff Bot  <webkit.review.bot@gmail.com>
1132
1133         Unreviewed, rolling out r135295.
1134         http://trac.webkit.org/changeset/135295
1135         https://bugs.webkit.org/show_bug.cgi?id=102834
1136
1137         This patch causes assertion to some layout tests on chromium
1138         (Requested by jianli on #webkit).
1139
1140         * Api/WebPage.cpp:
1141         (BlackBerry::WebKit::WebPagePrivate::load):
1142         (BlackBerry::WebKit::WebPagePrivate::loadString):
1143         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1144         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad):
1145
1146 2012-11-20  James Simonsen  <simonjam@chromium.org>
1147
1148         Consolidate FrameLoader::load() into one function taking a FrameLoadRequest
1149         https://bugs.webkit.org/show_bug.cgi?id=102151
1150
1151         Reviewed by Adam Barth.
1152
1153         * Api/WebPage.cpp:
1154         (BlackBerry::WebKit::WebPagePrivate::load):
1155         (BlackBerry::WebKit::WebPagePrivate::loadString):
1156         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1157         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad):
1158
1159 2012-11-19  Genevieve Mak  <gmak@rim.com>
1160
1161         [BlackBerry] Block Zoom picks wrong block
1162         https://bugs.webkit.org/show_bug.cgi?id=102728
1163
1164         Reviewed by Rob Buis.
1165
1166         Reviewed Internally by Jakob Petsovits
1167         Remove transform missed in previous commit for
1168         https://bugs.webkit.org/show_bug.cgi?id=101608
1169         PR #247198
1170
1171         * Api/WebPage.cpp:
1172         (BlackBerry::WebKit::WebPagePrivate::nodeForZoomUnderPoint):
1173
1174 2012-11-19  Liam Quinn  <lquinn@rim.com>
1175
1176         [BlackBerry] Remove RTSP handling from FrameLoaderClientBlackBerry
1177         https://bugs.webkit.org/show_bug.cgi?id=102692
1178
1179         Reviewed by Rob Buis.
1180
1181         Reviewed internally by George Staikos. Internal PR 242750.
1182
1183         Our RTSP handling in FrameLoaderClientBlackBerry causes HTTP redirects to "rtsp:" URIs to fail. Remove handling of RTSP from this class; it will be moved to the network layer alongside other URI schemes like "data:" and "file:".
1184
1185         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1186         (WebCore::FrameLoaderClientBlackBerry::createDocumentLoader):
1187
1188 2012-11-16  Adam Treat  <atreat@rim.com>
1189
1190         https://bugs.webkit.org/show_bug.cgi?id=102540
1191         [BlackBerry] Checkerboard flicker when pinch zooming out on google.com/nwshp
1192
1193         Reviewed by George Staikos.
1194         PR 245827
1195
1196         Disable updates to the backingstore tile matrix when backingstore updates
1197         are disabled.  This prevents changes to the tile matrix when we are in the
1198         middle of a pinch zoom which can cause checkebroard flickering.
1199
1200         * Api/BackingStore.cpp:
1201         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
1202         (BlackBerry::WebKit::BackingStorePrivate::resumeBackingStoreUpdates):
1203         (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect):
1204         (BlackBerry::WebKit::BackingStorePrivate::render):
1205         (BlackBerry::WebKit::BackingStorePrivate::renderVisibleContents):
1206         (BlackBerry::WebKit::BackingStorePrivate::renderBackingStore):
1207         (BlackBerry::WebKit::BackingStorePrivate::updateTileMatrixIfNeeded):
1208         (BlackBerry::WebKit::BackingStorePrivate::contentsSizeChanged):
1209         (BlackBerry::WebKit::BackingStorePrivate::orientationChanged):
1210         * Api/BackingStore_p.h:
1211         (BlackBerry::WebKit::BackingStorePrivate::setTileMatrixNeedsUpdate):
1212         (BackingStorePrivate):
1213
1214 2012-11-16  Rob Buis  <rbuis@rim.com>
1215
1216         [BlackBerry] FCC doesn't work in textarea
1217         https://bugs.webkit.org/show_bug.cgi?id=102088
1218
1219         Reviewed by Antonio Gomes.
1220
1221         Remove the cancel button specializations, it was needed at some point but hitting it
1222         works just as well without it. This unbreaks FCC in textarea's.
1223
1224         * WebKitSupport/FatFingers.cpp:
1225         (BlackBerry::WebKit::FatFingers::isElementClickable):
1226
1227 2012-11-16  Adam Treat  <atreat@rim.com>
1228
1229         [BlackBerry] Fix regression causing checkerboard flicker after app wake-up
1230         https://bugs.webkit.org/show_bug.cgi?id=102526
1231
1232         Reviewed by George Staikos.
1233         PR 245027
1234
1235         The webkit patch for 219976 introduced an undesirable behavior change
1236         resulting in a regression where there was checkerboard flickering on
1237         resuming from an inactive application state.  This patch restores the
1238         previous behavior and fixes the regression.
1239
1240         * Api/BackingStore.cpp:
1241         (BlackBerry::WebKit::BackingStore::createBackingStoreMemory):
1242         (BlackBerry::WebKit::BackingStore::releaseBackingStoreMemory):
1243
1244 2012-11-16  Mike Fenton  <mifenton@rim.com>
1245
1246         [BlackBerry] Use proper keycode value for space instead of hardcoded value.
1247         https://bugs.webkit.org/show_bug.cgi?id=102518
1248
1249         Reviewed by Rob Buis.
1250
1251         Remove hard coded value for space.
1252
1253         Reviewed Internally by Gen Mak.
1254
1255         * WebKitSupport/InputHandler.cpp:
1256         (BlackBerry::WebKit::InputHandler::setText):
1257
1258 2012-11-15  Andrew Lo  <anlo@rim.com>
1259
1260         [BlackBerry] Animate changes to viewport due to input focus changes.
1261         https://bugs.webkit.org/show_bug.cgi?id=102410
1262
1263         Reviewed by Rob Buis.
1264
1265         When changing scroll position or zoom level for input field focus,
1266         animate the change.
1267         Internal PR 231937
1268
1269         Internally reviewed by Mike Fenton.
1270
1271         * WebKitSupport/InputHandler.cpp:
1272         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
1273
1274 2012-11-15  Mike Fenton  <mifenton@rim.com>
1275
1276         [BlackBerry] Don't restore zoom and scroll when leaving an input field.
1277         https://bugs.webkit.org/show_bug.cgi?id=102376
1278
1279         Reviewed by Yong Li.
1280
1281         Restoring the zoom causes undesirable behavior when switching between fields.
1282
1283         Reviewed Internally by Andrew Lo.
1284
1285         * WebKitSupport/InputHandler.cpp:
1286         (BlackBerry::WebKit::InputHandler::InputHandler):
1287         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
1288         * WebKitSupport/InputHandler.h:
1289         (InputHandler):
1290
1291 2012-11-15  Jakob Petsovits  <jpetsovits@rim.com>
1292
1293         [BlackBerry] Fix suspend/resume assertion in setCompositor().
1294         https://bugs.webkit.org/show_bug.cgi?id=102397
1295         RIM PR 244701
1296
1297         Reviewed by Adam Treat.
1298
1299         If a compositor is used but no surface pool is ever
1300         allocated (which is a perfectly valid use case), initial
1301         suspension of the backingstore is skipped because of an
1302         early return. This will cause an assertion to be triggered
1303         and a bug. Fix this by suspending it before the return.
1304
1305         With Adam Treat's recent change to split suspension of
1306         screen and backingstore into two different functions,
1307         this can now be reduced to a mere screen (blitting)
1308         suspension. That was the original intention of this code.
1309
1310         * Api/BackingStore.cpp:
1311         (BlackBerry::WebKit::BackingStorePrivate::createSurfaces):
1312         * Api/WebPage.cpp:
1313         (BlackBerry::WebKit::WebPagePrivate::setCompositor):
1314
1315 2012-11-15  Jakob Petsovits  <jpetsovits@rim.com>
1316
1317         [BlackBerry] Leave surface resizing to the client.
1318         https://bugs.webkit.org/show_bug.cgi?id=102280
1319         RIM PR 235034
1320         RIM PR 160619
1321
1322         Reviewed by Adam Treat.
1323
1324         Now that we always blit on the user interface thread and
1325         use the client's userInterfaceViewportAccessor() to determine
1326         the destination rectangle for blitting, changing the viewport
1327         size does not affect the window or target surface directly.
1328         The only way that blitted output is affected is through
1329         layout, scroll position or scale changes. None of these
1330         require us to synchronize with the UI thread to resize its
1331         target surface.
1332
1333         This commit simplifies setViewportSize() and removes a
1334         blocking message dispatch by simply offloading all surface
1335         resizing responsibilities to the client. This is safer,
1336         cleaner and easier.
1337
1338         * Api/WebPage.cpp:
1339         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
1340         (BlackBerry::WebKit::WebPage::setScreenOrientation):
1341         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
1342         * Api/WebPage.h:
1343         * Api/WebPageClient.h:
1344         * Api/WebPage_p.h:
1345         (WebPagePrivate):
1346
1347 2012-11-14  Nima Ghanavatian  <nghanavatian@rim.com>
1348
1349         [BlackBerry] Do not clear the ProcessingChangeGuard state on DeleteBackward
1350         https://bugs.webkit.org/show_bug.cgi?id=102284
1351
1352         Reviewed by Rob Buis.
1353
1354         PR237497
1355         When holding backspace, clearing the state forces a keyboard
1356         update which resets the state of the keyboard. Handling this
1357         specific corner case separate from all other editor commands.
1358
1359         Internally reviewed by Mike Fenton.
1360
1361         * WebCoreSupport/EditorClientBlackBerry.cpp:
1362         (WebCore::EditorClientBlackBerry::handleKeyboardEvent):
1363
1364 2012-11-14  Rob Buis  <rbuis@rim.com>
1365
1366         [BlackBerry] Improve debug functionality in FatFingers
1367         https://bugs.webkit.org/show_bug.cgi?id=102263
1368
1369         Reviewed by Antonio Gomes.
1370
1371         - use logAlways to log even in release.
1372         - dump shadow tree info if available.
1373
1374         * WebKitSupport/FatFingers.cpp:
1375         (BlackBerry::WebKit::FatFingers::isElementClickable):
1376         (BlackBerry::WebKit::FatFingers::checkFingerIntersection):
1377         (BlackBerry::WebKit::FatFingers::findIntersectingRegions):
1378         (BlackBerry::WebKit::FatFingers::checkForText):
1379
1380 2012-11-14  Adam Treat  <atreat@rim.com>
1381
1382         [BlackBerry] Break suspend/resume of the backingstore and screen into separate methods
1383         https://bugs.webkit.org/show_bug.cgi?id=102126
1384
1385         Reviewed by George Staikos.
1386         PR 219976
1387
1388         Modify the suspend/resume methods so that they can be called from the UI thread
1389         itself and split up the suspend/resume methods so that we can suspend/resume
1390         the screen or backingstore separately.
1391
1392         * Api/BackingStore.cpp:
1393         (BlackBerry::WebKit::BackingStorePrivate::suspendBackingStoreUpdates):
1394         (WebKit):
1395         (BlackBerry::WebKit::BackingStorePrivate::suspendScreenUpdates):
1396         (BlackBerry::WebKit::BackingStorePrivate::resumeBackingStoreUpdates):
1397         (BlackBerry::WebKit::BackingStorePrivate::resumeScreenUpdates):
1398         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
1399         (BlackBerry::WebKit::BackingStorePrivate::createSurfaces):
1400         (BlackBerry::WebKit::BackingStore::suspendBackingStoreUpdates):
1401         (BlackBerry::WebKit::BackingStore::resumeBackingStoreUpdates):
1402         (BlackBerry::WebKit::BackingStore::suspendScreenUpdates):
1403         (BlackBerry::WebKit::BackingStore::resumeScreenUpdates):
1404         (BlackBerry::WebKit::BackingStore::createBackingStoreMemory):
1405         (BlackBerry::WebKit::BackingStore::releaseBackingStoreMemory):
1406         * Api/BackingStore.h:
1407         * Api/BackingStore_p.h:
1408         (BackingStorePrivate):
1409         * Api/WebPage.cpp:
1410         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
1411         (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint):
1412         (BlackBerry::WebKit::WebPagePrivate::zoomBlock):
1413         (BlackBerry::WebKit::WebPage::destroy):
1414         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
1415         (BlackBerry::WebKit::WebPagePrivate::setCompositor):
1416         (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
1417         (BlackBerry::WebKit::WebPagePrivate::restoreHistoryViewState):
1418         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1419         (WebCore::FrameLoaderClientBlackBerry::transitionToCommittedForNewPage):
1420         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
1421         * WebKitSupport/InputHandler.cpp:
1422         (BlackBerry::WebKit::InputHandler::setBatchEditingActive):
1423
1424 2012-11-14  Andy Chen  <andchen@rim.com>
1425
1426         [BlackBerry] Add FocusBased context node detection strategy
1427         https://bugs.webkit.org/show_bug.cgi?id=102238
1428
1429         Reviewed by Rob Buis.
1430
1431         If last fat finger result is invalid, we need to return current
1432         focus element as context node, because when user tap on selection
1433         overlay, there is not touch event sent to webkit.
1434         PR 241382
1435
1436         Internally reviewed by Genevieve Mak and Mike Fenton.
1437
1438         * Api/WebPage.cpp:
1439         (BlackBerry::WebKit::WebPagePrivate::contextNode):
1440         * Api/WebPage.h:
1441         * WebKitSupport/InputHandler.h:
1442         (BlackBerry::WebKit::InputHandler::currentFocusElement):
1443
1444 2012-11-14  Nima Ghanavatian  <nghanavatian@rim.com>
1445
1446         [BlackBerry] Use mispelled-marker offsets relative to the element
1447         https://bugs.webkit.org/show_bug.cgi?id=102236
1448
1449         Reviewed by Rob Buis.
1450
1451         DocumentMarker offsets are calculated relative to a node. This is causing
1452         problems for contenteditable which can have numerous nodes. Creating a Range around a word
1453         and calculating its location and length gives us the correct override in this case for starting
1454         and ending points to pass to IMF.
1455
1456         Internally reviewed by Mike Fenton.
1457
1458         * WebKitSupport/InputHandler.cpp:
1459         (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions):
1460
1461 2012-11-13  Mike Fenton  <mifenton@rim.com>
1462
1463         [BlackBerry] Fully restore both zoom and scroll when leaving an input field.
1464         https://bugs.webkit.org/show_bug.cgi?id=102094
1465
1466         Reviewed by Rob Buis.
1467
1468         PR 234187.
1469
1470         Cache both the zoom and scroll position prior to adjusting
1471         for input focus so that state can be reset fully.
1472
1473         Reviewed Internally by Gen Mak.
1474
1475         * WebKitSupport/InputHandler.cpp:
1476         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
1477         * WebKitSupport/InputHandler.h:
1478         (InputHandler):
1479
1480 2012-11-12  Nima Ghanavatian  <nghanavatian@rim.com>
1481
1482         [BlackBerry] Ensure we only receive one KeyUp per key event
1483         https://bugs.webkit.org/show_bug.cgi?id=101967
1484
1485         Reviewed by Rob Buis.
1486
1487         We are creating synthetic KeyUps too often, and get into trouble since IMF will send up a KeyUp on all key events.
1488         Furthermore, these KeyUps can arrive both when we are composing and not. To bypass this check, we are storing the KeyDown
1489         character and comparing against it on KeyUp.
1490
1491         Internally reviewed by Mike Fenton.
1492
1493         * WebKitSupport/InputHandler.cpp:
1494         (BlackBerry::WebKit::InputHandler::InputHandler):
1495         (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
1496         (BlackBerry::WebKit::InputHandler::insertText):
1497         (BlackBerry::WebKit::InputHandler::setText):
1498         * WebKitSupport/InputHandler.h:
1499         (InputHandler):
1500
1501 2012-11-12  Jacky Jiang  <zhajiang@rim.com>
1502
1503         [BlackBerry] When opening an image it does not scale to fit our window
1504         https://bugs.webkit.org/show_bug.cgi?id=101778
1505
1506         Reviewed by Rob Buis.
1507         Internally reviewed by Konrad Piascik.
1508
1509         PR: 230935
1510         For image document, the actual image size can be different with the
1511         contents size. Zoom the document based on the image width so that
1512         images can fit the screen horizontally. Set 2.0 as the maximum zoom to
1513         fit scale for image document so that very small images won't get
1514         ridiculous large scales during the initial load.
1515
1516         * Api/WebPage.cpp:
1517         (WebKit):
1518         (BlackBerry::WebKit::WebPagePrivate::zoomToFitScale):
1519
1520 2012-11-12  Nima Ghanavatian  <nghanavatian@rim.com>
1521
1522         [BlackBerry] Use keyevents instead of editor commands for backspace
1523         https://bugs.webkit.org/show_bug.cgi?id=101663
1524
1525         Reviewed by Rob Buis.
1526
1527         PR229395
1528         Sending keyEvents for backspace and switching from KeyChar
1529         to KeyDown since we are still receiving an unadultered KeyUp
1530         from the input service. This was causing us to get two keyUps
1531         for regular keys and no key downs for backspace since it was
1532         triggering an editor command and bypassing JS listeners.
1533
1534         Reviewed internally by Mike Fenton.
1535
1536         * WebKitSupport/InputHandler.cpp:
1537         (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
1538         (BlackBerry::WebKit::relativeRightOffset):
1539         (WebKit):
1540         (BlackBerry::WebKit::InputHandler::deleteTextRelativeToCursor):
1541         (BlackBerry::WebKit::InputHandler::setText):
1542
1543 2012-11-12  Rob Buis  <rbuis@rim.com>
1544
1545         [BlackBerry] Crash in InRegionScrollerPrivate.
1546         https://bugs.webkit.org/show_bug.cgi?id=101399
1547
1548         Reviewed by Yong Li.
1549
1550         Fix warning caused by the previous patch for this bug (r133679).
1551
1552         * WebKitSupport/InRegionScrollableArea.cpp:
1553         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
1554
1555 2012-11-11  George Staikos  <staikos@webkit.org>
1556
1557         [BlackBerry] The QNX extension method should not be enabled by default
1558         https://bugs.webkit.org/show_bug.cgi?id=101863
1559
1560         Reviewed by Rob Buis.
1561
1562         Simply change the default to false.
1563
1564         * Api/WebPage.cpp:
1565         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
1566
1567 2012-11-09  Otto Derek Cheung  <otcheung@rim.com>
1568
1569         [BlackBerry] Adding a sound to touch events on anchor elements
1570         https://bugs.webkit.org/show_bug.cgi?id=101655
1571
1572         Reviewed by Antonio Gomes.
1573
1574         Adding audio feedback to touchevents on html anchor elements.
1575
1576         The feedback is called directly from client instead of using the
1577         mouseup event to avoid the delay between touch start and end caused
1578         by the tap sequence recognizer.
1579
1580         * Api/WebPage.cpp:
1581         (BlackBerry::WebKit::WebPage::playSoundIfAnchorIsTarget):
1582         (WebKit):
1583         * Api/WebPage.h:
1584         * WebKitSupport/TouchEventHandler.cpp:
1585         (WebKit):
1586         (BlackBerry::WebKit::TouchEventHandler::playSoundIfAnchorIsTarget):
1587         * WebKitSupport/TouchEventHandler.h:
1588         (TouchEventHandler):
1589
1590 2012-11-09  George Staikos  <staikos@webkit.org>
1591
1592         [BlackBerry] Remove obsolete tokenizer settings
1593         https://bugs.webkit.org/show_bug.cgi?id=101689
1594
1595         Reviewed by Yong Li.
1596
1597         These tokenizer settings are obsolete and should not be here.  Remove them.
1598
1599         * Api/WebPage.cpp:
1600         (BlackBerry::WebKit::WebPagePrivate::init):
1601
1602 2012-11-08  Chris Guan  <chris.guan@torchmobile.com.cn>
1603
1604         [BlackBerry] need to call closePopup at setValueAndClosePopup
1605         https://bugs.webkit.org/show_bug.cgi?id=101568
1606
1607         Reviewed by George Staikos.
1608
1609         When early return occurs, we need to call closePopup
1610         at setValueAndClosePopup function. See the comments
1611         in WebCore/page/PagePopupClient.h. If we have not it,
1612         Webkit thread is held and browser will be unresponsive 
1613         in BlackBerry port.
1614         
1615         RIM PR 232962
1616         Internally reviewed by Charles Wei.
1617
1618         * WebCoreSupport/SelectPopupClient.cpp:
1619         (WebCore::SelectPopupClient::setValueAndClosePopup):
1620
1621 2012-11-08  Jakob Petsovits  <jpetsovits@rim.com>
1622
1623         [BlackBerry] Replace checkerboard with page background color.
1624         https://bugs.webkit.org/show_bug.cgi?id=101652
1625         RIM PR 188235
1626
1627         Reviewed by George Staikos.
1628
1629         In order to do this, we introduce a new member variable for
1630         BackingStore because when blitting, we can't access the
1631         page background color in a threadsafe way.
1632
1633         Solid background color fill is still only used for public builds.
1634         Developers and beta testers should still see checkerboard and
1635         do something about it.
1636
1637         * Api/BackingStore.cpp:
1638         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
1639         (BlackBerry::WebKit::BackingStorePrivate::fillWindow):
1640         (BlackBerry::WebKit::BackingStorePrivate::webPageBackgroundColorUserInterfaceThread):
1641         (WebKit):
1642         (BlackBerry::WebKit::BackingStorePrivate::setWebPageBackgroundColor):
1643         * Api/BackingStore_p.h:
1644         (BackingStorePrivate):
1645         * Api/WebPage.cpp:
1646         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
1647         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
1648
1649 2012-11-08  Tiancheng Jiang  <tijiang@rim.com>
1650
1651         [BlackBerry] Update BB10 date input form.
1652         https://bugs.webkit.org/show_bug.cgi?id=101075
1653
1654         Reviewed by Rob Buis.
1655
1656         RIM PR 234531
1657         Internally Reviewed by Mike Fenton.
1658         Change date input appearance to button and hide caret when click on them.
1659
1660         * WebCoreSupport/DatePickerClient.cpp:
1661         (WebCore::DatePickerClient::setValueAndClosePopup):
1662         * WebKitSupport/InputHandler.cpp:
1663         (BlackBerry::WebKit::InputHandler::openDatePopup):
1664
1665 2012-11-08  Nima Ghanavatian  <nghanavatian@rim.com>
1666
1667         [BlackBerry] Provide pixel coordinates to IMF relative to the screen
1668         https://bugs.webkit.org/show_bug.cgi?id=101628
1669
1670         Reviewed by Rob Buis.
1671
1672         Reviewed internally by Mike Fenton and Jakob Petsovits.
1673
1674         We need to provide the correct pixel coordinates to IMF,
1675         accounting for webkit based fields in UIB as well as browser.
1676         Getting an offset value from the screen point to the document
1677         content point allows us to adjust for when the document,
1678         such as in UIB, does not start at 0,0.
1679
1680         * Api/WebPageClient.h:
1681         * WebKitSupport/InputHandler.cpp:
1682         (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions):
1683         * WebKitSupport/InputHandler.h:
1684         (InputHandler):
1685         * WebKitSupport/TouchEventHandler.cpp:
1686         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
1687
1688 2012-11-08  Jakob Petsovits  <jpetsovits@rim.com>
1689
1690         [BlackBerry] Janitor: Remove unused m_isValid bool
1691         https://bugs.webkit.org/show_bug.cgi?id=101610
1692
1693         Reviewed by Rob Buis.
1694
1695         It's not used anywhere, but as we have a constructor
1696         that creates an invalid TileIndex, let's add another
1697         method to check validity - now a correct check.
1698
1699         On top of that, make the stylebot happy by reducing
1700         "unsigned int" to just "unsigned".
1701
1702         * WebKitSupport/TileIndex.h:
1703         (BlackBerry::WebKit::TileIndex::TileIndex):
1704         (BlackBerry::WebKit::TileIndex::i):
1705         (BlackBerry::WebKit::TileIndex::j):
1706         (BlackBerry::WebKit::TileIndex::setIndex):
1707         (BlackBerry::WebKit::TileIndex::isValid):
1708         (TileIndex):
1709
1710 2012-11-08  Eli Fidler  <efidler@rim.com>
1711
1712         [BlackBerry] Increase memory cache size
1713         https://bugs.webkit.org/show_bug.cgi?id=101622
1714
1715         Reviewed by Yong Li.
1716
1717         * WebCoreSupport/CacheClientBlackBerry.cpp:
1718         (WebCore::CacheClientBlackBerry::updateCacheCapacity):
1719         * WebCoreSupport/CacheClientBlackBerry.h:
1720         (CacheClientBlackBerry):
1721
1722 2012-11-08  Jakob Petsovits  <jpetsovits@rim.com>
1723
1724         [BlackBerry] Rework the API to use document coordinates
1725         https://bugs.webkit.org/show_bug.cgi?id=101608
1726         RIM PR 173292
1727
1728         Reviewed by Adam Treat.
1729
1730         Scrolling and zooming APIs used to operate on
1731         transformed coordinates, which is a bad idea:
1732         The UI thread might long have moved on to a
1733         different scale and scroll position so outdated
1734         pixel coordinates are of limited value.
1735
1736         Moreover, more transformation calculations are
1737         needed than if we operate purely on document
1738         coordinates.
1739
1740         With webkitThreadViewportAccessor() exposed,
1741         the caller has a choice between how to handle
1742         coordinates and the means to perform conversions
1743         with little effort and overhead if needed.
1744         Therefore, we should remove pixel coordinates
1745         from the public API. This commit makes this change.
1746
1747         * Api/BackingStore.cpp:
1748         (BlackBerry::WebKit::BackingStorePrivate::repaint):
1749         (BlackBerry::WebKit::BackingStorePrivate::didRenderContent):
1750         * Api/InRegionScroller.cpp:
1751         (BlackBerry::WebKit::InRegionScroller::setDocumentScrollPositionCompositingThread):
1752         (BlackBerry::WebKit::InRegionScroller::setDocumentScrollPositionWebKitThread):
1753         (BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint):
1754         * Api/InRegionScroller.h:
1755         * Api/WebPage.cpp:
1756         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
1757         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
1758         (BlackBerry::WebKit::WebPagePrivate::shouldZoomAboutPoint):
1759         (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint):
1760         (BlackBerry::WebKit::WebPage::setDocumentScrollPosition):
1761         (BlackBerry::WebKit::WebPagePrivate::hasVirtualViewport):
1762         (BlackBerry::WebKit::WebPagePrivate::notifyTransformedContentsSizeChanged):
1763         (BlackBerry::WebKit::WebPagePrivate::notifyTransformedScrollChanged):
1764         (BlackBerry::WebKit::WebPagePrivate::setCursor):
1765         (BlackBerry::WebKit::WebPagePrivate::notifyPopupAutofillDialog):
1766         (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize):
1767         (BlackBerry::WebKit::WebPagePrivate::bestNodeForZoomUnderPoint):
1768         (BlackBerry::WebKit::WebPagePrivate::blockZoomRectForNode):
1769         (BlackBerry::WebKit::WebPagePrivate::zoomBlock):
1770         (BlackBerry::WebKit::WebPage::setVirtualViewportSize):
1771         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
1772         (BlackBerry::WebKit::WebPagePrivate::dispatchViewportPropertiesDidChange):
1773         (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore):
1774         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
1775         (BlackBerry::WebKit::WebPage::setDefaultLayoutSize):
1776         (BlackBerry::WebKit::WebPagePrivate::setScrollOriginPoint):
1777         (BlackBerry::WebKit::WebPage::setDocumentScrollOriginPoint):
1778         (BlackBerry::WebKit::handleScrolling):
1779         (BlackBerry::WebKit::WebPage::selectionContainsDocumentPoint):
1780         (BlackBerry::WebKit::WebPage::setDocumentSelection):
1781         (BlackBerry::WebKit::WebPage::setDocumentCaretPosition):
1782         (BlackBerry::WebKit::WebPage::selectAtDocumentPoint):
1783         (BlackBerry::WebKit::WebPagePrivate::setTextReflowAnchorPoint):
1784         (BlackBerry::WebKit::WebPage::pinchZoomAboutPoint):
1785         (BlackBerry::WebKit::WebPage::blockZoom):
1786         (BlackBerry::WebKit::WebPage::nodeAtDocumentPoint):
1787         (BlackBerry::WebKit::WebPagePrivate::enterFullscreenForNode):
1788         * Api/WebPage.h:
1789         (Platform):
1790         * Api/WebPageClient.h:
1791         * Api/WebPage_p.h:
1792         (WebPagePrivate):
1793         * WebCoreSupport/AutofillManager.cpp:
1794         (WebCore::AutofillManager::didChangeInTextField):
1795         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1796         (WebCore::FrameLoaderClientBlackBerry::dispatchDidLayout):
1797         * WebKitSupport/SelectionHandler.cpp:
1798         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
1799         (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
1800
1801 2012-11-08  Nima Ghanavatian  <nghanavatian@rim.com>
1802
1803         [BlackBerry] Verify touched element using the rootEditableElement
1804         https://bugs.webkit.org/show_bug.cgi?id=101510
1805
1806         Reviewed by Rob Buis.
1807
1808         Reviewed internally by Mike Fenton.
1809
1810         Move up the tree until we find the rootEditableElement and use
1811         that to compare with the touched element.
1812
1813         * WebKitSupport/FatFingers.h:
1814         (BlackBerry::WebKit::FatFingersResult::node):
1815         (BlackBerry::WebKit::FatFingersResult::nodeAsElementIfApplicable):
1816         * WebKitSupport/InputHandler.cpp:
1817         (BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint):
1818         * WebKitSupport/TouchEventHandler.cpp:
1819         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
1820
1821 2012-11-07  Rob Buis  <rbuis@rim.com>
1822
1823         [BlackBerry] Remove setUserStyleSheetString/userStyleSheetString
1824         https://bugs.webkit.org/show_bug.cgi?id=101490
1825
1826         Reviewed by Yong Li.
1827
1828         We no longer need this API.
1829
1830         * Api/WebPage.cpp:
1831         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
1832         * Api/WebSettings.cpp:
1833         (WebKit):
1834         * Api/WebSettings.h:
1835
1836 2012-11-07  Christophe Dumez  <christophe.dumez@intel.com>
1837
1838         Add replaceWithLiteral() method to WTF::String
1839         https://bugs.webkit.org/show_bug.cgi?id=101257
1840
1841         Reviewed by Benjamin Poulain.
1842
1843         Substitute String::replace() calls by String::replaceWithLiteral() where
1844         adequate, for efficiency.
1845
1846         * WebCoreSupport/SelectPopupClient.cpp:
1847         (WebCore::SelectPopupClient::generateHTML):
1848
1849 2012-11-07  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1850
1851         Remove support for "desktop-width" in the viewport meta tag
1852         https://bugs.webkit.org/show_bug.cgi?id=101217
1853
1854         Reviewed by Gyuyoung Kim.
1855
1856         Sync WebViewportArguments enum with the one in
1857         WebCore::ViewportArguments
1858
1859         * Api/WebViewportArguments.h:
1860
1861 2012-11-06  Genevieve Mak  <gmak@rim.com>
1862
1863         [BlackBerry] Crash in InRegionScrollerPrivate.
1864         https://bugs.webkit.org/show_bug.cgi?id=101399
1865
1866         Reviewed by Rob Buis.
1867
1868         Add a pointer to the enclosing document as the pointer to layer
1869         or node along the way may become invalid.
1870         Use document pointer in clearDocumentData.
1871         PR #238469
1872
1873         * Api/InRegionScroller.cpp:
1874         (BlackBerry::WebKit::InRegionScrollerPrivate::clearDocumentData):
1875         * WebKitSupport/InRegionScrollableArea.cpp:
1876         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
1877         (BlackBerry::WebKit::InRegionScrollableArea::document):
1878         (WebKit):
1879         * WebKitSupport/InRegionScrollableArea.h:
1880         (WebCore):
1881         (InRegionScrollableArea):
1882
1883 2012-11-06  Otto Derek Cheung  <otcheung@rim.com>
1884
1885         [BlackBerry] Pushing window.external.* events to webplatform
1886         https://bugs.webkit.org/show_bug.cgi?id=101386
1887
1888         Reviewed by Rob Buis.
1889
1890         Adding calls to trigger window.external events so we can handle them on the
1891         browser side.
1892
1893         PR 170059
1894
1895         * Api/WebPageClient.h:
1896         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1897         (WebCore::ChromeClientBlackBerry::addSearchProvider):
1898         (WebCore::ChromeClientBlackBerry::isSearchProviderInstalled):
1899
1900 2012-11-06  Otto Derek Cheung  <otcheung@rim.com>
1901
1902         [BlackBerry] Adding window.external to our port
1903         https://bugs.webkit.org/show_bug.cgi?id=100868
1904
1905         Reviewed by Rob Buis.
1906
1907         Patching the method names to match the ones in the spec.
1908
1909         * WebCoreSupport/ExternalExtension.cpp:
1910
1911 2012-11-06  Jacky Jiang  <zhajiang@rim.com>
1912
1913         [BlackBerry] Page can't back to whole screen after zoom out and orientation change
1914         https://bugs.webkit.org/show_bug.cgi?id=101350
1915
1916         Reviewed by Rob Buis.
1917         Internally reviewed by Arvid Nilsson.
1918
1919         PR: 229321
1920         When rotating device during touch interaction, bitmap zooming was
1921         unexpected ended by resetBitmapZoomScale() so that it couldn't bounce
1922         back. The call resetBitmapZoomScale() is ancient, which just resets the
1923         scale of the bitmap before. Right now it only ends the bitmap zooming
1924         which caused the issue. As UI viewport will be updated by zoomChanged()
1925         right after that, we can remove this trouble maker.
1926         Update the interaction views if the rotation is being changed so that
1927         ZoomHandler can get the updated views.
1928
1929         * Api/WebPage.cpp:
1930         (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint):
1931         * Api/WebPageClient.h:
1932
1933 2012-11-05  Lianghui Chen  <liachen@rim.com>
1934
1935         [BlackBerry] Do not show error page for main loads denied by client application
1936         https://bugs.webkit.org/show_bug.cgi?id=101287
1937
1938         Internal PR: 237574.
1939         Internally reviewed by Arvid Nilsson, Joe Mason.
1940         Reviewed by George Staikos.
1941
1942         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1943         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad):
1944
1945 2012-11-05  Lianghui Chen  <liachen@rim.com>
1946
1947         [BlackBerry] Do not display error page for failed downloads
1948         https://bugs.webkit.org/show_bug.cgi?id=101246
1949
1950         Internal PR: 236318
1951         Internal reviewed by Joe Mason, Leo Yang.
1952         Reviewed by Rob Buis.
1953
1954         Right now when a main load, including all downloads, failed, it will
1955         display an error page. This is not very user friendly, especially for
1956         WebWorks application, which want to use its own user interface to info
1957         user about the failure.
1958         So we just stop displaying error page for downloads.
1959
1960         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1961         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad):
1962
1963 2012-11-05  Simon Fraser  <simon.fraser@apple.com>
1964
1965         Fix layer borders to cleaning appear and disappear on switching
1966         https://bugs.webkit.org/show_bug.cgi?id=101136
1967
1968         Reviewed by Sam Weinig.
1969
1970         Remove the GraphicsLayerClient methods showDebugBorders() and
1971         showRepaintCounter().
1972
1973         * Api/WebOverlay_p.h:
1974         (WebOverlayPrivateWebKitThread):
1975         * Api/WebPage.cpp:
1976         (BlackBerry::WebKit::WebPagePrivate::notifyFlushRequired):
1977         * Api/WebPage_p.h:
1978         * WebKitSupport/DefaultTapHighlight.cpp:
1979         * WebKitSupport/DefaultTapHighlight.h:
1980         (DefaultTapHighlight):
1981         * WebKitSupport/InspectorOverlayBlackBerry.cpp:
1982         * WebKitSupport/InspectorOverlayBlackBerry.h:
1983         (InspectorOverlay):
1984         * WebKitSupport/SelectionOverlay.cpp:
1985         * WebKitSupport/SelectionOverlay.h:
1986         (SelectionOverlay):
1987
1988 2012-11-05  Rob Buis  <rbuis@rim.com>
1989
1990         [BlackBerry] screenX/Y gives wrong values
1991         https://bugs.webkit.org/show_bug.cgi?id=101259
1992
1993         Reviewed by Yong Li.
1994
1995         PR 237071
1996
1997         Reviewed internally by Gen Mak.
1998
1999         Do not transform screenPos coordinates.
2000
2001         * Api/WebPage.cpp:
2002         (BlackBerry::WebKit::WebPage::mouseEvent):
2003         (BlackBerry::WebKit::WebPage::touchEvent):
2004         (BlackBerry::WebKit::WebPage::touchPointAsMouseEvent):
2005
2006 2012-11-05  Rob Buis  <rbuis@rim.com>
2007
2008         [BlackBerry] Input date should not popup dialog when readonly is set
2009         https://bugs.webkit.org/show_bug.cgi?id=101234
2010
2011         Reviewed by Yong Li.
2012
2013         PR 236114
2014
2015         Reviewed internally by Mike Fenton.
2016
2017         Suppress popup dialog if the input element has readonly attribute set.
2018
2019         * WebKitSupport/InputHandler.cpp:
2020         (BlackBerry::WebKit::InputHandler::openDatePopup):
2021         (BlackBerry::WebKit::InputHandler::openColorPopup):
2022
2023 2012-11-05  Genevieve Mak  <gmak@rim.com>
2024
2025         [BLACKBERRY] Update touch code to reflect touch refactor
2026         https://bugs.webkit.org/show_bug.cgi?id=101227
2027
2028         Reviewed by Rob Buis.
2029
2030         PR #2706785
2031         Reviewed Internally by: Mike Lattanzio
2032
2033         * Api/WebPage.cpp:
2034         (BlackBerry::WebKit::WebPage::touchEvent):
2035         (BlackBerry::WebKit::WebPagePrivate::dispatchTouchEventToFullScreenPlugin):
2036
2037 2012-11-05  Konrad Piascik  <kpiascik@rim.com>
2038
2039         [BlackBerry] Web Inspector: Add InspectorInstrumentaiton calls for timeline compositing.
2040         https://bugs.webkit.org/show_bug.cgi?id=101213
2041         RIM PR 178131
2042
2043         Reviewed by Rob Buis.
2044
2045         Internally Reviewed by Arvid Nilsson.
2046
2047         Added compositing events to the timeline for BlackBerry.
2048
2049         * Api/WebPage.cpp:
2050         (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
2051         (BlackBerry::WebKit::WebPagePrivate::willComposite):
2052         (WebKit):
2053         (BlackBerry::WebKit::WebPagePrivate::didComposite):
2054         * Api/WebPage_p.h:
2055         (WebPagePrivate):
2056
2057 2012-11-03  Alexey Proskuryakov  <ap@apple.com>
2058
2059         Get rid of USE(CFURLSTORAGESESSIONS)
2060         https://bugs.webkit.org/show_bug.cgi?id=101131
2061
2062         Reviewed by Sam Weinig.
2063
2064         * WebCoreSupport/AboutDataUseFeatures.in: Not sure what this list is about, but
2065         CFURLSTORAGESESSIONS probably doesn't need to stay here.
2066
2067 2012-11-02  Nima Ghanavatian  <nghanavatian@rim.com>
2068
2069         [BlackBerry] Fix compile-time warning of a possible empty-body if statement
2070         https://bugs.webkit.org/show_bug.cgi?id=101095
2071
2072         Reviewed by Yong Li.
2073         Internally reviewed by Jeff Rogers.
2074
2075         BBLOG might be compiled out leaving an if statement with an empty
2076         body. This is giving us a warning at the moment. Simply putting braces
2077         around it will fail as well because then we'd have braces around a
2078         single-line if. So, in following with the style observed in other parts
2079         of BackingStore.cpp, break up the log message and add braces.
2080
2081         * Api/BackingStore.cpp:
2082         (BlackBerry::WebKit::BackingStorePrivate::blitToWindow):
2083         (BlackBerry::WebKit::BackingStorePrivate::fillWindow):
2084         (BlackBerry::WebKit::BackingStorePrivate::clearWindow):
2085
2086 2012-11-02  Nima Ghanavatian  <nghanavatian@rim.com>
2087
2088         [BlackBerry] Optimize backspace key handling
2089         https://bugs.webkit.org/show_bug.cgi?id=101083
2090
2091         PR233591
2092         Optimize backspace key handling. Some of these calls are not
2093         required by IMF since the input_service already processes the backspace key
2094         and updates the state before passing us the key.
2095
2096         Internally reviewed by Mike Fenton.
2097
2098         Reviewed by Yong Li.
2099
2100         Blocking calls with a flag that we clear immediately after
2101         processing a backspace keydown.
2102
2103         * WebKitSupport/InputHandler.cpp:
2104         (BlackBerry::WebKit::InputHandler::nodeTextChanged):
2105         (BlackBerry::WebKit::InputHandler::selectionChanged):
2106         (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
2107         * WebKitSupport/InputHandler.h:
2108         (InputHandler):
2109
2110 2012-11-02  Otto Derek Cheung  <otcheung@rim.com>
2111
2112         [BlackBerry] Adding window.external to our port
2113         https://bugs.webkit.org/show_bug.cgi?id=100868
2114
2115         Reviewed by Rob Buis.
2116         PR 158809
2117
2118         Patch up an error where we were dereferencing a null pointer.
2119
2120         * WebCoreSupport/ExternalExtension.cpp:
2121         (addSearchProviderMethod):
2122         (IsSearchProviderInstalledMethod):
2123
2124 2012-11-01  Peter Wang  <peter.wang@torchmobile.com.cn>
2125
2126         [BlackBerry] Simplify the code of returning JSValue in "BlackBerry::WebKit::WebPagePrivate::executeJavaScript"
2127         https://bugs.webkit.org/show_bug.cgi?id=100941
2128
2129         Reviewed by Yong Li.
2130
2131         Remove the unnecessary steps, just directly deal with returned JSValue.
2132
2133         * Api/WebPage.cpp:
2134         (BlackBerry::WebKit::WebPagePrivate::executeJavaScript):
2135         (BlackBerry::WebKit::WebPagePrivate::executeJavaScriptInIsolatedWorld):
2136
2137 2012-11-01  Otto Derek Cheung  <otcheung@rim.com>
2138
2139         [BlackBerry] Add a prompt to enable global location services
2140         https://bugs.webkit.org/show_bug.cgi?id=100992
2141         
2142         PR 227897
2143
2144         Reviewed by Rob Buis.
2145
2146         Adding a dialog to let the user know location services isn't enabled.
2147         Currently, the browser app does not check whether the global setting for
2148         location service is enabled. This patch adds a dialog to allow the user
2149         to open the settings app and change that setting. This infobar will only
2150         show once per session. If the user fails to turn on location services after
2151         the first prompt, all geolocation requests will automatically fail.
2152
2153         Also, adapting GeolocationClientBlackBerry to the removal of GeoTracker.
2154         The class now talks directly to the geo handler singleton.
2155
2156         * Api/WebPageClient.h:
2157         * WebCoreSupport/GeolocationClientBlackBerry.cpp:
2158         (GeolocationClientBlackBerry::GeolocationClientBlackBerry):
2159         (GeolocationClientBlackBerry::geolocationDestroyed):
2160         (GeolocationClientBlackBerry::startUpdating):
2161         (GeolocationClientBlackBerry::stopUpdating):
2162         (GeolocationClientBlackBerry::requestPermission):
2163         (GeolocationClientBlackBerry::setEnableHighAccuracy):
2164         * WebCoreSupport/GeolocationClientBlackBerry.h:
2165         (WebCore::GeolocationClientBlackBerry::requiresHighAccuracy):
2166         (GeolocationClientBlackBerry):
2167
2168 2012-11-01  Michael Matovsky  <mmatovsky@rim.com>
2169
2170         [BlackBerry] Web page view state should be preserved for pages loaded from page cache
2171         https://bugs.webkit.org/show_bug.cgi?id=100694
2172         Internal PR: 220488
2173
2174         Internally reviewed by Lianghui Chen, Joe Mason
2175         Reviewed by Rob Buis.
2176
2177         The web page view specific metadata should be preserved for web pages loaded from page cache (by using back/forward).
2178         This requires web page view state to be saved in and restored from the corresponding page cache history item.
2179
2180         * Api/WebPageClient.h:
2181         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2182         (WebCore::FrameLoaderClientBlackBerry::saveViewStateToItem):
2183         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
2184
2185 2012-11-01  Leo Yang  <leoyang@rim.com>
2186
2187         [BlackBerry] Use clipped background rect in backing store
2188         https://bugs.webkit.org/show_bug.cgi?id=100960
2189
2190         Reviewed by Yong Li.
2191         Reviewed internally by Arvid Nilsson.
2192
2193         We calculated clipped background rect but didn't really use it when painting
2194         the background. Use the correct rect to avoid ASSERT failure in platform code.
2195
2196         * Api/BackingStore.cpp:
2197         (BlackBerry::WebKit::BackingStorePrivate::paintDefaultBackground):
2198
2199 2012-10-31  George Staikos  <staikos@webkit.org>
2200
2201         [BlackBerry] Crash on html popup form control when element is deleted
2202         https://bugs.webkit.org/show_bug.cgi?id=100869
2203
2204         Reviewed by Yong Li.
2205
2206         Make the element pointers RefPtr so they don't go away before the popup
2207         is closed.
2208
2209         * WebCoreSupport/ColorPickerClient.h:
2210         (ColorPickerClient):
2211         * WebCoreSupport/DatePickerClient.h:
2212         (DatePickerClient):
2213         * WebCoreSupport/SelectPopupClient.h:
2214         (SelectPopupClient):
2215
2216 2012-10-31  Genevieve Mak  <gmak@rim.com>
2217
2218         [BLACKBERRY] Custom WebWorks context menus don't always work.
2219         https://bugs.webkit.org/show_bug.cgi?id=100891
2220
2221         Reviewed by Rob Buis.
2222
2223         Walk up the dom tree until we find the webworks attribute or run out
2224         of parent nodes.
2225         PR# 227732
2226
2227         * Api/WebPage.cpp:
2228         (BlackBerry::WebKit::WebPagePrivate::webContext):
2229
2230 2012-10-31  Otto Derek Cheung  <otcheung@rim.com>
2231
2232         [BlackBerry] Adding window.external to our port
2233         https://bugs.webkit.org/show_bug.cgi?id=100868
2234
2235         Reviewed by Rob Buis.
2236
2237         Attaching the window.external interface to the frame when
2238         it loads up.
2239
2240         When called, the external interface methods call stubs declared
2241         in ChromeClientBlackBerry. The method passes in the url of the search
2242         provider and the url of the frame. Cross-site check has to be done in the
2243         implementation PR.
2244
2245         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2246         (WebCore::ChromeClientBlackBerry::addSearchProvider):
2247         (WebCore):
2248         (WebCore::ChromeClientBlackBerry::isSearchProviderInstalled):
2249         * WebCoreSupport/ChromeClientBlackBerry.h:
2250         (ChromeClientBlackBerry):
2251         * WebCoreSupport/ExternalExtension.cpp: Added.
2252         (addSearchProviderMethod):
2253         (IsSearchProviderInstalledMethod):
2254         (externalExtensionInitialize):
2255         (externalExtensionFinalize):
2256         * WebCoreSupport/ExternalExtension.h: Added.
2257         (WebCore):
2258         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2259         (WebCore::FrameLoaderClientBlackBerry::dispatchDidClearWindowObjectInWorld):
2260
2261 2012-10-30  Peter Wang  <peter.wang@torchmobile.com.cn>
2262
2263         [BlackBerry] Clean the code of "JavaScriptDebuggerBlackBerry"
2264         https://bugs.webkit.org/show_bug.cgi?id=100724
2265
2266         Reviewed by Rob Buis.
2267
2268         Remove the code of JavaScriptDebuggerBlackBerry.
2269
2270         * Api/WebPage.cpp:
2271         * Api/WebPage.h:
2272         * Api/WebPage_p.h:
2273         (WebCore):
2274         (WebPagePrivate):
2275         * WebCoreSupport/JavaScriptDebuggerBlackBerry.cpp: Removed.
2276         * WebCoreSupport/JavaScriptDebuggerBlackBerry.h: Removed.
2277
2278 2012-10-29  Rob Buis  <rbuis@rim.com>
2279
2280         [BlackBerry] Simplify AuthenticationChallengeManager::instance
2281         https://bugs.webkit.org/show_bug.cgi?id=100614
2282
2283         Reviewed by Yong Li.
2284         Internally reviewed by Lyon Chen.
2285
2286         No need to call AuthenticationChallengeManager::init anymore.
2287
2288         * Api/BlackBerryGlobal.cpp:
2289         (BlackBerry::WebKit::globalInitialize):
2290
2291 2012-10-29  Mike Lattanzio  <mlattanzio@rim.com>
2292
2293         [BlackBerry] Typo in WebPagePrivate::postponeDocumentRecalcStyle()
2294         https://bugs.webkit.org/show_bug.cgi?id=100377
2295
2296         Reviewed by Adam Treat.
2297
2298         Should be void, not bool.
2299
2300         * Api/WebPage.cpp:
2301         (BlackBerry::WebKit::WebPagePrivate::postponeDocumentStyleRecalc):
2302         * Api/WebPage_p.h:
2303         (WebPagePrivate):
2304
2305 2012-10-29  Robin Cao  <robin.cao@torchmobile.com.cn>
2306
2307         [BlackBerry] Fix a build error
2308         https://bugs.webkit.org/show_bug.cgi?id=100649
2309
2310         Reviewed by Kentaro Hara.
2311
2312         r127876 changed the signature of WebCore::EventHandler::hitTestResultAtPoint()
2313         and this commit was later reverted. We need to update a call site in the
2314         BlackBerry port to make it build.
2315
2316         * Api/WebPage.cpp:
2317         (BlackBerry::WebKit::WebPagePrivate::hitTestResult):
2318
2319 2012-10-26  Jacky Jiang  <zhajiang@rim.com>
2320
2321         [BlackBerry][FullScreen] entering/leaving fullscreen results in temporary glitches on the screen
2322         https://bugs.webkit.org/show_bug.cgi?id=100421
2323
2324         Reviewed by Yong Li.
2325
2326         PR: 231173
2327         When leaving fullscreen, we need to suspend screen and backing store
2328         updates before setting scroll position and changing transformation and
2329         resume after they are done. In which way, we can get rid of a noticeable
2330         glitch during the transition.
2331
2332         * Api/WebPage.cpp:
2333         (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
2334
2335 2012-10-26  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
2336
2337         [BlackBerry] ASSERT currentThreadIsHoldingLock() failed in MarkedAllocator::allocateSlowCase()
2338         https://bugs.webkit.org/show_bug.cgi?id=100504
2339
2340         Reviewed by Yong Li.
2341
2342         PR #232038 The similar PR # 200724.
2343         Reviewed internally by Petter Wang.
2344
2345         This issue is same as bug 95492, and this patch is same as its patch.
2346         Hold the JSLock for the current thread before we call toRef to avoid
2347         the ASSERT failure.
2348
2349         * Api/WebPage.cpp:
2350         (BlackBerry::WebKit::WebPagePrivate::executeJavaScriptInIsolatedWorld):
2351         (BlackBerry::WebKit::WebPage::executeJavaScriptFunction):
2352
2353 2012-10-25  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
2354
2355         [BlackBerry] WebView process crashed at AuthenticationChallengeManager::pageVisibilityChanged()
2356         https://bugs.webkit.org/show_bug.cgi?id=100330
2357
2358         Reviewed by Rob Buis.
2359
2360         Reviewed internally by Charles Wei.
2361         PR #231232
2362
2363         Since AuthenticationChallengeManager keeps a map of WebPages, WebPage setting
2364         visible needs AuthenticationChallengeManager to update its records, deleting
2365         webpage from AuthenticationChallengeManager's map should be done after setting
2366         webpage visibility.
2367
2368         * Api/WebPage.cpp:
2369         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
2370
2371 2012-10-24  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
2372
2373         [BlackBerry] ASSERT(!needsOneShotDrawingSynchronization()) failed in commitRootLayerIfNeeded()
2374         https://bugs.webkit.org/show_bug.cgi?id=100214
2375
2376         Reviewed by Rob Buis.
2377
2378         ViewportSize has been changed before committing root layer, it asserts
2379         that it needs relayout and render if needed before committing if it
2380         Needs One Shot Drawing Synchronization.
2381         This patch calls requestLayoutIfNeeded() when resumeScreenAndBackingStoreUpdates().
2382
2383         Fix a coding style in the BackingStore.cpp as well.
2384
2385         Reviewed internally by Arvid Nilsson.
2386         PR #230253
2387
2388         * Api/BackingStore.cpp:
2389         (BlackBerry::WebKit::BackingStorePrivate::resumeScreenAndBackingStoreUpdates):
2390
2391 2012-10-24  Otto Derek Cheung  <otcheung@rim.com>
2392
2393         [BlackBerry] Geolocation is segfaulting
2394         https://bugs.webkit.org/show_bug.cgi?id=100305
2395
2396         Reviewed by Rob Buis.
2397
2398         We weren't wrapping the Geolocation object in a RefPtr when we call setIsAllowed in
2399         GeolocationClientBlackBerry::onPermission.
2400
2401         This patch also removes all references of the Geolocation object in WebPageClientImpl.
2402         One RefPtr<Geolocation> is used to store the reference of the WebCore object on our port.
2403
2404         We don't need a mapping between origin -> context of Geolocation because in our port,
2405         one WebPage.cpp contains one GeolocationController only. 
2406
2407         * Api/WebPageClient.h:
2408         * WebCoreSupport/GeolocationClientBlackBerry.cpp:
2409         (frameOrigin):
2410         (GeolocationClientBlackBerry::requestPermission):
2411         (GeolocationClientBlackBerry::cancelPermissionRequest):
2412         (GeolocationClientBlackBerry::onPermission):
2413         * WebCoreSupport/GeolocationClientBlackBerry.h:
2414         (GeolocationClientBlackBerry):
2415
2416 2012-10-24  Jacky Jiang  <zhajiang@rim.com>
2417
2418         [BlackBerry][Fullscreen] Roll out changes to fullscreen which rely on viewport size change [Part II]
2419         https://bugs.webkit.org/show_bug.cgi?id=100259
2420
2421         Reviewed by Rob Buis.
2422
2423         PR: 219666
2424         Revert "[BlackBerry] [FullScreen] entering/leaving fullscreen results in temporary glitches on the screen"
2425         This rolls out r128772.
2426         The patches relies on the viewport size change of the client side to
2427         resume the screen and backing store updates. However, some client
2428         sides don't need or wish to resize the WebKit viewport at all which
2429         will result in upexpected screen and backing store suspensions.
2430
2431         * Api/WebPage.cpp:
2432         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
2433         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
2434         * Api/WebPage_p.h:
2435         (WebPagePrivate):
2436         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2437         (WebCore::ChromeClientBlackBerry::enterFullScreenForElement):
2438         (WebCore::ChromeClientBlackBerry::exitFullScreenForElement):
2439
2440 2012-10-24  Jacky Jiang  <zhajiang@rim.com>
2441
2442         [BlackBerry][Fullscreen] Roll out changes to fullscreen which rely on viewport size change
2443         https://bugs.webkit.org/show_bug.cgi?id=100259
2444
2445         Reviewed by Rob Buis.
2446
2447         PR: 219666
2448         Roll out r130392 and r129909.
2449         The patches rely on the viewport size change of the client side to
2450         update the scale and scroll position of the video. However, some client
2451         sides don't need or wish to resize the WebKit viewport at all.
2452
2453         * Api/WebPage.cpp:
2454         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
2455         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
2456         (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
2457         (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
2458         * Api/WebPage_p.h:
2459         (WebPagePrivate):
2460
2461 2012-10-24  Otto Derek Cheung  <otcheung@rim.com>
2462
2463         [BlackBerry] Rename GeolocationControllerClientBlackBerry to GeolocationClientBlackBerry
2464         https://bugs.webkit.org/show_bug.cgi?id=100250
2465
2466         Reviewed by Rob Buis.
2467
2468         Rename GeolocationControllerClientBlackBerry to GeolocationClientBlackBerry
2469         to prevent confusion.
2470         PR 230196
2471
2472         * Api/WebPage.cpp:
2473         (BlackBerry::WebKit::WebPagePrivate::init):
2474         * Api/WebPage_p.h:
2475         (WebCore):
2476         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2477         * WebCoreSupport/GeolocationClientBlackBerry.cpp: Renamed from Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.cpp.
2478         (frameOrigin):
2479         (GeolocationClientBlackBerry::GeolocationClientBlackBerry):
2480         (GeolocationClientBlackBerry::geolocationDestroyed):
2481         (GeolocationClientBlackBerry::startUpdating):
2482         (GeolocationClientBlackBerry::stopUpdating):
2483         (GeolocationClientBlackBerry::lastPosition):
2484         (GeolocationClientBlackBerry::requestPermission):
2485         (GeolocationClientBlackBerry::cancelPermissionRequest):
2486         (GeolocationClientBlackBerry::onLocationUpdate):
2487         (GeolocationClientBlackBerry::onLocationError):
2488         (GeolocationClientBlackBerry::onPermission):
2489         (GeolocationClientBlackBerry::setEnableHighAccuracy):
2490         * WebCoreSupport/GeolocationClientBlackBerry.h: Renamed from Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.h.
2491         (WebKit):
2492         (WebCore):
2493         (GeolocationClientBlackBerry):
2494         (WebCore::GeolocationClientBlackBerry::tracker):
2495
2496 2012-10-24  Parth Patel  <parpatel@rim.com>
2497
2498         [BlackBerry] Extending existing ThreadUnsafe singletons in webkit to
2499         Generic ThreadUnsafe Singleton
2500         https://bugs.webkit.org/show_bug.cgi?id=100145
2501
2502         Reviewed by Rob Buis.
2503
2504         Extending the singletons to generic singleton and changing
2505         getInstance() in IconDatabaseClientBlackBerry to instance()
2506         to match the generic singleton template.
2507
2508         Reviewed Internally by Yong Li.
2509
2510         * Api/WebPage.cpp:
2511         (BlackBerry::WebKit::WebPage::initializeIconDataBase):
2512         * WebCoreSupport/IconDatabaseClientBlackBerry.cpp:
2513         (WebCore):
2514         * WebCoreSupport/IconDatabaseClientBlackBerry.h:
2515         (IconDatabaseClientBlackBerry):
2516
2517 2012-10-23  Robin Cao  <robin.cao@torchmobile.com.cn>
2518
2519         [BlackBerry] Web page renders at the wrong zoom level after viewport changes
2520         https://bugs.webkit.org/show_bug.cgi?id=100096
2521
2522         Reviewed by Rob Buis.
2523
2524         Notify the client of the zoom level change before resuming screen updates.
2525         Otherwise, the user interface thread may blit the content at the wrong
2526         zoom level in some cases. This can also prevent potential flickering.
2527
2528         Reviewed internally by Arvid Nilsson.
2529
2530         PR #225741
2531
2532         * Api/WebPage.cpp:
2533         (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint):
2534         (BlackBerry::WebKit::WebPagePrivate::zoomBlock):
2535
2536 2012-10-23  Mike Lattanzio  <mlattanzio@rim.com>
2537
2538         [BlackBerry] Cache TouchDown HitTestResult to avoid calling RenderLayer::hitTest unnecessarily
2539         https://bugs.webkit.org/show_bug.cgi?id=99649
2540
2541         Reviewed by George Staikos.
2542
2543         Random latency before scroll starts on sites like http://pintrest.com
2544         Internal PR225398
2545
2546         The chief problem here is the all the hit testing that we do for
2547         touch events and simulated mouse events. If the render tree is dirty
2548         hit tests can take a long time in Document::recalcStyle(). Masking
2549         the flags that force style recalculations will make them fast, at the
2550         expense that they might be happening on stale data.
2551
2552         Since we are only using these hit tests to look for event handlers -
2553         we're not actually modifying anything, it is better to skip the
2554         Document::recalcStyle() and save ourselves tons of time.
2555
2556         * Api/InRegionScroller.cpp:
2557         (BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint):
2558         * Api/WebPage.cpp:
2559         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
2560         (BlackBerry::WebKit::WebPage::touchEvent):
2561         (BlackBerry::WebKit::WebPagePrivate::setScrollOriginPoint):
2562         (BlackBerry::WebKit::WebPagePrivate::postponeDocumentStyleRecalc):
2563         (WebKit):
2564         (BlackBerry::WebKit::WebPagePrivate::resumeDocumentStyleRecalc):
2565         (BlackBerry::WebKit::WebPagePrivate::hitTestResult):
2566         (BlackBerry::WebKit::WebPagePrivate::clearCachedHitTestResult):
2567         * Api/WebPage_p.h:
2568         (WebPagePrivate):
2569         * WebKitSupport/FatFingers.cpp:
2570         (BlackBerry::WebKit::FatFingers::findBestPoint):
2571         (BlackBerry::WebKit::FatFingers::getRelevantInfoFromCachedHitTest):
2572         * WebKitSupport/FatFingers.h:
2573         * WebKitSupport/TouchEventHandler.cpp:
2574         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
2575
2576 2012-10-23  Rob Buis  <rbuis@rim.com>
2577
2578         [BlackBerry] Make selection in search input box not overlap cancel button
2579         https://bugs.webkit.org/show_bug.cgi?id=100130
2580
2581         Reviewed by Antonio Gomes.
2582
2583         This ensures that even when selection is active, the user can still press 'cancel'.
2584
2585         * WebKitSupport/InputHandler.cpp:
2586         (BlackBerry::WebKit::InputHandler::boundingBoxForInputField):
2587
2588 2012-10-23  Arvid Nilsson  <anilsson@rim.com>
2589
2590         [BlackBerry] Let WebKit manage the SelectionOverlay
2591         https://bugs.webkit.org/show_bug.cgi?id=99585
2592
2593         Reviewed by Rob Buis.
2594
2595         The SelectionOverlay was exposed to clients of the BlackBerry::WebKit
2596         API. However, all the information and notifications necessary to manage
2597         the SelectionOverlay are available within WebKit, so the client does
2598         not have to shoulder this responsibility.
2599
2600         Remove WebSelection and all the related plumbing. Now that nobody is
2601         using the class from the user interface thread, remove the message
2602         related code in SelectionOverlay.
2603
2604         Add two calls to SelectionOverlay::hide() that are necessary now that
2605         the client is no longer responsible for hiding it.
2606
2607         RIM PR: 225789
2608
2609         Reviewed internally by Mike Fenton.
2610
2611         * Api/WebPage.cpp:
2612         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
2613         * Api/WebPage.h:
2614         (WebKit):
2615         * Api/WebPage_p.h:
2616         (WebPagePrivate):
2617         * Api/WebSelectionOverlay.h: Removed.
2618         * WebKitSupport/SelectionHandler.cpp:
2619         (BlackBerry::WebKit::SelectionHandler::cancelSelection): Hide the overlay here, because state is reset and selection mode is no longer active
2620         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged): Also hide overlay here, to go with the call to cancelSelectionVisuals
2621         * WebKitSupport/SelectionOverlay.cpp:
2622         (BlackBerry::WebKit::SelectionOverlay::SelectionOverlay):
2623         * WebKitSupport/SelectionOverlay.h:
2624         (BlackBerry::WebKit::SelectionOverlay::create):
2625         (SelectionOverlay):
2626
2627 2012-10-22  Mike Fenton  <mifenton@rim.com>
2628
2629         [BlackBerry] Remove specialized handling for isIndex fields.
2630         https://bugs.webkit.org/show_bug.cgi?id=100004
2631
2632         Reviewed by Rob Buis.
2633
2634         PR 214342.
2635
2636         Remove special handling for isIndex field as the tag
2637         is rewritten.
2638
2639         Reviewed Internally by Yongxin Dai and Nima Ghanavatian.
2640
2641         * WebKitSupport/InputHandler.cpp:
2642         (BlackBerry::WebKit::inputStyle):
2643         (BlackBerry::WebKit::InputHandler::elementType):
2644
2645 2012-10-22  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
2646
2647         [Qt] Fix "ASSERTION FAILED: !document->inPageCache()" when loading a page
2648         https://bugs.webkit.org/show_bug.cgi?id=98514
2649
2650         Reviewed by Kenneth Rohde Christiansen.
2651
2652         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2653         (WebCore::FrameLoaderClientBlackBerry::transitionToCommittedForNewPage):
2654
2655 2012-10-20  Andrew Lo  <anlo@rim.com>
2656
2657         [BlackBerry] m_mainFrame should be null checked before use in WebPagePrivate destructor
2658         https://bugs.webkit.org/show_bug.cgi?id=99916
2659
2660         Reviewed by George Staikos.
2661         Internally reviewed by Arvid Nilsson.
2662
2663         Internal PR228029
2664         Add null checks for m_mainFrame for things that happen during
2665         WebPage destruction.
2666
2667         * Api/WebPage.cpp:
2668         (BlackBerry::WebKit::WebPagePrivate::setVisible):
2669         (BlackBerry::WebKit::WebPagePrivate::setCompositorDrawsRootLayer):
2670
2671 2012-10-19  Mike Fenton  <mifenton@rim.com>
2672
2673         [BlackBerry] Convert input style to int64_t
2674         https://bugs.webkit.org/show_bug.cgi?id=99848
2675
2676         Reviewed by Yong Li.
2677
2678         PR 227381.
2679
2680         Switch input style mask to int64_t to match the the updated definition.
2681
2682         Reviewed Internally by Nima Ghanavatian.
2683
2684         * Api/WebPageClient.h:
2685         * WebKitSupport/InputHandler.cpp:
2686         (BlackBerry::WebKit::inputStyle):
2687         * WebKitSupport/InputHandler.h:
2688         (InputHandler):
2689
2690 2012-10-19  Mike Fenton  <mifenton@rim.com>
2691
2692         [BlackBerry] Move all keyboard type calculations into InputHandler.
2693         https://bugs.webkit.org/show_bug.cgi?id=99847
2694
2695         Reviewed by Yong Li.
2696
2697         PR 227381.
2698
2699         Move all keyboard type calculations into webkit and avoid passing type
2700         information to the webview.
2701
2702         Reviewed Internally by Nima Ghanavatian.
2703
2704         * Api/WebPageClient.h:
2705         * WebKitSupport/InputHandler.cpp:
2706         (BlackBerry::WebKit::convertInputTypeToVKBType):
2707         (WebKit):
2708         (BlackBerry::WebKit::InputHandler::setElementFocused):
2709
2710 2012-10-19  Jacky Jiang  <zhajiang@rim.com>
2711
2712         [BlackBerry] Page viewport aspect ratio not kept on navigating back
2713         https://bugs.webkit.org/show_bug.cgi?id=99760
2714
2715         Reviewed by Yong Li.
2716         Internally reviewed by Konrad Piascik
2717
2718         PR: 222437
2719         This is to fix the second issue on PR222437 that the viewport not kept
2720         when navigating back from google after rotation to bloomberg.
2721         We were trying to restore the history contents size and scale of
2722         bloomberg which has virtual viewport. The scale would be recalculated
2723         based on the new screen size. However, we would still use the current
2724         contents size if it was greater than the history contents size in
2725         FrameView::setContentsSize which made the contents seem to be scaled
2726         too much.
2727         Actually when we relayout the contents after rotation change, the
2728         current contents size which is based on the virtual viewport has taken
2729         the screen size into account. Shrinking the contents size will be
2730         expensive. So we can ignore screen size based scale calculation here.
2731
2732         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2733         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
2734
2735 2012-10-19  Mike Fenton  <mifenton@rim.com>
2736
2737         [BlackBerry] Add input logs to InputHandler::ensureFocusTextElementVisible.
2738         https://bugs.webkit.org/show_bug.cgi?id=99837
2739
2740         Reviewed by Antonio Gomes.
2741
2742         Add input logs for InputHandler::ensureFocusTextElementVisible.
2743
2744         Reviewed Internally by Nima Ghanavatian.
2745
2746         * WebKitSupport/InputHandler.cpp:
2747         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
2748
2749 2012-10-19  Andrew Lo  <anlo@rim.com>
2750
2751         [BlackBerry] Should suspend AnimationController when WebPage becomes invisible.
2752         https://bugs.webkit.org/show_bug.cgi?id=99844
2753
2754         Reviewed by Yong Li.
2755         Internally reviewed by Arvid Nilsson & Yong Li.
2756
2757         Suspend animation controller when the tab becomes invisible,
2758         in addition to suspending scripted animations.
2759
2760         * Api/WebPage.cpp:
2761         (BlackBerry::WebKit::WebPagePrivate::setVisible):
2762
2763 2012-10-19  Mike Fenton  <mifenton@rim.com>
2764
2765         [BlackBerry] Don't attempt to auto scroll on input for Fixed Position elements.
2766         https://bugs.webkit.org/show_bug.cgi?id=99833
2767
2768         Reviewed by Antonio Gomes.
2769
2770         PR 195024.
2771
2772         Don't attempt to scroll fixed position elements.
2773
2774         Reviewed Internally by Arvid Nilsson.
2775
2776         * WebKitSupport/DOMSupport.cpp:
2777         (BlackBerry::WebKit::DOMSupport::isFixedPositionOrHasFixedPositionAncestor):
2778         (DOMSupport):
2779         * WebKitSupport/DOMSupport.h:
2780         (WebCore):
2781         * WebKitSupport/InputHandler.cpp:
2782         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
2783
2784 2012-10-18  Jacky Jiang  <zhajiang@rim.com>
2785
2786         [BlackBerry] Page viewport aspect ratio not kept on navigating back
2787         https://bugs.webkit.org/show_bug.cgi?id=99760
2788
2789         Reviewed by Rob Buis.
2790         Internally reviewed by Konrad Piascik.
2791
2792         PR: 190469
2793         This was added in r127628 which was trying to fix some rendering
2794         defects on maps.google.com and news.qq.com, however it was very harmful
2795         and caused regressions.
2796         zoomToFitScale() depends on the current contents size. During history
2797         navigation and device rotation, if zoomToFitScale() is based on the
2798         final contents size which is expected, there will still be a scale
2799         calculation like this afterwards
2800         screenSize.width()/screenSize.height()*zoomToFitScale() which will
2801         result in a wrong scale. During the history navigation, if
2802         zoomToFitScale() isn't based on the final contents size, then we will
2803         get the wrong scale as well for sure.
2804         This issue will be fixed by removing the wrong calculation.
2805         The original issue of r127628 was fixed by the patch of PR225981.
2806
2807         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2808         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
2809
2810 2012-10-18  John Griggs  <jgriggs@rim.com>
2811
2812         2012-10-18  John Griggs  <jgriggs@rim.com>
2813
2814         Crash in InRegionScrollableArea constructor while loading page
2815         https://bugs.webkit.org/show_bug.cgi?id=99733
2816
2817         Reviewed by Antonio Gomes.
2818
2819         Check scrollLayer and avoid constructing InRegionScrollableArea when it is NULL.
2820
2821         * Api/InRegionScroller.cpp:
2822         (BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint):
2823
2824 2012-10-17  Jacky Jiang  <zhajiang@rim.com>
2825
2826         [BlackBerry] Possible redundant zoomToInitialScaleOnLoad() in WebPagePrivate::setLoadState
2827         https://bugs.webkit.org/show_bug.cgi?id=99624
2828
2829         Reviewed by Rob Buis.
2830         Internally reviewed by Arvid Nilsson
2831
2832         PR: 225981
2833         Several reasons to eliminate the ancient unnecessary
2834         zoomToInitialScaleOnLoad() in WebPagePrivate::setLoadState committed:
2835         - At this point, we have only committed the data we received.
2836         - For the new load, we haven't started parsing the tokens and building
2837           the DOM tree and the first layout will happen after that.
2838         - For the load restored from cache, the first layout will happen after
2839           setLoadState committed which is called by
2840           FrameLoader::dispatchDidCommitLoad().
2841         - zoomToInitialScaleOnLoad() can still be called after the first
2842           layout finished.
2843         - zoomToInitialScaleOnLoad() is expensive and it will boost the load
2844           performance after the removal.
2845         - Removal of this can fix some weird rendering defects on yahoo.com,
2846           maps.google.com, news.qq.com and so on during load and rotation
2847           mentioned on the PR.
2848
2849         * Api/WebPage.cpp:
2850         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
2851
2852 2012-10-17  Mike Fenton  <mifenton@rim.com>
2853
2854         [BlackBerry] Prevent focus zoom on non-userscalable pages.
2855         https://bugs.webkit.org/show_bug.cgi?id=99608
2856
2857         Reviewed by Rob Buis.
2858
2859         PR 222378.
2860
2861         Disable focus zoom when the page is non-user scalable.
2862
2863         Reviewed Internally by Nima Ghanavatian.
2864
2865         * WebKitSupport/InputHandler.cpp:
2866         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
2867
2868 2012-10-16  Mike Lattanzio  <mlattanzio@rim.com>
2869
2870         2012-10-16  Mike Lattanzio  <mlattanzio@rim.com>
2871
2872         [BlackBerry] calculateInRegionScrollableAreasForPoint should use a ReadOnly HitTest
2873         https://bugs.webkit.org/show_bug.cgi?id=99497
2874
2875         Reviewed by Antonio Gomes.
2876
2877         Fix calculateInRegionScrollableAreasForPoint to use a ReadOnly
2878         hit test to improve its performance.
2879
2880         * Api/InRegionScroller.cpp:
2881         (BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint):
2882
2883 2012-10-15  Peter Wang  <peter.wang@torchmobile.com.cn>
2884
2885         [BlackBerry] Web Inspector: Remove the useless preferences items in "inspectorBB.js"
2886         https://bugs.webkit.org/show_bug.cgi?id=99404
2887
2888         Reviewed by George Staikos.
2889
2890         In "inspectorBB.js", remove the useless preferences items to catch up the new code of frontend.
2891
2892         * WebCoreSupport/inspectorBB.js:
2893
2894 2012-10-15  Jakob Petsovits  <jpetsovits@rim.com>
2895
2896         [BlackBerry] Only reallocate buffers that were allocated before suspending
2897         https://bugs.webkit.org/show_bug.cgi?id=99205
2898         RIM PR 99395
2899
2900         Reviewed by Antonio Gomes.
2901
2902         When we call releaseBuffers(), not all of the backingstore
2903         tile buffers might have been allocated yet. Still we try
2904         to release all of them, which causes us to lazy-initialize
2905         the tile buffers so we can release them again.
2906
2907         This is stupid and we should just ignore buffers that
2908         haven't been initialized yet. This patch makes that change.
2909
2910         * WebKitSupport/BackingStoreTile.cpp:
2911         (BlackBerry::WebKit::TileBuffer::wasNativeBufferCreated):
2912         (WebKit):
2913         * WebKitSupport/BackingStoreTile.h:
2914         (TileBuffer):
2915         * WebKitSupport/SurfacePool.cpp:
2916         (BlackBerry::WebKit::SurfacePool::createBuffers):
2917         (BlackBerry::WebKit::SurfacePool::releaseBuffers):
2918
2919 2012-10-15  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2920
2921         [BlackBerry] replace BlackBerry::Platform::log() with BBLOG()
2922         https://bugs.webkit.org/show_bug.cgi?id=99302
2923
2924         Reviewed by Rob Buis.
2925
2926         RIM PR: 210884
2927         The marco BBLOG() is defined as a no-op in release mode which will
2928         save a function call in the release build.
2929         Internally reviewed by Charles Wei.
2930
2931         * Api/BackingStore.cpp:
2932         (BlackBerry::WebKit::bestDivisor):
2933         (BlackBerry::WebKit::BackingStorePrivate::suspendScreenAndBackingStoreUpdates):
2934         (BlackBerry::WebKit::BackingStorePrivate::resumeScreenAndBackingStoreUpdates):
2935         (BlackBerry::WebKit::BackingStorePrivate::repaint):
2936         (BlackBerry::WebKit::BackingStorePrivate::slowScroll):
2937         (BlackBerry::WebKit::BackingStorePrivate::scroll):
2938         (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect):
2939         (BlackBerry::WebKit::BackingStorePrivate::scrollBackingStore):
2940         (BlackBerry::WebKit::BackingStorePrivate::render):
2941         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
2942         (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion):
2943         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
2944         (BlackBerry::WebKit::BackingStorePrivate::blitToWindow):
2945         (BlackBerry::WebKit::BackingStorePrivate::fillWindow):
2946         (BlackBerry::WebKit::BackingStorePrivate::invalidateWindow):
2947         (BlackBerry::WebKit::BackingStorePrivate::clearWindow):
2948         * Api/WebPage.cpp:
2949         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
2950         (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint):
2951         (BlackBerry::WebKit::WebPagePrivate::contentsSizeChanged):
2952         (BlackBerry::WebKit::WebPagePrivate::zoomToInitialScaleOnLoad):
2953         (BlackBerry::WebKit::WebPagePrivate::scheduleRootLayerCommit):
2954         (BlackBerry::WebKit::WebPagePrivate::commitRootLayer):
2955         (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
2956         (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
2957         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2958         (WebCore::ChromeClientBlackBerry::overflowExceedsContentsSize):
2959         (WebCore::ChromeClientBlackBerry::didDiscoverFrameSet):
2960         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2961         (WebCore::FrameLoaderClientBlackBerry::dispatchDidLayout):
2962         * WebKitSupport/FatFingers.cpp:
2963         (BlackBerry::WebKit::FatFingers::checkFingerIntersection):
2964         (BlackBerry::WebKit::FatFingers::findIntersectingRegions):
2965         (BlackBerry::WebKit::FatFingers::checkForText):
2966         * WebKitSupport/RenderQueue.cpp:
2967         (BlackBerry::WebKit::RenderQueue::addToRegularQueue):
2968         (BlackBerry::WebKit::RenderQueue::addToScrollZoomQueue):
2969         (BlackBerry::WebKit::RenderQueue::render):
2970         (BlackBerry::WebKit::RenderQueue::renderAllCurrentRegularRenderJobs):
2971         (BlackBerry::WebKit::RenderQueue::startRegularRenderJobBatchIfNeeded):
2972         (BlackBerry::WebKit::RenderQueue::renderVisibleZoomJob):
2973         (BlackBerry::WebKit::RenderQueue::renderVisibleScrollJob):
2974         (BlackBerry::WebKit::RenderQueue::renderRegularRenderJob):
2975         (BlackBerry::WebKit::RenderQueue::renderNonVisibleScrollJob):
2976         * WebKitSupport/SurfacePool.cpp:
2977         (BlackBerry::WebKit::SurfacePool::initialize):
2978
2979 2012-10-15  Xiaobo Wang  <xbwang@torchmobile.com.cn>
2980
2981         [BlackBerry] [DRT] Skip region of interest zooming when running DRT
2982         https://bugs.webkit.org/show_bug.cgi?id=97663
2983
2984         Reviewed by Rob Buis.
2985
2986         This patch fixes test fast/forms/textarea-scrolled-endline-caret.html, and
2987         1. Add a global function isRunningDrt to check if we're currently running DRT.
2988         2. Use the new function in places where getenv("drtRun") is used.
2989
2990         * Api/BlackBerryGlobal.cpp:
2991         (BlackBerry::WebKit::isRunningDrt):
2992         (WebKit):
2993         * Api/BlackBerryGlobal.h:
2994         (WebKit):
2995         * Api/WebPage.cpp:
2996         (BlackBerry::WebKit::WebPagePrivate::init):
2997         * WebKitSupport/DumpRenderTreeSupport.cpp:
2998         (toGeolocationClientMock):
2999         * WebKitSupport/InputHandler.cpp:
3000         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
3001
3002 2012-10-15  George Staikos  <staikos@webkit.org>
3003
3004         [BlackBerry] Adapt to Platform API changes in string handling
3005         https://bugs.webkit.org/show_bug.cgi?id=99248
3006
3007         Reviewed by Yong Li.
3008
3009         Convert usage of WebString, char* and std::string to BlackBerry::Platform::String.
3010
3011         * Api/BlackBerryGlobal.cpp:
3012         (BlackBerry::WebKit::clearAppCache):
3013         (BlackBerry::WebKit::clearDatabase):
3014         * Api/BlackBerryGlobal.h:
3015         (Platform):
3016         (WebKit):
3017         * Api/JavaScriptVariant.cpp:
3018         (BlackBerry::WebKit::JSValueRefToBlackBerryJavaScriptVariant):
3019         (BlackBerry::WebKit::BlackBerryJavaScriptVariantToJSValueRef):
3020         (BlackBerry::WebKit::JavaScriptVariant::JavaScriptVariant):
3021         (WebKit):
3022         (BlackBerry::WebKit::JavaScriptVariant::~JavaScriptVariant):
3023         (BlackBerry::WebKit::JavaScriptVariant::setType):
3024         (BlackBerry::WebKit::JavaScriptVariant::setString):
3025         (BlackBerry::WebKit::JavaScriptVariant::stringValue):
3026         * Api/JavaScriptVariant.h:
3027         * Api/WebAnimation.cpp:
3028         (BlackBerry::WebKit::WebAnimation::fadeAnimation):
3029         (BlackBerry::WebKit::WebAnimation::name):
3030         * Api/WebAnimation.h:
3031         * Api/WebCookieJar.cpp:
3032         (BlackBerry::WebKit::WebCookieJar::cookies):
3033         (BlackBerry::WebKit::WebCookieJar::setCookies):
3034         * Api/WebCookieJar.h:
3035         (Platform):
3036         (BlackBerry):
3037         (WebKit):
3038         * Api/WebKitMIMETypeConverter.cpp:
3039         (BlackBerry::WebKit::getExtensionForMimeType):
3040         (BlackBerry::WebKit::getMimeTypeForExtension):
3041         * Api/WebKitMIMETypeConverter.h:
3042         (Platform):
3043         (BlackBerry):
3044         (WebKit):
3045         * Api/WebKitTextCodec.cpp:
3046         (BlackBerry::WebKit::base64Decode):
3047         (BlackBerry::WebKit::base64Encode):
3048         (BlackBerry::WebKit::unescapeURL):
3049         (BlackBerry::WebKit::escapeURL):
3050         * Api/WebKitTextCodec.h:
3051         (Platform):
3052         (BlackBerry):
3053         * Api/WebOverlay.cpp:
3054         (BlackBerry::WebKit::WebOverlay::removeAnimation):
3055         * Api/WebOverlay.h:
3056         (Platform):
3057         (BlackBerry):
3058         (WebKit):
3059         * Api/WebOverlayOverride.cpp:
3060         (BlackBerry::WebKit::WebOverlayOverride::removeAnimation):
3061         * Api/WebOverlayOverride.h:
3062         (Platform):
3063         (BlackBerry):
3064         (WebKit):
3065         * Api/WebPage.cpp:
3066         (BlackBerry::WebKit::WebPage::autofillTextField):
3067         (BlackBerry::WebKit::WebPage::renderTreeAsText):
3068         (BlackBerry::WebKit::WebPage::WebPage):
3069         (BlackBerry::WebKit::WebPagePrivate::init):
3070         (BlackBerry::WebKit::WebPagePrivate::load):
3071         (BlackBerry::WebKit::WebPage::load):
3072         (BlackBerry::WebKit::WebPage::loadFile):
3073         (BlackBerry::WebKit::WebPage::download):
3074         (BlackBerry::WebKit::WebPagePrivate::loadString):
3075         (BlackBerry::WebKit::WebPage::loadString):
3076         (BlackBerry::WebKit::WebPagePrivate::executeJavaScript):
3077         (BlackBerry::WebKit::WebPage::executeJavaScript):
3078         (BlackBerry::WebKit::WebPagePrivate::executeJavaScriptInIsolatedWorld):
3079         (BlackBerry::WebKit::WebPage::executeJavaScriptInIsolatedWorld):
3080         (BlackBerry::WebKit::WebPage::executeJavaScriptFunction):
3081         (BlackBerry::WebKit::WebPagePrivate::addOriginAccessWhitelistEntry):
3082         (BlackBerry::WebKit::WebPage::addOriginAccessWhitelistEntry):
3083         (BlackBerry::WebKit::WebPagePrivate::removeOriginAccessWhitelistEntry):
3084         (BlackBerry::WebKit::WebPage::removeOriginAccessWhitelistEntry):
3085         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
3086         (BlackBerry::WebKit::WebPagePrivate::syncProxyCredential):
3087         (BlackBerry::WebKit::WebPagePrivate::notifyPopupAutofillDialog):
3088         (BlackBerry::WebKit::WebPagePrivate::webContext):
3089         (BlackBerry::WebKit::WebPage::setDateTimeInput):
3090         (BlackBerry::WebKit::WebPage::setColorInput):
3091         (BlackBerry::WebKit::WebPage::textEncoding):
3092         (BlackBerry::WebKit::WebPage::forcedTextEncoding):
3093         (BlackBerry::WebKit::WebPage::setForcedTextEncoding):
3094         (BlackBerry::WebKit::WebPage::title):
3095         (BlackBerry::WebKit::WebPage::selectedText):
3096         (BlackBerry::WebKit::WebPage::cutSelectedText):
3097         (BlackBerry::WebKit::WebPage::insertText):
3098         (BlackBerry::WebKit::WebPage::getBackForwardList):
3099         (BlackBerry::WebKit::WebPage::onCertificateStoreLocationSet):
3100         (BlackBerry::WebKit::WebPage::dispatchInspectorMessage):
3101         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
3102         (BlackBerry::WebKit::WebPage::textHasAttribute):
3103         (BlackBerry::WebKit::WebPage::setAllowNotification):
3104         (BlackBerry::WebKit::WebPagePrivate::defaultUserAgent):
3105         * Api/WebPage.h:
3106         * Api/WebPageClient.h:
3107         * Api/WebPage_p.h:
3108         (WebPagePrivate):
3109         * Api/WebSettings.cpp:
3110         (BlackBerry::WebKit::WebSettings::standardSettings):
3111         (BlackBerry::WebKit::WebSettings::addSupportedObjectPluginMIMEType):
3112         (BlackBerry::WebKit::WebSettings::isSupportedObjectMIMEType):
3113         (BlackBerry::WebKit::WebSettings::serifFontFamily):
3114         (BlackBerry::WebKit::WebSettings::setSerifFontFamily):
3115         (BlackBerry::WebKit::WebSettings::fixedFontFamily):
3116         (BlackBerry::WebKit::WebSettings::setFixedFontFamily):
3117         (BlackBerry::WebKit::WebSettings::sansSerifFontFamily):
3118         (BlackBerry::WebKit::WebSettings::setSansSerifFontFamily):
3119         (BlackBerry::WebKit::WebSettings::standardFontFamily):
3120         (BlackBerry::WebKit::WebSettings::setStandardFontFamily):
3121         (BlackBerry::WebKit::WebSettings::userAgentString):
3122         (BlackBerry::WebKit::WebSettings::setUserAgentString):
3123         (BlackBerry::WebKit::WebSettings::defaultTextEncodingName):
3124         (BlackBerry::WebKit::WebSettings::setDefaultTextEncodingName):
3125         (BlackBerry::WebKit::WebSettings::userStyleSheetString):
3126         (BlackBerry::WebKit::WebSettings::setUserStyleSheetString):
3127         (BlackBerry::WebKit::WebSettings::userStyleSheetLocation):
3128         (BlackBerry::WebKit::WebSettings::setUserStyleSheetLocation):
3129         (BlackBerry::WebKit::WebSettings::localStoragePath):
3130         (BlackBerry::WebKit::WebSettings::setLocalStoragePath):
3131         (BlackBerry::WebKit::WebSettings::indexedDataBasePath):
3132         (BlackBerry::WebKit::WebSettings::setIndexedDataBasePath):
3133         (BlackBerry::WebKit::WebSettings::databasePath):
3134         (BlackBerry::WebKit::WebSettings::setDatabasePath):
3135         (BlackBerry::WebKit::WebSettings::appCachePath):
3136         (BlackBerry::WebKit::WebSettings::setAppCachePath):
3137         (BlackBerry::WebKit::WebSettings::pageGroupName):
3138         (BlackBerry::WebKit::WebSettings::setPageGroupName):
3139         * Api/WebSettings.h:
3140         * Api/WebString.cpp: Removed.
3141         * Api/WebString.h: Removed.
3142         * WebCoreSupport/ChromeClientBlackBerry.cpp:
3143         (WebCore::ChromeClientBlackBerry::runJavaScriptPrompt):
3144         (WebCore::ChromeClientBlackBerry::createWindow):
3145         (WebCore::ChromeClientBlackBerry::runOpenPanel):
3146         (WebCore):
3147         * WebCoreSupport/ChromeClientBlackBerry.h:
3148         (ChromeClientBlackBerry):
3149         * WebCoreSupport/ClientExtension.cpp:
3150         (clientExtensionMethod):
3151         * WebCoreSupport/ColorPickerClient.cpp:
3152         (WebCore::ColorPickerClient::ColorPickerClient):
3153         (WebCore::ColorPickerClient::generateHTML):
3154         * WebCoreSupport/ColorPickerClient.h:
3155         (Platform):
3156         (BlackBerry):
3157         (WebKit):
3158         (ColorPickerClient):
3159         * WebCoreSupport/CredentialManager.cpp:
3160         (WebCore::CredentialManager::autofillAuthenticationChallenge):
3161         * WebCoreSupport/CredentialManager.h:
3162         (Platform):
3163         (CredentialManager):
3164         * WebCoreSupport/DatePickerClient.cpp:
3165         (WebCore::DatePickerClient::DatePickerClient):
3166         (WebCore::DatePickerClient::generateHTML):
3167         * WebCoreSupport/DatePickerClient.h:
3168         (Platform):
3169         (BlackBerry):
3170         (WebKit):
3171         (DatePickerClient):
3172         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3173         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForResponse):
3174         (WebCore::FrameLoaderClientBlackBerry::createDocumentLoader):
3175         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFinishLoad):
3176         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad):
3177         (WebCore::FrameLoaderClientBlackBerry::dispatchCreatePage):
3178         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendRequest):
3179         (WebCore::FrameLoaderClientBlackBerry::loadIconExternally):
3180         (WebCore::FrameLoaderClientBlackBerry::startDownload):
3181         (WebCore::FrameLoaderClientBlackBerry::dispatchDidReceiveIcon):
3182         * WebCoreSupport/IconDatabaseClientBlackBerry.cpp:
3183         * WebCoreSupport/NotificationPresenterImpl.cpp:
3184         (WebCore::NotificationPresenterImpl::show):
3185         (WebCore::NotificationPresenterImpl::cancel):
3186         (WebCore::NotificationPresenterImpl::requestPermission):
3187         (WebCore::NotificationPresenterImpl::onPermission):
3188         (WebCore::NotificationPresenterImpl::notificationClicked):
3189         * WebCoreSupport/NotificationPresenterImpl.h:
3190         (Platform):
3191         (NotificationPresenterImpl):
3192         * WebCoreSupport/SelectPopupClient.cpp:
3193         (WebCore::SelectPopupClient::SelectPopupClient):
3194         (WebCore::SelectPopupClient::update):
3195         (WebCore::SelectPopupClient::generateHTML):
3196         * WebCoreSupport/SelectPopupClient.h:
3197         (Platform):
3198         (BlackBerry):
3199         (SelectPopupClient):
3200         * WebCoreSupport/UserMediaClientImpl.cpp:
3201         (WebCore::toMediaStreamSource):
3202         (WebCore::toMediaStreamDescriptor):
3203         (WebCore::UserMediaClientImpl::requestUserMedia):
3204         (WebCore::UserMediaClientImpl::cancelUserMediaRequest):
3205         * WebKitSupport/AboutData.cpp:
3206         (BlackBerry::WebKit::cachePage):
3207         * WebKitSupport/InputHandler.cpp:
3208         (BlackBerry::WebKit::convertStringToWchar):
3209         (BlackBerry::WebKit::convertStringToWcharVector):
3210         (BlackBerry::WebKit::convertSpannableStringToString):
3211         (BlackBerry::WebKit::InputHandler::learnText):
3212         (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
3213         (BlackBerry::WebKit::InputHandler::openDatePopup):
3214         (BlackBerry::WebKit::InputHandler::openSelectPopup):
3215         (BlackBerry::WebKit::InputHandler::setText):
3216         * WebKitSupport/SelectionHandler.cpp:
3217         (BlackBerry::WebKit::SelectionHandler::selectedText):
3218         * WebKitSupport/SelectionHandler.h:
3219         (Platform):
3220         (WebKit):
3221         (SelectionHandler):
3222         * WebKitSupport/SurfacePool.cpp:
3223         (BlackBerry::WebKit::SurfacePool::sharedPixmapGroup):
3224         * WebKitSupport/SurfacePool.h:
3225         (SurfacePool):
3226
3227 2012-10-15  Antonio Gomes  <agomes@rim.com>
3228
3229         [BlackBerry] Clean up BackingStoreClient (part II)
3230         https://bugs.webkit.org/show_bug.cgi?id=99327
3231
3232         Reviewed by Yong Li.
3233
3234         Remove more unneeded BackingStoreClient <-> WebPageClient integration
3235         methods:
3236         - BackingStoreClient* backingStoreClientForFrame(...)
3237         - void addBackingStoreClientForFrame(...)
3238         - void removeBackingStoreClientForFrame(...)
3239
3240         Change places calling WPPriv::backingStoreClientForFrame to directly
3241         access WPPriv::backingStoreClient instead, since only the main frame will
3242         have a BackingStoreClient instance associated with it, and it is owned by
3243         the WKPriv.
3244
3245         Remove non-mainframe only references to BackingStoreClient completely,
3246         since it is dead code now.
3247
3248         * Api/InRegionScroller.cpp:
3249         (BlackBerry::WebKit::InRegionScrollerPrivate::setLayerScrollPosition):
3250         * Api/WebPage.cpp:
3251         (BlackBerry::WebKit::WebPagePrivate::backingStoreClient):
3252         (BlackBerry::WebKit::WebPage::destroy):
3253         * Api/WebPage_p.h:
3254         (WebPagePrivate):
3255         * WebCoreSupport/ChromeClientBlackBerry.cpp:
3256         (WebCore::ChromeClientBlackBerry::invalidateContentsForSlowScroll):
3257         (WebCore::ChromeClientBlackBerry::scroll):
3258         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3259         (WebCore::FrameLoaderClientBlackBerry::transitionToCommittedForNewPage):
3260         (WebCore::FrameLoaderClientBlackBerry::createFrame):
3261         (WebCore::FrameLoaderClientBlackBerry::detachedFromParent2):
3262         * WebKitSupport/BackingStoreClient.cpp:
3263         (BlackBerry::WebKit::BackingStoreClient::create):
3264         (BlackBerry::WebKit::BackingStoreClient::BackingStoreClient):
3265         (BlackBerry::WebKit::BackingStoreClient::~BackingStoreClient):
3266         * WebKitSupport/BackingStoreClient.h:
3267         (BackingStoreClient):
3268         * WebKitSupport/InputHandler.cpp:
3269         (BlackBerry::WebKit::InputHandler::setBatchEditingActive):
3270
3271 2012-10-15  Antonio Gomes  <agomes@rim.com>
3272
3273         [BlackBerry] Clean up BackingStoreClient (part I)
3274         https://bugs.webkit.org/show_bug.cgi?id=99327
3275
3276         Reviewed by Yong Li.
3277
3278         Now that we won't use the BackingStoreClient code path to scroll inner frames at all
3279         (instead we use AC layers!), we can remove all "!isMainFrame" code paths.
3280
3281         No behavior change, since the code path being removed was not in use.
3282
3283         * WebKitSupport/BackingStoreClient.cpp:
3284         (BlackBerry::WebKit::BackingStoreClient::absoluteRect):
3285         (BlackBerry::WebKit::BackingStoreClient::transformedActualVisibleSize):
3286         (BlackBerry::WebKit::BackingStoreClient::viewportSize):
3287         (BlackBerry::WebKit::BackingStoreClient::transformedViewportSize):
3288         (BlackBerry::WebKit::BackingStoreClient::visibleContentsRect):
3289         (BlackBerry::WebKit::BackingStoreClient::transformedVisibleContentsRect):
3290         (BlackBerry::WebKit::BackingStoreClient::checkOriginOfCurrentScrollOperation):
3291
3292 2012-10-13  Jakob Petsovits  <jpetsovits@rim.com>
3293
3294         [BlackBerry] Fetch blit rects from a viewport accessor
3295         https://bugs.webkit.org/show_bug.cgi?id=98581
3296         RIM PR 173292
3297
3298         Reviewed by George Staikos.
3299         Internally reviewed by Arvid Nilsson.
3300
3301         The long-standing userInterfaceBlittedVisibleContentsRect()
3302         method in WebPageClient has long been a major annoyance,
3303         as it returns the source rect for WebKit contents but in
3304         backingstore pixel coordinates. This makes it not only
3305         unwieldy but also terribly fragile, especially when
3306         both pinch zoom and a backingstore re-render both deal
3307         with the same rectangle. On different threads, even.
3308
3309         BlackBerry::Platform now exposes a ViewportAccessor
3310         interface, which can be used to get the various rects
3311         in document coordinates or target pixel coordinates,
3312         both being a better choice than the ones dependent
3313         on an implentation detail.
3314
3315         This commit makes use of this new functionality.
3316         Instead of relying on the passed rectangle to contain
3317         implicit information about the scale factor, we now
3318         track the scale of each backingstore geometry by making
3319         a snapshot of the current WebKit-thread scale when the
3320         geometry is generated. Once the geometry is swapped to
3321         the front, we can then calculate the remaining
3322         backingstore-to-viewport transformation in a threadsafe
3323         way. We now only calculate this if we actually blit from
3324         backingstore tiles and don't go through a configuration
3325         of pure accelerated compositing.
3326
3327         As a result, we are now a lot more robust against
3328         synchonization issues related to backingstore
3329         geometry changes. As an additional gimmick, the scale
3330         is also stored with each tile buffer to doubly secure
3331         that a tile rendered in one scale is not transferred
3332         to a different geometry and then rendered there without
3333         being rerendered at the new scale, even if the rendered
3334         pixel coordinates are still the same.
3335
3336         Having per-geometry scale information also opens up
3337         opportunities to further improve backingstore rendering
3338         later. For instance, we could pre-render a low-res
3339         version of the page onto one buffer and combine that one
3340         with a higher-res array of tiles covering a smaller area.
3341         Or we could steal some tiles from the front geometry to
3342         render them at a new scale while a pinch-zoom operation
3343         is in progress.
3344
3345         No such thing is implemented in this patch though.
3346
3347         In adapting/fixing the backingstore visualization
3348         debug mode and the default background painting in
3349         renderDirectToWindow(), we also introduce new
3350         ViewportAccessor subclasses that can subsequently
3351         be used to replace methods from WebPage and elsewhere.
3352
3353         * Api/BackingStore.cpp:
3354         (BlackBerry::WebKit::BackingStorePrivate::slowScroll):
3355         (BlackBerry::WebKit::BackingStorePrivate::scroll):
3356         (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect):
3357         (BlackBerry::WebKit::BackingStorePrivate::scrollBackingStore):
3358         (BlackBerry::WebKit::BackingStorePrivate::renderDirectToWindow):
3359         (BlackBerry::WebKit::BackingStorePrivate::render):
3360         (BlackBerry::WebKit::BackingStorePrivate::paintDefaultBackground):
3361         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
3362         (BlackBerry::WebKit::BackingStorePrivate::blitHorizontalScrollbar):
3363         (BlackBerry::WebKit::BackingStorePrivate::blitVerticalScrollbar):
3364         (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion):
3365         (BlackBerry::WebKit::BackingStorePrivate::updateTileMatrixIfNeeded):
3366         (BlackBerry::WebKit::BackingStorePrivate::orientationChanged):
3367         (BlackBerry::WebKit::BackingStorePrivate::createSurfaces):
3368         (BlackBerry::WebKit::BackingStorePrivate::invalidateWindow):
3369         * Api/BackingStore_p.h:
3370         (BlackBerry):
3371         (Platform):
3372         (BlackBerry::WebKit::BackingStoreGeometry::BackingStoreGeometry):
3373         (BlackBerry::WebKit::BackingStoreGeometry::scale):
3374         (BlackBerry::WebKit::BackingStoreGeometry::setScale):
3375         (BackingStoreGeometry):
3376         (BackingStorePrivate):
3377         * Api/WebPage.cpp:
3378         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
3379         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
3380         (BlackBerry::WebKit::WebPagePrivate::init):
3381         (BlackBerry::WebKit::WebPage::webkitThreadViewportAccessor):
3382         (WebKit):
3383         * Api/WebPage.h:
3384         (Platform):
3385         * Api/WebPageClient.h:
3386         (Platform):
3387         * Api/WebPageCompositor.cpp:
3388         (BlackBerry::WebKit::WebPageCompositorPrivate::animationFrameChanged):
3389         * Api/WebPage_p.h:
3390         (WebKit):
3391         (WebPagePrivate):
3392         * WebKitSupport/BackingStoreTile.cpp:
3393         (BlackBerry::WebKit::TileBuffer::TileBuffer):
3394         (BlackBerry::WebKit::TileBuffer::isRendered):
3395         * WebKitSupport/BackingStoreTile.h:
3396         (TileBuffer):
3397         (BlackBerry::WebKit::TileBuffer::scale):
3398         (BlackBerry::WebKit::TileBuffer::setScale):
3399         * WebKitSupport/BackingStoreVisualizationViewportAccessor.cpp: Added.
3400         (WebKit):
3401         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::BackingStoreVisualizationViewportAccessor):
3402         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::pixelContentsSize):
3403         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::documentContentsSize):
3404         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::pixelScrollPosition):
3405         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::documentScrollPosition):
3406         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::pixelViewportSize):
3407         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::documentViewportSize):
3408         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::destinationSurfaceOffset):
3409         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::scale):
3410         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::state):
3411         * WebKitSupport/BackingStoreVisualizationViewportAccessor.h: Added.
3412         (BlackBerry):
3413         (Platform):
3414         (WebKit):
3415         (BackingStoreVisualizationViewportAccessor):
3416         (BlackBerry::WebKit::BackingStoreVisualizationViewportAccessor::~BackingStoreVisualizationViewportAccessor):
3417         * WebKitSupport/WebKitThreadViewportAccessor.cpp: Added.
3418         (WebKit):
3419         (BlackBerry::WebKit::WebKitThreadViewportAccessor::WebKitThreadViewportAccessor):
3420         (BlackBerry::WebKit::WebKitThreadViewportAccessor::pixelContentsSize):
3421         (BlackBerry::WebKit::WebKitThreadViewportAccessor::documentContentsSize):
3422         (BlackBerry::WebKit::WebKitThreadViewportAccessor::pixelScrollPosition):
3423         (BlackBerry::WebKit::WebKitThreadViewportAccessor::documentScrollPosition):
3424         (BlackBerry::WebKit::WebKitThreadViewportAccessor::pixelViewportSize):
3425         (BlackBerry::WebKit::WebKitThreadViewportAccessor::documentViewportSize):
3426         (BlackBerry::WebKit::WebKitThreadViewportAccessor::destinationSurfaceOffset):
3427         (BlackBerry::WebKit::WebKitThreadViewportAccessor::scale):
3428         * WebKitSupport/WebKitThreadViewportAccessor.h: Added.
3429         (BlackBerry):
3430         (Platform):
3431         (WebKit):
3432         (WebKitThreadViewportAccessor):
3433         (BlackBerry::WebKit::WebKitThreadViewportAccessor::~WebKitThreadViewportAccessor):
3434
3435 2012-10-11  Peter Wang  <peter.wang@torchmobile.com.cn>
3436
3437         [BlackBerry] Paused in Inspector, Browser doesn't exit cleanly
3438         https://bugs.webkit.org/show_bug.cgi?id=97962
3439
3440         Reviewed by George Staikos.
3441
3442         Before destroying webpage, close the inspector, so if the JSC is paused it will be resumed.
3443
3444         * Api/WebPage.cpp:
3445         (BlackBerry::WebKit::WebPage::destroy):
3446
3447 2012-10-11  Konrad Piascik  <kpiascik@rim.com>
3448
3449         Web Inspector: node search does not work with elements on touch start listener
3450         https://bugs.webkit.org/show_bug.cgi?id=95252
3451
3452         Reviewed by Pavel Feldman.
3453
3454         Removed calls to InspectorInstrumentation that no didn't work anyway.
3455
3456         * Api/WebPage.cpp:
3457         (BlackBerry::WebKit::WebPage::touchEvent):
3458
3459 2012-10-11  Chris Guan  <chris.guan@torchmobile.com.cn>
3460
3461         [Blackberry] makes NavigatorContentUtils work
3462         https://bugs.webkit.org/show_bug.cgi?id=99022
3463