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