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