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