[BlackBerry] Tie up the scrolling machinery to the graphics tree when applicable...
[WebKit-https.git] / Source / WebKit / blackberry / ChangeLog
1 2012-08-08  Antonio Gomes  <agomes@rim.com>
2
3         [BlackBerry] Tie up the scrolling machinery to the graphics tree when applicable for in-region scroll
4         https://bugs.webkit.org/show_bug.cgi?id=93482
5         PR #187672
6         Make InRegionScroller a simple public webkit/ API
7         PR #188677
8
9         Reviewed by Rob Buis.
10
11         In order to prepare InRegionScroller to be a public API
12         in webkit/, the patch:
13
14         1) Renamed the current InRegionScroller class to InRegionScrollerPrivate;
15         2) Moved InRegionScroller.cpp|h from WebKitSupport/ to Api/;
16         3) Renamed InRegionScroller.h to InRegionScroller_p.h;
17         4) Added a new public class implementation to InRegionScroller.h;
18         5) Adapted WebPage and TouchEventHandler classes to use InRegionScroller::d directly.
19
20         The most important API here is '::compositedSetScrollPosition'
21
22         It is a  UI/Compositing thread method only and sets the associated LayerCompositingThread
23         (camouflaged as a unsigned) for each created InRegionScrollableArea that supports
24         composited scrolling.
25
26         The way ::compositedSetScrollPosition "scrolls" a layer is by setting the boundsOrigin
27         property to the LayerCompositingThread's 'override' property in the UI/Compositing thread.
28
29         * Api/InRegionScroller.cpp: Renamed from Source/WebKit/blackberry/WebKitSupport/InRegionScroller.cpp.
30         (WebKit):
31         (BlackBerry::WebKit::InRegionScroller::InRegionScroller):
32         (BlackBerry::WebKit::InRegionScroller::~InRegionScroller):
33         (BlackBerry::WebKit::InRegionScroller::compositedSetScrollPosition):
34         (BlackBerry::WebKit::InRegionScrollerPrivate::InRegionScrollerPrivate):
35         (BlackBerry::WebKit::InRegionScrollerPrivate::setNode):
36         (BlackBerry::WebKit::InRegionScrollerPrivate::node):
37         (BlackBerry::WebKit::InRegionScrollerPrivate::reset):
38         (BlackBerry::WebKit::InRegionScrollerPrivate::hasNode):
39         (BlackBerry::WebKit::InRegionScrollerPrivate::canScroll):
40         (BlackBerry::WebKit::InRegionScrollerPrivate::compositedSetScrollPosition):
41         (BlackBerry::WebKit::InRegionScrollerPrivate::scrollBy):
42         (BlackBerry::WebKit::InRegionScrollerPrivate::inRegionScrollableAreasForPoint):
43         (BlackBerry::WebKit::InRegionScrollerPrivate::scrollNodeRecursively):
44         (BlackBerry::WebKit::InRegionScrollerPrivate::scrollRenderer):
45         (BlackBerry::WebKit::InRegionScrollerPrivate::adjustScrollDelta):
46         (BlackBerry::WebKit::canScrollInnerFrame):
47         (BlackBerry::WebKit::canScrollRenderBox):
48         (BlackBerry::WebKit::parentLayer):
49         (BlackBerry::WebKit::enclosingLayerNode):
50         (BlackBerry::WebKit::isNonRenderViewFixedPositionedContainer):
51         (BlackBerry::WebKit::pushBackInRegionScrollable):
52         * Api/InRegionScroller.h: Copied from Source/WebKit/blackberry/WebKitSupport/InRegionScroller.h.
53         (WebKit):
54         (InRegionScroller):
55         * Api/InRegionScroller_p.h: Renamed from Source/WebKit/blackberry/WebKitSupport/InRegionScroller.h.
56         (WebCore):
57         (WebKit):
58         (InRegionScrollerPrivate):
59         * Api/WebPage.cpp:
60         (BlackBerry::WebKit::WebPagePrivate::scrollBy):
61         (BlackBerry::WebKit::WebPagePrivate::notifyInRegionScrollStatusChanged):
62         (BlackBerry::WebKit::WebPagePrivate::clearDocumentData):
63         (BlackBerry::WebKit::WebPagePrivate::setScrollOriginPoint):
64         (BlackBerry::WebKit::WebPage::inRegionScroller):
65         (WebKit):
66         * Api/WebPage.h:
67         (WebKit):
68         * WebKitSupport/InRegionScrollableArea.cpp:
69         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
70         * WebKitSupport/TouchEventHandler.cpp:
71         (BlackBerry::WebKit::TouchEventHandler::drawTapHighlight):
72
73 2012-08-08  Antonio Gomes  <agomes@rim.com>
74
75         [BlackBerry] Make WebOverlayPrivate::scheduleCompositingRun a WebPagePrivate method.
76         https://bugs.webkit.org/show_bug.cgi?id=93480
77         PR #188682
78
79         Reviewed by Rob Buis.
80
81         ... this way it can be used by others.
82
83         No behavioural change. Another preparation patch.
84
85         * Api/WebOverlay.cpp:
86         (BlackBerry::WebKit::WebOverlayPrivate::scheduleCompositingRun):
87         * Api/WebPage.cpp:
88         (WebKit):
89         (BlackBerry::WebKit::WebPagePrivate::scheduleCompositingRun):
90         * Api/WebPage_p.h:
91         (WebPagePrivate):
92
93 2012-08-08  Sheriff Bot  <webkit.review.bot@gmail.com>
94
95         Unreviewed, rolling out r124887.
96         http://trac.webkit.org/changeset/124887
97         https://bugs.webkit.org/show_bug.cgi?id=93504
98
99         Dependent API being removed. (Requested by mfenton on
100         #webkit).
101
102         * Api/WebPageClient.h:
103         * WebKitSupport/InputHandler.cpp:
104         * WebKitSupport/InputHandler.h:
105         (InputHandler):
106         * WebKitSupport/TouchEventHandler.cpp:
107         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
108         (BlackBerry::WebKit::TouchEventHandler::spellCheck):
109         (WebKit):
110         * WebKitSupport/TouchEventHandler.h:
111         (TouchEventHandler):
112
113 2012-08-08  Ed Baker  <edbaker@rim.com>
114
115         [BlackBerry] Add relayout after updating fixed reported size
116         https://bugs.webkit.org/show_bug.cgi?id=93116
117         PR #160059
118         
119         Reviewed by Antonio Gomes.
120         
121         Reviewed internally by Antonio Gomes.
122
123         On an orientation change and after fixed reported size is
124         updated perform a layout and update the fixed elements after
125         scrolling. This will recalculate the height and width of
126         fixed position elements using percentage values with the
127         new fixed reported size. Otherwise using the old fixed reported
128         size in the new orientation overflowing or clipping could occur.
129         
130         * Api/WebPage.cpp:
131         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
132
133 2012-08-07  Charles Wei  <charles.wei@torchmobile.com.cn>
134
135         [BlackBerry] always set PolicyAction to PolicyIgnore if the chrome returns false for acceptNavigationRequest
136         https://bugs.webkit.org/show_bug.cgi?id=93251
137
138         Reviewed by George Staikos.
139
140         In acceptNavigationRequest(), webkit will ask if the chrome will accept the navigation request.
141         We will take this chance to see if the request is an internal-webkit protocol, otherwise,
142         we will try to launch an external application to handle the request, and ask webkit to ignore
143         the request by returning false in acceptNavigationRequest().
144
145         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
146         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction):
147
148 2012-08-07  Konrad Piascik  <kpiascik@rim.com>
149
150         [BlackBerry] Change how devicePixelRatio is set.
151         https://bugs.webkit.org/show_bug.cgi?id=93385
152
153         Reviewed by Antonio Gomes.
154
155         Change devicePixelRatio to be set immediately after the page is created based
156         on the WebSetting.
157
158         * Api/WebPage.cpp:
159         (BlackBerry::WebKit::WebPagePrivate::init):
160         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
161
162 2012-08-07  Antonio Gomes  <agomes@rim.com>
163
164         [BlackBerry] [FullScreen] No need to scroll 'x' to 0 before entering fullscreen
165         https://bugs.webkit.org/show_bug.cgi?id=91750
166         PR #178293
167
168         Reviewed by Rob Buis.
169
170         We are not adjusting the 'left' CSS property of the fullscreen wrapper
171         properly, so no need to scroll 'x' to 0 anymore.
172
173         Internally reviewed by Jacky Jiang.
174
175         * Api/WebPage.cpp:
176         (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
177
178 2012-08-07  Antonio Gomes  <agomes@rim.com>
179
180         [BlackBerry][FullScreen] Remove the set/reset of touch modes code when entering/leaving fullscreen
181         https://bugs.webkit.org/show_bug.cgi?id=92520
182         PR #184511
183
184         Reviewed by Yong Li.
185         Internally reviewed by Gen Mak.
186
187         Remove touch mode set/reset when entering/leaving fullscreen
188         for media elements through the new FULLSCREEN_API code path.
189         The client now handles it.
190
191         * Api/WebPage.cpp:
192         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
193         (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
194         (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
195         * Api/WebPage_p.h:
196         (WebPagePrivate):
197
198 2012-08-07  Konrad Piascik  <kpiascik@rim.com>
199
200         [BlackBerry] Add missing include in FrameLoaderClienBlackBerry after Base64 moved.
201         https://bugs.webkit.org/show_bug.cgi?id=93383
202
203         Reviewed by Rob Buis.
204
205         Base64 moved from platform/text to wtf/text, need to add mssing
206         include.
207
208         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
209
210 2012-08-07  Konrad Piascik  <kpiascik@rim.com>
211
212         [BlackBerry] InspectorOverlay class duplicated in WebCore
213         https://bugs.webkit.org/show_bug.cgi?id=93124
214
215         Reviewed by Rob Buis.
216
217         Moved files to better align with namespace names.
218
219         * WebKitSupport/InspectorOverlay.cpp: Renamed from Source/WebKit/blackberry/WebCoreSupport/InspectorOverlay.cpp.
220         (WebKit):
221         (BlackBerry::WebKit::InspectorOverlay::create):
222         (BlackBerry::WebKit::InspectorOverlay::InspectorOverlay):
223         (BlackBerry::WebKit::InspectorOverlay::notifySyncRequired):
224         (BlackBerry::WebKit::InspectorOverlay::paintContents):
225         (BlackBerry::WebKit::InspectorOverlay::showDebugBorders):
226         (BlackBerry::WebKit::InspectorOverlay::showRepaintCounter):
227         (BlackBerry::WebKit::InspectorOverlay::~InspectorOverlay):
228         (BlackBerry::WebKit::InspectorOverlay::clear):
229         (BlackBerry::WebKit::InspectorOverlay::update):
230         * WebKitSupport/InspectorOverlay.h: Renamed from Source/WebKit/blackberry/WebCoreSupport/InspectorOverlay.h.
231         (WebCore):
232         (WebKit):
233         (InspectorOverlay):
234         (InspectorOverlayClient):
235         (BlackBerry::WebKit::InspectorOverlay::setClient):
236         (BlackBerry::WebKit::InspectorOverlay::notifyAnimationStarted):
237
238 2012-08-07  Mike Fenton  <mifenton@rim.com>
239
240         [BlackBerry] Update API for spell checking suggestions.
241         https://bugs.webkit.org/show_bug.cgi?id=93356
242
243         Reviewed by Antonio Gomes.
244
245         PR 163283.
246
247         Add connections for updated spell checking options request API.  Move
248         all this logic into InputHandler.
249
250         Reviewed Internally by Gen Mak and Nima Ghanavatian.
251
252         * Api/WebPageClient.h:
253         * WebKitSupport/InputHandler.cpp:
254         (BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint):
255         (WebKit):
256         (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions):
257         * WebKitSupport/InputHandler.h:
258         (Platform):
259         (InputHandler):
260         * WebKitSupport/TouchEventHandler.cpp:
261         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
262         * WebKitSupport/TouchEventHandler.h:
263         (TouchEventHandler):
264
265 2012-08-06  Charles Wei  <charles.wei@torchmobile.com.cn>
266
267         [BlackBerry] About: shows PAGE_CACHE not enabled.
268         https://bugs.webkit.org/show_bug.cgi?id=93216
269
270         Reviewed by Antonio Gomes.
271
272         Page cache is a feature that can be enabled/disabled at runtime, there's no
273         MACRO named PAGE_CACHE to control the feature.
274
275         * WebCoreSupport/AboutDataEnableFeatures.in:
276
277 2012-08-03  Yong Li  <yoli@rim.com>
278
279         [BlackBerry] FrameLoaderClient::restoreViewState() shouldn't trigger painting
280         https://bugs.webkit.org/show_bug.cgi?id=93141
281
282         Reviewed by Rob Buis.
283
284         PR# 172041.
285         It is not always safe to render the page at this point. So we post a message
286         instead.
287
288         * Api/WebPage.cpp:
289         (WebKit):
290         (BlackBerry::WebKit::WebPagePrivate::restoreHistoryViewState):
291         * Api/WebPage_p.h:
292         (WebPagePrivate):
293         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
294         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
295
296 2012-08-03  Konrad Piascik  <kpiascik@rim.com>
297
298         [BlackBerry] InspectorOverlay class duplicated in WebCore
299         https://bugs.webkit.org/show_bug.cgi?id=93124
300
301         Reviewed by Rob Buis.
302
303         Changed namespace of InspectorOverlay from WebCore to
304         BlackBerry::WebKit
305
306         * Api/WebPage.cpp:
307         (WebKit):
308         (BlackBerry::WebKit::WebPagePrivate::setInspectorOverlayClient):
309         * Api/WebPage_p.h:
310         (WebPagePrivate):
311         * WebCoreSupport/InspectorClientBlackBerry.h:
312         * WebCoreSupport/InspectorOverlay.cpp:
313         (BlackBerry::WebKit::InspectorOverlay::create):
314         (BlackBerry::WebKit::InspectorOverlay::InspectorOverlay):
315         (BlackBerry::WebKit::InspectorOverlay::notifySyncRequired):
316         (BlackBerry::WebKit::InspectorOverlay::paintContents):
317         (BlackBerry::WebKit::InspectorOverlay::showDebugBorders):
318         (BlackBerry::WebKit::InspectorOverlay::showRepaintCounter):
319         (BlackBerry::WebKit::InspectorOverlay::contentsVisible):
320         (BlackBerry::WebKit::InspectorOverlay::update):
321         * WebCoreSupport/InspectorOverlay.h:
322         (WebKit):
323         (InspectorOverlayClient):
324         (InspectorOverlay):
325         (BlackBerry::WebKit::InspectorOverlay::notifyAnimationStarted):
326
327 2012-08-03  Arvid Nilsson  <anilsson@rim.com>
328
329         [BlackBerry] Overlays display checkerboard that doesn't resolve
330         https://bugs.webkit.org/show_bug.cgi?id=93099
331
332         Reviewed by Antonio Gomes.
333
334         The WebKit-thread overlays, like tap highlight, inspector highlight and
335         selection are all part of a separate graphics layer tree rooted in
336         WebPagePrivate::m_overlayLayer.
337
338         When LayerRenderer needs to schedule a commit to reactively render
339         tiles and resolve checkerboard, it does so through the root layer.
340         Since the overlay layer root didn't have a GraphicsLayerClient, there
341         was no implementation of GraphicsLayerClient::notifySyncRequired() to
342         call, and a commit was never scheduled, thus checkerboard never
343         resolved.
344
345         Fixed by adding a fallback implementation of GraphicsLayerClient in
346         WebPagePrivate and hooking up the overlay root to it. Also, this
347         implementation can be shared by the various overlays to avoide code
348         duplication, specifically to implement notifySyncRequired(),
349         showDebugBorders() and showRepaintCounter() only once.
350
351         Fixing this revealed a bug where the web page would get stuck in an
352         endless sequence of commits. It turned out that
353         WebPagePrivate::updateDelegatedOverlays() was called right in the
354         middle of the commit operation, after performing the webkit thread part
355         of the commit operation but before we continued on the compositing
356         thread. Since updateDelegatedOverlays() typically mutates layers, this
357         is very bad (layers should not be mutated mid-commit). The mutations
358         also cause a new commit to scheduled from within the current, which
359         results in an endless sequence of commits.
360
361         Fixed this latter bug by moving the updateDelegatedOverlays() call to
362         the beginning of the method where it can cause no harm. This is before
363         we mark the web page as no longer needing commit, so even if the
364         implementation flips the "needs commit" bit, we will immediately flip
365         it back and proceed with commit as usual.
366
367         PR 187458, 184377
368
369         * Api/WebPage.cpp:
370         (BlackBerry::WebKit::WebPagePrivate::overlayLayer):
371         (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
372         (WebKit):
373         (BlackBerry::WebKit::WebPagePrivate::notifySyncRequired):
374         (BlackBerry::WebKit::WebPagePrivate::showDebugBorders):
375         (BlackBerry::WebKit::WebPagePrivate::showRepaintCounter):
376         * Api/WebPage_p.h:
377         (WebPagePrivate):
378         (BlackBerry::WebKit::WebPagePrivate::notifyAnimationStarted):
379         (BlackBerry::WebKit::WebPagePrivate::paintContents):
380         * WebCoreSupport/InspectorOverlay.cpp:
381         (WebCore::InspectorOverlay::notifySyncRequired):
382         (WebCore::InspectorOverlay::showDebugBorders):
383         (WebCore::InspectorOverlay::showRepaintCounter):
384         * WebKitSupport/DefaultTapHighlight.cpp:
385         (BlackBerry::WebKit::DefaultTapHighlight::notifySyncRequired):
386         (BlackBerry::WebKit::DefaultTapHighlight::showDebugBorders):
387         (WebKit):
388         (BlackBerry::WebKit::DefaultTapHighlight::showRepaintCounter):
389         * WebKitSupport/DefaultTapHighlight.h:
390         (DefaultTapHighlight):
391         * WebKitSupport/SelectionOverlay.cpp:
392         (BlackBerry::WebKit::SelectionOverlay::notifySyncRequired):
393         (BlackBerry::WebKit::SelectionOverlay::showDebugBorders):
394         (WebKit):
395         (BlackBerry::WebKit::SelectionOverlay::showRepaintCounter):
396         * WebKitSupport/SelectionOverlay.h:
397         (SelectionOverlay):
398
399 2012-08-02  Arvid Nilsson  <anilsson@rim.com>
400
401         [BlackBerry] Add default implementation of GraphicsLayerClient::contentsVisible()
402         https://bugs.webkit.org/show_bug.cgi?id=93036
403
404         Reviewed by George Staikos.
405
406         Remove implementation of GraphicsLayerClient::contentsVisible() now
407         that it has a default implementation.
408
409         This also fixes a bug where memory usage for the inspector highlight
410         overlay would balloon because it returned true from contentsVisible()
411         which would cause the LayerTiler to populate all tiles. The default
412         implementation returns false instead.
413
414         PR 187458, 184377
415
416         * WebCoreSupport/InspectorOverlay.cpp:
417         (WebCore::InspectorOverlay::showRepaintCounter):
418         * WebCoreSupport/InspectorOverlay.h:
419         (InspectorOverlay):
420         * WebKitSupport/DefaultTapHighlight.h:
421         * WebKitSupport/SelectionOverlay.h:
422
423 2012-08-02  Antonio Gomes  <agomes@rim.com>
424
425         Unreviewed debug build fix (bug 92889)
426
427         * WebKitSupport/InRegionScroller.cpp:
428         (BlackBerry::WebKit::pushBackInRegionScrollable):
429
430 2012-08-02  Leo Yang  <leoyang@rim.com>
431
432         [BlackBerry] Rounding error of destination rect of checkerboard
433         https://bugs.webkit.org/show_bug.cgi?id=93012
434
435         Reviewed by Rob Buis.
436
437         Reviewed internally by Jakob Petsovits.
438
439         Intersect with the destination rectangle to eliminate the rounding error.
440
441         * Api/BackingStore.cpp:
442         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
443
444 2012-08-01  Antonio Gomes  <agomes@rim.com>
445
446         [BlackBerry] Implement InRegionScroller class as a in-region scroll controller
447         https://bugs.webkit.org/show_bug.cgi?id=92889
448         PR #186587
449
450         Reviewed by Yong Li.
451
452         Internally reviewed by Arvid Nilsson.
453
454         Moved all in-region scrolling code out of WebPagePrivate to the just
455         created InRegionScroller class. This class aims to:
456
457         1) Centralize all in-region scroll code and clean up WebPagePrivate as a consequence.
458         2) Be the bases to add UI/Compositing thread driven scrolls to in-region.
459
460         The patch does not change any functionallity change.
461
462         * Api/WebPage.cpp:
463         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
464         (BlackBerry::WebKit::WebPagePrivate::init):
465         (BlackBerry::WebKit::WebPagePrivate::scrollBy):
466         (BlackBerry::WebKit::WebPagePrivate::notifyInRegionScrollStatusChanged):
467         (BlackBerry::WebKit::WebPagePrivate::clearDocumentData):
468         (BlackBerry::WebKit::WebPagePrivate::setScrollOriginPoint):
469         * Api/WebPage_p.h:
470         (WebPagePrivate):
471         * WebKitSupport/InRegionScrollableArea.cpp:
472         (BlackBerry::WebKit::InRegionScrollableArea::layer):
473         * WebKitSupport/InRegionScroller.cpp: Added.
474         (WebKit):
475         (BlackBerry::WebKit::canScrollInnerFrame):
476         (BlackBerry::WebKit::canScrollRenderBox):
477         (BlackBerry::WebKit::parentLayer):
478         (BlackBerry::WebKit::enclosingLayerNode):
479         (BlackBerry::WebKit::isNonRenderViewFixedPositionedContainer):
480         (BlackBerry::WebKit::pushBackInRegionScrollable):
481         (BlackBerry::WebKit::InRegionScroller::InRegionScroller):
482         (BlackBerry::WebKit::InRegionScroller::setNode):
483         (BlackBerry::WebKit::InRegionScroller::node):
484         (BlackBerry::WebKit::InRegionScroller::reset):
485         (BlackBerry::WebKit::InRegionScroller::isNull):
486         (BlackBerry::WebKit::InRegionScroller::scrollBy):
487         (BlackBerry::WebKit::InRegionScroller::inRegionScrollableAreasForPoint):
488         (BlackBerry::WebKit::InRegionScroller::scrollNodeRecursively):
489         (BlackBerry::WebKit::InRegionScroller::scrollRenderer):
490         (BlackBerry::WebKit::InRegionScroller::adjustScrollDelta):
491         * WebKitSupport/InRegionScroller.h: Added.
492         (WebCore):
493         (WebKit):
494         (InRegionScroller):
495         * WebKitSupport/TouchEventHandler.cpp:
496         (BlackBerry::WebKit::TouchEventHandler::drawTapHighlight):
497
498 2012-08-01  Charles Wei  <charles.wei@torchmobile.com.cn>
499
500         [BlackBerry] Favicon should be Base64 encoded for cross-process passing
501         https://bugs.webkit.org/show_bug.cgi?id=92857
502
503         Reviewed by George Staikos.
504
505         The current implementation just passes the internal of SkPixels data to the client,
506         which can't be passed accross the process boundary to chrome for processing.
507         This patch makes the favicon Base64 encoded so that can be passed to chrome in another process.
508
509         * Api/WebPageClient.h:
510         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
511         (WebCore::FrameLoaderClientBlackBerry::dispatchDidReceiveIcon):
512
513 2012-08-01  Jacky Jiang  <zhajiang@rim.com>
514
515         [BlackBerry] Allow client side to add and remove origin access whitelist entries
516         https://bugs.webkit.org/show_bug.cgi?id=92790
517
518         Reviewed by Yong Li.
519
520         PR: 172658
521         Add two new APIs to add and remove origin access whitelist entries.
522         Initialize the BlackBerryAllowCrossSiteRequests WebSetting to false.
523
524         * Api/WebPage.cpp:
525         (BlackBerry::WebKit::WebPagePrivate::addOriginAccessWhitelistEntry):
526         (WebKit):
527         (BlackBerry::WebKit::WebPage::addOriginAccessWhitelistEntry):
528         (BlackBerry::WebKit::WebPagePrivate::removeOriginAccessWhitelistEntry):
529         (BlackBerry::WebKit::WebPage::removeOriginAccessWhitelistEntry):
530         * Api/WebPage.h:
531         * Api/WebPage_p.h:
532         (WebPagePrivate):
533         * Api/WebSettings.cpp:
534         (BlackBerry::WebKit::WebSettings::standardSettings):
535
536 2012-08-01  Mike Fenton  <mifenton@rim.com>
537
538         [BlackBerry] Consolidate suppression of keyboard requests.
539         https://bugs.webkit.org/show_bug.cgi?id=92871
540
541         Reviewed by Antonio Gomes.
542
543         Reduce VKB requests even more by applying the filter on
544         all requests during processing.
545
546         Reviewed Internally by Gen Mak.
547
548         * WebKitSupport/InputHandler.cpp:
549         (BlackBerry::WebKit::InputHandler::focusedNodeChanged):
550         (BlackBerry::WebKit::InputHandler::notifyClientOfKeyboardVisibilityChange):
551
552 2012-08-01  Arvid Nilsson  <anilsson@rim.com>
553
554         [BlackBerry] Disable tap highlight when transparent color is specified
555         https://bugs.webkit.org/show_bug.cgi?id=92849
556
557         Reviewed by Antonio Gomes.
558
559         When the web page specifies -webkit-tap-highlight-color:rgba(0,0,0,0)
560         or any color with alpha value 0, we should disable the tap highlight.
561
562         * WebKitSupport/DefaultTapHighlight.cpp:
563         (BlackBerry::WebKit::DefaultTapHighlight::draw):
564
565 2012-07-31  Robin Cao  <robin.cao@torchmobile.com.cn>
566
567         [BlackBerry] Pass all file chooser settings to clients
568         https://bugs.webkit.org/show_bug.cgi?id=92237
569
570         Reviewed by Rob Buis.
571
572         Expose all file chooser settings to clients.
573
574         * Api/WebPageClient.h:
575         * WebCoreSupport/ChromeClientBlackBerry.cpp:
576         (WebCore::ChromeClientBlackBerry::runOpenPanel):
577
578 2012-07-31  Mike Fenton  <mifenton@rim.com>
579
580         [BlackBerry] Fix crash in InputHandler spell checking.
581         https://bugs.webkit.org/show_bug.cgi?id=92763
582
583         Reviewed by Antonio Gomes.
584
585         PR 185574.
586
587         Fix crash in getSpellChecker by guarding the calling paths
588         to ensure that m_currentFocusElement is valid.
589
590         Also add ASSERTs for previous crash.
591
592         * WebKitSupport/InputHandler.cpp:
593         (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
594         (BlackBerry::WebKit::InputHandler::spellCheckingRequestCancelled):
595         (BlackBerry::WebKit::InputHandler::getSpellChecker):
596
597 2012-07-31  Genevieve Mak  <gmak@rim.com>
598
599         Send an onContextMenu event to the page content
600         so that context menus can be prevented. We use
601         the node's event handler because we want to use
602         the fat finger's node. If we use  the EventHandler's
603         sendContextMenuEvent it will hit test with the mouse
604         position which may not be what we want.
605         PR #184032
606         https://bugs.webkit.org/show_bug.cgi?id=92766
607
608         Reviewed by Antonio Gomes.
609         Reviewed Internally by Antonio Gomes.
610
611         * Api/WebPage.cpp:
612         (BlackBerry::WebKit::WebPagePrivate::webContext):
613         (BlackBerry::WebKit::WebPagePrivate::contextNode):
614
615 2012-07-31  Arvid Nilsson  <anilsson@rim.com>
616
617         [BlackBerry] Backing store output flickers when using WebPageCompositor
618         https://bugs.webkit.org/show_bug.cgi?id=90291
619
620         Reviewed by Antonio Gomes.
621
622         The backing store doesn't know when the API client swaps the buffers,
623         so it doesn't know when to signal the blit generation condition
624         variable. Fixed by using EGL fence sync instead, when available, so we
625         don't have to know.
626
627         Reviewed internally by Filip Spacek.
628
629         * Api/BackingStore.cpp:
630         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
631         (BlackBerry::WebKit::BackingStorePrivate::~BackingStorePrivate):
632         (BlackBerry::WebKit::BackingStorePrivate::render):
633         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
634         (BlackBerry::WebKit::BackingStorePrivate::compositeContents):
635         * Api/BackingStore_p.h:
636         (BackingStorePrivate):
637         * WebKitSupport/BackingStoreTile.cpp:
638         (BlackBerry::WebKit::TileBuffer::TileBuffer):
639         * WebKitSupport/BackingStoreTile.h:
640         (BlackBerry::WebKit::TileBuffer::syncObject):
641         (BlackBerry::WebKit::TileBuffer::setSyncObject):
642         (TileBuffer):
643         * WebKitSupport/SurfacePool.cpp:
644         (WebKit):
645         (BlackBerry::WebKit::SurfacePool::SurfacePool):
646         (BlackBerry::WebKit::SurfacePool::initialize):
647         (BlackBerry::WebKit::SurfacePool::waitForBuffer):
648         (BlackBerry::WebKit::SurfacePool::notifyBuffersComposited):
649         * WebKitSupport/SurfacePool.h:
650         (SurfacePool):
651
652 2012-07-30  Yoshifumi Inoue  <yosin@chromium.org>
653
654         [Forms] Get rid of Element::isReadOnlyFormControl other than CSS related
655         https://bugs.webkit.org/show_bug.cgi?id=92612
656
657         Reviewed by Kent Tamura.
658
659         This patch replaces Element::isReadOnlyFormControl() to
660         HTMLFormControlElement::readOnly() for preparation of introducing
661         Element::shouldMatchReadWriteSelector(), bug 92602.
662
663         * WebKitSupport/DOMSupport.cpp:
664         (BlackBerry::WebKit::DOMSupport::isTextBasedContentEditableElement): Replaced isReadOnlyFormControl() by HTMLTextFormControlElement::readOnly().
665
666 2012-07-30  Mike Fenton  <mifenton@rim.com>
667
668         [BlackBerry] Optimize the generation of selection details generation.
669         https://bugs.webkit.org/show_bug.cgi?id=92522
670
671         Reviewed by Antonio Gomes.
672
673         PR 179264.
674
675         Reduce the number of times we generate selection details notifications.
676
677         This removes several notifications that are handled by the standard
678         notification path and makes skipping duplicate notifications the default
679         so that only those that must generate a response do.
680
681         Reviewed Internally by Gen Mak.
682
683         * Api/WebPage.cpp:
684         (BlackBerry::WebKit::WebPagePrivate::notifyTransformedContentsSizeChanged):
685         (BlackBerry::WebKit::WebPagePrivate::updateDelegatedOverlays):
686         * WebKitSupport/InputHandler.cpp:
687         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
688         * WebKitSupport/SelectionHandler.cpp:
689         (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
690         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
691         (BlackBerry::WebKit::SelectionHandler::setSelection):
692         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
693         * WebKitSupport/SelectionHandler.h:
694         (SelectionHandler):
695
696 2012-07-30  Robin Cao  <robin.cao@torchmobile.com.cn>
697
698         [BlackBerry] Adapt to changes in the SharedArray platform API
699         https://bugs.webkit.org/show_bug.cgi?id=92631
700
701         Reviewed by Rob Buis.
702
703         Adapt to changes in the SharedArray platform API. No behavioural change.
704
705         Reviewed internally by Joe Mason.
706
707         * Api/WebPage.cpp:
708         (BlackBerry::WebKit::WebPage::getBackForwardList):
709         * Api/WebPage.h:
710         * Api/WebPageClient.h:
711         * WebCoreSupport/ChromeClientBlackBerry.cpp:
712         (WebCore::ChromeClientBlackBerry::runOpenPanel):
713
714 2012-07-30  Patrick Gansterer  <paroga@webkit.org>
715
716         Replace UnicodeWinCE with UnicodeWchar
717         https://bugs.webkit.org/show_bug.cgi?id=92539
718
719         Reviewed by Ryosuke Niwa.
720
721         UnicodeWinCE never contained WinCE specific code. UnicodeWchar
722         is a replacement for it, which is mainly based on the functions
723         from <wchar.h>. It is ment as a minimal Unicode backend, which
724         can be used very easy and has no external dependencies.
725
726         * WebCoreSupport/AboutDataUseFeatures.in:
727
728 2012-07-27  Eli Fidler  <efidler@rim.com>
729
730         [BlackBerry] Adapt to change in the FontInfo platform API.
731         https://bugs.webkit.org/show_bug.cgi?id=92547
732
733         Reviewed by Yong Li
734
735         RIM PR 161263
736
737         * Api/WebSettings.cpp:
738         (BlackBerry::WebKit::WebSettings::standardSettings):
739
740 2012-07-27  Yong Li  <yoli@rim.com>
741
742         [BlackBerry] Should support onbeforeunload event and show confirmation dialog
743         https://bugs.webkit.org/show_bug.cgi?id=92510
744
745         Reviewed by Antonio Gomes.
746
747         RIM PR# 155878.
748         1. Export dispatchBeforeUnloadEvent() so client can call it before going to close the page.
749         2. Forward runBeforeUnloadConfirmPanel() call to client so it can show a dialog.
750
751         * Api/WebPage.cpp:
752         (BlackBerry::WebKit::WebPage::dispatchBeforeUnloadEvent):
753         (WebKit):
754         * Api/WebPage.h:
755         * Api/WebPageClient.h:
756         * WebCoreSupport/ChromeClientBlackBerry.cpp:
757         (WebCore::ChromeClientBlackBerry::canRunBeforeUnloadConfirmPanel):
758         (WebCore::ChromeClientBlackBerry::runBeforeUnloadConfirmPanel):
759
760 2012-07-27  Mike Fenton  <mifenton@rim.com>
761
762         [BlackBerry] Switch InputHandler malloc use to fastMalloc for cases that should never fail
763         https://bugs.webkit.org/show_bug.cgi?id=92508
764
765         Reviewed by Yong Li.
766
767         Replace common uses of malloc with fastMalloc rather
768         than trying to recover gracefully.  If we are truly
769         out of memory, crash before corruption occurs.
770
771         * WebKitSupport/InputHandler.cpp:
772         (BlackBerry::WebKit::InputHandler::spannableTextInRange):
773         (BlackBerry::WebKit::InputHandler::extractedTextRequest):
774
775 2012-07-26  Nima Ghanavatian  <nghanavatian@rim.com>
776
777         [BlackBerry] Remove synchronous spellchecking code
778         https://bugs.webkit.org/show_bug.cgi?id=92415
779
780         Removing synchronous spellchecking code path.
781
782         Reviewed by Rob Buis.
783
784         Internally reviewed by Mike Fenton.
785
786         * Api/WebPageClient.h:
787         * WebCoreSupport/EditorClientBlackBerry.cpp:
788         (WebCore::EditorClientBlackBerry::checkSpellingOfString):
789
790 2012-07-26  Nima Ghanavatian  <nghanavatian@rim.com>
791
792         [BlackBerry] Support async spellcheck for the blackberry port
793         https://bugs.webkit.org/show_bug.cgi?id=92160
794
795         PR124517
796         Implementing support for async spellcheck.
797
798         Reviewed by Rob Buis.
799
800         Internally reviewed by Mike Fenton.
801
802         * Api/WebPage.cpp:
803         (BlackBerry::WebKit::WebPage::spellCheckingRequestCancelled):
804         (WebKit):
805         (BlackBerry::WebKit::WebPage::spellCheckingRequestProcessed):
806         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
807         * Api/WebPage.h:
808         * Api/WebSettings.cpp:
809         (WebKit):
810         (BlackBerry::WebKit::WebSettings::standardSettings):
811         (BlackBerry::WebKit::WebSettings::isAsynchronousSpellCheckingEnabled):
812         (BlackBerry::WebKit::WebSettings::setAsynchronousSpellCheckingEnabled):
813         * Api/WebSettings.h:
814         * WebCoreSupport/EditorClientBlackBerry.cpp:
815         (WebCore):
816         (WebCore::EditorClientBlackBerry::requestCheckingOfString):
817         (WebCore::EditorClientBlackBerry::checkTextOfParagraph):
818         * WebCoreSupport/EditorClientBlackBerry.h:
819         (EditorClientBlackBerry):
820         * WebKitSupport/InputHandler.cpp:
821         (BlackBerry::WebKit::InputHandler::requestCheckingOfString):
822         (BlackBerry::WebKit::InputHandler::convertTransactionIdToSequenceId):
823         (WebKit):
824         (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
825         (BlackBerry::WebKit::InputHandler::spellCheckingRequestCancelled):
826         (BlackBerry::WebKit::InputHandler::getSpellChecker):
827         * WebKitSupport/InputHandler.h:
828         (WebCore):
829         (InputHandler):
830
831 2012-07-26  Mike Fenton  <mifenton@rim.com>
832
833         [BlackBerry] Improve the logs in Selection Handler.
834         https://bugs.webkit.org/show_bug.cgi?id=92405
835
836         Reviewed by Rob Buis.
837
838         Clean up selection logging, fix priority and style
839         of helper function.
840
841         Reviewed Internally by Nima Ghanavatian.
842
843         * WebKitSupport/SelectionHandler.cpp:
844         (BlackBerry::WebKit::SelectionHandler::cancelSelection):
845         (BlackBerry::WebKit::SelectionHandler::shouldUpdateSelectionOrCaretForPoint):
846         (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
847         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
848         (BlackBerry::WebKit::SelectionHandler::setSelection):
849         (BlackBerry::WebKit::SelectionHandler::selectObject):
850         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
851         (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
852
853 2012-07-26  Mike Fenton  <mifenton@rim.com>
854
855         [BlackBerry] Add timing logs to SelectionHandler.
856         https://bugs.webkit.org/show_bug.cgi?id=92404
857
858         Reviewed by Rob Buis.
859
860         Add selection timing logs.
861
862         Reviewed Internally by Nima Ghanavatian.
863
864         * WebKitSupport/SelectionHandler.cpp:
865         (BlackBerry::WebKit::SelectionHandler::setSelection):
866         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
867         * WebKitSupport/SelectionHandler.h:
868         (SelectionHandler):
869
870 2012-07-26  Mike Fenton  <mifenton@rim.com>
871
872         [BlackBerry] InputHandler failure logs should be logAlways and critical.
873         https://bugs.webkit.org/show_bug.cgi?id=92403
874
875         Reviewed by Rob Buis.
876
877         Update Log level for failures and fix mask in log.
878
879         Reviewed Internally by Nima Ghanavatian.
880
881         * WebKitSupport/InputHandler.cpp:
882         (BlackBerry::WebKit::convertStringToWchar):
883         (BlackBerry::WebKit::convertStringToWcharVector):
884         (BlackBerry::WebKit::convertSpannableStringToString):
885         (BlackBerry::WebKit::InputHandler::spannableTextInRange):
886         (BlackBerry::WebKit::InputHandler::setTextAttributes):
887
888 2012-07-26  Arvid Nilsson  <anilsson@rim.com>
889
890         [BlackBerry] Refactor BackingStorePrivate::BackingStorePrivate::clearAndUpdateTileOfNotRenderedRegion() to avoid touching tile frontbuffer
891         https://bugs.webkit.org/show_bug.cgi?id=92095
892
893         Reviewed by George Staikos.
894
895         PR: 141439
896         Specifically, we want to avoid changing the rendered region of the
897         front buffer without proper synchronization.
898
899         The method is trying to force checkerboard to appear on screen because
900         an area was invalidated but the render job was dropped, so the tile
901         contents are now invalid.
902
903         Unfortunately it did this in a way which is not thread safe. Fixed by
904         making it thread safe, in a way that minimizes memory bandwidth usage.
905
906         Instead of using the customary sequence of copy-back, modify and swap,
907         we send a synchronous message to the compositing thread to avoid the
908         copy-back step and save memory bandwidth. The trade-off is that the
909         WebKit thread might wait a little longer for the compositing thread
910         than it would from a waitForCurrentMessage() call.
911
912         The way we synchronize this is rather expensive for the WebKit thread,
913         and this method is called rather carelessly, so add various early
914         returns to avoid doing it redundantly.
915
916         Internally reviewed by Jakob Petsovits and Adam Treat.
917
918         * Api/BackingStore.cpp:
919         (BlackBerry::WebKit::BackingStorePrivate::indexOfTile):
920         (BlackBerry::WebKit::BackingStorePrivate::clearAndUpdateTileOfNotRenderedRegion):
921         * Api/BackingStore_p.h:
922         (BackingStorePrivate):
923
924 2012-07-26  Arvid Nilsson  <anilsson@rim.com>
925
926         [BlackBerry] Refactor BackingStorePrivate::render() to avoid touching tile frontbuffer
927         https://bugs.webkit.org/show_bug.cgi?id=91989
928
929         Reviewed by George Staikos.
930
931         PR: 141439
932         Specifically, we want to avoid changing the rendered region of the
933         front buffer. The code only touched the front buffer rendered region
934         if the tile was not committed.
935
936         Instead of immediately marking the tile as committed, and clearing the
937         front buffer's rendered region to make it appear as checkerboard, we
938         leave the front buffer alone and only mark the tile as committed once
939         the front buffer has valid content. Un-committed tiles will also be
940         rendered as checkerboard, so leaving it uncommitted is equivalent to
941         clearing the front buffer rendered region here.
942
943         In addition to the main change, some related changes follow naturally.
944
945         The copyPreviousContentsToBackSurfaceOfTile() call only makes sense if
946         the tile is committed, and the front buffer has valid content.
947         Otherwise, clearing the back buffer is equivalent. The code has been
948         updated to this effect.
949
950         Since copyPreviousContentsToBackSurfaceOfTile() always sets the
951         rendered region to the union of the front and back buffer regions,
952         there is no point in the "backBufferIsValid" check. It has been turned
953         into an ASSERT instead, just to make sure.
954
955         Internally reviewed by Jakob Petsovits.
956
957         * Api/BackingStore.cpp:
958         (BlackBerry::WebKit::BackingStorePrivate::render):
959
960 2012-07-25  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
961
962         [BlackBerry] Support RTSP in browser
963         https://bugs.webkit.org/show_bug.cgi?id=92233
964
965         Reviewed by Rob Buis.
966
967         Handle URL scheme "rtsp://" before creating the DocumentLoader
968         and send the request to webkit. As we don't have any application
969         which can deal with rtsp invocation for now, we need to create
970         a media document to wrap the rtsp url within a video tag which
971         makes it load as a normal video clip.
972
973         RIM PR: 169669
974         Internally reviewed by Charles Wei <charles.wei@torchmobile.com.cn>.
975
976         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
977         (WebCore::FrameLoaderClientBlackBerry::createDocumentLoader):
978
979 2012-07-25  Jakob Petsovits  <jpetsovits@rim.com>
980
981         [BlackBerry] Rephrase suspend/resume condition to guard against crashes
982         https://bugs.webkit.org/show_bug.cgi?id=92300
983         PR 182125
984
985         Reviewed by George Staikos.
986
987         When the compositor is removed from a WebPage, it might
988         already have unset its context, and issuing a call to
989         BackingStore::buffer() would therefore cause a crash.
990         Just guarding buffer() from this crash isn't fully
991         correct, because then we wouldn't suspend rendering
992         for a compositor that had been previously enabled.
993
994         Instead, change the condition to suspend/resume in
995         WebPagePrivate::setCompositor() to focus on the
996         object that delivers us the buffer. If we can't
997         listen to the context or buffer being set, better
998         just take the compositor object itself to determine
999         whether we have something valid or not... and hope
1000         that they give us a valid context & buffer in all
1001         situations when we can actually be rendering.
1002
1003         Also check compositor->context() in buffer() to be
1004         non-zero before accessing the context's buffer,
1005         because more defensive coding can't hurt here.
1006
1007         * Api/BackingStore.cpp:
1008         (BlackBerry::WebKit::BackingStorePrivate::buffer):
1009         * Api/WebPage.cpp:
1010         (BlackBerry::WebKit::WebPagePrivate::setCompositor):
1011
1012 2012-07-25  Joshua Netterfield  <jnetterfield@rim.com>
1013
1014         [BlackBerry] Update about:config lists
1015         https://bugs.webkit.org/show_bug.cgi?id=92118
1016
1017         Reviewed by Rob Buis.
1018
1019         Remove features from list that have either been removed from WebKit
1020         or that have been moved from one list to another.
1021
1022         * WebCoreSupport/AboutDataEnableFeatures.in:
1023         * WebCoreSupport/AboutDataHaveFeatures.in:
1024         * WebCoreSupport/AboutDataUseFeatures.in:
1025
1026 2012-07-25  Jacky Jiang  <zhajiang@rim.com>
1027
1028         [BlackBerry] clock_gettime() in BackingStore.cpp should use CLOCK_MONOTONIC
1029         https://bugs.webkit.org/show_bug.cgi?id=91898
1030
1031         Reviewed by Yong Li.
1032
1033         Let pthread condition variable in BackingStore.cpp use monotonic clock
1034         to fix a regression caused by r123266.
1035
1036         * Api/BackingStore.cpp:
1037         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
1038
1039 2012-07-25  Andy Chen  <andchen@rim.com>
1040
1041         [BlackBerry] Add "SelectAll" to WebPage
1042         https://bugs.webkit.org/show_bug.cgi?id=92246
1043
1044         Reviewed by Antonio Gomes.
1045
1046         Add "Select All" editor command to WebPage.
1047         Internally reviewed by Mike Fenton.
1048
1049         * Api/WebPage.cpp:
1050         (BlackBerry::WebKit::WebPage::selectAll):
1051         (WebKit):
1052         * Api/WebPage.h:
1053         * WebKitSupport/InputHandler.cpp:
1054         (BlackBerry::WebKit::InputHandler::selectAll):
1055         (WebKit):
1056         * WebKitSupport/InputHandler.h:
1057
1058 2012-07-25  Arvid Nilsson  <anilsson@rim.com>
1059
1060         [BlackBerry] Don't touch a tile buffer while it's still on its way to the GPU
1061         https://bugs.webkit.org/show_bug.cgi?id=91992
1062
1063         Reviewed by Adam Treat.
1064
1065         PR: 141439
1066         The copyPreviousContentsToBackSurfaceOfTile() call will also modify
1067         buffer contents, move it after the blit generation condvar to make sure
1068         we've waited for the buffer to become available first.
1069
1070         This is done as part of some general BackingStorePrivate::render()
1071         cleanup in PR 141439.
1072
1073         Internally reviewed by Jakob Petsovits.
1074
1075         * Api/BackingStore.cpp:
1076         (BlackBerry::WebKit::BackingStorePrivate::render):
1077
1078 2012-07-25  Jakob Petsovits  <jpetsovits@rim.com>
1079
1080         [BlackBerry] notifyContentRendered() call missing in two spots
1081         https://bugs.webkit.org/show_bug.cgi?id=92153
1082         RIM PR 173340
1083
1084         Reviewed by Antonio Gomes.
1085
1086         In dispatchDidFirstVisualLayout() and repaint() in
1087         immediate mode, we render but don't notify the
1088         WebPageClient that the content was modified.
1089
1090         In the long run, we should probably keep track of
1091         the modified reason from within render() itself
1092         and use this to automatically notify the client
1093         from within blitContents() and/or invalidateWindow(),
1094         depending on the rendering path. That's somewhat of
1095         a medium-size undertaking though; for now, adding
1096         the call directly to the renderVisibleContents()
1097         call sites will do.
1098
1099         This patch also adds a blitVisibleContents() to
1100         dispatchDidFirstVisualLayout() where it was
1101         inexplicably missing, probably on account of
1102         old code that was never updated.
1103
1104         * Api/BackingStore.cpp:
1105         (BlackBerry::WebKit::BackingStorePrivate::repaint):
1106         * Api/WebPage.cpp:
1107         (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore):
1108         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1109         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFirstVisuallyNonEmptyLayout):
1110
1111 2012-07-24  Rob Buis  <rbuis@rim.com>
1112
1113         [BlackBerry] Do not call settings setters twice on page construction
1114         https://bugs.webkit.org/show_bug.cgi?id=92157
1115
1116         Reviewed by Yong Li.
1117
1118         The WebPagePrivate init method sets some settings value that were
1119         already set in didChangeSettings. setUseHixie76WebSocketProtocol just
1120         sets the default value, no need to set it again.
1121         Also call didChangeSettings explicitly from init, before that we are
1122         not calling it since the delegate is not set yet.
1123
1124         * Api/WebPage.cpp:
1125         (BlackBerry::WebKit::WebPagePrivate::init):
1126
1127 2012-07-24  Mike Fenton  <mifenton@rim.com>
1128
1129         Throttle calls to request the virtual keyboard be shown.
1130         https://bugs.webkit.org/show_bug.cgi?id=92138
1131
1132         Reviewed by Rob Buis.
1133
1134         PR 178465.
1135
1136         Do not request keyboard visibility change when
1137         we are actively processing an input event.
1138
1139         Reviewed Internally by Gen Mak.
1140
1141         * WebKitSupport/InputHandler.cpp:
1142         (BlackBerry::WebKit::InputHandler::focusedNodeChanged):
1143
1144 2012-07-24  Joshua Netterfield  <jnetterfield@rim.com>
1145
1146         [BlackBerry] Update about:config lists
1147         https://bugs.webkit.org/show_bug.cgi?id=92118
1148
1149         Reviewed by Rob Buis.
1150
1151         We want to have all flags which could be used / have been used by any platform. These lists were created by running:
1152
1153         * WebCoreSupport/AboutDataEnableFeatures.in: `git grep "ENABLE(" | cut -d "(" -f2 | cut -d ")" -f1 | sort -u`
1154         * WebCoreSupport/AboutDataHaveFeatures.in: `git grep "HAVE(" | cut -d "(" -f2 | cut -d ")" -f1 | sort -u`
1155         * WebCoreSupport/AboutDataUseFeatures.in: `git grep "USE(" | cut -d "(" -f2 | cut -d ")" -f1 | sort -u`
1156
1157 2012-07-24  Arvid Nilsson  <anilsson@rim.com>
1158
1159         [BlackBerry] Remove unused variable in BackingStore.cpp
1160         https://bugs.webkit.org/show_bug.cgi?id=91987
1161
1162         Reviewed by Antonio Gomes.
1163
1164         PR: 141439
1165         This is done as part of some general BackingStorePrivate::render()
1166         cleanup in PR 141439.
1167
1168         * Api/BackingStore.cpp:
1169         (BlackBerry::WebKit::BackingStorePrivate::render):
1170
1171 2012-07-23  Yong Li  <yoli@rim.com>
1172
1173         [BlackBerry] Move about: URL handling out of WebCore
1174         https://bugs.webkit.org/show_bug.cgi?id=91541
1175
1176         Reviewed by Rob Buis.
1177
1178         PR# 181304.
1179         Move about: URL handling to the right place (FrameLoaderClientBlackBerry::createDocumentLoader), so
1180         reload and history navigation can work.
1181         Other changes: Remove about:version which makes little sense. Make about:memory partially visible.
1182
1183         * Api/WebPage.cpp:
1184         (BlackBerry::WebKit::WebPage::load): Remove the call to loadAbout()
1185         * Api/WebPage_p.h: Remove loadAbout()
1186         (WebPagePrivate):
1187         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1188         (WebCore::FrameLoaderClientBlackBerry::createDocumentLoader): Construct about: data here.
1189         * WebKitSupport/AboutData.cpp:
1190         (BlackBerry::WebKit::numberToHTMLTr): Make it static
1191         (BlackBerry::WebKit::configPage): Make it static
1192         (BlackBerry::WebKit::memoryPage): Make it static
1193         (BlackBerry::WebKit::cachePage):
1194         (BlackBerry::WebKit::buildPage):
1195         (BlackBerry::WebKit::creditsPage):
1196         (BlackBerry::WebKit::cookiePage):
1197         (BlackBerry::WebKit::aboutData): The only export function that returns HTML source for a given about: URL.
1198         (WebKit):
1199         * WebKitSupport/AboutData.h:
1200         (WebKit):
1201
1202 2012-07-23  Pierre Rossi  <pierre.rossi@gmail.com>
1203
1204         Unify numTouchEventHandlersChanged and needTouchEvents in the chrome client
1205         https://bugs.webkit.org/show_bug.cgi?id=91006
1206
1207         Reviewed by Ryosuke Niwa.
1208
1209         Removed numTouchEventHandlersChanged stub.
1210
1211         * WebCoreSupport/ChromeClientBlackBerry.h:
1212
1213 2012-07-22  Kent Tamura  <tkent@chromium.org>
1214
1215         Rename ENABLE_METER_TAG and ENABLE_PROGRESS_TAG to ENABLE_METER_ELEMENT and ENABLE_PROGRESS_ELEMENT respectively
1216         https://bugs.webkit.org/show_bug.cgi?id=91941
1217
1218         Reviewed by Kentaro Hara.
1219
1220         A flag name for an elmement should be ENABLE_*_ELEMENT.
1221
1222         * WebCoreSupport/AboutDataEnableFeatures.in:
1223
1224 2012-07-20  Jacky Jiang  <zhajiang@rim.com>
1225
1226         [BlackBerry] clock_gettime() in BackingStore.cpp should use CLOCK_MONOTONIC
1227         https://bugs.webkit.org/show_bug.cgi?id=91898
1228
1229         Reviewed by Yong Li.
1230
1231         PR: 181043
1232         Use CLOCK_MONOTONIC when we do expect a monotonic timer.
1233
1234         * Api/BackingStore.cpp:
1235         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
1236
1237 2012-07-20  Crystal Zhang  <haizhang@rim.com>
1238
1239         [BlackBerry] Add Cancel button for Select popup
1240         https://bugs.webkit.org/show_bug.cgi?id=91887
1241
1242         Reviewed by Yong Li.
1243
1244         PR 177706
1245
1246         * WebCoreSupport/SelectPopupClient.cpp:
1247         (WebCore::SelectPopupClient::generateHTML):
1248         (WebCore::SelectPopupClient::setValueAndClosePopup):
1249
1250 2012-07-19  Mary Wu  <mary.wu@torchmobile.com.cn>
1251
1252         [BlackBerry] Make sure to send favicon when go back/forward
1253         https://bugs.webkit.org/show_bug.cgi?id=91808
1254
1255         Reviewed by George Staikos.
1256
1257         When go back/forward, if the page was in page cache, it would have no chance
1258         to send favicon. So we'll send it in commitLoad right after send the blank
1259         icon.
1260         RIM PR# 177495
1261
1262         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1263         (WebCore::FrameLoaderClientBlackBerry::dispatchDidCommitLoad):
1264
1265 2012-07-19  Jakob Petsovits  <jpetsovits@rim.com>
1266
1267         [BlackBerry] Suspend when there's no target buffer until an external compositor is set
1268         https://bugs.webkit.org/show_bug.cgi?id=91686
1269         RIM PR 174365
1270
1271         Reviewed by Antonio Gomes.
1272
1273         If we don't have a client window (i.e. rendering to
1274         GL directly) and a WebPageCompositor is only set
1275         after a rendering operation, then we'll try to render
1276         to BackingStorePrivate::buffer() which doesn't exist
1277         at this point. That's bad, and gets us various
1278         assertions and possibly worse.
1279
1280         Fix it by starting in a screen-suspended state and only
1281         resuming screen and backingstore once a compositor is
1282         actually set.
1283
1284         So, in effect, with this patch applied, the sequence
1285         of events will look like this:
1286
1287         1) WebPage & BackingStore are initialize, neither window
1288            nor compositor exists, therefore buffer() returns 0.
1289            createSurface() therefore suspends screen and
1290            backingstore.
1291         2) loadURL() or loadData() is called, web page is
1292            fully loaded, however we don't try to render because
1293            we're still suspended, still have no target buffer.
1294         3) A WebPageCompositor is being set from outside.
1295            At the beginning of WebPage::setCompositor() we still
1296            don't have a buffer() so there's nothing to suspend,
1297            however, after the sync call to setCompositorHelper()
1298            the compositor is set so buffer() will return a
1299            nonzero value, causing us to resume at this point.
1300
1301         Using the existence of a target buffer to determine
1302         whether or not to enable rendering or keep it suspended
1303         seems like a good idea, and the implementation (while
1304         not quite perfect yet) is a step forward from before.
1305
1306         * Api/BackingStore.cpp:
1307         (BlackBerry::WebKit::BackingStorePrivate::createSurfaces):
1308         * Api/WebPage.cpp:
1309         (BlackBerry::WebKit::WebPagePrivate::setCompositor):
1310         (BlackBerry::WebKit::WebPagePrivate::setCompositorHelper):
1311         * Api/WebPage_p.h:
1312         (WebPagePrivate):
1313
1314 2012-07-19  Jakob Petsovits  <jpetsovits@rim.com>
1315
1316         [BlackBerry] Allow nested suspend/resume screen & backingstore calls.
1317         https://bugs.webkit.org/show_bug.cgi?id=91644
1318         RIM PR 174365
1319
1320         Reviewed by Adam Treat and Antonio Gomes.
1321
1322         We expose suspendScreenAndBackingStoreUpdates() to the
1323         outside API, but also use it internally when reacting
1324         to a number of happenings, i.e. zooming, viewport resize,
1325         resetting view state on Committed state or when restoring
1326         it from previous pages, etc.
1327
1328         These two can clash. For instance, if we get a suspend
1329         call from outside that suspends us for app inactivity,
1330         or we are told to suspend because the main target surface
1331         is not available at the time, and while being suspended
1332         we try to rotate, finish loading a page, the we'll end up
1333         resuming operations even though we shouldn't.
1334
1335         This patch changes the suspend flag to be a counter
1336         instead, allowing nested suspend/resume calls and making
1337         suspend/resume more robust this way. It also changes
1338         several call sites to make sure suspend/resume calls are
1339         paired up correctly.
1340
1341         * Api/BackingStore.cpp:
1342         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
1343         (BlackBerry::WebKit::BackingStorePrivate::suspendScreenAndBackingStoreUpdates):
1344         (BlackBerry::WebKit::BackingStorePrivate::resumeScreenAndBackingStoreUpdates):
1345         * Api/BackingStore_p.h:
1346         (BackingStorePrivate):
1347         * Api/WebPage.cpp:
1348         (BlackBerry::WebKit::WebPagePrivate::shouldZoomAboutPoint):
1349         (BlackBerry::WebKit::WebPagePrivate::zoomAboutPointTimerFired):
1350         (BlackBerry::WebKit::WebPagePrivate::blockZoomRectForNode):
1351         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1352         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
1353
1354 2012-07-18  Yong Li  <yoli@rim.com>
1355
1356         [BlackBerry] Move about: URL handling out of WebCore
1357         https://bugs.webkit.org/show_bug.cgi?id=91541
1358
1359         Reviewed by Rob Buis.
1360
1361         Move about URL handling code to WebKit/blackberry. Now when WebPage is asked to load an about URL,
1362         it directly calls loadString() with the generated source.
1363
1364         Also move AboutData.h/cpp from WebCoreSupport to WebKitSupport and change their namespace from WebCore
1365         to BlackBerry::WebKit.
1366
1367         The change is very mechanical except "procss total memory usage" in about:memory now only accounts used
1368         bytes and ignore free spaces in malloc.
1369
1370         * Api/WebPage.cpp:
1371         (BlackBerry::WebKit::WebPagePrivate::loadAbout):
1372         (WebKit):
1373         (BlackBerry::WebKit::WebPage::load):
1374         * Api/WebPage_p.h:
1375         (WebPagePrivate):
1376         * WebKitSupport/AboutData.cpp: Renamed from Source/WebKit/blackberry/WebCoreSupport/AboutData.cpp.
1377         (WebKit):
1378         (BlackBerry::WebKit::writeFeatures):
1379         (BlackBerry::WebKit::numberToHTMLTr):
1380         (BlackBerry::WebKit::bool):
1381         (BlackBerry::WebKit::configPage):
1382         (BlackBerry::WebKit::cacheTypeStatisticToHTMLTr):
1383         (BlackBerry::WebKit::dumpJSCTypeCountSetToTableHTML):
1384         (BlackBerry::WebKit::memoryPage):
1385         * WebKitSupport/AboutData.h: Renamed from Source/WebKit/blackberry/WebCoreSupport/AboutData.h.
1386         (WebKit):
1387
1388 2012-07-17  Jakob Petsovits  <jpetsovits@rim.com>
1389
1390         [BlackBerry] Remove unnecessary clearWindow() calls and the method itself
1391         https://bugs.webkit.org/show_bug.cgi?id=91540
1392         RIM PR 174365
1393
1394         Reviewed by Adam Treat.
1395
1396         If we resume the backingstore right afterwards with
1397         RenderAndBlit then that'll fill the whole visible area
1398         with content, making a clearWindow() call unnecessary.
1399         This call is a remnant from ages ago, and is well suited
1400         to disappear into nothingness.
1401
1402         (There is still a clearWindow() call, with rect argument,
1403         which we continue using. This commit only removes the
1404         rect-less version.)
1405
1406         * Api/BackingStore.cpp:
1407         * Api/BackingStore_p.h:
1408         (BackingStorePrivate):
1409         * Api/WebPage.cpp:
1410         (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint):
1411         (BlackBerry::WebKit::WebPagePrivate::zoomBlock):
1412
1413 2012-07-17  Vivek Galatage  <vivekgalatage@gmail.com>
1414
1415         Web Inspector: refactor InspectorController::connectFrontend() to accept InspectorFrontendChannel.
1416         https://bugs.webkit.org/show_bug.cgi?id=91196
1417
1418         Reviewed by Pavel Feldman.
1419
1420         Refactoring InspectorClients. InspectorClient::openInspectorFrontend
1421         now returning the InspectorFrontendChannel.
1422
1423         * Api/WebPage.cpp:
1424         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
1425         (BlackBerry::WebKit::WebPagePrivate::init):
1426         (BlackBerry::WebKit::WebPage::enableWebInspector):
1427         * Api/WebPage_p.h:
1428         (WebPagePrivate):
1429         * WebCoreSupport/InspectorClientBlackBerry.cpp:
1430         (WebCore::InspectorClientBlackBerry::openInspectorFrontend):
1431         * WebCoreSupport/InspectorClientBlackBerry.h:
1432         (InspectorClientBlackBerry):
1433
1434 2012-07-17  Chris Guan  <chris.guan@torchmobile.com.cn>
1435
1436         [BlackBerry] Enable registerProtocolHandler for Blackberry
1437         https://bugs.webkit.org/show_bug.cgi?id=90422
1438
1439         Reviewed by George Staikos.
1440
1441         Implements APIs were added in Custom Scheme Handler specification
1442         which is at http://dev.w3.org/html5/spec/Overview.html#custom-handlers.
1443
1444         Test cases:
1445         fast/dom/register-protocol-handler.html
1446         fast/dom/unregister-protocol-handler.html
1447
1448         * Api/WebPageClient.h:
1449         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1450         (WebCore::ChromeClientBlackBerry::isProtocolHandlerRegistered):
1451         (WebCore::ChromeClientBlackBerry::unregisterProtocolHandler):
1452         (WebCore::ChromeClientBlackBerry::registerProtocolHandler):
1453         * WebCoreSupport/ChromeClientBlackBerry.h:
1454         (ChromeClientBlackBerry):
1455
1456 2012-07-16  Benjamin C Meyer  <bmeyer@rim.com>
1457
1458         Any webpage can crash webkit via qnx.callExtensionMethod assuming 'this' is the 'qnx' object.
1459         https://bugs.webkit.org/show_bug.cgi?id=91419
1460
1461         Run the following in inspector to crash WebKit
1462
1463         qnx.callExtensionMethod.apply(window, []);
1464
1465         In the c++ that handles the function it assumes that when callExtensionMethod
1466         is called that 'this' is the object 'qnx'.  The qnx object has a hidden
1467         variable that the code casts and uses, but when 'this' is not qnx such as the
1468         example this will cause a crash.  Any website can insert the above JavaScript
1469         to cause the crash.
1470
1471         Reviewed by Yong Li.
1472
1473         * WebCoreSupport/ClientExtension.cpp:
1474         (clientExtensionMethod):
1475
1476 2012-07-16  Yong Li  <yoli@rim.com>
1477
1478         [BlackBerry] Improve about:memory page
1479         https://bugs.webkit.org/show_bug.cgi?id=87676
1480
1481         Reviewed by Rob Buis.
1482
1483         Add a table for process memory usage summary for easy read.
1484
1485         * WebCoreSupport/AboutData.cpp:
1486         (WebCore::memoryPage):
1487
1488 2012-07-16  Kihong Kwon  <kihong.kwon@samsung.com>
1489
1490         Remove setController from BatteryClient
1491         https://bugs.webkit.org/show_bug.cgi?id=90944
1492
1493         Reviewed by Adam Barth.
1494
1495         BatteryClient doesn't need to keep m_controller,
1496         because BatteryController can be accessed using BatteryController::from().
1497         Remove m_controller and Add webPagePrivate to BatteryClientBlackBerry.
1498         And change all m_controller to BatteryController::from.
1499
1500         * Api/WebPage.cpp:
1501         (BlackBerry::WebKit::WebPagePrivate::init):
1502         * WebCoreSupport/BatteryClientBlackBerry.cpp:
1503         (WebCore::BatteryClientBlackBerry::BatteryClientBlackBerry):
1504         (WebCore::BatteryClientBlackBerry::onLevelChange):
1505         (WebCore::BatteryClientBlackBerry::onChargingChange):
1506         (WebCore::BatteryClientBlackBerry::onChargingTimeChange):
1507         (WebCore::BatteryClientBlackBerry::onDischargingTimeChange):
1508         * WebCoreSupport/BatteryClientBlackBerry.h:
1509         (BatteryClientBlackBerry):
1510
1511 2012-07-16  Yongxin Dai  <yodai@rim.com>
1512
1513         [BlackBerry] Text selection with touch hold does not start on text field in some cases
1514         https://bugs.webkit.org/show_bug.cgi?id=91267
1515
1516         Reviewed by Antonio Gomes.
1517
1518         Input fields host node is by spec non-editable unless the field itself has content editable enabled.
1519         We enable selection if the shadow tree for the input field is selectable.
1520         PR # 173450
1521
1522         Reviewed Internally by Mike Fenton.
1523
1524         * Api/WebPage.cpp:
1525         (BlackBerry::WebKit::WebPagePrivate::webContext):
1526         * Api/WebPage.cpp:
1527         (BlackBerry::WebKit::WebPagePrivate::webContext):
1528
1529 2012-07-15  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1530
1531         [BlackBerry] Move icon database to application data directory.
1532         https://bugs.webkit.org/show_bug.cgi?id=91195
1533
1534         Reviewed by Rob Buis.
1535
1536         RIM PR: 156852
1537         Create icon database in application data directory instead of
1538         database or local storage directory, by doing this we can make
1539         things easier when clearing database or local storage data files.
1540
1541         Internally reviewed by Charles Wei <charles.wei@torchmobile.com.cn>
1542
1543         * WebCoreSupport/IconDatabaseClientBlackBerry.cpp:
1544         (WebCore::IconDatabaseClientBlackBerry::initIconDatabase):
1545
1546 2012-07-13  Xianzhu Wang  <wangxianzhu@chromium.org>
1547
1548         Move WebCore/platform/text/Base64 to WTF/wtf/text
1549         https://bugs.webkit.org/show_bug.cgi?id=91162
1550
1551         Reviewed by Adam Barth.
1552
1553         * Api/WebKitTextCodec.cpp:
1554         (BlackBerry::WebKit::base64DecodePolicyForWTF):
1555         (BlackBerry::WebKit::base64Decode):
1556         (BlackBerry::WebKit::base64EncodePolicyForWTF):
1557         (BlackBerry::WebKit::base64Encode):
1558         * Api/WebSettings.cpp:
1559         (BlackBerry::WebKit::WebSettings::setUserStyleSheetString):
1560         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1561
1562 2012-07-13  George Staikos  <staikos@webkit.org>
1563
1564         [BlackBerry] Fix crash due to unguarded use of renderer in select
1565         popup.
1566         https://bugs.webkit.org/show_bug.cgi?id=91287
1567
1568         Reviewed by Rob Buis.
1569
1570         No known testcase for this.  Found in the wild.
1571
1572         * WebCoreSupport/SelectPopupClient.cpp:
1573         (WebCore::SelectPopupClient::setValueAndClosePopup):
1574
1575 2012-07-13  Mike Fenton  <mifenton@rim.com>
1576
1577         [BlackBerry] Add support for attributes to define keyboard and enter key type on the Virtual Keyboard
1578         https://bugs.webkit.org/show_bug.cgi?id=91248
1579
1580         Reviewed by Antonio Gomes.
1581
1582         PR 174733.
1583
1584         Add data-blackberry-virtual-keyboard-type and
1585         data-blackberry-virtual-keyboard-enter-key to
1586         enable configuration of the desired virtual keyboard
1587         using element attributes.
1588
1589         Reviewed Internally by Gen Mak.
1590
1591         * Api/WebPageClient.h:
1592         * WebKitSupport/InputHandler.cpp:
1593         (BlackBerry::WebKit::convertStringToKeyboardType):
1594         (WebKit):
1595         (BlackBerry::WebKit::keyboardTypeAttribute):
1596         (BlackBerry::WebKit::convertStringToKeyboardEnterKeyType):
1597         (BlackBerry::WebKit::keyboardEnterKeyTypeAttribute):
1598         (BlackBerry::WebKit::InputHandler::setElementFocused):
1599
1600 2012-07-13  Jacky Jiang  <zhajiang@rim.com>
1601
1602         [BlackBerry] resetBitmapZoomScale called while zooming preventing pinch zoom
1603         https://bugs.webkit.org/show_bug.cgi?id=91247
1604
1605         Reviewed by Antonio Gomes.
1606
1607         PR: 175432
1608         On yahoo.com, the web page stopped zooming while trying to pinch as
1609         WebPageClient::resetBitmapZoomScale(double) was being called by
1610         WebPagePrivate::zoomToInitialScaleOnLoad() after load finished.
1611         And also yahoo.com was keeping updating layout, which made it really
1612         bad that zoomToInitialScaleOnLoad() was called many times when load
1613         finished and the load type was FrameLoadTypeStandard or FrameLoadTypeSame.
1614         As we only care about the situation that dispatchDidFirstVisuallyNonEmptyLayout()
1615         happens after load finished, we can move the code to that method and
1616         set a flag for WebPage layoutFinished() and zoomToInitialScaleOnLoad()
1617         instead. In this way, we can ensure that the flag is only enabled when
1618         dispatchDidFirstVisuallyNonEmptyLayout() is called after load finished
1619         and get rid of calling zoomToInitialScaleOnLoad() lots of times when
1620         keeping updating layout in such kind of situation.
1621
1622         Internally reviewed by Arvid Nilsson
1623
1624         * Api/WebPage.cpp:
1625         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
1626         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
1627         (BlackBerry::WebKit::WebPagePrivate::layoutFinished):
1628         * Api/WebPage_p.h:
1629         (BlackBerry::WebKit::WebPagePrivate::shouldZoomToInitialScaleOnLoad):
1630         (BlackBerry::WebKit::WebPagePrivate::setShouldZoomToInitialScaleAfterLoadFinished):
1631         (WebPagePrivate):
1632         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1633         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFirstVisuallyNonEmptyLayout):
1634
1635 2012-07-13  Jakob Petsovits  <jpetsovits@rim.com>
1636
1637         [BlackBerry] Use fillBuffer() instead of a user-defined background image.
1638         https://bugs.webkit.org/show_bug.cgi?id=91180
1639         RIM PR 171458
1640
1641         Reviewed by Rob Buis.
1642         Internally reviewed by Andrew Lo.
1643
1644         By using Platform::Graphics::fillBuffer() to fill the
1645         overscroll area, we save graphics memory for the buffer
1646         that the background image was occupying.
1647
1648         Also adapt checkerboard drawing as it is now done using
1649         fillBuffer() which replaces checkerBuffer().
1650
1651         In the same go, use the opportunity of the WebSettings
1652         API change to make it more consistent, renaming the
1653         OverZoomColor setting to OverScrollColor.
1654
1655         * Api/BackingStore.cpp:
1656         (WebKit):
1657         (BlackBerry::WebKit::BackingStorePrivate::paintDefaultBackground):
1658         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
1659         (BlackBerry::WebKit::BackingStorePrivate::fillWindow):
1660         * Api/BackingStore_p.h:
1661         (BackingStorePrivate):
1662         * Api/WebSettings.cpp:
1663         (WebKit):
1664         (BlackBerry::WebKit::WebSettings::standardSettings):
1665         (BlackBerry::WebKit::WebSettings::overScrollColor):
1666         (BlackBerry::WebKit::WebSettings::setOverScrollColor):
1667         (BlackBerry::WebKit::WebSettings::isEnableDefaultOverScrollBackground):
1668         (BlackBerry::WebKit::WebSettings::setEnableDefaultOverScrollBackground):
1669         * Api/WebSettings.h:
1670
1671 2012-07-13  Joshua Netterfield  <jnetterfield@rim.com>
1672
1673         [BlackBerry] Update about:* pages
1674         https://bugs.webkit.org/show_bug.cgi?id=91121
1675
1676         Reviewed by Yong Li.
1677
1678         Update the about:config pages, and improve the aesthetics of the about:build, about:version, about:credits, about:memory, about:config, and similar pages.
1679
1680         No new tests, because there is no new funtionality.
1681
1682         * WebCoreSupport/AboutData.cpp:
1683         (WebCore):
1684         (WebCore::writeFeatures):
1685         (WebCore::numberToHTMLTr): Converted to template function, added bool specialization to write "true" and "false" instead of "1" and "0"
1686         (WebCore::configPage):
1687         (WebCore::memoryPage):
1688         * WebCoreSupport/AboutTemplate.html.cpp: Template for BlackBerry about:* pages.
1689
1690 2012-07-12  Benjamin C Meyer  <bmeyer@rim.com>
1691
1692         WebPage::executeJavaScriptFunction crashes when there is an exception
1693         https://bugs.webkit.org/show_bug.cgi?id=91098
1694         RIM PR #149294
1695
1696         When there is an exception currently the code tries to get the string of
1697         the exception via JSValueToStringCopy to pass back, but this cases a
1698         crash inside JavaScriptCore, so change it to simply return false and not
1699         set the return value with the exception string.
1700
1701         Reviewed by George Staikos.
1702
1703         * Api/WebPage.cpp:
1704         (BlackBerry::WebKit::WebPage::executeJavaScriptFunction):
1705
1706 2012-07-12  Pawel Chomicki  <pchomicki@rim.com>
1707
1708         [BlackBerry] WebPage::touchEvent() should use Platform::TouchEvent's toString() for debugging.
1709         https://bugs.webkit.org/show_bug.cgi?id=91002
1710
1711         Reviewed by Antonio Gomes.
1712         Reviewed internally by Genevieve Mak.
1713
1714         Updated DEBUG_TOUCH_EVENTS section of touchEvent method to utilize
1715         Platform::TouchEvent's toString method.
1716
1717         * Api/WebPage.cpp:
1718         (BlackBerry::WebKit::WebPage::touchEvent):
1719
1720 2012-07-12  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1721
1722         [BlackBerry] Cannot use digest proxy auth and NTLM auth at the same time
1723         https://bugs.webkit.org/show_bug.cgi?id=91054
1724
1725         Reviewed by George Staikos.
1726
1727         Implemented interface function syncProxyCredential() derived
1728         from class PageClientBlackBerry.
1729
1730         Internally reviewed by Jason Liu <jason.liu@torchmobile.com.cn>
1731
1732         * Api/WebPage.cpp:
1733         (BlackBerry::WebKit::WebPagePrivate::syncProxyCredential):
1734         (WebKit):
1735         * Api/WebPageClient.h:
1736         * Api/WebPage_p.h:
1737         (WebPagePrivate):
1738
1739 2012-07-11  Mike Lattanzio  <mlattanzio@rim.com>
1740
1741         [BlackBerry] UserViewportArguments are not properly respected.
1742         https://bugs.webkit.org/show_bug.cgi?id=91005
1743
1744         Reviewed by Rob Buis.
1745
1746         PR# 170088.
1747         Move scale and zooming reset on Committed before applying
1748         the user viewport to avoid overriding it immediately.
1749
1750         Internal review by Konrad Piascik, Jacky Jiang.
1751
1752         * Api/WebPage.cpp:
1753         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
1754
1755 2012-07-11  Crystal Zhang  <haizhang@rim.com>
1756
1757         [BlackBerry] Implement Date/Time picker
1758         https://bugs.webkit.org/show_bug.cgi?id=90911
1759
1760         Reviewed by Rob Buis.
1761
1762         Implement HTML Date/Time picker, also should delete popup when closing popup.
1763
1764         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1765         (WebCore::ChromeClientBlackBerry::closePagePopup):
1766         * WebCoreSupport/DatePickerClient.cpp: Added.
1767         (WebCore):
1768         (WebCore::DatePickerClient::DatePickerClient):
1769         (WebCore::DatePickerClient::~DatePickerClient):
1770         (WebCore::DatePickerClient::generateHTML):
1771         (WebCore::DatePickerClient::closePopup):
1772         (WebCore::DatePickerClient::contentSize):
1773         (WebCore::DatePickerClient::htmlSource):
1774         (WebCore::DatePickerClient::setValueAndClosePopup):
1775         (WebCore::DatePickerClient::didClosePopup):
1776         (WebCore::DatePickerClient::writeDocument):
1777         * WebCoreSupport/DatePickerClient.h: Added.
1778         (WebKit):
1779         (WebCore):
1780         (DatePickerClient):
1781         * WebKitSupport/InputHandler.cpp:
1782         (BlackBerry::WebKit::InputHandler::openDatePopup):
1783
1784 2012-07-10  Adam Barth  <abarth@webkit.org>
1785
1786         WebCore::Settings for Hixie76 WebSocket protocol doesn't do anything and should be removed
1787         https://bugs.webkit.org/show_bug.cgi?id=90910
1788
1789         Reviewed by Eric Seidel.
1790
1791         * Api/WebPage.cpp:
1792         (BlackBerry::WebKit::WebPagePrivate::init):
1793
1794 2012-07-10  Adam Barth  <abarth@webkit.org>
1795
1796         LayoutTestController.dumpConfigurationForViewport should move to Internals
1797         https://bugs.webkit.org/show_bug.cgi?id=45652
1798
1799         Reviewed by Eric Seidel.
1800
1801         * WebKitSupport/DumpRenderTreeSupport.cpp:
1802         * WebKitSupport/DumpRenderTreeSupport.h:
1803         (DumpRenderTreeSupport):
1804
1805 2012-07-09  Yong Li  <yoli@rim.com>
1806
1807         [BlackBerry] PagePopupBlackBerry::closePopup() should always clear the pointer in WebPagePrivate
1808         https://bugs.webkit.org/show_bug.cgi?id=90817
1809
1810         Reviewed by Rob Buis.
1811
1812         PR# 174085.
1813         PagePopupBlackBerry::closePopup() should always clear the pointer in WebPagePrivate to avoid crashes.
1814         This patch also removes unused variable m_parentPopup and its setter.
1815
1816         * Api/WebPage.cpp:
1817         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): Remove m_parentPopup.
1818         * Api/WebPage_p.h:
1819         (WebPagePrivate):
1820         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1821         (WebCore::ChromeClientBlackBerry::closePagePopup):
1822         * WebCoreSupport/PagePopupBlackBerry.cpp:
1823         (WebCore::PagePopupBlackBerry::init): Remove the setParentPopup() call.
1824         (WebCore::PagePopupBlackBerry::closePopup): Clear the reference in WebPagePrivate.
1825         * WebCoreSupport/SelectPopupClient.cpp:
1826         (WebCore::SelectPopupClient::setValueAndClosePopup): Add an assert for valid m_element.
1827
1828 2012-07-09  Mike Lattanzio  <mlattanzio@rim.com>
1829
1830         [BlackBerry] meta viewport initial-scale doesn't factor in device pixel ratio
1831         https://bugs.webkit.org/show_bug.cgi?id=90575
1832
1833         Reviewed by Rob Buis.
1834
1835         Refactor meta viewport handling to multiply the developer
1836         specified scale properties by the devicePixelRatio. This
1837         required moving the setting of these values until after
1838         the call to computeViewportAttributes.
1839
1840         This fixes an isssue where content wider than the meta viewport
1841         would case a zoom-out-to-fit scenario because we misinterpreted
1842         the specified initial-scale.
1843
1844         New test to verify wide content doesn't affect initial-scale:
1845         ManualTests/blackberry/meta-viewport-initial-scale-wide-content.html
1846
1847         Internal review from Konrad Piascik, Arvid Nilsson.
1848
1849         * Api/WebPage.cpp:
1850         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
1851         (BlackBerry::WebKit::WebPagePrivate::dispatchViewportPropertiesDidChange):
1852
1853 2012-07-07  George Staikos  <staikos@webkit.org>
1854
1855         Detach animation clients properly if we clear the web page pointer.
1856         https://bugs.webkit.org/show_bug.cgi?id=90730
1857
1858         Reviewed by Adam Treat.
1859
1860         * Api/WebPage.cpp:
1861         (BlackBerry::WebKit::WebPagePrivate::destroyCompositor):
1862         * Api/WebPageCompositor.cpp:
1863         (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
1864         (BlackBerry::WebKit::WebPageCompositorPrivate::~WebPageCompositorPrivate):
1865         (WebKit):
1866         (BlackBerry::WebKit::WebPageCompositorPrivate::detach):
1867         (BlackBerry::WebKit::WebPageCompositorPrivate::setPage):
1868         * Api/WebPageCompositor_p.h:
1869         (WebPageCompositorPrivate):
1870
1871 2012-07-06  Max Feil  <mfeil@rim.com>
1872
1873         [BlackBerry] exitFullScreenForElement() is not working for fullscreen elements in iframes
1874         https://bugs.webkit.org/show_bug.cgi?id=90327
1875
1876         Reviewed by Antonio Gomes.
1877
1878         Fix exit fullscreen problem for elements in iframes. The
1879         exitFullScreenForElement() call is passed a null element in
1880         this case, instead of the original element which entered
1881         fullscreen. If you look in Document.cpp you can see the
1882         exitFullScreenForElement() call being made on the topDocument
1883         (which has a null m_fullScreenElement) instead of the iframe's
1884         document.
1885
1886         The Chromium and Windows ports get around this problem by
1887         storing either the fullscreen element or its frame during
1888         enterFullScreenForElement(), so I will bring the BlackBerry port
1889         in line with this. See also bug 89817.
1890
1891         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1892         (WebCore::ChromeClientBlackBerry::enterFullScreenForElement):
1893         (WebCore::ChromeClientBlackBerry::exitFullScreenForElement):
1894         * WebCoreSupport/ChromeClientBlackBerry.h:
1895         (ChromeClientBlackBerry):
1896
1897 2012-07-06  Benjamin C Meyer  <bmeyer@rim.com>
1898
1899         Add an API to explicitly call a JavaScript function with args.
1900         https://bugs.webkit.org/show_bug.cgi?id=90694
1901
1902         Currently the Blackberry port doesn't expose the JavaScript
1903         engine to 3rd parties so they rely upon executeJavaScript
1904         which can be slower than necessary and unsafe as eval is used.
1905         This new API provides a way to explicitly call a specific
1906         JavaScript function with a list of args preventing the case
1907         where an argument comes from a untrusted source and tries to
1908         escape the arg list to take control of the JavaScript engine.
1909
1910         In the future if the Blackberry port introduces a formal
1911         way to interact with the JavaScript engine this function should
1912         be removed.
1913
1914         PR 149294
1915
1916         Reviewed by Unreviewed
1917
1918         * Api/WebPage.cpp:
1919         (BlackBerry::WebKit::WebPage::executeJavaScriptFunction):
1920         (WebKit):
1921         * Api/WebPage.h:
1922
1923 2012-07-05  Charles Wei  <charles.wei@torchmobile.com.cn>
1924
1925         [BlackBerry] Fix the build error introduced by enabling CUSTOM_THEME_HANDLER
1926         https://bugs.webkit.org/show_bug.cgi?id=90588
1927
1928         Reviewed by Rob Buis.
1929
1930         Fix the build error introduced by enabling CUSTOM_THEME_HANDLER.
1931         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1932         (WebCore::ChromeClientBlackBerry::isProtocolHandlerRegistered):
1933
1934 2012-07-04  Hanna Ma  <Hanma@rim.com>
1935
1936         [BlackBerry] Implement device metrics for blackberry.
1937         https://bugs.webkit.org/show_bug.cgi?id=90494
1938         RIM PR #159034
1939
1940         Reviewed by Rob Buis.
1941
1942         Implement calls to the application to change the device metrics for
1943         the web inspector.
1944
1945         * Api/WebPage.cpp:
1946         (BlackBerry::WebKit::WebPagePrivate::applySizeOverride):
1947         (WebKit):
1948         (BlackBerry::WebKit::WebPagePrivate::setTextZoomFactor):
1949         * Api/WebPage_p.h:
1950         (WebPagePrivate):
1951         * WebCoreSupport/InspectorClientBlackBerry.cpp:
1952         (WebCore::InspectorClientBlackBerry::InspectorClientBlackBerry):
1953         (WebCore::InspectorClientBlackBerry::canOverrideDeviceMetrics):
1954         (WebCore):
1955         (WebCore::InspectorClientBlackBerry::overrideDeviceMetrics):
1956         (WebCore::InspectorClientBlackBerry::supportsFrameInstrumentation):
1957         * WebCoreSupport/InspectorClientBlackBerry.h:
1958         (InspectorClientBlackBerry):
1959
1960 2012-07-03  Leo Yang  <leo.yang@torchmobile.com.cn>
1961
1962         [BlackBerry] Checkerboard shown when clicking on error page buttons
1963         https://bugs.webkit.org/show_bug.cgi?id=90152
1964         RIM PR #161867
1965
1966         Reviewed by George Staikos.
1967
1968         r121514 just made the race occur in lower possibility but can't avoid it.
1969         This path is using another approach to fix the problem. When we are resetting
1970         backingstore while committing a page we need to suspend backingstore and
1971         screen update to make sure no other threads can update backingstore and screen.
1972
1973         * Api/BackingStore.cpp:
1974         (BlackBerry::WebKit::BackingStorePrivate::resetTiles):
1975         * Api/WebPage.cpp:
1976         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
1977
1978 2012-07-03  George Staikos  <staikos@webkit.org>
1979
1980         [BlackBerry] Enable Custom Scheme Handlers for BlackBerry.
1981         https://bugs.webkit.org/show_bug.cgi?id=90422
1982
1983         Reviewed by Rob Buis.
1984
1985         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1986         (WebCore):
1987         (WebCore::ChromeClientBlackBerry::isProtocolHandlerRegistered):
1988         (WebCore::ChromeClientBlackBerry::unregisterProtocolHandler):
1989         * WebCoreSupport/ChromeClientBlackBerry.h:
1990         (ChromeClientBlackBerry):
1991
1992 2012-07-03  George Staikos  <staikos@webkit.org>
1993
1994         [BlackBerry] Enable RegisterProtocolHandler for BlackBerry.
1995         https://bugs.webkit.org/show_bug.cgi?id=90422
1996
1997         Reviewed by Rob Buis.
1998
1999         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2000         (WebCore):
2001         (WebCore::ChromeClientBlackBerry::registerProtocolHandler):
2002         * WebCoreSupport/ChromeClientBlackBerry.h:
2003         (ChromeClientBlackBerry):
2004
2005 2012-07-03  Jan Keromnes  <janx@linux.com>
2006
2007         Web Inspector: WebInspector.TextViewer should be renamed WebInspector.TextEditor
2008         https://bugs.webkit.org/show_bug.cgi?id=89939
2009
2010         Reviewed by Vsevolod Vlasov.
2011
2012         * WebCoreSupport/inspectorBB.html:
2013
2014 2012-07-02  Xiaobo Wang  <xbwang@torchmobile.com.cn>
2015
2016         [BlackBerry] Use PUBLIC_BUILD to enable/disable DRT
2017         https://bugs.webkit.org/show_bug.cgi?id=90271
2018
2019         Reviewed by George Staikos.
2020
2021         RIM PR #154707
2022
2023         Currently DRT code will be compiled only if ENABLE_DRT is set, and it's not
2024         defined by default.
2025         We should enable DRT by default unless PUBLIC_BUILD is set. In this way we don't
2026         need to rebuild webkit before running DRT.
2027
2028         * Api/WebPage.cpp:
2029         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
2030         (BlackBerry::WebKit::WebPagePrivate::init):
2031         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
2032         (BlackBerry::WebKit::WebPage::runLayoutTests):
2033         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2034         (WebCore::ChromeClientBlackBerry::addMessageToConsole):
2035         (WebCore::ChromeClientBlackBerry::runJavaScriptAlert):
2036         (WebCore::ChromeClientBlackBerry::runJavaScriptConfirm):
2037         (WebCore::ChromeClientBlackBerry::runJavaScriptPrompt):
2038         (WebCore::ChromeClientBlackBerry::createWindow):
2039         (WebCore::ChromeClientBlackBerry::runBeforeUnloadConfirmPanel):
2040         (WebCore::ChromeClientBlackBerry::setStatusbarText):
2041         (WebCore::ChromeClientBlackBerry::exceededDatabaseQuota):
2042         (WebCore::ChromeClientBlackBerry::keyboardUIMode):
2043
2044 2012-07-02  George Staikos  <staikos@webkit.org>
2045
2046         [BlackBerry] Implement cancelVibration, and make sure it's canceled on
2047         destruction.
2048         https://bugs.webkit.org/show_bug.cgi?id=90406
2049
2050         Reviewed by Rob Buis.
2051
2052         * WebCoreSupport/VibrationClientBlackBerry.cpp:
2053         (WebCore::VibrationClientBlackBerry::cancelVibration):
2054         (WebCore::VibrationClientBlackBerry::vibrationDestroyed):
2055
2056 2012-07-02  Benjamin Poulain  <bpoulain@apple.com>
2057
2058         Do not do any logging initialization when logging is disabled
2059         https://bugs.webkit.org/show_bug.cgi?id=90228
2060
2061         Reviewed by Simon Fraser.
2062
2063         * Api/BlackBerryGlobal.cpp:
2064         (BlackBerry::WebKit::globalInitialize):
2065
2066 2012-07-01  George Staikos  <staikos@webkit.org>
2067
2068         Clear visited links when clearing history.
2069         https://bugs.webkit.org/show_bug.cgi?id=90345
2070
2071         Reviewed by Antonio Gomes.
2072
2073         * Api/WebPage.cpp:
2074         (BlackBerry::WebKit::WebPage::clearHistory):
2075
2076 2012-06-30  Jason Liu  <jason.liu@torchmobile.com.cn>
2077
2078         [BlackBerry] WebView/Browser cause blank screen when selecting a dropdown field.
2079         https://bugs.webkit.org/show_bug.cgi?id=90241
2080
2081         This issue is caused by single quotes in option's labels.
2082         We should use the escape character of single quotes in JavaScript's string which 
2083         starts and ends with single quotes.
2084         So we replace lablels' single quotes with its escape character during generating the 
2085         select popUp's HTML.
2086
2087         Reviewed by George Staikos.
2088
2089         * WebCoreSupport/SelectPopupClient.cpp:
2090         (WebCore::SelectPopupClient::generateHTML):
2091
2092 2012-06-30  Jakob Petsovits  <jpetsovits@rim.com>
2093
2094         [BlackBerry] Allow surface resizing for use cases other than rotation.
2095         https://bugs.webkit.org/show_bug.cgi?id=90295
2096         RIM PR 171459
2097
2098         Reviewed by George Staikos.
2099
2100         A new API method setHasPendingSurfaceSizeChange() is
2101         introduced for that effect, and used inside of
2102         setViewportSize() to let the WebPageClient do the
2103         resizing. Methods are renamed to reflect that this
2104         is not exclusively meant for rotation anymore.
2105
2106         * Api/WebPage.cpp:
2107         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
2108         (BlackBerry::WebKit::WebPage::setScreenOrientation):
2109         (WebKit):
2110         (BlackBerry::WebKit::WebPage::setHasPendingSurfaceSizeChange):
2111         (BlackBerry::WebKit::WebPagePrivate::resizeSurfaceIfNeeded):
2112         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
2113         * Api/WebPage.h:
2114         * Api/WebPageClient.h:
2115         * Api/WebPage_p.h:
2116         (WebPagePrivate):
2117
2118 2012-06-29  Jacky Jiang  <zhajiang@rim.com>
2119
2120         [BlackBerry] Page jumps after post-pinch-zoom re-render
2121         https://bugs.webkit.org/show_bug.cgi?id=90282
2122
2123         Reviewed by Antonio Gomes.
2124
2125         PR: 170255
2126         In r120622, we moved ScrollableArea::setConstrainsScrollingToContentEdge(false|true)
2127         from WebPage::setScrollPosition() to BackingStorePrivate::setScrollingOrZooming()
2128         to address an overscroll reset issue.
2129         However, when we are ending bitmap zooming, UI thread can call
2130         BackingStorePrivate::setScrollingOrZooming(false) before WebKit thread
2131         calls WebPage::setScrollPosition(), in which case it will set
2132         ScrollableArea::m_constrainsScrollingToContentEdge to true earlier.
2133         To fix this, we can cache ScrollableArea::m_constrainsScrollingToContentEdge
2134         and always set it to false before we set scroll position in WebKit
2135         thread to avoid scroll position clamping during scrolling, and restore
2136         it to what it was after that.
2137
2138         * Api/WebPage.cpp:
2139         (BlackBerry::WebKit::WebPage::setScrollPosition):
2140
2141 2012-06-29  Jakob Petsovits  <jpetsovits@rim.com>
2142
2143         Add blitVisibleContents() as public API.
2144         https://bugs.webkit.org/show_bug.cgi?id=90211
2145
2146         Reviewed by Adam Treat.
2147
2148         We keep blitContents() (with src/dst rectangles)
2149         for compatibility with older Cascades sprints for now,
2150         but want to switch to always blitting the full viewport
2151         and this is a good first step.
2152
2153         * Api/BackingStore.cpp:
2154         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
2155         (BlackBerry::WebKit::BackingStore::blitVisibleContents):
2156         (WebKit):
2157         * Api/BackingStore.h:
2158
2159 2012-06-29  Konrad Piascik  <kpiascik@rim.com>
2160
2161         Don't hardcode target dpi of 160 (it should be 96 on desktop)
2162         https://bugs.webkit.org/show_bug.cgi?id=88114
2163
2164         Reviewed by Adam Barth.
2165
2166         Added new WebSetting to specify what the devicePixelRatio should be.
2167         Updated the call to computeViewportAttributes.
2168
2169         * Api/WebPage.cpp:
2170         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
2171         * Api/WebSettings.cpp:
2172         (WebKit):
2173         (BlackBerry::WebKit::WebSettings::standardSettings):
2174         (BlackBerry::WebKit::WebSettings::devicePixelRatio):
2175         (BlackBerry::WebKit::WebSettings::setDevicePixelRatio):
2176         * Api/WebSettings.h:
2177         * WebKitSupport/DumpRenderTreeSupport.cpp:
2178         (DumpRenderTreeSupport::dumpConfigurationForViewport):
2179
2180 2012-06-28  Jason Liu  <jason.liu@torchmobile.com.cn>
2181
2182         [BlackBerry] Selection items show as garbage for non-ascii characters.
2183         https://bugs.webkit.org/show_bug.cgi?id=89969
2184
2185         Add charset utf-8 to the select popup's page.
2186
2187         Reviewed by Antonio Gomes.
2188
2189         * WebCoreSupport/SelectPopupClient.cpp:
2190         (WebCore::SelectPopupClient::generateHTML):
2191
2192 2012-06-28  Leo Yang  <leo.yang@torchmobile.com.cn>
2193
2194         [BlackBerry] Checkerboard shown when clicking on error page buttons
2195         https://bugs.webkit.org/show_bug.cgi?id=90152
2196         RIM PR #161867
2197
2198         Reviewed by George Staikos.
2199
2200         Reset m_hasBlitJobs when resetting tiles to prevent ui thread from drawing checkerboard unintentionally.
2201
2202         * Api/BackingStore.cpp:
2203         (BlackBerry::WebKit::BackingStorePrivate::resetTiles):
2204
2205 2012-06-27  Andrew Lo  <anlo@rim.com>
2206
2207         [BlackBerry] Selection overlay can become visible after it has been hidden
2208         https://bugs.webkit.org/show_bug.cgi?id=90105
2209
2210         Reviewed by George Staikos.
2211
2212         When SelectionOverlay::hide is called from UI thread,
2213         rather than setting the override opacity, dispatch to the
2214         WebKit thread, which removes the overlay (normal case).
2215
2216         Internal PR164183.
2217         Internally Reviewed by: Arvid Nilsson.
2218
2219         * Api/WebPage.cpp:
2220         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
2221         (BlackBerry::WebKit::WebPage::selectionOverlay):
2222         * Api/WebPage_p.h:
2223         (WebPagePrivate):
2224         * Api/WebSelectionOverlay.h:
2225         * WebKitSupport/SelectionOverlay.cpp:
2226         (BlackBerry::WebKit::SelectionOverlay::SelectionOverlay):
2227         (BlackBerry::WebKit::SelectionOverlay::hide):
2228         * WebKitSupport/SelectionOverlay.h:
2229         (BlackBerry::WebKit::SelectionOverlay::create):
2230         (SelectionOverlay):
2231
2232 2012-06-25  Mark Hahnenberg  <mhahnenberg@apple.com>
2233
2234         JSLock should be per-JSGlobalData
2235         https://bugs.webkit.org/show_bug.cgi?id=89123
2236
2237         Reviewed by Geoffrey Garen.
2238
2239         Changed all sites that used JSLock to instead use the new JSLockHolder
2240         and pass in the correct JS context that the code is about to interact with that 
2241         needs protection. Also added a couple JSLocks to places that didn't already 
2242         have it that needed it.
2243
2244         * Api/BlackBerryGlobal.cpp:
2245         (BlackBerry::WebKit::clearMemoryCaches):
2246         * WebCoreSupport/ClientExtension.cpp:
2247         * WebCoreSupport/PagePopupBlackBerry.cpp:
2248         (WebCore::PagePopupBlackBerry::installDomFunction):
2249         * WebKitSupport/DumpRenderTreeSupport.cpp:
2250         (DumpRenderTreeSupport::computedStyleIncludingVisitedInfo):
2251
2252 2012-06-27  Jacky Jiang  <zhajiang@rim.com>
2253
2254         [BlackBerry] Wrong scale after leaving fullscreen <video>
2255         https://bugs.webkit.org/show_bug.cgi?id=89546
2256
2257         Reviewed by Antonio Gomes.
2258
2259         PR: 164948
2260         When we were entering fullscreen, the current scale A was clamped to a
2261         greater minimum scale B as we relayouted the contents during the change
2262         of the viewport size. When leaving fullscreen, we still used that scale
2263         B as the current scale which was incorrect.
2264         To fix this, we can save the current scale when entering fullscreen and
2265         restore it when leaving fullscreen.
2266
2267         * Api/WebPage.cpp:
2268         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
2269         (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
2270         (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
2271         * Api/WebPage_p.h:
2272         (WebPagePrivate):
2273
2274 2012-06-27  Jacky Jiang  <zhajiang@rim.com>
2275
2276         [BlackBerry] Scale was incorrect when reloading a simple web page after initial load
2277         https://bugs.webkit.org/show_bug.cgi?id=88889
2278
2279         Reviewed by Antonio Gomes.
2280
2281         PR: 164442
2282         For FrameLoadTypeStandard load, the layout timer can be fired which can
2283         call dispatchDidFirstVisuallyNonEmptyLayout() after the load Finished
2284         state, in which case the web page will have no chance to zoom to
2285         initial scale. We should give it a chance as well as FrameLoadTypeSame
2286         load.
2287
2288         * Api/WebPage.cpp:
2289         (BlackBerry::WebKit::WebPagePrivate::shouldZoomToInitialScaleOnLoad):
2290
2291 2012-06-26  Mike Fenton  <mifenton@rim.com>
2292
2293         [BlackBerry] Add WebPage interface for Async spell check.
2294         https://bugs.webkit.org/show_bug.cgi?id=89999
2295
2296         Reviewed by Rob Buis.
2297
2298         PR 124517.
2299
2300         Add interface for IMS async spell checking.
2301
2302         Reviewed Internally by Nima Ghanavatian.
2303
2304         * Api/WebPage.cpp:
2305         (BlackBerry::WebKit::WebPage::spellCheckingRequestProcessed):
2306         (WebKit):
2307         * Api/WebPage.h:
2308         * Api/WebPageClient.h:
2309         * WebKitSupport/InputHandler.cpp:
2310         (WebKit):
2311         (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
2312         * WebKitSupport/InputHandler.h:
2313         (InputHandler):
2314
2315 2012-06-26  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2316
2317         [BlackBerry] Limit session storage quota to 5MB by default
2318         https://bugs.webkit.org/show_bug.cgi?id=89941
2319
2320         Reviewed by Rob Buis.
2321
2322         Limit session storage quota to 5MB by default for BlackBerry
2323         porting.
2324         Internally reviewed by George Staikos.
2325
2326         * Api/WebPage.cpp:
2327         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
2328         * Api/WebSettings.cpp:
2329         (WebKit):
2330         (BlackBerry::WebKit::WebSettings::standardSettings):
2331         (BlackBerry::WebKit::WebSettings::sessionStorageQuota):
2332         (BlackBerry::WebKit::WebSettings::setSessionStorageQuota):
2333         * Api/WebSettings.h:
2334
2335 2012-06-26  Charles Wei  <charles.wei@torchmobile.com.cn>
2336
2337         [BlackBerry] Use gesture SwipeDown to exit fullscreen for both video and plugin.
2338         https://bugs.webkit.org/show_bug.cgi?id=89960
2339
2340         Reviewed by Antonio Gomes.
2341
2342         We used to use gesture swipedown to exit fullscreen for plugin, but not fullscreen
2343         HTML5 video; When a swipe down happens, it applies this event to all the pluginviews
2344         in a page, even though only the one in fullscreen mode will process this.
2345
2346         With this patch, the SwipeDown gesture will only apply to the fullscreen elemement,
2347         which is either a plugin, or an Video element.
2348
2349         * Api/WebPage.cpp:
2350         (BlackBerry::WebKit::WebPage::notifySwipeEvent):
2351
2352 2012-06-25  Leo Yang  <leo.yang@torchmobile.com.cn>
2353
2354         [BlackBerry] Fill more data in device motion event
2355         https://bugs.webkit.org/show_bug.cgi?id=89857
2356
2357         Reviewed by Antonio Gomes.
2358
2359         Reviewed internally by Robin Cao.
2360
2361         Fill acceleration and rotation rate into DeviceMotionData.
2362
2363         * WebCoreSupport/DeviceMotionClientBlackBerry.cpp:
2364         (DeviceMotionClientBlackBerry::onMotion):
2365
2366 2012-06-25  Yong Li  <yoli@rim.com>
2367
2368         [BlackBerry] Add JSC statistics into about:memory
2369         https://bugs.webkit.org/show_bug.cgi?id=89779
2370
2371         Reviewed by Rob Buis.
2372
2373         Add detailed JS memory statistics to about:memory page.
2374
2375         * WebCoreSupport/AboutData.cpp:
2376         (WebCore::dumpJSCTypeCountSetToTableHTML):
2377         (WebCore):
2378         (WebCore::memoryPage):
2379
2380 2012-06-25  Crystal Zhang  <haizhang@rim.com>
2381
2382         [BlackBerry] Use AIR controls if client doesn't support HTML control
2383         https://bugs.webkit.org/show_bug.cgi?id=89777
2384
2385         Reviewed by Yong Li.
2386
2387         Currently HTML controls depend on client implementing CreateWindow event, for those clients
2388         that don't implement CreateWindow event, use old AIR controls so we don't break them.
2389
2390         PR 163818.
2391
2392         Internal reviewed by Mike Fenton.
2393
2394         * Api/WebPageClient.h:
2395         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2396         (WebCore::ChromeClientBlackBerry::openPagePopup):
2397         * WebCoreSupport/PagePopupBlackBerry.cpp:
2398         (WebCore::PagePopupBlackBerry::sendCreatePopupWebViewRequest):
2399         * WebCoreSupport/PagePopupBlackBerry.h:
2400         (PagePopupBlackBerry):
2401         * WebKitSupport/InputHandler.cpp:
2402         (BlackBerry::WebKit::InputHandler::openSelectPopup):
2403
2404 2012-06-25  Rob Buis  <rbuis@rim.com>
2405
2406         [BlackBerry] Require text editable element to be enabled for VKB
2407         https://bugs.webkit.org/show_bug.cgi?id=89876
2408
2409         Reviewed by Yong Li.
2410
2411         After bug 58837 got in, children of <fieldset> now can inherit the disabled
2412         state of the fieldset. When trying for instance fast/forms/fieldset/fieldset-disabled.html,
2413         it can be seen that when they are visually disabled, the input handling can still be triggered. So
2414         add an extra check to isTextBasedContentEditableElement that the element is enabled.
2415
2416         Reviewed internally by Mike Fenton.
2417
2418         * WebKitSupport/DOMSupport.cpp:
2419         (BlackBerry::WebKit::DOMSupport::isTextBasedContentEditableElement):
2420
2421 2012-06-24  Simon Fraser  <simon.fraser@apple.com>
2422
2423         Rename isPositioned to isOutOfFlowPositioned for clarity
2424         https://bugs.webkit.org/show_bug.cgi?id=89836
2425
2426         Reviewed by Antti Koivisto.
2427         
2428         RenderObject and RenderStyle had an isPositioned() method that was
2429         confusing, because it excluded relative positioning. Rename to 
2430         isOutOfFlowPositioned(), which makes it clearer that it only applies
2431         to absolute and fixed positioning.
2432
2433         Simple rename; no behavior change.
2434
2435         * Api/WebPage.cpp:
2436         (BlackBerry::WebKit::isPositionedContainer):
2437         (BlackBerry::WebKit::isNonRenderViewFixedPositionedContainer):
2438         (BlackBerry::WebKit::isFixedPositionedContainer):
2439
2440 2012-06-23  Sheriff Bot  <webkit.review.bot@gmail.com>
2441
2442         Unreviewed, rolling out r121058.
2443         http://trac.webkit.org/changeset/121058
2444         https://bugs.webkit.org/show_bug.cgi?id=89809
2445
2446         Patch causes plugins tests to crash in GTK debug builds
2447         (Requested by zdobersek on #webkit).
2448
2449         * Api/BlackBerryGlobal.cpp:
2450         (BlackBerry::WebKit::clearMemoryCaches):
2451         * WebCoreSupport/ClientExtension.cpp:
2452         * WebCoreSupport/PagePopupBlackBerry.cpp:
2453         (WebCore::PagePopupBlackBerry::installDomFunction):
2454         * WebKitSupport/DumpRenderTreeSupport.cpp:
2455         (DumpRenderTreeSupport::computedStyleIncludingVisitedInfo):
2456
2457 2012-06-20  Mark Hahnenberg  <mhahnenberg@apple.com>
2458
2459         JSLock should be per-JSGlobalData
2460         https://bugs.webkit.org/show_bug.cgi?id=89123
2461
2462         Reviewed by Gavin Barraclough.
2463
2464         Changed all sites that used JSLock to instead use the new JSLockHolder
2465         and pass in the correct JS context that the code is about to interact with that 
2466         needs protection.
2467
2468         * Api/BlackBerryGlobal.cpp:
2469         (BlackBerry::WebKit::clearMemoryCaches):
2470         * WebCoreSupport/ClientExtension.cpp:
2471         * WebCoreSupport/PagePopupBlackBerry.cpp:
2472         (WebCore::PagePopupBlackBerry::installDomFunction):
2473         * WebKitSupport/DumpRenderTreeSupport.cpp:
2474         (DumpRenderTreeSupport::computedStyleIncludingVisitedInfo):
2475
2476 2012-06-22  Andrew Lo  <anlo@rim.com>
2477
2478         [BlackBerry] Tap highlight fade animations are added to overlay continuously during pinch zoom.
2479         https://bugs.webkit.org/show_bug.cgi?id=89772
2480
2481         Reviewed by Antonio Gomes.
2482
2483         When pinch zooming, DefaultTapHighlight::hide is continuously
2484         called from the UI thread. This resulted in fade animations being
2485         created and added to the override overlay continuously.
2486
2487         This patch moves the m_visible check so that it applies for both
2488         threads.
2489
2490         Internal PR164183
2491
2492         * WebKitSupport/DefaultTapHighlight.cpp:
2493         (BlackBerry::WebKit::DefaultTapHighlight::draw):
2494         (BlackBerry::WebKit::DefaultTapHighlight::hide):
2495         * WebKitSupport/DefaultTapHighlight.h:
2496         (DefaultTapHighlight):
2497
2498 2012-06-22  Yong Li  <yoli@rim.com>
2499
2500         [BlackBerry] Set WebSecurityEnabled flag accordingly.
2501         https://bugs.webkit.org/show_bug.cgi?id=89602
2502
2503         Reviewed by Rob Buis.
2504
2505         Disable web security checks if needed.
2506
2507         * Api/WebPage.cpp:
2508         (BlackBerry::WebKit::WebPagePrivate::init):
2509         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
2510
2511 2012-06-22  Parth Patel  <parpatel@rim.com>
2512
2513         [Blackberry] BlackBerry::Platform::Settings::get() rename to BlackBerry::Platform::Settings::instance() to make it consistent with our other singletons
2514         https://bugs.webkit.org/show_bug.cgi?id=89684
2515
2516         Reviewed by Yong Li.
2517
2518         Build Fix-Typo Update setting instance access to use instance() instead of get().
2519
2520         * WebKitSupport/InputHandler.cpp:
2521         (BlackBerry::WebKit::InputHandler::isInputModeEnabled):
2522
2523 2012-06-22  Amy Ousterhout  <aousterh@chromium.org>
2524
2525         Renamed DeviceOrientation to DeviceOrientationData
2526         https://bugs.webkit.org/show_bug.cgi?id=88663
2527
2528         Reviewed by Steve Block.
2529
2530         Updated files to use the renamed DeviceOrientationData instead of DeviceOrientation.
2531         This change makes DeviceOrientationData consistent with DeviceMotionData.
2532
2533         * WebCoreSupport/DeviceOrientationClientBlackBerry.h:
2534         (DeviceOrientationClientBlackBerry):
2535
2536 2012-06-22  Joseph Pecoraro  <pecoraro@apple.com>
2537
2538         Web Inspector: InspectorState::updateCookie should not do JSON serialization if unsupported
2539         https://bugs.webkit.org/show_bug.cgi?id=89743
2540
2541         Reviewed by Yury Semikhatsky.
2542
2543         * WebCoreSupport/InspectorClientBlackBerry.cpp:
2544         (WebCore::InspectorClientBlackBerry::updateInspectorStateCookie):
2545
2546 2012-06-21  Parth Patel  <parpatel@rim.com>
2547
2548         [Blackberry] BlackBerry::Platform::Settings::get() rename to BlackBerry::Platform::Settings::instance() to make it consistent with our other singletons
2549         https://bugs.webkit.org/show_bug.cgi?id=89684
2550
2551         Reviewed by Yong Li.
2552    
2553         Update setting instance access to use instance() instead of get().
2554
2555         * Api/BlackBerryGlobal.cpp:
2556         (BlackBerry::WebKit::globalInitialize):
2557         * Api/WebPage.cpp:
2558         (BlackBerry::WebKit::WebPagePrivate::init):
2559         (BlackBerry::WebKit::WebPagePrivate::shouldSendResizeEvent):
2560         * WebCoreSupport/AboutData.cpp:
2561         (WebCore::configPage):
2562         * WebCoreSupport/CacheClientBlackBerry.cpp:
2563         (WebCore::CacheClientBlackBerry::updateCacheCapacity):
2564         * WebKitSupport/FatFingers.cpp:
2565         (BlackBerry::WebKit::FatFingers::getPaddings):
2566         * WebKitSupport/InputHandler.cpp:
2567         (BlackBerry::WebKit::InputHandler::isInputModeEnabled):
2568         (BlackBerry::WebKit::InputHandler::setInputModeEnabled):
2569         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
2570         * WebKitSupport/SurfacePool.cpp:
2571         (BlackBerry::WebKit::SurfacePool::initialize):
2572
2573 2012-06-21  Genevieve Mak  <gmak@rim.com>
2574
2575         Add a parameter to handletTouchPoint to bypass FatFingers
2576         on touch up. There are some cases where the user may drag
2577         their finger off the element and we want to use the actual
2578         touch point instead of the FatFingers adjusted point.
2579         https://bugs.webkit.org/show_bug.cgi?id=89677
2580
2581         Reviewed by Antonio Gomes.
2582
2583         * Api/WebPage.cpp:
2584         (BlackBerry::WebKit::WebPage::touchPointAsMouseEvent):
2585         * Api/WebPage.h:
2586         * WebKitSupport/TouchEventHandler.cpp:
2587         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
2588         * WebKitSupport/TouchEventHandler.h:
2589         (TouchEventHandler):
2590
2591 2012-06-21  Mike Fenton  <mifenton@rim.com>
2592
2593         [BlackBerry] Input mode should adapt automatically to settings changes
2594         https://bugs.webkit.org/show_bug.cgi?id=89595
2595
2596         Reviewed by Antonio Gomes.
2597
2598         PR 167540.
2599
2600         Add helper function to check if input is enabled so that
2601         the override settings can be applied at any time.
2602
2603         Reviewed Internally by Gen Mak.
2604
2605         * Api/WebPage.cpp:
2606         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
2607         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
2608         * WebKitSupport/InputHandler.cpp:
2609         (BlackBerry::WebKit::InputHandler::isInputModeEnabled):
2610         (BlackBerry::WebKit::InputHandler::setInputModeEnabled):
2611         (BlackBerry::WebKit::InputHandler::setElementFocused):
2612         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
2613         (BlackBerry::WebKit::InputHandler::notifyClientOfKeyboardVisibilityChange):
2614         (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
2615         (BlackBerry::WebKit::InputHandler::setComposingText):
2616         * WebKitSupport/InputHandler.h:
2617         * WebKitSupport/TouchEventHandler.cpp:
2618         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
2619
2620 2012-06-20  Jacky Jiang  <zhajiang@rim.com>
2621
2622         Add a != operator to ViewportArguments
2623         https://bugs.webkit.org/show_bug.cgi?id=87505
2624
2625         Reviewed by Antonio Gomes.
2626         Patch by Jacky Jiang  <zhajiang@rim.com>
2627
2628         Use != operator of ViewportArguments.
2629
2630         * Api/WebPage.cpp:
2631         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
2632         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
2633         * Api/WebViewportArguments.cpp:
2634         (BlackBerry::WebKit::WebViewportArguments::operator!=):
2635
2636 2012-06-20  Christopher Hutten-Czapski  <chutten@rim.com>
2637
2638         [BlackBerry] Add an API to immediately enable cross-site XHR
2639         https://bugs.webkit.org/show_bug.cgi?id=89594
2640
2641         Internally Reviewed by Yong Li.
2642         Reviewed by Rob Buis.
2643
2644         There is no API to disable it as clients may rely on legacy behaviour
2645         of not disabling until the next frame load.
2646
2647         * Api/WebPage.cpp:
2648         (BlackBerry::WebKit::enableCrossSiteXHRRecursively):
2649         (WebKit):
2650         (BlackBerry::WebKit::WebPagePrivate::enableCrossSiteXHR):
2651         (BlackBerry::WebKit::WebPage::enableCrossSiteXHR):
2652         * Api/WebPage.h:
2653         * Api/WebPage_p.h:
2654         (WebPagePrivate):
2655
2656 2012-06-20  Konrad Piascik  <kpiascik@rim.com>
2657
2658         [BlackBerry] Enable setAcceleratedCompositingForFixedPositionEnabled
2659         https://bugs.webkit.org/show_bug.cgi?id=89575
2660
2661         Reviewed by Antonio Gomes.
2662
2663         Enable the flag so that we get position:fixed elemetns to be rendered
2664         using accelerated compositing.
2665
2666         * Api/WebPage.cpp:
2667         (BlackBerry::WebKit::WebPagePrivate::init):
2668
2669 2012-06-20  Julien Chaffraix  <jchaffraix@webkit.org>
2670
2671         Use IntSize in RenderLayer to represent scroll offsets
2672         https://bugs.webkit.org/show_bug.cgi?id=89154
2673
2674         Reviewed by Eric Seidel.
2675
2676         * Api/WebPage.cpp:
2677         (BlackBerry::WebKit::WebPagePrivate::scrollRenderer):
2678         Updated to pass an IntSize to scrollToOffset.
2679
2680 2012-06-19  Yong Li  <yoli@rim.com>
2681
2682         [BlackBerry] Should check the return value of fromUTF8() before executing the script.
2683         https://bugs.webkit.org/show_bug.cgi?id=89500
2684
2685         Reviewed by Rob Buis.
2686         PR# 166623.
2687
2688         WebPagePrivate::executeJavaScript() should check the return value of fromUTF8()
2689         before executing the script to avoid potential crash on invalid script source.
2690
2691         * Api/WebPage.cpp:
2692         (BlackBerry::WebKit::WebPagePrivate::executeJavaScript):
2693
2694 2012-06-19  Jakob Petsovits  <jpetsovits@rim.com>
2695
2696         [BlackBerry] Missing notifyContentRendered() when resuming rendering
2697         https://bugs.webkit.org/show_bug.cgi?id=89507
2698         RIM PR 150049
2699
2700         Reviewed by Antonio Gomes.
2701
2702         All the current calls to notifyContentRendered() are
2703         located in the RenderQueue, but this omits the case
2704         when we force rendering from resumeBackingStore()
2705         after rendering had been suspended for a while.
2706
2707         * Api/WebPage.cpp:
2708         (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore):
2709
2710 2012-06-19  Sergio Villar Senin  <svillar@igalia.com>
2711
2712         Calling nativeImageForCurrentFrame() causes assertion failure: m_verifier.isSafeToUse()
2713         https://bugs.webkit.org/show_bug.cgi?id=67582
2714
2715         Reviewed by David Levin.
2716
2717         Use synchronousNativeIconForPageURL() to retrieve favicons.
2718
2719         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2720         (WebCore::FrameLoaderClientBlackBerry::dispatchDidReceiveIcon):
2721
2722 2012-06-18  Antonio Gomes  <agomes@rim.com>
2723
2724        [BlackBerry] Overscroll can get reset while interacting with a page, due to style recalculations and scroll position clamping
2725        https://bugs.webkit.org/show_bug.cgi?id=89371
2726        PR #166982
2727
2728        Reviewed by Adam Treat.
2729
2730        While scrolling, the WebKit thread gets intercalated WebPage::setScrollPosition
2731        calls dispatched from the UI thread. These calls are wrapped with
2732        ScrollableArea::setConstrainsScrollingToContentEdge(false|true) calls, which
2733        can clamp the scroll position (removes overscroll) if set to 'true'.
2734
2735        The following situation can happen: user is scrolling, and WebKit
2736        thread is not in the middle of a WebPage::setScrollPosition call
2737        (so setConstrainsScrollingToContentEdge is 'true'), and a relayout happens.
2738        In this scenario, the scroll position will get clamped to 0,0, removing any
2739        possible overscrolling.
2740
2741        See the stack trace below, paying special attention to frame 16:
2742        #0  ScrollHandlerUserInterfaceThread::updateScrollPosition
2743        #1  0x782b4a3e in WebPageClientImpl::scrollChanged
2744        #2  0x78147484 in BlackBerry::WebKit::WebPagePrivate::notifyTransformedScrollChanged
2745        #3  0x78171f68 in BlackBerry::WebKit::BackingStoreClient::checkOriginOfCurrentScrollOperation
2746        #4  0x7816480a in WebCore::ChromeClientBlackBerry::scroll
2747        #5  0x7a78b290 in WebCore::Chrome::scroll
2748        #6  0x7a7ac8d0 in WebCore::FrameView::scrollContentsFastPath
2749        #7  0x7a7eba72 in WebCore::ScrollView::scrollContents
2750        #8  0x7a7ebb34 in WebCore::ScrollView::scrollTo
2751        #9  0x7a7a8dae in WebCore::FrameView::scrollTo
2752        #10 0x7a7e966e in WebCore::ScrollView::setScrollOffset
2753        #11 0x7a7e77cc in WebCore::ScrollableArea::scrollPositionChanged
2754        #12 0x7a7e7048 in WebCore::ScrollAnimator::notifyPositionChanged
2755        #13 0x7a7e700c in WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation
2756        #14 0x7a7e7588 in WebCore::ScrollableArea::scrollToOffsetWithoutAnimation
2757        #16 WebCore::ScrollView::updateScrollbars
2758        #18 WebCore::ScrollView::setContentsSize
2759        #19 0x7a7accd8 in WebCore::FrameView::setContentsSize
2760        #20 0x7a7a85f4 in WebCore::FrameView::adjustViewSize
2761        #22 WebCore::FrameView::layout
2762        #23 0x7a59d66e in WebCore::Document::updateLayoutIgnorePendingStylesheets
2763        #24 0x7a5ada92 in WebCore::Element::offsetHeight
2764        #25 0x7ab226b6 in WebCore::jsElementOffsetHeight
2765        #27 JSC::JSValue::get
2766        #28 0x796dd662 in JSC::JITStubThunked_op_get_by_id_generic
2767
2768        Patch fixes this issue by tying ScrollableArea::setConstrainsScrollingToContentEdge
2769        to BackingStore::m_isZoomingOrScrolling, when we are sure clamping should not happen.
2770
2771        * Api/BackingStore.cpp:
2772        (BlackBerry::WebKit::BackingStorePrivate::setScrollingOrZooming):
2773        * Api/WebPage.cpp:
2774        (BlackBerry::WebKit::WebPage::setScrollPosition):
2775
2776 2012-06-15  Eli Fidler  <efidler@rim.com>
2777
2778         [BlackBerry] Use platform font settings for the standard settings.
2779         https://bugs.webkit.org/show_bug.cgi?id=89232
2780
2781         Reviewed by Rob Buis.
2782
2783         RIM PR 159708
2784
2785         * Api/WebSettings.cpp:
2786         (BlackBerry::WebKit::WebSettings::standardSettings):
2787
2788 2012-06-15  Crystal Zhang  <haizhang@rim.com>
2789
2790         [BlackBerry] Remove touch events handling hook for popup
2791         https://bugs.webkit.org/show_bug.cgi?id=89245
2792
2793         Reviewed by Rob Buis.
2794
2795         In the old patches we create our own WebPage for popup, so we need to hook up our own
2796         touch handling functions, since we don't use our own WebPage any more, no need to keep
2797         the touch handling code, because it just does nothing other than passing out the events
2798         which might cause the touch events being handled twice.
2799
2800         * Api/WebPage.cpp:
2801         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
2802         * WebCoreSupport/PagePopupBlackBerry.cpp:
2803         * WebCoreSupport/PagePopupBlackBerry.h:
2804         (PagePopupBlackBerry):
2805
2806 2012-06-15  Antonio Gomes  <agomes@rim.com>
2807
2808         [BlackBerry] Disable WebCore::EventHandler synthesized mouse events during touch scrolling
2809         https://bugs.webkit.org/show_bug.cgi?id=89227
2810         PR #146642
2811
2812         Reviewed by Rob Buis.
2813
2814         Make use of the Settings::supportsMouseDevice setting in order to
2815         prevent mouse move event to fire as a response to a scroll action.
2816         We might still want to dynamically toggle this setting ON, in case for
2817         example of a mouse wheel driven scroll action, but we can revisit it
2818         when it becomes a fully supported/primary use case.
2819
2820         Internally reviewed by Eli Fidler.
2821
2822         * Api/WebPage.cpp:
2823         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
2824         * Api/WebSettings.cpp:
2825         (WebKit):
2826         (BlackBerry::WebKit::WebSettings::isDeviceSupportsMouseEnabled):
2827         (BlackBerry::WebKit::WebSettings::setDeviceSupportsMouseEnabled):
2828         * Api/WebSettings.h:
2829
2830 2012-06-15  Jacky Jiang  <zhajiang@rim.com>
2831
2832         [BlackBerry] Certain web pages (i.e., http://www.cloudtweaks.com/) are allowed to be wider than the screen
2833         https://bugs.webkit.org/show_bug.cgi?id=89211
2834
2835         Reviewed by Rob Buis.
2836         Patch by Jacky Jiang <zhajiang@rim.com>
2837
2838         PR: 135215
2839         Make simpler rules for zoom to fit scale:
2840         - Zoom to fit horizontally first without clamping the contents width.
2841         - Zoom to fit vertically instead without clamping the contents height
2842           if the horizontal zoom to fit can cause a grey area below the web
2843           page. Get rid of the virtual viewport guard as there may be cases
2844           that zooming can cause a grey area without a virtual viewport.
2845         - Clamp the scale by the minimum zoom to fit scale 0.25 and apply
2846           this rule to image documents as well. This minimum scale can be
2847           changed if there is a better vaule in the future.
2848         In this way, we can get rid of the issue that many web pages don't fit
2849         the screen.
2850
2851         Reviewed internally by Arvid Nilsson.
2852
2853         * Api/WebPage.cpp:
2854         (WebKit):
2855         (BlackBerry::WebKit::WebPagePrivate::zoomToFitScale):
2856
2857 2012-06-15  Yong Li  <yoli@rim.com>
2858
2859         [BlackBerry] Remove BackingStoreClient::scrollsHorizontally/scrollsVeritically()
2860         https://bugs.webkit.org/show_bug.cgi?id=89210
2861
2862         Reviewed by Antonio Gomes.
2863
2864         Remove BackingStoreClient::scrollsHorizontally()/scrollsVeritically(), because
2865         calling them is neither nessary nor safe.
2866
2867         * Api/BackingStore.cpp:
2868         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
2869         (BlackBerry::WebKit::BackingStorePrivate::blitHorizontalScrollbar):
2870         (BlackBerry::WebKit::BackingStorePrivate::blitVerticalScrollbar):
2871         * WebKitSupport/BackingStoreClient.cpp:
2872         * WebKitSupport/BackingStoreClient.h:
2873         (BackingStoreClient):
2874
2875 2012-06-15  Sheriff Bot  <webkit.review.bot@gmail.com>
2876
2877         Unreviewed, rolling out r120404.
2878         http://trac.webkit.org/changeset/120404
2879         https://bugs.webkit.org/show_bug.cgi?id=89193
2880
2881         This patch breaks [BlackBerry]'s text selection handles moving
2882         in editable elements. (Requested by Sean1 on #webkit).
2883
2884         * WebKitSupport/SelectionHandler.cpp:
2885         (BlackBerry::WebKit::visiblePositionForPointIgnoringClipping):
2886
2887 2012-06-14  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
2888
2889         [BlackBerry] Selection - Crash when manipulating selection by dragging handle
2890         https://bugs.webkit.org/show_bug.cgi?id=89160
2891
2892         RIMBUG:164970
2893         Avoid to set position in shadow tree to the new selection's base. It
2894         crashes when setting a shadow position to a selection' base.
2895
2896         Reviewed by Antonio Gomes.
2897
2898         * WebKitSupport/SelectionHandler.cpp:
2899         (BlackBerry::WebKit::visiblePositionForPointIgnoringClipping):
2900
2901 2012-06-14  Mary Wu  <mary.wu@torchmobile.com.cn>
2902
2903         [BlackBerry] empty plugin cause browser hang
2904         https://bugs.webkit.org/show_bug.cgi?id=89091
2905
2906         Reviewed by Rob Buis.
2907
2908         Add check before clean pluginView in FrameLoaderBlackBerry in case
2909         it didn't have any content.
2910         RIM PR# 165336
2911         Reviewed internally by George Staikos
2912
2913         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2914         (WebCore::FrameLoaderClientBlackBerry::finishedLoading):
2915
2916 2012-06-14  Genevieve Mak  <gmak@rim.com>
2917
2918         Always convert touch events to mouse events if the
2919         meta-tag TouchEventMode::PureWithMouseConversion is set.
2920         Minor style fix.
2921         https://bugs.webkit.org/show_bug.cgi?id=89115
2922
2923         Reviewed by Antonio Gomes.
2924
2925         Reviewed Internally by Antonio Gomes.
2926
2927         * WebKitSupport/TouchEventHandler.cpp:
2928         (BlackBerry::WebKit::TouchEventHandler::touchEventCancel):
2929         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
2930
2931 2012-06-14  Chris Guan  <chris.guan@torchmobile.com.cn>
2932
2933         [Blackberry] add a new Api named setAllowNotification
2934         https://bugs.webkit.org/show_bug.cgi?id=88950
2935
2936         Reviewed by Antonio Gomes.
2937
2938         * Api/WebPage.cpp:
2939         (BlackBerry::WebKit::WebPage::setAllowNotification):
2940         (WebKit):
2941         * Api/WebPage.h:
2942
2943 2012-06-13  Crystal Zhang  <haizhang@rim.com>
2944
2945         [BlackBerry] Apply New Style and JS for Select Popup
2946         https://bugs.webkit.org/show_bug.cgi?id=89020
2947
2948         Reviewed by Rob Buis.
2949
2950         PR 162854
2951
2952         Use new styled CSS files for select popup, also remove most JS functions
2953         to a separate JS file, only pass the parameters to JS, and use new python
2954         script for data generating, as the old one is too simple and problematic.
2955
2956         * WebCoreSupport/SelectPopupClient.cpp:
2957         (WebCore::SelectPopupClient::generateHTML):
2958
2959 2012-06-13  Amy Ousterhout  <aousterh@chromium.org>
2960
2961         Rename currentDeviceMotion to lastMotion in DeviceMotionClient
2962         https://bugs.webkit.org/show_bug.cgi?id=88854
2963
2964         Reviewed by Adam Barth.
2965
2966         Rename the function currentDeviceMotion to lastMotion in DeviceMotionClient.
2967         This makes it consistent with the similar function lastOrientation in DeviceOrientationClient.
2968
2969         * WebCoreSupport/DeviceMotionClientBlackBerry.cpp:
2970         (DeviceMotionClientBlackBerry::lastMotion):
2971         (DeviceMotionClientBlackBerry::onMotion):
2972         * WebCoreSupport/DeviceMotionClientBlackBerry.h:
2973         (DeviceMotionClientBlackBerry):
2974
2975 2012-06-13  Robin Cao  <robin.cao@torchmobile.com.cn>
2976
2977         [BlackBerry] Enable MEDIA_STREAM by default
2978         https://bugs.webkit.org/show_bug.cgi?id=88849
2979
2980         Reviewed by Antonio Gomes.
2981
2982         * Api/WebPage.cpp:
2983         (BlackBerry::WebKit::WebPagePrivate::init):
2984         * WebCoreSupport/UserMediaClientImpl.cpp: Added.
2985         (WebCore):
2986         (WebCore::UserMediaClientImpl::UserMediaClientImpl):
2987         (WebCore::UserMediaClientImpl::~UserMediaClientImpl):
2988         (WebCore::UserMediaClientImpl::pageDestroyed):
2989         (WebCore::UserMediaClientImpl::requestUserMedia):
2990         (WebCore::UserMediaClientImpl::cancelUserMediaRequest):
2991         * WebCoreSupport/UserMediaClientImpl.h: Added.
2992         (WebKit):
2993         (WebCore):
2994         (UserMediaClientImpl):
2995
2996 2012-06-12  Arvid Nilsson  <anilsson@rim.com>
2997
2998         [BlackBerry] Crash when rendering web page that's being destroyed
2999         https://bugs.webkit.org/show_bug.cgi?id=88915
3000
3001         Reviewed by Rob Buis.
3002
3003         PR #164943
3004
3005         This was a null pointer dereference that happened when the compositor
3006         was asked to render after being disconnected from its web page.
3007
3008         * Api/WebPageCompositor.cpp:
3009         (BlackBerry::WebKit::WebPageCompositorPrivate::render):
3010
3011 2012-06-12  Jacky Jiang  <zhajiang@rim.com>
3012
3013         [BlackBerry] Scale was incorrect when reloading a simple web page after initial load
3014         https://bugs.webkit.org/show_bug.cgi?id=88889
3015
3016         Reviewed by Adam Treat.
3017         Patch by Jacky Jiang <zhajiang@rim.com>
3018
3019         PR: 164442
3020         When we were reloading a web page with the load type FrameLoadTypeSame
3021         after the initial load, the first layout timer was fired after the load
3022         Finished state, in which case the web page would have no chance to zoom
3023         to the initial scale during the layout as it was only for load
3024         Committed state. This patch takes care of it.
3025
3026         * Api/WebPage.cpp:
3027         (BlackBerry::WebKit::WebPagePrivate::layoutFinished):
3028         (BlackBerry::WebKit::WebPagePrivate::shouldZoomToInitialScaleOnLoad):
3029         (WebKit):
3030         (BlackBerry::WebKit::WebPagePrivate::zoomToInitialScaleOnLoad):
3031         * Api/WebPage_p.h:
3032         (WebPagePrivate):
3033         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3034         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFirstVisuallyNonEmptyLayout):
3035
3036 2012-06-12  Crystal Zhang  <haizhang@rim.com>
3037
3038         [BlackBerry] Fix crash in InputHandler
3039         https://bugs.webkit.org/show_bug.cgi?id=88808
3040
3041         Reviewed by Antonio Gomes.
3042
3043         m_page is destroyed before InputHandler, so should move the call to destroy popup to chromeDestroyed().
3044
3045         * WebCoreSupport/ChromeClientBlackBerry.cpp:
3046         (WebCore::ChromeClientBlackBerry::chromeDestroyed():
3047         * WebKitSupport/InputHandler.cpp:
3048         (BlackBerry::WebKit::InputHandler::~InputHandler):
3049
3050 2012-06-12  Yong Li  <yoli@rim.com>
3051
3052         [BlackBerry] Use a safer way to shrink JS memory usage
3053         https://bugs.webkit.org/show_bug.cgi?id=88811
3054
3055         Reviewed by Antonio Gomes.
3056
3057         We should just make a GC request and JSC will check if it is safe to do anything.
3058
3059         * Api/BlackBerryGlobal.cpp:
3060         (BlackBerry::WebKit::clearMemoryCaches):
3061
3062 2012-06-11  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
3063
3064         [BlackBerry] Autofill feature implementation for BlackBerry porting
3065         https://bugs.webkit.org/show_bug.cgi?id=85577
3066
3067         Reviewed by Rob Buis.
3068
3069         Remove the autofill saving procedure out of dispatchWillSubmitForm, this procedure
3070         is same as the procedure in dispatchWillSendSubmitEvent.
3071         Some sites will redirect to other url in its login process, which will cause the
3072         user get notified to save credentials for this provisional redirecting url if we
3073         put this saving procedure in dispatchWillSubmitForm. So we should remove it to make
3074         sure we only save the autofill data before the submit event is fired.
3075
3076         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3077         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSubmitForm):
3078
3079 2012-06-11  Antonio Gomes  <agomes@rim.com>
3080
3081         [BlackBerry] [BlackBerry] browser video player fullscreen mode (portrait) does not play well with rotation
3082         https://bugs.webkit.org/show_bug.cgi?id=88809
3083
3084         Reviewed by Rob Buis.
3085
3086         Adjust the media container dimensions, whenever the FrameView::frameRect
3087         (aka viewport rect) changes
3088
3089         Reviewed internally by Jacky Jiang.
3090
3091         * Api/WebPage.cpp:
3092         (BlackBerry::WebKit::WebPagePrivate::updateViewportSize):
3093         * WebCoreSupport/ChromeClientBlackBerry.cpp:
3094         (WebCore::ChromeClientBlackBerry::fullScreenRendererChanged):
3095
3096 2012-06-09  Antonio Gomes  <agomes@rim.com>
3097
3098         [BlackBerry] browser video player fullscreen mode (portrait) does not play well with viewport metatag - Controls are off screen so cannot exit fullscreen
3099         https://bugs.webkit.org/show_bug.cgi?id=88719
3100         PR #164026
3101
3102         Reviewed by Rob Buis.
3103
3104         Instead of using WebPage's viewport size, which suffers from
3105         dealing with transformed coordinates, viewport metatag changes,
3106         etc, lets use WebCore::FrameView's visibleContentRect::Size::Width,
3107         which abstract all these variations.
3108
3109         It fixes an overscale issue we were having when video player entered
3110         fullscreen, and webpage had viewport metatag set.
3111
3112         * WebCoreSupport/ChromeClientBlackBerry.cpp:
3113         (WebCore::ChromeClientBlackBerry::fullScreenRendererChanged):
3114
3115 2012-06-11  Sam Weinig  <sam@webkit.org>
3116
3117         Remove support for disconnected/excluded from search frames, they are not used by Safari anymore
3118         https://bugs.webkit.org/show_bug.cgi?id=88723
3119
3120         Reviewed by Dan Bernstein.
3121
3122         * WebKitSupport/InPageSearchManager.cpp:
3123         (BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):
3124
3125 2012-06-10  Antonio Gomes  <agomes@rim.com>
3126
3127         [BlackBerry] Make media (<video> and <audio>) slide draggable again
3128         https://bugs.webkit.org/show_bug.cgi?id=88742
3129         PR #158199
3130
3131         Reviewed by George Staikos.
3132
3133         First check if the element is a range type then gets its
3134         shadow DOM ancestor.
3135
3136         * WebKitSupport/TouchEventHandler.cpp:
3137         (BlackBerry::WebKit::shouldConvertTouchToMouse):
3138
3139 2012-06-08  Crystal Zhang  <haizhang@rim.com>
3140
3141         [BlackBerry] Fix crash on PagePopupChromeClient
3142         https://bugs.webkit.org/show_bug.cgi?id=88675
3143
3144         Reviewed by Antonio Gomes.
3145
3146         PR 163672.
3147
3148         Actually it's the bug inside InputHandler, should delete the old popup and create a new one,
3149         because update() is problematic. Also no need to save pointer in InputHandler.
3150
3151         * WebCoreSupport/ChromeClientBlackBerry.cpp:
3152         (WebCore::ChromeClientBlackBerry::openPagePopup):
3153         (WebCore::ChromeClientBlackBerry::closePagePopup):
3154         * WebKitSupport/InputHandler.cpp:
3155         (BlackBerry::WebKit::InputHandler::InputHandler):
3156         (BlackBerry::WebKit::InputHandler::~InputHandler):
3157         (BlackBerry::WebKit::InputHandler::openSelectPopup):
3158         * WebKitSupport/InputHandler.h:
3159         (WebCore):
3160         (InputHandler):
3161
3162 2012-06-08  Eli Fidler  <efidler@rim.com>
3163
3164         [BlackBerry] Default font settings are getting deleted
3165         https://bugs.webkit.org/show_bug.cgi?id=88670
3166
3167         Reviewed by Rob Buis.
3168
3169         RIM PR: 163720
3170
3171         WebSettings is overriding the default font settings with "", which deletes them.
3172
3173         * Api/WebPage.cpp:
3174         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
3175
3176 2012-06-07  Crystal Zhang  <haizhang@rim.com>
3177
3178         [BlackBerry] Should Use the WebPage Already Created by Client, No Need to Create New One.
3179         https://bugs.webkit.org/show_bug.cgi?id=88576
3180
3181         Reviewed by Rob Buis.
3182
3183         When PagePopupBlackBerry::init() is called, a WebPage is already created, we can just use 
3184         this to load popup, no need to create a new one. The old code is based on an old solution 
3185         which has been abandoned.
3186
3187         * WebCoreSupport/ChromeClientBlackBerry.cpp:
3188         (WebCore::ChromeClientBlackBerry::openPagePopup):
3189         * WebCoreSupport/PagePopupBlackBerry.cpp:
3190         (WebCore::PagePopupBlackBerry::init):
3191         (WebCore::setValueAndClosePopupCallback):
3192         (WebCore::PagePopupBlackBerry::handleMouseEvent):
3193         (WebCore::PagePopupBlackBerry::closePopup):
3194         * WebCoreSupport/PagePopupBlackBerry.h:
3195         (PagePopupBlackBerry):
3196
3197 2012-06-07  Jacky Jiang  <zhajiang@rim.com>
3198
3199         [BlackBerry] Get rid of unused maximumLayoutSize in WebPage
3200         https://bugs.webkit.org/show_bug.cgi?id=88574
3201
3202         Reviewed by Rob Buis.
3203         Patch by Jacky Jiang <zhajiang@rim.com>
3204
3205         PR: 164098
3206         maximumLayoutSize was deprecated when we made use of
3207         WebCore::computeViewportAttributes for
3208         WebPagePrivate::recomputeVirtualViewportFromViewportArguments.
3209         So clean it up.
3210
3211         * Api/WebPage.cpp:
3212         (WebKit):
3213
3214 2012-06-07  Arvid Nilsson  <anilsson@rim.com>
3215
3216         [BlackBerry] User viewport arguments are not respected
3217         https://bugs.webkit.org/show_bug.cgi?id=88530
3218
3219         Reviewed by Antonio Gomes.
3220
3221         RIM PR #163767
3222
3223         Fixed by applying the user supplied viewport arguments if the page
3224         specifies default viewport arguments (i.e. the page has no viewport
3225         meta tag).
3226
3227         If the user didn't supply any viewport arguments either, the behaviour
3228         is the same as before the patch, the caller will successfully reset to
3229         default viewport arguments.
3230
3231         * Api/WebPage.cpp:
3232         (BlackBerry::WebKit::WebPagePrivate::dispatchViewportPropertiesDidChange):
3233
3234 2012-06-07  Arvid Nilsson  <anilsson@rim.com>
3235
3236         [BlackBerry] Allow WebPageCompositor to blend a transparent web page
3237         https://bugs.webkit.org/show_bug.cgi?id=88233
3238
3239         Reviewed by Rob Buis.
3240
3241         RIM PR #159998
3242
3243         Keep track of the web page background color in the compositor so we can
3244         determine whether the contents of the root layer are transparent.
3245
3246         Reviewed internally by Jakob Petsovits.
3247
3248         * Api/BackingStore.cpp:
3249         (BlackBerry::WebKit::BackingStorePrivate::compositeContents):
3250         * Api/BackingStore_p.h:
3251         (BackingStorePrivate):
3252         * Api/WebPage.cpp:
3253         (BlackBerry::WebKit::WebPagePrivate::setCompositor):
3254         (BlackBerry::WebKit::WebPagePrivate::setCompositorBackgroundColor):
3255         (WebKit):
3256         (BlackBerry::WebKit::WebPagePrivate::createCompositor):
3257         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
3258         * Api/WebPageCompositor.cpp:
3259         (BlackBerry::WebKit::WebPageCompositorPrivate::render):
3260         (BlackBerry::WebKit::WebPageCompositorPrivate::setBackgroundColor):
3261         (WebKit):
3262         * Api/WebPageCompositor_p.h:
3263         (BlackBerry::WebKit::WebPageCompositorPrivate::backgroundColor):
3264         (WebPageCompositorPrivate):
3265         * Api/WebPage_p.h:
3266         (WebPagePrivate):
3267
3268 2012-06-07  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
3269
3270         [BlackBerry] Add enable credential autofill and enable form autofill feature control in WebSetting
3271         https://bugs.webkit.org/show_bug.cgi?id=88513
3272
3273         Reviewed by Rob Buis.
3274
3275         RIM PR: #163391
3276         Implemented credential autofill setting and form autofill setting.
3277
3278         Internally reviewed by Leo Yang <leo.yang@torchmobile.com.cn>.
3279
3280         * Api/WebPage.cpp:
3281         (BlackBerry::WebKit::WebPage::autofillTextField):
3282         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
3283         (BlackBerry::WebKit::WebPage::clearCredentials):
3284         (BlackBerry::WebKit::WebPage::clearAutofillData):
3285         (BlackBerry::WebKit::WebPage::clearNeverRememberSites):
3286         * Api/WebSettings.cpp:
3287         (WebKit):
3288         (BlackBerry::WebKit::WebSettings::standardSettings):
3289         (BlackBerry::WebKit::WebSettings::isCredentialAutofillEnabled):
3290         (BlackBerry::WebKit::WebSettings::setCredentialAutofillEnabled):
3291         (BlackBerry::WebKit::WebSettings::isFormAutofillEnabled):
3292         (BlackBerry::WebKit::WebSettings::setFormAutofillEnabled):
3293         * Api/WebSettings.h:
3294         * WebCoreSupport/EditorClientBlackBerry.cpp:
3295         (WebCore::EditorClientBlackBerry::textFieldDidEndEditing):
3296         (WebCore::EditorClientBlackBerry::textDidChangeInTextField):
3297         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3298         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFinishLoad):
3299         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSubmitForm):
3300         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendSubmitEvent):
3301
3302 2012-06-06  Antonio Gomes  <agomes@rim.com>
3303
3304         [BlackBerry] browser video player fullscreen mode (portrait) - Controls are off screen so cannot exit fullscreen
3305         https://bugs.webkit.org/show_bug.cgi?id=88488
3306         PR #162991
3307
3308         Reviewed by George Staikos.
3309
3310         When we use width:100%/pageScale as the math to calculate the width of the
3311         FullScreen element, it goes too wide for horizontally scrollable webpages.
3312         The reason is that 100% is relative to the content size here, and we want 100%
3313         relative to the viewport size. However, since there is no such a thing in CSS,
3314         we set an absolute file.
3315
3316         A known problem with this will be rotating the device when in fullscreen mode
3317         that we can address when rotating is supported.
3318
3319         Internally reviewed by Jacky Jiang.
3320
3321         * WebCoreSupport/ChromeClientBlackBerry.cpp:
3322         (WebCore::ChromeClientBlackBerry::fullScreenRendererChanged):
3323
3324 2012-06-05  Antonio Gomes  <agomes@rim.com>
3325
3326        [BlackBerry] Implement a top-down in-region boundary detection in InRegionScrollableArea
3327        https://bugs.webkit.org/show_bug.cgi?id=88254
3328        PR #125237
3329
3330        Reviewed by Rob Buis.
3331
3332        Patch implements a top-down visibleWindowRect calculation for all scrollable
3333        elements hit-tested by a given point.
3334
3335        The reason on why this approach is better is that it calculates the visible
3336        window rect from the outermost scrollable element towards the inner ones, and
3337        that allows it to use the visible window rect of the previous scrollable element
3338        as the clipping rect for the current one.
3339
3340        Patch also changes the return vector to store ScrollViewBase pointers, so
3341        we can make use of static_cast properly. As now also stated in the header
3342        file, the client is responsible for deleting the ScrollViewBase
3343        elements in the vector.
3344
3345        Internally reviewed by Jakob Petsovits.
3346
3347        * Api/WebPage.cpp:
3348        (BlackBerry::WebKit::pushBackInRegionScrollable):
3349        (BlackBerry::WebKit::WebPagePrivate::inRegionScrollableAreasForPoint):
3350        * Api/WebPageClient.h:
3351        * Api/WebPage_p.h:
3352        (WebPagePrivate):
3353        * WebKitSupport/InRegionScrollableArea.cpp:
3354        (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
3355        (BlackBerry::WebKit::InRegionScrollableArea::setVisibleWindowRect):
3356        (WebKit):
3357        (BlackBerry::WebKit::InRegionScrollableArea::visibleWindowRect):
3358        * WebKitSupport/InRegionScrollableArea.h:
3359        (InRegionScrollableArea):
3360
3361 2012-06-06  Charles Wei  <charles.wei@torchmobile.com.cn>
3362
3363         [BlackBerry] IndexedDB file should be sand-boxed to the application data directory.
3364         https://bugs.webkit.org/show_bug.cgi?id=88065
3365
3366         Reviewed by George Staikos.
3367
3368         * Api/WebPage.cpp:
3369         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
3370         * Api/WebSettings.cpp:
3371         (WebKit):
3372         (BlackBerry::WebKit::WebSettings::indexedDataBasePath):
3373         (BlackBerry::WebKit::WebSettings::setIndexedDataBasePath):
3374         * Api/WebSettings.h:
3375
3376 2012-06-05  Crystal Zhang  <haizhang@rim.com>
3377
3378         [BlackBerry]Differentiate options and group options by TypeOption and TypeOptionInGroup
3379         https://bugs.webkit.org/show_bug.cgi?id=88342
3380
3381         Reviewed by Rob Buis.
3382
3383         RIM PR: 163141
3384
3385         Reviewed internally by Mike Fenton.
3386
3387         We set all options' type to TypeOption, which can't tell if an option belongs to a group, 
3388         introduce TypeOptionInGroup to fix it.
3389
3390         * WebKitSupport/InputHandler.cpp:
3391         (BlackBerry::WebKit::InputHandler::openSelectPopup):
3392
3393 2012-06-05  Adam Barth  <abarth@webkit.org>
3394
3395         Remove support for target-densitydpi in the viewport meta tag
3396         https://bugs.webkit.org/show_bug.cgi?id=88047
3397
3398         Reviewed by Kenneth Rohde Christiansen.
3399
3400         * Api/WebPage.cpp:
3401         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
3402         * Api/WebViewportArguments.cpp:
3403         (BlackBerry::WebKit::WebViewportArguments::targetDensityDpi):
3404         (BlackBerry::WebKit::WebViewportArguments::setTargetDensityDpi):
3405         * Api/WebViewportArguments.h:
3406
3407 2012-06-05  Konrad Piascik  <kpiascik@rim.com>
3408
3409         [BlackBerry]Web Inspector highlight is slow
3410         https://bugs.webkit.org/show_bug.cgi?id=88331
3411
3412         Reviewed by Rob Buis.
3413
3414         Highlight is slow on large pages because of constant repaint calls.
3415         Change to use the accelerated layer highlight all the time.
3416
3417         * Api/BackingStore.cpp:
3418         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
3419         * WebCoreSupport/InspectorClientBlackBerry.cpp:
3420         (WebCore::InspectorClientBlackBerry::highlight):
3421         (WebCore::InspectorClientBlackBerry::hideHighlight):
3422         * WebCoreSupport/InspectorOverlay.cpp:
3423         (WebCore::InspectorOverlay::clear):
3424         (WebCore::InspectorOverlay::update):
3425
3426 2012-06-04  Andrew Lo  <anlo@rim.com>