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