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