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