Redo spellchecking of a field if the layout has changed
[WebKit-https.git] / Source / WebKit / blackberry / ChangeLog
1 2013-04-16  Nima Ghanavatian  <nghanavatian@blackberry.com>
2
3         Redo spellchecking of a field if the layout has changed
4         https://bugs.webkit.org/show_bug.cgi?id=114700
5
6         Reviewed by Rob Buis.
7         Internally reviewed by Mike Fenton.
8
9         PR258637
10         If we insert a child node during spellchecking, the current request along
11         with the requests in queue become stale. The offsets were calculated when
12         they were created are no longer valid. We clear the queue by setting sequence
13         id to -1 and trigger spell checking again. We only trigger re-checking
14         if the layout change occurred during processing of a request. This is
15         maintained with the m_request pointer as it should be cleared after use.
16
17         * Api/WebPage.cpp:
18         (BlackBerry::WebKit::WebPagePrivate::layoutFinished):
19         * WebCoreSupport/EditorClientBlackBerry.cpp:
20         (WebCore::EditorClientBlackBerry::requestCheckingOfString):
21         * WebKitSupport/InputHandler.cpp:
22         (BlackBerry::WebKit::InputHandler::requestCheckingOfString):
23         (BlackBerry::WebKit::InputHandler::spellCheckingRequestCancelled):
24         (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
25         (BlackBerry::WebKit::InputHandler::setElementFocused):
26         (BlackBerry::WebKit::InputHandler::spellCheckTextBlock):
27         (WebKit):
28         (BlackBerry::WebKit::InputHandler::stopPendingSpellCheckRequests):
29         * WebKitSupport/InputHandler.h:
30         (InputHandler):
31
32 2013-04-16  Jacky Jiang  <zhajiang@blackberry.com>
33
34         [BlackBerry] Viewport not rendered correctly
35         https://bugs.webkit.org/show_bug.cgi?id=114704
36
37         Reviewed by Rob Buis.
38         Internally reviewed by Konrad Piascik.
39
40         PR: 326260
41         The applyDeviceScaleFactorInCompositor setting is now generated from
42         Settings.in after rebase, the setter should be setApplyDeviceScaleFactorInCompositor()
43         instead of setApplyPageScaleFactorInCompositor().
44         The setting can be removed from WebSettings and use a simpler way
45         instead in the future if there are no issues when TextAutoSizer is
46         enabled. Just keep it for now.
47
48         * Api/WebPage.cpp:
49         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
50         * Api/WebSettings.cpp:
51         (BlackBerry::WebKit::WebSettings::setApplyDeviceScaleFactorInCompositor):
52         * Api/WebSettings.h:
53
54 2013-04-16  Leo Yang  <leoyang@rim.com>
55
56         [BlackBerry] Update WebPage.{h, cpp} for supporting web filesystem
57         https://bugs.webkit.org/show_bug.cgi?id=114698
58
59         Reviewed by Rob Buis.
60
61         * Api/WebPage.cpp:
62         (BlackBerry::WebKit::WebPagePrivate::init):
63         (BlackBerry::WebKit::WebPage::clearBrowsingData):
64         (BlackBerry::WebKit::WebPage::clearWebFileSystem):
65         (WebKit):
66         * Api/WebPage.h:
67
68 2013-04-16  Arvid Nilsson  <anilsson@rim.com>
69
70         [BlackBerry] Accelerated animation regression with GL renderer
71         https://bugs.webkit.org/show_bug.cgi?id=114685
72
73         Reviewed by Rob Buis.
74
75         Internally reviewed by Filip Spacek.
76
77         GL renderer changed the assumption made in accelerated animation
78         code that rendering the contents of AC layer tiles would be the
79         slow operation. By starting animations after the slow operation,
80         the appearance of the animation could be made smooth.
81
82         Rendering tiles may still be slow, but now something else can be
83         slow too: drawing display lists to backing. And it's running on
84         the compositing thread, can happen at any time and will interrupt
85         accelerated animations.
86
87         Improved the situation by calling an API for updating backing to
88         schedule the delay at a convenient time. We try to update backing
89         before starting animations. However, future backing updates can
90         still interrupt the running animation and cause dropped frames.
91
92         Further improvements to animation smoothness will probably require
93         optimizations in the GL renderer.
94
95         * Api/WebPage.cpp:
96         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
97         (BlackBerry::WebKit::WebPagePrivate::commitRootLayer):
98         (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
99         * Api/WebPage_p.h:
100         (WebPagePrivate):
101         * WebKitSupport/FrameLayers.cpp:
102         (BlackBerry::WebKit::FrameLayers::notifyAnimationsStarted):
103         (WebKit):
104         * WebKitSupport/FrameLayers.h:
105         (FrameLayers):
106
107 2013-04-15  Liam Quinn  <lquinn@blackberry.com>
108
109         [BlackBerry] Crash from null m_webSettings in WebPagePrivate
110         https://bugs.webkit.org/show_bug.cgi?id=114633
111         RIM PR 303745
112
113         Reviewed by Rob Buis.
114         Internally reviewed by Leo Yang.
115
116         Speculative fix suggested by George Staikos--initialize m_webSettings first thing in the init() method.
117
118         * Api/WebPage.cpp:
119         (BlackBerry::WebKit::WebPagePrivate::init):
120
121 2013-04-15  Andy Chen  <andchen@blackberry.com>
122
123         [BlackBerry] Forward userGesture when creating a new window
124         https://bugs.webkit.org/show_bug.cgi?id=114622
125
126         Reviewed by Rob Buis.
127
128         Client could use this info to decide whether the popup should
129         be blocked.
130         PR 291898
131         Reviewed internally by Mike Fenton
132
133         * Api/WebPageClient.h:
134         * WebCoreSupport/ChromeClientBlackBerry.cpp:
135         (WebCore::ChromeClientBlackBerry::createWindow):
136         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
137         (WebCore::FrameLoaderClientBlackBerry::dispatchCreatePage):
138
139 2013-04-15  Xan Lopez  <xlopez@igalia.com>
140
141         [BlackBerry] ASSERT in StyleResolver::ensureScopeResolver()
142         https://bugs.webkit.org/show_bug.cgi?id=114615
143
144         Reviewed by Carlos Garcia Campos.
145
146         Add a method to enable the style scoped feature to our
147         DumpRenderTreeSupport class.
148
149         * WebKitSupport/DumpRenderTreeSupport.cpp:
150         (DumpRenderTreeSupport::setStyleScopedEnabled):
151         * WebKitSupport/DumpRenderTreeSupport.h:
152         (DumpRenderTreeSupport):
153
154 2013-04-12  Yongxin Dai  <yodai@rim.com>
155
156         [BlackBerry] Enable selecting text in single line input field without selection point being actually on the targeted text vertically
157         https://bugs.webkit.org/show_bug.cgi?id=114515
158
159         Reviewed by Rob Buis.
160
161         PR #317924.
162         Internally reviewed by Mike Fenton.
163
164         It was still hard to select text in URL bar with an inverted selection handle.
165         We improve the issue by replacing the Y coordinate of selection point with Y
166         coordinate of start caret for single line input filed. Thus, the Y coordinate
167         is always valid regardless of the actual location of the selection handle.
168
169         * WebKitSupport/SelectionHandler.cpp:
170         (BlackBerry::WebKit::SelectionHandler::setSelection):
171         (BlackBerry::WebKit::SelectionHandler::startCaretViewportRect):
172         (WebKit):
173         (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
174         * WebKitSupport/SelectionHandler.h:
175         (SelectionHandler):
176
177 2013-04-12  Carlos Garcia Campos  <cgarcia@igalia.com>
178
179         [BlackBerry] Crash running layout tests
180         https://bugs.webkit.org/show_bug.cgi?id=114503
181
182         Reviewed by Xan Lopez.
183
184         Hit an assertion in ~GuardedPointerBase when DRT is
185         deleted. DumpRenderTree class derives from
186         BlackBerry::Platform::LayoutTestClient that derives from
187         BlackBerry::Platform::GuardedPointerBase, so the DRT pointer
188         should no be released with delete but with
189         BlackBerry::Platform::deleteGuardedObject().
190
191         * Api/WebPage.cpp:
192         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
193
194 2013-04-12  Carlos Garcia Campos  <cgarcia@igalia.com>
195
196         [BlackBerry] Crash running layout tests when WebPage is destroyed
197         https://bugs.webkit.org/show_bug.cgi?id=114497
198
199         Reviewed by Xan Lopez.
200
201         PR 324649
202         Internally reviewed by Konrad Piascik and Rob Buis.
203
204         Use a bool member to keep track of whether the inspector is
205         enabled or not instead of relaying on the enable developer extras
206         setting, that can be set in other places than enableWebInspector().
207
208         * Api/WebPage.cpp:
209         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): Initialize
210         m_inspectorEnabled.
211         (BlackBerry::WebKit::WebPage::enableWebInspector): Return early if
212         inspector is already enabled and set m_inspectorEnabled to true.
213         (BlackBerry::WebKit::WebPage::disableWebInspector): Return early
214         if inspector is not enabled and set m_inspectorEnabled to false.
215         (BlackBerry::WebKit::WebPage::isWebInspectorEnabled): Check the
216         current value of m_inspectorEnabled instead of the developer
217         extras setting.
218         * Api/WebPage_p.h:
219         (WebPagePrivate): Add m_inspectorEnabled.
220
221 2013-04-11  Jacky Jiang  <zhajiang@rim.com>
222
223         [BlackBerry] Initial scale changes depending on the order of page navigations
224         https://bugs.webkit.org/show_bug.cgi?id=114448
225
226         Reviewed by Rob Buis.
227
228         PR: 323941
229         During page transitions, absoluteVisibleOverflowSize() and contentsSize()
230         in fixedLayoutSize() were based on the old page when we just started or
231         committed provisinal load. In that case, fixedLayoutSize() is very old
232         page dependent and can cause inconsistent behaviors. For example, if
233         the old page contents width is 4000, we will get DEFAULT_MAX_LAYOUT_WIDTH 1024
234         as the new page's fixedLayoutSize; however, we will get 768 if we
235         navigate to the new page directly.
236         To fix that, return default layout size if the page doesn't have
237         virtual viewport and m_loadState is Provisional.
238
239         * Api/WebPage.cpp:
240         (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize):
241
242 2013-04-11  Arvid Nilsson  <anilsson@rim.com>
243
244         [BlackBerry] LayerTexture refactoring
245         https://bugs.webkit.org/show_bug.cgi?id=114276
246
247         Reviewed by Carlos Garcia Campos.
248
249         Adapt to the LayerTexture refactoring down in WebCore.
250
251         PR 322882
252
253         * Api/WebOverlay.cpp:
254         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded):
255         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::drawTextures):
256
257 2013-04-10  Arvid Nilsson  <anilsson@rim.com>
258
259         [BlackBerry] Rename BlackBerry specific Texture class
260         https://bugs.webkit.org/show_bug.cgi?id=95781
261
262         Reviewed by Rob Buis.
263
264         Texture was a bit too generic and prone to name conflicts. Renamed it
265         to LayerTexture.
266
267         PR 322882
268
269         * Api/WebOverlay.cpp:
270         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded):
271         * Api/WebOverlay_p.h:
272         (WebOverlayLayerCompositingThreadClient):
273
274 2013-04-08  Anders Carlsson  <andersca@apple.com>
275
276         Remove unneeded headers from FrameLoader.h
277         https://bugs.webkit.org/show_bug.cgi?id=114223
278
279         Reviewed by Geoffrey Garen.
280
281         Include HistoryController.h from WebCore.
282
283         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
284
285 2013-04-09  Geoffrey Garen  <ggaren@apple.com>
286
287         Removed bitrotted TimeoutChecker code
288         https://bugs.webkit.org/show_bug.cgi?id=114336
289
290         Reviewed by Alexey Proskuryakov.
291
292         * Api/WebPage.cpp:
293         (BlackBerry::WebKit::WebPage::setTimeoutForJavaScriptExecution):
294
295 2013-04-09  Jacky Jiang  <zhajiang@rim.com>
296
297         [BlackBerry] Main page is rendered at wrong large scale after back from any zooming article at read.thestar.com
298         https://bugs.webkit.org/show_bug.cgi?id=114296
299
300         Reviewed by Rob Buis.
301
302         PR: 308655
303         We were relying on the load state Committed to reset m_userPerformedManualZoom
304         and m_userPerformedManualScroll; however, the main resources of the
305         articles on read.thestar.com were preloaded and the WebPage didn't get
306         any load state change callbacks when going back to the main page from
307         the articles. Therefore, m_userPerformedManualZoom had never been reset
308         in this case and we picked up the wrong scale when restoring the main page.
309         Rset m_userPerformedManualScroll and m_userPerformedManualScroll when
310         we are going back or forward.
311
312         * Api/WebPage.cpp:
313         (BlackBerry::WebKit::WebPage::goBackOrForward):
314
315 2013-04-09  Alberto Garcia  <agarcia@igalia.com>
316
317         [BlackBerry] InputHandler: fix calls to HTMLInputElement methods
318         https://bugs.webkit.org/show_bug.cgi?id=114283
319
320         Reviewed by Rob Buis.
321
322         Fix calls with wrong names.
323
324         * WebKitSupport/InputHandler.cpp:
325         (BlackBerry::WebKit::convertInputType):
326
327 2013-04-08  Benjamin Poulain  <benjamin@webkit.org>
328
329         Remove HTML Notification
330         https://bugs.webkit.org/show_bug.cgi?id=114231
331
332         Reviewed by Ryosuke Niwa.
333
334         * WebCoreSupport/AboutDataEnableFeatures.in:
335
336 2013-04-08  Alberto Garcia  <agarcia@igalia.com>
337
338         [BlackBerry] WebPage: fix build due to type mismatches
339         https://bugs.webkit.org/show_bug.cgi?id=114148
340
341         Reviewed by Darin Adler.
342
343         Add explicit conversions between LayoutUnit and int, and between
344         LayoutRect and IntRect.
345
346         * Api/WebPage.cpp:
347         (BlackBerry::WebKit::WebPagePrivate::rectForNode):
348
349 2013-04-08  Jeff Rogers  <jrogers@rim.com>
350
351         [BlackBerry] Update BlackBerry JavaScript API
352         https://bugs.webkit.org/show_bug.cgi?id=114065
353
354         Reviewed by Rob Buis.
355
356         Internal PR 317350
357         Add new API for determining if user gesture is being processed.
358         Remove obsolete files.
359         Properly expose JSC global context.
360
361         * Api/WebPage.cpp:
362         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
363         (BlackBerry::WebKit::WebPage::executeJavaScriptFunction):
364         (BlackBerry::WebKit::WebPage::globalContext):
365         (BlackBerry::WebKit::WebPage::isProcessingUserGesture):
366         (WebKit):
367         * Api/WebPage.h:
368         * Api/WebPageClient.h:
369         * Api/WebPage_p.h:
370         (WebPagePrivate):
371         * WebCoreSupport/ChromeClientBlackBerry.cpp:
372         * WebCoreSupport/ChromeClientBlackBerry.h:
373         (ChromeClientBlackBerry):
374         * WebCoreSupport/ClientExtension.cpp: Removed.
375         * WebCoreSupport/ClientExtension.h: Removed.
376         * WebCoreSupport/ExternalExtension.cpp: Removed.
377         * WebCoreSupport/ExternalExtension.h: Removed.
378         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
379         (WebCore::FrameLoaderClientBlackBerry::dispatchDidClearWindowObjectInWorld):
380
381 2013-04-08  Jakob Petsovits  <jpetsovits@blackberry.com>
382
383         [BlackBerry] More null checks for m_mainFrame
384         https://bugs.webkit.org/show_bug.cgi?id=114172
385
386         Reviewed by Rob Buis.
387
388         After r147744, some unit tests were crashing on WebPage
389         shutdown, because BackingStorePrivate::repaint() now uses
390         pixelContentsRect() (accessing m_webPage->contentsRect())
391         instead of BackingStoreClient::contentsRect(). In m_webPage,
392         m_mainFrame had already been set to 0.
393
394         Make us more robust against these errors by checking
395         the existence of m_mainFrame more diligently.
396
397         * Api/WebPage.cpp:
398         (BlackBerry::WebKit::WebPagePrivate::shouldZoomAboutPoint):
399         (BlackBerry::WebKit::WebPagePrivate::shouldSendResizeEvent):
400         (BlackBerry::WebKit::WebPagePrivate::contentsSize):
401         (BlackBerry::WebKit::WebPagePrivate::absoluteVisibleOverflowSize):
402         (BlackBerry::WebKit::WebPagePrivate::setViewMode):
403
404 2013-04-08  Iris Wu  <shuwu@blackberry.com>
405
406         [BlackBerry] Force horizontal list to be horizontal scrollable.
407         https://bugs.webkit.org/show_bug.cgi?id=114173
408
409         Reviewed by Rob Buis.
410
411         Force content to be horizontal/vertical overscrollable if it
412         scrolls in horizontal/vertical way.
413
414         PR 237440
415         Internally Reviewed by Arvid Nilsson.
416
417         * WebKitSupport/InRegionScrollableArea.cpp:
418         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
419
420 2013-04-08  Alberto Garcia  <agarcia@igalia.com>
421
422         [BlackBerry] WebPage: misc build fixes
423         https://bugs.webkit.org/show_bug.cgi?id=114152
424
425         Reviewed by Carlos Garcia Campos.
426
427         * Api/WebPage.cpp:
428         (BlackBerry::WebKit::WebPagePrivate::shouldPluginEnterFullScreen):
429         (BlackBerry::WebKit::WebPagePrivate::didPluginExitFullScreen):
430         (BlackBerry::WebKit::WebPagePrivate::onPluginStartBackgroundPlay):
431         (BlackBerry::WebKit::WebPagePrivate::onPluginStopBackgroundPlay):
432         Remove unused parameters.
433
434         (BlackBerry::WebKit::WebPagePrivate::zoomAnimationFinished):
435         (BlackBerry::WebKit::WebPage::blockZoom):
436         Replace TAAUTO with TASTART (this changed in r120495).
437
438         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
439         Rename m_fullscreenVideoNode to m_fullscreenNode (this changed in
440         r142220).
441
442         (BlackBerry::WebKit::WebPagePrivate::compositorDrawsRootLayer):
443         Rename paintingGoesToWindow() to paintsIntoWindow() (this changed in
444         r113514).
445
446 2013-04-07  David Kilzer  <ddkilzer@apple.com>
447
448         Remove the rest of SVG_DOM_OBJC_BINDINGS
449         <http://webkit.org/b/114112>
450
451         Reviewed by Geoffrey Garen.
452
453         * WebCoreSupport/AboutDataEnableFeatures.in:
454         - Remove reference to SVG_DOM_OBJC_BINDINGS.
455
456 2013-04-06  Zan Dobersek  <zdobersek@igalia.com>
457
458         Remove the USE(SKIA_ON_MAC_CHROMIUM) guards
459         https://bugs.webkit.org/show_bug.cgi?id=114084
460
461         Reviewed by Ryosuke Niwa.
462
463         * WebCoreSupport/AboutDataUseFeatures.in: Remove the SKIA_ON_MAC_(CHROME|CHROMIUM) reference.
464
465 2013-04-05  Tiancheng Jiang  <tijiang@rim.com>
466
467         [BlackBerry] FatFingers Don't check the shadow tree for all elements.
468         https://bugs.webkit.org/show_bug.cgi?id=114066
469
470         Reviewed by Rob Buis.
471
472         BlackBerry PR 263078
473         Internally reviewed by Genevieve Mak.
474
475         No need to check shadow tree since sliders use touch events.
476
477         * WebKitSupport/FatFingers.cpp:
478         (BlackBerry::WebKit::FatFingers::isElementClickable):
479
480 2013-04-05  Zan Dobersek  <zdobersek@igalia.com>
481
482         Remove WTF_USE_GOOGLEURL-guarded code
483         https://bugs.webkit.org/show_bug.cgi?id=114028
484
485         Reviewed by Ryosuke Niwa.
486
487         * WebCoreSupport/AboutDataUseFeatures.in: Remove GOOGLEURL from the list.
488
489 2013-04-04  Jacky Jiang  <zhajiang@rim.com>
490
491         [BlackBerry] Blitting wrong rect during history navigations
492         https://bugs.webkit.org/show_bug.cgi?id=113963
493
494         Reviewed by Rob Buis.
495         Internally reviewed by Jakob Petsovits.
496
497         On www.bbc.com/news, we blit wrong rect during the second restoration
498         of the view states when we navigate back from stories to the main page.
499         Update the contents size and scroll position before we render and blit
500         if we failed to zoomAboutPoint so that UI thread can still get the
501         correct rect during blit.
502
503         * Api/WebPage.cpp:
504         (BlackBerry::WebKit::WebPagePrivate::restoreHistoryViewState):
505
506 2013-04-05  Jakob Petsovits  <jpetsovits@blackberry.com>
507
508         [BlackBerry] Replace map{From,To}Transformed() with ViewportAccessor
509         https://bugs.webkit.org/show_bug.cgi?id=113449
510
511         Reviewed by Rob Buis.
512
513         This removes the WebPage/BackingStoreClient family of coordinate
514         transformation functions, which were widely disliked for their
515         naming, with ViewportAccessor API that had previously been
516         introduced for limited use cases. This commit takes care of the
517         remaining call sites and leaves us with a single API to use.
518
519         No new tests, only a clean-up/refactor of existing code & functionality.
520
521         * Api/BackingStore.cpp:
522         (BlackBerry::WebKit::BackingStorePrivate::repaint):
523         (BlackBerry::WebKit::BackingStorePrivate::slowScroll):
524         (BlackBerry::WebKit::BackingStorePrivate::visibleContentsRect):
525         (BlackBerry::WebKit::BackingStorePrivate::unclippedVisibleContentsRect):
526         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
527         (BlackBerry::WebKit::BackingStorePrivate::expandedContentsSize):
528         * Api/InRegionScroller.cpp:
529         (BlackBerry::WebKit::InRegionScrollerPrivate::clipToRect):
530         * Api/WebPage.cpp:
531         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
532         (BlackBerry::WebKit::WebPagePrivate::init):
533         (BlackBerry::WebKit::WebPagePrivate::scrollPosition):
534         (BlackBerry::WebKit::WebPagePrivate::maximumScrollPosition):
535         (BlackBerry::WebKit::WebPagePrivate::setScrollPosition):
536         (BlackBerry::WebKit::WebPagePrivate::viewportSize):
537         (BlackBerry::WebKit::WebPagePrivate::actualVisibleSize):
538         (BlackBerry::WebKit::WebPagePrivate::layoutFinished):
539         (BlackBerry::WebKit::WebPagePrivate::notifyTransformedContentsSizeChanged):
540         (BlackBerry::WebKit::WebPagePrivate::updateCursor):
541         (BlackBerry::WebKit::WebPagePrivate::focusNodeRect):
542         (BlackBerry::WebKit::WebPagePrivate::contextNode):
543         (BlackBerry::WebKit::WebPagePrivate::blockZoomRectForNode):
544         (BlackBerry::WebKit::WebPagePrivate::zoomAnimationFinished):
545         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
546         (BlackBerry::WebKit::WebPage::blockZoom):
547         * Api/WebPage_p.h:
548         (WebPagePrivate):
549         * WebKitSupport/BackingStoreClient.cpp:
550         (BlackBerry::WebKit::BackingStoreClient::transformedScrollPosition):
551         (BlackBerry::WebKit::BackingStoreClient::transformedMaximumScrollPosition):
552         (BlackBerry::WebKit::BackingStoreClient::actualVisibleSize):
553         (BlackBerry::WebKit::BackingStoreClient::transformedActualVisibleSize):
554         * WebKitSupport/BackingStoreClient.h:
555         (BackingStoreClient):
556         * WebKitSupport/FatFingers.cpp:
557         (BlackBerry::WebKit::FatFingers::fingerRectForPoint):
558         (BlackBerry::WebKit::FatFingers::FatFingers):
559         (BlackBerry::WebKit::FatFingers::findBestPoint):
560         (BlackBerry::WebKit::FatFingers::findIntersectingRegions):
561         (BlackBerry::WebKit::FatFingers::getNodesFromRect):
562         * WebKitSupport/InRegionScrollableArea.cpp:
563         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
564         * WebKitSupport/InputHandler.cpp:
565         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
566         * WebKitSupport/TouchEventHandler.cpp:
567         (BlackBerry::WebKit::TouchEventHandler::sendClickAtFatFingersPoint):
568         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
569         (BlackBerry::WebKit::TouchEventHandler::handleFatFingerPressed):
570         * WebKitSupport/WebKitThreadViewportAccessor.cpp:
571         (BlackBerry::WebKit::WebKitThreadViewportAccessor::pixelContentsSize):
572         (BlackBerry::WebKit::WebKitThreadViewportAccessor::pixelScrollPosition):
573         (BlackBerry::WebKit::WebKitThreadViewportAccessor::documentViewportSize):
574
575 2013-04-05  Alberto Garcia  <agarcia@igalia.com>
576
577         [BlackBerry] Remove unused parameters from notifyAnimationStarted() and paintContents()
578         https://bugs.webkit.org/show_bug.cgi?id=114022
579
580         Reviewed by Carlos Garcia Campos.
581
582         Naming the 'time' and 'inClip' unused parameters only produces
583         compiler warnings.
584
585         * Api/WebOverlay_p.h:
586         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::notifyAnimationStarted):
587         (WebOverlayPrivateWebKitThread):
588         * Api/WebPage_p.h:
589         (BlackBerry::WebKit::WebPagePrivate::notifyAnimationStarted):
590         (BlackBerry::WebKit::WebPagePrivate::paintContents):
591         * WebKitSupport/DefaultTapHighlight.h:
592         (BlackBerry::WebKit::DefaultTapHighlight::notifyAnimationStarted):
593         * WebKitSupport/InspectorOverlayBlackBerry.cpp:
594         (BlackBerry::WebKit::InspectorOverlay::paintContents):
595         * WebKitSupport/InspectorOverlayBlackBerry.h:
596         (BlackBerry::WebKit::InspectorOverlay::notifyAnimationStarted):
597         (InspectorOverlay):
598         * WebKitSupport/SelectionOverlay.h:
599         (BlackBerry::WebKit::SelectionOverlay::notifyAnimationStarted):
600
601 2013-04-05  Alberto Garcia  <agarcia@igalia.com>
602
603         [BlackBerry] WebOverlay: fix access to m_client
604         https://bugs.webkit.org/show_bug.cgi?id=114003
605
606         Reviewed by Rob Buis.
607
608         m_client was replace by m_overlay in r146058.
609
610         * Api/WebOverlay.cpp:
611         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded):
612
613 2013-04-05  Alberto Garcia  <agarcia@igalia.com>
614
615         [BlackBerry] WebOverlayPrivate: remove showDebugBorders() and showRepaintCounter()
616         https://bugs.webkit.org/show_bug.cgi?id=114009
617
618         Reviewed by Carlos Garcia Campos.
619
620         These methods were removed in r133517 but were accidentally
621         introduced again in r145968.
622         The previous patch didn't remove them all.
623
624         * WebKitSupport/DefaultTapHighlight.cpp:
625         * WebKitSupport/DefaultTapHighlight.h:
626         (DefaultTapHighlight):
627         * WebKitSupport/InspectorOverlayBlackBerry.cpp:
628         * WebKitSupport/InspectorOverlayBlackBerry.h:
629         (InspectorOverlay):
630         * WebKitSupport/SelectionOverlay.cpp:
631         * WebKitSupport/SelectionOverlay.h:
632         (SelectionOverlay):
633
634 2013-04-05  Alberto Garcia  <agarcia@igalia.com>
635
636         [BlackBerry] WebOverlayPrivate: remove showDebugBorders() and showRepaintCounter()
637         https://bugs.webkit.org/show_bug.cgi?id=114009
638
639         Reviewed by Carlos Garcia Campos.
640
641         These methods were removed in r133517 but were accidentally
642         introduced again in r145968.
643
644         * Api/WebOverlay_p.h:
645         (WebOverlayPrivateWebKitThread):
646
647 2013-04-05  Anthony Scian  <ascian@blackberry.com>
648
649         [BlackBerry] WebOverlay: check if platformContext is null
650         https://bugs.webkit.org/show_bug.cgi?id=114005
651
652         Reviewed by Carlos Garcia Campos.
653
654         RIM PR 256522
655         Internally reviewed by Mike Lattanzio.
656
657         The pointer returned by lockBufferDrawable can be null, so it
658         needs to be checked first before being used.
659
660         * Api/WebOverlay.cpp:
661         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded):
662
663 2013-04-05  Benjamin Poulain  <bpoulain@apple.com>
664
665         Remove WTFURL from WebKit
666         https://bugs.webkit.org/show_bug.cgi?id=113994
667
668         Reviewed by Ryosuke Niwa.
669
670         * WebCoreSupport/AboutDataUseFeatures.in:
671
672 2013-04-04  Andrew Lo  <anlo@rim.com>
673
674         [BlackBerry] DOMSupport::isFixedPositionOrHasFixedPositionAncestor stops traversing render tree when it hits an iframe element
675         https://bugs.webkit.org/show_bug.cgi?id=113944
676
677         Reviewed by Rob Buis.
678         Internally reviewed by Mike Fenton.
679
680         Internal PR 320732.
681         When checking whether a RenderObject is fixed position or has a fixed position
682         ancestor, we traverse the render tree upwards.
683
684         When we reach the root of the tree, check whether the root is an
685         iframe and has an element owner. If so, we also need to continue iterating
686         up the tree from the owner to see if the iframe is a descendant of a fixed
687         position element.
688
689         * WebKitSupport/DOMSupport.cpp:
690         (BlackBerry::WebKit::DOMSupport::isFixedPositionOrHasFixedPositionAncestor):
691
692 2013-04-04  Tiancheng Jiang  <tijiang@rim.com>
693
694         [BlackBerry] Adjust fatfinger result priority
695         https://bugs.webkit.org/show_bug.cgi?id=113957
696
697         Reviewed by Rob Buis.
698
699         RIM PR 224781
700         Internally Reviewed by Genevieve Mak.
701
702         Change fatfigner algorithm, return the clickable element rather than
703         its parent anchor. Modify taphighlight and context menu node selection
704         accordingly.
705
706         * Api/WebPage.cpp:
707         (BlackBerry::WebKit::WebPagePrivate::webContext):
708         * WebKitSupport/FatFingers.cpp:
709         (BlackBerry::WebKit::FatFingers::findBestPoint):
710         * WebKitSupport/FatFingers.h:
711         * WebKitSupport/TouchEventHandler.cpp:
712         (BlackBerry::WebKit::elementForTapHighlight):
713
714 2013-04-03  Arvid Nilsson  <anilsson@rim.com>
715
716         [BlackBerry] Remove defaultViewportArguments check from call site of recomputeVirtualViewportFromViewportArguments
717         https://bugs.webkit.org/show_bug.cgi?id=113872
718
719         Reviewed by Carlos Garcia Campos.
720
721         Carlos pointed out that recomputeVirtualViewportFromViewportArguments
722         already contains the check, and returns an empty IntSize if it fails.
723         So pick up on that to make the code a bit more DRY.
724
725         * Api/WebPage.cpp:
726         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
727
728 2013-04-03  Arvid Nilsson  <anilsson@rim.com>
729
730         [BlackBerry] Decouple layout viewport from visual viewport
731         https://bugs.webkit.org/show_bug.cgi?id=113829
732
733         Reviewed by Carlos Garcia Campos.
734
735         Setting the visual viewport would force the layout viewport equal to
736         the visual viewport. Decouple the viewports by allowing the user to
737         specify a layout viewport when setting the viewport(s). The layout
738         viewport could be the exact same value passed for visual viewport, if
739         the old behavior is desired.
740
741         Also reevaluate any viewport arguments when (only) the layout viewport
742         changes in WebPage::setDefaultLayoutSize() since the layout viewport is
743         used as input to the calculation.
744
745         * Api/WebPage.cpp:
746         (BlackBerry::WebKit::WebPagePrivate::setScreenOrientation):
747         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
748         (BlackBerry::WebKit::WebPage::setViewportSize):
749         (WebKit):
750         (BlackBerry::WebKit::WebPagePrivate::setDefaultLayoutSize):
751         (BlackBerry::WebKit::WebPage::defaultLayoutSize):
752         * Api/WebPage.h:
753         * Api/WebPage_p.h:
754         (WebPagePrivate):
755
756 2013-04-02  Maxim Mogilnitsky  <mmogilnitsky@rim.com>
757
758         [BlackBerry] API update for IntRect
759         https://bugs.webkit.org/show_bug.cgi?id=113824
760
761         Reviewed by Rob Buis.
762
763         Modifing IntRect and FloatRect API.
764
765         * WebKitSupport/SelectionHandler.cpp:
766         (BlackBerry::WebKit::SelectionHandler::regionForTextQuads):
767
768 2013-04-02  Nima Ghanavatian  <nghanavatian@blackberry.com>
769
770         [BlackBerry] Create a selection from two points irregardless of the caret position.
771         https://bugs.webkit.org/show_bug.cgi?id=113795
772
773         Reviewed by Rob Buis.
774
775         Internally reviewed by Mike Fenton.
776
777         PR276577
778         If we are to set both the base and extent of a selection, we should maintain the base upon setting the extent.
779         This prevents us from overwriting the previous calculation when setting extent.
780         Further, instead of setting and manipulating the selection, simply set up start and end VisiblePositions and
781         create a new directional selection so as to set the base and extent simultaneously.
782
783         * WebKitSupport/SelectionHandler.cpp:
784         (BlackBerry::WebKit::SelectionHandler::setSelection):
785
786 2013-04-01  Konrad Piascik  <kpiascik@blackberry.com>
787
788         [BlackBerry] Move Path into it's own header
789         https://bugs.webkit.org/show_bug.cgi?id=113724
790
791         Reviewed by Rob Buis.
792
793         * WebKitSupport/DefaultTapHighlight.cpp:
794
795 2013-03-29  Charles Wei  <charles.wei@torchmobile.com.cn>
796
797         [BlackBerry] Cleanup the CONTEXT_MENUS in BlackBerry porting
798         https://bugs.webkit.org/show_bug.cgi?id=113562
799
800         Reviewed by George Staikos.
801         Internally reviewed by Mike Fenton and Gen Mak.
802
803         * Api/WebPage.cpp:
804         (BlackBerry::WebKit::WebPagePrivate::init):
805         * WebCoreSupport/ContextMenuClientBlackBerry.cpp:
806         * WebCoreSupport/ContextMenuClientBlackBerry.h:
807
808 2013-03-29  Charles Wei  <charles.wei@torchmobile.com.cn>
809
810         [BlackBerry] Context menu doesn't showup anymore after rebase.
811         https://bugs.webkit.org/show_bug.cgi?id=113570
812
813         Reviewed by George Staikos.
814
815         The upstreaming patch for bug: 103058, reverses the return value of 
816         Node::dispatchMouseEvent() to be consistent with Node::dispatchEvent(),
817         so we should reverse our logic in webkit part that calls it also.
818
819         This only applys to master_41 which is a new rebase, don't apply it to master_40.
820         * Api/WebPage.cpp:
821         (BlackBerry::WebKit::WebPagePrivate::webContext):
822
823 2013-03-28  Iris Wu  <shuwu@blackberry.com>
824
825         [BlackBerry] Don't cross editing boundary when touch hold selection expands
826         https://bugs.webkit.org/show_bug.cgi?id=113537
827
828         Reviewed by Rob Buis.
829
830         Set editing boundary crossing rule to make sure it won't cross
831         editing boundary when selection expands.
832
833         Reviewed Internally By Genevieve Mak and Mike Fenton.
834
835         * WebKitSupport/SelectionHandler.cpp:
836         (BlackBerry::WebKit::SelectionHandler::selectNextParagraph):
837         (BlackBerry::WebKit::SelectionHandler::findNextAnimationOverlayRegion):
838
839 2013-03-28  Jakob Petsovits  <jpetsovits@blackberry.com>
840
841         [BlackBerry] Don't use WebKit thread scale information in WebPageCompositor.
842         https://bugs.webkit.org/show_bug.cgi?id=113447
843         Internal PR 313452
844
845         Reviewed by Rob Buis.
846
847         Potential threading problems are avoided by moving from
848         WebPage members and mapToTransformed() to the web page
849         client's userInterfaceViewportAccessor().
850
851         As part of this cleaning effort, the WebPageCompositor's
852         render() method is changed to now take document instead of
853         pixel coordinates.
854
855         * Api/BackingStore.cpp:
856         (BlackBerry::WebKit::BackingStorePrivate::compositeContents):
857         * Api/WebPageCompositor.cpp:
858         (BlackBerry::WebKit::WebPageCompositorPrivate::render):
859         (BlackBerry::WebKit::WebPageCompositor::render):
860         * Api/WebPageCompositor.h:
861         * Api/WebPageCompositor_p.h:
862         (WebPageCompositorPrivate):
863
864 2013-03-28  Matt Falkenhagen  <falken@chromium.org>
865
866         Refactoring: Replace Element::disabled and isEnabledFormControl with isDisabledFormControl
867         https://bugs.webkit.org/show_bug.cgi?id=113273
868
869         Reviewed by Kent Tamura.
870
871         Element::disabled is about form controls and Element::isEnabledFormControl
872         is redundant with it, so replace them with a single function
873         Element::isDisabledFormControl.
874
875         * WebCoreSupport/CredentialTransformData.cpp:
876         (WebCore::CredentialTransformData::findPasswordFormFields):
877         * WebKitSupport/DOMSupport.cpp:
878         (BlackBerry::WebKit::DOMSupport::isTextBasedContentEditableElement):
879         * WebKitSupport/InputHandler.cpp:
880         (BlackBerry::WebKit::InputHandler::openSelectPopup):
881
882 2013-03-27  Eli Fidler <efidler@blackberry.com>
883
884         [BlackBerry] Show compositing on the Inspector timeline properly
885         https://bugs.webkit.org/show_bug.cgi?id=113416
886
887         Reviewed by Rob Buis.
888
889         The call to willComposite was too early and encompased the paint calls
890         as well.  Moving it lower will no longer encompass the paints.
891
892         * Api/WebPage.cpp:
893         (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
894
895 2013-03-27  Arvid Nilsson  <anilsson@rim.com>
896
897         [BlackBerry] Populate the mime type of the WebContext for images
898         https://bugs.webkit.org/show_bug.cgi?id=113272
899
900         Reviewed by George Staikos.
901
902         PR 278967
903
904         Populate the mime type using the file extension reported by the image
905         decoder. This way we benefit from file type sniffing, instead of
906         relying on the mime type reported by the resource response.
907
908         * Api/WebPage.cpp:
909         (BlackBerry::WebKit::WebPagePrivate::webContext):
910
911 2013-03-26  Hayato Ito  <hayato@chromium.org>
912
913         Allow ShadowContents in HitTests by default.
914         https://bugs.webkit.org/show_bug.cgi?id=113171
915
916         Reviewed by Dimitri Glazkov.
917
918         * Api/WebPage.cpp:
919         (BlackBerry::WebKit::WebPagePrivate::hitTestResult):
920         * WebKitSupport/FatFingers.cpp:
921         (BlackBerry::WebKit::FatFingers::getNodesFromRect):
922         * WebKitSupport/ProximityDetector.cpp:
923         (BlackBerry::WebKit::ProximityDetector::findBestPoint):
924         * WebKitSupport/SelectionHandler.cpp:
925         (BlackBerry::WebKit::visiblePositionForPointIgnoringClipping):
926
927 2013-03-26  Xiaobo Wang  <xbwang@torchmobile.com.cn>
928
929         [BlackBerry] Memory leak in WebPagePrivate.cpp - NavigatorContentUtilsClientBlackBerry
930         https://bugs.webkit.org/show_bug.cgi?id=112996
931
932         Reviewed by Rob Buis.
933
934         PR 312552
935         Internally Reviewed by Anthony Scian.
936
937         NavigatorContentUtilsClientBlackBerry is new'ed in WebPagePrivate::init(),
938         but not deleted anywhere. Fixed by creating an OwnPtr for it.
939         Also fixed some webkit-style errors.
940
941         * Api/WebPage.cpp:
942         (BlackBerry::WebKit::WebPagePrivate::init):
943         * Api/WebPage_p.h:
944         (WebCore):
945         (WebPagePrivate):
946
947 2013-03-26  Mike Lattanzio  <mlattanzio@blackberry.com>
948
949         [BlackBerry] Include accelerated compositing layers in screen captures.
950         https://bugs.webkit.org/show_bug.cgi?id=113335
951
952         Reviewed by Rob Buis.
953
954         PR# 280374
955         Include accelerated compositing layers in screen captures.
956         Reviewed Internally By: Jakob Petsovits
957
958         * Api/BackingStore.cpp:
959         (BlackBerry::WebKit::BackingStorePrivate::render):
960         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
961         (BlackBerry::WebKit::BackingStore::drawContents):
962         * Api/BackingStore_p.h:
963
964 2013-03-26  Tiancheng Jiang  <tijiang@rim.com>
965
966         [BlackBerry] Set mouse document position for mouse event in updateCursor
967         https://bugs.webkit.org/show_bug.cgi?id=109094
968
969         Reviewed by Rob Buis.
970
971         Internally Reviewed by Jakob Petsovits.
972
973         Mouse content position should be in document coordinate.
974
975         * Api/WebPage.cpp:
976         (BlackBerry::WebKit::WebPagePrivate::updateCursor):
977
978 2013-03-26  Arvid Nilsson  <anilsson@rim.com>
979
980         [BlackBerry] Scrolling up and down can cause the screen to flash black
981         https://bugs.webkit.org/show_bug.cgi?id=113269
982
983         Reviewed by Rob Buis.
984
985         PR 296106
986
987         Various flaws in the code could conspire to make the screen cleared to
988         black before rendering the web page. This only happened when the
989         BackingStore was inactive, and the LayerTiler takes on the job of
990         drawing the root layer. When tiles are missing, this made the
991         "checkerboard" effect especially noticeable since black color was seen
992         where the tile should have been. It would be better to clear to the web
993         page background color.
994
995         This was actually the intent of the code, but when the document
996         background color was invalid, we would still use it instead of the
997         background color from settings. Also, the LayerRenderer would clear to
998         black when WebPageCompositorPrivate::drawsRootLayer() was true.
999
1000         Fixed by falling back to the settings background color when the
1001         document background color is invalid, and removing the clearing code
1002         from the LayerRenderer entirely. The appropriate clear already happens
1003         near the beginning of BackingStorePrivate::blitVisibleContents().
1004
1005         Also slightly cleaned up the code for managing the background color.
1006
1007         * Api/WebPage.cpp:
1008         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
1009         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
1010         (BlackBerry::WebKit::WebPagePrivate::updateBackgroundColor):
1011         (WebKit):
1012         (BlackBerry::WebKit::WebPagePrivate::documentBackgroundColor):
1013         * Api/WebPageCompositor.cpp:
1014         * Api/WebPageCompositor_p.h:
1015         (WebPageCompositorPrivate):
1016         * Api/WebPage_p.h:
1017         (WebPagePrivate):
1018
1019 2013-03-26  Arvid Nilsson  <anilsson@rim.com>
1020
1021         [BlackBerry] WebOverlay::pixelViewportRect() should return pixel viewport coordinates
1022         https://bugs.webkit.org/show_bug.cgi?id=113263
1023
1024         Reviewed by Rob Buis.
1025
1026         PR 312404
1027
1028         Fixed by returning pixel viewport coordinates instead of window
1029         coordinates.
1030
1031         * Api/WebOverlay.cpp:
1032         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::pixelViewportRect):
1033
1034 2013-03-26  Xiaobo Wang  <xbwang@torchmobile.com.cn>
1035
1036         [BlackBerry] Memory leak in UserMediaClientImpl
1037         https://bugs.webkit.org/show_bug.cgi?id=112998
1038
1039         Reviewed by Rob Buis.
1040
1041         PR 312559
1042         Internally Reviewed by Anthony Scian.
1043
1044         Should destroy itself in UserMediaClientImpl::pageDestroyed(), as other
1045         XXClientBlackBerry did, like GeolocationClientBlackBerry::geolocationDestroyed().
1046
1047         * WebCoreSupport/UserMediaClientImpl.cpp:
1048         (WebCore::UserMediaClientImpl::pageDestroyed):
1049
1050 2013-03-25  Kent Tamura  <tkent@chromium.org>
1051
1052         Rename ENABLE_INPUT_TYPE_DATETIME
1053         https://bugs.webkit.org/show_bug.cgi?id=113254
1054
1055         Reviewed by Kentaro Hara.
1056
1057         Rename ENABLE_INPUT_TYPE_DATETIME to ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE.
1058         Actually I'd like to remove the code, but we shouldn't remove it yet
1059         because we shipped products with it on some platforms.
1060
1061         * WebCoreSupport/AboutDataEnableFeatures.in:
1062
1063 2013-03-25  Mary Wu  <mary.wu@torchmobile.com.cn>
1064
1065         [BlackBerry] add needReferer in WebPage load() api
1066         https://bugs.webkit.org/show_bug.cgi?id=113167
1067
1068         Reviewed by Rob Buis.
1069
1070         PR310175, internally reviewed by Joe Mason.
1071         Sometimes when client load request, it need to add referer with current frame like
1072         save link/image in option menu, so we add needRef in load() interface in webpage.
1073
1074         * Api/WebPage.cpp:
1075         (BlackBerry::WebKit::WebPagePrivate::load):
1076         (BlackBerry::WebKit::WebPage::load):
1077         (BlackBerry::WebKit::WebPage::loadExtended):
1078         (BlackBerry::WebKit::WebPage::loadFile):
1079         (BlackBerry::WebKit::WebPage::download):
1080         * Api/WebPage.h:
1081         * Api/WebPage_p.h:
1082         (WebPagePrivate):
1083
1084 2013-03-22  Nima Ghanavatian  <nghanavatian@blackberry.com>
1085
1086         [BlackBerry] Build fix in InputHandler
1087         https://bugs.webkit.org/show_bug.cgi?id=113092
1088
1089         Reviewed by Rob Buis.
1090
1091         * WebKitSupport/InputHandler.cpp:
1092         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
1093
1094 2013-03-22  Nima Ghanavatian  <nghanavatian@blackberry.com>
1095
1096         Check focused node reference when traversing through history
1097         https://bugs.webkit.org/show_bug.cgi?id=113082
1098
1099         Reviewed by Rob Buis.
1100
1101         PR312101
1102         Check if we have a valid node and document before attempting to access its frame and
1103         frame selection. This is causing issues when going back to a page after a redirect
1104         where a stale pointer is used.
1105         Further, the focused node should be changed after the frame is fully loaded.
1106
1107         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1108         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFinishLoad):
1109         * WebKitSupport/InputHandler.cpp:
1110         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
1111         (BlackBerry::WebKit::InputHandler::restoreViewState):
1112
1113 2013-03-22  Genevieve Mak  <gmak@rim.com>
1114
1115         [BlackBerry] Hit Test doesn't need to be active
1116         https://bugs.webkit.org/show_bug.cgi?id=113072
1117
1118         Reviewed by Rob Buis.
1119
1120         Reviewed Internally By Mike Lattanzio.
1121         PR #306074
1122
1123         * WebKitSupport/ProximityDetector.cpp:
1124         (BlackBerry::WebKit::ProximityDetector::findBestPoint):
1125
1126 2013-03-22  Andrew Lo  <anlo@rim.com>
1127
1128         [BlackBerry] Selection overlay clipped incorrectly
1129         https://bugs.webkit.org/show_bug.cgi?id=113069
1130
1131         Reviewed by George Staikos.
1132         Internally reviewed by Arvid Nilsson.
1133
1134         As a follow-up to r146278, the clip rect also needs to be
1135         adjusted by the parent's offset when drawing the
1136         selection overlay.
1137
1138         * WebKitSupport/SelectionOverlay.cpp:
1139         (BlackBerry::WebKit::SelectionOverlay::paintContents):
1140
1141 2013-03-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1142
1143         [BlackBerry] Add custom BackForwardList client implementation
1144         https://bugs.webkit.org/show_bug.cgi?id=113024
1145
1146         Reviewed by Rob Buis.
1147
1148         PR 310030
1149         Internally reviewed by Joe Mason.
1150
1151         Adds a new class BackForwardListBlackBerry that implements
1152         BackForwardList client and wraps the BackForwardListImpl including
1153         the BlackBerry specific changes to notify the API layer when the
1154         BackForwardList changes.
1155
1156         * Api/WebPage.cpp:
1157         (BlackBerry::WebKit::WebPagePrivate::init): Create a
1158         BackForwardListBlackBerry.
1159         (BlackBerry::WebKit::WebPage::getBackForwardList): Use
1160         BackForwardListBlackBerry instead of BackForwardListImpl.
1161         (BlackBerry::WebKit::WebPage::clearBackForwardList): Ditto.
1162         * WebCoreSupport/BackForwardListBlackBerry.cpp: Added.
1163         (WebCore):
1164         (WebCore::BackForwardListBlackBerry::BackForwardListBlackBerry):
1165         (WebCore::BackForwardListBlackBerry::~BackForwardListBlackBerry):
1166         (WebCore::BackForwardListBlackBerry::current):
1167         (WebCore::BackForwardListBlackBerry::notifyBackForwardListChanged):
1168         (WebCore::BackForwardListBlackBerry::addItem):
1169         (WebCore::BackForwardListBlackBerry::goToItem):
1170         (WebCore::BackForwardListBlackBerry::itemAtIndex):
1171         (WebCore::BackForwardListBlackBerry::backListCount):
1172         (WebCore::BackForwardListBlackBerry::forwardListCount):
1173         (WebCore::BackForwardListBlackBerry::isActive):
1174         (WebCore::BackForwardListBlackBerry::close):
1175         (WebCore::BackForwardListBlackBerry::clear):
1176         (WebCore::BackForwardListBlackBerry::entries):
1177         (WebCore::BackForwardListBlackBerry::currentItem):
1178         * WebCoreSupport/BackForwardListBlackBerry.h: Added.
1179         (WebKit):
1180         (WebCore):
1181         (BackForwardListBlackBerry):
1182         (WebCore::BackForwardListBlackBerry::create):
1183         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1184         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
1185         (FrameLoaderClientBlackBerry):
1186
1187 2013-03-21  Iris Wu  <shuwu@blackberry.com>
1188
1189         [BlackBerry] Last paragraph can't be selected by touch hold selection if there is no new line after it in subframe.
1190         https://bugs.webkit.org/show_bug.cgi?id=112966
1191
1192         Reviewed by Rob Buis.
1193
1194         PR 312044
1195         Reviewed Internally By Genevieve Mak.
1196
1197         If selection reaches the bottom of content, ignore scroll margin
1198         so the text on the bottom can be selected.
1199         Stop expanding selection only if the end of document is selected
1200         or touch is released.
1201
1202         * WebKitSupport/SelectionHandler.cpp:
1203         (BlackBerry::WebKit::SelectionHandler::expandSelection):
1204         (BlackBerry::WebKit::SelectionHandler::ensureSelectedTextVisible):
1205
1206 2013-03-21  Otto Derek Cheung  <otcheung@rim.com>
1207
1208         [BlackBerry] addSearchProvider shouldn't match the full host, only the server
1209         https://bugs.webkit.org/show_bug.cgi?id=112960
1210
1211         Reviewed by Rob Buis.
1212         Internally Reviewed by Jeff Rogers.
1213
1214         Remove full host matching. only check if domains are from the same server.
1215
1216         Also, check user gesture before dispatching the addSearchProvider event to the browser.
1217
1218         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1219         (WebCore::ChromeClientBlackBerry::addSearchProvider):
1220         (WebCore::ChromeClientBlackBerry::isSearchProviderInstalled):
1221         * WebCoreSupport/ChromeClientBlackBerry.h:
1222         (ChromeClientBlackBerry):
1223         * WebCoreSupport/ExternalExtension.cpp:
1224         (IsSearchProviderInstalledMethod):
1225
1226 2013-03-19  Andrew Lo  <anlo@rim.com>
1227
1228         [BlackBerry] Selection overlay is sometimes in wrong position.
1229         https://bugs.webkit.org/show_bug.cgi?id=112748
1230
1231         Reviewed by Rob Buis.
1232         Internally reviewed by Arvid Nilsson.
1233
1234         Internal PR 305384.
1235         Translate by parent's offset when drawing selection overlay.
1236
1237         * WebKitSupport/SelectionOverlay.cpp:
1238         (BlackBerry::WebKit::SelectionOverlay::paintContents):
1239
1240 2013-03-19  Iris Wu  <shuwu@blackberry.com>
1241
1242         [BlackBerry] Hook up scroll position to proximity detector
1243         https://bugs.webkit.org/show_bug.cgi?id=112743
1244
1245         Reviewed by Rob Buis.
1246
1247         PR 243385
1248         Reviewed Internally By Genevieve Mak.
1249
1250         * Api/WebPage.cpp:
1251         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
1252         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
1253         (BlackBerry::WebKit::WebPage::adjustDocumentScrollPosition):
1254         (WebKit):
1255         * Api/WebPage.h:
1256         * Api/WebPage_p.h:
1257         (WebPagePrivate):
1258
1259 2013-03-19  Chris Hutten-Czapski  <chutten@blackberry.com>
1260
1261         [BlackBerry] Don't handle keyboard scrolling shortcuts in webkit
1262         https://bugs.webkit.org/show_bug.cgi?id=112716
1263
1264         Informally Reviewed by Mike Fenton (mifenton@rim.com)
1265         Reviewed by Rob Buis.
1266
1267         The comment is right, this isn't the correct place to handle keyboard
1268         scrolling shortcuts. That's what we have clients for.
1269
1270         * Api/WebPage.cpp:
1271         (BlackBerry::WebKit::WebPage::keyEvent):
1272
1273 2013-03-19  Andy Chen  <andchen@blackberry.com>
1274
1275         [BlackBerry] When selecting an object, assign focus to new node instead of clearing previous focused node
1276         https://bugs.webkit.org/show_bug.cgi?id=112707
1277
1278         Reviewed by Rob Buis.
1279
1280         In SelectionHandler, when selecting a new object, we should set focus
1281         to the anchor node of selection instead of removing it from the old input.
1282         In InputHandler, when focusedNodeChanged is called, if the new node is
1283         not an Element node, we need to set focus to its Element parent node,
1284         instead of removing focus from the old node.
1285         PR 304631
1286         Internally reviewed by Mike Fenton.
1287
1288         * WebKitSupport/InputHandler.cpp:
1289         (BlackBerry::WebKit::InputHandler::focusedNodeChanged):
1290         * WebKitSupport/SelectionHandler.cpp:
1291         (BlackBerry::WebKit::SelectionHandler::selectObject):
1292
1293 2013-03-18  Alberto Garcia  <agarcia@igalia.com>
1294
1295         [BlackBerry] Prevent text selection inside Colour and Date/Time input fields
1296         https://bugs.webkit.org/show_bug.cgi?id=111733
1297
1298         Reviewed by Rob Buis.
1299
1300         Fix missing brace.
1301
1302         * WebKitSupport/SelectionHandler.cpp:
1303         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
1304
1305 2013-03-18  Alberto Garcia  <agarcia@igalia.com>
1306
1307         [BlackBerry] Add Proximity Detector.
1308         https://bugs.webkit.org/show_bug.cgi?id=112278
1309
1310         Reviewed by Rob Buis.
1311
1312         Fix variable names so they actually match the function
1313         declarations.
1314
1315         Fix call to rectForPoint(), which was moved from HitTestResult to
1316         HitTestLocation in r117091 and r126859.
1317
1318         * WebKitSupport/ProximityDetector.cpp:
1319         (BlackBerry::WebKit::ProximityDetector::findBestPoint):
1320
1321 2013-03-18  Alberto Garcia  <agarcia@igalia.com>
1322
1323         [BlackBerry] EditorClientBlackBerry: fix access to WebPage attribute
1324         https://bugs.webkit.org/show_bug.cgi?id=112556
1325
1326         Reviewed by Rob Buis.
1327
1328         This changed in r145849 and broke the BlackBerry build.
1329
1330         * WebCoreSupport/EditorClientBlackBerry.cpp:
1331         (WebCore::EditorClientBlackBerry::smartInsertDeleteEnabled):
1332         (WebCore::EditorClientBlackBerry::isSelectTrailingWhitespaceEnabled):
1333
1334 2013-03-18  Arvid Nilsson  <anilsson@rim.com>
1335
1336         [BlackBerry] Detach overlays from page when compositor is detached
1337         https://bugs.webkit.org/show_bug.cgi?id=112424
1338
1339         Reviewed by Rob Buis.
1340
1341         PR 309160
1342
1343         If not detached properly, the overlays would have a dangling pointer to
1344         the page.
1345
1346         * Api/WebOverlay.cpp:
1347         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::WebOverlayLayerCompositingThreadClient):
1348         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded):
1349         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::WebOverlayPrivateCompositingThread):
1350         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::~WebOverlayPrivateCompositingThread):
1351         * Api/WebOverlay_p.h:
1352         (BlackBerry::WebKit::WebOverlayPrivate::setClient):
1353         (WebOverlayLayerCompositingThreadClient):
1354         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::overlay):
1355         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::overlayDestroyed):
1356         (WebOverlayPrivateCompositingThread):
1357         * Api/WebPageCompositor.cpp:
1358         (BlackBerry::WebKit::WebPageCompositorPrivate::detach):
1359         (BlackBerry::WebKit::WebPageCompositorPrivate::setPage):
1360         (WebKit):
1361         (BlackBerry::WebKit::WebPageCompositorPrivate::attachOverlays):
1362         * Api/WebPageCompositor_p.h:
1363         (BlackBerry::WebKit::WebPageCompositorPrivate::attachOverlays):
1364         (BlackBerry::WebKit::WebPageCompositorPrivate::detachOverlays):
1365         (WebPageCompositorPrivate):
1366
1367 2013-03-18  Alberto Garcia  <agarcia@igalia.com>
1368
1369         [BlackBerry] BackingStoreClient: remove unnecessary call to toElement()
1370         https://bugs.webkit.org/show_bug.cgi?id=112547
1371
1372         Reviewed by Carlos Garcia Campos.
1373
1374         * WebKitSupport/BackingStoreClient.cpp:
1375         (BlackBerry::WebKit::BackingStoreClient::absoluteRect):
1376
1377 2013-03-15  Arvid Nilsson  <anilsson@rim.com>
1378
1379         [BlackBerry] BlackBerry::Platform::Graphics::GraphicsContext integration related changes in Source/WebKit/blackberry
1380         https://bugs.webkit.org/show_bug.cgi?id=112467
1381
1382         Reviewed by Rob Buis.
1383
1384         PR 293208
1385
1386         This patch contains contributions from many members of the BlackBerry
1387         WebKit team:
1388
1389         Mike Lattanzio
1390         Arvid Nilsson
1391         Jakob Petsovits
1392         Konrad Piascik
1393         Jeff Rogers
1394         Filip Spacek
1395
1396         * Api/BackingStore.cpp:
1397         (BlackBerry::WebKit::BackingStorePrivate::render):
1398         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
1399         (BlackBerry::WebKit::BackingStorePrivate::compositeContents):
1400         (BlackBerry::WebKit::BackingStorePrivate::tileSize):
1401         * Api/WebOverlay.cpp:
1402         (BlackBerry::WebKit::WebOverlayPrivate::drawContents):
1403         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::paintContents):
1404         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::WebOverlayLayerCompositingThreadClient):
1405         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::setContentsToImage):
1406         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::clearUploadedContents):
1407         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::setContentsToColor):
1408         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded):
1409         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::drawTextures):
1410         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::WebOverlayPrivateCompositingThread):
1411         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::removeFromParent):
1412         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setContentsToImage):
1413         * Api/WebOverlay.h:
1414         * Api/WebOverlayClient.h:
1415         * Api/WebOverlay_p.h:
1416         (WebOverlayPrivate):
1417         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::showDebugBorders):
1418         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::showRepaintCounter):
1419         (WebOverlayLayerCompositingThreadClient):
1420         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::image):
1421         (WebOverlayPrivateCompositingThread):
1422         * Api/WebPageCompositor.cpp:
1423         (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
1424         * WebKitSupport/BackingStoreTile.cpp:
1425         (BlackBerry::WebKit::TileBuffer::~TileBuffer):
1426         (BlackBerry::WebKit::TileBuffer::nativeBuffer):
1427         (BlackBerry::WebKit::TileBuffer::paintBackground):
1428         * WebKitSupport/DefaultTapHighlight.cpp:
1429         (BlackBerry::WebKit::DefaultTapHighlight::paintContents):
1430         (BlackBerry::WebKit::DefaultTapHighlight::showDebugBorders):
1431         (WebKit):
1432         (BlackBerry::WebKit::DefaultTapHighlight::showRepaintCounter):
1433         * WebKitSupport/DefaultTapHighlight.h:
1434         (DefaultTapHighlight):
1435         * WebKitSupport/InspectorOverlayBlackBerry.cpp:
1436         (BlackBerry::WebKit::InspectorOverlay::showDebugBorders):
1437         (WebKit):
1438         (BlackBerry::WebKit::InspectorOverlay::showRepaintCounter):
1439         * WebKitSupport/InspectorOverlayBlackBerry.h:
1440         (InspectorOverlay):
1441         * WebKitSupport/SelectionOverlay.cpp:
1442         (BlackBerry::WebKit::SelectionOverlay::draw):
1443         (BlackBerry::WebKit::SelectionOverlay::hide):
1444         (BlackBerry::WebKit::SelectionOverlay::paintContents):
1445         (BlackBerry::WebKit::SelectionOverlay::showDebugBorders):
1446         (WebKit):
1447         (BlackBerry::WebKit::SelectionOverlay::showRepaintCounter):
1448         * WebKitSupport/SelectionOverlay.h:
1449         (SelectionOverlay):
1450         * WebKitSupport/SurfacePool.cpp:
1451         (BlackBerry::WebKit::SurfacePool::createPlatformGraphicsContext):
1452         (BlackBerry::WebKit::SurfacePool::destroyPlatformGraphicsContext):
1453         (BlackBerry::WebKit::SurfacePool::waitForBuffer):
1454         (BlackBerry::WebKit::SurfacePool::notifyBuffersComposited):
1455         (BlackBerry::WebKit::SurfacePool::destroyPlatformSync):
1456         * WebKitSupport/SurfacePool.h:
1457
1458 2013-03-15  Arvid Nilsson  <anilsson@rim.com>
1459
1460         [BlackBerry] Expose the compositing thread layer's draw rectangle to aid hit testing
1461         https://bugs.webkit.org/show_bug.cgi?id=112255
1462
1463         Reviewed by Rob Buis.
1464
1465         PR 308284.
1466         Reviewed internally by Yongxin Dai.
1467
1468         The cached draw rectangle is useful for hit testing. Add a getter for
1469         this compositing thread layer property to the public WebOverlay API.
1470         We name this getter using terminology familiar from the
1471         ViewportAccessor interface, to clarify which coordinate system the
1472         getter uses (pixel coordinates relative to the viewport).
1473
1474         Note that WebKit-thread flavor of WebOverlay is not currently used by
1475         any API client and is marked obsolete. It is used internally in WebKit,
1476         but for that case using GraphicsLayer directly works well. This will
1477         allow the complexity of WebOverlay to be significantly reduced in the
1478         future, by removing the WebKit-thread flavor entirely.
1479
1480         * Api/WebOverlay.cpp:
1481         (BlackBerry::WebKit::WebOverlay::pixelViewportRect):
1482         (WebKit):
1483         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::pixelViewportRect):
1484         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::pixelViewportRect):
1485         * Api/WebOverlay.h:
1486         (WebKit):
1487         * Api/WebOverlay_p.h:
1488         (WebOverlayPrivate):
1489         (WebOverlayPrivateWebKitThread):
1490         (WebOverlayPrivateCompositingThread):
1491
1492 2013-03-15  Arvid Nilsson  <anilsson@rim.com>
1493
1494         [BlackBerry] Allow an embedder to position child windows using window coordinates
1495         https://bugs.webkit.org/show_bug.cgi?id=112236
1496
1497         Reviewed by Rob Buis.
1498
1499         PR 232752
1500
1501         Child windows used to always be positioned in document coordinates,
1502         which requires the
1503         BlackBerry::Platform::Graphics::Window::virtualRect() of the parent
1504         window to be kept in sync with the document visible content rect.
1505         This is easy if there's a one-to-one correspondence between windows
1506         and scrollable frames.
1507
1508         However, for an embedder that can display an entire scene graph (where
1509         the web page is just one of the nodes) in one window, several
1510         scrollable nodes may be present in that window, and it's difficult to
1511         know which scrollable node to sync the virtualRect with. It could also
1512         lead to conflicts, if two scrollable nodes have child windows.
1513
1514         For the latter scenario, it makes more sense to use window coordinates
1515         to place child windows.
1516
1517         The internal default is to use document coordinates, for legacy
1518         reasons.
1519
1520         When an external WebPageCompositor is attached, we switch to using
1521         window coordinates instead of document coordinates by default. The
1522         behavior is still configurable using the new public
1523         setChildWindowPlacement method.
1524
1525         * Api/WebPageCompositor.cpp:
1526         (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
1527         (BlackBerry::WebKit::WebPageCompositorPrivate::setContext):
1528         (BlackBerry::WebKit::WebPageCompositorPrivate::prepareFrame):
1529         (BlackBerry::WebKit::WebPageCompositorPrivate::render):
1530         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
1531         (BlackBerry::WebKit::WebPageCompositorPrivate::shouldClearSurfaceBeforeCompositing):
1532         (WebKit):
1533         (BlackBerry::WebKit::WebPageCompositorPrivate::shouldChildWindowsUseDocumentCoordinates):
1534         (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor):
1535         (BlackBerry::WebKit::WebPageCompositor::setChildWindowPlacement):
1536         * Api/WebPageCompositor.h:
1537         * Api/WebPageCompositor_p.h:
1538         (BlackBerry::WebKit::WebPageCompositorPrivate::setChildWindowPlacement):
1539         (WebPageCompositorPrivate):
1540
1541 2013-03-15  Nate Chapin  <japhet@chromium.org>
1542
1543         Hide MainResourceLoader from the outside world
1544         https://bugs.webkit.org/show_bug.cgi?id=109971
1545
1546         Reviewed by Adam Barth.
1547
1548         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1549         (WebCore::FrameLoaderClientBlackBerry::convertMainResourceLoadToDownload):
1550         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
1551         (FrameLoaderClientBlackBerry):
1552
1553 2013-03-15  Abhishek Arya  <inferno@chromium.org>
1554
1555         Replace static_casts with to* helper functions.
1556         https://bugs.webkit.org/show_bug.cgi?id=112401
1557
1558         Reviewed by Stephen Chenney.
1559
1560         to* helper functions are preferred over static_cast calls since they
1561         help to catch bad casts easily on the testing infrastructure.
1562
1563         * Api/WebPage.cpp:
1564         (BlackBerry::WebKit::frameForNode):
1565         (BlackBerry::WebKit::needsLayoutRecursive):
1566         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1567         (WebCore::FrameLoaderClientBlackBerry::redirectDataToPlugin):
1568         * WebKitSupport/InputHandler.cpp:
1569         (BlackBerry::WebKit::InputHandler::ensureFocusPluginElementVisible):
1570
1571 2013-03-14  Manuel Rego Casasnovas  <rego@igalia.com>
1572
1573         Add selectTrailingWhitespaceEnabled setting to WebCore::Page
1574         https://bugs.webkit.org/show_bug.cgi?id=109404
1575
1576         Reviewed by Tony Chang.
1577
1578         Use new settings for smartInsertDeleteEnabled and
1579         selectTrailingWhitespaceEnabled.
1580
1581         Remove code related to DRT as it is not needed anymore.
1582
1583         * Api/DumpRenderTreeClient.h:
1584         * WebCoreSupport/EditorClientBlackBerry.cpp:
1585         (WebCore::EditorClientBlackBerry::smartInsertDeleteEnabled):
1586         (WebCore::EditorClientBlackBerry::isSelectTrailingWhitespaceEnabled):
1587
1588 2013-03-14  Abhishek Arya  <inferno@chromium.org>
1589
1590         Replace static_casts with to* helper functions.
1591         https://bugs.webkit.org/show_bug.cgi?id=112296
1592
1593         Reviewed by Kentaro Hara.
1594
1595         to* helper functions are preferred over static_cast calls since they
1596         help to catch bad casts easily on the testing infrastructure.
1597
1598         * Api/WebPage.cpp:
1599         (BlackBerry::WebKit::WebPagePrivate::webContext):
1600         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
1601         (BlackBerry::WebKit::WebPage::setNodeFocus):
1602         (BlackBerry::WebKit::WebPagePrivate::adjustFullScreenElementDimensionsIfNeeded):
1603         * WebCoreSupport/EditorClientBlackBerry.cpp:
1604         (WebCore::EditorClientBlackBerry::shouldSpellCheckFocusedField):
1605         (WebCore::EditorClientBlackBerry::shouldChangeSelectedRange):
1606         * WebKitSupport/BackingStoreClient.cpp:
1607         (BlackBerry::WebKit::BackingStoreClient::absoluteRect):
1608         * WebKitSupport/DOMSupport.cpp:
1609         (BlackBerry::WebKit::DOMSupport::toTextControlElement):
1610         (BlackBerry::WebKit::DOMSupport::selectionContainerElement):
1611         * WebKitSupport/FatFingers.cpp:
1612         (BlackBerry::WebKit::FatFingers::getRelevantInfoFromCachedHitTest):
1613         (BlackBerry::WebKit::FatFingers::setSuccessfulFatFingersResult):
1614         * WebKitSupport/InputHandler.cpp:
1615         (BlackBerry::WebKit::InputHandler::focusedNodeChanged):
1616         (BlackBerry::WebKit::InputHandler::willOpenPopupForNode):
1617         * WebKitSupport/SelectionHandler.cpp:
1618         (BlackBerry::WebKit::SelectionHandler::inputNodeOverridesTouch):
1619         * WebKitSupport/TouchEventHandler.cpp:
1620         (BlackBerry::WebKit::elementForTapHighlight):
1621
1622 2013-03-14  Alberto Garcia  <agarcia@igalia.com>
1623
1624         [BlackBerry] InRegionScrollableArea: fix call to visibleContentRect()
1625         https://bugs.webkit.org/show_bug.cgi?id=112244
1626
1627         Reviewed by Rob Buis.
1628
1629         Since r143295 visibleContentRect() receives an enum, not a boolean.
1630
1631         * WebKitSupport/InRegionScrollableArea.cpp:
1632         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
1633
1634 2013-03-13  Iris Wu  <shuwu@blackberry.com>
1635
1636         [BlackBerry] Do not do scroll position adjustment if selecting in a subframe
1637         https://bugs.webkit.org/show_bug.cgi?id=112290
1638
1639         Reviewed by Rob Buis.
1640
1641         PR 267394
1642
1643         In SelectionHandler::ensureSelectedTextVisible(), scroll position
1644         animation is based on main frame. If selecting in a subframe, don't
1645         do animation.
1646
1647         Internally Reviewed By Genevieve Mak.
1648
1649         * WebKitSupport/SelectionHandler.cpp:
1650         (BlackBerry::WebKit::SelectionHandler::ensureSelectedTextVisible):
1651
1652 2013-03-13  Genevieve Mak  <gmak@rim.com>
1653
1654         [BlackBerry] Add Proximity Detector.
1655         https://bugs.webkit.org/show_bug.cgi?id=112278
1656
1657         Reviewed by Rob Buis.
1658
1659         Internally Reviewed by Mike Lattanzio.
1660         PR #243385
1661
1662         * WebKitSupport/ProximityDetector.cpp: Added.
1663         (WebKit):
1664         (BlackBerry::WebKit::getPriorityLevel):
1665         (BlackBerry::WebKit::ProximityDetector::ProximityDetector):
1666         (BlackBerry::WebKit::ProximityDetector::~ProximityDetector):
1667         (BlackBerry::WebKit::ProximityDetector::findBestPoint):
1668         * WebKitSupport/ProximityDetector.h: Added.
1669         (WebCore):
1670         (WebKit):
1671         (ProximityDetector):
1672
1673 2013-03-13  Iris Wu  <shuwu@blackberry.com>
1674
1675         [BlackBerry] Touch Hold selection does not scroll text area or other subframe until selection reaches bottom of the page.
1676         https://bugs.webkit.org/show_bug.cgi?id=112259
1677
1678         Reviewed by Rob Buis.
1679
1680         PR 267394
1681
1682         While selecting in a subframe, check that the selection reaches
1683         the bottom of the current subframe instead of the page.
1684
1685         Internally Reviewed by Genevieve Mak.
1686
1687         * Api/InRegionScroller.cpp:
1688         (BlackBerry::WebKit::InRegionScrollerPrivate::updateSelectionScrollView):
1689         * WebKitSupport/SelectionHandler.cpp:
1690         (BlackBerry::WebKit::SelectionHandler::selectAtPoint):
1691         (BlackBerry::WebKit::SelectionHandler::ensureSelectedTextVisible):
1692         (BlackBerry::WebKit::SelectionHandler::selectionViewportRect):
1693         (WebKit):
1694         (BlackBerry::WebKit::SelectionHandler::expandSelectionToGranularity):
1695         * WebKitSupport/SelectionHandler.h:
1696         (BlackBerry::WebKit::SelectionHandler::setSelectionViewportRect):
1697         (SelectionHandler):
1698
1699 2013-03-12  Mike Fenton  <mifenton@rim.com>
1700
1701         [BlackBerry] Prevent text selection inside Colour and Date/Time input fields
1702         https://bugs.webkit.org/show_bug.cgi?id=111733
1703
1704         Reviewed by Rob Buis.
1705
1706         PR 305194.
1707
1708         Skip rendering of selection if it is in a popup driven
1709         input field.  This covers situations where EditorClientBlackBerry::shouldChangeSelectedRange
1710         is either not called or focus is not complete when called.
1711
1712         Informally reviewed by Gen Mak.
1713
1714         * WebKitSupport/SelectionHandler.cpp:
1715         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
1716         (WebKit):
1717
1718 2013-03-12  Genevieve Mak  <gmak@rim.com>
1719
1720         [BlackBerry] Notify client if the selection is in a subframe when started.
1721         https://bugs.webkit.org/show_bug.cgi?id=112065
1722
1723         Reviewed by Rob Buis.
1724
1725         PR #278490
1726         Internally Reviewed by Mike Fenton.
1727
1728         * Api/InRegionScroller.cpp:
1729         (BlackBerry::WebKit::InRegionScrollerPrivate::updateSelectionScrollView):
1730         (WebKit):
1731         * Api/InRegionScroller_p.h:
1732         (InRegionScrollerPrivate):
1733         * Api/WebPage.cpp:
1734         (BlackBerry::WebKit::WebPagePrivate::updateSelectionScrollView):
1735         (WebKit):
1736         * Api/WebPageClient.h:
1737         * Api/WebPage_p.h:
1738         (WebPagePrivate):
1739         * WebKitSupport/SelectionHandler.cpp:
1740         (BlackBerry::WebKit::SelectionHandler::cancelSelection):
1741         (BlackBerry::WebKit::SelectionHandler::setSelection):
1742
1743 2013-03-12  Alberto Garcia  <agarcia@igalia.com>
1744
1745         [BlackBerry] SelectionHandler: fix truncated line
1746         https://bugs.webkit.org/show_bug.cgi?id=112133
1747
1748         Reviewed by Carlos Garcia Campos.
1749
1750         One of the calls to fatFingersResult.nodeAsElementIfApplicable()
1751         was somehow truncated when the selection start animation was
1752         upstreamed in r144640.
1753
1754         * WebKitSupport/SelectionHandler.cpp:
1755         (BlackBerry::WebKit::SelectionHandler::selectAtPoint):
1756
1757 2013-03-12  Alberto Garcia  <agarcia@igalia.com>
1758
1759         [BlackBerry] Fix visible_units.h includes
1760         https://bugs.webkit.org/show_bug.cgi?id=112131
1761
1762         Reviewed by Carlos Garcia Campos.
1763
1764         This file was renamed to VisibleUnits.h in r144911.
1765
1766         * WebKitSupport/DOMSupport.cpp:
1767         * WebKitSupport/InputHandler.cpp:
1768         * WebKitSupport/SelectionHandler.cpp:
1769         * WebKitSupport/SpellingHandler.cpp:
1770
1771 2013-03-11  Jochen Eisinger  <jochen@chromium.org>
1772
1773         Rename DefinitelyProcessingUserGesture to DefinitelyProcessingNewUserGesture
1774         https://bugs.webkit.org/show_bug.cgi?id=111959
1775
1776         Reviewed by Alexey Proskuryakov.
1777
1778         * WebKitSupport/NotificationManager.cpp:
1779         (BlackBerry::WebKit::NotificationManager::notificationClicked):
1780
1781 2013-03-11  Genevieve Mak  <gmak@rim.com>
1782
1783         [BlackBerry] Add a method to find the ScrollView for a text selection.
1784         https://bugs.webkit.org/show_bug.cgi?id=112061
1785
1786         Reviewed by Rob Buis.
1787
1788         Internally reviewed by Mike Fenton and Jakob Petsovits.
1789         PR #278490
1790
1791         Refactor the code in InRegionScroller so that we can add a method to find
1792         the InRegionScrollableArea for a text selection.
1793
1794         * Api/InRegionScroller.cpp:
1795         (BlackBerry::WebKit::InRegionScrollerPrivate::clipToRect):
1796             - Pull out recursive clipping code into its own function.
1797         (WebKit):
1798         (BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint):
1799         (BlackBerry::WebKit::InRegionScrollerPrivate::firstScrollableInRegionForNode):
1800             - This new method allows us to get just the first scrollable region instead of looking
1801               for more nested ones. We may want to refactor in the future because some of the code is
1802               very similar to calculateInRegionScrollableAreasForPoint.
1803         (BlackBerry::WebKit::InRegionScrollerPrivate::clipAndCreateInRegionScrollableArea):
1804             - Add a convenience method for the previous function
1805         * Api/InRegionScroller.h:
1806         (WebKit):
1807         * Api/InRegionScroller_p.h:
1808         (InRegionScrollerPrivate):
1809
1810 2013-03-11  Genevieve Mak  <gmak@rim.com>
1811
1812         [BlackBerry] Set the documentViewportRect and viewport size.
1813         https://bugs.webkit.org/show_bug.cgi?id=112056
1814
1815         Reviewed by Rob Buis.
1816
1817         Internally reviewed by Mike Fenton and Jakob Petsovits.
1818         PR #278490
1819
1820         * WebKitSupport/InRegionScrollableArea.cpp:
1821         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
1822
1823 2013-03-11  Alberto Garcia  <agarcia@igalia.com>
1824
1825         [BlackBerry] SelectionHandler: bring back m_lastSelection attribute
1826         https://bugs.webkit.org/show_bug.cgi?id=111972
1827
1828         Reviewed by Rob Buis.
1829
1830         This was removed in r144515 but is still needed by
1831         SelectionHandler::selectionPositionChanged().
1832
1833         * WebKitSupport/SelectionHandler.h:
1834         (SelectionHandler):
1835
1836 2013-03-07  Otto Derek Cheung  <otcheung@rim.com>
1837
1838         [BlackBerry] RefCounting ParsedCookie to avoid SegFaults
1839         https://bugs.webkit.org/show_bug.cgi?id=111761
1840
1841         Reviewed by Rob Buis.
1842
1843         Making necessary changes to ref-count the ParsedCookie object.
1844
1845         * Api/WebCookieJar.cpp:
1846         (BlackBerry::WebKit::WebCookieJar::cookies):
1847
1848 2013-03-07  Mike Fenton  <mifenton@rim.com>
1849
1850         [BlackBerry] Prevent text selection inside Colour and Date/Time input fields
1851         https://bugs.webkit.org/show_bug.cgi?id=111733
1852
1853         Reviewed by Rob Buis.
1854
1855         PR 305194.
1856
1857         Prevent selection for popup input fields as they are buttons.
1858
1859         Informally Reviewed Gen Mak.
1860
1861         * WebCoreSupport/EditorClientBlackBerry.cpp:
1862         (WebCore::EditorClientBlackBerry::shouldChangeSelectedRange):
1863
1864 2013-03-06  Nima Ghanavatian  <nghanavatian@rim.com>
1865
1866         [BlackBerry] Selection handles don't drag to expand correctly for RTL languages
1867         https://bugs.webkit.org/show_bug.cgi?id=111618
1868
1869         Reviewed by Rob Buis.
1870
1871         PR 303712
1872         If we are using a RTL language, we should ensure that the selection handles are angled the right way.
1873         Further, when expanding the selection, the start and end handles should be appropriately set so that
1874         expansion in the natural direction is possible.
1875
1876         Internally reviewed by Mike Fenton.
1877
1878         * WebKitSupport/SelectionHandler.cpp:
1879         (BlackBerry::WebKit::SelectionHandler::SelectionHandler):
1880         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
1881         * WebKitSupport/SelectionHandler.h:
1882         (SelectionHandler):
1883
1884 2013-03-06  Carlos Garcia Campos  <cgarcia@igalia.com>
1885
1886         [BlackBerry] Use the new authenticationChallenge API in WebPage
1887         https://bugs.webkit.org/show_bug.cgi?id=111542
1888
1889         Reviewed by Rob Buis.
1890
1891         Use the new API that expects requestURL and isProxy parameters.
1892
1893         * Api/WebPage.cpp:
1894         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
1895         * Api/WebPageClient.h:
1896
1897 2013-03-05  Geoffrey Garen  <ggaren@apple.com>
1898
1899         Removed some dead code in the page cache
1900         https://bugs.webkit.org/show_bug.cgi?id=111525
1901
1902         Reviewed by Alexey Proskuryakov.
1903
1904         Page cache autorelease doesn't exist anymore, so there's no need to keep
1905         around these olds hacks.
1906
1907         * Api/BlackBerryGlobal.cpp:
1908         (BlackBerry::WebKit::clearMemoryCaches):
1909         * Api/WebPage.cpp:
1910         (BlackBerry::WebKit::WebPage::destroy):
1911
1912 2013-03-06  Carlos Garcia Campos  <cgarcia@igalia.com>
1913
1914         [BlackBerry] Use CachedResource::resourceBuffer() instead of CachedResource::data()
1915         https://bugs.webkit.org/show_bug.cgi?id=111555
1916
1917         Reviewed by Rob Buis.
1918
1919         CachedResource::data() was renamed to
1920         CachedResource::resourceBuffer() in r130947.
1921
1922         * Api/WebPage.cpp:
1923         (BlackBerry::WebKit::WebPagePrivate::webContext):
1924
1925 2013-03-06  Carlos Garcia Campos  <cgarcia@igalia.com>
1926
1927         [BlackBerry] Remove some unneeded header includes
1928         https://bugs.webkit.org/show_bug.cgi?id=111545
1929
1930         Reviewed by Rob Buis.
1931
1932         * WebCoreSupport/CredentialTransformData.cpp:
1933         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1934
1935 2013-03-06  Carlos Garcia Campos  <cgarcia@igalia.com>
1936
1937         [BlackBerry] Use hasTagName instead of hasLocalName in CredentialTransformData
1938         https://bugs.webkit.org/show_bug.cgi?id=111544
1939
1940         Reviewed by Rob Buis.
1941
1942         hasLocalName() expects an AtomicString, but we are passing a
1943         HTMLName which is a QualifiedName.
1944
1945         * WebCoreSupport/CredentialTransformData.cpp:
1946         (WebCore::CredentialTransformData::findPasswordFormFields): Use
1947         hasTagName() instead of hasLocalName().
1948
1949 2013-03-05  Otto Derek Cheung  <otcheung@rim.com>
1950
1951         [BlackBerry] Authentication credentials lost when opening a new tab
1952         https://bugs.webkit.org/show_bug.cgi?id=111445
1953
1954         PR 286627
1955
1956         Reviewed by Rob Buis.
1957         Internally Reviewed by Lianghui Chen.
1958
1959         Prevent changing the private mode boolean value in didChangeSettings if the value
1960         hasn't changed.
1961
1962         Setting the private mode value of credentialstorage every time didChangeSettings gets
1963         called causes the session credential mapping to be cleared on every tab change in
1964         non-private mode.
1965
1966         Tested changing tabs after logging into a site using the HTTP Basic Auth protocol to see
1967         if the credentials are cleared. Also ensured the functionality of private mode is not changed.
1968
1969         * Api/WebPage.cpp:
1970         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
1971
1972 2013-03-05  Tiancheng Jiang  <tijiang@rim.com>
1973
1974         [BlackBerry] FatFinger pairs the wrong element with fatfinger rect part.
1975         https://bugs.webkit.org/show_bug.cgi?id=111444
1976
1977         Reviewed by Rob Buis.
1978
1979         Internal PR 266214
1980         Internally reviewed by Genevieve Mak.
1981
1982         Instead of subtracting with the element region, we should get the remaining
1983         rect by find the intersect region of element region and fatfinger detection
1984         region.
1985
1986
1987         * WebKitSupport/FatFingers.cpp:
1988         (BlackBerry::WebKit::FatFingers::checkForClickableElement):
1989
1990 2013-03-05  Andrew Lo  <anlo@rim.com>
1991
1992         [BlackBerry] Clean up animated scroll/zoom code in WebPagePrivate
1993         https://bugs.webkit.org/show_bug.cgi?id=111373
1994
1995         Reviewed by Rob Buis.
1996
1997         Internally reviewed by Jakob Petsovits.
1998         Internal PR 285468.
1999
2000         Have WebPageClient pass the final scale and position to WebPage when a zoom/scroll
2001         animation finishes, rather than keeping those values as instance variables in
2002         WebPagePrivate.
2003
2004         Rename some functions & variables to reflect that they are used for both block zoom
2005         and generic zoom/scroll animations.
2006
2007         * Api/WebPage.cpp:
2008         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
2009         (BlackBerry::WebKit::WebPagePrivate::zoomAnimationFinished):
2010         (BlackBerry::WebKit::WebPage::zoomAnimationFinished):
2011         (BlackBerry::WebKit::WebPagePrivate::resetBlockZoom):
2012         (BlackBerry::WebKit::WebPage::blockZoom):
2013         (BlackBerry::WebKit::WebPagePrivate::animateToScaleAndDocumentScrollPosition):
2014         * Api/WebPage.h:
2015         * Api/WebPageClient.h:
2016         * Api/WebPage_p.h:
2017         (WebPagePrivate):
2018
2019 2013-03-04  Iris Wu  <shuwu@rim.com>
2020
2021         [BlackBerry] Upstream selection start animation.
2022         https://bugs.webkit.org/show_bug.cgi?id=111335
2023
2024         Reviewed by Rob Buis.
2025
2026         PR 219960
2027
2028         To indicate selection starts, we draw an overlay rect larger than
2029         the selected word at the start of selection. Then shrink it down
2030         to the actual size.
2031
2032         Reviewed Internally by Genevieve Mak and Andrew Lo and Mike Fenton.
2033
2034         * Api/WebAnimation.cpp:
2035         (BlackBerry::WebKit::WebAnimation::shrinkAnimation):
2036         (WebKit):
2037         * Api/WebAnimation.h:
2038         * Api/WebPage.cpp:
2039         (BlackBerry::WebKit::WebPagePrivate::init):
2040         (BlackBerry::WebKit::WebPage::selectionHighlight):
2041         (WebKit):
2042         * Api/WebPage.h:
2043         * Api/WebPage_p.h:
2044         (WebPagePrivate):
2045         * Api/WebTapHighlight.h:
2046         * WebKitSupport/DefaultTapHighlight.cpp:
2047         (WebKit):
2048         (BlackBerry::WebKit::shrinkAnimationName):
2049         (BlackBerry::WebKit::DefaultTapHighlight::draw):
2050         * WebKitSupport/DefaultTapHighlight.h:
2051         (DefaultTapHighlight):
2052         * WebKitSupport/SelectionHandler.cpp:
2053         (BlackBerry::WebKit::SelectionHandler::cancelSelection):
2054         (BlackBerry::WebKit::textGranularityFromSelectionExpansionType):
2055         (WebKit):
2056         (BlackBerry::WebKit::SelectionHandler::selectNodeIfFatFingersResultIsLink):
2057         (BlackBerry::WebKit::SelectionHandler::selectAtPoint):
2058         * WebKitSupport/SelectionHandler.h:
2059         (SelectionHandler):
2060         * WebKitSupport/TouchEventHandler.cpp:
2061         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
2062
2063 2013-03-02  Benjamin Poulain  <bpoulain@apple.com>
2064
2065         Move computedStyleIncludingVisitedInfo from TestRunner to Internals
2066         https://bugs.webkit.org/show_bug.cgi?id=109772
2067
2068         Reviewed by Andreas Kling.
2069
2070         * WebKitSupport/DumpRenderTreeSupport.cpp:
2071         * WebKitSupport/DumpRenderTreeSupport.h:
2072         (DumpRenderTreeSupport):
2073
2074 2013-03-01  Iris Wu  <shuwu@rim.com>
2075
2076         [BlackBerry] Upstream smart selection
2077         https://bugs.webkit.org/show_bug.cgi?id=111226
2078
2079         Reviewed by Rob Buis.
2080
2081         1.  Extend the touch hold text selection to next paragraph.
2082         2.  Draw and expand overlay over text as touch hold selection expands.
2083             Select paragraph when it's entirely covered by overlay.
2084         3.  Start scrolling at a constant rate when the end of
2085             next pargraph is not in the viewport.
2086
2087         Reviewed Internally By Genevieve Mak and Mike Fenton.
2088         PR 217897 238485 258279 279042 299779
2089
2090         * Api/WebPage.cpp:
2091         (BlackBerry::WebKit::WebPage::selectAtDocumentPoint):
2092         (BlackBerry::WebKit::WebPage::expandSelection):
2093         (WebKit):
2094         (BlackBerry::WebKit::WebPage::setOverlayExpansionPixelHeight):
2095         (BlackBerry::WebKit::WebPagePrivate::setOverlayExpansionPixelHeight):
2096         (BlackBerry::WebKit::WebPage::setParagraphExpansionPixelScrollMargin):
2097         * Api/WebPage.h:
2098         * Api/WebPageClient.h:
2099         * Api/WebPage_p.h:
2100         (WebPagePrivate):
2101         * WebKitSupport/SelectionHandler.cpp:
2102         (BlackBerry::WebKit::SelectionHandler::cancelSelection):
2103         (BlackBerry::WebKit::SelectionHandler::selectAtPoint):
2104         (BlackBerry::WebKit::isInvalidLine):
2105         (WebKit):
2106         (BlackBerry::WebKit::isInvalidParagraph):
2107         (BlackBerry::WebKit::SelectionHandler::selectNextParagraph):
2108         (BlackBerry::WebKit::SelectionHandler::drawOverlay):
2109         (BlackBerry::WebKit::SelectionHandler::findNextOverlayRegion):
2110         (BlackBerry::WebKit::SelectionHandler::expandSelection):
2111         (BlackBerry::WebKit::SelectionHandler::ensureSelectedTextVisible):
2112         (BlackBerry::WebKit::SelectionHandler::setParagraphExpansionScrollMargin):
2113         (BlackBerry::WebKit::SelectionHandler::expandSelectionToGranularity):
2114         * WebKitSupport/SelectionHandler.h:
2115         (SelectionHandler):
2116         (BlackBerry::WebKit::SelectionHandler::setOverlayExpansionHeight):
2117
2118 2013-03-01  Jacky Jiang  <zhajiang@rim.com>
2119
2120         [BlackBerry] Screen went black while navigating back/forward on the reddit.com page
2121         https://bugs.webkit.org/show_bug.cgi?id=111192
2122
2123         Reviewed by Rob Buis.
2124         Internally reviewed by Jakob Petsovits.
2125
2126         PR: 299783
2127         When going back to the previous reddit.com page, the actual contents
2128         size was much less than the history contents size. However, we expanded
2129         the actual contents size to history contents size which caused a huge
2130         black area below the actual contents.
2131         To fix that, don't restore the contents size from history contents size
2132         and scroll back to the valid contents area if we are about to overscroll.
2133
2134         * Api/WebPage.cpp:
2135         (BlackBerry::WebKit::WebPagePrivate::restoreHistoryViewState):
2136         * Api/WebPage_p.h:
2137         (WebPagePrivate):
2138         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2139         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
2140
2141 2013-03-01  Mike Fenton  <mifenton@rim.com>
2142
2143         [BlackBerry] Improve input bounds clipping for search fields.
2144         https://bugs.webkit.org/show_bug.cgi?id=111204
2145
2146         Reviewed by Rob Buis.
2147
2148         PR 292673.
2149
2150         Use the standardized InputHandler function to get the
2151         bounds of an input field so that search fields are
2152         truncated smaller to account for the X.
2153
2154         Reviewed Internally by Gen Mak.
2155
2156         * WebKitSupport/SelectionHandler.cpp:
2157         (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
2158
2159 2013-03-01  Nima Ghanavatian  <nghanavatian@rim.com>
2160
2161         [BlackBerry] Reverse the base and extent of a selection when reversing its handles
2162         https://bugs.webkit.org/show_bug.cgi?id=111098
2163
2164         Reviewed by Yong Li.
2165
2166         PR283969
2167         Swap the base and extent if base does not come first, and set the new selection.
2168
2169         Internally reviewed by Mike Fenton
2170
2171         * WebKitSupport/SelectionHandler.cpp:
2172         (BlackBerry::WebKit::SelectionHandler::setSelection):
2173
2174 2013-03-01  Alberto Garcia  <albgarcia@rim.com>
2175
2176         Fix definition of DatePickerClient::setValue()
2177         https://bugs.webkit.org/show_bug.cgi?id=110336
2178
2179         Reviewed by Carlos Garcia Campos.
2180
2181         The definition of DatePickerClient::setValue() introduced in
2182         r142987 does not match the prototype.
2183
2184         * WebCoreSupport/DatePickerClient.cpp:
2185         (WebCore::DatePickerClient::setValue):
2186
2187 2013-02-28  Mike Fenton  <mifenton@rim.com>
2188
2189         [BlackBerry] Maintain the directionality of the selection after modifying the selection using key events.
2190         https://bugs.webkit.org/show_bug.cgi?id=111078
2191
2192         Reviewed by Yong Li.
2193
2194         PR 295224.
2195
2196         When using the key navigation to modify the selection, reset the
2197         directionality of the selection to the original to prevent
2198         changing the anchor.
2199
2200         Reviewed Internally by Nima Ghanavatian.
2201
2202         * WebKitSupport/SelectionHandler.cpp:
2203         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
2204
2205 2013-02-28  Lianghui Chen  <liachen@rim.com>
2206
2207         [BlackBerry] Disable auto-filling password in forms when auto-form-filling is not enabled.
2208         https://bugs.webkit.org/show_bug.cgi?id=111006
2209
2210         Internal PR: 295181
2211         Internal reviewed by Joe Mason.
2212
2213         Reviewed by Yong Li.
2214
2215         Check WebSettings::isFormAutofillEnabled() before doing user credential form fill stuff.
2216
2217         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2218         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFinishLoad):
2219         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendSubmitEvent):
2220
2221 2013-02-28  Alberto Garcia  <albgarcia@rim.com>
2222
2223         [BlackBerry] Misc build fixes
2224         https://bugs.webkit.org/show_bug.cgi?id=110448
2225
2226         Reviewed by Rob Buis.
2227
2228         * Api/WebPage.cpp:
2229         (BlackBerry::WebKit::WebPagePrivate::executeJavaScript):
2230         WebString was replaced with BlackBerry::Platform::String in r131316.
2231         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
2232         Some webdatabase APIs are encapuslated in DatabaseManager since r137520.
2233         (BlackBerry::WebKit::WebPagePrivate::postponeDocumentStyleRecalc):
2234         Document::isPendingStyleRecalc() was renamed to hasPendingStyleRecalc() in r129844.
2235         * WebKitSupport/InputHandler.cpp:
2236         (BlackBerry::WebKit::InputHandler::updateFormState):
2237         Add closing brace that was missing in r142482.
2238
2239 2013-02-28  Xan Lopez  <xlopez@rim.com>
2240
2241         [BlackBerry] DumpRenderTreeSupport: update the set position methods
2242         https://bugs.webkit.org/show_bug.cgi?id=110578
2243
2244         Reviewed by Rob Buis.
2245
2246         TestRunner::setMockGeolocationPosition() changed in r130416:
2247         http://trac.webkit.org/changeset/130416/trunk/Tools/DumpRenderTree/TestRunner.h
2248
2249         * WebKitSupport/DumpRenderTreeSupport.cpp:
2250         (DumpRenderTreeSupport::setMockGeolocationPosition):
2251         * WebKitSupport/DumpRenderTreeSupport.h:
2252         (DumpRenderTreeSupport):
2253
2254 2013-02-27  Andrew Lo  <anlo@rim.com>
2255
2256         [BlackBerry] Need WebPage API for animating scroll position & zoom changes
2257         https://bugs.webkit.org/show_bug.cgi?id=110912
2258
2259         Reviewed by Rob Buis.
2260
2261         Internally reviewed by Jakob Petsovits.
2262         Internal PR 285468.
2263
2264         Add an API to WebPage for animated scroll position & zoom level
2265         adjustments.
2266
2267         Have InputHandler use the new API.
2268
2269         Rename some variables to reflect the fact that they are not only
2270         used by block zoom now.
2271
2272         * Api/WebPage.cpp:
2273         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
2274         (BlackBerry::WebKit::WebPagePrivate::zoomBlock):
2275         (BlackBerry::WebKit::WebPage::blockZoom):
2276         (BlackBerry::WebKit::WebPagePrivate::animateToScaleAndDocumentScrollPosition):
2277         (WebKit):
2278         (BlackBerry::WebKit::WebPage::animateToScaleAndDocumentScrollPosition):
2279         * Api/WebPage.h:
2280         * Api/WebPage_p.h:
2281         (WebPagePrivate):
2282         * WebKitSupport/InputHandler.cpp:
2283         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
2284
2285 2013-02-27  Lianghui Chen  <liachen@rim.com>
2286
2287         [BlackBerry] User credentials is not correctly handled
2288         https://bugs.webkit.org/show_bug.cgi?id=110994
2289
2290         Reviewed by Yong Li.
2291
2292         Following change are made:
2293             Remove url from CredentialTransformData, as url is not used anymore.
2294             Adapt to updated CredentialBackingStore API about removing url.
2295
2296         * Api/WebPage.cpp:
2297         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
2298         * WebCoreSupport/CredentialManager.cpp:
2299         (WebCore::CredentialManager::autofillPasswordForms):
2300         (WebCore::CredentialManager::saveCredentialIfConfirmed):
2301         * WebCoreSupport/CredentialTransformData.cpp:
2302         (WebCore::CredentialTransformData::CredentialTransformData):
2303         * WebCoreSupport/CredentialTransformData.h:
2304         (CredentialTransformData):
2305
2306 2013-02-27  John Griggs  <jgriggs@rim.com>
2307
2308         2013-02-27  John Griggs  <jgriggs@rim.com>
2309
2310         Fix bug in HTML5 Fullscreen API implementation that was preventing YouTube HTML5 media controls fullscreen button from working properly.
2311         https://bugs.webkit.org/show_bug.cgi?id=110905
2312
2313         Reviewed by Yong Li.
2314
2315         Return true from ChromeClientBlackBerry::supportsFullScreenForElement instead of the negation of the boolean flag (withKeyboard) passed in.
2316
2317         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2318         (WebCore::ChromeClientBlackBerry::supportsFullScreenForElement):
2319
2320 2013-02-27  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
2321
2322         [BlackBerry] Context menu cannot be invoked after doing text selection in landscape mode
2323         https://bugs.webkit.org/show_bug.cgi?id=110860
2324
2325         Reviewed by Yong Li.
2326
2327         PR 290248 Internally reviewed by Mike Fenton
2328
2329         Add a parameter to notify the webpage client which parts of selection have
2330         changed in visual or in its selected DOM content. Refactor the selection details
2331         parameter to platform repo.
2332
2333         The reason of this issue is that when javascript triggers webpage layout, the selection
2334         will update its apperance event when the selected content is not changed. We want
2335         to hide the context menu only when the selected content is changed not when only its
2336         visual is changed.
2337
2338 * Api/WebPageClient.h:
2339         (Platform):
2340         * WebKitSupport/SelectionHandler.cpp:
2341         (BlackBerry::WebKit::SelectionHandler::cancelSelection):
2342         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
2343         * WebKitSupport/SelectionHandler.h:
2344         (SelectionHandler):
2345
2346 2013-02-27  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
2347
2348         [BlackBerry] The virtual keyboard hides part of Signing In dialog
2349         https://bugs.webkit.org/show_bug.cgi?id=110836
2350
2351         Reviewed by Yong Li.
2352
2353         PR # 283427 Internally reviewed by Mike Fenton.
2354
2355         Store form credentials before javascript "onSubmit" event and notify
2356         webpage client to save credentials after that event since javascript
2357         may check credentials and stop the submission in its event handler.
2358
2359         * WebCoreSupport/CredentialTransformData.cpp:
2360         (WebCore::CredentialTransformData::CredentialTransformData):
2361         (WebCore):
2362         * WebCoreSupport/CredentialTransformData.h:
2363         (CredentialTransformData):
2364         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2365         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSubmitForm):
2366         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendSubmitEvent):
2367         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
2368         (FrameLoaderClientBlackBerry):
2369
2370 2013-02-27  Mike Fenton  <mifenton@rim.com>
2371
2372         [BlackBerry] Accept key events even when composing region is active.
2373         https://bugs.webkit.org/show_bug.cgi?id=110617
2374
2375         Reviewed by Rob Buis.
2376
2377         PR 293598.
2378
2379         Fix a regression in the previous patch caused
2380         by an unhandled Alt key down being sent through
2381         by IMF.
2382
2383         Reviewed Internally by Nima Ghanavatian.
2384
2385         * WebKitSupport/InputHandler.cpp:
2386         (BlackBerry::WebKit::InputHandler::updateFormState):
2387         * WebKitSupport/InputHandler.h:
2388         (InputHandler):
2389
2390 2013-02-26  Yong Li  <yoli@rim.com>
2391
2392         [BlackBerry] Use APIEntryShim when making JS call
2393         https://bugs.webkit.org/show_bug.cgi?id=110787
2394
2395         Reviewed by Rob Buis.
2396
2397         PR# 301451.
2398         Use APIEntryShim to fix an assert and ensure it is thread-safe.
2399
2400         * Api/WebPage.cpp:
2401         (BlackBerry::WebKit::WebPage::executeJavaScriptFunction):
2402
2403 2013-02-26  Alberto Garcia  <agarcia@igalia.com>
2404
2405         [BlackBerry] Upstream the datalist support UI
2406         https://bugs.webkit.org/show_bug.cgi?id=110736
2407
2408         Reviewed by Rob Buis.
2409
2410         Original code by Otto Derek Cheung <otcheung@rim.com>
2411
2412         * WebCoreSupport/SuggestionBoxElement.cpp: Added.
2413         (WebCore):
2414         (WebCore::SuggestionBoxElement::SuggestionBoxElement):
2415         (WebCore::SuggestionBoxElement::~SuggestionBoxElement):
2416         (WebCore::SuggestionBoxElement::create):
2417         (WebCore::SuggestionBoxElement::defaultEventHandler):
2418         * WebCoreSupport/SuggestionBoxElement.h: Added.
2419         (WebCore):
2420         (SuggestionBoxElement):
2421         * WebCoreSupport/SuggestionBoxHandler.cpp: Added.
2422         (WebCore):
2423         (WebCore::SuggestionBoxHandler::SuggestionBoxHandler):
2424         (WebCore::SuggestionBoxHandler::~SuggestionBoxHandler):
2425         (WebCore::SuggestionBoxHandler::create):
2426         (WebCore::SuggestionBoxHandler::setInputElementAndUpdateDisplay):
2427         (WebCore::SuggestionBoxHandler::showDropdownBox):
2428         (WebCore::SuggestionBoxHandler::hideDropdownBox):
2429         (WebCore::SuggestionBoxHandler::changeInputElementInnerTextValue):
2430         (WebCore::SuggestionBoxHandler::parseSuggestions):
2431         (WebCore::SuggestionBoxHandler::insertSuggestionsToDropdownBox):
2432         (WebCore::adjustDropdownBoxPosition):
2433         (WebCore::SuggestionBoxHandler::buildDropdownBoxTree):
2434         * WebCoreSupport/SuggestionBoxHandler.h: Added.
2435         (WebCore):
2436         (SuggestionBoxHandler):
2437         (WebCore::SuggestionBoxHandler::focusedElement):
2438         * WebKitSupport/InputHandler.cpp:
2439         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
2440         (BlackBerry::WebKit::InputHandler::updateFormState):
2441         * WebKitSupport/InputHandler.h:
2442         (WebCore):
2443         (InputHandler):
2444         * WebKitSupport/TouchEventHandler.cpp:
2445         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
2446
2447 2013-02-25  Yongxin Dai  <yodai@rim.com>
2448
2449         [BlackBerry] Add isInputMode() method to WebPage class.
2450         https://bugs.webkit.org/show_bug.cgi?id=110754
2451
2452         Reviewed by Rob Buis.
2453
2454         PR #262569.
2455
2456         There is a case we need to know if the active node is content editable
2457         from TouchHandlerWebKitThread class. WebPage::isInputMode() just delegates
2458         InputHandler::isInputMode().
2459
2460         Reviewed Internally by Mike Fenton.
2461
2462         * Api/WebPage.cpp:
2463         (BlackBerry::WebKit::WebPage::isInputMode):
2464         (WebKit):
2465         * Api/WebPage.h:
2466
2467 2013-02-25  Mike Fenton  <mifenton@rim.com>
2468
2469         [BlackBerry] Force form submission when implicit submission fails.
2470         https://bugs.webkit.org/show_bug.cgi?id=110627
2471
2472         Reviewed by Rob Buis.
2473
2474         PR 286023.
2475
2476         When implicit form submission does not submit the form
2477         do a direct submission of the form.
2478
2479         Reviewed Internally by Nima Ghanavatian.
2480
2481         * WebKitSupport/InputHandler.cpp:
2482         (BlackBerry::WebKit::InputHandler::updateFormState):
2483
2484 2013-02-25  Tiancheng Jiang  <tijiang@rim.com>
2485
2486         [BlackBerry]Adjust fatfinger detection rect size.
2487         https://bugs.webkit.org/show_bug.cgi?id=108678
2488
2489         Reviewed by Rob Buis.
2490
2491         Fix a typo in function names.
2492
2493         * WebKitSupport/FatFingers.cpp:
2494         (BlackBerry::WebKit::FatFingers::getNodesFromRect):
2495
2496 2013-02-25  Alberto Garcia  <albgarcia@rim.com>
2497
2498         [BlackBerry] ChromeClientBlackBerry: fix variable names
2499         https://bugs.webkit.org/show_bug.cgi?id=110562
2500
2501         Reviewed by Rob Buis.
2502
2503         manager was incorrectly renamed back to tracker in r138696:
2504         http://trac.webkit.org/changeset/138696/trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp
2505
2506         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2507         (WebCore::ChromeClientBlackBerry::exceededDatabaseQuota):
2508
2509 2013-02-24  Alberto Garcia  <albgarcia@rim.com>
2510
2511         [BlackBerry] GeolocationClientBlackBerry: add missing headers
2512         https://bugs.webkit.org/show_bug.cgi?id=110563
2513
2514         Reviewed by Benjamin Poulain.
2515
2516         Frame.h and SecurityOrigin.h are necessary since r136969.
2517         GeolocationPosition.h since r132360.
2518
2519         * WebCoreSupport/GeolocationClientBlackBerry.cpp:
2520
2521 2013-02-24  Alberto Garcia  <albgarcia@rim.com>
2522
2523         [BlackBerry] FatFingers: move rectForPoint() from HitTestResult to HitTestLocation
2524         https://bugs.webkit.org/show_bug.cgi?id=110570
2525
2526         Reviewed by Allan Sandfeld Jensen.
2527
2528         HitTestResult is no longer a HitTestLocation:
2529         http://trac.webkit.org/changeset/135710/trunk/Source/WebCore/rendering/HitTestResult.h
2530
2531         * WebKitSupport/FatFingers.cpp:
2532         (BlackBerry::WebKit::FatFingers::fingerRectForPoint):
2533
2534 2013-02-22  Mike Fenton  <mifenton@rim.com>
2535
2536         [BlackBerry] Eliminate invalid clipping for content editable selections
2537         https://bugs.webkit.org/show_bug.cgi?id=110630
2538
2539         Reviewed by Rob Buis.
2540
2541         PR 284629.
2542
2543         Remove selection clipping for content editable
2544         fields as the bounds aren't valid and cause
2545         clipping based on starting node rather than the
2546         union of nodes.
2547
2548         Reviewed Internally by Nima Ghanavatian.
2549
2550         * WebKitSupport/InputHandler.cpp:
2551         (BlackBerry::WebKit::InputHandler::updateFormState):
2552         * WebKitSupport/SelectionHandler.cpp:
2553         (BlackBerry::WebKit::SelectionHandler::clippingRectForVisibleContent):
2554
2555 2013-02-22  Tiancheng Jiang  <tijiang@rim.com>
2556
2557         [BlackBerry]Adjust fatfinger detection rect size
2558         https://bugs.webkit.org/show_bug.cgi?id=108678.
2559
2560         Reviewed by Antonio Gomes.
2561
2562         Changing HitTestRequest::IgnoreClipping does not solve the problem that
2563         FatFinger rect detect the element out of the viewport. We have to clip
2564         the fatfinger rect according to the current viewport size to avoid picking
2565         the element out of the viewport.
2566
2567         * WebKitSupport/FatFingers.cpp:
2568         (BlackBerry::WebKit::FatFingers::fingerRectForPoint):
2569         (BlackBerry::WebKit::FatFingers::findBestPoint):
2570         (BlackBerry::WebKit::FatFingers::getAdjustedPaddings):
2571         (BlackBerry::WebKit::FatFingers::getNodesFromRect):
2572         * WebKitSupport/FatFingers.h:
2573
2574 2013-02-22  Mike Fenton  <mifenton@rim.com>
2575
2576         [BlackBerry] Accept key events even when composing region is active.
2577         https://bugs.webkit.org/show_bug.cgi?id=110617
2578
2579         Reviewed by Rob Buis.
2580
2581         PR 293598.
2582
2583         Don't reject key events that arrive when composing region is active,
2584         this can prevent navigation events from firing, instead end
2585         the composition and process the key.
2586
2587         Reviewed Internally by Nima Ghanavatian.
2588
2589         * WebKitSupport/InputHandler.cpp:
2590         (BlackBerry::WebKit::InputHandler::updateFormState):
2591
2592 2013-02-22  Carlos Garcia Campos  <cargarcia@rim.com>
2593
2594         [BlackBerry] Rename first/second to key/value in HashMap iterators
2595         https://bugs.webkit.org/show_bug.cgi?id=110577
2596
2597         Reviewed by Rob Buis.
2598
2599         Iterators were renamed to key/value in r130612.
2600
2601         * WebKitSupport/NotificationManager.cpp:
2602         (BlackBerry::WebKit::NotificationManager::show):
2603         (BlackBerry::WebKit::NotificationManager::clearNotifications):
2604         (BlackBerry::WebKit::NotificationManager::removeNotificationFromContextMap):
2605
2606 2013-02-22  Carlos Garcia Campos  <cargarcia@rim.com>
2607
2608         [BlackBerry] Remove ProtocolHandler methods from ChromeClientBlackBerry
2609         https://bugs.webkit.org/show_bug.cgi?id=110567
2610
2611         Reviewed by Rob Buis.
2612
2613         They were removed from ChromeClient in r122810 and are now
2614         implemented in NavigatorContentUtilsClientBlackBerry since r131056.
2615
2616         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2617         * WebCoreSupport/ChromeClientBlackBerry.h:
2618         (ChromeClientBlackBerry):
2619
2620 2013-02-22  Xan Lopez  <xlopez@rim.com>
2621
2622         [BlackBerry] DomSupport: use NodeTraversal APIs
2623         https://bugs.webkit.org/show_bug.cgi?id=110467
2624
2625         Reviewed by Antonio Gomes.
2626
2627         * WebKitSupport/DOMSupport.cpp:
2628         (BlackBerry::WebKit::DOMSupport::visibleTextQuads):
2629
2630 2013-02-21  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
2631
2632         Allow to retrieve the request data from abstract TextCheckingRequest to be accessible for WK2
2633         https://bugs.webkit.org/show_bug.cgi?id=110208
2634
2635         Reviewed by Hajime Morrita.
2636
2637         * WebKitSupport/InputHandler.cpp:
2638         (BlackBerry::WebKit::InputHandler::requestCheckingOfString):
2639         Extract the request data as it is the member of 'TextCheckingRequest'.
2640
2641 2013-02-21  Andrew Lo  <anlo@rim.com>
2642
2643         [BlackBerry] WebPagePrivate::load should not check new window policy
2644         https://bugs.webkit.org/show_bug.cgi?id=110403
2645
2646         Reviewed by Rob Buis.
2647
2648         Based on my understanding of changeset 135952, we should
2649         not check the new window policy in WebPagePrivate::load.
2650
2651         None of the other ports seem to do this, except for plugins.
2652
2653         * Api/WebPage.cpp:
2654         (BlackBerry::WebKit::WebPagePrivate::load):
2655
2656 2013-02-21  Alberto Garcia  <albgarcia@rim.com>
2657
2658         [BlackBerry] BackingStore: replace instrument{Begin,Cancel}Frame with did{Begin,Cancel}Frame
2659         https://bugs.webkit.org/show_bug.cgi?id=110460
2660
2661         Reviewed by Rob Buis.
2662
2663         This was renamed incorrectly in r142879.
2664
2665         * Api/BackingStore.cpp:
2666         (BlackBerry::WebKit::BackingStorePrivate::instrumentBeginFrame):
2667         (BlackBerry::WebKit::BackingStorePrivate::instrumentCancelFrame):
2668
2669 2013-02-21  Carlos Garcia Campos  <cargarcia@rim.com>
2670
2671         [BlackBerry] Extra ResourceRequest parameter in FrameLoaderClientBlackBerry::convertMainResourceLoadToDownload
2672         https://bugs.webkit.org/show_bug.cgi?id=110451
2673
2674         Reviewed by Rob Buis.
2675
2676         Remove the extra ResourceRequest parameter from
2677         FrameLoaderClientBlackBerry::convertMainResourceLoadToDownload.
2678
2679         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2680         (WebCore::FrameLoaderClientBlackBerry::convertMainResourceLoadToDownload):
2681         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
2682         (FrameLoaderClientBlackBerry):
2683
2684 2013-02-21  Xan Lopez  <xlopez@rim.com>
2685
2686         [BlackBerry] Adapt to name changes in WebCore::ViewPortArguments
2687         https://bugs.webkit.org/show_bug.cgi?id=110469
2688
2689         Reviewed by Rob Buis.
2690
2691         This changed in r134765.
2692
2693         * Api/WebViewportArguments.cpp:
2694         (BlackBerry::WebKit::WebViewportArguments::zoom):
2695         (BlackBerry::WebKit::WebViewportArguments::setZoom):
2696         (BlackBerry::WebKit::WebViewportArguments::minZoom):
2697         (BlackBerry::WebKit::WebViewportArguments::setMinZoom):
2698         (BlackBerry::WebKit::WebViewportArguments::maxZoom):
2699         (BlackBerry::WebKit::WebViewportArguments::setMaxZoom):
2700         (BlackBerry::WebKit::WebViewportArguments::userZoom):
2701         (BlackBerry::WebKit::WebViewportArguments::setUserZoom):
2702         * Api/WebViewportArguments.h:
2703         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2704         (WebCore::ChromeClientBlackBerry::didSetSVGZoomAndPan):
2705
2706 2013-02-21  Jakob Petsovits  <jpetsovits@rim.com>
2707
2708         [BlackBerry] Move posting and scrollbar updates to the page client.
2709         https://bugs.webkit.org/show_bug.cgi?id=110256
2710         Internal PR 297099
2711
2712         Reviewed by Rob Buis.
2713
2714         In blitVisibleContents(), we were calling the WebKit thread
2715         functions BackingStorePrivate::isScrollingOrZooming() and
2716         WebPage::isVisible(). This is not the right spot to do it.
2717         Furthermore, we want to move away from direct window access
2718         in WebKit and leave that kind of dirtywork to the client.
2719
2720         This patch removes invalidateWindow() as well as the two
2721         virtual scrollbar drawing functions and replaces it with
2722         one new virtual, WebPageClient::postToSurface().
2723         This clears up threading issues and gets us another step
2724         further towards pure WebPageCompositor rendering.
2725
2726         * Api/BackingStore.cpp:
2727         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
2728         * Api/BackingStore_p.h:
2729         (BackingStorePrivate):
2730         * Api/WebPageClient.h:
2731
2732 2013-02-21  Carlos Garcia Campos  <cargarcia@rim.com>
2733
2734         [BlackBerry] Rename Localizer to Locale
2735         https://bugs.webkit.org/show_bug.cgi?id=110449
2736
2737         Reviewed by Rob Buis.
2738
2739         * WebCoreSupport/ColorPickerClient.cpp:
2740         (WebCore::ColorPickerClient::locale):
2741         * WebCoreSupport/ColorPickerClient.h:
2742         (ColorPickerClient):
2743         * WebCoreSupport/DatePickerClient.cpp:
2744         (WebCore::DatePickerClient::locale):
2745         * WebCoreSupport/DatePickerClient.h:
2746         (DatePickerClient):
2747         * WebCoreSupport/SelectPopupClient.cpp:
2748         (WebCore::SelectPopupClient::locale):
2749         * WebCoreSupport/SelectPopupClient.h:
2750         (SelectPopupClient):
2751
2752 2013-02-21  Carlos Garcia Campos  <cargarcia@rim.com>
2753
2754         [BlackBerry] Invalid use of COMPILE_ASSERT macro in WebKitTextCodec.cpp
2755         https://bugs.webkit.org/show_bug.cgi?id=110437
2756
2757         Reviewed by Yong Li.
2758
2759         * Api/WebKitTextCodec.cpp:
2760         (WebKit): Define COMPILE_ASSERT_MATCHING_ENUM() macro and use it to
2761         check enum values match between WebKit and WTF.
2762         (BlackBerry::WebKit::base64Decode): Use a static cast directly to
2763         convert from WebKit Base64DecodePolicy to WTF.
2764         (BlackBerry::WebKit::base64Encode): Use a static cast directly to
2765         convert from WebKit Base64EncodePolicy to WTF.
2766
2767 2013-02-21  Alberto Garcia  <albgarcia@rim.com>
2768
2769         [BlackBerry] Element::getAttributeItem() no longer returns a mutable attribute
2770         https://bugs.webkit.org/show_bug.cgi?id=110439
2771
2772         Reviewed by Antonio Gomes.
2773
2774         This was changed in r142827.
2775
2776         * Api/WebPage.cpp:
2777         (BlackBerry::WebKit::WebPagePrivate::webContext):
2778
2779 2013-02-21  Alberto Garcia  <albgarcia@rim.com>
2780
2781         [BlackBerry] willComposite() and didComposite() are now in InspectorController
2782         https://bugs.webkit.org/show_bug.cgi?id=110343
2783
2784         Reviewed by Carlos Garcia Campos.
2785
2786         This was changed in r142879.
2787
2788         * Api/WebPage.cpp:
2789         (BlackBerry::WebKit::WebPagePrivate::willComposite):
2790         (BlackBerry::WebKit::WebPagePrivate::didComposite):
2791
2792 2013-02-20  Nima Ghanavatian  <nghanavatian@rim.com>
2793
2794         [BlackBerry] Check offset for initialized value
2795         https://bugs.webkit.org/show_bug.cgi?id=110390
2796
2797         Reviewed by Rob Buis.
2798
2799         Instead of checking isEmpty, which checks for either point being <= 0, we want to explicitly check
2800         for the initialized value of (-1, -1). This would be set in redrawSpellCheckDialogIfRequired, and
2801         triggers the restore from cache in requestSpellingCheckingOptions.
2802
2803         Internally reviewed by Gen Mak.
2804
2805         * WebKitSupport/InputHandler.cpp:
2806         (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions):
2807
2808 2013-02-20  Jakob Petsovits  <jpetsovits@rim.com>
2809
2810         [BlackBerry] Make sure to always sync before reusing backingstore tiles.
2811         https://bugs.webkit.org/show_bug.cgi?id=109863
2812         PR 296118
2813
2814         Reviewed by Rob Buis.
2815         Internally reviewed by Mike Lattanzio and Konrad Piascik.
2816
2817         In SVN r142137, I replaced a syncToCurrentMessage() call
2818         with updateSuspendScreenUpdateState() in some cases,
2819         which internally calls the same function.
2820
2821         Unfortunately, when I optimized updateSuspendScreenUpdateState()
2822         to only sync when the state is actually being changed,
2823         I omitted an adaptation of adoptAsFrontState() which would
2824         rely on this sync but now didn't always perform it.
2825
2826         This caused a bad race condition as tile buffers could now
2827         be accessed from the WebKit thread and the UI thread at
2828         the same time. Fix it by (optionally) letting the caller
2829         of updateSuspendScreenUpdateState() know whether a sync
2830         was performed, and adapt adoptAsFrontState() accordingly.
2831
2832         Also fixes some excessive flicker caused by the same
2833         race condition.
2834
2835         * Api/BackingStore.cpp:
2836         (BlackBerry::WebKit::BackingStorePrivate::updateSuspendScreenUpdateState):
2837         (BlackBerry::WebKit::BackingStorePrivate::adoptAsFrontState):
2838         * Api/BackingStore_p.h:
2839
2840 2013-02-20  Yongxin Dai  <yodai@rim.com>
2841
2842         [BlackBerry] Read "data-blackberry-text-selection-handle-position" attribute from element
2843         https://bugs.webkit.org/show_bug.cgi?id=110235
2844
2845         Reviewed by Yong Li.
2846
2847         PR #257207.
2848
2849         Read "data-blackberry-text-selection-handle-position" attribute from element and pass it along
2850         with notifySelectionDetailsChanged(). If "data-blackberry-text-selection-handle-position" attribute
2851         is specified in the element, the selection handle is always flipped to the required position.
2852         along with selected text within element.
2853
2854         Reviewed Internally by Mike Fenton.
2855
2856         * Api/WebPageClient.h:
2857         * WebKitSupport/DOMSupport.cpp:
2858         (BlackBerry::WebKit::DOMSupport::selectionContainerElement):
2859         (DOMSupport):
2860         (BlackBerry::WebKit::DOMSupport::elementHandlePositionAttribute):
2861         * WebKitSupport/DOMSupport.h:
2862         * WebKitSupport/SelectionHandler.cpp:
2863         (BlackBerry::WebKit::SelectionHandler::requestedSelectionHandlePosition):
2864         (WebKit):
2865         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
2866         * WebKitSupport/SelectionHandler.h:
2867         (SelectionHandler):
2868
2869 2013-02-20  Alberto Garcia  <albgarcia@rim.com>
2870
2871         [BlackBerry] Fix usage of HitTestRequest::RequestType
2872         https://bugs.webkit.org/show_bug.cgi?id=110342
2873
2874         Reviewed by Carlos Garcia Campos.
2875
2876         Rename HitTestResult::* -> HitTestRequest::*
2877         This was introduced by mistake in r142977.
2878
2879         * Api/WebPage.cpp:
2880         (BlackBerry::WebKit::WebPagePrivate::hitTestResult):
2881
2882 2013-02-20  Carlos Garcia Campos  <cgarcia@igalia.com>
2883
2884         Unreviewed BlackBerry build fix.
2885
2886         WebPage::download was renamed in the header by mistake to
2887         convertMainResourceLoadToDownload in r137845.
2888
2889         * Api/WebPage.h:
2890
2891 2013-02-19  Nima Ghanavatian  <nghanavatian@rim.com>
2892
2893         [BlackBerry] Appropriately handle word wrapping in SpellingHandler
2894         https://bugs.webkit.org/show_bug.cgi?id=110253
2895
2896         Reviewed by Rob Buis.
2897
2898         PR286001
2899         Since we traverse through text by visual lines instead of blocks, word wrapping causes some
2900         bad behavior. Changing the way we traverse text to jump by words instead of lines. This will
2901         mean it takes longer to finish spellchecking, but the removal of any loops allows webkit
2902         processing to continue. This gives priority to user actions while still completing a large
2903         paragraph in a reasonable amount of time.
2904
2905         Internally reviewed by Mike Fenton
2906
2907         * WebKitSupport/InputHandler.cpp:
2908         (BlackBerry::WebKit::InputHandler::requestCheckingOfString):
2909         * WebKitSupport/SpellingHandler.cpp:
2910         (BlackBerry::WebKit::SpellingHandler::createSpellCheckRequest):
2911         (BlackBerry::WebKit::SpellingHandler::parseBlockForSpellChecking):
2912         (BlackBerry::WebKit::SpellingHandler::getRangeForSpellCheckWithFineGranularity):
2913         (BlackBerry::WebKit::SpellingHandler::startOfNextWord):
2914         (WebKit):
2915         (BlackBerry::WebKit::SpellingHandler::incrementByWord):
2916         (BlackBerry::WebKit::SpellingHandler::doesWordWrap):
2917         * WebKitSupport/SpellingHandler.h:
2918         (SpellingHandler):
2919
2920 2013-02-18  Simon Fraser  <simon.fraser@apple.com>
2921
2922         Clean up the boolean argument to visibleContentRect
2923         https://bugs.webkit.org/show_bug.cgi?id=110167
2924
2925         Reviewed by Simon Fraser.
2926
2927         Replace the boolean argument to visibleContentRect() with
2928         an enum.
2929
2930         * Api/WebPage.cpp:
2931         (BlackBerry::WebKit::WebPagePrivate::getRecursiveVisibleWindowRect):
2932         * WebKitSupport/InRegionScrollableArea.cpp:
2933         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
2934
2935 2013-02-15  Keishi Hattori  <keishi@webkit.org>
2936
2937         Add setValue and closePopup methods to PagePopupController
2938         https://bugs.webkit.org/show_bug.cgi?id=109897
2939
2940         Reviewed by Kent Tamura.
2941
2942         * WebCoreSupport/ColorPickerClient.cpp:
2943         (WebCore::ColorPickerClient::setValue): Added empty implementation.
2944         (WebCore):
2945         * WebCoreSupport/ColorPickerClient.h:
2946         (ColorPickerClient):
2947         * WebCoreSupport/DatePickerClient.cpp:
2948         (WebCore::DatePickerClient::setValue): Ditto.
2949         (WebCore):
2950         * WebCoreSupport/DatePickerClient.h:
2951         (DatePickerClient):
2952         * WebCoreSupport/SelectPopupClient.cpp:
2953         (WebCore::SelectPopupClient::setValue): Ditto.
2954         (WebCore):
2955         * WebCoreSupport/SelectPopupClient.h:
2956         (SelectPopupClient):
2957
2958 2013-02-15  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2959
2960         Simplify hitTestResultAtPoint and nodesFromRect APIs
2961         https://bugs.webkit.org/show_bug.cgi?id=95720
2962
2963         Reviewed by Julien Chaffraix.
2964
2965         Update calls to new API.
2966
2967         * Api/WebPage.cpp:
2968         (BlackBerry::WebKit::WebPagePrivate::contextNode):
2969         (BlackBerry::WebKit::WebPagePrivate::nodeForZoomUnderPoint):
2970         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
2971         (BlackBerry::WebKit::WebPage::nodeAtDocumentPoint):
2972         (BlackBerry::WebKit::WebPagePrivate::hitTestResult):
2973         * WebKitSupport/SelectionHandler.cpp:
2974         (BlackBerry::WebKit::visiblePositionForPointIgnoringClipping):
2975
2976 2013-02-14  Mike Fenton  <mifenton@rim.com>
2977
2978         [BlackBerry] Update keyboard event details to match platform details.
2979         https://bugs.webkit.org/show_bug.cgi?id=109693
2980
2981         Reviewed by Yong Li.
2982
2983         PR 220170.
2984
2985         When re-creating the Platform::Keyboard event ensure
2986         all values are updated.
2987
2988         Reviewed Internally by Nima Ghanavatian.
2989
2990         * WebKitSupport/InputHandler.cpp:
2991         (BlackBerry::WebKit::InputHandler::updateFormState):
2992
2993 2013-02-14  Mike Fenton  <mifenton@rim.com>
2994
2995         [BlackBerry] Update keyboard event details to match platform details.
2996         https://bugs.webkit.org/show_bug.cgi?id=109693
2997
2998         Reviewed by Yong Li.
2999
3000         PR 220170.
3001
3002         Update keyboard event details.
3003
3004         Reviewed Internally by Nima Ghanavatian and Gen Mak.
3005
3006         * Api/WebPage.cpp:
3007         (BlackBerry::WebKit::WebPage::keyEvent):
3008
3009 2013-02-08  Andrey Kosyakov  <caseq@chromium.org>
3010
3011         Web Inspector: expose did{Begin,Cancel}Frame() and {will,did}Composite() on WebDebToolsAgent
3012         https://bugs.webkit.org/show_bug.cgi?id=109192
3013
3014         Reviewed by Pavel Feldman.
3015
3016         - invoke frame instrumentation methods on InspectorController, not on InspectorInstrumentation.
3017
3018         * Api/BackingStore.cpp:
3019         (BlackBerry::WebKit::BackingStorePrivate::instrumentBeginFrame):
3020         (BlackBerry::WebKit::BackingStorePrivate::instrumentCancelFrame):
3021
3022 2013-02-12  Jakob Petsovits  <jpetsovits@rim.com>
3023
3024         [BlackBerry] Assume setScrollingOrZooming() to be called on the WebKit thread.
3025         https://bugs.webkit.org/show_bug.cgi?id=109614
3026         Internal PR 294513
3027
3028         Reviewed by Rob Buis.
3029         Internally reviewed by Arvid Nilsson.
3030
3031         With this further simplification of threading assumptions,
3032         we can get rid of atomic integer access as well as the
3033         backing store mutex which was otherwise unused.
3034
3035         * Api/BackingStore.cpp:
3036         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
3037         (BlackBerry::WebKit::BackingStorePrivate::~BackingStorePrivate):
3038         (BlackBerry::WebKit::BackingStorePrivate::suspendBackingStoreUpdates):
3039         (BlackBerry::WebKit::BackingStorePrivate::resumeBackingStoreUpdates):
3040         (BlackBerry::WebKit::BackingStorePrivate::isScrollingOrZooming):
3041         (BlackBerry::WebKit::BackingStorePrivate::setScrollingOrZooming):
3042         * Api/BackingStore_p.h:
3043         (BackingStorePrivate):
3044
3045 2013-02-12  Jakob Petsovits  <jpetsovits@rim.com>
3046
3047         [BlackBerry] Eliminate the direct rendering option.
3048         https://bugs.webkit.org/show_bug.cgi?id=109608
3049         RIM PR 293298
3050
3051         Reviewed by Rob Buis.
3052         Internally reviewed by Arvid Nilsson.
3053
3054         It added a lot of complexity and we're not going to use it anymore.
3055         This patch removes direct rendering functionality from
3056         WebKit/blackberry together with the assumption that blitting on the
3057         WebKit thread is possible or acceptable. It now isn't anymore.
3058
3059         * Api/BackingStore.cpp:
3060         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
3061         (BlackBerry::WebKit::BackingStorePrivate::resumeScreenUpdates):
3062         (BlackBerry::WebKit::BackingStorePrivate::updateSuspendScreenUpdateState):
3063         (BlackBerry::WebKit::BackingStorePrivate::slowScroll):
3064         (BlackBerry::WebKit::BackingStorePrivate::scroll):
3065         (BlackBerry::WebKit::BackingStorePrivate::shouldPerformRenderJobs):
3066         (BlackBerry::WebKit::BackingStorePrivate::render):
3067         (BlackBerry::WebKit::BackingStorePrivate::renderAndBlitImmediately):
3068         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
3069         (BlackBerry::WebKit::BackingStorePrivate::blitToWindow):
3070         (BlackBerry::WebKit::BackingStorePrivate::fillWindow):
3071         (BlackBerry::WebKit::BackingStorePrivate::invalidateWindow):
3072         (BlackBerry::WebKit::BackingStorePrivate::clearWindow):
3073         (BlackBerry::WebKit::BackingStorePrivate::setScrollingOrZooming):
3074         (BlackBerry::WebKit::BackingStorePrivate::didRenderContent):
3075         * Api/BackingStore.h:
3076         * Api/BackingStore_p.h:
3077         (BackingStorePrivate):
3078         * Api/WebPage.cpp:
3079         (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore):
3080         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
3081         (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
3082         (WebKit):
3083         (BlackBerry::WebKit::WebPagePrivate::scheduleCompositingRun):
3084         * Api/WebPageCompositor.cpp:
3085         (BlackBerry::WebKit::WebPageCompositorPrivate::animationFrameChanged):
3086         * Api/WebPage_p.h:
3087         (WebPagePrivate):
3088         * Api/WebSettings.cpp:
3089         (WebKit):
3090         * Api/WebSettings.h:
3091         * WebKitSupport/RenderQueue.cpp:
3092         (BlackBerry::WebKit::RenderQueue::renderRegularRenderJobs):
3093         (BlackBerry::WebKit::RenderQueue::renderScrollZoomJobs):
3094         * WebKitSupport/SurfacePool.cpp:
3095         (BlackBerry::WebKit::SurfacePool::initialize):
3096
3097 2013-02-12  Andrew Lo  <anlo@rim.com>
3098
3099         [BlackBerry] CSS animations stop running during zoom
3100         https://bugs.webkit.org/show_bug.cgi?id=109606
3101
3102         Reviewed by Rob Buis.
3103         Internally reviewed by Jakob Petsovits.
3104
3105         Internal PR 286160.
3106         New BackingStore API for suspending/resuming geometry updates.
3107
3108         This is needed because we want to allow render jobs to continue during
3109         zoom, but we don't want to allow geometry updates during zoom.
3110
3111         Prevent scroll/zoom render jobs from being added to the queue if
3112         the tile is outside the expanded content rect.
3113
3114         * Api/BackingStore.cpp:
3115         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
3116         (BlackBerry::WebKit::BackingStorePrivate::suspendGeometryUpdates):
3117         (WebKit):
3118         (BlackBerry::WebKit::BackingStorePrivate::resumeGeometryUpdates):
3119         (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect):
3120         (BlackBerry::WebKit::BackingStore::suspendGeometryUpdates):
3121         (BlackBerry::WebKit::BackingStore::resumeGeometryUpdates):
3122         * Api/BackingStore.h:
3123         * Api/BackingStore_p.h:
3124         (BackingStorePrivate):
3125         * WebKitSupport/RenderQueue.cpp:
3126         (BlackBerry::WebKit::RenderQueue::addToScrollZoomQueue):
3127
3128 2013-02-12  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3129
3130         Remove remaining traces of Web Intents
3131         https://bugs.webkit.org/show_bug.cgi?id=109586
3132
3133         Reviewed by Eric Seidel.
3134
3135         Remove remaining traces of Web Intents from Blackberry port
3136         configuration as the functionality was removed in r142549.
3137
3138         * WebCoreSupport/AboutDataEnableFeatures.in:
3139
3140 2013-02-12  Zan Dobersek  <zdobersek@igalia.com>
3141
3142         Remove ENABLE_XHR_RESPONSE_BLOB handling from various build systems
3143         https://bugs.webkit.org/show_bug.cgi?id=109481
3144
3145         Reviewed by Daniel Bates.
3146
3147         The ENABLE_XHR_RESPONSE_BLOB feature define was removed from the code
3148         back in r120574. There are still occurrences of it in various build systems
3149         which should all be removed as they are useless.
3150
3151         * WebCoreSupport/AboutDataEnableFeatures.in:
3152
3153 2013-02-11  Ryosuke Niwa  <rniwa@webkit.org>
3154
3155         Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
3156         https://bugs.webkit.org/show_bug.cgi?id=109534
3157
3158         Reviewed by Anders Carlsson.
3159
3160         * WebCoreSupport/EditorClientBlackBerry.cpp:
3161         (WebCore):
3162         * WebCoreSupport/EditorClientBlackBerry.h:
3163         (EditorClientBlackBerry):
3164
3165 2013-02-11  Mike Fenton  <mifenton@rim.com>
3166
3167         [BlackBerry] Add form navigation control state tracking.
3168         https://bugs.webkit.org/show_bug.cgi?id=109300
3169
3170         Reviewed by Rob Buis.
3171
3172         Add form navigation control state tracking.
3173
3174         * Api/WebPage.cpp:
3175         (BlackBerry::WebKit::WebPage::focusNextField):
3176         (WebKit):
3177         (BlackBerry::WebKit::WebPage::focusPreviousField):
3178         (BlackBerry::WebKit::WebPage::submitForm):
3179         * Api/WebPage.h:
3180         * Api/WebPageClient.h:
3181         * WebKitSupport/InputHandler.cpp:
3182         (BlackBerry::WebKit::InputHandler::InputHandler):
3183         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
3184         (BlackBerry::WebKit::InputHandler::updateFormState):
3185         * WebKitSupport/InputHandler.h:
3186         (InputHandler):
3187
3188 2013-02-09  Tiancheng Jiang  <tijiang@rim.com>
3189
3190         [BlackBerry] Set mouse document position for mouse event in updateCursor.
3191         https://bugs.webkit.org/show_bug.cgi?id=109094.
3192
3193         Reviewed by Rob Buis.
3194
3195         RIM PR 246976
3196         Internally Reviewed by Genevieve Mak.
3197
3198         BlackBerry::Platform::MouseEvent have document viewport and document
3199         content position as members. When we create the event, we should initial
3200         them as well.
3201
3202         * Api/WebPage.cpp:
3203         (BlackBerry::WebKit::WebPagePrivate::updateCursor):
3204
3205 2013-02-07  Charles Wei  <charles.wei@torchmobile.com.cn>
3206
3207         webpage needs null check in BackingStore::setCurrentBackingStoreOwner
3208         https://bugs.webkit.org/show_bug.cgi?id=109253
3209
3210         Reviewed by George Staikos.
3211
3212         * Api/BackingStore.cpp:
3213         (BlackBerry::WebKit::BackingStorePrivate::setCurrentBackingStoreOwner):
3214
3215 2013-02-07  Mary Wu  <mary.wu@torchmobile.com.cn>
3216
3217         [BlackBerry] Enable non-video element enter/exit fullscreen.
3218         https://bugs.webkit.org/show_bug.cgi?id=108314
3219
3220         Reviewed by Antonio Gomes.
3221
3222         Webkit support non-video element (like div) to enter/exit
3223         fullscreen. We should pass this capability in blackberry porting.
3224
3225         RIM PR 256370, internally reviewed by Max Feil.
3226
3227         * Api/WebPage.cpp:
3228         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
3229         (BlackBerry::WebKit::WebPagePrivate::clearDocumentData):
3230         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
3231         (BlackBerry::WebKit::WebPage::notifyFullScreenVideoExited):
3232         (BlackBerry::WebKit::WebPagePrivate::enterFullscreenForNode):
3233         (BlackBerry::WebKit::WebPagePrivate::exitFullscreenForNode):
3234         (WebKit):
3235         (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
3236         (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
3237         (BlackBerry::WebKit::WebPagePrivate::adjustFullScreenElementDimensionsIfNeeded):
3238         * Api/WebPage_p.h:
3239         (WebPagePrivate):
3240
3241 2013-02-07  Jakob Petsovits  <jpetsovits@rim.com>
3242
3243         [BlackBerry] Fix all flicker caused by empty/incomplete geometries.
3244         https://bugs.webkit.org/show_bug.cgi?id=108951
3245         RIM PR 286925
3246
3247         Reviewed by Rob Buis.
3248         Internally reviewed by Arvid Nilsson.
3249
3250         The main idea for this patch is that whenever we adopt
3251         a new backingstore geometry that doesn't contain any
3252         rendered tiles, or VisibleZoom render jobs that need more
3253         tiles to be rendered to be considered complete, we'll then
3254         suspend blitting until there is valid content to show.
3255
3256         This main idea is codified as checks for empty buffers
3257         in adoptAsFrontState(), and checks for the current state
3258         of the render queue after rendering content in render().
3259         However, as BackingStore objects with disabled surface pools
3260         or pure use of accelerated compositing also swap geometries
3261         in some circumstances, the use of suspend counters grows
3262         increasingly fragile.
3263
3264         To make this patch more resilient against regressions,
3265         the current suspend counter is complemented with several
3266         explicit conditions for suspending screen updates,
3267         and both subsequently combined into a single cached
3268         boolean value telling the UI thread whether or not to
3269         suspend. In the future, other suspend calls can be
3270         migrated to this "state machine" design as well,
3271         potentially phasing out the suspend counter altogether.
3272
3273         The immediate result is that there will be no flashing
3274         of background color between page loads or after discarding
3275         tiles on scale changes until the content has been rendered.
3276
3277         * Api/BackingStore.cpp:
3278         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
3279         (BlackBerry::WebKit::BackingStorePrivate::suspendBackingStoreUpdates):
3280         (BlackBerry::WebKit::BackingStorePrivate::suspendScreenUpdates):
3281         (BlackBerry::WebKit::BackingStorePrivate::resumeBackingStoreUpdates):
3282         (BlackBerry::WebKit::BackingStorePrivate::resumeScreenUpdates):
3283         (BlackBerry::WebKit::BackingStorePrivate::updateSuspendScreenUpdateState):
3284         (WebKit):
3285         (BlackBerry::WebKit::BackingStorePrivate::render):
3286         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
3287         (BlackBerry::WebKit::BackingStorePrivate::adoptAsFrontState):
3288         (BlackBerry::WebKit::BackingStorePrivate::setCurrentBackingStoreOwner):
3289         (BlackBerry::WebKit::BackingStore::releaseOwnedBackingStoreMemory):
3290         * Api/BackingStore_p.h:
3291         (BackingStorePrivate):
3292         * Api/WebPage.cpp:
3293         (BlackBerry::WebKit::WebPagePrivate::setVisible):
3294         (BlackBerry::WebKit::WebPagePrivate::setCompositorDrawsRootLayer):
3295
3296 2013-02-07  Xiaobo Wang  <xbwang@torchmobile.com.cn>
3297
3298         [BlackBerry] CHHW - Characters that are using 32 bits encoding get trunked to 16bits
3299         https://bugs.webkit.org/show_bug.cgi?id=109126
3300         PR 292540
3301
3302         Reviewed by Yong Li.
3303         Internally reviewed by Mike Fenton.
3304
3305         Key char is UTF32 encoded, should be 4 bytes.
3306
3307         * Api/WebPage.cpp:
3308         (BlackBerry::WebKit::handleScrolling):
3309         * WebKitSupport/InputHandler.cpp:
3310         (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
3311         * WebKitSupport/InputHandler.h:
3312         (InputHandler):
3313         * WebKitSupport/SelectionHandler.cpp:
3314         (BlackBerry::WebKit::directionOfPointRelativeToRect):
3315         (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
3316         (BlackBerry::WebKit::shouldExtendSelectionInDirection):
3317         (BlackBerry::WebKit::directionalVisiblePositionAtExtentOfBox):
3318         (BlackBerry::WebKit::SelectionHandler::extendSelectionToFieldBoundary):
3319         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
3320         * WebKitSupport/SelectionHandler.h:
3321         (SelectionHandler):
3322
3323 2013-02-07  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
3324
3325         [BlackBerry] Reader Mode: Opening two links quickly from reader mode causes browser bad state
3326         https://bugs.webkit.org/show_bug.cgi?id=109124
3327
3328         Reviewed by Yong Li.
3329
3330         RIM BUG 291246 Internally reviewed by YongLi.
3331         Move the WebPageGroupLoadDeferrer object from ChromeClientBlackBerry::createWindow()
3332         into WebPageClientImpl::createWindow() to make it more close to its protecting place.
3333
3334         * WebCoreSupport/ChromeClientBlackBerry.cpp:
3335         (WebCore::ChromeClientBlackBerry::createWindow):
3336
3337 2013-02-07  Mike Fenton  <mifenton@rim.com>
3338
3339         [BlackBerry] Send type details with IMF mask as part of focus gained.
3340         https://bugs.webkit.org/show_bug.cgi?id=109086
3341
3342         Reviewed by Yong Li.
3343
3344         PR 292609.
3345
3346         Add masking options based on VKB type to the IMF mask.
3347
3348         Reviewed Internally by Nima Ghanavatian.
3349
3350         * WebKitSupport/InputHandler.cpp:
3351         (BlackBerry::WebKit::addInputStyleMaskForKeyboardType):
3352         (WebKit):
3353         (BlackBerry::WebKit::InputHandler::setElementFocused):
3354
3355 2013-02-06  Jakob Petsovits  <jpetsovits@rim.com>
3356
3357         [BlackBerry] Refactor renderContents() for cleaner code.
3358         https://bugs.webkit.org/show_bug.cgi?id=109059
3359         RIM PR 280374
3360
3361         Reviewed by Rob Buis.
3362         Internally reviewed by Arvid Nilsson.
3363
3364         The fact that we've got two renderContents() implementations
3365         in BackingStore.cpp, one of which was tailored to just
3366         being called from drawContents(), is a major annoyance.
3367
3368         With this patch, the regular renderContents() is modified
3369         in a way so that drawContents() can make use of it as well.
3370         This includes an API change for both functions which makes
3371         it more flexible and enables further cleanups and improvements
3372         to accuracy. The second, unloved renderContents() is removed.
3373
3374         The user-visible changes are improved (float) accuracy for
3375         render offsets, clipping to exactly the dstRect that has
3376         been specified, and the changed public drawContents() API.
3377
3378         * Api/BackingStore.cpp:
3379         (BlackBerry::WebKit::BackingStorePrivate::renderDirectToWindow):
3380         (BlackBerry::WebKit::BackingStorePrivate::render):
3381         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
3382         (BlackBerry::WebKit::BackingStore::drawContents):
3383         * Api/BackingStore.h:
3384         (Platform):
3385         (Graphics):
3386         * Api/BackingStore_p.h:
3387         (WebCore):
3388         (BackingStorePrivate):
3389         * WebKitSupport/SurfacePool.cpp:
3390         (BlackBerry::WebKit::SurfacePool::SurfacePool):
3391         (BlackBerry::WebKit::SurfacePool::initialize):
3392         (BlackBerry::WebKit::SurfacePool::destroyPlatformGraphicsContext):
3393         * WebKitSupport/SurfacePool.h:
3394         (SurfacePool):
3395
3396 2013-02-06  Nima Ghanavatian  <nghanavatian@rim.com>
3397
3398         [BlackBerry] Check range before use in parseBlockForSpellChecking
3399         https://bugs.webkit.org/show_bug.cgi?id=109080
3400
3401         Reviewed by Yong Li.
3402
3403         PR291394
3404         This was missed during patch webkit/5aea04f6ea625827. Since getRangeForSpellCheckWithFineGranularity
3405         now returns null values, we need a check here before using the range object here as well.
3406
3407         Internally reviewed by Mike Fenton.
3408
3409         * WebKitSupport/SpellingHandler.cpp:
3410         (BlackBerry::WebKit::SpellingHandler::parseBlockForSpellChecking):
3411
3412 2013-02-06  Nima Ghanavatian  <nghanavatian@rim.com>
3413
3414         [BlackBerry] Check for a valid range object before using it
3415         https://bugs.webkit.org/show_bug.cgi?id=109058
3416
3417         Reviewed by Rob Buis.
3418
3419         PR291394
3420         Crash occurs if makeRange returns null, since we are using this value without checking
3421         its validity. We had an assert before which I'm replacing with just a check for null.
3422
3423         Internally reviewed by Mike Fenton.
3424
3425         * WebKitSupport/SpellingHandler.cpp:
3426         (BlackBerry::WebKit::SpellingHandler::getRangeForSpellCheckWithFineGranularity):
3427
3428 2013-02-05  Andrew Lo  <anlo@rim.com>
3429
3430         [BlackBerry] Scrolling performance drops doing page load
3431         https://bugs.webkit.org/show_bug.cgi?id=108949
3432
3433         Reviewed by Yong Li.
3434         Internally reviewed by Jakob Petsovits.
3435
3436         Internal PR 291390.
3437         The intention of this code was to not update non-visible tiles during page load.
3438
3439         Before this patch, the code would update tiles that have already been rendered
3440         during page load.
3441
3442         * Api/BackingStore.cpp:
3443         (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion):
3444
3445 2013-02-04  Tiancheng Jiang  <tijiang@rim.com>
3446
3447         [BlackBerry]Adjust fatfinger detection rect size
3448         https://bugs.webkit.org/show_bug.cgi?id=108678
3449
3450         Reviewed by Antonio Gomes.
3451         RIM Bug 246