[BlackBerry] speed up text selection for large selections
[WebKit-https.git] / Source / WebKit / blackberry / ChangeLog
1 2012-03-19  Tyler Abbott  <tabbott@rim.com>
2
3         [BlackBerry] speed up text selection for large selections
4         https://bugs.webkit.org/show_bug.cgi?id=81536
5
6         When selecting large disjoint areas of text the cost
7         of calculating the IntRectRegion union becomes very
8         expensive. Simply placing all of the text quads into
9         the IntRectRegion is faster despite the larger memory
10         footprint and the additional calculations at render
11         time.
12
13         Reviewed by Rob Buis.
14
15         * WebKitSupport/SelectionHandler.cpp:
16         (BlackBerry::WebKit::SelectionHandler::getConsolidatedRegionOfTextQuadsForSelection):
17
18 2012-03-19  Mike Lattanzio  <mlattanzio@rim.com>
19
20         [BlackBerry] Use BlackBerry::Platform::DeviceInfo to generate UserAgent
21         https://bugs.webkit.org/show_bug.cgi?id=81269
22
23         Generate the UserAgent lazily, using it as the default for the
24         WebSettings object. BlackBerry::Platform::DeviceInfo is used
25         to ensure the information is accurate to the specific device.
26
27         Remove the !isEmpty() assert when fetching the UA from the
28         WebSettings object, as it will now always be properly initialized.
29
30         Add a static initializer block to ensure defaultUserAgent() is
31         thread-safe from that moment onward.
32
33         Reviewed by Rob Buis.
34
35         * Api/WebPage.cpp:
36         (WebKit):
37         (BlackBerry::WebKit::WebPagePrivate::init):
38         (BlackBerry::WebKit::WebPagePrivate::defaultUserAgent):
39         * Api/WebPage_p.h:
40         (WebPagePrivate):
41         * Api/WebSettings.cpp:
42         (BlackBerry::WebKit::WebSettings::setUserAgentString):
43         * Api/WebSettings.h:
44
45 2012-03-19  Mike Fenton  <mifenton@rim.com>
46
47         [BlackBerry] Input fields with id of e-mail and url should be styled as such.
48         https://bugs.webkit.org/show_bug.cgi?id=81364
49
50         Reviewed by Rob Buis.
51
52         Be less aggressive on matching url, and update as suggested by Rob.
53
54         * WebKitSupport/DOMSupport.cpp:
55         (BlackBerry::WebKit::DOMSupport::matchesReservedStringUrl):
56         * WebKitSupport/InputHandler.cpp:
57         (BlackBerry::WebKit::inputStyle):
58
59 2012-03-19  Arvid Nilsson  <anilsson@rim.com>
60
61         [BlackBerry] Remove obsolete optimization in WebPageCompositorPrivate
62         https://bugs.webkit.org/show_bug.cgi?id=81115
63
64         Reviewed by Benjamin Poulain.
65
66         The compositor tried to avoid rendering the same stuff twice, using a
67         mechanism that didn't work properly and has been redundant since we
68         introduced deferred blits. Remove this code.
69
70         Reviewed internally by Robin Cao.
71
72         * Api/WebPageCompositor.cpp:
73         (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
74         (BlackBerry::WebKit::WebPageCompositorPrivate::commit):
75         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
76         * Api/WebPageCompositor_p.h:
77
78 2012-03-17  Charles Wei  <charles.wei@torchmobile.com.cn>
79
80         [BlackBerry] Enable Web Timing for performance profiling and improvement.
81         https://bugs.webkit.org/show_bug.cgi?id=81085
82
83         Reviewed by Rob Buis.
84
85         * Api/WebPage.cpp:
86         (BlackBerry::WebKit::WebPagePrivate::init):
87
88 2012-03-16  Arvid Nilsson  <anilsson@rim.com>
89
90         [BlackBerry] Rename the existing WebPageCompositor class to WebPageCompositorPrivate
91         https://bugs.webkit.org/show_bug.cgi?id=81108
92         RIM PR: 136687
93
94         Reviewed by Rob Buis.
95
96         This is done in anticipation of a new WebPageCompositor class in the
97         public API. The existing internal class will serve to d-pointerize the
98         new public API. In addition, it is and will be possible to create only
99         the private class, for cases where existing code paths require
100         OpenGL compositing (i.e. due to accelerated compositing layers being
101         added to the page).
102
103         Reviewed internally by Robin Cao.
104
105         * Api/BackingStore.h:
106         * Api/WebPage.cpp:
107         (BlackBerry::WebKit::WebPagePrivate::setIsAcceleratedCompositingActive):
108         * Api/WebPageCompositor.cpp: Renamed from Source/WebKit/blackberry/WebKitSupport/WebPageCompositor.cpp.
109         (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
110         (BlackBerry::WebKit::WebPageCompositorPrivate::~WebPageCompositorPrivate):
111         (BlackBerry::WebKit::WebPageCompositorPrivate::hardwareCompositing):
112         (BlackBerry::WebKit::WebPageCompositorPrivate::setRootLayer):
113         (BlackBerry::WebKit::WebPageCompositorPrivate::setBackingStoreUsesOpenGL):
114         (BlackBerry::WebKit::WebPageCompositorPrivate::commit):
115         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
116         (BlackBerry::WebKit::WebPageCompositorPrivate::releaseLayerResources):
117         (BlackBerry::WebKit::WebPageCompositorPrivate::animationTimerFired):
118         * Api/WebPageCompositor_p.h: Renamed from Source/WebKit/blackberry/WebKitSupport/WebPageCompositor.h.
119         (BlackBerry::WebKit::WebPageCompositorPrivate::layoutRectForCompositing):
120         (BlackBerry::WebKit::WebPageCompositorPrivate::setLayoutRectForCompositing):
121         (BlackBerry::WebKit::WebPageCompositorPrivate::contentsSizeForCompositing):
122         (BlackBerry::WebKit::WebPageCompositorPrivate::setContentsSizeForCompositing):
123         (BlackBerry::WebKit::WebPageCompositorPrivate::lastCompositingResults):
124         (BlackBerry::WebKit::WebPageCompositorPrivate::setLastCompositingResults):
125         * Api/WebPage_p.h:
126         * CMakeListsBlackBerry.txt:
127
128 2012-03-16  Nima Ghanavatian  <nghanavatian@rim.com>
129
130         [BlackBerry] Syncing up left over bits in WebKitSupport from our local branch to upstream
131         https://bugs.webkit.org/show_bug.cgi?id=81118
132
133         Reviewed by Rob Buis.
134
135         This is a consolidation of various changes that are in our local dev branch
136         but do not appear in our upstreamed port.
137
138         * WebKitSupport/DumpRenderTreeSupport.cpp:
139         (DumpRenderTreeSupport::computedStyleIncludingVisitedInfo):
140         * WebKitSupport/FatFingers.cpp:
141         (BlackBerry::WebKit::FatFingers::isElementClickable):
142         * WebKitSupport/InputHandler.cpp:
143         (BlackBerry::WebKit::InputHandler::spannableTextInRange):
144         * WebKitSupport/SurfacePool.cpp:
145         (BlackBerry::WebKit::SurfacePool::createBuffers):
146         (BlackBerry::WebKit::SurfacePool::releaseBuffers):
147         * WebKitSupport/TouchEventHandler.cpp:
148         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
149         (BlackBerry::WebKit::TouchEventHandler::handleFatFingerPressed):
150         * WebKitSupport/WebPageCompositor.cpp:
151         (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor):
152         * WebKitSupport/WebPageCompositor.h:
153         (WebPageCompositor):
154
155 2012-03-16  Nima Ghanavatian  <nghanavatian@rim.com>
156
157         [BlackBerry] Syncing up left over bits in WebCoreSupport from our local branch to upstream
158         https://bugs.webkit.org/show_bug.cgi?id=81120
159
160         Reviewed by Rob Buis.
161
162         This is a consolidation of various changes that are in our local dev branch
163         but do not appear in our upstreamed port.
164
165         * WebCoreSupport/AboutDataEnableFeatures.in:
166         * WebCoreSupport/AboutDataHaveFeatures.in:
167         * WebCoreSupport/AboutDataUseFeatures.in:
168         * WebCoreSupport/ChromeClientBlackBerry.cpp:
169         (WebCore::ChromeClientBlackBerry::hasOpenedPopup):
170         (WebCore):
171         (WebCore::ChromeClientBlackBerry::screenToRootView):
172         (WebCore::ChromeClientBlackBerry::rootViewToScreen):
173         (WebCore::ChromeClientBlackBerry::invalidateRootView):
174         (WebCore::ChromeClientBlackBerry::invalidateContentsAndRootView):
175         (WebCore::ChromeClientBlackBerry::invalidateContentsForSlowScroll):
176         (WebCore::ChromeClientBlackBerry::scrollableAreasDidChange):
177         (WebCore::ChromeClientBlackBerry::createColorChooser):
178         * WebCoreSupport/ChromeClientBlackBerry.h:
179         (ChromeClientBlackBerry):
180         (WebCore::ChromeClientBlackBerry::numTouchEventHandlersChanged):
181         * WebCoreSupport/EditorClientBlackBerry.cpp:
182         (WebCore::EditorClientBlackBerry::registerUndoStep):
183         (WebCore::EditorClientBlackBerry::registerRedoStep):
184         (WebCore::EditorClientBlackBerry::undo):
185         (WebCore::EditorClientBlackBerry::redo):
186         * WebCoreSupport/EditorClientBlackBerry.h:
187         (EditorClientBlackBerry):
188         * WebCoreSupport/GeolocationControllerClientBlackBerry.cpp:
189         (GeolocationControllerClientBlackBerry::requestPermission):
190         (GeolocationControllerClientBlackBerry::cancelPermissionRequest):
191         * WebCoreSupport/GeolocationControllerClientBlackBerry.h:
192         * WebCoreSupport/InspectorClientBlackBerry.cpp:
193         (WebCore::InspectorClientBlackBerry::closeInspectorFrontend):
194         (WebCore):
195         (WebCore::InspectorClientBlackBerry::bringFrontendToFront):
196         * WebCoreSupport/InspectorClientBlackBerry.h:
197         (InspectorClientBlackBerry):
198         * WebCoreSupport/NotificationPresenterImpl.cpp:
199         (WebCore::NotificationPresenterImpl::show):
200
201 2012-03-16  Mike Fenton  <mifenton@rim.com>
202
203         [BlackBerry] Input fields with id of e-mail and url should be styled as such.
204         https://bugs.webkit.org/show_bug.cgi?id=81364
205
206         Reviewed by Rob Buis.
207
208         Treat fields that have name/id's that match url or
209         email as url or email fields providing the appropriate
210         keyboard.
211
212         PR 137259.
213
214         Reviewed Internally by Gen Mak and Nima Ghanavatian.
215
216         * WebKitSupport/DOMSupport.cpp:
217         (BlackBerry::WebKit::DOMSupport::matchesReservedStringEmail):
218         (DOMSupport):
219         (BlackBerry::WebKit::DOMSupport::matchesReservedStringUrl):
220         (BlackBerry::WebKit::DOMSupport::elementIdOrNameIndicatesEmail):
221         (BlackBerry::WebKit::DOMSupport::elementIdOrNameIndicatesUrl):
222         (BlackBerry::WebKit::DOMSupport::matchesReservedStringPreventingAutocomplete):
223         * WebKitSupport/DOMSupport.h:
224         (WebCore):
225         * WebKitSupport/InputHandler.cpp:
226         (BlackBerry::WebKit::convertInputType):
227         (BlackBerry::WebKit::inputStyle):
228
229 2012-03-16  Nima Ghanavatian  <nghanavatian@rim.com>
230
231         [BlackBerry] Syncing up left over bits in Api from our local branch to upstream
232         https://bugs.webkit.org/show_bug.cgi?id=81105
233
234         Reviewed by Rob Buis.
235
236         This patches fixes up a previous sync done in this directory and adds some new bits
237         as well.  This is accurate as of ddea1528b37b29925638fe1183318b3c3994f1f8 in our
238         local repo.
239
240         * Api/BackingStore.cpp:
241         (BlackBerry::WebKit::BackingStorePrivate::drawAndBlendLayersForDirectRendering):
242         (WebKit):
243         (BlackBerry::WebKit::BackingStorePrivate::drawLayersOnCommitIfNeeded):
244         * Api/WebPage.cpp:
245         (BlackBerry::WebKit::WebPagePrivate::webContext):
246         (BlackBerry::WebKit::WebPage::webContext):
247         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
248         * Api/WebPage.h:
249         * Api/WebPage_p.h:
250         (WebPagePrivate):
251
252 2012-03-16  Mike Fenton  <mifenton@rim.com>
253
254         [BlackBerry] Input processing mode should be cancelled when processing hot keys
255         https://bugs.webkit.org/show_bug.cgi?id=81348
256
257         Reviewed by Rob Buis.
258
259         Don't suppress IMF notifications if we are handling
260         the event as a hotkey.
261
262         Reviewed Internally by Nima Ghanavatian.
263
264         * WebCoreSupport/EditorClientBlackBerry.cpp:
265         (WebCore::EditorClientBlackBerry::handleKeyboardEvent):
266
267 2012-03-16  Robin Cao  <robin.cao@torchmobile.com.cn>
268
269         [BlackBerry] Can not open certain links from bridge applications
270         https://bugs.webkit.org/show_bug.cgi?id=81197
271
272         Reviewed by Rob Buis.
273
274         Currently, the engine asks the client to handle some type of requests externally.
275         But WebPageClient::handleStringPattern is not yet implemented and exposed to
276         the client. Before that, we still need to give the client a chance to decide
277         how to handle requests such as 'mailto:'.
278
279         To address this problem, r108763 introduced a change that ask the client to
280         decide how to handle the navigation in dispatchDecidePolicyForNewWindowAction().
281         This is not intuitive and will bring troubles, because this navigation will
282         happen in the new page. So the new page client is to decide how to handle
283         the navigation, not the old one.
284
285         This patch reverts r108763 and skips calling WebPageClient::handleStringPattern
286         since it's not implemented.
287
288         This way the new window action will continue, and the logic in
289         dispatchDecidePolicyForNavigationAction() will handle the navigation correctly.
290
291         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
292         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNewWindowAction):
293         (WebCore::FrameLoaderClientBlackBerry::decidePolicyForExternalLoad):
294
295 2012-03-16  Leo Yang  <leo.yang@torchmobile.com.cn>
296
297         [BlackBerry] Crash when going back from an xhtml document containing <img>
298         https://bugs.webkit.org/show_bug.cgi?id=81297
299
300         Reviewed by Rob Buis.
301
302         This is manually reverting the offending internal commit which checked-in before upstreaming.
303
304         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
305         (WebCore::FrameLoaderClientBlackBerry::canCachePage):
306
307 2012-03-16  Genevieve Mak  <gmak@rim.com>
308
309         [BlackBerry] viewportRect has changed to viewportSize
310         https://bugs.webkit.org/show_bug.cgi?id=81262
311
312         Reviewed by Antonio Gomes.
313
314         Set size instead of rect in constructor.
315         * WebKitSupport/InRegionScrollableArea.cpp:
316         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
317
318 2012-03-16  Andrew Lo  <anlo@rim.com>
319
320         [BlackBerry] Enable PAGE_VISIBILITY_API
321         https://bugs.webkit.org/show_bug.cgi?id=81257
322
323         Set Page visibility state for BlackBerry port.
324
325         Reviewed by Rob Buis.
326
327         * Api/WebPage.cpp:
328         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
329         (WebKit):
330         (BlackBerry::WebKit::WebPagePrivate::setPageVisibilityState):
331         (BlackBerry::WebKit::WebPagePrivate::setVisible):
332         (BlackBerry::WebKit::WebPage::setVisible):
333         (BlackBerry::WebKit::WebPagePrivate::notifyAppActivationStateChange):
334         (BlackBerry::WebKit::WebPage::notifyAppActivationStateChange):
335         * Api/WebPage_p.h:
336         (WebPagePrivate):
337
338 2012-03-14  Arvid Nilsson  <anilsson@rim.com>
339
340         [BlackBerry] Make sure WebPage and BackingStore don't crash without a Window
341         https://bugs.webkit.org/show_bug.cgi?id=81099
342
343         Reviewed by Rob Buis.
344
345         Also rename the "compositing/blitting to main window" variables to
346         instead refer to OpenGL compositing. The code paths it triggers are
347         related to the BackingStore using OpenGL compositing, and can be useful
348         even when there's no window.
349
350         * Api/BackingStore.cpp:
351         (BlackBerry::WebKit::BackingStorePrivate::isOpenGLCompositing):
352         (BlackBerry::WebKit::BackingStorePrivate::render):
353         (BlackBerry::WebKit::BackingStorePrivate::copyPreviousContentsToBackSurfaceOfWindow):
354         (BlackBerry::WebKit::BackingStorePrivate::paintDefaultBackground):
355         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
356         (BlackBerry::WebKit::BackingStorePrivate::blitTileRect):
357         (BlackBerry::WebKit::BackingStorePrivate::blendCompositingSurface):
358         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
359         (BlackBerry::WebKit::BackingStorePrivate::blitToWindow):
360         (BlackBerry::WebKit::BackingStorePrivate::checkerWindow):
361         (BlackBerry::WebKit::BackingStorePrivate::invalidateWindow):
362         (BlackBerry::WebKit::BackingStorePrivate::clearWindow):
363         (BlackBerry::WebKit::BackingStorePrivate::drawSubLayers):
364         (BlackBerry::WebKit::BackingStorePrivate::surfaceSize):
365         (BlackBerry::WebKit::BackingStorePrivate::buffer):
366         * Api/BackingStore_p.h:
367         * Api/WebPage.cpp:
368         (BlackBerry::WebKit::WebPagePrivate::didPluginEnterFullScreen):
369         (BlackBerry::WebKit::WebPagePrivate::didPluginExitFullScreen):
370         (BlackBerry::WebKit::WebPagePrivate::drawLayersOnCommit):
371         (BlackBerry::WebKit::WebPagePrivate::drawSubLayers):
372         (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
373         * WebCoreSupport/ChromeClientBlackBerry.cpp:
374         (WebCore::ChromeClientBlackBerry::windowRect):
375         (WebCore::ChromeClientBlackBerry::screenToWindow):
376         (WebCore::ChromeClientBlackBerry::windowToScreen):
377         * WebKitSupport/GLES2Context.cpp:
378         (BlackBerry::WebKit::GLES2Context::GLES2Context):
379         * WebKitSupport/TouchEventHandler.h:
380         * WebKitSupport/WebPageCompositor.cpp:
381         (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor):
382         (BlackBerry::WebKit::WebPageCompositor::setBackingStoreUsesOpenGL):
383         (BlackBerry::WebKit::WebPageCompositor::drawLayers):
384         * WebKitSupport/WebPageCompositor.h:
385
386 2012-03-13  Jon Lee  <jonlee@apple.com>
387
388         Separate NOTIFICATIONS and LEGACY_NOTIFICATIONS
389         https://bugs.webkit.org/show_bug.cgi?id=80922
390         <rdar://problem/11035082>
391
392         Reviewed by Jian Li.
393
394         You can include either NOTIFICATIONS or LEGACY_NOTIFICATIONS and have a complete API.
395         LEGACY_NOTIFICATIONS should cover all of the previous functionality, and NOTIFICATIONS will cover the
396         new API. Therefore, APIs that are common between the two will have:
397         #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
398
399         This patch initially sets both to be exactly the same. As other bugs with patches begin to migrate to
400         the new API, the defines will begin to split. This allows ports to decide which set of APIs to include.
401
402         Update everything to be #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
403         * Api/WebPage.cpp:
404         (BlackBerry::WebKit::WebPagePrivate::init):
405         * WebCoreSupport/NotificationPresenterImpl.cpp:
406         * WebCoreSupport/NotificationPresenterImpl.h:
407
408 2012-03-14  Nima Ghanavatian  <nghanavatian@rim.com>
409
410         [BlackBerry] Syncing up left over bits in Api from our local branch to upstream
411         https://bugs.webkit.org/show_bug.cgi?id=81105
412
413         Reviewed by Rob Buis.
414
415         * Api/BackingStore.cpp:
416         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
417         (BlackBerry::WebKit::BackingStorePrivate::isActive):
418         (BlackBerry::WebKit::BackingStore::createBackingStoreMemory):
419         (WebKit):
420         (BlackBerry::WebKit::BackingStore::releaseBackingStoreMemory):
421         * Api/BackingStore.h:
422         * Api/WebPage.cpp:
423         (BlackBerry::WebKit::toWebCoreMouseEventType):
424         (BlackBerry::WebKit::WebPagePrivate::init):
425         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
426         (BlackBerry::WebKit::WebPagePrivate::activeNodeContext):
427         (BlackBerry::WebKit::WebPage::activeNodeContext):
428         (BlackBerry::WebKit::WebPagePrivate::updateCursor):
429         (BlackBerry::WebKit::WebPagePrivate::contextNode):
430         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
431         * Api/WebPage.h:
432         * Api/WebPage_p.h:
433         (WebPagePrivate):
434
435 2012-03-14  Andrew Lo  <anlo@rim.com>
436
437         [BlackBerry] Implement REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR using AnimationFrameRateController
438         https://bugs.webkit.org/show_bug.cgi?id=81000
439
440         Set the platform display ID, needed for DisplayRefreshMonitor.
441
442         Reviewed by Antonio Gomes.
443
444         * Api/WebPage.cpp:
445         (BlackBerry::WebKit::WebPagePrivate::init):
446
447 2012-03-14  Leo Yang  <leo.yang@torchmobile.com.cn>
448
449         [BlackBerry] Upstream the BlackBerry change to platform/Cursor.h
450         https://bugs.webkit.org/show_bug.cgi?id=81086
451
452         Reviewed by Rob Buis.
453
454         There was an alias named PlatformCursorHandle for PlatformCursor
455         in the internal version of Cursor.h. But it's not necessary so it's
456         not included in the upstreaming version of Cursor.h. As a result,
457         use PlatformCursor directly.
458
459         * Api/WebPage.cpp:
460         (BlackBerry::WebKit::WebPagePrivate::setCursor):
461         * Api/WebPage_p.h:
462         (WebPagePrivate):
463
464 2012-03-13  Mike Fenton  <mifenton@rim.com>
465
466         [BlackBerry] Input focus state should unfocus the frame selection instead of the field.
467         https://bugs.webkit.org/show_bug.cgi?id=81023
468
469         Reviewed by Antonio Gomes.
470
471         PR 137400.
472
473         Prevent cursor drawing by unfocusing the frame selection
474         when input mode is not ready.
475
476         Greatly simplify the decision to focus input fields by removing
477         all ties to the page load state and base it on input.  Input mode
478         is disabled when a page load begins and enabled on any user input.
479
480         The field is focused and ready for input immediately, only the
481         frame selection (or cursor) is unfocused.
482
483         Reviewed Internally by Gen Mak, Antonio Gomes and Nima Ghanavatian.
484
485         * Api/WebPage.cpp:
486         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
487         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
488         * Api/WebPageClient.h:
489         * WebCoreSupport/EditorClientBlackBerry.cpp:
490         (WebCore::EditorClientBlackBerry::shouldBeginEditing):
491         * WebKitSupport/InputHandler.cpp:
492         (BlackBerry::WebKit::InputHandler::InputHandler):
493         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
494         (BlackBerry::WebKit::InputHandler::enableInputMode):
495         (BlackBerry::WebKit::InputHandler::setElementFocused):
496         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
497         (BlackBerry::WebKit::InputHandler::notifyClientOfKeyboardVisibilityChange):
498         (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
499         (BlackBerry::WebKit::InputHandler::setComposingText):
500         * WebKitSupport/InputHandler.h:
501         (InputHandler):
502         * WebKitSupport/TouchEventHandler.cpp:
503         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
504
505 2012-03-13  Adam Barth  <abarth@webkit.org> && Benjamin Poulain  <bpoulain@apple.com>
506
507         Always enable ENABLE(CLIENT_BASED_GEOLOCATION)
508         https://bugs.webkit.org/show_bug.cgi?id=78853
509
510         Reviewed by Adam Barth.
511
512         * Api/WebPage.cpp:
513         (BlackBerry::WebKit::WebPagePrivate::init):
514         * WebCoreSupport/AboutDataEnableFeatures.in:
515         * WebCoreSupport/ChromeClientBlackBerry.cpp:
516         * WebCoreSupport/ChromeClientBlackBerry.h:
517         (ChromeClientBlackBerry):
518         * WebKitSupport/DumpRenderTreeSupport.cpp:
519         (toGeolocationClientMock):
520         (DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests):
521         (DumpRenderTreeSupport::resetGeolocationMock):
522         (DumpRenderTreeSupport::setMockGeolocationError):
523         (DumpRenderTreeSupport::setMockGeolocationPermission):
524         (DumpRenderTreeSupport::setMockGeolocationPosition):
525
526 2012-03-13  Mike Lattanzio  <mlattanzio@rim.com>
527
528         Remove ActiveNodeContext in favour of BlackBerry::Platform::WebContext
529         https://bugs.webkit.org/show_bug.cgi?id=80984
530
531         Remove ActiveNodeContext, and switch the implementation to
532         provide a BlackBerry::Platform::WebContext. The new object
533         adds an explicit IsImage flag, as well as IsAudio and IsVideo
534         for the HTML5 elements.
535
536         Note that for many videos both IsVideo and IsAudio will be true,
537         as videos typically have audio streams as well.
538
539         Reviewed by George Staikos.
540
541         * Api/ActiveNodeContext.h: Removed.
542         * Api/WebPage.cpp:
543         (BlackBerry::WebKit::WebPagePrivate::webContext):
544         (BlackBerry::WebKit::WebPage::webContext):
545         * Api/WebPage.h:
546         * Api/WebPage_p.h:
547
548 2012-03-12  Andy Chen  <andchen@rim.com>
549
550         [Blackberry] Make the process of marking all matches interruptible and asynchronous for find-in-page
551         https://bugs.webkit.org/show_bug.cgi?id=80831
552
553         Reviewed by Antonio Gomes.
554
555         * WebKitSupport/InPageSearchManager.cpp:
556         (BlackBerry::WebKit::InPageSearchManager::DeferredScopeStringMatches::DeferredScopeStringMatches):
557         (BlackBerry::WebKit::InPageSearchManager::DeferredScopeStringMatches::doTimeout):
558         (BlackBerry::WebKit::InPageSearchManager::InPageSearchManager):
559         (BlackBerry::WebKit::InPageSearchManager::~InPageSearchManager):
560         (BlackBerry::WebKit::InPageSearchManager::findNextString):
561         (BlackBerry::WebKit::InPageSearchManager::shouldSearchForText):
562         (BlackBerry::WebKit::InPageSearchManager::findAndMarkText):
563         (BlackBerry::WebKit::InPageSearchManager::clearTextMatches):
564         (BlackBerry::WebKit::InPageSearchManager::frameUnloaded):
565         (BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):
566         (BlackBerry::WebKit::InPageSearchManager::scopeStringMatchesSoon):
567         (BlackBerry::WebKit::InPageSearchManager::callScopeStringMatches):
568         (BlackBerry::WebKit::InPageSearchManager::cancelPendingScopingEffort):
569         * WebKitSupport/InPageSearchManager.h:
570
571 2012-03-09  Jon Lee  <jonlee@apple.com>
572
573         Rename NotificationPresenter to NotificationClient
574         https://bugs.webkit.org/show_bug.cgi?id=80488
575         <rdar://problem/10965558>
576
577         Reviewed by Kentaro Hara.
578
579         Refactor to use renamed WebCore::NotificationClient.
580         * WebCoreSupport/NotificationPresenterImpl.cpp:
581         (WebCore::NotificationPresenterImpl::instance):
582         (WebCore::NotificationPresenterImpl::show):
583         (WebCore::NotificationPresenterImpl::checkPermission):
584         * WebCoreSupport/NotificationPresenterImpl.h:
585         (NotificationPresenterImpl):
586
587 2012-03-09  Charles Wei  <charles.wei@torchmobile.com.cn>
588
589         [BlackBerry] Web Notification not working after rebase
590         https://bugs.webkit.org/show_bug.cgi?id=80690
591
592         Reviewed by George Staikos.
593
594         1. NotificationPresenterImpl should be in namespace WebCore
595         2. Need to connect NotificationPresenterImpl to webcore the new way:
596            WebCore::provideNotification(Page*, NotificationPresenter*)
597         3. Remove the old way of connecting the Notification:
598            ChromeClientBlackBerry::notificationPresenter()
599
600         * Api/WebPage.cpp:
601         (BlackBerry::WebKit::WebPagePrivate::init):
602         * WebCoreSupport/ChromeClientBlackBerry.cpp:
603         (WebCore):
604         * WebCoreSupport/ChromeClientBlackBerry.h:
605         (ChromeClientBlackBerry):
606         * WebCoreSupport/NotificationPresenterImpl.cpp:
607         * WebCoreSupport/NotificationPresenterImpl.h:
608
609 2012-03-08  Mike Fenton  <mifenton@rim.com>
610
611         [BlackBerry] Always use the current focused node when processing focus changes
612         https://bugs.webkit.org/show_bug.cgi?id=80594
613
614         Reviewed by Antonio Gomes.
615
616         Guard against toRange or fromRange being null when called
617         as part of a clear event.
618
619         * WebCoreSupport/EditorClientBlackBerry.cpp:
620         (WebCore::EditorClientBlackBerry::shouldChangeSelectedRange):
621
622 2012-03-08  Yong Li  <yoli@rim.com>
623
624         [BlackBerry] Block file-to-file access by default
625         https://bugs.webkit.org/show_bug.cgi?id=80605
626
627         Reviewed by Rob Buis.
628
629         Turn off allowFileAccessFromFileURLs() by default.
630
631         * Api/WebPage.cpp:
632         (BlackBerry::WebKit::WebPagePrivate::init):
633
634 2012-03-08  Mike Fenton  <mifenton@rim.com>
635
636         [BlackBerry] Always use the current focused node when processing focus changes
637         https://bugs.webkit.org/show_bug.cgi?id=80594
638
639         Reviewed by Antonio Gomes.
640
641         Update InputHandler focused node handling to strictly use
642         the currently focused node.  This prevents a handling loop
643         when JS is modifying the focus and we get a late notification
644         of a past change from ChromeClientBlackBerry with the previously
645         unfocused node.
646
647         * WebCoreSupport/ChromeClientBlackBerry.cpp:
648         (WebCore::ChromeClientBlackBerry::focusedNodeChanged):
649         * WebCoreSupport/EditorClientBlackBerry.cpp:
650         (WebCore::EditorClientBlackBerry::shouldChangeSelectedRange):
651         (WebCore::EditorClientBlackBerry::setInputMethodState):
652         * WebKitSupport/InputHandler.cpp:
653         (BlackBerry::WebKit::InputHandler::focusedNodeChanged):
654         * WebKitSupport/InputHandler.h:
655
656 2012-03-07  Jacky Jiang  <zhajiang@rim.com>
657
658         [BlackBerry] WebKit rendering problem when show/hide VKB
659         https://bugs.webkit.org/show_bug.cgi?id=80448
660         RIM PR: 141727
661
662         Reviewed by Antonio Gomes.
663
664         When setting viewport size, layout happens inside
665         WebPagePrivate::setDefaultLayoutSize(), in this way, the layout is
666         outside of the code path of "needsLayout" so that the contents are
667         not rendered into the backing store. This is a regression of r108718,
668         switch back to do the layout inside the public API
669         WebPage::setDefaultLayoutSize().
670
671         We haven't upstreamed the manual tests directory yet, therefore,
672         the new manual test case will be upstreamed later.
673
674         * Api/WebPage.cpp:
675         (BlackBerry::WebKit::WebPagePrivate::setDefaultLayoutSize):
676         (BlackBerry::WebKit::WebPage::setDefaultLayoutSize):
677
678 2012-03-06  Lianghui Chen  <liachen@rim.com>
679
680         [BlackBerry] Set correct ResourceRequest target type.
681         https://bugs.webkit.org/show_bug.cgi?id=80430
682
683         Reviewed by Rob Buis.
684
685         Removed unused code in dispatchWillSendRequest(). These codes are too
686         late as the target type has already been referred to when calling
687         ResourceRequest::initializePlatformRequest().
688
689         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
690         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendRequest):
691
692 2012-03-06  Lianghui Chen  <liachen@rim.com>
693
694         [BlackBerry] Remove unused and unneeded WebPageClient::downloadRequested(NetworkRequest&)
695         https://bugs.webkit.org/show_bug.cgi?id=80438
696
697         Reviewed by Antonio Gomes.
698
699         * Api/WebPageClient.h:
700
701 2012-03-06  Jakob Petsovits  <jpetsovits@rim.com>
702
703         [BlackBerry] Don't suspend accel comp when backgrounding a page.
704         https://bugs.webkit.org/show_bug.cgi?id=80369
705         RIM PR: 137609
706
707         Reviewed by Adam Treat.
708
709         Just because the page is in the background doesn't mean
710         it's invisible, doesn't mean it won't have to be redrawn
711         at some point - on rotation, for instance.
712
713         We still suspend accelerated compositing on setVisible(false).
714
715         * Api/WebPage.cpp:
716         (BlackBerry::WebKit::WebPage::notifyPageBackground):
717         (BlackBerry::WebKit::WebPage::notifyPageForeground):
718
719 2012-03-06  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
720
721         [BlackBerry] function rename issue after MediaPlayerPrivateBlackBerry.[cpp\h] upstream
722         https://bugs.webkit.org/show_bug.cgi?id=80377
723
724         Reviewed by Rob Buis.
725
726         As some of the function names changed in class MediaPlayerPrivate
727         with the upstream of MediaPlayerPrivateBlackBerry.[cpp|h], we
728         should update WebKit/blackberry/Api/WebPage.cpp which uses these
729         functions accordingly.
730         Renamed functions in class MediaPlayerPrivate:
731         windowGet() -> getWindow()
732         windowPositionGet() -> getWindowPosition()
733         mmrContextNameGet() -> mmrContextName()
734
735         * Api/WebPage.cpp:
736         (BlackBerry::WebKit::WebPagePrivate::enterFullscreenForNode):
737
738 2012-03-05  Eli Fidler  <efidler@rim.com>
739
740         The minimum font size WebSetting should actually change the LOGICAL font size in WebCore.
741         https://bugs.webkit.org/show_bug.cgi?id=80312
742         RIM PR: 139874
743
744         Reviewed by George Staikos.
745
746         * Api/WebPage.cpp:
747         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
748
749 2012-03-05  Jakob Petsovits  <jpetsovits@rim.com>
750
751         Make accelerated compositing work again with direct rendering.
752         https://bugs.webkit.org/show_bug.cgi?id=80181
753         RIM PR: 139110
754
755         Reviewed by Antonio Gomes.
756         Internally reviewed by Arvid Nilsson.
757
758         The significant amount of refactoring and optimization work
759         that has gone into accelerated compositing missed out on
760         some of the code paths that are being used in direct rendering.
761
762         Animations were relying on blitVisibleContents() only (which
763         is a no-op in direct rendering mode). There were early returns
764         which are suitable to determine whether screen contents need
765         to be updated at all; however, when we're already forcing a
766         re-render then those checks would cause the composition surface
767         not to appear at all, or avoid drawing new animation frames.
768
769         We went through dispatchMessage(), potentially causing
770         mismatches between rendered (but not yet posted) back content
771         and layers composited on top of it. As we're rendering onto
772         the sole target surface (the window) directly and posting
773         from the same thread, we have to wait for compositing on the
774         UI thread to finish before posting the window.
775
776         In turn, this patch combines both drawSubLayers() and
777         blendCompositingSurface() calls into one method, reducing
778         the number of messages to the UI thread within
779         renderDirectToWindow() to one.
780
781         blendCompositingMessage() in renderDirectToScreen() was called
782         with contents coordinates rather than viewport coordinates.
783         That caused some of the composited content to be cut off when
784         the scroll position wasn't (0, 0).
785
786         We called copyPreviousContentsToBackSurfaceOfWindow() twice for
787         one frame, in both renderDirectToWindow() and invalidateWindow().
788         Only one of those (the latter one) is necessary.
789
790         * Api/BackingStore.cpp:
791         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
792         (BlackBerry::WebKit::BackingStorePrivate::renderDirectToWindow):
793         (BlackBerry::WebKit::BackingStorePrivate::drawSubLayers):
794         (WebKit):
795         (BlackBerry::WebKit::BackingStorePrivate::drawAndBlendLayersForDirectRendering):
796         * Api/BackingStore.h:
797         (WebKit):
798         * Api/BackingStore_p.h:
799         (BackingStorePrivate):
800         (BlackBerry::WebKit::BackingStorePrivate::isDirectRenderingAnimationMessageScheduled):
801         (BlackBerry::WebKit::BackingStorePrivate::setDirectRenderingAnimationMessageScheduled):
802         * Api/WebPage_p.h:
803         (BlackBerry::WebKit::WebPagePrivate::isAcceleratedCompositingActive):
804         (WebPagePrivate):
805         * WebKitSupport/WebPageCompositor.cpp:
806         (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor):
807         (BlackBerry::WebKit::WebPageCompositor::~WebPageCompositor):
808         (BlackBerry::WebKit::WebPageCompositor::drawLayers):
809         (BlackBerry::WebKit::WebPageCompositor::animationTimerFired):
810         * WebKitSupport/WebPageCompositor.h:
811         (WebPageCompositor):
812
813 2012-03-05  George Staikos  <gstaikos@rim.com>
814
815         [BlackBerry] DOMSupport visibleSelectionForRangeInputElement incorrectly dereferences a null range.
816         https://bugs.webkit.org/show_bug.cgi?id=80274
817
818         Reviewed by Antonio Gomes.
819
820         A null range can be returned so we should not blindly deref it.
821         Reviewed Internally by Mike Fenton.
822
823         * WebKitSupport/DOMSupport.cpp:
824         (BlackBerry::WebKit::DOMSupport::visibleSelectionForRangeInputElement):
825
826 2012-03-04  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
827
828         [BlackBerry] upstream CredentialManager and CredentialTransformData implementation
829         https://bugs.webkit.org/show_bug.cgi?id=80107
830
831         Reviewed by Antonio Gomes.
832
833         Initial upstream of CredentialManager.[h|cpp] and
834         CredentialTransformData.[h|cpp].
835         No new test.
836
837         * WebCoreSupport/CredentialManager.cpp: Added.
838         (WebCore):
839         (WebCore::CredentialManager::CredentialManager):
840         (WebCore::CredentialManager::autofillAuthenticationChallenge):
841         (WebCore::CredentialManager::autofillPasswordForms):
842         (WebCore::CredentialManager::saveCredentialIfConfirmed):
843         * WebCoreSupport/CredentialManager.h: Added.
844         (WebKit):
845         (WebCore):
846         (CredentialManager):
847         * WebCoreSupport/CredentialTransformData.cpp: Added.
848         (WebCore::CredentialTransformData::CredentialTransformData):
849         (WebCore):
850         (WebCore::CredentialTransformData::url):
851         (WebCore::CredentialTransformData::credential):
852         (WebCore::CredentialTransformData::setCredential):
853         (WebCore::CredentialTransformData::findPasswordFormFields):
854         * WebCoreSupport/CredentialTransformData.h: Added.
855         (WebCore):
856         (CredentialTransformData):
857         (WebCore::CredentialTransformData::isValid):
858         (WebCore::CredentialTransformData::protectionSpace):
859
860 2012-03-04  Antonio Gomes  <agomes@rim.com>
861
862         [BlackBerry] Fixed positioned element not correctly positioned after orientation change, when viewport metatag is used
863         https://bugs.webkit.org/show_bug.cgi?id=80228
864         PR #138865
865
866         Reviewed by George Staikos.
867
868         Viewport size changes in two main scenarios:
869         - orientation changes;
870         - virtual keyboard pop up/hide.
871
872         When we are setting a new viewport size, we need to
873         update the FixedReportedSize of the mainframe. This size
874         is used to return innerWidth|Heigth as well as to calculate
875         the fixed position elements height relative to the RenderView [1].
876
877         [1] RenderBox::containingBlockLogicalHeightForPositioned.
878
879         When we are rotating, we need to delay setting the new FixedReportedSize
880         till we layout and are able to figure out the new contents size. At this
881         time we call setFixedReportedSize, but we do not reposition the fixed elemts
882         afterwards.
883
884         Patch adds a call to FrameView::repaintFixedElementsAfterScrolling, after
885         setting the new size.
886
887         Source/WebKit/blackberry:
888         * Api/WebPage.cpp:
889         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
890
891 2012-03-02  Mike Fenton  <mifenton@rim.com>
892
893         [BlackBerry] Expose WebInspector state to client and clean up WebSettings
894         https://bugs.webkit.org/show_bug.cgi?id=80177
895
896         Reviewed by Antonio Gomes.
897
898         Expose the Web Inspector state to WebPage client's and
899         re-order initialization of WebSettings to be alphabetical
900         matching their definitions.
901
902         * Api/WebPage.cpp:
903         (BlackBerry::WebKit::WebPage::isWebInspectorEnabled):
904         * Api/WebPage.h:
905         * Api/WebSettings.cpp:
906         (BlackBerry::WebKit::WebSettings::standardSettings):
907
908 2012-03-02  Arvid Nilsson  <anilsson@rim.com>
909
910         Accelerated compositing: Checkerboard never goes away
911         https://bugs.webkit.org/show_bug.cgi?id=79020
912         RIM PR #134164
913
914         Reviewed by Adam Treat.
915
916         Checkerboard appears in accelerated compositing layers when there's no
917         texture for (part of) a layer. The layer renderer queues up some render
918         jobs and schedules a commit to make the WebKit thread process those
919         jobs. Render jobs performed during commit cause texture upload jobs to
920         be scheduled on the UI thread. Texture uploads are performed when next
921         drawing the layers.
922
923         Unfortunately, sometimes commit operation happens without a subsequent
924         call draw the layers.
925
926         In order to implement one-shot drawing sync, I added a call to
927         commitRootLayerIfNeeded() in BackingStore::renderContents(), and
928         I was lucky that most of the time, renderContents() is followed by
929         blit(Visible)Contents() which in turn draws the layers.
930         However, render is not always followed by a blit, for example when
931         rendering offscreen tiles in BackingStore::renderOnIdle(), and in
932         direct rendering mode.
933
934         Fixed by making sure that every call to commitRootLayerIfNeeded() that
935         returns true is followed by a call to drawLayersOnCommit(), unless a
936         blit was requested already.
937
938         Also tweak the logic for one-shot drawing sync to make the code in
939         drawLayersOnCommit() reusable outside of rootLayerCommitTimerFired().
940
941         * Api/BackingStore.cpp:
942         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
943         (BlackBerry::WebKit::BackingStorePrivate::renderOnTimer):
944         (BlackBerry::WebKit::BackingStorePrivate::renderOnIdle):
945         (BlackBerry::WebKit::BackingStorePrivate::willFireTimer):
946         (BlackBerry::WebKit::BackingStorePrivate::renderDirectToWindow):
947         (BlackBerry::WebKit::BackingStorePrivate::render):
948         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
949         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
950         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
951         (WebKit):
952         (BlackBerry::WebKit::BackingStorePrivate::drawLayersOnCommitIfNeeded):
953         * Api/BackingStore_p.h:
954         (BackingStorePrivate):
955         (BlackBerry::WebKit::BackingStorePrivate::willDrawLayersOnCommit):
956
957 2012-03-02  Adam Treat  <atreat@rim.com>
958
959         https://bugs.webkit.org/show_bug.cgi?id=80161
960         PR: 141157
961
962         BlackBerryPlatformScreen.h API has been updated.  Reflect those
963         changes in our usage.
964
965         Reviewed by Antonio Gomes.
966         Internally reviewed by Jakob Petsovits.
967
968         * Api/BackingStore.cpp:
969         (BlackBerry::WebKit::BackingStorePrivate::tileWidth):
970         (BlackBerry::WebKit::BackingStorePrivate::tileHeight):
971         * Api/WebPage.cpp:
972         (BlackBerry::WebKit::WebPagePrivate::init):
973         (BlackBerry::WebKit::WebPagePrivate::transformedViewportSize):
974         (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize):
975         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
976         (BlackBerry::WebKit::WebPagePrivate::setDefaultLayoutSize):
977         (BlackBerry::WebKit::WebPagePrivate::defaultMaxLayoutSize):
978         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
979         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
980         * WebKitSupport/SurfacePool.cpp:
981         (BlackBerry::WebKit::createCompositingSurface):
982
983 2012-03-02  Konrad Piascik  <kpiascik@rim.com>
984
985         [BlackBerry] Set the devicePixelRatio from the results of computeViewportAttributes
986         https://bugs.webkit.org/show_bug.cgi?id=80160
987
988         Reviewed by Antonio Gomes.
989
990         Tested by going to layout test fast/viewport/viewport-95.html and viewport-93.html
991         Previously when executing window.devicePixelRatio these two pages returned 1 now
992         they report the devicePixelRatio returned by computeViewportAttributes.
993
994         * Api/WebPage.cpp:
995         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
996
997 2012-03-02  Jacky Jiang  <zhajiang@rim.com>
998
999         Fix a warning in InputHandler::learnText()
1000         https://bugs.webkit.org/show_bug.cgi?id=80049
1001
1002         Reviewed by Antonio Gomes.
1003
1004         Fix a warning of the comparison "textInField.length() <=
1005         MaxLearnTextDataSize" in InputHandler::learnText().
1006
1007         Rubber-stamped internally by Mike Fenton.
1008
1009         * WebKitSupport/InputHandler.cpp:
1010         (BlackBerry::WebKit::InputHandler::learnText):
1011
1012 2012-03-01  Andy Chen  <andchen@rim.com>
1013
1014         [BlackBerry] Implement features for find-in-page
1015         https://bugs.webkit.org/show_bug.cgi?id=79820
1016
1017         Reviewed by Antonio Gomes.
1018
1019         - Make it be able to search text around the whole page instead of single frame.
1020         - Make it be able to start new search from active selection and last active match.
1021
1022         No new tests as this patch doesn't change behavior.
1023
1024         * Api/WebPage.cpp:
1025         (BlackBerry::WebKit::WebPagePrivate::frameUnloaded):
1026         * Api/WebPage_p.h:
1027         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1028         (WebCore::FrameLoaderClientBlackBerry::dispatchWillClose):
1029         (WebCore::FrameLoaderClientBlackBerry::detachedFromParent2):
1030         * WebKitSupport/DOMSupport.cpp:
1031         (BlackBerry::WebKit::DOMSupport::incrementFrame):
1032         * WebKitSupport/DOMSupport.h:
1033         * WebKitSupport/InPageSearchManager.cpp:
1034         (BlackBerry::WebKit::InPageSearchManager::findNextString):
1035         (BlackBerry::WebKit::InPageSearchManager::shouldSearchForText):
1036         (BlackBerry::WebKit::InPageSearchManager::findAndMarkText):
1037         (BlackBerry::WebKit::InPageSearchManager::setMarkerActive):
1038         (BlackBerry::WebKit::InPageSearchManager::frameUnloaded):
1039         * WebKitSupport/InPageSearchManager.h:
1040         * WebKitSupport/InputHandler.cpp:
1041         (BlackBerry::WebKit::InputHandler::frameUnloaded):
1042         * WebKitSupport/InputHandler.h:
1043
1044 2012-03-01  Charles Wei  <charles.wei@torchmobile.com.cn>
1045
1046         [BlackBerry] Web Notification crashes the browser.
1047         https://bugs.webkit.org/show_bug.cgi?id=79897
1048
1049         Reviewed by Antonio Gomes.
1050
1051         The reason of the crash is that it still uses the iterator
1052         after been removed from the container, which invalidates the
1053         iterator. 
1054         We should stop processing after we have found the element
1055         and removed from the container through the iterator.
1056
1057         This patch only fixes the crash issue, but not any notification
1058         functionality issue, which is tracked seperatly.
1059
1060         Test case: http://sandbox.gtaero.net/chrome/notifications.php
1061
1062         * WebCoreSupport/NotificationPresenterImpl.cpp:
1063         (WebKit::NotificationPresenterImpl::onPermission):
1064         (WebKit::NotificationPresenterImpl::notificationClicked):
1065
1066 2012-03-01  Mike Fenton  <mifenton@rim.com>
1067
1068         Autocomplete attribute should apply to textarea's.
1069         https://bugs.webkit.org/show_bug.cgi?id=79929
1070
1071         Reviewed by Antonio Gomes.
1072
1073         Add local static Qualified name for autocorrect attribute.
1074
1075         * WebKitSupport/DOMSupport.cpp:
1076         (BlackBerry::WebKit::DOMSupport::elementSupportsAutocorrect):
1077
1078 2012-02-29  Mike Fenton  <mifenton@rim.com>
1079
1080         Autocomplete attribute should apply to textarea's.
1081         https://bugs.webkit.org/show_bug.cgi?id=79929
1082
1083         Reviewed by Antonio Gomes.
1084
1085         Allow the autocomplete attribute to bubble back to the form setting.
1086
1087         Expand support to include checking autocorrect, autocomplete and
1088         name/id matching to text areas.
1089
1090         Reviewed internally by Nima Ghanavatian and Gen Mak.
1091
1092         * WebKitSupport/DOMSupport.cpp:
1093         (BlackBerry::WebKit::DOMSupport::elementSupportsAutocorrect):
1094         (BlackBerry::WebKit::DOMSupport::elementSupportsAutocomplete):
1095         (BlackBerry::WebKit::DOMSupport::elementAttributeState):
1096         * WebKitSupport/DOMSupport.h:
1097         * WebKitSupport/InputHandler.cpp:
1098         (BlackBerry::WebKit::inputStyle):
1099
1100 2012-02-29  Max Feil  <mfeil@rim.com>
1101
1102         [BlackBerry] Add support for FLAC audio and OGG/Vorbis audio
1103         https://bugs.webkit.org/show_bug.cgi?id=79519
1104
1105         Reviewed by Antonio Gomes.
1106
1107         * Api/WebSettings.cpp:
1108         (BlackBerry::WebKit::mimeTypeAssociationMap):
1109
1110 2012-02-28  Konrad Piascik  <kpiascik@rim.com>
1111
1112         [BlackBerry] Change the API to use std::string
1113         https://bugs.webkit.org/show_bug.cgi?id=79818
1114
1115         Reviewed by Antonio Gomes.
1116
1117         * Api/WebPage.cpp:
1118         (BlackBerry::WebKit::WebPage::dispatchInspectorMessage):
1119         * Api/WebPage.h:
1120
1121 2012-02-28  Jacky Jiang  <zhajiang@rim.com>
1122
1123         [BlackBerry] x86 build fix after cleaning up WebPage.cpp
1124         https://bugs.webkit.org/show_bug.cgi?id=79814
1125
1126         Reviewed by Antonio Gomes.
1127
1128         x86 build fix, keep WebPage::destroyWebPageCompositor() method where it
1129         was which was outside of USE(ACCELERATED_COMPOSITING).
1130
1131         * Api/WebPage.cpp:
1132         (BlackBerry::WebKit::WebPage::destroyWebPageCompositor):
1133         (WebKit):
1134
1135 2012-02-28  Mike Fenton  <mifenton@rim.com>
1136
1137         [BlackBerry] Remove unused focusedNodeChange notifications from the Chrome client.
1138         https://bugs.webkit.org/show_bug.cgi?id=79794
1139
1140         Reviewed by Rob Buis.
1141
1142         Remove unused notification for focusedNodeChanged.
1143
1144         Internally reviewed by Gen Mak.
1145
1146         * Api/WebPageClient.h:
1147         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1148         (WebCore::ChromeClientBlackBerry::focusedNodeChanged):
1149
1150 2012-02-27  Jacky Jiang  <zhajiang@rim.com>
1151
1152         [BlackBerry] Upstream BlackBerry API web page related files
1153         https://bugs.webkit.org/show_bug.cgi?id=74380
1154
1155         Reviewed by Antonio Gomes.
1156
1157         Clean up WebPage.{h, cpp} and WebPage_p.h.
1158         - Remove WebPage::mainFrame() as it is bad to expose WebCore::Frame in
1159           the public API, adapt to the change by adding a new method
1160           WebPagePrivate::core(Const WebPage*) and expose it to
1161           DumpRenderTreeSupport.
1162         - Rename WebPage::spellCheckingEnabled to
1163           WebPage::setSpellCheckingEnabled.
1164         - Remove unused WebPage::focusNodeRect().
1165         - Remove extra blank lines.
1166         - Put WebPage methods and their associated WebPagePrivate methods
1167           together.
1168
1169         No new tests as this patch doesn't change behavior.
1170
1171         * Api/WebPage.cpp:
1172         (BlackBerry::WebKit::WebPage::WebPage):
1173         (WebKit):
1174         (BlackBerry::WebKit::WebPage::~WebPage):
1175         (BlackBerry::WebKit::WebPagePrivate::core):
1176         (BlackBerry::WebKit::WebPage::load):
1177         (BlackBerry::WebKit::WebPage::loadExtended):
1178         (BlackBerry::WebKit::WebPage::loadFile):
1179         (BlackBerry::WebKit::WebPage::download):
1180         (BlackBerry::WebKit::WebPage::loadString):
1181         (BlackBerry::WebKit::WebPage::executeJavaScript):
1182         (BlackBerry::WebKit::WebPage::executeJavaScriptInIsolatedWorld):
1183         (BlackBerry::WebKit::WebPage::stopLoading):
1184         (BlackBerry::WebKit::WebPage::prepareToDestroy):
1185         (BlackBerry::WebKit::WebPage::setScrollPosition):
1186         (BlackBerry::WebKit::WebPage::scrollBy):
1187         (BlackBerry::WebKit::WebPage::notifyInRegionScrollStatusChanged):
1188         (BlackBerry::WebKit::WebPage::zoomToFitScale):
1189         (BlackBerry::WebKit::WebPage::initialScale):
1190         (BlackBerry::WebKit::WebPage::maximumScale):
1191         (BlackBerry::WebKit::WebPage::scrollPosition):
1192         (BlackBerry::WebKit::WebPage::viewportSize):
1193         (BlackBerry::WebKit::WebPage::activeNodeContext):
1194         (BlackBerry::WebKit::WebPage::assignFocus):
1195         (BlackBerry::WebKit::WebPage::blockZoomAnimationFinished):
1196         (BlackBerry::WebKit::WebPage::onInputLocaleChanged):
1197         (BlackBerry::WebKit::WebPage::setScreenOrientation):
1198         (BlackBerry::WebKit::WebPage::applyPendingOrientationIfNeeded):
1199         (BlackBerry::WebKit::WebPage::setViewportSize):
1200         (BlackBerry::WebKit::WebPage::setDefaultLayoutSize):
1201         (BlackBerry::WebKit::WebPage::setScrollOriginPoint):
1202         (BlackBerry::WebKit::WebPage::textEncoding):
1203         (BlackBerry::WebKit::WebPage::forcedTextEncoding):
1204         (BlackBerry::WebKit::WebPage::setForcedTextEncoding):
1205         (BlackBerry::WebKit::WebPage::setSpellCheckingEnabled):
1206         (BlackBerry::WebKit::parentLayer):
1207         (BlackBerry::WebKit::WebPagePrivate::inRegionScrollableAreasForPoint):
1208         (BlackBerry::WebKit::WebPage::destroyWebPageCompositor):
1209         * Api/WebPage.h:
1210         (WebCore):
1211         (WebKit):
1212         * Api/WebPage_p.h:
1213         (WebCore):
1214         (WebKit):
1215         * WebKitSupport/DumpRenderTreeSupport.cpp:
1216         (DumpRenderTreeSupport::corePage):
1217         (DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests):
1218         (DumpRenderTreeSupport::resetGeolocationMock):
1219         (DumpRenderTreeSupport::setMockGeolocationError):
1220         (DumpRenderTreeSupport::setMockGeolocationPermission):
1221         (DumpRenderTreeSupport::setMockGeolocationPosition):
1222         (DumpRenderTreeSupport::scalePageBy):
1223         * WebKitSupport/DumpRenderTreeSupport.h:
1224         (WebCore):
1225         (DumpRenderTreeSupport):
1226
1227 2012-02-27  Mike Fenton  <mifenton@rim.com>
1228
1229         [BlackBerry] Selection handling should be entirely directional
1230         https://bugs.webkit.org/show_bug.cgi?id=79692
1231
1232         Reviewed by Antonio Gomes.
1233
1234         Make all VisibleSelections directional.
1235
1236         * WebKitSupport/SelectionHandler.cpp:
1237         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
1238         (BlackBerry::WebKit::SelectionHandler::setSelection):
1239
1240 2012-02-27  Ed Baker  <edbaker@rim.com>
1241
1242         [BlackBerry] Dragging a selection handle outside of the content bounding box does not update the selection range correctly
1243         https://bugs.webkit.org/show_bug.cgi?id=78608
1244
1245         Ensure that when selection handles leave the content bounding box that
1246         the handle not being dragged remains fixed. Do not apply padding to a
1247         direction that would cause the selection to shrink when performing the
1248         handle direction detection.
1249
1250         Reviewed by Antonio Gomes.
1251
1252         * WebKitSupport/DOMSupport.cpp:
1253         (BlackBerry::WebKit::DOMSupport::convertPointToFrame):
1254         * WebKitSupport/DOMSupport.h:
1255         * WebKitSupport/SelectionHandler.cpp:
1256         (BlackBerry::WebKit::clamp):
1257         (BlackBerry::WebKit::directionalVisiblePositionAtExtentOfBox):
1258         (BlackBerry::WebKit::SelectionHandler::extendSelectionToFieldBoundary):
1259         (BlackBerry::WebKit::SelectionHandler::setSelection):
1260         (BlackBerry::WebKit::SelectionHandler::clipPointToVisibleContainer):
1261         * WebKitSupport/SelectionHandler.h:
1262
1263 2012-02-27  Leo Yang  <leo.yang@torchmobile.com.cn>
1264
1265         [BlackBerry] Upstream accelerated compositing helper class
1266         https://bugs.webkit.org/show_bug.cgi?id=78448
1267
1268         Reviewed by Antonio Gomes.
1269
1270         Initial upstream, no new tests.
1271
1272         * WebKitSupport/FrameLayers.cpp: Added.
1273         * WebKitSupport/FrameLayers.h: Added.
1274
1275 2012-02-26  Hajime Morrita  <morrita@chromium.org>
1276
1277         Move ChromeClient::showContextMenu() to ContextMenuClient
1278         https://bugs.webkit.org/show_bug.cgi?id=79427
1279
1280         Reviewed by Adam Barth.
1281
1282         * WebCoreSupport/ChromeClientBlackBerry.h:
1283         (ChromeClientBlackBerry):
1284
1285 2012-02-24  Mike Fenton  <mifenton@rim.com>
1286
1287         [BlackBerry] Eliminate excessive BlackBerry::Platform use in InputHandler
1288         https://bugs.webkit.org/show_bug.cgi?id=79393
1289
1290         Reviewed by Antonio Gomes.
1291
1292         Cleanup usage of BlackBerry::Platform in InputHandler.
1293
1294         * WebKitSupport/InputHandler.cpp:
1295         (BlackBerry::WebKit::convertStringToWchar):
1296         (BlackBerry::WebKit::convertStringToWcharVector):
1297         (BlackBerry::WebKit::convertSpannableStringToString):
1298         (BlackBerry::WebKit::InputHandler::learnText):
1299         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
1300         (BlackBerry::WebKit::InputHandler::shouldAcceptInputFocus):
1301         (BlackBerry::WebKit::InputHandler::setElementFocused):
1302         (BlackBerry::WebKit::InputHandler::nodeTextChanged):
1303         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
1304         (BlackBerry::WebKit::InputHandler::frameUnloaded):
1305         (BlackBerry::WebKit::InputHandler::selectionChanged):
1306         (BlackBerry::WebKit::InputHandler::setSelection):
1307         (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
1308         (BlackBerry::WebKit::InputHandler::deleteTextRelativeToCursor):
1309         (BlackBerry::WebKit::InputHandler::deleteText):
1310         (BlackBerry::WebKit::InputHandler::spannableTextInRange):
1311         (BlackBerry::WebKit::InputHandler::setComposingRegion):
1312         (BlackBerry::WebKit::InputHandler::finishComposition):
1313         (BlackBerry::WebKit::InputHandler::setText):
1314         (BlackBerry::WebKit::InputHandler::setTextAttributes):
1315         (BlackBerry::WebKit::InputHandler::setRelativeCursorPosition):
1316         (BlackBerry::WebKit::InputHandler::setSpannableTextAndRelativeCursor):
1317         (BlackBerry::WebKit::InputHandler::setComposingText):
1318         (BlackBerry::WebKit::InputHandler::commitText):
1319
1320 2012-02-24  Mike Fenton  <mifenton@rim.com>
1321
1322         [BlackBerry] Eliminate excessive BlackBerry::Platform use in SelectionHandler.
1323         https://bugs.webkit.org/show_bug.cgi?id=79391
1324
1325         Reviewed by Antonio Gomes.
1326
1327         Clean up usage of BlackBerry::Platform in SelectionHandler and
1328         explicitly define what namespace to use for ambiguous objects like
1329         IntRect and IntPoint.
1330
1331         * WebKitSupport/SelectionHandler.cpp:
1332         (BlackBerry::WebKit::SelectionHandler::cancelSelection):
1333         (BlackBerry::WebKit::SelectionHandler::getConsolidatedRegionOfTextQuadsForSelection):
1334         (BlackBerry::WebKit::visiblePositionForPointIgnoringClipping):
1335         (BlackBerry::WebKit::directionOfPointRelativeToRect):
1336         (BlackBerry::WebKit::SelectionHandler::shouldUpdateSelectionOrCaretForPoint):
1337         (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
1338         (BlackBerry::WebKit::directionalVisiblePositionAtExtentOfBox):
1339         (BlackBerry::WebKit::pointIsOutsideOfBoundingBoxInDirection):
1340         (BlackBerry::WebKit::SelectionHandler::extendSelectionToFieldBoundary):
1341         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
1342         (BlackBerry::WebKit::SelectionHandler::clipPointToFocusNode):
1343         (BlackBerry::WebKit::SelectionHandler::setSelection):
1344         (BlackBerry::WebKit::SelectionHandler::selectAtPoint):
1345         (BlackBerry::WebKit::SelectionHandler::selectObject):
1346         (BlackBerry::WebKit::comparePointsToReferencePoint):
1347         (BlackBerry::WebKit::minXMinYCorner):
1348         (BlackBerry::WebKit::maxXMinYCorner):
1349         (BlackBerry::WebKit::minXMaxYCorner):
1350         (BlackBerry::WebKit::maxXMaxYCorner):
1351         (BlackBerry::WebKit::caretLocationForRect):
1352         (BlackBerry::WebKit::caretComparisonPointForRect):
1353         (BlackBerry::WebKit::adjustCaretRects):
1354         (BlackBerry::WebKit::SelectionHandler::clipRegionToVisibleContainer):
1355         (BlackBerry::WebKit::referencePoint):
1356         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
1357         (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
1358         (BlackBerry::WebKit::SelectionHandler::selectionContains):
1359
1360 2012-02-24  Shinya Kawanaka  <shinyak@chromium.org>
1361
1362         SpellCheckRequest needs to know the context where the spellcheck happened.
1363         https://bugs.webkit.org/show_bug.cgi?id=79320
1364
1365         Reviewed by Hajime Morita.
1366
1367         * WebCoreSupport/EditorClientBlackBerry.cpp:
1368         (WebCore::EditorClientBlackBerry::requestCheckingOfString):
1369         * WebCoreSupport/EditorClientBlackBerry.h:
1370         (EditorClientBlackBerry):
1371
1372 2012-02-24  Charles Wei  <charles.wei@torchmobile.com.cn>
1373
1374         [BlackBerry] Anchor mailto: with target set won't launch Messaging application when clicked
1375         https://bugs.webkit.org/show_bug.cgi?id=79318
1376
1377         Need to give the client a chance to decide how to handle the new window request.
1378
1379         Reviewed by Rob Buis.
1380
1381         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1382         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNewWindowAction):
1383
1384 2012-02-23  Mike Fenton  <mifenton@rim.com>
1385
1386         [BlackBerry] Selection handler has compile failure with logs enabled.
1387         https://bugs.webkit.org/show_bug.cgi?id=79392
1388
1389         Reviewed by Antonio Gomes.
1390
1391         Build Fix.  Update log to avoid usage of toString which was removed.
1392
1393         * WebKitSupport/SelectionHandler.cpp:
1394         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
1395
1396 2012-02-19  Antonio Gomes  <agomes@rim.com>
1397
1398         Fat fingers - Add a clearer way to distinguish the node we want (shadow or non-shadow)
1399         https://bugs.webkit.org/show_bug.cgi?id=79256
1400         PR #127814 / MKS_2587410
1401
1402         Reviewed by Rob Buis.
1403
1404         Patch adds a cleaner way for call sites of FatFingersResult to
1405         query for the appropriated target node: shadow or non-shadow DOM nodes.
1406
1407         It also renames FatFingersResults::validNode to ::node, assuming
1408         that "invalid" nodes are not applicable in any context.
1409
1410         * Api/WebPage.cpp:
1411         (BlackBerry::WebKit::WebPagePrivate::clearDocumentData):
1412         (BlackBerry::WebKit::WebPagePrivate::contextNode):
1413         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
1414         * WebKitSupport/FatFingers.h:
1415         (FatFingersResult):
1416         (BlackBerry::WebKit::FatFingersResult::node):
1417         (BlackBerry::WebKit::FatFingersResult::nodeAsElementIfApplicable):
1418         * WebKitSupport/SelectionHandler.cpp:
1419         (BlackBerry::WebKit::SelectionHandler::selectAtPoint):
1420         * WebKitSupport/TouchEventHandler.cpp:
1421         (BlackBerry::WebKit::TouchEventHandler::touchHoldEvent):
1422         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
1423
1424 2012-02-23  Jacky Jiang  <zhajiang@rim.com>
1425
1426         [BlackBerry] Upstream BlackBerry API web page related files
1427         https://bugs.webkit.org/show_bug.cgi?id=74380
1428
1429         Reviewed by Antonio Gomes.
1430
1431         Initial upstream, no new tests.
1432
1433         * Api/WebPage.cpp: Added.
1434         * Api/WebPage.h: Added.
1435         * Api/WebPage_p.h: Added.
1436
1437 2012-02-23  Leo Yang  <leo.yang@torchmobile.com.cn>
1438
1439         [BlackBerry] Remove unused ChromeClientBlackBerry::platformCompositingWindow(), platformWindow() and WebPageClient::compositingWindow()
1440         https://bugs.webkit.org/show_bug.cgi?id=78681
1441
1442         Reviewed by Antonio Gomes.
1443
1444         * Api/WebPageClient.h:
1445         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1446         (WebCore):
1447         * WebCoreSupport/ChromeClientBlackBerry.h:
1448         (ChromeClientBlackBerry):
1449
1450 2012-02-23  Leo Yang  <leo.yang@torchmobile.com.cn>
1451
1452         [BlackBerry] Upstream GLES2Context.{h, cpp}
1453         https://bugs.webkit.org/show_bug.cgi?id=79196
1454
1455         Reviewed by Rob Buis.
1456
1457         Initial upstream, no new tests.
1458
1459         * WebKitSupport/GLES2Context.cpp: Added.
1460         * WebKitSupport/GLES2Context.h: Added.
1461
1462 2012-02-23  Mike Fenton  <mifenton@rim.com>
1463
1464         [BlackBerry] InputHandler requires cleanup of Navigation Mode handling.
1465         https://bugs.webkit.org/show_bug.cgi?id=79366
1466
1467         Reviewed by Rob Buis.
1468
1469         Cleanup InputHandler navigation based code.
1470
1471         1) Remove the concept of NavigationMode and replace it
1472            with simple showKeyboard calls.
1473
1474         2) Remove navigation move events and replace with standard
1475            key events.
1476
1477         3) Standardize function/variable names and remove obsolete
1478            functions.
1479
1480         * Api/WebPageClient.h:
1481         * WebKitSupport/InputHandler.cpp:
1482         (BlackBerry::WebKit::InputHandler::InputHandler):
1483         (BlackBerry::WebKit::InputHandler::nodeFocused):
1484         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
1485         (BlackBerry::WebKit::InputHandler::setElementFocused):
1486         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
1487         (BlackBerry::WebKit::InputHandler::setDelayKeyboardVisibilityChange):
1488         (BlackBerry::WebKit::InputHandler::processPendingKeyboardVisibilityChange):
1489         (BlackBerry::WebKit::InputHandler::notifyClientOfKeyboardVisibilityChange):
1490         * WebKitSupport/InputHandler.h:
1491         (InputHandler):
1492         * WebKitSupport/SelectionHandler.cpp:
1493         (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
1494         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
1495         * WebKitSupport/TouchEventHandler.cpp:
1496         (BlackBerry::WebKit::TouchEventHandler::touchEventCancel):
1497         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
1498
1499 2012-02-21  Ryosuke Niwa  <rniwa@webkit.org>
1500
1501         Remove the remaining uses of CSSStyleDeclaration in Editor
1502         https://bugs.webkit.org/show_bug.cgi?id=78939
1503
1504         Reviewed by Enrica Casucci.
1505
1506         * WebCoreSupport/EditorClientBlackBerry.cpp:
1507         (WebCore::EditorClientBlackBerry::shouldApplyStyle):
1508         * WebCoreSupport/EditorClientBlackBerry.h:
1509         (EditorClientBlackBerry):
1510
1511 2012-02-22  Mike Fenton  <mifenton@rim.com>
1512
1513         [BlackBerry] InputHandler has signed vs unsigned comparison.
1514         https://bugs.webkit.org/show_bug.cgi?id=79261
1515
1516         Fix warning by casting the unsigned int to an int.
1517
1518         Reviewed by Rob Buis.
1519
1520         * WebKitSupport/InputHandler.cpp:
1521         (BlackBerry::WebKit::InputHandler::rectForCaret):
1522
1523 2012-02-22  Ryosuke Niwa  <rniwa@webkit.org>
1524
1525         Remove the remaining uses of CSSStyleDeclaration in Editor
1526         https://bugs.webkit.org/show_bug.cgi?id=78939
1527
1528         Reviewed by Enrica Casucci.
1529
1530         * WebCoreSupport/EditorClientBlackBerry.cpp:
1531         (WebCore::EditorClientBlackBerry::shouldApplyStyle):
1532         * WebCoreSupport/EditorClientBlackBerry.h:
1533         (EditorClientBlackBerry):
1534
1535 2012-02-18  Antonio Gomes  <agomes@rim.com>
1536
1537         Fat fingers - cache the first rect-based hit test so we do not need to do it again
1538         https://bugs.webkit.org/show_bug.cgi?id=79115
1539
1540         Reviewed by Adam Treat.
1541
1542         Our FatFingers implementation runs currently in two phases:
1543         the first checks for the elements intrinsically clickable;
1544         the second checks for elements made clickable by the page
1545         (for example, a div with a onclick event listener attached to it).
1546         For each phase, we perform a rect hittest, which is not needed since
1547         the result of each is the same.
1548
1549         Patch introduces a caching mechanism so we avoid on rect hittest:
1550         when the first phase runs, it caches each nodeset per document in
1551         a hashmap. This second phase works with the cached results.
1552
1553         No behavioral change, but performance is better since we
1554         avoid one (possibly expensive) rect hittest.
1555
1556         I measured the performance gain on https://www.kvd.se/, and we
1557         save up to 0.04 seconds, by caching and re-using the results.
1558
1559         * WebKitSupport/FatFingers.cpp:
1560         (BlackBerry::WebKit::dumpHitTestResult):
1561         (BlackBerry::WebKit::FatFingers::findBestPoint):
1562         (BlackBerry::WebKit::FatFingers::findIntersectingRegions):
1563         (BlackBerry::WebKit::FatFingers::cachingStrategy):
1564         (WebKit):
1565         (BlackBerry::WebKit::FatFingers::getNodesFromRect):
1566         * WebKitSupport/FatFingers.h:
1567
1568 2012-02-20  Antonio Gomes  <agomes@rim.com>
1569
1570         All default video/audio control elements should be rect-hit testable (Part II)
1571         PR #139518 / MKS_3005538
1572
1573         Reviewed by George Staikos.
1574
1575         Add HTMLInputElement::isMediaControlElement as a criteria
1576         to consider a element as clickable.
1577
1578         Note that is should be only used while in the "ClickableByDefault"
1579         phase of FatFingers.
1580
1581         * WebKitSupport/FatFingers.cpp:
1582         (BlackBerry::WebKit::FatFingers::isElementClickable):
1583
1584 2012-02-16  Antonio Gomes  <agomes@rim.com>
1585
1586         [BlackBerry] Implemented a way to defer client navigation change client notifications
1587         https://bugs.webkit.org/show_bug.cgi?id=78848
1588
1589         Reviewed by Rob Buis.
1590
1591         Currently we postpone touch_down till touch_up if user touches
1592         the screen and an input field has the WebKit focus. This is done
1593         so we can scroll the page without hidding the vkb needlessly.
1594
1595         However, it breaks the conversion of touch to mouse events
1596         if an input field has the focus in the following scenario:
1597         an <input type=text> is focused and an user grab and-drag
1598         a <input type=range> knob/slide. It does not work until the
1599         user unfocuses the currently focused edit field.
1600
1601         Patch introduces a way to unfocus a currently focused input field,
1602         without requesting the client to show or hide the virtual keyboard
1603         right way. Instead it gets a delayed notification of the vkb mode requested
1604         at either touch_released/mouse_up or touch_cancel time.
1605
1606         For now, due to content side issues with major web sites,
1607         only delay navigation mode notification changes if we are not dealing with
1608         input modes.
1609
1610         * WebKitSupport/InputHandler.cpp:
1611         (BlackBerry::WebKit::InputHandler::InputHandler):
1612         (BlackBerry::WebKit::InputHandler::nodeFocused):
1613         (BlackBerry::WebKit::InputHandler::setElementFocused):
1614         (BlackBerry::WebKit::InputHandler::setNavigationMode):
1615         (WebKit):
1616         (BlackBerry::WebKit::InputHandler::setDelayClientNotificationOfNavigationModeChange):
1617         (BlackBerry::WebKit::InputHandler::processPendingClientNavigationModeChangeNotification):
1618         (BlackBerry::WebKit::InputHandler::notifyClientOfNavigationModeChange):
1619         (BlackBerry::WebKit::InputHandler::willOpenPopupForNode):
1620         (BlackBerry::WebKit::InputHandler::setPopupListIndexes):
1621         (BlackBerry::WebKit::InputHandler::spannableTextInRange):
1622         (BlackBerry::WebKit::InputHandler::removeComposedText):
1623         (BlackBerry::WebKit::InputHandler::firstSpanInString):
1624         (BlackBerry::WebKit::InputHandler::setText):
1625         (BlackBerry::WebKit::InputHandler::setRelativeCursorPosition):
1626         * WebKitSupport/InputHandler.h:
1627         (InputHandler):
1628
1629 2012-02-16  Antonio Gomes  <agomes@rim.com>
1630
1631         Crash @WebPagePrivate::enqueueRenderingOfClippedContentOfScrollableNodeAfterInRegionScrolling MKS_2986818
1632         https://bugs.webkit.org/show_bug.cgi?id=78845
1633
1634         Reviewed by Rob Buis.
1635
1636         We were trying to operate on a cached Node when its page/frame/document
1637         were gone to PageCache already. To avoid such problems, lets clean up
1638         any document data we have cached when the Frame goes into the cache.
1639
1640         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1641         (WebCore::FrameLoaderClientBlackBerry::didSaveToPageCache):
1642         (WebCore):
1643         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
1644         (FrameLoaderClientBlackBerry):
1645
1646 2012-02-16  Antonio Gomes  <agomes@rim.com>
1647
1648         [BlackBerry] Upstream touch handling related classes
1649         https://bugs.webkit.org/show_bug.cgi?id=78509
1650
1651         Reviewed by Adam Treat and Rob Buis.
1652
1653         FatFingers is the class responsible to the whole touch
1654         accuracy of the BlackBerry port. Initial upstream.
1655
1656         * WebKitSupport/FatFingers.cpp: Added.
1657         (WebKit):
1658         (BlackBerry::WebKit::FatFingers::fingerRectForPoint):
1659         (BlackBerry::WebKit::hasMousePressListener):
1660         (BlackBerry::WebKit::FatFingers::isElementClickable):
1661         (BlackBerry::WebKit::isFieldWithText):
1662         (BlackBerry::WebKit::distanceBetweenPoints):
1663         (BlackBerry::WebKit::compareDistanceBetweenPoints):
1664         (BlackBerry::WebKit::isValidFrameOwner):
1665         (BlackBerry::WebKit::FatFingers::FatFingers):
1666         (BlackBerry::WebKit::FatFingers::~FatFingers):
1667         (BlackBerry::WebKit::FatFingers::findBestPoint):
1668         (BlackBerry::WebKit::FatFingers::checkFingerIntersection):
1669         (BlackBerry::WebKit::FatFingers::findIntersectingRegions):
1670         (BlackBerry::WebKit::FatFingers::checkForClickableElement):
1671         (BlackBerry::WebKit::FatFingers::checkForText):
1672         (BlackBerry::WebKit::FatFingers::getPaddings):
1673         (BlackBerry::WebKit::FatFingers::nodesFromRect):
1674         (BlackBerry::WebKit::FatFingers::getRelevantInfoFromPoint):
1675         (BlackBerry::WebKit::FatFingers::setSuccessfulFatFingersResult):
1676         * WebKitSupport/FatFingers.h: Added.
1677         (WebCore):
1678         (WebKit):
1679         (FatFingersResult):
1680         (BlackBerry::WebKit::FatFingersResult::FatFingersResult):
1681         (BlackBerry::WebKit::FatFingersResult::reset):
1682         (BlackBerry::WebKit::FatFingersResult::originPosition):
1683         (BlackBerry::WebKit::FatFingersResult::adjustedPosition):
1684         (BlackBerry::WebKit::FatFingersResult::positionWasAdjusted):
1685         (BlackBerry::WebKit::FatFingersResult::isTextInput):
1686         (BlackBerry::WebKit::FatFingersResult::isValid):
1687         (BlackBerry::WebKit::FatFingersResult::validNode):
1688         (BlackBerry::WebKit::FatFingersResult::nodeAsElementIfApplicable):
1689         (FatFingers):
1690
1691 2012-02-16  Antonio Gomes  <agomes@rim.com>
1692
1693         [BlackBerry] Upstream touch handling related classes
1694         https://bugs.webkit.org/show_bug.cgi?id=78509
1695
1696         Reviewed by Adam Treat.
1697
1698         Initial upstream of the Blackberry specific single touch event
1699         handler class.
1700
1701         * blackberry/WebKitSupport/TouchEventHandler.cpp: Added.
1702         (WebKit):
1703         (BlackBerry::WebKit::hasMouseMoveListener):
1704         (BlackBerry::WebKit::hasTouchListener):
1705         (BlackBerry::WebKit::elementExpectsMouseEvents):
1706         (BlackBerry::WebKit::shouldConvertTouchToMouse):
1707         (BlackBerry::WebKit::TouchEventHandler::TouchEventHandler):
1708         (BlackBerry::WebKit::TouchEventHandler::~TouchEventHandler):
1709         (BlackBerry::WebKit::TouchEventHandler::shouldSuppressMouseDownOnTouchDown):
1710         [BlackBerry] Upstream touch handling related classes
1711         https://bugs.webkit.org/show_bug.cgi?id=78509
1712
1713         Reviewed by Rob Buis.
1714
1715         InRegionScrollableArea specializes the BlackBerry specific ScrollViewBase,
1716         working as a read-only wrapper object for a scrollable areas in the page.
1717         It is used in our client side to control in-region scrolling (scrollable boxes,
1718         inner frames, etc).
1719
1720         Initial upstream.
1721
1722         * WebKitSupport/InRegionScrollableArea.cpp: Added.
1723         (WebKit):
1724         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
1725         (BlackBerry::WebKit::InRegionScrollableArea::calculateMinimumScrollPosition):
1726         (BlackBerry::WebKit::InRegionScrollableArea::calculateMaximumScrollPosition):
1727         (BlackBerry::WebKit::InRegionScrollableArea::layer):
1728         (BlackBerry):
1729         * WebKitSupport/InRegionScrollableArea.h: Added.
1730         (WebCore):
1731         (WebKit):
1732         (InRegionScrollableArea):
1733
1734 2012-02-16  Antonio Gomes  <agomes@rim.com>
1735
1736         (BlackBerry::WebKit::TouchEventHandler::touchEventCancel):
1737         (BlackBerry::WebKit::TouchEventHandler::touchHoldEvent):
1738         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
1739         (BlackBerry::WebKit::TouchEventHandler::spellCheck):
1740         (BlackBerry::WebKit::TouchEventHandler::handleFatFingerPressed):
1741         (BlackBerry::WebKit::elementForTapHighlight):
1742         (BlackBerry::WebKit::TouchEventHandler::drawTapHighlight):
1743         * blackberry/WebKitSupport/TouchEventHandler.h: Added.
1744         (WebCore):
1745         (WebKit):
1746         (TouchEventHandler):
1747         (BlackBerry::WebKit::TouchEventHandler::lastFatFingersResult):
1748         (BlackBerry::WebKit::TouchEventHandler::resetLastFatFingersResult):
1749