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