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