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