[Qt] Set WebCore imagedecoders as default and add fallback to QImageDecoder
[WebKit-https.git] / Source / WebKit / blackberry / ChangeLog
1 2012-05-04  Zoltan Horvath  <zoltan@webkit.org>
2
3         [Qt] Set WebCore imagedecoders as default and add fallback to QImageDecoder
4         https://bugs.webkit.org/show_bug.cgi?id=80400
5
6         Get rid off QT_IMAGE_DECODER flag.
7
8         Reviewed by Simon Hausmann.
9
10         * WebCoreSupport/AboutDataEnableFeatures.in:
11
12 2012-05-03  Fady Samuel  <fsamuel@chromium.org>
13
14         Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport
15         https://bugs.webkit.org/show_bug.cgi?id=70609
16
17         Reviewed by Kenneth Rohde Christiansen.
18
19         * WebKitSupport/DumpRenderTreeSupport.cpp:
20         (DumpRenderTreeSupport::dumpConfigurationForViewport):
21
22 2012-05-03  Mike Fenton  <mifenton@rim.com>
23
24         [BlackBerry] Add special attribute for alternate selection touch handling.
25         https://bugs.webkit.org/show_bug.cgi?id=85284
26
27         Reviewed by Rob Buis.
28
29         Rename the custom attribute and make it a data- attribute.
30
31         * WebKitSupport/SelectionHandler.cpp:
32         (BlackBerry::WebKit::SelectionHandler::inputNodeOverridesTouch):
33
34 2012-04-18  Jon Honeycutt  <jhoneycutt@apple.com>
35
36         FrameLoaderClient::dispatchWillSendSubmitEvent() should be given more
37         information about the form being submitted
38         https://bugs.webkit.org/show_bug.cgi?id=84297
39
40         Reviewed by Andy Estes.
41
42         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
43         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendSubmitEvent):
44         Updated to use the FormState.
45
46         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
47         (FrameLoaderClientBlackBerry):
48         Updated method declaration.
49
50 2012-05-02  Jacky Jiang  <zhajiang@rim.com>
51
52         [BlackBerry] Double tap zooming does nothing on small size table
53         https://bugs.webkit.org/show_bug.cgi?id=85383
54
55         Reviewed by George Staikos.
56
57         PR: 153232
58         When we search the best node for block zoom, if the initial node's new
59         scale exceeds the maximum block zoom scale, we will try to walk through
60         it's ancestors and pick the acceptable one. But the reality is that the
61         acceptable ancestor's size can be too close to the size of the actual
62         contents, we will do nothing for it. As we will still select the
63         minimum of the new scale and the maximum block zoom scale as block zoom
64         scale, we can ignore such kind of node and use the initial node instead.
65
66         * Api/WebPage.cpp:
67         (BlackBerry::WebKit::WebPagePrivate::adjustedBlockZoomNodeForZoomLimits):
68
69 2012-05-01  Mike Fenton  <mifenton@rim.com>
70
71         Add special attribute for alternate selection touch handling.
72         https://bugs.webkit.org/show_bug.cgi?id=85284
73
74         Reviewed by Antonio Gomes.
75
76         PR 152975.
77
78         Add attribute -bb-selection-touchoverride to override
79         touch handling on selection overlay.
80
81         Reviewed Internally by Gen Mak.
82
83         * Api/WebPageClient.h:
84         * WebKitSupport/SelectionHandler.cpp:
85         (BlackBerry::WebKit::SelectionHandler::inputNodeOverridesTouch):
86         (WebKit):
87         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
88         * WebKitSupport/SelectionHandler.h:
89         (SelectionHandler):
90
91 2012-04-30  Benjamin Poulain  <benjamin@webkit.org>
92
93         Add String::startsWith() and endsWith() for string literals
94         https://bugs.webkit.org/show_bug.cgi?id=85154
95
96         Reviewed by Darin Adler.
97
98         * WebKitSupport/DOMSupport.cpp:
99         (BlackBerry::WebKit::DOMSupport::elementPatternMatches):
100
101 2012-04-27  Jacky Jiang  <zhajiang@rim.com>
102
103         [BlackBerry] Double tap zooming does nothing on table element on bustedtees.com
104         https://bugs.webkit.org/show_bug.cgi?id=85104
105
106         Reviewed by George Staikos.
107
108         PR: 147006
109         This was caused by the incorrect fix master_33/SHA:612caec4.
110         Calculations like this "originalArea / pageArea" would always return 0
111         so that the incorrect node and blockRect were used by block zoom. This
112         patch takes care of it.
113
114         * Api/WebPage.cpp:
115         (BlackBerry::WebKit::WebPagePrivate::blockZoomRectForNode):
116         (BlackBerry::WebKit::WebPage::blockZoom):
117
118 2012-04-27  Nima Ghanavatian  <nghanavatian@rim.com>
119
120         [BlackBerry] Improve log output in InputHandler.cpp
121         https://bugs.webkit.org/show_bug.cgi?id=85007
122
123         Reviewed by Antonio Gomes.
124
125         PR 138292
126         Improving logging in InputHandler.
127         In setText we had an early return which wasn't being captured.
128         Also, cleaning up the output to make it more clear and descriptive.
129
130         Internally reviewed by Mike Fenton.
131
132         * WebKitSupport/InputHandler.cpp:
133         (BlackBerry::WebKit::InputHandler::learnText):
134         (BlackBerry::WebKit::InputHandler::enableInputMode):
135         (BlackBerry::WebKit::InputHandler::setText):
136
137 2012-04-27  Chris Guan  <chris.guan@torchmobile.com.cn>
138
139         [Blackberry] remove redundant returns
140         https://bugs.webkit.org/show_bug.cgi?id=85033
141
142         Reviewed by Antonio Gomes.
143
144         Remove two redundant returns which were added by accident.
145
146         No new test cases, because no behaviour has changed.
147
148         * Api/WebPage.cpp:
149         (BlackBerry::WebKit::WebPage::setSelection):
150         (BlackBerry::WebKit::WebPage::setCaretPosition):
151
152 2012-04-27  Andy Chen  <andchen@rim.com>
153
154         [BlackBerry] Find-in-page fails to deactivate the old active match when moving backwards
155         https://bugs.webkit.org/show_bug.cgi?id=84892
156
157         Reviewed by Antonio Gomes.
158
159         Find in page fails to deactivate the old active match when moving backwards
160         because searchStartingPoint was incorrectly initialized.
161         Create a real range object instead of referencing other range object.
162         PR 152009
163
164         Internally reviewed by Yongxin Dai.
165
166         * WebKitSupport/InPageSearchManager.cpp:
167         (BlackBerry::WebKit::InPageSearchManager::findNextString):
168
169 2012-04-26  Yong Li  <yoli@rim.com>
170
171         [BlackBerry] A quick fix to the previous patch r115245.
172         https://bugs.webkit.org/show_bug.cgi?id=84862
173
174         Reviewed by Antonio Gomes.
175
176         Fix an obvious bug in previous patch: DeferredTaskLoadManualScript
177         was using a wrong flag.
178
179         * Api/WebPage.cpp:
180         * Api/WebPage_p.h:
181         (WebPagePrivate):
182
183 2012-04-25  Chris Guan  <chris.guan@torchmobile.com.cn>
184
185         [Blackberry] add a new function in BackingStore
186         https://bugs.webkit.org/show_bug.cgi?id=84818
187
188         Reviewed by Antonio Gomes.
189
190         Adding two functions in BackingStorePrivate and
191         BackingStore, which could render out webpage contents
192         into BlackBerry::Platform::Graphics::Drawable.
193
194         * Api/BackingStore.cpp:
195         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
196         (WebKit):
197         (BlackBerry::WebKit::BackingStore::drawContents):
198         * Api/BackingStore.h:
199         * Api/BackingStore_p.h:
200         (BackingStorePrivate):
201
202 2012-04-25  Charles Wei  <charles.wei@torchmobile.com.cn>
203
204         [BlackBerry] Input Range element expects mouse events
205         https://bugs.webkit.org/show_bug.cgi?id=84571
206
207         Reviewed by Antonio Gomes.
208
209         This just cleans up the code a bit to make it less code and more readable.
210         * WebKitSupport/TouchEventHandler.cpp:
211         (BlackBerry::WebKit::shouldConvertTouchToMouse):
212         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
213         (BlackBerry::WebKit::TouchEventHandler::spellCheck):
214
215 2012-04-25  Yong Li  <yoli@rim.com>
216
217         [BlackBerry] Possible JS re-entrancy caused by UI events.
218         https://bugs.webkit.org/show_bug.cgi?id=84862
219
220         Reviewed by Antonio Gomes.
221
222         1. block UI events when running in nested event loop
223         2. defer some tasks we still want to perform when it is safe to do,
224            with cached data.
225         3. deferred task can be cancelled by clearing the flag. duplicate tasks
226            is not a problem because they share same flag and data.
227         4. move deferred manual script from FrameLoaderClientBlackBerry to WebPagePrivate
228            and make it a deferred task
229
230         * Api/WebPage.cpp:
231         (WebKit):
232         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
233         (BlackBerry::WebKit::WebPagePrivate::load):
234         (BlackBerry::WebKit::WebPagePrivate::stopCurrentLoad):
235         (BlackBerry::WebKit::WebPagePrivate::willDeferLoading):
236         (BlackBerry::WebKit::WebPagePrivate::didResumeLoading):
237         (BlackBerry::WebKit::WebPagePrivate::deferredTasksTimerFired):
238         (BlackBerry::WebKit::WebPage::assignFocus):
239         (BlackBerry::WebKit::WebPagePrivate::setPageVisibilityState):
240         (BlackBerry::WebKit::WebPage::setInputSelection):
241         (BlackBerry::WebKit::WebPage::popupListClosed):
242         (BlackBerry::WebKit::WebPage::setDateTimeInput):
243         (BlackBerry::WebKit::WebPage::setColorInput):
244         (BlackBerry::WebKit::WebPage::mouseEvent):
245         (BlackBerry::WebKit::WebPage::touchEvent):
246         (BlackBerry::WebKit::WebPage::touchPointAsMouseEvent):
247         (BlackBerry::WebKit::WebPage::touchEventCancel):
248         (BlackBerry::WebKit::WebPage::touchEventCancelAndClearFocusedNode):
249         (BlackBerry::WebKit::WebPage::keyEvent):
250         (BlackBerry::WebKit::WebPage::deleteTextRelativeToCursor):
251         (BlackBerry::WebKit::WebPage::setComposingText):
252         (BlackBerry::WebKit::WebPage::commitText):
253         (BlackBerry::WebKit::WebPage::selectionCancelled):
254         (BlackBerry::WebKit::WebPage::cutSelectedText):
255         (BlackBerry::WebKit::WebPage::insertText):
256         (BlackBerry::WebKit::WebPage::clearCurrentInputField):
257         (BlackBerry::WebKit::WebPage::cut):
258         (BlackBerry::WebKit::WebPage::paste):
259         (BlackBerry::WebKit::WebPage::setSelection):
260         (BlackBerry::WebKit::WebPage::setCaretPosition):
261         (BlackBerry::WebKit::WebPage::selectAtPoint):
262         (BlackBerry::WebKit::WebPage::setFocused):
263         * Api/WebPage.h:
264         * Api/WebPage_p.h:
265         (WebCore):
266         (WebPagePrivate):
267         (DeferredTaskBase):
268         (BlackBerry::WebKit::WebPagePrivate::DeferredTaskBase::perform):
269         (BlackBerry::WebKit::WebPagePrivate::DeferredTaskBase::DeferredTaskBase):
270         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
271         (WebCore::FrameLoaderClientBlackBerry::FrameLoaderClientBlackBerry):
272         (WebCore::FrameLoaderClientBlackBerry::~FrameLoaderClientBlackBerry):
273         (WebCore::FrameLoaderClientBlackBerry::willDeferLoading):
274         (WebCore::FrameLoaderClientBlackBerry::didResumeLoading):
275         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
276         (FrameLoaderClientBlackBerry):
277         * WebKitSupport/InputHandler.cpp:
278         (BlackBerry::WebKit::InputHandler::setPopupListIndexes):
279         * WebKitSupport/InputHandler.h:
280         (InputHandler):
281
282 2012-04-24  Nima Ghanavatian  <nghanavatian@rim.com>
283
284         [BlackBerry] Perform spellcheck before handling TouchRelease event
285         https://bugs.webkit.org/show_bug.cgi?id=84744
286
287         After rebasing to master_35, it appears as though some code had been moved around.
288         Here, we were handling the TouchReleased event before calling spellcheck.  This
289         meant that when we finally got the call to spellcheck, the fatFinger result had been
290         reset and the spelling markers had been removed.
291
292         In addition, based on https://bugs.webkit.org/show_bug.cgi?id=66330
293         I am also updating the BlackBerry specific documentMarkerContainingPoint to use
294         LayoutPoint instead of IntPoint.
295
296         Internally reviewed by Mike Fenton.
297
298         Reviewed by Antonio Gomes.
299
300         * WebKitSupport/TouchEventHandler.cpp:
301         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
302         (BlackBerry::WebKit::TouchEventHandler::spellCheck):
303         * dom/DocumentMarkerController.cpp:
304         (WebCore::DocumentMarkerController::markerContainingPoint):
305         * dom/DocumentMarkerController.h:
306
307 2012-04-24  Mike Lattanzio  <mlattanzio@rim.com>
308
309         [BlackBerry] setUserViewportArguments not always respected.
310         https://bugs.webkit.org/show_bug.cgi?id=84738
311
312         Reviewed by Antonio Gomes.
313
314         Remove the unnecessary logic in
315         WebPagePrivate::recomputeVirtualViewportFromViewportArguments().
316         Instead it is much simpler to just set the m_viewportArguments to
317         m_userViewportArguments on LoadCommitted. If there is a viewport
318         tag in the content, m_viewportArguments will be replaced with it
319         as usual during normal page load.
320
321         * Api/WebPage.cpp:
322         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
323         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
324
325 2012-04-24  Joe Mason  <jmason@rim.com>
326
327         [BlackBerry] Revert broken changes to authentication dialog
328         https://bugs.webkit.org/show_bug.cgi?id=80135
329
330         Reviewed by Antonio Gomes.
331
332         The previous patches from this bug caused an infinite loop when using digest auth;
333         apparently they were only tested with basic.
334
335         * Api/DumpRenderTreeClient.h:
336         * Api/WebPage.cpp:
337         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
338         * Api/WebPageClient.h:
339         * Api/WebPage_p.h:
340         (WebPagePrivate):
341
342 2012-04-24  Mike Fenton  <mifenton@rim.com>
343
344         [BlackBerry] Add additional details including the bounds of the box for caretPositionChanged.
345         https://bugs.webkit.org/show_bug.cgi?id=84728
346
347         Reviewed by Antonio Gomes.
348
349         PR 138988.
350
351         Update caretPositionChanged to include the limit of the input field
352         for single line inputs.
353
354         Reviewed Internally by Gen Mak.
355
356         * Api/WebPageClient.h:
357         * WebKitSupport/InputHandler.cpp:
358         (BlackBerry::WebKit::InputHandler::boundingBoxForInputField):
359         (WebKit):
360         * WebKitSupport/InputHandler.h:
361         (InputHandler):
362         * WebKitSupport/SelectionHandler.cpp:
363         (BlackBerry::WebKit::SelectionHandler::clippingRectForVisibleContent):
364         (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
365
366 2012-04-24  Charles Wei  <charles.wei@torchmobile.com.cn>
367
368         [BlackBerry] Input Range element expects mouse events
369         https://bugs.webkit.org/show_bug.cgi?id=84571
370
371         Reviewed by Antonio Gomes.
372
373         Input element with Range type expects mouse events to
374         drag the handle. Note that Input Range could appear
375         in both the web page directly, or in some shadow tree,
376         like the MediaControlTimeline and MediaControlVolume.
377         * WebKitSupport/TouchEventHandler.cpp:
378         (BlackBerry::WebKit::isRangeControlElement):
379         (WebKit):
380         (BlackBerry::WebKit::elementExpectsMouseEvents):
381         (BlackBerry::WebKit::shouldConvertTouchToMouse):
382
383 2012-04-23  Charles Wei  <charles.wei@torchmobile.com.cn>
384
385         [BlackBerry] Build failure when DEBUG_FAT_FINGER is enabled
386         https://bugs.webkit.org/show_bug.cgi?id=84563
387
388         Reviewed by Antonio Gomes.
389
390         Fat Finger log code uses obsolete IntRect::toString() for logging,
391         which was first implemented interally and removed later.
392
393         * WebKitSupport/FatFingers.cpp:
394         (BlackBerry::WebKit::FatFingers::findIntersectingRegions):
395
396 2012-04-21  Benjamin C Meyer  <bmeyer@rim.com>
397
398         Don't hard code the plugins that blackberry supports.
399         https://bugs.webkit.org/show_bug.cgi?id=84535
400
401         Use the existing PluginDatabase to query for the plugins we can handle.
402
403         The original implemention of FrameLoaderClientBlackBerry::createPlugin
404         was a partial copy from another port.  In the Qt port there is some
405         workarounds for flash which is why this exists there.  Sadly the bits
406         that were copied made it so only flash worked, but as flash was the only
407         plugin on the system this issue was not noticed until QNX tried to get
408         jnext working.  Tracing it down to this bit of code rather then
409         correcting it they hardcoded the jnext into the same block as flash was.
410
411         The blackberry port isn't specifically suppose to only allow jnext and
412         flash, but was an accident due to the way this code was developed.
413
414         Reviewed by Adam Treat.
415
416         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
417         (WebCore::FrameLoaderClientBlackBerry::createPlugin):
418
419 2012-04-20  Brady Eidson  <beidson@apple.com>
420
421         https://bugs.webkit.org/show_bug.cgi?id=84512
422         Repurpose ActiveDOMObject::WillShowDialog to WillDeferLoading
423
424         Reviewed by Eric Carlson.
425
426         PageGroupLoadDeferrer's don't take a ReasonForSuspension argument anymore;
427         They just use WillDeferLoading by default.
428
429         * Api/WebPageGroupLoadDeferrer.cpp:
430         (BlackBerry::WebKit::WebPageGroupLoadDeferrer::WebPageGroupLoadDeferrer):
431
432         * WebCoreSupport/ChromeClientBlackBerry.cpp:
433         (WebCore::ChromeClientBlackBerry::createWindow):
434         (WebCore::ChromeClientBlackBerry::runOpenPanel):
435
436 2012-04-20  Brady Eidson  <beidson@apple.com>
437
438         https://bugs.webkit.org/show_bug.cgi?id=84490
439         PageGroupLoadDeferrer needs to take a ReasonForSuspension argument
440
441         Reviewed by Anders Carlsson.
442
443         * Api/WebPageGroupLoadDeferrer.cpp:
444         (BlackBerry::WebKit::WebPageGroupLoadDeferrer::WebPageGroupLoadDeferrer): Pass along ActiveDOMObject::WillShowDialog,
445           which used to be the default
446
447         * WebCoreSupport/ChromeClientBlackBerry.cpp:
448         (WebCore::ChromeClientBlackBerry::createWindow): Pass along ActiveDOMObject::WillShowDialog, which used to be the default.
449         (WebCore::ChromeClientBlackBerry::runOpenPanel): Ditto.
450
451 2012-04-20  Mike Lattanzio  <mlattanzio@rim.com>
452
453         [BlackBerry] Expose WebViewportArguments to WebPageClient
454         https://bugs.webkit.org/show_bug.cgi?id=84471
455
456         Reviewed by Antonio Gomes.
457
458         Implement the ability for the WebPageClient to specify a fallback
459         virtual viewport to be used whenever a meta viewport tag is not
460         present in the HTML. This can drastically impact apparent layout.
461         This patch is designed to provide a classic "Column View" style of
462         layout without breaking the web by simply exposing meta viewport
463         arguments to WebPageClients.
464
465         Note: As a side effect of this change. the WebPagePrivate::
466         recomputeVirtualViewportFromViewportArguments method no longer
467         modifies the targetDensityDpi property of the m_viewportArguments.
468         However this does not affect the class because that property itself
469         means nothing to us. Only the computeViewportArguments method from
470         WebCore uses it, and the currentViewportArguments object we pass
471         into that method has the adjusted targetDensityDpi value as before.
472
473         * Api/WebPage.cpp:
474         (BlackBerry::WebKit::WebPage::setUserViewportArguments):
475         (WebKit):
476         (BlackBerry::WebKit::WebPage::resetUserViewportArguments):
477         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
478         * Api/WebPage.h:
479         (WebKit):
480         * Api/WebPage_p.h:
481         (WebPagePrivate):
482         * Api/WebViewportArguments.cpp: Added.
483         (WebKit):
484         (BlackBerry::WebKit:::d):
485         (BlackBerry::WebKit::WebViewportArguments::~WebViewportArguments):
486         (BlackBerry::WebKit::WebViewportArguments::initialScale):
487         (BlackBerry::WebKit::WebViewportArguments::setInitialScale):
488         (BlackBerry::WebKit::WebViewportArguments::minimumScale):
489         (BlackBerry::WebKit::WebViewportArguments::setMinimumScale):
490         (BlackBerry::WebKit::WebViewportArguments::maximumScale):
491         (BlackBerry::WebKit::WebViewportArguments::setMaximumScale):
492         (BlackBerry::WebKit::WebViewportArguments::width):
493         (BlackBerry::WebKit::WebViewportArguments::setWidth):
494         (BlackBerry::WebKit::WebViewportArguments::height):
495         (BlackBerry::WebKit::WebViewportArguments::setHeight):
496         (BlackBerry::WebKit::WebViewportArguments::targetDensityDpi):
497         (BlackBerry::WebKit::WebViewportArguments::setTargetDensityDpi):
498         (BlackBerry::WebKit::WebViewportArguments::userScalable):
499         (BlackBerry::WebKit::WebViewportArguments::setUserScalable):
500         (BlackBerry::WebKit::WebViewportArguments::operator==):
501         (BlackBerry::WebKit::WebViewportArguments::operator!=):
502         * Api/WebViewportArguments.h: Added.
503         (WebCore):
504         (WebKit):
505
506 2012-04-19  Arvid Nilsson  <anilsson@rim.com>
507
508         [BlackBerry] Always use the AnimationFrameRateController for accelerated animations
509         https://bugs.webkit.org/show_bug.cgi?id=84323
510
511         Reviewed by Antonio Gomes.
512
513         PR 150750
514         Regardless of whether there's a WebPageCompositorClient, we want the
515         AnimationFrameRateController to manage animation frames.
516         Reviewed internally by Andrew Lo.
517
518         * Api/BackingStore.cpp:
519         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
520         * Api/WebPageCompositor.cpp:
521         (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
522         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
523         * Api/WebPageCompositor_p.h:
524         (WebPageCompositorPrivate):
525
526 2012-04-18  Max Feil  <mfeil@rim.com>
527
528         [BlackBerry] Tab awareness for HTML5 concurrent audio
529         https://bugs.webkit.org/show_bug.cgi?id=82930
530         Support for concurrent HTML5 audio improvements being made in
531         the platform library, which need to be aware of tabs and tab
532         visibility. PR96004.
533
534         Reviewed by George Staikos.
535
536         * Api/WebPageClient.h:
537         * Api/WebPage_p.h:
538         (BlackBerry::WebKit::WebPagePrivate::isVisible):
539
540 2012-04-17  Jacky Jiang  <zhajiang@rim.com>
541
542         [BlackBerry] Viewport metatag doesn't disable double-tap zoom
543         https://bugs.webkit.org/show_bug.cgi?id=84199
544
545         Reviewed by George Staikos.
546
547         PR: 148279
548         When we set "user-scalable=no" in viewport meta-tag and change any
549         other WebSettings, the WebPage can turn to be scalable.
550         This is a regression of the change master_32/SHA:fa0f8ee9. In that
551         change, we used setUserScalable(webSettings->isUserScalable())
552         in WebPagePrivate::didChangeSettings which was incorrect for non-DRT
553         case, as webSettings->isUserScalable() would always return true by
554         default.
555         Create a new API WebPage::setUserScalable which will be used in
556         DumpRenderTree.cpp.
557
558         * Api/WebPage.cpp:
559         (BlackBerry::WebKit::WebPage::setUserScalable):
560         (WebKit):
561         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
562         * Api/WebPage.h:
563
564 2012-04-17  Mike Fenton  <mifenton@rim.com>
565
566         [BlackBerry] Pattern matching should be applied to numbers
567         https://bugs.webkit.org/show_bug.cgi?id=84152
568
569         Reviewed by Antonio Gomes.
570
571         PR 148906.
572
573         Add pattern matching for number based on [0-9] to trigger
574         input help matching number fields.
575
576         * WebKitSupport/DOMSupport.cpp:
577         (BlackBerry::WebKit::DOMSupport::elementPatternIndicatesNumber):
578         (DOMSupport):
579         (BlackBerry::WebKit::DOMSupport::elementPatternIndicatesHexadecimal):
580         (BlackBerry::WebKit::DOMSupport::elementPatternMatches):
581         * WebKitSupport/DOMSupport.h:
582         * WebKitSupport/InputHandler.cpp:
583         (BlackBerry::WebKit::convertInputType):
584
585 2012-04-17  George Staikos  <staikos@webkit.org>
586
587         Export the initialization function so it can be called earlier.
588         https://bugs.webkit.org/show_bug.cgi?id=84134
589
590         Reviewed by Nikolas Zimmermann.
591
592         * Api/BlackBerryGlobal.h: export globalInitialize()
593         (WebKit):
594
595 2012-04-16  Antonio Gomes  <agomes@rim.com>
596
597         Screen shift down when VKB shows by clicking in a input box MKS_3601371
598         https://bugs.webkit.org/show_bug.cgi?id=84057
599
600         Reviewed by Rob Buis.
601
602         After switching from ScrollView::canOverscroll to ScrollView::constrainsScrollingToContentEdge
603         we had a less restricted code path allowing/disallowing overscrolling. That caused
604         some webpages like google.com to get on overscroll when adjusting the scroll
605         position to ensure the focused input field is visible.
606
607         Patch restricts the way we allow overscrolling to the bottom, where the virtual
608         keyboard pops up from, clamping it to 0, 0 if it tries to
609         overscroll upwards, and to maximum scroll position if it overscrolls
610         downwards.
611
612         PR #149846
613         Internally reviewed by Mike Fenton.
614
615         * WebKitSupport/InputHandler.cpp:
616         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
617
618 2012-04-16  Yongxin Dai  <yodai@rim.com>
619
620         [BlackBerry] Increase padding for text element
621         https://bugs.webkit.org/show_bug.cgi?id=83903
622
623         Reviewed by Antonio Gomes.
624         
625         PR 125888
626         
627         Increase the padding value for focused text element to make selection handle
628         at least partially visible when the user is dragging at edge of viewport
629         in in-region scoll mode.
630  
631         Reviewed internally by Mike Fenton.
632
633         * WebKitSupport/InputHandler.cpp:
634         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
635
636 2012-04-16  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
637
638         [BlackBerry] Add ability for DRT to handle HTTP authentication challenges.
639         https://bugs.webkit.org/show_bug.cgi?id=84031
640
641         Reviewed by Rob Buis.
642
643         Added the interface function didReceivedAuthenticaitonChallenge()
644         in interface class DumpRenderTreeClient;
645         Called m_dumpRenderTree->didReceiveAuthenticationChallenge() in
646         WebPagePrivate::authenticationChallenge() when DRT is enabled.
647
648         Test: reuse existing test cases:
649         http/tests/loading/basic-credentials-sent-automatically.html
650         http/tests/loading/basic-auth-resend-wrong-credentials.html
651
652         * Api/DumpRenderTreeClient.h:
653         (WebCore):
654         * Api/WebPage.cpp:
655         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
656
657 2012-04-16  Arvid Nilsson  <anilsson@rim.com>
658
659         [BlackBerry] Accelerated compositing layers fail to render in direct rendering mode
660         https://bugs.webkit.org/show_bug.cgi?id=83933
661
662         Reviewed by Adam Treat.
663
664         RIM PR: 149609
665         This was because I accidentally dropped an exclamation mark when
666         upstreaming the patch for PR 136381 (bug #83131). Fixed by adding back
667         the exclamation mark.
668
669         * Api/WebPage.cpp:
670         (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
671
672 2012-04-12  Konrad Piascik  <kpiascik@rim.com>
673
674         [BlackBerry] Web Inspector messages incorrectly converted
675         https://bugs.webkit.org/show_bug.cgi?id=83796
676
677         Reviewed by Rob Buis.
678
679         The JSON sent over from the remote Web Inspector front-end was being
680         mis interpreted as ISO-8859-1.  This caused all non ascii characters to
681         become garbled when using the String constructor, so we use fromtUTF8 instead.
682
683         * Api/WebPage.cpp:
684         (BlackBerry::WebKit::WebPage::dispatchInspectorMessage):
685
686 2012-04-12  Mike Fenton  <mifenton@rim.com>
687
688         [BlackBerry] Speed up processing of Selection region generation.
689         https://bugs.webkit.org/show_bug.cgi?id=82766
690
691         Reviewed by Rob Buis.
692
693         PR 136593.
694
695         Re-speed up text selection.  The previous patch had a merge
696         error causing text selection not to function.  The fix
697         implemented removed the optimization.  This fixes the error
698         in the original patch and removes the temporary fix.
699
700         Make style updated as suggested by Antonio Gomes.
701
702         Reviewed Internally by Gen Mak.
703
704         * WebKitSupport/SelectionHandler.cpp:
705         (BlackBerry::WebKit::SelectionHandler::regionForTextQuads):
706         (BlackBerry::WebKit::regionRectListContainsPoint):
707
708 2012-04-12  Mike Fenton  <mifenton@rim.com>
709
710         Pattern matching for hexadecimal should include * as an allowable count.
711         https://bugs.webkit.org/show_bug.cgi?id=83779
712
713         Reviewed by Rob Buis.
714
715         Update pattern matching check to allow wildcard for number
716         of characters allowed.
717
718         PR 148907.
719
720         Reviewed Internally by Gen Mak.
721
722         * WebKitSupport/DOMSupport.cpp:
723         (BlackBerry::WebKit::DOMSupport::elementPatternIndicatesHexadecimal):
724
725 2012-04-11  Joe Mason  <jmason@rim.com>
726
727         [BlackBerry] Update to the thread-safe GuardedPointer API
728         https://bugs.webkit.org/show_bug.cgi?id=83603
729
730         Reviewed by Rob Buis.
731
732         RIM PR: 134984
733         Make the destructors of all objects inheriting GuardedPointerBase protected or
734         private, and delete them using BlackBerry::Platform::deleteGuardedObject.
735         Access all GuardedPointers through GuardedPointerLocker.
736
737         No new tests, refactor.
738
739         Reviewed internally by Yong Li and George Staikos.
740
741         * Api/BackingStore.cpp:
742         (BlackBerry::WebKit::BackingStore::~BackingStore):
743         * Api/BackingStore_p.h:
744         (BackingStorePrivate):
745         * Api/WebPage.cpp:
746         (BlackBerry::WebKit::WebPage::~WebPage):
747         (BlackBerry::WebKit::WebPage::destroy):
748         * Api/WebPage.h:
749         * Api/WebPage_p.h:
750         (WebPagePrivate):
751
752 2012-04-10  Arvid Nilsson  <anilsson@rim.com>
753
754         [BlackBerry] Crash when tearing down web page rendered using WebPageCompositor
755         https://bugs.webkit.org/show_bug.cgi?id=83567
756
757         Reviewed by Antonio Gomes.
758
759         Fixed by checking if there's a layer renderer before calling into it.
760
761         * Api/WebPageCompositor.cpp:
762         (BlackBerry::WebKit::WebPageCompositorPrivate::releaseLayerResources):
763
764 2012-04-09  Eli Fidler  <efidler@rim.com>
765
766         [BlackBerry] Update about:config page
767         https://bugs.webkit.org/show_bug.cgi?id=83515
768
769         Reviewed by Rob Buis.
770
771         * WebCoreSupport/AboutData.cpp:
772         (WebCore::configPage):
773         * WebCoreSupport/AboutDataEnableFeatures.in:
774         * WebCoreSupport/AboutDataHaveFeatures.in:
775         * WebCoreSupport/AboutDataUseFeatures.in:
776
777 2012-04-07  Rob Buis  <rbuis@rim.com>
778
779         [BlackBerry] Add Battery Status API support
780         https://bugs.webkit.org/show_bug.cgi?id=82615
781
782         Reviewed by George Staikos.
783
784         Add client implementation for Battery API.
785
786         * Api/WebPage.cpp:
787         (BlackBerry::WebKit::WebPagePrivate::init):  initialize BatteryClient.
788         * WebCoreSupport/BatteryClientBlackBerry.cpp: Added.
789         (WebCore):
790         (WebCore::BatteryClientBlackBerry::BatteryClientBlackBerry):
791         (WebCore::BatteryClientBlackBerry::setController):
792         (WebCore::BatteryClientBlackBerry::startUpdating):
793         (WebCore::BatteryClientBlackBerry::stopUpdating):
794         (WebCore::BatteryClientBlackBerry::batteryControllerDestroyed):
795         (WebCore::BatteryClientBlackBerry::onLevelChange):
796         (WebCore::BatteryClientBlackBerry::onChargingChange):
797         (WebCore::BatteryClientBlackBerry::onChargingTimeChange):
798         (WebCore::BatteryClientBlackBerry::onDischargingTimeChange):
799         * WebCoreSupport/BatteryClientBlackBerry.h: Added.
800         (WebCore):
801         (BatteryClientBlackBerry):
802         (WebCore::BatteryClientBlackBerry::~BatteryClientBlackBerry):
803
804 2012-04-06  Benjamin Poulain  <bpoulain@apple.com>
805
806         Get rid of the useless flag PREEMPT_GEOLOCATION_PERMISSION
807         https://bugs.webkit.org/show_bug.cgi?id=83325
808
809         Reviewed by Ryosuke Niwa.
810
811         * WebCoreSupport/AboutDataUseFeatures.in:
812
813 2012-04-06  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
814
815         [BlackBerry] Text selection - Can't select texts
816         https://bugs.webkit.org/show_bug.cgi?id=83355
817
818         Fix the problem of not sending out the result of the function 
819         SelectionHandler::regionForTextQuads(). This regression issue
820         is introduced by the git commit f9446b7d671d48a833ab0acf12b1e20637e0a910.
821
822         Reviewed by George Staikos.
823
824         * WebKitSupport/SelectionHandler.cpp:
825         (BlackBerry::WebKit::SelectionHandler::regionForTextQuads):
826             Add code to return the function result.
827
828 2012-04-05  Jason Liu  <jason.liu@torchmobile.com.cn>
829
830         [BlackBerry] Empty Referrer should not be set into ResourceRequest when loading a main resource.
831         https://bugs.webkit.org/show_bug.cgi?id=83252
832
833         Reviewed by George Staikos.
834
835         Test: http/tests/misc/resources/referrer-main-resource.php
836
837         * Api/WebPage.cpp:
838         (BlackBerry::WebKit::WebPagePrivate::load):
839
840 2012-04-05  George Staikos  <staikos@webkit.org>
841
842         Add a vibration client for BlackBerry and enable it.
843         https://bugs.webkit.org/show_bug.cgi?id=83340
844
845         Reviewed by Rob Buis.
846
847         * Api/WebPage.cpp:
848         (BlackBerry::WebKit::WebPagePrivate::init): enable the client
849         * WebCoreSupport/VibrationClientBlackBerry.cpp: Added.
850         (WebCore):
851         (WebCore::VibrationClientBlackBerry::VibrationClientBlackBerry):
852         (WebCore::VibrationClientBlackBerry::vibrate):
853         (WebCore::VibrationClientBlackBerry::cancelVibration):
854         (WebCore::VibrationClientBlackBerry::vibrationDestroyed):
855         * WebCoreSupport/VibrationClientBlackBerry.h: Added.
856         (WebCore):
857         (VibrationClientBlackBerry):
858         (WebCore::VibrationClientBlackBerry::~VibrationClientBlackBerry):
859
860 2012-04-05  Arvid Nilsson  <anilsson@rim.com>
861
862         [BlackBerry] Force compositing mode when backing store is not active
863         https://bugs.webkit.org/show_bug.cgi?id=83131
864
865         Reviewed by George Staikos.
866
867         RIM PR: 136381
868         Normally, the BlackBerry WebKit port resorts to direct rendering when
869         the backing store is not active. However, direct rendering is broken
870         with the OpenGL code path. This prevented multiple web pages from being
871         displayed at once with the new WebPageCompositor API.
872
873         Fixed by using accelerated compositing layer to render the root layer
874         instead of backing store. This will give us a tiled layer backing the
875         root layer, which for some use cases is even better than direct
876         rendering.
877
878         Reviewed internally by Filip Spacek.
879
880         * Api/BackingStore.cpp:
881         (BlackBerry::WebKit::BackingStorePrivate::shouldDirectRenderingToWindow):
882         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
883         * Api/WebPage.cpp:
884         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
885         (BlackBerry::WebKit::WebPage::setVisible):
886         (BlackBerry::WebKit::WebPagePrivate::suspendBackingStore):
887         (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore):
888         (BlackBerry::WebKit::WebPagePrivate::compositorDrawsRootLayer):
889         (WebKit):
890         (BlackBerry::WebKit::WebPagePrivate::setCompositorDrawsRootLayer):
891         (BlackBerry::WebKit::WebPagePrivate::drawLayersOnCommit):
892         (BlackBerry::WebKit::WebPagePrivate::scheduleRootLayerCommit):
893         (BlackBerry::WebKit::WebPagePrivate::commitRootLayer):
894         (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
895         (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
896         (BlackBerry::WebKit::WebPagePrivate::setRootLayerCompositingThread):
897         (BlackBerry::WebKit::WebPagePrivate::createCompositor):
898         (BlackBerry::WebKit::WebPagePrivate::suspendRootLayerCommit):
899         (BlackBerry::WebKit::WebPagePrivate::setNeedsOneShotDrawingSynchronization):
900         * Api/WebPageCompositor.cpp:
901         (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
902         (BlackBerry::WebKit::WebPageCompositorPrivate::drawsRootLayer):
903         (WebKit):
904         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
905         * Api/WebPageCompositor_p.h:
906         (BlackBerry::WebKit::WebPageCompositorPrivate::rootLayer):
907         (WebPageCompositorPrivate):
908         (BlackBerry::WebKit::WebPageCompositorPrivate::setDrawsRootLayer):
909         * Api/WebPage_p.h:
910         (WebPagePrivate):
911
912 2012-04-05  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
913
914         [BlackBerry] Clear local storage won't take effect until browser exit and relaunch
915         https://bugs.webkit.org/show_bug.cgi?id=83253
916
917         Reviewed by Rob Buis.
918
919         RIM PR: #146871
920         Cleared the local storage namespace of a WebPage's PageGroup
921         when WebPage::clearLocalStorage() get called.
922         Also deleted unused global function clearLocalStorage().
923
924         * Api/BlackBerryGlobal.cpp:
925         * Api/BlackBerryGlobal.h:
926         (WebKit):
927         * Api/WebPage.cpp:
928         (BlackBerry::WebKit::WebPage::clearLocalStorage):
929
930 2012-04-04  Rob Buis  <rbuis@rim.com>
931
932         [BlackBerry] Make the switch statement in WebPage::notifyAppActivationStateChange() stronger
933         https://bugs.webkit.org/show_bug.cgi?id=83085
934
935         Reviewed by Antonio Gomes.
936
937         PR 121109
938
939         This way when we add something to the enum and forget to add to the switch we'll get a compile error.
940
941         * Api/WebPage.cpp:
942         (BlackBerry::WebKit::WebPage::notifyAppActivationStateChange):
943
944 2012-04-03  Mike Lattanzio  <mlattanzio@rim.com>
945
946         [BlackBerry] Expose CaseSensitive, Wrap, and HighlightAllMatches in WebPage::findNextString()
947         https://bugs.webkit.org/show_bug.cgi?id=82643
948
949         Enhance BlackBerry::WebKit::WebPage::findNextString()
950
951         This patch adds support for toggling case sensitivity,
952         search wrapping, and whether or not to highlight all matches
953         in addition to the next found match.
954
955         I refactored and renamed the new setActiveMatchAndMarker() method
956         to move the active match from one range to another. This was
957         required because in the case of a non wrapped search we do not
958         want to adjust the m_activeMatch if another match is not found.
959
960         Internal Review by Andy Chen.
961
962         Reviewed by Rob Buis.
963
964         * Api/WebPage.cpp:
965         (BlackBerry::WebKit::WebPage::findNextString):
966         * Api/WebPage.h:
967         * WebKitSupport/InPageSearchManager.cpp:
968         (BlackBerry::WebKit::InPageSearchManager::InPageSearchManager):
969         (BlackBerry::WebKit::InPageSearchManager::findNextString):
970         (BlackBerry::WebKit::InPageSearchManager::findAndMarkText):
971         (BlackBerry::WebKit::InPageSearchManager::setActiveMatchAndMarker):
972         (BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):
973         * WebKitSupport/InPageSearchManager.h:
974         (InPageSearchManager):
975
976 2012-04-02  Jacky Jiang  <zhajiang@rim.com>
977
978         [BlackBerry] Adapt WebPagePrivate::webContext to the API change of r109570
979         https://bugs.webkit.org/show_bug.cgi?id=82945
980
981         Reviewed by Rob Buis.
982
983         RIM PR: 147163
984         Adapt WebPagePrivate::webContext to the API change of the security
985         cherry-pick of r109570 and r112023.
986
987         * Api/WebPage.cpp:
988         (BlackBerry::WebKit::WebPagePrivate::webContext):
989
990 2012-04-02  Lianghui Chen  <liachen@rim.com>
991
992         [BlackBerry] Set ResourceRequest TargetType in WebPagePrivate::load()
993         https://bugs.webkit.org/show_bug.cgi?id=80519
994
995         Set the right TargetType for main loads if they are not already set in
996         dispatchWillSendRequest().
997
998         Also adjust NetworkRequest TargetType for decidePolicyForExternalLoad()
999         and dispatchDecidePolicyForNavigationAction() as they are called before
1000         dispatchWillSendRequest() is called. Patch to change ResourceRequest
1001         TargetType earlier has been rejected as in WebKit bug
1002         https://bugs.webkit.org/show_bug.cgi?id=80713
1003
1004         Reviewed by Rob Buis.
1005
1006         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1007         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction):
1008         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendRequest):
1009         (WebCore::FrameLoaderClientBlackBerry::decidePolicyForExternalLoad):
1010
1011 2012-04-01  Arvid Nilsson  <anilsson@rim.com>
1012
1013         [BlackBerry] Simplify the code that gets accelerated compositing output onto the screen
1014         https://bugs.webkit.org/show_bug.cgi?id=82845
1015
1016         Reviewed by Rob Buis.
1017
1018         RIM PR: 136381
1019         The code accounted for a now obsolete setup where we used one OpenGL
1020         window for accelerated compositing and one native window for backing
1021         store output, and let the windowing system composite those two. In that
1022         setup an optimization to try and only update the window that had
1023         changed was viable.
1024
1025         Nowadays, we either use an offscreen surface for accelerated
1026         compositing output, which we blend onto the window containing the
1027         backing store output, or render both backing store and accelerated
1028         compositing output directly to one OpenGL window. We always have to
1029         blit the backingstore contents and draw the accelerated compositing
1030         output every frame with these code paths, so don't try to be clever
1031         about it.
1032
1033         Even when we use an OpenGL window, the compositing surface can be non-
1034         null, so don't try to glFinish() and swap the compositing surface when
1035         the GLES2Context is tied to a window.
1036
1037         * Api/BackingStore.cpp:
1038         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
1039         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
1040         (WebKit):
1041         * Api/BackingStore_p.h:
1042         (BackingStorePrivate):
1043         * Api/WebPage.cpp:
1044         (BlackBerry::WebKit::WebPagePrivate::drawLayersOnCommit):
1045         * WebKitSupport/GLES2Context.cpp:
1046         (BlackBerry::WebKit::GLES2Context::swapBuffers):
1047
1048 2012-03-31  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1049
1050         [BlackBerry] http authenticate dialog popup only once no matter authentication pass or fail
1051         https://bugs.webkit.org/show_bug.cgi?id=80135
1052
1053         Reviewed by Rob Buis.
1054
1055         RIM PR: 145660
1056         Fixed a regression introduced by r111810, which used the wrong
1057         credential object.
1058
1059         * Api/WebPage.cpp:
1060         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
1061
1062 2012-03-30  Mike Fenton  <mifenton@rim.com>
1063
1064         [BlackBerry] Speed up processing of Selection region generation.
1065         https://bugs.webkit.org/show_bug.cgi?id=82766
1066
1067         Reviewed by Rob Buis.
1068
1069         PR 136593.
1070
1071         Refactor generation of Selection IntRectRegion to avoid
1072         the need for IntRectRegion's helper functions which were
1073         not available when using it as a container without
1074         unioning the rects.
1075
1076         This greatly speeds up rendering by maintaining the distinct
1077         rects as the union operation was length with large numbers of
1078         rects.
1079
1080         Reviewed Internally by Gen Mak, Mike Lattanzio and Tyler Abbott.
1081
1082         * WebKitSupport/DOMSupport.cpp:
1083         (BlackBerry::WebKit::DOMSupport::visibleTextQuads):
1084         (DOMSupport):
1085         * WebKitSupport/DOMSupport.h:
1086         * WebKitSupport/SelectionHandler.cpp:
1087         (BlackBerry::WebKit::SelectionHandler::clippingRectForVisibleContent):
1088         (BlackBerry::WebKit::SelectionHandler::regionForTextQuads):
1089         (BlackBerry::WebKit::SelectionHandler::setSelection):
1090         (WebKit):
1091         (BlackBerry::WebKit::regionRectListContainsPoint):
1092         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
1093         (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
1094         * WebKitSupport/SelectionHandler.h:
1095         (WebCore):
1096         (SelectionHandler):
1097
1098 2012-03-30  Mark Pilgrim  <pilgrim@chromium.org>
1099
1100         GEOLOCATION should be implemented as Page Supplement
1101         https://bugs.webkit.org/show_bug.cgi?id=82228
1102
1103         Reviewed by Adam Barth.
1104
1105         Geolocation is now a Supplement in Page so the interface
1106         has changed for setting up the page's geolocation client
1107         initially and accessing the controller later.
1108
1109         * Api/WebPage.cpp:
1110         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
1111         (BlackBerry::WebKit::WebPagePrivate::init):
1112         * WebCoreSupport/GeolocationControllerClientBlackBerry.cpp:
1113         (GeolocationControllerClientBlackBerry::onLocationUpdate):
1114         (GeolocationControllerClientBlackBerry::onLocationError):
1115         * WebKitSupport/DumpRenderTreeSupport.cpp:
1116         (DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests):
1117         (DumpRenderTreeSupport::resetGeolocationMock):
1118         (DumpRenderTreeSupport::setMockGeolocationError):
1119         (DumpRenderTreeSupport::setMockGeolocationPermission):
1120         (DumpRenderTreeSupport::setMockGeolocationPosition):
1121
1122 2012-03-30  Keishi Hattori  <keishi@webkit.org>
1123
1124         Change ENABLE_INPUT_COLOR to ENABLE_INPUT_TYPE_COLOR and enable it for chromium
1125         https://bugs.webkit.org/show_bug.cgi?id=80972
1126
1127         Reviewed by Kent Tamura.
1128
1129         * WebCoreSupport/AboutDataEnableFeatures.in:
1130         * WebCoreSupport/ChromeClientBlackBerry.h:
1131         (ChromeClientBlackBerry):
1132         * WebKitSupport/DOMSupport.cpp:
1133         (BlackBerry::WebKit::DOMSupport::isColorInputField):
1134         * WebKitSupport/InputHandler.cpp:
1135         (BlackBerry::WebKit::convertInputType):
1136
1137 2012-03-29  Sheriff Bot  <webkit.review.bot@gmail.com>
1138
1139         Unreviewed, rolling out r111259.
1140         http://trac.webkit.org/changeset/111259
1141         https://bugs.webkit.org/show_bug.cgi?id=82650
1142
1143         Caused selection regression in calculations due to
1144         misconstructed IntRectRegion. (Requested by mfenton on
1145         #webkit).
1146
1147         * WebKitSupport/SelectionHandler.cpp:
1148         (BlackBerry::WebKit::SelectionHandler::getConsolidatedRegionOfTextQuadsForSelection):
1149
1150 2012-03-29  Sheriff Bot  <webkit.review.bot@gmail.com>
1151
1152         Unreviewed, rolling out r112553.
1153         http://trac.webkit.org/changeset/112553
1154         https://bugs.webkit.org/show_bug.cgi?id=82638
1155
1156         It made all tests crash on Qt WK2 (Requested by Ossy_away on
1157         #webkit).
1158
1159         * Api/WebPage.cpp:
1160         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
1161         (BlackBerry::WebKit::WebPagePrivate::init):
1162         * WebCoreSupport/GeolocationControllerClientBlackBerry.cpp:
1163         (GeolocationControllerClientBlackBerry::onLocationUpdate):
1164         (GeolocationControllerClientBlackBerry::onLocationError):
1165         * WebKitSupport/DumpRenderTreeSupport.cpp:
1166         (DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests):
1167         (DumpRenderTreeSupport::resetGeolocationMock):
1168         (DumpRenderTreeSupport::setMockGeolocationError):
1169         (DumpRenderTreeSupport::setMockGeolocationPermission):
1170         (DumpRenderTreeSupport::setMockGeolocationPosition):
1171
1172 2012-03-29  Mark Pilgrim  <pilgrim@chromium.org>
1173
1174         GEOLOCATION should be implemented as Page Supplement
1175         https://bugs.webkit.org/show_bug.cgi?id=82228
1176
1177         Reviewed by Adam Barth.
1178
1179         Geolocation is now a Supplement in Page so the interface
1180         has changed for setting up the page's geolocation client
1181         initially and accessing the controller later.
1182
1183         * Api/WebPage.cpp:
1184         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
1185         (BlackBerry::WebKit::WebPagePrivate::init):
1186         * WebCoreSupport/GeolocationControllerClientBlackBerry.cpp:
1187         (GeolocationControllerClientBlackBerry::onLocationUpdate):
1188         (GeolocationControllerClientBlackBerry::onLocationError):
1189         * WebKitSupport/DumpRenderTreeSupport.cpp:
1190         (DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests):
1191         (DumpRenderTreeSupport::resetGeolocationMock):
1192         (DumpRenderTreeSupport::setMockGeolocationError):
1193         (DumpRenderTreeSupport::setMockGeolocationPermission):
1194         (DumpRenderTreeSupport::setMockGeolocationPosition):
1195
1196 2012-03-28  Nate Chapin  <japhet@chromium.org>
1197
1198         Remove dispatchDidLoadMainResource callback, since no
1199         port implements it.
1200         https://bugs.webkit.org/show_bug.cgi?id=82539
1201
1202         Reviewed by Alexey Proskuryakov.
1203
1204         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
1205         (FrameLoaderClientBlackBerry):
1206
1207 2012-03-28  Leo Yang  <leo.yang@torchmobile.com.cn>
1208
1209         [BlackBerry] Use WebCore::PlatformMouseEvent::globalPosition() instead of WebCore::PlatformMouseEvent::globalPos() in WebPage.cpp
1210         https://bugs.webkit.org/show_bug.cgi?id=82420
1211
1212         Reviewed by Rob Buis.
1213
1214         In PlatformMouseEvent.h the blackberry porting added globalPos() (but not upstreamed yet)
1215         for PlatformMouseEvent, but this method is same as globalPosition() that is available for
1216         every porting. We should use globalPosition().
1217
1218         * Api/WebPage.cpp:
1219         (BlackBerry::WebKit::WebPagePrivate::updateCursor):
1220
1221 2012-03-27  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
1222
1223         [BlackBerry] Text selection - selection gets broken in test.com/individuals.htm
1224         https://bugs.webkit.org/show_bug.cgi?id=82292
1225
1226         Change to check and avoid text selection across frames.
1227
1228         Internal reviewed by Mike Fenton
1229
1230         Reviewed by Rob Buis.
1231
1232         * WebKitSupport/SelectionHandler.cpp:
1233         (BlackBerry::WebKit::visiblePositionForPointIgnoringClipping):
1234             support selection across frames, so check if the *framePoint* is in
1235             the *frame*.
1236         (BlackBerry::WebKit::SelectionHandler::setSelection):
1237             function returns a null VisablePosition, it stands for a invalid position
1238             or a position in the different frames, therefor we don't execute setting
1239             handle's position.
1240
1241 2012-03-27  Andrew Lo  <anlo@rim.com>
1242
1243         [BlackBerry] Switch WebPageCompositor to use AnimationFrameRateController instead of timer
1244         https://bugs.webkit.org/show_bug.cgi?id=82350
1245
1246         Switch timer in WebPageCompositor to use AnimationFrameRateController.
1247
1248         Reviewed by Rob Buis.
1249
1250         * Api/WebPageCompositor.cpp:
1251         (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
1252         (BlackBerry::WebKit::WebPageCompositorPrivate::~WebPageCompositorPrivate):
1253         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
1254         (BlackBerry::WebKit::WebPageCompositorPrivate::animationFrameChanged):
1255         * Api/WebPageCompositor_p.h:
1256         (WebPageCompositorPrivate):
1257
1258 2012-03-27  Chris Guan  <chris.guan@torchmobile.com.cn>
1259
1260         A page containing multiparts with "multipart/x-mixed-replace" should not be cached.
1261         https://bugs.webkit.org/show_bug.cgi?id=82291
1262
1263         Reviewed by Rob Buis.
1264
1265         If we have a multiPart reponse with multipart/x-mixed-replace, 
1266         the current page should not be cached. I use isMultipartPayload() 
1267         API which was supposed to be set in NetworkJob to decide to 
1268         cache page or not.
1269
1270         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1271         (WebCore::FrameLoaderClientBlackBerry::canCachePage):
1272
1273 2012-03-25  Arvid Nilsson  <anilsson@rim.com>
1274
1275         [BlackBerry] Accelerated compositing layers fail to render when using WebPageCompositor
1276         https://bugs.webkit.org/show_bug.cgi?id=82104
1277         RIM PR: 145963
1278
1279         Reviewed by Rob Buis.
1280
1281         The root layer may be set before we have a layer renderer, because the
1282         latter is not created until we get an OpenGL context from the embedder.
1283
1284         Fixed by setting the root layer on the layer renderer when it's created
1285         instead of assuming a certain order of events.
1286
1287         * Api/WebPageCompositor.cpp:
1288         (BlackBerry::WebKit::WebPageCompositorPrivate::setContext):
1289         (BlackBerry::WebKit::WebPageCompositorPrivate::setRootLayer):
1290
1291 2012-03-23  Arvid Nilsson  <anilsson@rim.com>
1292
1293         [BlackBerry] Add WebPageCompositor class to BlackBerry WebKit API
1294         https://bugs.webkit.org/show_bug.cgi?id=81121
1295         RIM PR: 136687
1296
1297         Reviewed by Rob Buis.
1298
1299         The idea is for the API client to use a WebPageCompositor object to
1300         render the WebPage when there's no screen window available.
1301
1302         The WebPageCompositorPrivate becomes reference counted in order to be
1303         kept alive either because it's used for accelerated compositing layers
1304         or used for the WebPageCompositor API. It can still work standalone.
1305
1306         Clean up some code - no need to keep track of a separate boolean
1307         WebPagePrivate::m_isAcceleratedCompositingActive when the state of
1308         m_compositor can tell you.
1309
1310         Also remove duplicated code from WebPagePrivate - go directly to the
1311         compositor object instead, if you need to draw the AC layers.
1312
1313         Reviewed internally by Robin Cao and the hasBlitJobs/blitOnIdle change
1314         by Filip Spacek.
1315
1316         * Api/BackingStore.cpp:
1317         (BlackBerry::WebKit::BackingStore::hasBlitJobs):
1318         (BlackBerry::WebKit::BackingStore::blitOnIdle):
1319         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
1320         (BlackBerry::WebKit::BackingStorePrivate::drawSubLayers):
1321         (BlackBerry::WebKit::BackingStorePrivate::drawAndBlendLayersForDirectRendering):
1322         (BlackBerry::WebKit::BackingStorePrivate::surfaceSize):
1323         (BlackBerry::WebKit::BackingStorePrivate::buffer):
1324         * Api/WebPage.cpp:
1325         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
1326         (BlackBerry::WebKit::WebPagePrivate::drawLayersOnCommit):
1327         (BlackBerry::WebKit::WebPagePrivate::setCompositor):
1328         (BlackBerry::WebKit::WebPagePrivate::setRootLayerCompositingThread):
1329         (BlackBerry::WebKit::WebPagePrivate::createCompositor):
1330         (BlackBerry::WebKit::WebPagePrivate::destroyCompositor):
1331         * Api/WebPage.h:
1332         * Api/WebPageCompositor.cpp:
1333         (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
1334         (BlackBerry::WebKit::WebPageCompositorPrivate::setContext):
1335         (BlackBerry::WebKit::WebPageCompositorPrivate::hardwareCompositing):
1336         (BlackBerry::WebKit::WebPageCompositorPrivate::setRootLayer):
1337         (BlackBerry::WebKit::WebPageCompositorPrivate::render):
1338         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
1339         (BlackBerry::WebKit::WebPageCompositorPrivate::animationTimerFired):
1340         (BlackBerry::WebKit::WebPageCompositorPrivate::compositorDestroyed):
1341         (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor):
1342         (BlackBerry::WebKit::WebPageCompositor::~WebPageCompositor):
1343         (BlackBerry::WebKit::WebPageCompositor::client):
1344         (BlackBerry::WebKit::WebPageCompositor::prepareFrame):
1345         (BlackBerry::WebKit::WebPageCompositor::render):
1346         (BlackBerry::WebKit::WebPageCompositor::cleanup):
1347         (BlackBerry::WebKit::WebPageCompositor::contextLost):
1348         * Api/WebPageCompositor.h: Added.
1349         * Api/WebPageCompositorClient.h: Added.
1350         * Api/WebPageCompositor_p.h:
1351         (BlackBerry::WebKit::WebPageCompositorPrivate::create):
1352         (BlackBerry::WebKit::WebPageCompositorPrivate::context):
1353         (BlackBerry::WebKit::WebPageCompositorPrivate::animationFrameTimestamp):
1354         (BlackBerry::WebKit::WebPageCompositorPrivate::page):
1355         (BlackBerry::WebKit::WebPageCompositorPrivate::client):
1356         * Api/WebPage_p.h:
1357         (BlackBerry::WebKit::WebPagePrivate::client):
1358         (BlackBerry::WebKit::WebPagePrivate::isAcceleratedCompositingActive):
1359         (BlackBerry::WebKit::WebPagePrivate::compositor):
1360
1361 2012-03-22  Charles Wei  <charles.wei@torchmobile.com.cn>
1362
1363         [BlackBerry] Need to store the meta info of a page in the ViewState of the history
1364         https://bugs.webkit.org/show_bug.cgi?id=82000
1365
1366         Reviewed by Rob Buis.
1367
1368         Internally reviewed by George Staikos.
1369
1370         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1371         (WebCore::FrameLoaderClientBlackBerry::saveViewStateToItem):
1372         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
1373
1374 2012-03-22  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1375
1376         [BlackBerry] add interface clearCredentials() and clearNeverRememberSites()
1377         https://bugs.webkit.org/show_bug.cgi?id=81887
1378
1379         Reviewed by Rob Buis.
1380
1381         Added two interface functions clearCredentials() and
1382         clearNeverRememberSites() into class WebPage, which
1383         should be used by UI to clear the stored credential
1384         information and never remember sites.
1385         Also implemented the corresponding functions in class
1386         CredentialManager to call CredentialBackingStore
1387         to perform the actual clear table work.
1388
1389         * Api/WebPage.cpp:
1390         (BlackBerry::WebKit::WebPage::clearCredentials):
1391         (WebKit):
1392         (BlackBerry::WebKit::WebPage::clearNeverRememberSites):
1393         * Api/WebPage.h:
1394         * WebCoreSupport/CredentialManager.cpp:
1395         (WebCore::CredentialManager::clearCredentials):
1396         (WebCore):
1397         (WebCore::CredentialManager::clearNeverRememberSites):
1398         * WebCoreSupport/CredentialManager.h:
1399         (CredentialManager):
1400
1401 2012-03-22  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1402
1403         [BlackBerry] http authenticate dialog popup only once no matter authentication pass or fail
1404         https://bugs.webkit.org/show_bug.cgi?id=80135
1405
1406         Reviewed by Rob Buis.
1407
1408         Modified the interface function authenticationChallenge() in
1409         class WebPagePrivate by returning a bool to indicate if user
1410         pressed Ok button or not, and moved the Credential from return
1411         value to the reference parameter.
1412         Also updated the corresponding interface functions in class
1413         WebPageClient.
1414
1415         * Api/WebPage.cpp:
1416         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
1417         * Api/WebPageClient.h:
1418         * Api/WebPage_p.h:
1419         (WebPagePrivate):
1420
1421 2012-03-22  Mike Lattanzio  <mlattanzio@rim.com>
1422
1423         [BlackBerry] DeviceDPI Scaling is broken on mobile.
1424         https://bugs.webkit.org/show_bug.cgi?id=81966
1425
1426         Fix our viewport argument handling to only override the
1427         targetDensityDpi on tablet devices. Allow WebCore to use
1428         dpi scaling for smaller screen mobile devices.
1429
1430         Reviewed by Rob Buis.
1431
1432         * Api/WebPage.cpp:
1433         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
1434
1435 2012-03-22  Mike Fenton  <mifenton@rim.com>
1436
1437         [BlackBerry] Add pattern matching for hexadecimal type input fields
1438         https://bugs.webkit.org/show_bug.cgi?id=81944
1439
1440         Reviewed by Rob Buis.
1441
1442         PR 98504.
1443
1444         Add mapping of patterns matching hexadecimal input
1445         to a specialized type and provide input styling based
1446         on that format.
1447
1448         Reviewed Internally by Gen Mak.
1449
1450         * WebKitSupport/DOMSupport.cpp:
1451         (BlackBerry::WebKit::DOMSupport::elementPatternIndicatesHexadecimal):
1452         (DOMSupport):
1453         * WebKitSupport/DOMSupport.h:
1454         * WebKitSupport/InputHandler.cpp:
1455         (BlackBerry::WebKit::convertInputType):
1456         (BlackBerry::WebKit::inputStyle):
1457
1458 2012-03-22  Mike Fenton  <mifenton@rim.com>
1459
1460         [BlackBerry] DOMSupport isPositionInNode should have early returns for null nodes
1461         https://bugs.webkit.org/show_bug.cgi?id=81929
1462
1463         Reviewed by Rob Buis.
1464
1465         Make suggested style clean up and move int offset = 0 directly
1466         above is actual usage.
1467
1468         * WebKitSupport/DOMSupport.cpp:
1469         (BlackBerry::WebKit::DOMSupport::isPositionInNode):
1470
1471 2012-03-22  Mike Fenton  <mifenton@rim.com>
1472
1473         [BlackBerry] DOMSupport isPositionInNode should have early returns for null nodes
1474         https://bugs.webkit.org/show_bug.cgi?id=81929
1475
1476         Reviewed by Rob Buis.
1477
1478         Add early returns in isPositionInNode when either
1479         node or the position node is null.
1480
1481         * WebKitSupport/DOMSupport.cpp:
1482         (BlackBerry::WebKit::DOMSupport::isPositionInNode):
1483
1484 2012-03-21  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1485
1486         [BlackBerry] Credential save and autofill implemetation
1487         https://bugs.webkit.org/show_bug.cgi?id=80401
1488
1489         Reviewed by Rob Buis.
1490
1491         This patch is intended to implement the credential persist
1492         and autofill feature for BlackBerry porting.
1493
1494         Moved interface authenticationChallenge() from class
1495         FrameLoaderClientBlackBerry to WebPagePrivate (derived from
1496         PageClientBlackBerry as changes made in its parent interface class);
1497         Implemented notifyShouldSaveCredential() in WebPagePrivate
1498         and WebPageClient as well.
1499         Added credentialManager() to retrive CredentialManager instance
1500         as a global singleton; removed its m_frameLoaderClient which is
1501         replaced with a passed in PageClientBlackBerry pointer, and modified
1502         the interface function accordingly.
1503
1504         For the http authentication, autofill the input dialog in
1505         function authenticationChallenge() and save the credential
1506         information in the same function;
1507         For the in-form authentication, autofill the username and
1508         password input fields in function dispatchDidFinishLoad(),
1509         and save the credential information in function
1510         dispatchWillSubmitForm() or dispatchWillSendSubmitEvent().
1511
1512         * Api/WebPage.cpp:
1513         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
1514         (WebKit):
1515         (BlackBerry::WebKit::WebPagePrivate::notifyShouldSaveCredential):
1516         * Api/WebPageClient.h:
1517         * Api/WebPage_p.h:
1518         (WebPagePrivate):
1519         * WebCoreSupport/CredentialManager.cpp:
1520         (WebCore::credentialManager):
1521         (WebCore::CredentialManager::saveCredentialIfConfirmed):
1522         * WebCoreSupport/CredentialManager.h:
1523         (CredentialManager):
1524         (WebCore::CredentialManager::CredentialManager):
1525         (WebCore):
1526         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1527         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFinishLoad):
1528         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSubmitForm):
1529         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendSubmitEvent):
1530         (WebCore):
1531         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
1532         (FrameLoaderClientBlackBerry):
1533
1534 2012-03-20  Jacky Jiang  <zhajiang@rim.com>
1535
1536         [BlackBerry] Dijit crash WebCore::CookieManager::getRawCookies
1537         https://bugs.webkit.org/show_bug.cgi?id=81686
1538
1539         Reviewed by Rob Buis.
1540
1541         When deciding the policy for navigation action, if the url of the
1542         request is null, ignore it to avoid the ASSERT failure in
1543         MainResourceLoader::willSendRequest.
1544
1545         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1546         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction):
1547
1548 2012-03-20  Konrad Piascik  <kpiascik@rim.com>
1549
1550         [BlackBerry] BlackBerry can clear cookies and cache from the Web Inspector
1551         https://bugs.webkit.org/show_bug.cgi?id=81670
1552
1553         Reviewed by Rob Buis.
1554
1555         * WebCoreSupport/InspectorClientBlackBerry.h:
1556         (WebCore::InspectorClientBlackBerry::canClearBrowserCache):
1557         (WebCore::InspectorClientBlackBerry::canClearBrowserCookies):
1558
1559 2012-03-20  Nima Ghanavatian  <nghanavatian@rim.com>
1560
1561         [BlackBerry] Removing doubly defined methods in BackingStore.cpp
1562         https://bugs.webkit.org/show_bug.cgi?id=81664
1563
1564         Reviewed by Rob Buis.
1565
1566         * Api/BackingStore.cpp:
1567         (BlackBerry::WebKit::BackingStorePrivate::drawAndBlendLayersForDirectRendering):
1568
1569 2012-03-20  Mike Fenton  <mifenton@rim.com>
1570
1571         [BlackBerry] Crash when dragging the FCC caret over an invalid node.
1572         https://bugs.webkit.org/show_bug.cgi?id=81654
1573
1574         Reviewed by Rob Buis.
1575
1576         PR 144505.
1577
1578         The position did not have a valid container node and was causing
1579         a crash.  Validate the node pointer before using it.
1580
1581         * WebKitSupport/DOMSupport.cpp:
1582         (BlackBerry::WebKit::DOMSupport::DOMContainerNodeForPosition):
1583
1584 2012-03-20  Jason Liu  <jason.liu@torchmobile.com.cn>
1585
1586         [BlackBerry]Cookies shouldn't be set into each of webcore's request and platform's request. And this makes a regression.
1587         https://bugs.webkit.org/show_bug.cgi?id=80800
1588
1589         Reviewed by George Staikos.
1590
1591         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1592         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction):
1593         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendRequest):
1594         (WebCore::FrameLoaderClientBlackBerry::decidePolicyForExternalLoad):
1595
1596 2012-03-19  Adam Barth  <abarth@webkit.org>
1597
1598         Remove support for "magic" iframe
1599         https://bugs.webkit.org/show_bug.cgi?id=81590
1600
1601         Reviewed by Eric Seidel.
1602
1603         Remove FrameLoaderClient methods that no longer exist.
1604
1605         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1606         (WebCore):
1607         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
1608         (FrameLoaderClientBlackBerry):
1609         (WebCore::FrameLoaderClientBlackBerry::didDetectXSS):
1610
1611 2012-03-19  Tyler Abbott  <tabbott@rim.com>
1612
1613         [BlackBerry] speed up text selection for large selections
1614         https://bugs.webkit.org/show_bug.cgi?id=81536
1615
1616         When selecting large disjoint areas of text the cost
1617         of calculating the IntRectRegion union becomes very
1618         expensive. Simply placing all of the text quads into
1619         the IntRectRegion is faster despite the larger memory
1620         footprint and the additional calculations at render
1621         time.
1622
1623         Reviewed by Rob Buis.
1624
1625         * WebKitSupport/SelectionHandler.cpp:
1626         (BlackBerry::WebKit::SelectionHandler::getConsolidatedRegionOfTextQuadsForSelection):
1627
1628 2012-03-19  Mike Lattanzio  <mlattanzio@rim.com>
1629
1630         [BlackBerry] Use BlackBerry::Platform::DeviceInfo to generate UserAgent
1631         https://bugs.webkit.org/show_bug.cgi?id=81269
1632
1633         Generate the UserAgent lazily, using it as the default for the
1634         WebSettings object. BlackBerry::Platform::DeviceInfo is used
1635         to ensure the information is accurate to the specific device.
1636
1637         Remove the !isEmpty() assert when fetching the UA from the
1638         WebSettings object, as it will now always be properly initialized.
1639
1640         Add a static initializer block to ensure defaultUserAgent() is
1641         thread-safe from that moment onward.
1642
1643         Reviewed by Rob Buis.
1644
1645         * Api/WebPage.cpp:
1646         (WebKit):
1647         (BlackBerry::WebKit::WebPagePrivate::init):
1648         (BlackBerry::WebKit::WebPagePrivate::defaultUserAgent):
1649         * Api/WebPage_p.h:
1650         (WebPagePrivate):
1651         * Api/WebSettings.cpp:
1652         (BlackBerry::WebKit::WebSettings::setUserAgentString):
1653         * Api/WebSettings.h:
1654
1655 2012-03-19  Mike Fenton  <mifenton@rim.com>
1656
1657         [BlackBerry] Input fields with id of e-mail and url should be styled as such.
1658         https://bugs.webkit.org/show_bug.cgi?id=81364
1659
1660         Reviewed by Rob Buis.
1661
1662         Be less aggressive on matching url, and update as suggested by Rob.
1663
1664         * WebKitSupport/DOMSupport.cpp:
1665         (BlackBerry::WebKit::DOMSupport::matchesReservedStringUrl):
1666         * WebKitSupport/InputHandler.cpp:
1667         (BlackBerry::WebKit::inputStyle):
1668
1669 2012-03-19  Arvid Nilsson  <anilsson@rim.com>
1670
1671         [BlackBerry] Remove obsolete optimization in WebPageCompositorPrivate
1672         https://bugs.webkit.org/show_bug.cgi?id=81115
1673
1674         Reviewed by Benjamin Poulain.
1675
1676         The compositor tried to avoid rendering the same stuff twice, using a
1677         mechanism that didn't work properly and has been redundant since we
1678         introduced deferred blits. Remove this code.
1679
1680         Reviewed internally by Robin Cao.
1681
1682         * Api/WebPageCompositor.cpp:
1683         (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
1684         (BlackBerry::WebKit::WebPageCompositorPrivate::commit):
1685         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
1686         * Api/WebPageCompositor_p.h:
1687
1688 2012-03-17  Charles Wei  <charles.wei@torchmobile.com.cn>
1689
1690         [BlackBerry] Enable Web Timing for performance profiling and improvement.
1691         https://bugs.webkit.org/show_bug.cgi?id=81085
1692
1693         Reviewed by Rob Buis.
1694
1695         * Api/WebPage.cpp:
1696         (BlackBerry::WebKit::WebPagePrivate::init):
1697
1698 2012-03-16  Arvid Nilsson  <anilsson@rim.com>
1699
1700         [BlackBerry] Rename the existing WebPageCompositor class to WebPageCompositorPrivate
1701         https://bugs.webkit.org/show_bug.cgi?id=81108
1702         RIM PR: 136687
1703
1704         Reviewed by Rob Buis.
1705
1706         This is done in anticipation of a new WebPageCompositor class in the
1707         public API. The existing internal class will serve to d-pointerize the
1708         new public API. In addition, it is and will be possible to create only
1709         the private class, for cases where existing code paths require
1710         OpenGL compositing (i.e. due to accelerated compositing layers being
1711         added to the page).
1712
1713         Reviewed internally by Robin Cao.
1714
1715         * Api/BackingStore.h:
1716         * Api/WebPage.cpp:
1717         (BlackBerry::WebKit::WebPagePrivate::setIsAcceleratedCompositingActive):
1718         * Api/WebPageCompositor.cpp: Renamed from Source/WebKit/blackberry/WebKitSupport/WebPageCompositor.cpp.
1719         (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
1720         (BlackBerry::WebKit::WebPageCompositorPrivate::~WebPageCompositorPrivate):
1721         (BlackBerry::WebKit::WebPageCompositorPrivate::hardwareCompositing):
1722         (BlackBerry::WebKit::WebPageCompositorPrivate::setRootLayer):
1723         (BlackBerry::WebKit::WebPageCompositorPrivate::setBackingStoreUsesOpenGL):
1724         (BlackBerry::WebKit::WebPageCompositorPrivate::commit):
1725         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
1726         (BlackBerry::WebKit::WebPageCompositorPrivate::releaseLayerResources):
1727         (BlackBerry::WebKit::WebPageCompositorPrivate::animationTimerFired):
1728         * Api/WebPageCompositor_p.h: Renamed from Source/WebKit/blackberry/WebKitSupport/WebPageCompositor.h.
1729         (BlackBerry::WebKit::WebPageCompositorPrivate::layoutRectForCompositing):
1730         (BlackBerry::WebKit::WebPageCompositorPrivate::setLayoutRectForCompositing):
1731         (BlackBerry::WebKit::WebPageCompositorPrivate::contentsSizeForCompositing):
1732         (BlackBerry::WebKit::WebPageCompositorPrivate::setContentsSizeForCompositing):
1733         (BlackBerry::WebKit::WebPageCompositorPrivate::lastCompositingResults):
1734         (BlackBerry::WebKit::WebPageCompositorPrivate::setLastCompositingResults):
1735         * Api/WebPage_p.h:
1736         * CMakeListsBlackBerry.txt:
1737
1738 2012-03-16  Nima Ghanavatian  <nghanavatian@rim.com>
1739
1740         [BlackBerry] Syncing up left over bits in WebKitSupport from our local branch to upstream
1741         https://bugs.webkit.org/show_bug.cgi?id=81118
1742
1743         Reviewed by Rob Buis.
1744
1745         This is a consolidation of various changes that are in our local dev branch
1746         but do not appear in our upstreamed port.
1747
1748         * WebKitSupport/DumpRenderTreeSupport.cpp:
1749         (DumpRenderTreeSupport::computedStyleIncludingVisitedInfo):
1750         * WebKitSupport/FatFingers.cpp:
1751         (BlackBerry::WebKit::FatFingers::isElementClickable):
1752         * WebKitSupport/InputHandler.cpp:
1753         (BlackBerry::WebKit::InputHandler::spannableTextInRange):
1754         * WebKitSupport/SurfacePool.cpp:
1755         (BlackBerry::WebKit::SurfacePool::createBuffers):
1756         (BlackBerry::WebKit::SurfacePool::releaseBuffers):
1757         * WebKitSupport/TouchEventHandler.cpp:
1758         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
1759         (BlackBerry::WebKit::TouchEventHandler::handleFatFingerPressed):
1760         * WebKitSupport/WebPageCompositor.cpp:
1761         (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor):
1762         * WebKitSupport/WebPageCompositor.h:
1763         (WebPageCompositor):
1764
1765 2012-03-16  Nima Ghanavatian  <nghanavatian@rim.com>
1766
1767         [BlackBerry] Syncing up left over bits in WebCoreSupport from our local branch to upstream
1768         https://bugs.webkit.org/show_bug.cgi?id=81120
1769
1770         Reviewed by Rob Buis.
1771
1772         This is a consolidation of various changes that are in our local dev branch
1773         but do not appear in our upstreamed port.
1774
1775         * WebCoreSupport/AboutDataEnableFeatures.in:
1776         * WebCoreSupport/AboutDataHaveFeatures.in:
1777         * WebCoreSupport/AboutDataUseFeatures.in:
1778         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1779         (WebCore::ChromeClientBlackBerry::hasOpenedPopup):
1780         (WebCore):
1781         (WebCore::ChromeClientBlackBerry::screenToRootView):
1782         (WebCore::ChromeClientBlackBerry::rootViewToScreen):
1783         (WebCore::ChromeClientBlackBerry::invalidateRootView):
1784         (WebCore::ChromeClientBlackBerry::invalidateContentsAndRootView):
1785         (WebCore::ChromeClientBlackBerry::invalidateContentsForSlowScroll):
1786         (WebCore::ChromeClientBlackBerry::scrollableAreasDidChange):
1787         (WebCore::ChromeClientBlackBerry::createColorChooser):
1788         * WebCoreSupport/ChromeClientBlackBerry.h:
1789         (ChromeClientBlackBerry):
1790         (WebCore::ChromeClientBlackBerry::numTouchEventHandlersChanged):
1791         * WebCoreSupport/EditorClientBlackBerry.cpp:
1792         (WebCore::EditorClientBlackBerry::registerUndoStep):
1793         (WebCore::EditorClientBlackBerry::registerRedoStep):
1794         (WebCore::EditorClientBlackBerry::undo):
1795         (WebCore::EditorClientBlackBerry::redo):
1796         * WebCoreSupport/EditorClientBlackBerry.h:
1797         (EditorClientBlackBerry):
1798         * WebCoreSupport/GeolocationControllerClientBlackBerry.cpp:
1799         (GeolocationControllerClientBlackBerry::requestPermission):
1800         (GeolocationControllerClientBlackBerry::cancelPermissionRequest):
1801         * WebCoreSupport/GeolocationControllerClientBlackBerry.h:
1802         * WebCoreSupport/InspectorClientBlackBerry.cpp:
1803         (WebCore::InspectorClientBlackBerry::closeInspectorFrontend):
1804         (WebCore):
1805         (WebCore::InspectorClientBlackBerry::bringFrontendToFront):
1806         * WebCoreSupport/InspectorClientBlackBerry.h:
1807         (InspectorClientBlackBerry):
1808         * WebCoreSupport/NotificationPresenterImpl.cpp:
1809         (WebCore::NotificationPresenterImpl::show):
1810
1811 2012-03-16  Mike Fenton  <mifenton@rim.com>
1812
1813         [BlackBerry] Input fields with id of e-mail and url should be styled as such.
1814         https://bugs.webkit.org/show_bug.cgi?id=81364
1815
1816         Reviewed by Rob Buis.
1817
1818         Treat fields that have name/id's that match url or
1819         email as url or email fields providing the appropriate
1820         keyboard.
1821
1822         PR 137259.
1823
1824         Reviewed Internally by Gen Mak and Nima Ghanavatian.
1825
1826         * WebKitSupport/DOMSupport.cpp:
1827         (BlackBerry::WebKit::DOMSupport::matchesReservedStringEmail):
1828         (DOMSupport):
1829         (BlackBerry::WebKit::DOMSupport::matchesReservedStringUrl):
1830         (BlackBerry::WebKit::DOMSupport::elementIdOrNameIndicatesEmail):
1831         (BlackBerry::WebKit::DOMSupport::elementIdOrNameIndicatesUrl):
1832         (BlackBerry::WebKit::DOMSupport::matchesReservedStringPreventingAutocomplete):
1833         * WebKitSupport/DOMSupport.h:
1834         (WebCore):
1835         * WebKitSupport/InputHandler.cpp:
1836         (BlackBerry::WebKit::convertInputType):
1837         (BlackBerry::WebKit::inputStyle):
1838
1839 2012-03-16  Nima Ghanavatian  <nghanavatian@rim.com>
1840
1841         [BlackBerry] Syncing up left over bits in Api from our local branch to upstream
1842         https://bugs.webkit.org/show_bug.cgi?id=81105
1843
1844         Reviewed by Rob Buis.
1845
1846         This patches fixes up a previous sync done in this directory and adds some new bits
1847         as well.  This is accurate as of ddea1528b37b29925638fe1183318b3c3994f1f8 in our
1848         local repo.
1849
1850         * Api/BackingStore.cpp:
1851         (BlackBerry::WebKit::BackingStorePrivate::drawAndBlendLayersForDirectRendering):
1852         (WebKit):
1853         (BlackBerry::WebKit::BackingStorePrivate::drawLayersOnCommitIfNeeded):
1854         * Api/WebPage.cpp:
1855         (BlackBerry::WebKit::WebPagePrivate::webContext):
1856         (BlackBerry::WebKit::WebPage::webContext):
1857         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
1858         * Api/WebPage.h:
1859         * Api/WebPage_p.h:
1860         (WebPagePrivate):
1861
1862 2012-03-16  Mike Fenton  <mifenton@rim.com>
1863
1864         [BlackBerry] Input processing mode should be cancelled when processing hot keys
1865         https://bugs.webkit.org/show_bug.cgi?id=81348
1866
1867         Reviewed by Rob Buis.
1868
1869         Don't suppress IMF notifications if we are handling
1870         the event as a hotkey.
1871
1872         Reviewed Internally by Nima Ghanavatian.
1873
1874         * WebCoreSupport/EditorClientBlackBerry.cpp:
1875         (WebCore::EditorClientBlackBerry::handleKeyboardEvent):
1876
1877 2012-03-16  Robin Cao  <robin.cao@torchmobile.com.cn>
1878
1879         [BlackBerry] Can not open certain links from bridge applications
1880         https://bugs.webkit.org/show_bug.cgi?id=81197
1881
1882         Reviewed by Rob Buis.
1883
1884         Currently, the engine asks the client to handle some type of requests externally.
1885         But WebPageClient::handleStringPattern is not yet implemented and exposed to
1886         the client. Before that, we still need to give the client a chance to decide
1887         how to handle requests such as 'mailto:'.
1888
1889         To address this problem, r108763 introduced a change that ask the client to
1890         decide how to handle the navigation in dispatchDecidePolicyForNewWindowAction().
1891         This is not intuitive and will bring troubles, because this navigation will
1892         happen in the new page. So the new page client is to decide how to handle
1893         the navigation, not the old one.
1894
1895         This patch reverts r108763 and skips calling WebPageClient::handleStringPattern
1896         since it's not implemented.
1897
1898         This way the new window action will continue, and the logic in
1899         dispatchDecidePolicyForNavigationAction() will handle the navigation correctly.
1900
1901         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1902         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNewWindowAction):
1903         (WebCore::FrameLoaderClientBlackBerry::decidePolicyForExternalLoad):
1904
1905 2012-03-16  Leo Yang  <leo.yang@torchmobile.com.cn>
1906
1907         [BlackBerry] Crash when going back from an xhtml document containing <img>
1908         https://bugs.webkit.org/show_bug.cgi?id=81297
1909
1910         Reviewed by Rob Buis.
1911
1912         This is manually reverting the offending internal commit which checked-in before upstreaming.
1913
1914         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1915         (WebCore::FrameLoaderClientBlackBerry::canCachePage):
1916
1917 2012-03-16  Genevieve Mak  <gmak@rim.com>
1918
1919         [BlackBerry] viewportRect has changed to viewportSize
1920         https://bugs.webkit.org/show_bug.cgi?id=81262
1921
1922         Reviewed by Antonio Gomes.
1923
1924         Set size instead of rect in constructor.
1925         * WebKitSupport/InRegionScrollableArea.cpp:
1926         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
1927
1928 2012-03-16  Andrew Lo  <anlo@rim.com>
1929
1930         [BlackBerry] Enable PAGE_VISIBILITY_API
1931         https://bugs.webkit.org/show_bug.cgi?id=81257
1932
1933         Set Page visibility state for BlackBerry port.
1934
1935         Reviewed by Rob Buis.
1936
1937         * Api/WebPage.cpp:
1938         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
1939         (WebKit):
1940         (BlackBerry::WebKit::WebPagePrivate::setPageVisibilityState):
1941         (BlackBerry::WebKit::WebPagePrivate::setVisible):
1942         (BlackBerry::WebKit::WebPage::setVisible):
1943         (BlackBerry::WebKit::WebPagePrivate::notifyAppActivationStateChange):
1944         (BlackBerry::WebKit::WebPage::notifyAppActivationStateChange):
1945         * Api/WebPage_p.h:
1946         (WebPagePrivate):
1947
1948 2012-03-14  Arvid Nilsson  <anilsson@rim.com>
1949
1950         [BlackBerry] Make sure WebPage and BackingStore don't crash without a Window
1951         https://bugs.webkit.org/show_bug.cgi?id=81099
1952
1953         Reviewed by Rob Buis.
1954
1955         Also rename the "compositing/blitting to main window" variables to
1956         instead refer to OpenGL compositing. The code paths it triggers are
1957         related to the BackingStore using OpenGL compositing, and can be useful
1958         even when there's no window.
1959
1960         * Api/BackingStore.cpp:
1961         (BlackBerry::WebKit::BackingStorePrivate::isOpenGLCompositing):
1962         (BlackBerry::WebKit::BackingStorePrivate::render):
1963         (BlackBerry::WebKit::BackingStorePrivate::copyPreviousContentsToBackSurfaceOfWindow):
1964         (BlackBerry::WebKit::BackingStorePrivate::paintDefaultBackground):
1965         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
1966         (BlackBerry::WebKit::BackingStorePrivate::blitTileRect):
1967         (BlackBerry::WebKit::BackingStorePrivate::blendCompositingSurface):
1968         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
1969         (BlackBerry::WebKit::BackingStorePrivate::blitToWindow):
1970         (BlackBerry::WebKit::BackingStorePrivate::checkerWindow):
1971         (BlackBerry::WebKit::BackingStorePrivate::invalidateWindow):
1972         (BlackBerry::WebKit::BackingStorePrivate::clearWindow):
1973         (BlackBerry::WebKit::BackingStorePrivate::drawSubLayers):
1974         (BlackBerry::WebKit::BackingStorePrivate::surfaceSize):
1975         (BlackBerry::WebKit::BackingStorePrivate::buffer):
1976         * Api/BackingStore_p.h:
1977         * Api/WebPage.cpp:
1978         (BlackBerry::WebKit::WebPagePrivate::didPluginEnterFullScreen):
1979         (BlackBerry::WebKit::WebPagePrivate::didPluginExitFullScreen):
1980         (BlackBerry::WebKit::WebPagePrivate::drawLayersOnCommit):
1981         (BlackBerry::WebKit::WebPagePrivate::drawSubLayers):
1982         (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
1983         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1984         (WebCore::ChromeClientBlackBerry::windowRect):
1985         (WebCore::ChromeClientBlackBerry::screenToWindow):
1986         (WebCore::ChromeClientBlackBerry::windowToScreen):
1987         * WebKitSupport/GLES2Context.cpp:
1988         (BlackBerry::WebKit::GLES2Context::GLES2Context):
1989         * WebKitSupport/TouchEventHandler.h:
1990         * WebKitSupport/WebPageCompositor.cpp:
1991         (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor):
1992         (BlackBerry::WebKit::WebPageCompositor::setBackingStoreUsesOpenGL):
1993         (BlackBerry::WebKit::WebPageCompositor::drawLayers):
1994         * WebKitSupport/WebPageCompositor.h:
1995
1996 2012-03-13  Jon Lee  <jonlee@apple.com>
1997
1998         Separate NOTIFICATIONS and LEGACY_NOTIFICATIONS
1999         https://bugs.webkit.org/show_bug.cgi?id=80922
2000         <rdar://problem/11035082>
2001
2002         Reviewed by Jian Li.
2003
2004         You can include either NOTIFICATIONS or LEGACY_NOTIFICATIONS and have a complete API.
2005         LEGACY_NOTIFICATIONS should cover all of the previous functionality, and NOTIFICATIONS will cover the
2006         new API. Therefore, APIs that are common between the two will have:
2007         #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
2008
2009         This patch initially sets both to be exactly the same. As other bugs with patches begin to migrate to
2010         the new API, the defines will begin to split. This allows ports to decide which set of APIs to include.
2011
2012         Update everything to be #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
2013         * Api/WebPage.cpp:
2014         (BlackBerry::WebKit::WebPagePrivate::init):
2015         * WebCoreSupport/NotificationPresenterImpl.cpp:
2016         * WebCoreSupport/NotificationPresenterImpl.h:
2017
2018 2012-03-14  Nima Ghanavatian  <nghanavatian@rim.com>
2019
2020         [BlackBerry] Syncing up left over bits in Api from our local branch to upstream
2021         https://bugs.webkit.org/show_bug.cgi?id=81105
2022
2023         Reviewed by Rob Buis.
2024
2025         * Api/BackingStore.cpp:
2026         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
2027         (BlackBerry::WebKit::BackingStorePrivate::isActive):
2028         (BlackBerry::WebKit::BackingStore::createBackingStoreMemory):
2029         (WebKit):
2030         (BlackBerry::WebKit::BackingStore::releaseBackingStoreMemory):
2031         * Api/BackingStore.h:
2032         * Api/WebPage.cpp:
2033         (BlackBerry::WebKit::toWebCoreMouseEventType):
2034         (BlackBerry::WebKit::WebPagePrivate::init):
2035         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
2036         (BlackBerry::WebKit::WebPagePrivate::activeNodeContext):
2037         (BlackBerry::WebKit::WebPage::activeNodeContext):
2038         (BlackBerry::WebKit::WebPagePrivate::updateCursor):
2039         (BlackBerry::WebKit::WebPagePrivate::contextNode):
2040         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
2041         * Api/WebPage.h:
2042         * Api/WebPage_p.h:
2043         (WebPagePrivate):
2044
2045 2012-03-14  Andrew Lo  <anlo@rim.com>
2046
2047         [BlackBerry] Implement REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR using AnimationFrameRateController
2048         https://bugs.webkit.org/show_bug.cgi?id=81000
2049
2050         Set the platform display ID, needed for DisplayRefreshMonitor.
2051
2052         Reviewed by Antonio Gomes.
2053
2054         * Api/WebPage.cpp:
2055         (BlackBerry::WebKit::WebPagePrivate::init):
2056
2057 2012-03-14  Leo Yang  <leo.yang@torchmobile.com.cn>
2058
2059         [BlackBerry] Upstream the BlackBerry change to platform/Cursor.h
2060         https://bugs.webkit.org/show_bug.cgi?id=81086
2061
2062         Reviewed by Rob Buis.
2063
2064         There was an alias named PlatformCursorHandle for PlatformCursor
2065         in the internal version of Cursor.h. But it's not necessary so it's
2066         not included in the upstreaming version of Cursor.h. As a result,
2067         use PlatformCursor directly.
2068
2069         * Api/WebPage.cpp:
2070         (BlackBerry::WebKit::WebPagePrivate::setCursor):
2071         * Api/WebPage_p.h:
2072         (WebPagePrivate):
2073
2074 2012-03-13  Mike Fenton  <mifenton@rim.com>
2075
2076         [BlackBerry] Input focus state should unfocus the frame selection instead of the field.
2077         https://bugs.webkit.org/show_bug.cgi?id=81023
2078
2079         Reviewed by Antonio Gomes.
2080
2081         PR 137400.
2082
2083         Prevent cursor drawing by unfocusing the frame selection
2084         when input mode is not ready.
2085
2086         Greatly simplify the decision to focus input fields by removing
2087         all ties to the page load state and base it on input.  Input mode
2088         is disabled when a page load begins and enabled on any user input.
2089
2090         The field is focused and ready for input immediately, only the
2091         frame selection (or cursor) is unfocused.
2092
2093         Reviewed Internally by Gen Mak, Antonio Gomes and Nima Ghanavatian.
2094
2095         * Api/WebPage.cpp:
2096         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
2097         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
2098         * Api/WebPageClient.h:
2099         * WebCoreSupport/EditorClientBlackBerry.cpp:
2100         (WebCore::EditorClientBlackBerry::shouldBeginEditing):
2101         * WebKitSupport/InputHandler.cpp:
2102         (BlackBerry::WebKit::InputHandler::InputHandler):
2103         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
2104         (BlackBerry::WebKit::InputHandler::enableInputMode):
2105         (BlackBerry::WebKit::InputHandler::setElementFocused):
2106         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
2107         (BlackBerry::WebKit::InputHandler::notifyClientOfKeyboardVisibilityChange):
2108         (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
2109         (BlackBerry::WebKit::InputHandler::setComposingText):
2110         * WebKitSupport/InputHandler.h:
2111         (InputHandler):
2112         * WebKitSupport/TouchEventHandler.cpp:
2113         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
2114
2115 2012-03-13  Adam Barth  <abarth@webkit.org> && Benjamin Poulain  <bpoulain@apple.com>
2116
2117         Always enable ENABLE(CLIENT_BASED_GEOLOCATION)
2118         https://bugs.webkit.org/show_bug.cgi?id=78853
2119
2120         Reviewed by Adam Barth.
2121
2122         * Api/WebPage.cpp:
2123         (BlackBerry::WebKit::WebPagePrivate::init):
2124         * WebCoreSupport/AboutDataEnableFeatures.in:
2125         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2126         * WebCoreSupport/ChromeClientBlackBerry.h:
2127         (ChromeClientBlackBerry):
2128         * WebKitSupport/DumpRenderTreeSupport.cpp:
2129         (toGeolocationClientMock):
2130         (DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests):
2131         (DumpRenderTreeSupport::resetGeolocationMock):
2132         (DumpRenderTreeSupport::setMockGeolocationError):
2133         (DumpRenderTreeSupport::setMockGeolocationPermission):
2134         (DumpRenderTreeSupport::setMockGeolocationPosition):
2135
2136 2012-03-13  Mike Lattanzio  <mlattanzio@rim.com>
2137
2138         Remove ActiveNodeContext in favour of BlackBerry::Platform::WebContext
2139         https://bugs.webkit.org/show_bug.cgi?id=80984
2140
2141         Remove ActiveNodeContext, and switch the implementation to
2142         provide a BlackBerry::Platform::WebContext. The new object
2143         adds an explicit IsImage flag, as well as IsAudio and IsVideo
2144         for the HTML5 elements.
2145
2146         Note that for many videos both IsVideo and IsAudio will be true,
2147         as videos typically have audio streams as well.
2148
2149         Reviewed by George Staikos.
2150
2151         * Api/ActiveNodeContext.h: Removed.
2152         * Api/WebPage.cpp:
2153         (BlackBerry::WebKit::WebPagePrivate::webContext):
2154         (BlackBerry::WebKit::WebPage::webContext):
2155         * Api/WebPage.h:
2156         * Api/WebPage_p.h:
2157
2158 2012-03-12  Andy Chen  <andchen@rim.com>
2159
2160         [Blackberry] Make the process of marking all matches interruptible and asynchronous for find-in-page
2161         https://bugs.webkit.org/show_bug.cgi?id=80831
2162
2163         Reviewed by Antonio Gomes.
2164
2165         * WebKitSupport/InPageSearchManager.cpp:
2166         (BlackBerry::WebKit::InPageSearchManager::DeferredScopeStringMatches::DeferredScopeStringMatches):
2167         (BlackBerry::WebKit::InPageSearchManager::DeferredScopeStringMatches::doTimeout):
2168         (BlackBerry::WebKit::InPageSearchManager::InPageSearchManager):
2169         (BlackBerry::WebKit::InPageSearchManager::~InPageSearchManager):
2170         (BlackBerry::WebKit::InPageSearchManager::findNextString):
2171         (BlackBerry::WebKit::InPageSearchManager::shouldSearchForText):
2172         (BlackBerry::WebKit::InPageSearchManager::findAndMarkText):
2173         (BlackBerry::WebKit::InPageSearchManager::clearTextMatches):
2174         (BlackBerry::WebKit::InPageSearchManager::frameUnloaded):
2175         (BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):
2176         (BlackBerry::WebKit::InPageSearchManager::scopeStringMatchesSoon):
2177         (BlackBerry::WebKit::InPageSearchManager::callScopeStringMatches):
2178         (BlackBerry::WebKit::InPageSearchManager::cancelPendingScopingEffort):
2179         * WebKitSupport/InPageSearchManager.h:
2180
2181 2012-03-09  Jon Lee  <jonlee@apple.com>
2182
2183         Rename NotificationPresenter to NotificationClient
2184         https://bugs.webkit.org/show_bug.cgi?id=80488
2185         <rdar://problem/10965558>
2186
2187         Reviewed by Kentaro Hara.
2188
2189         Refactor to use renamed WebCore::NotificationClient.
2190         * WebCoreSupport/NotificationPresenterImpl.cpp:
2191         (WebCore::NotificationPresenterImpl::instance):
2192         (WebCore::NotificationPresenterImpl::show):
2193         (WebCore::NotificationPresenterImpl::checkPermission):
2194         * WebCoreSupport/NotificationPresenterImpl.h:
2195         (NotificationPresenterImpl):
2196
2197 2012-03-09  Charles Wei  <charles.wei@torchmobile.com.cn>
2198
2199         [BlackBerry] Web Notification not working after rebase
2200         https://bugs.webkit.org/show_bug.cgi?id=80690
2201
2202         Reviewed by George Staikos.
2203
2204         1. NotificationPresenterImpl should be in namespace WebCore
2205         2. Need to connect NotificationPresenterImpl to webcore the new way:
2206            WebCore::provideNotification(Page*, NotificationPresenter*)
2207         3. Remove the old way of connecting the Notification:
2208            ChromeClientBlackBerry::notificationPresenter()
2209
2210         * Api/WebPage.cpp:
2211         (BlackBerry::WebKit::WebPagePrivate::init):
2212         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2213         (WebCore):
2214         * WebCoreSupport/ChromeClientBlackBerry.h:
2215         (ChromeClientBlackBerry):
2216         * WebCoreSupport/NotificationPresenterImpl.cpp:
2217         * WebCoreSupport/NotificationPresenterImpl.h:
2218
2219 2012-03-08  Mike Fenton  <mifenton@rim.com>
2220
2221         [BlackBerry] Always use the current focused node when processing focus changes
2222         https://bugs.webkit.org/show_bug.cgi?id=80594
2223
2224         Reviewed by Antonio Gomes.
2225
2226         Guard against toRange or fromRange being null when called
2227         as part of a clear event.
2228
2229         * WebCoreSupport/EditorClientBlackBerry.cpp:
2230         (WebCore::EditorClientBlackBerry::shouldChangeSelectedRange):
2231
2232 2012-03-08  Yong Li  <yoli@rim.com>
2233
2234         [BlackBerry] Block file-to-file access by default
2235         https://bugs.webkit.org/show_bug.cgi?id=80605
2236
2237         Reviewed by Rob Buis.
2238
2239         Turn off allowFileAccessFromFileURLs() by default.
2240
2241         * Api/WebPage.cpp:
2242         (BlackBerry::WebKit::WebPagePrivate::init):
2243
2244 2012-03-08  Mike Fenton  <mifenton@rim.com>
2245
2246         [BlackBerry] Always use the current focused node when processing focus changes
2247         https://bugs.webkit.org/show_bug.cgi?id=80594
2248
2249         Reviewed by Antonio Gomes.
2250
2251         Update InputHandler focused node handling to strictly use
2252         the currently focused node.  This prevents a handling loop
2253         when JS is modifying the focus and we get a late notification
2254         of a past change from ChromeClientBlackBerry with the previously
2255         unfocused node.
2256
2257         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2258         (WebCore::ChromeClientBlackBerry::focusedNodeChanged):
2259         * WebCoreSupport/EditorClientBlackBerry.cpp:
2260         (WebCore::EditorClientBlackBerry::shouldChangeSelectedRange):
2261         (WebCore::EditorClientBlackBerry::setInputMethodState):
2262         * WebKitSupport/InputHandler.cpp:
2263         (BlackBerry::WebKit::InputHandler::focusedNodeChanged):
2264         * WebKitSupport/InputHandler.h:
2265
2266 2012-03-07  Jacky Jiang  <zhajiang@rim.com>
2267
2268         [BlackBerry] WebKit rendering problem when show/hide VKB
2269         https://bugs.webkit.org/show_bug.cgi?id=80448
2270         RIM PR: 141727
2271
2272         Reviewed by Antonio Gomes.
2273
2274         When setting viewport size, layout happens inside
2275         WebPagePrivate::setDefaultLayoutSize(), in this way, the layout is
2276         outside of the code path of "needsLayout" so that the contents are
2277         not rendered into the backing store. This is a regression of r108718,
2278         switch back to do the layout inside the public API
2279         WebPage::setDefaultLayoutSize().
2280
2281         We haven't upstreamed the manual tests directory yet, therefore,
2282         the new manual test case will be upstreamed later.
2283
2284         * Api/WebPage.cpp:
2285         (BlackBerry::WebKit::WebPagePrivate::setDefaultLayoutSize):
2286         (BlackBerry::WebKit::WebPage::setDefaultLayoutSize):
2287
2288 2012-03-06  Lianghui Chen  <liachen@rim.com>
2289
2290         [BlackBerry] Set correct ResourceRequest target type.
2291         https://bugs.webkit.org/show_bug.cgi?id=80430
2292
2293         Reviewed by Rob Buis.
2294
2295         Removed unused code in dispatchWillSendRequest(). These codes are too
2296         late as the target type has already been referred to when calling
2297         ResourceRequest::initializePlatformRequest().
2298
2299         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2300         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendRequest):
2301
2302 2012-03-06  Lianghui Chen  <liachen@rim.com>
2303
2304         [BlackBerry] Remove unused and unneeded WebPageClient::downloadRequested(NetworkRequest&)
2305         https://bugs.webkit.org/show_bug.cgi?id=80438
2306
2307         Reviewed by Antonio Gomes.
2308
2309         * Api/WebPageClient.h:
2310
2311 2012-03-06  Jakob Petsovits  <jpetsovits@rim.com>
2312
2313         [BlackBerry] Don't suspend accel comp when backgrounding a page.
2314         https://bugs.webkit.org/show_bug.cgi?id=80369
2315         RIM PR: 137609
2316
2317         Reviewed by Adam Treat.
2318
2319         Just because the page is in the background doesn't mean
2320         it's invisible, doesn't mean it won't have to be redrawn
2321         at some point - on rotation, for instance.
2322
2323         We still suspend accelerated compositing on setVisible(false).
2324
2325         * Api/WebPage.cpp:
2326         (BlackBerry::WebKit::WebPage::notifyPageBackground):
2327         (BlackBerry::WebKit::WebPage::notifyPageForeground):
2328
2329 2012-03-06  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2330
2331         [BlackBerry] function rename issue after MediaPlayerPrivateBlackBerry.[cpp\h] upstream
2332         https://bugs.webkit.org/show_bug.cgi?id=80377
2333
2334         Reviewed by Rob Buis.
2335
2336         As some of the function names changed in class MediaPlayerPrivate
2337         with the upstream of MediaPlayerPrivateBlackBerry.[cpp|h], we
2338         should update WebKit/blackberry/Api/WebPage.cpp which uses these
2339         functions accordingly.
2340         Renamed functions in class MediaPlayerPrivate:
2341         windowGet() -> getWindow()
2342         windowPositionGet() -> getWindowPosition()
2343         mmrContextNameGet() -> mmrContextName()
2344
2345         * Api/WebPage.cpp:
2346         (BlackBerry::WebKit::WebPagePrivate::enterFullscreenForNode):
2347
2348 2012-03-05  Eli Fidler  <efidler@rim.com>
2349
2350         The minimum font size WebSetting should actually change the LOGICAL font size in WebCore.
2351         https://bugs.webkit.org/show_bug.cgi?id=80312
2352         RIM PR: 139874
2353
2354         Reviewed by George Staikos.
2355
2356         * Api/WebPage.cpp:
2357         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
2358
2359 2012-03-05  Jakob Petsovits  <jpetsovits@rim.com>
2360
2361         Make accelerated compositing work again with direct rendering.
2362         https://bugs.webkit.org/show_bug.cgi?id=80181
2363         RIM PR: 139110
2364
2365         Reviewed by Antonio Gomes.
2366         Internally reviewed by Arvid Nilsson.
2367
2368         The significant amount of refactoring and optimization work
2369         that has gone into accelerated compositing missed out on
2370         some of the code paths that are being used in direct rendering.
2371
2372         Animations were relying on blitVisibleContents() only (which
2373         is a no-op in direct rendering mode). There were early returns
2374         which are suitable to determine whether screen contents need
2375         to be updated at all; however, when we're already forcing a
2376         re-render then those checks would cause the composition surface
2377         not to appear at all, or avoid drawing new animation frames.
2378
2379         We went through dispatchMessage(), potentially causing
2380         mismatches between rendered (but not yet posted) back content
2381         and layers composited on top of it. As we're rendering onto
2382         the sole target surface (the window) directly and posting
2383         from the same thread, we have to wait for compositing on the
2384         UI thread to finish before posting the window.
2385
2386         In turn, this patch combines both drawSubLayers() and
2387         blendCompositingSurface() calls into one method, reducing
2388         the number of messages to the UI thread within
2389         renderDirectToWindow() to one.
2390
2391         blendCompositingMessage() in renderDirectToScreen() was called
2392         with contents coordinates rather than viewport coordinates.
2393         That caused some of the composited content to be cut off when
2394         the scroll position wasn't (0, 0).
2395
2396         We called copyPreviousContentsToBackSurfaceOfWindow() twice for
2397         one frame, in both renderDirectToWindow() and invalidateWindow().
2398         Only one of those (the latter one) is necessary.
2399
2400         * Api/BackingStore.cpp:
2401         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
2402         (BlackBerry::WebKit::BackingStorePrivate::renderDirectToWindow):
2403         (BlackBerry::WebKit::BackingStorePrivate::drawSubLayers):
2404         (WebKit):
2405         (BlackBerry::WebKit::BackingStorePrivate::drawAndBlendLayersForDirectRendering):
2406         * Api/BackingStore.h:
2407         (WebKit):
2408         * Api/BackingStore_p.h:
2409         (BackingStorePrivate):
2410         (BlackBerry::WebKit::BackingStorePrivate::isDirectRenderingAnimationMessageScheduled):
2411         (BlackBerry::WebKit::BackingStorePrivate::setDirectRenderingAnimationMessageScheduled):
2412         * Api/WebPage_p.h:
2413         (BlackBerry::WebKit::WebPagePrivate::isAcceleratedCompositingActive):
2414         (WebPagePrivate):
2415         * WebKitSupport/WebPageCompositor.cpp:
2416         (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor):
2417         (BlackBerry::WebKit::WebPageCompositor::~WebPageCompositor):
2418         (BlackBerry::WebKit::WebPageCompositor::drawLayers):
2419         (BlackBerry::WebKit::WebPageCompositor::animationTimerFired):
2420         * WebKitSupport/WebPageCompositor.h:
2421         (WebPageCompositor):
2422
2423 2012-03-05  George Staikos  <gstaikos@rim.com>
2424
2425         [BlackBerry] DOMSupport visibleSelectionForRangeInputElement incorrectly dereferences a null range.
2426         https://bugs.webkit.org/show_bug.cgi?id=80274
2427
2428         Reviewed by Antonio Gomes.
2429
2430         A null range can be returned so we should not blindly deref it.
2431         Reviewed Internally by Mike Fenton.
2432
2433         * WebKitSupport/DOMSupport.cpp:
2434         (BlackBerry::WebKit::DOMSupport::visibleSelectionForRangeInputElement):
2435
2436 2012-03-04  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2437
2438         [BlackBerry] upstream CredentialManager and CredentialTransformData implementation
2439         https://bugs.webkit.org/show_bug.cgi?id=80107
2440
2441         Reviewed by Antonio Gomes.
2442
2443         Initial upstream of CredentialManager.[h|cpp] and
2444         CredentialTransformData.[h|cpp].
2445         No new test.
2446
2447         * WebCoreSupport/CredentialManager.cpp: Added.
2448         (WebCore):
2449         (WebCore::CredentialManager::CredentialManager):
2450         (WebCore::CredentialManager::autofillAuthenticationChallenge):
2451         (WebCore::CredentialManager::autofillPasswordForms):
2452         (WebCore::CredentialManager::saveCredentialIfConfirmed):
2453         * WebCoreSupport/CredentialManager.h: Added.
2454         (WebKit):
2455         (WebCore):
2456         (CredentialManager):
2457         * WebCoreSupport/CredentialTransformData.cpp: Added.
2458         (WebCore::CredentialTransformData::CredentialTransformData):
2459         (WebCore):
2460         (WebCore::CredentialTransformData::url):
2461         (WebCore::CredentialTransformData::credential):
2462         (WebCore::CredentialTransformData::setCredential):
2463         (WebCore::CredentialTransformData::findPasswordFormFields):
2464         * WebCoreSupport/CredentialTransformData.h: Added.
2465         (WebCore):
2466         (CredentialTransformData):
2467         (WebCore::CredentialTransformData::isValid):
2468         (WebCore::CredentialTransformData::protectionSpace):
2469
2470 2012-03-04  Antonio Gomes  <agomes@rim.com>
2471
2472         [BlackBerry] Fixed positioned element not correctly positioned after orientation change, when viewport metatag is used
2473         https://bugs.webkit.org/show_bug.cgi?id=80228
2474         PR #138865
2475
2476         Reviewed by George Staikos.
2477
2478         Viewport size changes in two main scenarios:
2479         - orientation changes;
2480         - virtual keyboard pop up/hide.
2481
2482         When we are setting a new viewport size, we need to
2483         update the FixedReportedSize of the mainframe. This size
2484         is used to return innerWidth|Heigth as well as to calculate
2485         the fixed position elements height relative to the RenderView [1].
2486
2487         [1] RenderBox::containingBlockLogicalHeightForPositioned.
2488
2489         When we are rotating, we need to delay setting the new FixedReportedSize
2490         till we layout and are able to figure out the new contents size. At this
2491         time we call setFixedReportedSize, but we do not reposition the fixed elemts
2492         afterwards.
2493
2494         Patch adds a call to FrameView::repaintFixedElementsAfterScrolling, after
2495         setting the new size.
2496
2497         Source/WebKit/blackberry:
2498         * Api/WebPage.cpp:
2499         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
2500
2501 2012-03-02  Mike Fenton  <mifenton@rim.com>
2502
2503         [BlackBerry] Expose WebInspector state to client and clean up WebSettings
2504         https://bugs.webkit.org/show_bug.cgi?id=80177
2505
2506         Reviewed by Antonio Gomes.
2507
2508         Expose the Web Inspector state to WebPage client's and
2509         re-order initialization of WebSettings to be alphabetical
2510         matching their definitions.
2511
2512         * Api/WebPage.cpp:
2513         (BlackBerry::WebKit::WebPage::isWebInspectorEnabled):
2514         * Api/WebPage.h:
2515         * Api/WebSettings.cpp:
2516         (BlackBerry::WebKit::WebSettings::standardSettings):
2517
2518 2012-03-02  Arvid Nilsson  <anilsson@rim.com>
2519
2520         Accelerated compositing: Checkerboard never goes away
2521         https://bugs.webkit.org/show_bug.cgi?id=79020
2522         RIM PR #134164
2523
2524         Reviewed by Adam Treat.
2525
2526         Checkerboard appears in accelerated compositing layers when there's no
2527         texture for (part of) a layer. The layer renderer queues up some render
2528         jobs and schedules a commit to make the WebKit thread process those
2529         jobs. Render jobs performed during commit cause texture upload jobs to
2530         be scheduled on the UI thread. Texture uploads are performed when next
2531         drawing the layers.
2532
2533         Unfortunately, sometimes commit operation happens without a subsequent
2534         call draw the layers.
2535
2536         In order to implement one-shot drawing sync, I added a call to
2537         commitRootLayerIfNeeded() in BackingStore::renderContents(), and
2538         I was lucky that most of the time, renderContents() is followed by
2539         blit(Visible)Contents() which in turn draws the layers.
2540         However, render is not always followed by a blit, for example when
2541         rendering offscreen tiles in BackingStore::renderOnIdle(), and in
2542         direct rendering mode.
2543
2544         Fixed by making sure that every call to commitRootLayerIfNeeded() that
2545         returns true is followed by a call to drawLayersOnCommit(), unless a
2546         blit was requested already.
2547
2548         Also tweak the logic for one-shot drawing sync to make the code in
2549         drawLayersOnCommit() reusable outside of rootLayerCommitTimerFired().
2550
2551         * Api/BackingStore.cpp:
2552         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
2553         (BlackBerry::WebKit::BackingStorePrivate::renderOnTimer):
2554         (BlackBerry::WebKit::BackingStorePrivate::renderOnIdle):
2555         (BlackBerry::WebKit::BackingStorePrivate::willFireTimer):
2556         (BlackBerry::WebKit::BackingStorePrivate::renderDirectToWindow):
2557         (BlackBerry::WebKit::BackingStorePrivate::render):
2558         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
2559         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
2560         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
2561         (WebKit):
2562         (BlackBerry::WebKit::BackingStorePrivate::drawLayersOnCommitIfNeeded):
2563         * Api/BackingStore_p.h:
2564         (BackingStorePrivate):
2565         (BlackBerry::WebKit::BackingStorePrivate::willDrawLayersOnCommit):
2566
2567 2012-03-02  Adam Treat  <atreat@rim.com>
2568
2569         https://bugs.webkit.org/show_bug.cgi?id=80161
2570         PR: 141157
2571
2572         BlackBerryPlatformScreen.h API has been updated.  Reflect those
2573         changes in our usage.
2574
2575         Reviewed by Antonio Gomes.
2576         Internally reviewed by Jakob Petsovits.
2577
2578         * Api/BackingStore.cpp:
2579         (BlackBerry::WebKit::BackingStorePrivate::tileWidth):
2580         (BlackBerry::WebKit::BackingStorePrivate::tileHeight):
2581         * Api/WebPage.cpp:
2582         (BlackBerry::WebKit::WebPagePrivate::init):
2583         (BlackBerry::WebKit::WebPagePrivate::transformedViewportSize):
2584         (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize):
2585         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
2586         (BlackBerry::WebKit::WebPagePrivate::setDefaultLayoutSize):
2587         (BlackBerry::WebKit::WebPagePrivate::defaultMaxLayoutSize):
2588         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2589         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
2590         * WebKitSupport/SurfacePool.cpp:
2591         (BlackBerry::WebKit::createCompositingSurface):
2592
2593 2012-03-02  Konrad Piascik  <kpiascik@rim.com>
2594
2595         [BlackBerry] Set the devicePixelRatio from the results of computeViewportAttributes
2596         https://bugs.webkit.org/show_bug.cgi?id=80160
2597
2598         Reviewed by Antonio Gomes.
2599
2600         Tested by going to layout test fast/viewport/viewport-95.html and viewport-93.html
2601         Previously when executing window.devicePixelRatio these two pages returned 1 now
2602         they report the devicePixelRatio returned by computeViewportAttributes.
2603
2604         * Api/WebPage.cpp:
2605         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
2606
2607 2012-03-02  Jacky Jiang  <zhajiang@rim.com>
2608
2609         Fix a warning in InputHandler::learnText()
2610         https://bugs.webkit.org/show_bug.cgi?id=80049
2611
2612         Reviewed by Antonio Gomes.
2613
2614         Fix a warning of the comparison "textInField.length() <=
2615         MaxLearnTextDataSize" in InputHandler::learnText().
2616
2617         Rubber-stamped internally by Mike Fenton.
2618
2619         * WebKitSupport/InputHandler.cpp:
2620         (BlackBerry::WebKit::InputHandler::learnText):
2621
2622 2012-03-01  Andy Chen  <andchen@rim.com>
2623
2624         [BlackBerry] Implement features for find-in-page
2625         https://bugs.webkit.org/show_bug.cgi?id=79820
2626
2627         Reviewed by Antonio Gomes.
2628
2629         - Make it be able to search text around the whole page instead of single frame.
2630         - Make it be able to start new search from active selection and last active match.
2631
2632         No new tests as this patch doesn't change behavior.
2633
2634         * Api/WebPage.cpp:
2635         (BlackBerry::WebKit::WebPagePrivate::frameUnloaded):
2636         * Api/WebPage_p.h:
2637         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2638         (WebCore::FrameLoaderClientBlackBerry::dispatchWillClose):
2639         (WebCore::FrameLoaderClientBlackBerry::detachedFromParent2):
2640         * WebKitSupport/DOMSupport.cpp:
2641         (BlackBerry::WebKit::DOMSupport::incrementFrame):
2642         * WebKitSupport/DOMSupport.h:
2643         * WebKitSupport/InPageSearchManager.cpp:
2644         (BlackBerry::WebKit::InPageSearchManager::findNextString):
2645         (BlackBerry::WebKit::InPageSearchManager::shouldSearchForText):
2646         (BlackBerry::WebKit::InPageSearchManager::findAndMarkText):
2647         (BlackBerry::WebKit::InPageSearchManager::setMarkerActive):
2648         (BlackBerry::WebKit::InPageSearchManager::frameUnloaded):
2649         * WebKitSupport/InPageSearchManager.h:
2650         * WebKitSupport/InputHandler.cpp:
2651         (BlackBerry::WebKit::InputHandler::frameUnloaded):
2652         * WebKitSupport/InputHandler.h:
2653
2654 2012-03-01  Charles Wei  <charles.wei@torchmobile.com.cn>
2655
2656         [BlackBerry] Web Notification crashes the browser.
2657         https://bugs.webkit.org/show_bug.cgi?id=79897
2658
2659         Reviewed by Antonio Gomes.
2660
2661         The reason of the crash is that it still uses the iterator
2662         after been removed from the container, which invalidates the
2663         iterator. 
2664         We should stop processing after we have found the element
2665         and removed from the container through the iterator.
2666
2667         This patch only fixes the crash issue, but not any notification
2668         functionality issue, which is tracked seperatly.
2669
2670         Test case: http://sandbox.gtaero.net/chrome/notifications.php
2671
2672         * WebCoreSupport/NotificationPresenterImpl.cpp:
2673         (WebKit::NotificationPresenterImpl::onPermission):
2674         (WebKit::NotificationPresenterImpl::notificationClicked):
2675
2676 2012-03-01  Mike Fenton  <mifenton@rim.com>
2677
2678         Autocomplete attribute should apply to textarea's.
2679         https://bugs.webkit.org/show_bug.cgi?id=79929
2680
2681         Reviewed by Antonio Gomes.
2682
2683         Add local static Qualified name for autocorrect attribute.
2684
2685         * WebKitSupport/DOMSupport.cpp:
2686         (BlackBerry::WebKit::DOMSupport::elementSupportsAutocorrect):
2687
2688 2012-02-29  Mike Fenton  <mifenton@rim.com>
2689
2690         Autocomplete attribute should apply to textarea's.
2691         https://bugs.webkit.org/show_bug.cgi?id=79929
2692
2693         Reviewed by Antonio Gomes.
2694
2695         Allow the autocomplete attribute to bubble back to the form setting.
2696
2697         Expand support to include checking autocorrect, autocomplete and
2698         name/id matching to text areas.
2699
2700         Reviewed internally by Nima Ghanavatian and Gen Mak.
2701
2702         * WebKitSupport/DOMSupport.cpp:
2703         (BlackBerry::WebKit::DOMSupport::elementSupportsAutocorrect):
2704         (BlackBerry::WebKit::DOMSupport::elementSupportsAutocomplete):
2705         (BlackBerry::WebKit::DOMSupport::elementAttributeState):
2706         * WebKitSupport/DOMSupport.h:
2707         * WebKitSupport/InputHandler.cpp:
2708         (BlackBerry::WebKit::inputStyle):
2709
2710 2012-02-29  Max Feil  <mfeil@rim.com>
2711
2712         [BlackBerry] Add support for FLAC audio and OGG/Vorbis audio
2713         https://bugs.webkit.org/show_bug.cgi?id=79519
2714
2715         Reviewed by Antonio Gomes.
2716
2717         * Api/WebSettings.cpp:
2718         (BlackBerry::WebKit::mimeTypeAssociationMap):
2719
2720 2012-02-28  Konrad Piascik  <kpiascik@rim.com>
2721
2722         [BlackBerry] Change the API to use std::string
2723         https://bugs.webkit.org/show_bug.cgi?id=79818
2724
2725         Reviewed by Antonio Gomes.
2726
2727         * Api/WebPage.cpp:
2728         (BlackBerry::WebKit::WebPage::dispatchInspectorMessage):
2729         * Api/WebPage.h:
2730
2731 2012-02-28  Jacky Jiang  <zhajiang@rim.com>
2732
2733         [BlackBerry] x86 build fix after cleaning up WebPage.cpp
2734         https://bugs.webkit.org/show_bug.cgi?id=79814
2735
2736         Reviewed by Antonio Gomes.
2737
2738         x86 build fix, keep WebPage::destroyWebPageCompositor() method where it
2739         was which was outside of USE(ACCELERATED_COMPOSITING).
2740
2741         * Api/WebPage.cpp:
2742         (BlackBerry::WebKit::WebPage::destroyWebPageCompositor):
2743         (WebKit):
2744
2745 2012-02-28  Mike Fenton  <mifenton@rim.com>
2746
2747         [BlackBerry] Remove unused focusedNodeChange notifications from the Chrome client.
2748         https://bugs.webkit.org/show_bug.cgi?id=79794
2749
2750         Reviewed by Rob Buis.
2751
2752         Remove unused notification for focusedNodeChanged.
2753
2754         Internally reviewed by Gen Mak.
2755
2756         * Api/WebPageClient.h:
2757         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2758         (WebCore::ChromeClientBlackBerry::focusedNodeChanged):
2759
2760 2012-02-27  Jacky Jiang  <zhajiang@rim.com>
2761
2762         [BlackBerry] Upstream BlackBerry API web page related files
2763         https://bugs.webkit.org/show_bug.cgi?id=74380
2764
2765         Reviewed by Antonio Gomes.
2766
2767         Clean up WebPage.{h, cpp} and WebPage_p.h.
2768         - Remove WebPage::mainFrame() as it is bad to expose WebCore::Frame in
2769           the public API, adapt to the change by adding a new method
2770           WebPagePrivate::core(Const WebPage*) and expose it to
2771           DumpRenderTreeSupport.
2772         - Rename WebPage::spellCheckingEnabled to
2773           WebPage::setSpellCheckingEnabled.
2774         - Remove unused WebPage::focusNodeRect().
2775         - Remove extra blank lines.
2776         - Put WebPage methods and their associated WebPagePrivate methods
2777           together.
2778
2779         No new tests as this patch doesn't change behavior.
2780
2781         * Api/WebPage.cpp:
2782         (BlackBerry::WebKit::WebPage::WebPage):
2783         (WebKit):
2784         (BlackBerry::WebKit::WebPage::~WebPage):
2785         (BlackBerry::WebKit::WebPagePrivate::core):
2786         (BlackBerry::WebKit::WebPage::load):
2787         (BlackBerry::WebKit::WebPage::loadExtended):
2788         (BlackBerry::WebKit::WebPage::loadFile):
2789         (BlackBerry::WebKit::WebPage::download):
2790         (BlackBerry::WebKit::WebPage::loadString):
2791         (BlackBerry::WebKit::WebPage::executeJavaScript):
2792         (BlackBerry::WebKit::WebPage::executeJavaScriptInIsolatedWorld):
2793         (BlackBerry::WebKit::WebPage::stopLoading):
2794         (BlackBerry::WebKit::WebPage::prepareToDestroy):
2795         (BlackBerry::WebKit::WebPage::setScrollPosition):
2796         (BlackBerry::WebKit::WebPage::scrollBy):
2797         (BlackBerry::WebKit::WebPage::notifyInRegionScrollStatusChanged):
2798         (BlackBerry::WebKit::WebPage::zoomToFitScale):
2799         (BlackBerry::WebKit::WebPage::initialScale):
2800         (BlackBerry::WebKit::WebPage::maximumScale):
2801         (BlackBerry::WebKit::WebPage::scrollPosition):
2802         (BlackBerry::WebKit::WebPage::viewportSize):
2803         (BlackBerry::WebKit::WebPage::activeNodeContext):
2804         (BlackBerry::WebKit::WebPage::assignFocus):
2805         (BlackBerry::WebKit::WebPage::blockZoomAnimationFinished):
2806         (BlackBerry::WebKit::WebPage::onInputLocaleChanged):
2807         (BlackBerry::WebKit::WebPage::setScreenOrientation):
2808         (BlackBerry::WebKit::WebPage::applyPendingOrientationIfNeeded):
2809         (BlackBerry::WebKit::WebPage::setViewportSize):
2810         (BlackBerry::WebKit::WebPage::setDefaultLayoutSize):
2811         (BlackBerry::WebKit::WebPage::setScrollOriginPoint):
2812         (BlackBerry::WebKit::WebPage::textEncoding):
2813         (BlackBerry::WebKit::WebPage::forcedTextEncoding):
2814         (BlackBerry::WebKit::WebPage::setForcedTextEncoding):
2815         (BlackBerry::WebKit::WebPage::setSpellCheckingEnabled):
2816         (BlackBerry::WebKit::parentLayer):
2817         (BlackBerry::WebKit::WebPagePrivate::inRegionScrollableAreasForPoint):
2818         (BlackBerry::WebKit::WebPage::destroyWebPageCompositor):
2819         * Api/WebPage.h:
2820         (WebCore):
2821         (WebKit):
2822         * Api/WebPage_p.h:
2823         (WebCore):
2824         (WebKit):
2825         * WebKitSupport/DumpRenderTreeSupport.cpp:
2826         (DumpRenderTreeSupport::corePage):
2827         (DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests):
2828         (DumpRenderTreeSupport::resetGeolocationMock):
2829         (DumpRenderTreeSupport::setMockGeolocationError):
2830         (DumpRenderTreeSupport::setMockGeolocationPermission):
2831         (DumpRenderTreeSupport::setMockGeolocationPosition):
2832         (DumpRenderTreeSupport::scalePageBy):
2833         * WebKitSupport/DumpRenderTreeSupport.h:
2834         (WebCore):
2835         (DumpRenderTreeSupport):
2836
2837 2012-02-27  Mike Fenton  <mifenton@rim.com>
2838
2839         [BlackBerry] Selection handling should be entirely directional
2840         https://bugs.webkit.org/show_bug.cgi?id=79692
2841
2842         Reviewed by Antonio Gomes.
2843
2844         Make all VisibleSelections directional.
2845
2846         * WebKitSupport/SelectionHandler.cpp:
2847         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
2848         (BlackBerry::WebKit::SelectionHandler::setSelection):
2849
2850 2012-02-27  Ed Baker  <edbaker@rim.com>
2851
2852         [BlackBerry] Dragging a selection handle outside of the content bounding box does not update the selection range correctly
2853         https://bugs.webkit.org/show_bug.cgi?id=78608
2854
2855         Ensure that when selection handles leave the content bounding box that
2856         the handle not being dragged remains fixed. Do not apply padding to a
2857         direction that would cause the selection to shrink when performing the
2858         handle direction detection.
2859
2860         Reviewed by Antonio Gomes.
2861
2862         * WebKitSupport/DOMSupport.cpp:
2863         (BlackBerry::WebKit::DOMSupport::convertPointToFrame):
2864         * WebKitSupport/DOMSupport.h:
2865         * WebKitSupport/SelectionHandler.cpp:
2866         (BlackBerry::WebKit::clamp):
2867         (BlackBerry::WebKit::directionalVisiblePositionAtExtentOfBox):
2868         (BlackBerry::WebKit::SelectionHandler::extendSelectionToFieldBoundary):
2869         (BlackBerry::WebKit::SelectionHandler::setSelection):
2870         (BlackBerry::WebKit::SelectionHandler::clipPointToVisibleContainer):
2871         * WebKitSupport/SelectionHandler.h:
2872
2873 2012-02-27  Leo Yang  <leo.yang@torchmobile.com.cn>
2874
2875         [BlackBerry] Upstream accelerated compositing helper class
2876         https://bugs.webkit.org/show_bug.cgi?id=78448
2877
2878         Reviewed by Antonio Gomes.
2879
2880         Initial upstream, no new tests.
2881
2882         * WebKitSupport/FrameLayers.cpp: Added.
2883         * WebKitSupport/FrameLayers.h: Added.
2884
2885 2012-02-26  Hajime Morrita  <morrita@chromium.org>
2886
2887         Move ChromeClient::showContextMenu() to ContextMenuClient
2888         https://bugs.webkit.org/show_bug.cgi?id=79427
2889
2890         Reviewed by Adam Barth.
2891
2892         * WebCoreSupport/ChromeClientBlackBerry.h:
2893         (ChromeClientBlackBerry):
2894
2895 2012-02-24  Mike Fenton  <mifenton@rim.com>
2896
2897         [BlackBerry] Eliminate excessive BlackBerry::Platform use in InputHandler
2898         https://bugs.webkit.org/show_bug.cgi?id=79393
2899
2900         Reviewed by Antonio Gomes.
2901
2902         Cleanup usage of BlackBerry::Platform in InputHandler.
2903
2904         * WebKitSupport/InputHandler.cpp:
2905         (BlackBerry::WebKit::convertStringToWchar):
2906         (BlackBerry::WebKit::convertStringToWcharVector):
2907         (BlackBerry::WebKit::convertSpannableStringToString):
2908         (BlackBerry::WebKit::InputHandler::learnText):
2909         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
2910         (BlackBerry::WebKit::InputHandler::shouldAcceptInputFocus):
2911         (BlackBerry::WebKit::InputHandler::setElementFocused):
2912         (BlackBerry::WebKit::InputHandler::nodeTextChanged):
2913         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
2914         (BlackBerry::WebKit::InputHandler::frameUnloaded):
2915         (BlackBerry::WebKit::InputHandler::selectionChanged):
2916         (BlackBerry::WebKit::InputHandler::setSelection):
2917         (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
2918         (BlackBerry::WebKit::InputHandler::deleteTextRelativeToCursor):
2919         (BlackBerry::WebKit::InputHandler::deleteText):
2920         (BlackBerry::WebKit::InputHandler::spannableTextInRange):
2921         (BlackBerry::WebKit::InputHandler::setComposingRegion):
2922         (BlackBerry::WebKit::InputHandler::finishComposition):
2923         (BlackBerry::WebKit::InputHandler::setText):
2924         (BlackBerry::WebKit::InputHandler::setTextAttributes):
2925         (BlackBerry::WebKit::InputHandler::setRelativeCursorPosition):
2926         (BlackBerry::WebKit::InputHandler::setSpannableTextAndRelativeCursor):
2927         (BlackBerry::WebKit::InputHandler::setComposingText):
2928         (BlackBerry::WebKit::InputHandler::commitText):
2929
2930 2012-02-24  Mike Fenton  <mifenton@rim.com>
2931
2932         [BlackBerry] Eliminate excessive BlackBerry::Platform use in SelectionHandler.
2933         https://bugs.webkit.org/show_bug.cgi?id=79391
2934
2935         Reviewed by Antonio Gomes.
2936
2937         Clean up usage of BlackBerry::Platform in SelectionHandler and
2938         explicitly define what namespace to use for ambiguous objects like
2939         IntRect and IntPoint.
2940
2941         * WebKitSupport/SelectionHandler.cpp:
2942         (BlackBerry::WebKit::SelectionHandler::cancelSelection):
2943         (BlackBerry::WebKit::SelectionHandler::getConsolidatedRegionOfTextQuadsForSelection):
2944         (BlackBerry::WebKit::visiblePositionForPointIgnoringClipping):
2945         (BlackBerry::WebKit::directionOfPointRelativeToRect):
2946         (BlackBerry::WebKit::SelectionHandler::shouldUpdateSelectionOrCaretForPoint):
2947         (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
2948         (BlackBerry::WebKit::directionalVisiblePositionAtExtentOfBox):
2949         (BlackBerry::WebKit::pointIsOutsideOfBoundingBoxInDirection):
2950         (BlackBerry::WebKit::SelectionHandler::extendSelectionToFieldBoundary):
2951         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
2952         (BlackBerry::WebKit::SelectionHandler::clipPointToFocusNode):
2953         (BlackBerry::WebKit::SelectionHandler::setSelection):
2954         (BlackBerry::WebKit::SelectionHandler::selectAtPoint):
2955         (BlackBerry::WebKit::SelectionHandler::selectObject):
2956         (BlackBerry::WebKit::comparePointsToReferencePoint):
2957         (BlackBerry::WebKit::minXMinYCorner):
2958         (BlackBerry::WebKit::maxXMinYCorner):
2959         (BlackBerry::WebKit::minXMaxYCorner):
2960         (BlackBerry::WebKit::maxXMaxYCorner):
2961         (BlackBerry::WebKit::caretLocationForRect):
2962         (BlackBerry::WebKit::caretComparisonPointForRect):
2963         (BlackBerry::WebKit::adjustCaretRects):
2964         (BlackBerry::WebKit::SelectionHandler::clipRegionToVisibleContainer):
2965         (BlackBerry::WebKit::referencePoint):
2966         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
2967         (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
2968         (BlackBerry::WebKit::SelectionHandler::selectionContains):
2969
2970 2012-02-24  Shinya Kawanaka  <shinyak@chromium.org>
2971
2972         SpellCheckRequest needs to know the context where the spellcheck happened.
2973         https://bugs.webkit.org/show_bug.cgi?id=79320
2974
2975         Reviewed by Hajime Morita.
2976
2977         * WebCoreSupport/EditorClientBlackBerry.cpp:
2978         (WebCore::EditorClientBlackBerry::requestCheckingOfString):
2979         * WebCoreSupport/EditorClientBlackBerry.h:
2980         (EditorClientBlackBerry):
2981
2982 2012-02-24  Charles Wei  <charles.wei@torchmobile.com.cn>
2983
2984         [BlackBerry] Anchor mailto: with target set won't launch Messaging application when clicked
2985         https://bugs.webkit.org/show_bug.cgi?id=79318
2986
2987         Need to give the client a chance to decide how to handle the new window request.
2988
2989         Reviewed by Rob Buis.
2990
2991         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2992         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNewWindowAction):
2993
2994 2012-02-23  Mike Fenton  <mifenton@rim.com>
2995
2996         [BlackBerry] Selection handler has compile failure with logs enabled.
2997         https://bugs.webkit.org/show_bug.cgi?id=79392
2998
2999         Reviewed by Antonio Gomes.
3000
3001         Build Fix.  Update log to avoid usage of toString which was removed.
3002
3003         * WebKitSupport/SelectionHandler.cpp:
3004         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
3005
3006 2012-02-19  Antonio Gomes  <agomes@rim.com>
3007
3008         Fat fingers - Add a clearer way to distinguish the node we want (shadow or non-shadow)
3009         https://bugs.webkit.org/show_bug.cgi?id=79256
3010         PR #127814 / MKS_2587410
3011
3012         Reviewed by Rob Buis.
3013
3014         Patch adds a cleaner way for call sites of FatFingersResult to
3015         query for the appropriated target node: shadow or non-shadow DOM nodes.
3016
3017         It also renames FatFingersResults::validNode to ::node, assuming
3018         that "invalid" nodes are not applicable in any context.
3019
3020         * Api/WebPage.cpp:
3021         (BlackBerry::WebKit::WebPagePrivate::clearDocumentData):
3022         (BlackBerry::WebKit::WebPagePrivate::contextNode):
3023         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
3024         * WebKitSupport/FatFingers.h:
3025         (FatFingersResult):
3026         (BlackBerry::WebKit::FatFingersResult::node):
3027         (BlackBerry::WebKit::FatFingersResult::nodeAsElementIfApplicable):
3028         * WebKitSupport/SelectionHandler.cpp:
3029         (BlackBerry::WebKit::SelectionHandler::selectAtPoint):
3030         * WebKitSupport/TouchEventHandler.cpp:
3031         (BlackBerry::WebKit::TouchEventHandler::touchHoldEvent):
3032         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
3033
3034 2012-02-23  Jacky Jiang  <zhajiang@rim.com>
3035
3036         [BlackBerry] Upstream BlackBerry API web page related files
3037         https://bugs.webkit.org/show_bug.cgi?id=74380
3038
3039         Reviewed by Antonio Gomes.
3040
3041         Initial upstream, no new tests.
3042
3043         * Api/WebPage.cpp: Added.
3044         * Api/WebPage.h: Added.
3045         * Api/WebPage_p.h: Added.
3046
3047 2012-02-23  Leo Yang  <leo.yang@torchmobile.com.cn>
3048
3049         [BlackBerry] Remove unused ChromeClientBlackBerry::platformCompositingWindow(), platformWindow() and WebPageClient::compositingWindow()
3050         https://bugs.webkit.org/show_bug.cgi?id=78681
3051
3052         Reviewed by Antonio Gomes.
3053
3054         * Api/WebPageClient.h:
3055         * WebCoreSupport/ChromeClientBlackBerry.cpp:
3056         (WebCore):
3057         * WebCoreSupport/ChromeClientBlackBerry.h:
3058         (ChromeClientBlackBerry):
3059
3060 2012-02-23  Leo Yang  <leo.yang@torchmobile.com.cn>
3061
3062         [BlackBerry] Upstream GLES2Context.{h, cpp}
3063         https://bugs.webkit.org/show_bug.cgi?id=79196
3064
3065         Reviewed by Rob Buis.
3066
3067         Initial upstream, no new tests.
3068
3069         * WebKitSupport/GLES2Context.cpp: Added.
3070         * WebKitSupport/GLES2Context.h: Added.
3071
3072 2012-02-23  Mike Fenton  <mifenton@rim.com>
3073
3074         [BlackBerry] InputHandler requires cleanup of Navigation Mode handling.
3075         https://bugs.webkit.org/show_bug.cgi?id=79366
3076
3077         Reviewed by Rob Buis.
3078
3079         Cleanup InputHandler navigation based code.
3080
3081         1) Remove the concept of NavigationMode and replace it
3082            with simple showKeyboard calls.
3083
3084         2) Remove navigation move events and replace with standard
3085            key events.
3086
3087         3) Standardize function/variable names and remove obsolete
3088            functions.
3089
3090         * Api/WebPageClient.h:
3091         * WebKitSupport/InputHandler.cpp:
3092         (BlackBerry::WebKit::InputHandler::InputHandler):
3093         (BlackBerry::WebKit::InputHandler::nodeFocused):
3094         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
3095         (BlackBerry::WebKit::InputHandler::setElementFocused):
3096         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
3097         (BlackBerry::WebKit::InputHandler::setDelayKeyboardVisibilityChange):
3098         (BlackBerry::WebKit::InputHandler::processPendingKeyboardVisibilityChange):
3099         (BlackBerry::WebKit::InputHandler::notifyClientOfKeyboardVisibilityChange):
3100         * WebKitSupport/InputHandler.h:
3101         (InputHandler):
3102         * WebKitSupport/SelectionHandler.cpp:
3103         (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
3104         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
3105         * WebKitSupport/TouchEventHandler.cpp:
3106         (BlackBerry::WebKit::TouchEventHandler::touchEventCancel):
3107         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
3108
3109 2012-02-21  Ryosuke Niwa  <rniwa@webkit.org>
3110
3111         Remove the remaining uses of CSSStyleDeclaration in Editor
3112         https://bugs.webkit.org/show_bug.cgi?id=78939
3113
3114         Reviewed by Enrica Casucci.
3115
3116         * WebCoreSupport/EditorClientBlackBerry.cpp:
3117         (WebCore::EditorClientBlackBerry::shouldApplyStyle):
3118         * WebCoreSupport/EditorClientBlackBerry.h:
3119         (EditorClientBlackBerry):
3120
3121 2012-02-22  Mike Fenton  <mifenton@rim.com>
3122
3123         [BlackBerry] InputHandler has signed vs unsigned comparison.
3124         https://bugs.webkit.org/show_bug.cgi?id=79261
3125
3126         Fix warning by casting the unsigned int to an int.
3127
3128         Reviewed by Rob Buis.
3129
3130         * WebKitSupport/InputHandler.cpp:
3131         (BlackBerry::WebKit::InputHandler::rectForCaret):
3132
3133 2012-02-22  Ryosuke Niwa  <rniwa@webkit.org>
3134
3135         Remove the remaining uses of CSSStyleDeclaration in Editor
3136         https://bugs.webkit.org/show_bug.cgi?id=78939
3137
3138         Reviewed by Enrica Casucci.
3139
3140         * WebCoreSupport/EditorClientBlackBerry.cpp:
3141         (WebCore::EditorClientBlackBerry::shouldApplyStyle):
3142         * WebCoreSupport/EditorClientBlackBerry.h:
3143         (EditorClientBlackBerry):
3144
3145 2012-02-18  Antonio Gomes  <agomes@rim.com>
3146
3147         Fat fingers - cache the first rect-based hit test so we do not need to do it again
3148         https://bugs.webkit.org/show_bug.cgi?id=79115
3149
3150         Reviewed by Adam Treat.
3151
3152         Our FatFingers implementation runs currently in two phases:
3153         the first checks for the elements intrinsically clickable;
3154         the second checks for elements made clickable by the page
3155         (for example, a div with a onclick event listener attached to it).
3156         For each phase, we perform a rect hittest, which is not needed since
3157         the result of each is the same.
3158
3159         Patch introduces a caching mechanism so we avoid on rect hittest:
3160         when the first phase runs, it caches each nodeset per document in
3161         a hashmap. This second phase works with the cached results.
3162
3163         No behavioral change, but performance is better since we
3164         avoid one (possibly expensive) rect hittest.
3165
3166         I measured the performance gain on https://www.kvd.se/, and we
3167         save up to 0.04 seconds, by caching and re-using the results.
3168
3169         * WebKitSupport/FatFingers.cpp:
3170         (BlackBerry::WebKit::dumpHitTestResult):
3171         (BlackBerry::WebKit::FatFingers::findBestPoint):
3172         (BlackBerry::WebKit::FatFingers::findIntersectingRegions):
3173         (BlackBerry::WebKit::FatFingers::cachingStrategy):
3174         (WebKit):
3175         (BlackBerry::WebKit::FatFingers::getNodesFromRect):
3176         * WebKitSupport/FatFingers.h:
3177
3178 2012-02-20  Antonio Gomes  <agomes@rim.com>
3179
3180         All default video/audio control elements should be rect-hit testable (Part II)
3181         PR #139518 / MKS_3005538
3182
3183         Reviewed by George Staikos.
3184
3185         Add HTMLInputElement::isMediaControlElement as a criteria
3186         to consider a element as clickable.
3187
3188         Note that is should be only used while in the "ClickableByDefault"
3189         phase of FatFingers.
3190
3191         * WebKitSupport/FatFingers.cpp:
3192         (BlackBerry::WebKit::FatFingers::isElementClickable):
3193
3194 2012-02-16  Antonio Gomes  <agomes@rim.com>
3195
3196         [BlackBerry] Implemented a way to defer client navigation change client notifications
3197         https://bugs.webkit.org/show_bug.cgi?id=78848
3198
3199         Reviewed by Rob Buis.
3200
3201         Currently we postpone touch_down till touch_up if user touches
3202         the screen and an input field has the WebKit focus. This is done
3203         so we can scroll the page without hidding the vkb needlessly.
3204
3205         However, it breaks the conversion of touch to mouse events
3206         if an input field has the focus in the following scenario:
3207         an <input type=text> is focused and an user grab and-drag
3208         a <input type=range> knob/slide. It does not work until the
3209         user unfocuses the currently focused edit field.
3210
3211         Patch introduces a way to unfocus a currently focused input field,
3212         without requesting the client to show or hide the virtual keyboard
3213         right way. Instead it gets a delayed notification of the vkb mode requested
3214         at either touch_released/mouse_up or touch_cancel time.
3215
3216         For now, due to content side issues with major web sites,
3217         only delay navigation mode notification changes if we are not dealing with
3218         input modes.
3219
3220         * WebKitSupport/InputHandler.cpp:
3221         (BlackBerry::WebKit::InputHandler::InputHandler):
3222         (BlackBerry::WebKit::InputHandler::nodeFocused):
3223         (BlackBerry::WebKit::InputHandler::setElementFocused):
3224         (BlackBerry::WebKit::InputHandler::setNavigationMode):
3225         (WebKit):
3226         (BlackBerry::WebKit::InputHandler::setDelayClientNotificationOfNavigationModeChange):
3227         (BlackBerry::WebKit::InputHandler::processPendingClientNavigationModeChangeNotification):
3228         (BlackBerry::WebKit::InputHandler::notifyClientOfNavigationModeChange):
3229         (BlackBerry::WebKit::InputHandler::willOpenPopupForNode):
3230         (BlackBerry::WebKit::InputHandler::setPopupListIndexes):
3231         (BlackBerry::WebKit::InputHandler::spannableTextInRange):
3232         (BlackBerry::WebKit::InputHandler::removeComposedText):
3233         (BlackBerry::WebKit::InputHandler::firstSpanInString):
3234         (BlackBerry::WebKit::InputHandler::setText):
3235         (BlackBerry::WebKit::InputHandler::setRelativeCursorPosition):
3236         * WebKitSupport/InputHandler.h:
3237         (InputHandler):
3238
3239 2012-02-16  Antonio Gomes  <agomes@rim.com>
3240
3241         Crash @WebPagePrivate::enqueueRenderingOfClippedContentOfScrollableNodeAfterInRegionScrolling MKS_2986818
3242         https://bugs.webkit.org/show_bug.cgi?id=78845
3243
3244         Reviewed by Rob Buis.
3245
3246         We were trying to operate on a cached Node when its page/frame/document
3247         were gone to PageCache already. To avoid such problems, lets clean up
3248         any document data we have cached when the Frame goes into the cache.
3249
3250         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3251         (WebCore::FrameLoaderClientBlackBerry::didSaveToPageCache):
3252         (WebCore):
3253         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
3254         (FrameLoaderClientBlackBerry):
3255
3256 2012-02-16  Antonio Gomes  <agomes@rim.com>
3257
3258         [BlackBerry] Upstream touch handling related classes
3259         https://bugs.webkit.org/show_bug.cgi?id=78509
3260
3261         Reviewed by Adam Treat and Rob Buis.
3262
3263         FatFingers is the class responsible to the whole touch
3264         accuracy of the BlackBerry port. Initial upstream.
3265
3266         * WebKitSupport/FatFingers.cpp: Added.
3267         (WebKit):
3268         (BlackBerry::WebKit::FatFingers::fingerRectForPoint):
3269         (BlackBerry::WebKit::hasMousePressListener):
3270         (BlackBerry::WebKit::FatFingers::isElementClickable):
3271         (BlackBerry::WebKit::isFieldWithText):
3272         (BlackBerry::WebKit::distanceBetweenPoints):
3273         (BlackBerry::WebKit::compareDistanceBetweenPoints):
3274         (BlackBerry::WebKit::isValidFrameOwner):
3275         (BlackBerry::WebKit::FatFingers::FatFingers):
3276         (BlackBerry::WebKit::FatFingers::~FatFingers):
3277         (BlackBerry::WebKit::FatFingers::findBestPoint):
3278         (BlackBerry::WebKit::FatFingers::checkFingerIntersection):
3279         (BlackBerry::WebKit::FatFingers::findIntersectingRegions):
3280         (BlackBerry::WebKit::FatFingers::checkForClickableElement):
3281         (BlackBerry::WebKit::FatFingers::checkForText):
3282         (BlackBerry::WebKit::FatFingers::getPaddings):
3283         (BlackBerry::WebKit::FatFingers::nodesFromRect):
3284         (BlackBerry::WebKit::FatFingers::getRelevantInfoFromPoint):
3285         (BlackBerry::WebKit::FatFingers::setSuccessfulFatFingersResult):
3286         * WebKitSupport/FatFingers.h: Added.
3287         (WebCore):
3288         (WebKit):
3289         (FatFingersResult):
3290         (BlackBerry::WebKit::FatFingersResult::FatFingersResult):
3291         (BlackBerry::WebKit::FatFingersResult::reset):
3292         (BlackBerry::WebKit::FatFingersResult::originPosition):
3293         (BlackBerry::WebKit::FatFingersResult::adjustedPosition):
3294         (BlackBerry::WebKit::FatFingersResult::positionWasAdjusted):
3295         (BlackBerry::WebKit::FatFingersResult::isTextInput):
3296         (BlackBerry::WebKit::FatFingersResult::isValid):
3297         (BlackBerry::WebKit::FatFingersResult::validNode):
3298         (BlackBerry::WebKit::FatFingersResult::nodeAsElementIfApplicable):
3299         (FatFingers):
3300
3301 2012-02-16  Antonio Gomes  <agomes@rim.com>
3302
3303         [BlackBerry] Upstream touch handling related classes
3304         https://bugs.webkit.org/show_bug.cgi?id=78509
3305
3306         Reviewed by Adam Treat.
3307
3308         Initial upstream of the Blackberry specific single touch event
3309         handler class.
3310
3311         * blackberry/WebKitSupport/TouchEventHandler.cpp: Added.
3312         (WebKit):
3313         (BlackBerry::WebKit::hasMouseMoveListener):
3314         (BlackBerry::WebKit::hasTouchListener):
3315         (BlackBerry::WebKit::elementExpectsMouseEvents):
3316         (BlackBerry::WebKit::shouldConvertTouchToMouse):
3317         (BlackBerry::WebKit::TouchEventHandler::TouchEventHandler):
3318         (BlackBerry::WebKit::TouchEventHandler::~TouchEventHandler):
3319         (BlackBerry::WebKit::TouchEventHandler::shouldSuppressMouseDownOnTouchDown):
3320         [BlackBerry] Upstream touch handling related classes
3321         https://bugs.webkit.org/show_bug.cgi?id=78509
3322
3323         Reviewed by Rob Buis.
3324
3325         InRegionScrollableArea specializes the BlackBerry specific ScrollViewBase,
3326         working as a read-only wrapper object for a scrollable areas in the page.
3327         It is used in our client side to control in-region scrolling (scrollable boxes,
3328         inner frames, etc).
3329
3330         Initial upstream.
3331
3332         * WebKitSupport/InRegionScrollableArea.cpp: Added.
3333         (WebKit):
3334         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
3335         (BlackBerry::WebKit::InRegionScrollableArea::calculateMinimumScrollPosition):
3336         (BlackBerry::WebKit::InRegionScrollableArea::calculateMaximumScrollPosition):
3337         (BlackBerry::WebKit::InRegionScrollableArea::layer):
3338         (BlackBerry):
3339         * WebKitSupport/InRegionScrollableArea.h: Added.
3340         (WebCore):
3341         (WebKit):
3342         (InRegionScrollableArea):
3343
3344 2012-02-16  Antonio Gomes  <agomes@rim.com>
3345
3346         (BlackBerry::WebKit::TouchEventHandler::touchEventCancel):
3347         (BlackBerry::WebKit::TouchEventHandler::touchHoldEvent):
3348         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
3349         (BlackBerry::WebKit::TouchEventHandler::spellCheck):
3350         (BlackBerry::WebKit::TouchEventHandler::handleFatFingerPressed):
3351         (BlackBerry::WebKit::elementForTapHighlight):
3352         (BlackBerry::WebKit::TouchEventHandler::drawTapHighlight):
3353         * blackberry/WebKitSupport/TouchEventHandler.h: Added.
3354         (WebCore):
3355         (WebKit):
3356         (TouchEventHandler):
3357         (BlackBerry::WebKit::TouchEventHandler::lastFatFingersResult):
3358         (BlackBerry::WebKit::TouchEventHandler::resetLastFatFingersResult):
3359