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