Remove ActiveNodeContext in favour of BlackBerry::Platform::WebContext
[WebKit-https.git] / Source / WebKit / blackberry / ChangeLog
1 2012-03-13  Mike Lattanzio  <mlattanzio@rim.com>
2
3         Remove ActiveNodeContext in favour of BlackBerry::Platform::WebContext
4         https://bugs.webkit.org/show_bug.cgi?id=80984
5
6         Remove ActiveNodeContext, and switch the implementation to
7         provide a BlackBerry::Platform::WebContext. The new object
8         adds an explicit IsImage flag, as well as IsAudio and IsVideo
9         for the HTML5 elements.
10
11         Note that for many videos both IsVideo and IsAudio will be true,
12         as videos typically have audio streams as well.
13
14         Reviewed by George Staikos.
15
16         * Api/ActiveNodeContext.h: Removed.
17         * Api/WebPage.cpp:
18         (BlackBerry::WebKit::WebPagePrivate::webContext):
19         (BlackBerry::WebKit::WebPage::webContext):
20         * Api/WebPage.h:
21         * Api/WebPage_p.h:
22
23 2012-03-12  Andy Chen  <andchen@rim.com>
24
25         [Blackberry] Make the process of marking all matches interruptible and asynchronous for find-in-page
26         https://bugs.webkit.org/show_bug.cgi?id=80831
27
28         Reviewed by Antonio Gomes.
29
30         * WebKitSupport/InPageSearchManager.cpp:
31         (BlackBerry::WebKit::InPageSearchManager::DeferredScopeStringMatches::DeferredScopeStringMatches):
32         (BlackBerry::WebKit::InPageSearchManager::DeferredScopeStringMatches::doTimeout):
33         (BlackBerry::WebKit::InPageSearchManager::InPageSearchManager):
34         (BlackBerry::WebKit::InPageSearchManager::~InPageSearchManager):
35         (BlackBerry::WebKit::InPageSearchManager::findNextString):
36         (BlackBerry::WebKit::InPageSearchManager::shouldSearchForText):
37         (BlackBerry::WebKit::InPageSearchManager::findAndMarkText):
38         (BlackBerry::WebKit::InPageSearchManager::clearTextMatches):
39         (BlackBerry::WebKit::InPageSearchManager::frameUnloaded):
40         (BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):
41         (BlackBerry::WebKit::InPageSearchManager::scopeStringMatchesSoon):
42         (BlackBerry::WebKit::InPageSearchManager::callScopeStringMatches):
43         (BlackBerry::WebKit::InPageSearchManager::cancelPendingScopingEffort):
44         * WebKitSupport/InPageSearchManager.h:
45
46 2012-03-09  Jon Lee  <jonlee@apple.com>
47
48         Rename NotificationPresenter to NotificationClient
49         https://bugs.webkit.org/show_bug.cgi?id=80488
50         <rdar://problem/10965558>
51
52         Reviewed by Kentaro Hara.
53
54         Refactor to use renamed WebCore::NotificationClient.
55         * WebCoreSupport/NotificationPresenterImpl.cpp:
56         (WebCore::NotificationPresenterImpl::instance):
57         (WebCore::NotificationPresenterImpl::show):
58         (WebCore::NotificationPresenterImpl::checkPermission):
59         * WebCoreSupport/NotificationPresenterImpl.h:
60         (NotificationPresenterImpl):
61
62 2012-03-09  Charles Wei  <charles.wei@torchmobile.com.cn>
63
64         [BlackBerry] Web Notification not working after rebase
65         https://bugs.webkit.org/show_bug.cgi?id=80690
66
67         Reviewed by George Staikos.
68
69         1. NotificationPresenterImpl should be in namespace WebCore
70         2. Need to connect NotificationPresenterImpl to webcore the new way:
71            WebCore::provideNotification(Page*, NotificationPresenter*)
72         3. Remove the old way of connecting the Notification:
73            ChromeClientBlackBerry::notificationPresenter()
74
75         * Api/WebPage.cpp:
76         (BlackBerry::WebKit::WebPagePrivate::init):
77         * WebCoreSupport/ChromeClientBlackBerry.cpp:
78         (WebCore):
79         * WebCoreSupport/ChromeClientBlackBerry.h:
80         (ChromeClientBlackBerry):
81         * WebCoreSupport/NotificationPresenterImpl.cpp:
82         * WebCoreSupport/NotificationPresenterImpl.h:
83
84 2012-03-08  Mike Fenton  <mifenton@rim.com>
85
86         [BlackBerry] Always use the current focused node when processing focus changes
87         https://bugs.webkit.org/show_bug.cgi?id=80594
88
89         Reviewed by Antonio Gomes.
90
91         Guard against toRange or fromRange being null when called
92         as part of a clear event.
93
94         * WebCoreSupport/EditorClientBlackBerry.cpp:
95         (WebCore::EditorClientBlackBerry::shouldChangeSelectedRange):
96
97 2012-03-08  Yong Li  <yoli@rim.com>
98
99         [BlackBerry] Block file-to-file access by default
100         https://bugs.webkit.org/show_bug.cgi?id=80605
101
102         Reviewed by Rob Buis.
103
104         Turn off allowFileAccessFromFileURLs() by default.
105
106         * Api/WebPage.cpp:
107         (BlackBerry::WebKit::WebPagePrivate::init):
108
109 2012-03-08  Mike Fenton  <mifenton@rim.com>
110
111         [BlackBerry] Always use the current focused node when processing focus changes
112         https://bugs.webkit.org/show_bug.cgi?id=80594
113
114         Reviewed by Antonio Gomes.
115
116         Update InputHandler focused node handling to strictly use
117         the currently focused node.  This prevents a handling loop
118         when JS is modifying the focus and we get a late notification
119         of a past change from ChromeClientBlackBerry with the previously
120         unfocused node.
121
122         * WebCoreSupport/ChromeClientBlackBerry.cpp:
123         (WebCore::ChromeClientBlackBerry::focusedNodeChanged):
124         * WebCoreSupport/EditorClientBlackBerry.cpp:
125         (WebCore::EditorClientBlackBerry::shouldChangeSelectedRange):
126         (WebCore::EditorClientBlackBerry::setInputMethodState):
127         * WebKitSupport/InputHandler.cpp:
128         (BlackBerry::WebKit::InputHandler::focusedNodeChanged):
129         * WebKitSupport/InputHandler.h:
130
131 2012-03-07  Jacky Jiang  <zhajiang@rim.com>
132
133         [BlackBerry] WebKit rendering problem when show/hide VKB
134         https://bugs.webkit.org/show_bug.cgi?id=80448
135         RIM PR: 141727
136
137         Reviewed by Antonio Gomes.
138
139         When setting viewport size, layout happens inside
140         WebPagePrivate::setDefaultLayoutSize(), in this way, the layout is
141         outside of the code path of "needsLayout" so that the contents are
142         not rendered into the backing store. This is a regression of r108718,
143         switch back to do the layout inside the public API
144         WebPage::setDefaultLayoutSize().
145
146         We haven't upstreamed the manual tests directory yet, therefore,
147         the new manual test case will be upstreamed later.
148
149         * Api/WebPage.cpp:
150         (BlackBerry::WebKit::WebPagePrivate::setDefaultLayoutSize):
151         (BlackBerry::WebKit::WebPage::setDefaultLayoutSize):
152
153 2012-03-06  Lianghui Chen  <liachen@rim.com>
154
155         [BlackBerry] Set correct ResourceRequest target type.
156         https://bugs.webkit.org/show_bug.cgi?id=80430
157
158         Reviewed by Rob Buis.
159
160         Removed unused code in dispatchWillSendRequest(). These codes are too
161         late as the target type has already been referred to when calling
162         ResourceRequest::initializePlatformRequest().
163
164         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
165         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendRequest):
166
167 2012-03-06  Lianghui Chen  <liachen@rim.com>
168
169         [BlackBerry] Remove unused and unneeded WebPageClient::downloadRequested(NetworkRequest&)
170         https://bugs.webkit.org/show_bug.cgi?id=80438
171
172         Reviewed by Antonio Gomes.
173
174         * Api/WebPageClient.h:
175
176 2012-03-06  Jakob Petsovits  <jpetsovits@rim.com>
177
178         [BlackBerry] Don't suspend accel comp when backgrounding a page.
179         https://bugs.webkit.org/show_bug.cgi?id=80369
180         RIM PR: 137609
181
182         Reviewed by Adam Treat.
183
184         Just because the page is in the background doesn't mean
185         it's invisible, doesn't mean it won't have to be redrawn
186         at some point - on rotation, for instance.
187
188         We still suspend accelerated compositing on setVisible(false).
189
190         * Api/WebPage.cpp:
191         (BlackBerry::WebKit::WebPage::notifyPageBackground):
192         (BlackBerry::WebKit::WebPage::notifyPageForeground):
193
194 2012-03-06  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
195
196         [BlackBerry] function rename issue after MediaPlayerPrivateBlackBerry.[cpp\h] upstream
197         https://bugs.webkit.org/show_bug.cgi?id=80377
198
199         Reviewed by Rob Buis.
200
201         As some of the function names changed in class MediaPlayerPrivate
202         with the upstream of MediaPlayerPrivateBlackBerry.[cpp|h], we
203         should update WebKit/blackberry/Api/WebPage.cpp which uses these
204         functions accordingly.
205         Renamed functions in class MediaPlayerPrivate:
206         windowGet() -> getWindow()
207         windowPositionGet() -> getWindowPosition()
208         mmrContextNameGet() -> mmrContextName()
209
210         * Api/WebPage.cpp:
211         (BlackBerry::WebKit::WebPagePrivate::enterFullscreenForNode):
212
213 2012-03-05  Eli Fidler  <efidler@rim.com>
214
215         The minimum font size WebSetting should actually change the LOGICAL font size in WebCore.
216         https://bugs.webkit.org/show_bug.cgi?id=80312
217         RIM PR: 139874
218
219         Reviewed by George Staikos.
220
221         * Api/WebPage.cpp:
222         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
223
224 2012-03-05  Jakob Petsovits  <jpetsovits@rim.com>
225
226         Make accelerated compositing work again with direct rendering.
227         https://bugs.webkit.org/show_bug.cgi?id=80181
228         RIM PR: 139110
229
230         Reviewed by Antonio Gomes.
231         Internally reviewed by Arvid Nilsson.
232
233         The significant amount of refactoring and optimization work
234         that has gone into accelerated compositing missed out on
235         some of the code paths that are being used in direct rendering.
236
237         Animations were relying on blitVisibleContents() only (which
238         is a no-op in direct rendering mode). There were early returns
239         which are suitable to determine whether screen contents need
240         to be updated at all; however, when we're already forcing a
241         re-render then those checks would cause the composition surface
242         not to appear at all, or avoid drawing new animation frames.
243
244         We went through dispatchMessage(), potentially causing
245         mismatches between rendered (but not yet posted) back content
246         and layers composited on top of it. As we're rendering onto
247         the sole target surface (the window) directly and posting
248         from the same thread, we have to wait for compositing on the
249         UI thread to finish before posting the window.
250
251         In turn, this patch combines both drawSubLayers() and
252         blendCompositingSurface() calls into one method, reducing
253         the number of messages to the UI thread within
254         renderDirectToWindow() to one.
255
256         blendCompositingMessage() in renderDirectToScreen() was called
257         with contents coordinates rather than viewport coordinates.
258         That caused some of the composited content to be cut off when
259         the scroll position wasn't (0, 0).
260
261         We called copyPreviousContentsToBackSurfaceOfWindow() twice for
262         one frame, in both renderDirectToWindow() and invalidateWindow().
263         Only one of those (the latter one) is necessary.
264
265         * Api/BackingStore.cpp:
266         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
267         (BlackBerry::WebKit::BackingStorePrivate::renderDirectToWindow):
268         (BlackBerry::WebKit::BackingStorePrivate::drawSubLayers):
269         (WebKit):
270         (BlackBerry::WebKit::BackingStorePrivate::drawAndBlendLayersForDirectRendering):
271         * Api/BackingStore.h:
272         (WebKit):
273         * Api/BackingStore_p.h:
274         (BackingStorePrivate):
275         (BlackBerry::WebKit::BackingStorePrivate::isDirectRenderingAnimationMessageScheduled):
276         (BlackBerry::WebKit::BackingStorePrivate::setDirectRenderingAnimationMessageScheduled):
277         * Api/WebPage_p.h:
278         (BlackBerry::WebKit::WebPagePrivate::isAcceleratedCompositingActive):
279         (WebPagePrivate):
280         * WebKitSupport/WebPageCompositor.cpp:
281         (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor):
282         (BlackBerry::WebKit::WebPageCompositor::~WebPageCompositor):
283         (BlackBerry::WebKit::WebPageCompositor::drawLayers):
284         (BlackBerry::WebKit::WebPageCompositor::animationTimerFired):
285         * WebKitSupport/WebPageCompositor.h:
286         (WebPageCompositor):
287
288 2012-03-05  George Staikos  <gstaikos@rim.com>
289
290         [BlackBerry] DOMSupport visibleSelectionForRangeInputElement incorrectly dereferences a null range.
291         https://bugs.webkit.org/show_bug.cgi?id=80274
292
293         Reviewed by Antonio Gomes.
294
295         A null range can be returned so we should not blindly deref it.
296         Reviewed Internally by Mike Fenton.
297
298         * WebKitSupport/DOMSupport.cpp:
299         (BlackBerry::WebKit::DOMSupport::visibleSelectionForRangeInputElement):
300
301 2012-03-04  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
302
303         [BlackBerry] upstream CredentialManager and CredentialTransformData implementation
304         https://bugs.webkit.org/show_bug.cgi?id=80107
305
306         Reviewed by Antonio Gomes.
307
308         Initial upstream of CredentialManager.[h|cpp] and
309         CredentialTransformData.[h|cpp].
310         No new test.
311
312         * WebCoreSupport/CredentialManager.cpp: Added.
313         (WebCore):
314         (WebCore::CredentialManager::CredentialManager):
315         (WebCore::CredentialManager::autofillAuthenticationChallenge):
316         (WebCore::CredentialManager::autofillPasswordForms):
317         (WebCore::CredentialManager::saveCredentialIfConfirmed):
318         * WebCoreSupport/CredentialManager.h: Added.
319         (WebKit):
320         (WebCore):
321         (CredentialManager):
322         * WebCoreSupport/CredentialTransformData.cpp: Added.
323         (WebCore::CredentialTransformData::CredentialTransformData):
324         (WebCore):
325         (WebCore::CredentialTransformData::url):
326         (WebCore::CredentialTransformData::credential):
327         (WebCore::CredentialTransformData::setCredential):
328         (WebCore::CredentialTransformData::findPasswordFormFields):
329         * WebCoreSupport/CredentialTransformData.h: Added.
330         (WebCore):
331         (CredentialTransformData):
332         (WebCore::CredentialTransformData::isValid):
333         (WebCore::CredentialTransformData::protectionSpace):
334
335 2012-03-04  Antonio Gomes  <agomes@rim.com>
336
337         [BlackBerry] Fixed positioned element not correctly positioned after orientation change, when viewport metatag is used
338         https://bugs.webkit.org/show_bug.cgi?id=80228
339         PR #138865
340
341         Reviewed by George Staikos.
342
343         Viewport size changes in two main scenarios:
344         - orientation changes;
345         - virtual keyboard pop up/hide.
346
347         When we are setting a new viewport size, we need to
348         update the FixedReportedSize of the mainframe. This size
349         is used to return innerWidth|Heigth as well as to calculate
350         the fixed position elements height relative to the RenderView [1].
351
352         [1] RenderBox::containingBlockLogicalHeightForPositioned.
353
354         When we are rotating, we need to delay setting the new FixedReportedSize
355         till we layout and are able to figure out the new contents size. At this
356         time we call setFixedReportedSize, but we do not reposition the fixed elemts
357         afterwards.
358
359         Patch adds a call to FrameView::repaintFixedElementsAfterScrolling, after
360         setting the new size.
361
362         Source/WebKit/blackberry:
363         * Api/WebPage.cpp:
364         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
365
366 2012-03-02  Mike Fenton  <mifenton@rim.com>
367
368         [BlackBerry] Expose WebInspector state to client and clean up WebSettings
369         https://bugs.webkit.org/show_bug.cgi?id=80177
370
371         Reviewed by Antonio Gomes.
372
373         Expose the Web Inspector state to WebPage client's and
374         re-order initialization of WebSettings to be alphabetical
375         matching their definitions.
376
377         * Api/WebPage.cpp:
378         (BlackBerry::WebKit::WebPage::isWebInspectorEnabled):
379         * Api/WebPage.h:
380         * Api/WebSettings.cpp:
381         (BlackBerry::WebKit::WebSettings::standardSettings):
382
383 2012-03-02  Arvid Nilsson  <anilsson@rim.com>
384
385         Accelerated compositing: Checkerboard never goes away
386         https://bugs.webkit.org/show_bug.cgi?id=79020
387         RIM PR #134164
388
389         Reviewed by Adam Treat.
390
391         Checkerboard appears in accelerated compositing layers when there's no
392         texture for (part of) a layer. The layer renderer queues up some render
393         jobs and schedules a commit to make the WebKit thread process those
394         jobs. Render jobs performed during commit cause texture upload jobs to
395         be scheduled on the UI thread. Texture uploads are performed when next
396         drawing the layers.
397
398         Unfortunately, sometimes commit operation happens without a subsequent
399         call draw the layers.
400
401         In order to implement one-shot drawing sync, I added a call to
402         commitRootLayerIfNeeded() in BackingStore::renderContents(), and
403         I was lucky that most of the time, renderContents() is followed by
404         blit(Visible)Contents() which in turn draws the layers.
405         However, render is not always followed by a blit, for example when
406         rendering offscreen tiles in BackingStore::renderOnIdle(), and in
407         direct rendering mode.
408
409         Fixed by making sure that every call to commitRootLayerIfNeeded() that
410         returns true is followed by a call to drawLayersOnCommit(), unless a
411         blit was requested already.
412
413         Also tweak the logic for one-shot drawing sync to make the code in
414         drawLayersOnCommit() reusable outside of rootLayerCommitTimerFired().
415
416         * Api/BackingStore.cpp:
417         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
418         (BlackBerry::WebKit::BackingStorePrivate::renderOnTimer):
419         (BlackBerry::WebKit::BackingStorePrivate::renderOnIdle):
420         (BlackBerry::WebKit::BackingStorePrivate::willFireTimer):
421         (BlackBerry::WebKit::BackingStorePrivate::renderDirectToWindow):
422         (BlackBerry::WebKit::BackingStorePrivate::render):
423         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
424         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
425         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
426         (WebKit):
427         (BlackBerry::WebKit::BackingStorePrivate::drawLayersOnCommitIfNeeded):
428         * Api/BackingStore_p.h:
429         (BackingStorePrivate):
430         (BlackBerry::WebKit::BackingStorePrivate::willDrawLayersOnCommit):
431
432 2012-03-02  Adam Treat  <atreat@rim.com>
433
434         https://bugs.webkit.org/show_bug.cgi?id=80161
435         PR: 141157
436
437         BlackBerryPlatformScreen.h API has been updated.  Reflect those
438         changes in our usage.
439
440         Reviewed by Antonio Gomes.
441         Internally reviewed by Jakob Petsovits.
442
443         * Api/BackingStore.cpp:
444         (BlackBerry::WebKit::BackingStorePrivate::tileWidth):
445         (BlackBerry::WebKit::BackingStorePrivate::tileHeight):
446         * Api/WebPage.cpp:
447         (BlackBerry::WebKit::WebPagePrivate::init):
448         (BlackBerry::WebKit::WebPagePrivate::transformedViewportSize):
449         (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize):
450         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
451         (BlackBerry::WebKit::WebPagePrivate::setDefaultLayoutSize):
452         (BlackBerry::WebKit::WebPagePrivate::defaultMaxLayoutSize):
453         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
454         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
455         * WebKitSupport/SurfacePool.cpp:
456         (BlackBerry::WebKit::createCompositingSurface):
457
458 2012-03-02  Konrad Piascik  <kpiascik@rim.com>
459
460         [BlackBerry] Set the devicePixelRatio from the results of computeViewportAttributes
461         https://bugs.webkit.org/show_bug.cgi?id=80160
462
463         Reviewed by Antonio Gomes.
464
465         Tested by going to layout test fast/viewport/viewport-95.html and viewport-93.html
466         Previously when executing window.devicePixelRatio these two pages returned 1 now
467         they report the devicePixelRatio returned by computeViewportAttributes.
468
469         * Api/WebPage.cpp:
470         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
471
472 2012-03-02  Jacky Jiang  <zhajiang@rim.com>
473
474         Fix a warning in InputHandler::learnText()
475         https://bugs.webkit.org/show_bug.cgi?id=80049
476
477         Reviewed by Antonio Gomes.
478
479         Fix a warning of the comparison "textInField.length() <=
480         MaxLearnTextDataSize" in InputHandler::learnText().
481
482         Rubber-stamped internally by Mike Fenton.
483
484         * WebKitSupport/InputHandler.cpp:
485         (BlackBerry::WebKit::InputHandler::learnText):
486
487 2012-03-01  Andy Chen  <andchen@rim.com>
488
489         [BlackBerry] Implement features for find-in-page
490         https://bugs.webkit.org/show_bug.cgi?id=79820
491
492         Reviewed by Antonio Gomes.
493
494         - Make it be able to search text around the whole page instead of single frame.
495         - Make it be able to start new search from active selection and last active match.
496
497         No new tests as this patch doesn't change behavior.
498
499         * Api/WebPage.cpp:
500         (BlackBerry::WebKit::WebPagePrivate::frameUnloaded):
501         * Api/WebPage_p.h:
502         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
503         (WebCore::FrameLoaderClientBlackBerry::dispatchWillClose):
504         (WebCore::FrameLoaderClientBlackBerry::detachedFromParent2):
505         * WebKitSupport/DOMSupport.cpp:
506         (BlackBerry::WebKit::DOMSupport::incrementFrame):
507         * WebKitSupport/DOMSupport.h:
508         * WebKitSupport/InPageSearchManager.cpp:
509         (BlackBerry::WebKit::InPageSearchManager::findNextString):
510         (BlackBerry::WebKit::InPageSearchManager::shouldSearchForText):
511         (BlackBerry::WebKit::InPageSearchManager::findAndMarkText):
512         (BlackBerry::WebKit::InPageSearchManager::setMarkerActive):
513         (BlackBerry::WebKit::InPageSearchManager::frameUnloaded):
514         * WebKitSupport/InPageSearchManager.h:
515         * WebKitSupport/InputHandler.cpp:
516         (BlackBerry::WebKit::InputHandler::frameUnloaded):
517         * WebKitSupport/InputHandler.h:
518
519 2012-03-01  Charles Wei  <charles.wei@torchmobile.com.cn>
520
521         [BlackBerry] Web Notification crashes the browser.
522         https://bugs.webkit.org/show_bug.cgi?id=79897
523
524         Reviewed by Antonio Gomes.
525
526         The reason of the crash is that it still uses the iterator
527         after been removed from the container, which invalidates the
528         iterator. 
529         We should stop processing after we have found the element
530         and removed from the container through the iterator.
531
532         This patch only fixes the crash issue, but not any notification
533         functionality issue, which is tracked seperatly.
534
535         Test case: http://sandbox.gtaero.net/chrome/notifications.php
536
537         * WebCoreSupport/NotificationPresenterImpl.cpp:
538         (WebKit::NotificationPresenterImpl::onPermission):
539         (WebKit::NotificationPresenterImpl::notificationClicked):
540
541 2012-03-01  Mike Fenton  <mifenton@rim.com>
542
543         Autocomplete attribute should apply to textarea's.
544         https://bugs.webkit.org/show_bug.cgi?id=79929
545
546         Reviewed by Antonio Gomes.
547
548         Add local static Qualified name for autocorrect attribute.
549
550         * WebKitSupport/DOMSupport.cpp:
551         (BlackBerry::WebKit::DOMSupport::elementSupportsAutocorrect):
552
553 2012-02-29  Mike Fenton  <mifenton@rim.com>
554
555         Autocomplete attribute should apply to textarea's.
556         https://bugs.webkit.org/show_bug.cgi?id=79929
557
558         Reviewed by Antonio Gomes.
559
560         Allow the autocomplete attribute to bubble back to the form setting.
561
562         Expand support to include checking autocorrect, autocomplete and
563         name/id matching to text areas.
564
565         Reviewed internally by Nima Ghanavatian and Gen Mak.
566
567         * WebKitSupport/DOMSupport.cpp:
568         (BlackBerry::WebKit::DOMSupport::elementSupportsAutocorrect):
569         (BlackBerry::WebKit::DOMSupport::elementSupportsAutocomplete):
570         (BlackBerry::WebKit::DOMSupport::elementAttributeState):
571         * WebKitSupport/DOMSupport.h:
572         * WebKitSupport/InputHandler.cpp:
573         (BlackBerry::WebKit::inputStyle):
574
575 2012-02-29  Max Feil  <mfeil@rim.com>
576
577         [BlackBerry] Add support for FLAC audio and OGG/Vorbis audio
578         https://bugs.webkit.org/show_bug.cgi?id=79519
579
580         Reviewed by Antonio Gomes.
581
582         * Api/WebSettings.cpp:
583         (BlackBerry::WebKit::mimeTypeAssociationMap):
584
585 2012-02-28  Konrad Piascik  <kpiascik@rim.com>
586
587         [BlackBerry] Change the API to use std::string
588         https://bugs.webkit.org/show_bug.cgi?id=79818
589
590         Reviewed by Antonio Gomes.
591
592         * Api/WebPage.cpp:
593         (BlackBerry::WebKit::WebPage::dispatchInspectorMessage):
594         * Api/WebPage.h:
595
596 2012-02-28  Jacky Jiang  <zhajiang@rim.com>
597
598         [BlackBerry] x86 build fix after cleaning up WebPage.cpp
599         https://bugs.webkit.org/show_bug.cgi?id=79814
600
601         Reviewed by Antonio Gomes.
602
603         x86 build fix, keep WebPage::destroyWebPageCompositor() method where it
604         was which was outside of USE(ACCELERATED_COMPOSITING).
605
606         * Api/WebPage.cpp:
607         (BlackBerry::WebKit::WebPage::destroyWebPageCompositor):
608         (WebKit):
609
610 2012-02-28  Mike Fenton  <mifenton@rim.com>
611
612         [BlackBerry] Remove unused focusedNodeChange notifications from the Chrome client.
613         https://bugs.webkit.org/show_bug.cgi?id=79794
614
615         Reviewed by Rob Buis.
616
617         Remove unused notification for focusedNodeChanged.
618
619         Internally reviewed by Gen Mak.
620
621         * Api/WebPageClient.h:
622         * WebCoreSupport/ChromeClientBlackBerry.cpp:
623         (WebCore::ChromeClientBlackBerry::focusedNodeChanged):
624
625 2012-02-27  Jacky Jiang  <zhajiang@rim.com>
626
627         [BlackBerry] Upstream BlackBerry API web page related files
628         https://bugs.webkit.org/show_bug.cgi?id=74380
629
630         Reviewed by Antonio Gomes.
631
632         Clean up WebPage.{h, cpp} and WebPage_p.h.
633         - Remove WebPage::mainFrame() as it is bad to expose WebCore::Frame in
634           the public API, adapt to the change by adding a new method
635           WebPagePrivate::core(Const WebPage*) and expose it to
636           DumpRenderTreeSupport.
637         - Rename WebPage::spellCheckingEnabled to
638           WebPage::setSpellCheckingEnabled.
639         - Remove unused WebPage::focusNodeRect().
640         - Remove extra blank lines.
641         - Put WebPage methods and their associated WebPagePrivate methods
642           together.
643
644         No new tests as this patch doesn't change behavior.
645
646         * Api/WebPage.cpp:
647         (BlackBerry::WebKit::WebPage::WebPage):
648         (WebKit):
649         (BlackBerry::WebKit::WebPage::~WebPage):
650         (BlackBerry::WebKit::WebPagePrivate::core):
651         (BlackBerry::WebKit::WebPage::load):
652         (BlackBerry::WebKit::WebPage::loadExtended):
653         (BlackBerry::WebKit::WebPage::loadFile):
654         (BlackBerry::WebKit::WebPage::download):
655         (BlackBerry::WebKit::WebPage::loadString):
656         (BlackBerry::WebKit::WebPage::executeJavaScript):
657         (BlackBerry::WebKit::WebPage::executeJavaScriptInIsolatedWorld):
658         (BlackBerry::WebKit::WebPage::stopLoading):
659         (BlackBerry::WebKit::WebPage::prepareToDestroy):
660         (BlackBerry::WebKit::WebPage::setScrollPosition):
661         (BlackBerry::WebKit::WebPage::scrollBy):
662         (BlackBerry::WebKit::WebPage::notifyInRegionScrollStatusChanged):
663         (BlackBerry::WebKit::WebPage::zoomToFitScale):
664         (BlackBerry::WebKit::WebPage::initialScale):
665         (BlackBerry::WebKit::WebPage::maximumScale):
666         (BlackBerry::WebKit::WebPage::scrollPosition):
667         (BlackBerry::WebKit::WebPage::viewportSize):
668         (BlackBerry::WebKit::WebPage::activeNodeContext):
669         (BlackBerry::WebKit::WebPage::assignFocus):
670         (BlackBerry::WebKit::WebPage::blockZoomAnimationFinished):
671         (BlackBerry::WebKit::WebPage::onInputLocaleChanged):
672         (BlackBerry::WebKit::WebPage::setScreenOrientation):
673         (BlackBerry::WebKit::WebPage::applyPendingOrientationIfNeeded):
674         (BlackBerry::WebKit::WebPage::setViewportSize):
675         (BlackBerry::WebKit::WebPage::setDefaultLayoutSize):
676         (BlackBerry::WebKit::WebPage::setScrollOriginPoint):
677         (BlackBerry::WebKit::WebPage::textEncoding):
678         (BlackBerry::WebKit::WebPage::forcedTextEncoding):
679         (BlackBerry::WebKit::WebPage::setForcedTextEncoding):
680         (BlackBerry::WebKit::WebPage::setSpellCheckingEnabled):
681         (BlackBerry::WebKit::parentLayer):
682         (BlackBerry::WebKit::WebPagePrivate::inRegionScrollableAreasForPoint):
683         (BlackBerry::WebKit::WebPage::destroyWebPageCompositor):
684         * Api/WebPage.h:
685         (WebCore):
686         (WebKit):
687         * Api/WebPage_p.h:
688         (WebCore):
689         (WebKit):
690         * WebKitSupport/DumpRenderTreeSupport.cpp:
691         (DumpRenderTreeSupport::corePage):
692         (DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests):
693         (DumpRenderTreeSupport::resetGeolocationMock):
694         (DumpRenderTreeSupport::setMockGeolocationError):
695         (DumpRenderTreeSupport::setMockGeolocationPermission):
696         (DumpRenderTreeSupport::setMockGeolocationPosition):
697         (DumpRenderTreeSupport::scalePageBy):
698         * WebKitSupport/DumpRenderTreeSupport.h:
699         (WebCore):
700         (DumpRenderTreeSupport):
701
702 2012-02-27  Mike Fenton  <mifenton@rim.com>
703
704         [BlackBerry] Selection handling should be entirely directional
705         https://bugs.webkit.org/show_bug.cgi?id=79692
706
707         Reviewed by Antonio Gomes.
708
709         Make all VisibleSelections directional.
710
711         * WebKitSupport/SelectionHandler.cpp:
712         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
713         (BlackBerry::WebKit::SelectionHandler::setSelection):
714
715 2012-02-27  Ed Baker  <edbaker@rim.com>
716
717         [BlackBerry] Dragging a selection handle outside of the content bounding box does not update the selection range correctly
718         https://bugs.webkit.org/show_bug.cgi?id=78608
719
720         Ensure that when selection handles leave the content bounding box that
721         the handle not being dragged remains fixed. Do not apply padding to a
722         direction that would cause the selection to shrink when performing the
723         handle direction detection.
724
725         Reviewed by Antonio Gomes.
726
727         * WebKitSupport/DOMSupport.cpp:
728         (BlackBerry::WebKit::DOMSupport::convertPointToFrame):
729         * WebKitSupport/DOMSupport.h:
730         * WebKitSupport/SelectionHandler.cpp:
731         (BlackBerry::WebKit::clamp):
732         (BlackBerry::WebKit::directionalVisiblePositionAtExtentOfBox):
733         (BlackBerry::WebKit::SelectionHandler::extendSelectionToFieldBoundary):
734         (BlackBerry::WebKit::SelectionHandler::setSelection):
735         (BlackBerry::WebKit::SelectionHandler::clipPointToVisibleContainer):
736         * WebKitSupport/SelectionHandler.h:
737
738 2012-02-27  Leo Yang  <leo.yang@torchmobile.com.cn>
739
740         [BlackBerry] Upstream accelerated compositing helper class
741         https://bugs.webkit.org/show_bug.cgi?id=78448
742
743         Reviewed by Antonio Gomes.
744
745         Initial upstream, no new tests.
746
747         * WebKitSupport/FrameLayers.cpp: Added.
748         * WebKitSupport/FrameLayers.h: Added.
749
750 2012-02-26  Hajime Morrita  <morrita@chromium.org>
751
752         Move ChromeClient::showContextMenu() to ContextMenuClient
753         https://bugs.webkit.org/show_bug.cgi?id=79427
754
755         Reviewed by Adam Barth.
756
757         * WebCoreSupport/ChromeClientBlackBerry.h:
758         (ChromeClientBlackBerry):
759
760 2012-02-24  Mike Fenton  <mifenton@rim.com>
761
762         [BlackBerry] Eliminate excessive BlackBerry::Platform use in InputHandler
763         https://bugs.webkit.org/show_bug.cgi?id=79393
764
765         Reviewed by Antonio Gomes.
766
767         Cleanup usage of BlackBerry::Platform in InputHandler.
768
769         * WebKitSupport/InputHandler.cpp:
770         (BlackBerry::WebKit::convertStringToWchar):
771         (BlackBerry::WebKit::convertStringToWcharVector):
772         (BlackBerry::WebKit::convertSpannableStringToString):
773         (BlackBerry::WebKit::InputHandler::learnText):
774         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
775         (BlackBerry::WebKit::InputHandler::shouldAcceptInputFocus):
776         (BlackBerry::WebKit::InputHandler::setElementFocused):
777         (BlackBerry::WebKit::InputHandler::nodeTextChanged):
778         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
779         (BlackBerry::WebKit::InputHandler::frameUnloaded):
780         (BlackBerry::WebKit::InputHandler::selectionChanged):
781         (BlackBerry::WebKit::InputHandler::setSelection):
782         (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
783         (BlackBerry::WebKit::InputHandler::deleteTextRelativeToCursor):
784         (BlackBerry::WebKit::InputHandler::deleteText):
785         (BlackBerry::WebKit::InputHandler::spannableTextInRange):
786         (BlackBerry::WebKit::InputHandler::setComposingRegion):
787         (BlackBerry::WebKit::InputHandler::finishComposition):
788         (BlackBerry::WebKit::InputHandler::setText):
789         (BlackBerry::WebKit::InputHandler::setTextAttributes):
790         (BlackBerry::WebKit::InputHandler::setRelativeCursorPosition):
791         (BlackBerry::WebKit::InputHandler::setSpannableTextAndRelativeCursor):
792         (BlackBerry::WebKit::InputHandler::setComposingText):
793         (BlackBerry::WebKit::InputHandler::commitText):
794
795 2012-02-24  Mike Fenton  <mifenton@rim.com>
796
797         [BlackBerry] Eliminate excessive BlackBerry::Platform use in SelectionHandler.
798         https://bugs.webkit.org/show_bug.cgi?id=79391
799
800         Reviewed by Antonio Gomes.
801
802         Clean up usage of BlackBerry::Platform in SelectionHandler and
803         explicitly define what namespace to use for ambiguous objects like
804         IntRect and IntPoint.
805
806         * WebKitSupport/SelectionHandler.cpp:
807         (BlackBerry::WebKit::SelectionHandler::cancelSelection):
808         (BlackBerry::WebKit::SelectionHandler::getConsolidatedRegionOfTextQuadsForSelection):
809         (BlackBerry::WebKit::visiblePositionForPointIgnoringClipping):
810         (BlackBerry::WebKit::directionOfPointRelativeToRect):
811         (BlackBerry::WebKit::SelectionHandler::shouldUpdateSelectionOrCaretForPoint):
812         (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
813         (BlackBerry::WebKit::directionalVisiblePositionAtExtentOfBox):
814         (BlackBerry::WebKit::pointIsOutsideOfBoundingBoxInDirection):
815         (BlackBerry::WebKit::SelectionHandler::extendSelectionToFieldBoundary):
816         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
817         (BlackBerry::WebKit::SelectionHandler::clipPointToFocusNode):
818         (BlackBerry::WebKit::SelectionHandler::setSelection):
819         (BlackBerry::WebKit::SelectionHandler::selectAtPoint):
820         (BlackBerry::WebKit::SelectionHandler::selectObject):
821         (BlackBerry::WebKit::comparePointsToReferencePoint):
822         (BlackBerry::WebKit::minXMinYCorner):
823         (BlackBerry::WebKit::maxXMinYCorner):
824         (BlackBerry::WebKit::minXMaxYCorner):
825         (BlackBerry::WebKit::maxXMaxYCorner):
826         (BlackBerry::WebKit::caretLocationForRect):
827         (BlackBerry::WebKit::caretComparisonPointForRect):
828         (BlackBerry::WebKit::adjustCaretRects):
829         (BlackBerry::WebKit::SelectionHandler::clipRegionToVisibleContainer):
830         (BlackBerry::WebKit::referencePoint):
831         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
832         (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
833         (BlackBerry::WebKit::SelectionHandler::selectionContains):
834
835 2012-02-24  Shinya Kawanaka  <shinyak@chromium.org>
836
837         SpellCheckRequest needs to know the context where the spellcheck happened.
838         https://bugs.webkit.org/show_bug.cgi?id=79320
839
840         Reviewed by Hajime Morita.
841
842         * WebCoreSupport/EditorClientBlackBerry.cpp:
843         (WebCore::EditorClientBlackBerry::requestCheckingOfString):
844         * WebCoreSupport/EditorClientBlackBerry.h:
845         (EditorClientBlackBerry):
846
847 2012-02-24  Charles Wei  <charles.wei@torchmobile.com.cn>
848
849         [BlackBerry] Anchor mailto: with target set won't launch Messaging application when clicked
850         https://bugs.webkit.org/show_bug.cgi?id=79318
851
852         Need to give the client a chance to decide how to handle the new window request.
853
854         Reviewed by Rob Buis.
855
856         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
857         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNewWindowAction):
858
859 2012-02-23  Mike Fenton  <mifenton@rim.com>
860
861         [BlackBerry] Selection handler has compile failure with logs enabled.
862         https://bugs.webkit.org/show_bug.cgi?id=79392
863
864         Reviewed by Antonio Gomes.
865
866         Build Fix.  Update log to avoid usage of toString which was removed.
867
868         * WebKitSupport/SelectionHandler.cpp:
869         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
870
871 2012-02-19  Antonio Gomes  <agomes@rim.com>
872
873         Fat fingers - Add a clearer way to distinguish the node we want (shadow or non-shadow)
874         https://bugs.webkit.org/show_bug.cgi?id=79256
875         PR #127814 / MKS_2587410
876
877         Reviewed by Rob Buis.
878
879         Patch adds a cleaner way for call sites of FatFingersResult to
880         query for the appropriated target node: shadow or non-shadow DOM nodes.
881
882         It also renames FatFingersResults::validNode to ::node, assuming
883         that "invalid" nodes are not applicable in any context.
884
885         * Api/WebPage.cpp:
886         (BlackBerry::WebKit::WebPagePrivate::clearDocumentData):
887         (BlackBerry::WebKit::WebPagePrivate::contextNode):
888         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
889         * WebKitSupport/FatFingers.h:
890         (FatFingersResult):
891         (BlackBerry::WebKit::FatFingersResult::node):
892         (BlackBerry::WebKit::FatFingersResult::nodeAsElementIfApplicable):
893         * WebKitSupport/SelectionHandler.cpp:
894         (BlackBerry::WebKit::SelectionHandler::selectAtPoint):
895         * WebKitSupport/TouchEventHandler.cpp:
896         (BlackBerry::WebKit::TouchEventHandler::touchHoldEvent):
897         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
898
899 2012-02-23  Jacky Jiang  <zhajiang@rim.com>
900
901         [BlackBerry] Upstream BlackBerry API web page related files
902         https://bugs.webkit.org/show_bug.cgi?id=74380
903
904         Reviewed by Antonio Gomes.
905
906         Initial upstream, no new tests.
907
908         * Api/WebPage.cpp: Added.
909         * Api/WebPage.h: Added.
910         * Api/WebPage_p.h: Added.
911
912 2012-02-23  Leo Yang  <leo.yang@torchmobile.com.cn>
913
914         [BlackBerry] Remove unused ChromeClientBlackBerry::platformCompositingWindow(), platformWindow() and WebPageClient::compositingWindow()
915         https://bugs.webkit.org/show_bug.cgi?id=78681
916
917         Reviewed by Antonio Gomes.
918
919         * Api/WebPageClient.h:
920         * WebCoreSupport/ChromeClientBlackBerry.cpp:
921         (WebCore):
922         * WebCoreSupport/ChromeClientBlackBerry.h:
923         (ChromeClientBlackBerry):
924
925 2012-02-23  Leo Yang  <leo.yang@torchmobile.com.cn>
926
927         [BlackBerry] Upstream GLES2Context.{h, cpp}
928         https://bugs.webkit.org/show_bug.cgi?id=79196
929
930         Reviewed by Rob Buis.
931
932         Initial upstream, no new tests.
933
934         * WebKitSupport/GLES2Context.cpp: Added.
935         * WebKitSupport/GLES2Context.h: Added.
936
937 2012-02-23  Mike Fenton  <mifenton@rim.com>
938
939         [BlackBerry] InputHandler requires cleanup of Navigation Mode handling.
940         https://bugs.webkit.org/show_bug.cgi?id=79366
941
942         Reviewed by Rob Buis.
943
944         Cleanup InputHandler navigation based code.
945
946         1) Remove the concept of NavigationMode and replace it
947            with simple showKeyboard calls.
948
949         2) Remove navigation move events and replace with standard
950            key events.
951
952         3) Standardize function/variable names and remove obsolete
953            functions.
954
955         * Api/WebPageClient.h:
956         * WebKitSupport/InputHandler.cpp:
957         (BlackBerry::WebKit::InputHandler::InputHandler):
958         (BlackBerry::WebKit::InputHandler::nodeFocused):
959         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
960         (BlackBerry::WebKit::InputHandler::setElementFocused):
961         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
962         (BlackBerry::WebKit::InputHandler::setDelayKeyboardVisibilityChange):
963         (BlackBerry::WebKit::InputHandler::processPendingKeyboardVisibilityChange):
964         (BlackBerry::WebKit::InputHandler::notifyClientOfKeyboardVisibilityChange):
965         * WebKitSupport/InputHandler.h:
966         (InputHandler):
967         * WebKitSupport/SelectionHandler.cpp:
968         (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
969         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
970         * WebKitSupport/TouchEventHandler.cpp:
971         (BlackBerry::WebKit::TouchEventHandler::touchEventCancel):
972         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
973
974 2012-02-21  Ryosuke Niwa  <rniwa@webkit.org>
975
976         Remove the remaining uses of CSSStyleDeclaration in Editor
977         https://bugs.webkit.org/show_bug.cgi?id=78939
978
979         Reviewed by Enrica Casucci.
980
981         * WebCoreSupport/EditorClientBlackBerry.cpp:
982         (WebCore::EditorClientBlackBerry::shouldApplyStyle):
983         * WebCoreSupport/EditorClientBlackBerry.h:
984         (EditorClientBlackBerry):
985
986 2012-02-22  Mike Fenton  <mifenton@rim.com>
987
988         [BlackBerry] InputHandler has signed vs unsigned comparison.
989         https://bugs.webkit.org/show_bug.cgi?id=79261
990
991         Fix warning by casting the unsigned int to an int.
992
993         Reviewed by Rob Buis.
994
995         * WebKitSupport/InputHandler.cpp:
996         (BlackBerry::WebKit::InputHandler::rectForCaret):
997
998 2012-02-22  Ryosuke Niwa  <rniwa@webkit.org>
999
1000         Remove the remaining uses of CSSStyleDeclaration in Editor
1001         https://bugs.webkit.org/show_bug.cgi?id=78939
1002
1003         Reviewed by Enrica Casucci.
1004
1005         * WebCoreSupport/EditorClientBlackBerry.cpp:
1006         (WebCore::EditorClientBlackBerry::shouldApplyStyle):
1007         * WebCoreSupport/EditorClientBlackBerry.h:
1008         (EditorClientBlackBerry):
1009
1010 2012-02-18  Antonio Gomes  <agomes@rim.com>
1011
1012         Fat fingers - cache the first rect-based hit test so we do not need to do it again
1013         https://bugs.webkit.org/show_bug.cgi?id=79115
1014
1015         Reviewed by Adam Treat.
1016
1017         Our FatFingers implementation runs currently in two phases:
1018         the first checks for the elements intrinsically clickable;
1019         the second checks for elements made clickable by the page
1020         (for example, a div with a onclick event listener attached to it).
1021         For each phase, we perform a rect hittest, which is not needed since
1022         the result of each is the same.
1023
1024         Patch introduces a caching mechanism so we avoid on rect hittest:
1025         when the first phase runs, it caches each nodeset per document in
1026         a hashmap. This second phase works with the cached results.
1027
1028         No behavioral change, but performance is better since we
1029         avoid one (possibly expensive) rect hittest.
1030
1031         I measured the performance gain on https://www.kvd.se/, and we
1032         save up to 0.04 seconds, by caching and re-using the results.
1033
1034         * WebKitSupport/FatFingers.cpp:
1035         (BlackBerry::WebKit::dumpHitTestResult):
1036         (BlackBerry::WebKit::FatFingers::findBestPoint):
1037         (BlackBerry::WebKit::FatFingers::findIntersectingRegions):
1038         (BlackBerry::WebKit::FatFingers::cachingStrategy):
1039         (WebKit):
1040         (BlackBerry::WebKit::FatFingers::getNodesFromRect):
1041         * WebKitSupport/FatFingers.h:
1042
1043 2012-02-20  Antonio Gomes  <agomes@rim.com>
1044
1045         All default video/audio control elements should be rect-hit testable (Part II)
1046         PR #139518 / MKS_3005538
1047
1048         Reviewed by George Staikos.
1049
1050         Add HTMLInputElement::isMediaControlElement as a criteria
1051         to consider a element as clickable.
1052
1053         Note that is should be only used while in the "ClickableByDefault"
1054         phase of FatFingers.
1055
1056         * WebKitSupport/FatFingers.cpp:
1057         (BlackBerry::WebKit::FatFingers::isElementClickable):
1058
1059 2012-02-16  Antonio Gomes  <agomes@rim.com>
1060
1061         [BlackBerry] Implemented a way to defer client navigation change client notifications
1062         https://bugs.webkit.org/show_bug.cgi?id=78848
1063
1064         Reviewed by Rob Buis.
1065
1066         Currently we postpone touch_down till touch_up if user touches
1067         the screen and an input field has the WebKit focus. This is done
1068         so we can scroll the page without hidding the vkb needlessly.
1069
1070         However, it breaks the conversion of touch to mouse events
1071         if an input field has the focus in the following scenario:
1072         an <input type=text> is focused and an user grab and-drag
1073         a <input type=range> knob/slide. It does not work until the
1074         user unfocuses the currently focused edit field.
1075
1076         Patch introduces a way to unfocus a currently focused input field,
1077         without requesting the client to show or hide the virtual keyboard
1078         right way. Instead it gets a delayed notification of the vkb mode requested
1079         at either touch_released/mouse_up or touch_cancel time.
1080
1081         For now, due to content side issues with major web sites,
1082         only delay navigation mode notification changes if we are not dealing with
1083         input modes.
1084
1085         * WebKitSupport/InputHandler.cpp:
1086         (BlackBerry::WebKit::InputHandler::InputHandler):
1087         (BlackBerry::WebKit::InputHandler::nodeFocused):
1088         (BlackBerry::WebKit::InputHandler::setElementFocused):
1089         (BlackBerry::WebKit::InputHandler::setNavigationMode):
1090         (WebKit):
1091         (BlackBerry::WebKit::InputHandler::setDelayClientNotificationOfNavigationModeChange):
1092         (BlackBerry::WebKit::InputHandler::processPendingClientNavigationModeChangeNotification):
1093         (BlackBerry::WebKit::InputHandler::notifyClientOfNavigationModeChange):
1094         (BlackBerry::WebKit::InputHandler::willOpenPopupForNode):
1095         (BlackBerry::WebKit::InputHandler::setPopupListIndexes):
1096         (BlackBerry::WebKit::InputHandler::spannableTextInRange):
1097         (BlackBerry::WebKit::InputHandler::removeComposedText):
1098         (BlackBerry::WebKit::InputHandler::firstSpanInString):
1099         (BlackBerry::WebKit::InputHandler::setText):
1100         (BlackBerry::WebKit::InputHandler::setRelativeCursorPosition):
1101         * WebKitSupport/InputHandler.h:
1102         (InputHandler):
1103
1104 2012-02-16  Antonio Gomes  <agomes@rim.com>
1105
1106         Crash @WebPagePrivate::enqueueRenderingOfClippedContentOfScrollableNodeAfterInRegionScrolling MKS_2986818
1107         https://bugs.webkit.org/show_bug.cgi?id=78845
1108
1109         Reviewed by Rob Buis.
1110
1111         We were trying to operate on a cached Node when its page/frame/document
1112         were gone to PageCache already. To avoid such problems, lets clean up
1113         any document data we have cached when the Frame goes into the cache.
1114
1115         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1116         (WebCore::FrameLoaderClientBlackBerry::didSaveToPageCache):
1117         (WebCore):
1118         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
1119         (FrameLoaderClientBlackBerry):
1120
1121 2012-02-16  Antonio Gomes  <agomes@rim.com>
1122
1123         [BlackBerry] Upstream touch handling related classes
1124         https://bugs.webkit.org/show_bug.cgi?id=78509
1125
1126         Reviewed by Adam Treat and Rob Buis.
1127
1128         FatFingers is the class responsible to the whole touch
1129         accuracy of the BlackBerry port. Initial upstream.
1130
1131         * WebKitSupport/FatFingers.cpp: Added.
1132         (WebKit):
1133         (BlackBerry::WebKit::FatFingers::fingerRectForPoint):
1134         (BlackBerry::WebKit::hasMousePressListener):
1135         (BlackBerry::WebKit::FatFingers::isElementClickable):
1136         (BlackBerry::WebKit::isFieldWithText):
1137         (BlackBerry::WebKit::distanceBetweenPoints):
1138         (BlackBerry::WebKit::compareDistanceBetweenPoints):
1139         (BlackBerry::WebKit::isValidFrameOwner):
1140         (BlackBerry::WebKit::FatFingers::FatFingers):
1141         (BlackBerry::WebKit::FatFingers::~FatFingers):
1142         (BlackBerry::WebKit::FatFingers::findBestPoint):
1143         (BlackBerry::WebKit::FatFingers::checkFingerIntersection):
1144         (BlackBerry::WebKit::FatFingers::findIntersectingRegions):
1145         (BlackBerry::WebKit::FatFingers::checkForClickableElement):
1146         (BlackBerry::WebKit::FatFingers::checkForText):
1147         (BlackBerry::WebKit::FatFingers::getPaddings):
1148         (BlackBerry::WebKit::FatFingers::nodesFromRect):
1149         (BlackBerry::WebKit::FatFingers::getRelevantInfoFromPoint):
1150         (BlackBerry::WebKit::FatFingers::setSuccessfulFatFingersResult):
1151         * WebKitSupport/FatFingers.h: Added.
1152         (WebCore):
1153         (WebKit):
1154         (FatFingersResult):
1155         (BlackBerry::WebKit::FatFingersResult::FatFingersResult):
1156         (BlackBerry::WebKit::FatFingersResult::reset):
1157         (BlackBerry::WebKit::FatFingersResult::originPosition):
1158         (BlackBerry::WebKit::FatFingersResult::adjustedPosition):
1159         (BlackBerry::WebKit::FatFingersResult::positionWasAdjusted):
1160         (BlackBerry::WebKit::FatFingersResult::isTextInput):
1161         (BlackBerry::WebKit::FatFingersResult::isValid):
1162         (BlackBerry::WebKit::FatFingersResult::validNode):
1163         (BlackBerry::WebKit::FatFingersResult::nodeAsElementIfApplicable):
1164         (FatFingers):
1165
1166 2012-02-16  Antonio Gomes  <agomes@rim.com>
1167
1168         [BlackBerry] Upstream touch handling related classes
1169         https://bugs.webkit.org/show_bug.cgi?id=78509
1170
1171         Reviewed by Adam Treat.
1172
1173         Initial upstream of the Blackberry specific single touch event
1174         handler class.
1175
1176         * blackberry/WebKitSupport/TouchEventHandler.cpp: Added.
1177         (WebKit):
1178         (BlackBerry::WebKit::hasMouseMoveListener):
1179         (BlackBerry::WebKit::hasTouchListener):
1180         (BlackBerry::WebKit::elementExpectsMouseEvents):
1181         (BlackBerry::WebKit::shouldConvertTouchToMouse):
1182         (BlackBerry::WebKit::TouchEventHandler::TouchEventHandler):
1183         (BlackBerry::WebKit::TouchEventHandler::~TouchEventHandler):
1184         (BlackBerry::WebKit::TouchEventHandler::shouldSuppressMouseDownOnTouchDown):
1185         [BlackBerry] Upstream touch handling related classes
1186         https://bugs.webkit.org/show_bug.cgi?id=78509
1187
1188         Reviewed by Rob Buis.
1189
1190         InRegionScrollableArea specializes the BlackBerry specific ScrollViewBase,
1191         working as a read-only wrapper object for a scrollable areas in the page.
1192         It is used in our client side to control in-region scrolling (scrollable boxes,
1193         inner frames, etc).
1194
1195         Initial upstream.
1196
1197         * WebKitSupport/InRegionScrollableArea.cpp: Added.
1198         (WebKit):
1199         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
1200         (BlackBerry::WebKit::InRegionScrollableArea::calculateMinimumScrollPosition):
1201         (BlackBerry::WebKit::InRegionScrollableArea::calculateMaximumScrollPosition):
1202         (BlackBerry::WebKit::InRegionScrollableArea::layer):
1203         (BlackBerry):
1204         * WebKitSupport/InRegionScrollableArea.h: Added.
1205         (WebCore):
1206         (WebKit):
1207         (InRegionScrollableArea):
1208
1209 2012-02-16  Antonio Gomes  <agomes@rim.com>
1210
1211         (BlackBerry::WebKit::TouchEventHandler::touchEventCancel):
1212         (BlackBerry::WebKit::TouchEventHandler::touchHoldEvent):
1213         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
1214         (BlackBerry::WebKit::TouchEventHandler::spellCheck):
1215         (BlackBerry::WebKit::TouchEventHandler::handleFatFingerPressed):
1216         (BlackBerry::WebKit::elementForTapHighlight):
1217         (BlackBerry::WebKit::TouchEventHandler::drawTapHighlight):
1218         * blackberry/WebKitSupport/TouchEventHandler.h: Added.
1219         (WebCore):
1220         (WebKit):
1221         (TouchEventHandler):
1222         (BlackBerry::WebKit::TouchEventHandler::lastFatFingersResult):
1223         (BlackBerry::WebKit::TouchEventHandler::resetLastFatFingersResult):
1224