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