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