[Release] Webkit2-efl-123997_0.11.79
[framework/web/webkit-efl.git] / Source / WebKit / blackberry / ChangeLog
1 2012-11-07  Christophe Dumez  <christophe.dumez@intel.com>
2
3         Add replaceWithLiteral() method to WTF::String
4         https://bugs.webkit.org/show_bug.cgi?id=101257
5
6         Reviewed by Benjamin Poulain.
7
8         Substitute String::replace() calls by String::replaceWithLiteral() where
9         adequate, for efficiency.
10
11         * WebCoreSupport/SelectPopupClient.cpp:
12         (WebCore::SelectPopupClient::generateHTML):
13
14 2012-07-27  Eli Fidler  <efidler@rim.com>
15
16         [BlackBerry] Adapt to change in the FontInfo platform API.
17         https://bugs.webkit.org/show_bug.cgi?id=92547
18
19         Reviewed by Yong Li
20
21         RIM PR 161263
22
23         * Api/WebSettings.cpp:
24         (BlackBerry::WebKit::WebSettings::standardSettings):
25
26 2012-07-27  Yong Li  <yoli@rim.com>
27
28         [BlackBerry] Should support onbeforeunload event and show confirmation dialog
29         https://bugs.webkit.org/show_bug.cgi?id=92510
30
31         Reviewed by Antonio Gomes.
32
33         RIM PR# 155878.
34         1. Export dispatchBeforeUnloadEvent() so client can call it before going to close the page.
35         2. Forward runBeforeUnloadConfirmPanel() call to client so it can show a dialog.
36
37         * Api/WebPage.cpp:
38         (BlackBerry::WebKit::WebPage::dispatchBeforeUnloadEvent):
39         (WebKit):
40         * Api/WebPage.h:
41         * Api/WebPageClient.h:
42         * WebCoreSupport/ChromeClientBlackBerry.cpp:
43         (WebCore::ChromeClientBlackBerry::canRunBeforeUnloadConfirmPanel):
44         (WebCore::ChromeClientBlackBerry::runBeforeUnloadConfirmPanel):
45
46 2012-07-27  Mike Fenton  <mifenton@rim.com>
47
48         [BlackBerry] Switch InputHandler malloc use to fastMalloc for cases that should never fail
49         https://bugs.webkit.org/show_bug.cgi?id=92508
50
51         Reviewed by Yong Li.
52
53         Replace common uses of malloc with fastMalloc rather
54         than trying to recover gracefully.  If we are truly
55         out of memory, crash before corruption occurs.
56
57         * WebKitSupport/InputHandler.cpp:
58         (BlackBerry::WebKit::InputHandler::spannableTextInRange):
59         (BlackBerry::WebKit::InputHandler::extractedTextRequest):
60
61 2012-07-26  Nima Ghanavatian  <nghanavatian@rim.com>
62
63         [BlackBerry] Remove synchronous spellchecking code
64         https://bugs.webkit.org/show_bug.cgi?id=92415
65
66         Removing synchronous spellchecking code path.
67
68         Reviewed by Rob Buis.
69
70         Internally reviewed by Mike Fenton.
71
72         * Api/WebPageClient.h:
73         * WebCoreSupport/EditorClientBlackBerry.cpp:
74         (WebCore::EditorClientBlackBerry::checkSpellingOfString):
75
76 2012-07-26  Nima Ghanavatian  <nghanavatian@rim.com>
77
78         [BlackBerry] Support async spellcheck for the blackberry port
79         https://bugs.webkit.org/show_bug.cgi?id=92160
80
81         PR124517
82         Implementing support for async spellcheck.
83
84         Reviewed by Rob Buis.
85
86         Internally reviewed by Mike Fenton.
87
88         * Api/WebPage.cpp:
89         (BlackBerry::WebKit::WebPage::spellCheckingRequestCancelled):
90         (WebKit):
91         (BlackBerry::WebKit::WebPage::spellCheckingRequestProcessed):
92         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
93         * Api/WebPage.h:
94         * Api/WebSettings.cpp:
95         (WebKit):
96         (BlackBerry::WebKit::WebSettings::standardSettings):
97         (BlackBerry::WebKit::WebSettings::isAsynchronousSpellCheckingEnabled):
98         (BlackBerry::WebKit::WebSettings::setAsynchronousSpellCheckingEnabled):
99         * Api/WebSettings.h:
100         * WebCoreSupport/EditorClientBlackBerry.cpp:
101         (WebCore):
102         (WebCore::EditorClientBlackBerry::requestCheckingOfString):
103         (WebCore::EditorClientBlackBerry::checkTextOfParagraph):
104         * WebCoreSupport/EditorClientBlackBerry.h:
105         (EditorClientBlackBerry):
106         * WebKitSupport/InputHandler.cpp:
107         (BlackBerry::WebKit::InputHandler::requestCheckingOfString):
108         (BlackBerry::WebKit::InputHandler::convertTransactionIdToSequenceId):
109         (WebKit):
110         (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
111         (BlackBerry::WebKit::InputHandler::spellCheckingRequestCancelled):
112         (BlackBerry::WebKit::InputHandler::getSpellChecker):
113         * WebKitSupport/InputHandler.h:
114         (WebCore):
115         (InputHandler):
116
117 2012-07-26  Mike Fenton  <mifenton@rim.com>
118
119         [BlackBerry] Improve the logs in Selection Handler.
120         https://bugs.webkit.org/show_bug.cgi?id=92405
121
122         Reviewed by Rob Buis.
123
124         Clean up selection logging, fix priority and style
125         of helper function.
126
127         Reviewed Internally by Nima Ghanavatian.
128
129         * WebKitSupport/SelectionHandler.cpp:
130         (BlackBerry::WebKit::SelectionHandler::cancelSelection):
131         (BlackBerry::WebKit::SelectionHandler::shouldUpdateSelectionOrCaretForPoint):
132         (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
133         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
134         (BlackBerry::WebKit::SelectionHandler::setSelection):
135         (BlackBerry::WebKit::SelectionHandler::selectObject):
136         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
137         (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
138
139 2012-07-26  Mike Fenton  <mifenton@rim.com>
140
141         [BlackBerry] Add timing logs to SelectionHandler.
142         https://bugs.webkit.org/show_bug.cgi?id=92404
143
144         Reviewed by Rob Buis.
145
146         Add selection timing logs.
147
148         Reviewed Internally by Nima Ghanavatian.
149
150         * WebKitSupport/SelectionHandler.cpp:
151         (BlackBerry::WebKit::SelectionHandler::setSelection):
152         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
153         * WebKitSupport/SelectionHandler.h:
154         (SelectionHandler):
155
156 2012-07-26  Mike Fenton  <mifenton@rim.com>
157
158         [BlackBerry] InputHandler failure logs should be logAlways and critical.
159         https://bugs.webkit.org/show_bug.cgi?id=92403
160
161         Reviewed by Rob Buis.
162
163         Update Log level for failures and fix mask in log.
164
165         Reviewed Internally by Nima Ghanavatian.
166
167         * WebKitSupport/InputHandler.cpp:
168         (BlackBerry::WebKit::convertStringToWchar):
169         (BlackBerry::WebKit::convertStringToWcharVector):
170         (BlackBerry::WebKit::convertSpannableStringToString):
171         (BlackBerry::WebKit::InputHandler::spannableTextInRange):
172         (BlackBerry::WebKit::InputHandler::setTextAttributes):
173
174 2012-07-26  Arvid Nilsson  <anilsson@rim.com>
175
176         [BlackBerry] Refactor BackingStorePrivate::BackingStorePrivate::clearAndUpdateTileOfNotRenderedRegion() to avoid touching tile frontbuffer
177         https://bugs.webkit.org/show_bug.cgi?id=92095
178
179         Reviewed by George Staikos.
180
181         PR: 141439
182         Specifically, we want to avoid changing the rendered region of the
183         front buffer without proper synchronization.
184
185         The method is trying to force checkerboard to appear on screen because
186         an area was invalidated but the render job was dropped, so the tile
187         contents are now invalid.
188
189         Unfortunately it did this in a way which is not thread safe. Fixed by
190         making it thread safe, in a way that minimizes memory bandwidth usage.
191
192         Instead of using the customary sequence of copy-back, modify and swap,
193         we send a synchronous message to the compositing thread to avoid the
194         copy-back step and save memory bandwidth. The trade-off is that the
195         WebKit thread might wait a little longer for the compositing thread
196         than it would from a waitForCurrentMessage() call.
197
198         The way we synchronize this is rather expensive for the WebKit thread,
199         and this method is called rather carelessly, so add various early
200         returns to avoid doing it redundantly.
201
202         Internally reviewed by Jakob Petsovits and Adam Treat.
203
204         * Api/BackingStore.cpp:
205         (BlackBerry::WebKit::BackingStorePrivate::indexOfTile):
206         (BlackBerry::WebKit::BackingStorePrivate::clearAndUpdateTileOfNotRenderedRegion):
207         * Api/BackingStore_p.h:
208         (BackingStorePrivate):
209
210 2012-07-26  Arvid Nilsson  <anilsson@rim.com>
211
212         [BlackBerry] Refactor BackingStorePrivate::render() to avoid touching tile frontbuffer
213         https://bugs.webkit.org/show_bug.cgi?id=91989
214
215         Reviewed by George Staikos.
216
217         PR: 141439
218         Specifically, we want to avoid changing the rendered region of the
219         front buffer. The code only touched the front buffer rendered region
220         if the tile was not committed.
221
222         Instead of immediately marking the tile as committed, and clearing the
223         front buffer's rendered region to make it appear as checkerboard, we
224         leave the front buffer alone and only mark the tile as committed once
225         the front buffer has valid content. Un-committed tiles will also be
226         rendered as checkerboard, so leaving it uncommitted is equivalent to
227         clearing the front buffer rendered region here.
228
229         In addition to the main change, some related changes follow naturally.
230
231         The copyPreviousContentsToBackSurfaceOfTile() call only makes sense if
232         the tile is committed, and the front buffer has valid content.
233         Otherwise, clearing the back buffer is equivalent. The code has been
234         updated to this effect.
235
236         Since copyPreviousContentsToBackSurfaceOfTile() always sets the
237         rendered region to the union of the front and back buffer regions,
238         there is no point in the "backBufferIsValid" check. It has been turned
239         into an ASSERT instead, just to make sure.
240
241         Internally reviewed by Jakob Petsovits.
242
243         * Api/BackingStore.cpp:
244         (BlackBerry::WebKit::BackingStorePrivate::render):
245
246 2012-07-25  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
247
248         [BlackBerry] Support RTSP in browser
249         https://bugs.webkit.org/show_bug.cgi?id=92233
250
251         Reviewed by Rob Buis.
252
253         Handle URL scheme "rtsp://" before creating the DocumentLoader
254         and send the request to webkit. As we don't have any application
255         which can deal with rtsp invocation for now, we need to create
256         a media document to wrap the rtsp url within a video tag which
257         makes it load as a normal video clip.
258
259         RIM PR: 169669
260         Internally reviewed by Charles Wei <charles.wei@torchmobile.com.cn>.
261
262         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
263         (WebCore::FrameLoaderClientBlackBerry::createDocumentLoader):
264
265 2012-07-25  Jakob Petsovits  <jpetsovits@rim.com>
266
267         [BlackBerry] Rephrase suspend/resume condition to guard against crashes
268         https://bugs.webkit.org/show_bug.cgi?id=92300
269         PR 182125
270
271         Reviewed by George Staikos.
272
273         When the compositor is removed from a WebPage, it might
274         already have unset its context, and issuing a call to
275         BackingStore::buffer() would therefore cause a crash.
276         Just guarding buffer() from this crash isn't fully
277         correct, because then we wouldn't suspend rendering
278         for a compositor that had been previously enabled.
279
280         Instead, change the condition to suspend/resume in
281         WebPagePrivate::setCompositor() to focus on the
282         object that delivers us the buffer. If we can't
283         listen to the context or buffer being set, better
284         just take the compositor object itself to determine
285         whether we have something valid or not... and hope
286         that they give us a valid context & buffer in all
287         situations when we can actually be rendering.
288
289         Also check compositor->context() in buffer() to be
290         non-zero before accessing the context's buffer,
291         because more defensive coding can't hurt here.
292
293         * Api/BackingStore.cpp:
294         (BlackBerry::WebKit::BackingStorePrivate::buffer):
295         * Api/WebPage.cpp:
296         (BlackBerry::WebKit::WebPagePrivate::setCompositor):
297
298 2012-07-25  Joshua Netterfield  <jnetterfield@rim.com>
299
300         [BlackBerry] Update about:config lists
301         https://bugs.webkit.org/show_bug.cgi?id=92118
302
303         Reviewed by Rob Buis.
304
305         Remove features from list that have either been removed from WebKit
306         or that have been moved from one list to another.
307
308         * WebCoreSupport/AboutDataEnableFeatures.in:
309         * WebCoreSupport/AboutDataHaveFeatures.in:
310         * WebCoreSupport/AboutDataUseFeatures.in:
311
312 2012-07-25  Jacky Jiang  <zhajiang@rim.com>
313
314         [BlackBerry] clock_gettime() in BackingStore.cpp should use CLOCK_MONOTONIC
315         https://bugs.webkit.org/show_bug.cgi?id=91898
316
317         Reviewed by Yong Li.
318
319         Let pthread condition variable in BackingStore.cpp use monotonic clock
320         to fix a regression caused by r123266.
321
322         * Api/BackingStore.cpp:
323         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
324
325 2012-07-25  Andy Chen  <andchen@rim.com>
326
327         [BlackBerry] Add "SelectAll" to WebPage
328         https://bugs.webkit.org/show_bug.cgi?id=92246
329
330         Reviewed by Antonio Gomes.
331
332         Add "Select All" editor command to WebPage.
333         Internally reviewed by Mike Fenton.
334
335         * Api/WebPage.cpp:
336         (BlackBerry::WebKit::WebPage::selectAll):
337         (WebKit):
338         * Api/WebPage.h:
339         * WebKitSupport/InputHandler.cpp:
340         (BlackBerry::WebKit::InputHandler::selectAll):
341         (WebKit):
342         * WebKitSupport/InputHandler.h:
343
344 2012-07-25  Arvid Nilsson  <anilsson@rim.com>
345
346         [BlackBerry] Don't touch a tile buffer while it's still on its way to the GPU
347         https://bugs.webkit.org/show_bug.cgi?id=91992
348
349         Reviewed by Adam Treat.
350
351         PR: 141439
352         The copyPreviousContentsToBackSurfaceOfTile() call will also modify
353         buffer contents, move it after the blit generation condvar to make sure
354         we've waited for the buffer to become available first.
355
356         This is done as part of some general BackingStorePrivate::render()
357         cleanup in PR 141439.
358
359         Internally reviewed by Jakob Petsovits.
360
361         * Api/BackingStore.cpp:
362         (BlackBerry::WebKit::BackingStorePrivate::render):
363
364 2012-07-25  Jakob Petsovits  <jpetsovits@rim.com>
365
366         [BlackBerry] notifyContentRendered() call missing in two spots
367         https://bugs.webkit.org/show_bug.cgi?id=92153
368         RIM PR 173340
369
370         Reviewed by Antonio Gomes.
371
372         In dispatchDidFirstVisualLayout() and repaint() in
373         immediate mode, we render but don't notify the
374         WebPageClient that the content was modified.
375
376         In the long run, we should probably keep track of
377         the modified reason from within render() itself
378         and use this to automatically notify the client
379         from within blitContents() and/or invalidateWindow(),
380         depending on the rendering path. That's somewhat of
381         a medium-size undertaking though; for now, adding
382         the call directly to the renderVisibleContents()
383         call sites will do.
384
385         This patch also adds a blitVisibleContents() to
386         dispatchDidFirstVisualLayout() where it was
387         inexplicably missing, probably on account of
388         old code that was never updated.
389
390         * Api/BackingStore.cpp:
391         (BlackBerry::WebKit::BackingStorePrivate::repaint):
392         * Api/WebPage.cpp:
393         (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore):
394         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
395         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFirstVisuallyNonEmptyLayout):
396
397 2012-07-24  Rob Buis  <rbuis@rim.com>
398
399         [BlackBerry] Do not call settings setters twice on page construction
400         https://bugs.webkit.org/show_bug.cgi?id=92157
401
402         Reviewed by Yong Li.
403
404         The WebPagePrivate init method sets some settings value that were
405         already set in didChangeSettings. setUseHixie76WebSocketProtocol just
406         sets the default value, no need to set it again.
407         Also call didChangeSettings explicitly from init, before that we are
408         not calling it since the delegate is not set yet.
409
410         * Api/WebPage.cpp:
411         (BlackBerry::WebKit::WebPagePrivate::init):
412
413 2012-07-24  Mike Fenton  <mifenton@rim.com>
414
415         Throttle calls to request the virtual keyboard be shown.
416         https://bugs.webkit.org/show_bug.cgi?id=92138
417
418         Reviewed by Rob Buis.
419
420         PR 178465.
421
422         Do not request keyboard visibility change when
423         we are actively processing an input event.
424
425         Reviewed Internally by Gen Mak.
426
427         * WebKitSupport/InputHandler.cpp:
428         (BlackBerry::WebKit::InputHandler::focusedNodeChanged):
429
430 2012-07-24  Joshua Netterfield  <jnetterfield@rim.com>
431
432         [BlackBerry] Update about:config lists
433         https://bugs.webkit.org/show_bug.cgi?id=92118
434
435         Reviewed by Rob Buis.
436
437         We want to have all flags which could be used / have been used by any platform. These lists were created by running:
438
439         * WebCoreSupport/AboutDataEnableFeatures.in: `git grep "ENABLE(" | cut -d "(" -f2 | cut -d ")" -f1 | sort -u`
440         * WebCoreSupport/AboutDataHaveFeatures.in: `git grep "HAVE(" | cut -d "(" -f2 | cut -d ")" -f1 | sort -u`
441         * WebCoreSupport/AboutDataUseFeatures.in: `git grep "USE(" | cut -d "(" -f2 | cut -d ")" -f1 | sort -u`
442
443 2012-07-24  Arvid Nilsson  <anilsson@rim.com>
444
445         [BlackBerry] Remove unused variable in BackingStore.cpp
446         https://bugs.webkit.org/show_bug.cgi?id=91987
447
448         Reviewed by Antonio Gomes.
449
450         PR: 141439
451         This is done as part of some general BackingStorePrivate::render()
452         cleanup in PR 141439.
453
454         * Api/BackingStore.cpp:
455         (BlackBerry::WebKit::BackingStorePrivate::render):
456
457 2012-07-23  Yong Li  <yoli@rim.com>
458
459         [BlackBerry] Move about: URL handling out of WebCore
460         https://bugs.webkit.org/show_bug.cgi?id=91541
461
462         Reviewed by Rob Buis.
463
464         PR# 181304.
465         Move about: URL handling to the right place (FrameLoaderClientBlackBerry::createDocumentLoader), so
466         reload and history navigation can work.
467         Other changes: Remove about:version which makes little sense. Make about:memory partially visible.
468
469         * Api/WebPage.cpp:
470         (BlackBerry::WebKit::WebPage::load): Remove the call to loadAbout()
471         * Api/WebPage_p.h: Remove loadAbout()
472         (WebPagePrivate):
473         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
474         (WebCore::FrameLoaderClientBlackBerry::createDocumentLoader): Construct about: data here.
475         * WebKitSupport/AboutData.cpp:
476         (BlackBerry::WebKit::numberToHTMLTr): Make it static
477         (BlackBerry::WebKit::configPage): Make it static
478         (BlackBerry::WebKit::memoryPage): Make it static
479         (BlackBerry::WebKit::cachePage):
480         (BlackBerry::WebKit::buildPage):
481         (BlackBerry::WebKit::creditsPage):
482         (BlackBerry::WebKit::cookiePage):
483         (BlackBerry::WebKit::aboutData): The only export function that returns HTML source for a given about: URL.
484         (WebKit):
485         * WebKitSupport/AboutData.h:
486         (WebKit):
487
488 2012-07-23  Pierre Rossi  <pierre.rossi@gmail.com>
489
490         Unify numTouchEventHandlersChanged and needTouchEvents in the chrome client
491         https://bugs.webkit.org/show_bug.cgi?id=91006
492
493         Reviewed by Ryosuke Niwa.
494
495         Removed numTouchEventHandlersChanged stub.
496
497         * WebCoreSupport/ChromeClientBlackBerry.h:
498
499 2012-07-22  Kent Tamura  <tkent@chromium.org>
500
501         Rename ENABLE_METER_TAG and ENABLE_PROGRESS_TAG to ENABLE_METER_ELEMENT and ENABLE_PROGRESS_ELEMENT respectively
502         https://bugs.webkit.org/show_bug.cgi?id=91941
503
504         Reviewed by Kentaro Hara.
505
506         A flag name for an elmement should be ENABLE_*_ELEMENT.
507
508         * WebCoreSupport/AboutDataEnableFeatures.in:
509
510 2012-07-20  Jacky Jiang  <zhajiang@rim.com>
511
512         [BlackBerry] clock_gettime() in BackingStore.cpp should use CLOCK_MONOTONIC
513         https://bugs.webkit.org/show_bug.cgi?id=91898
514
515         Reviewed by Yong Li.
516
517         PR: 181043
518         Use CLOCK_MONOTONIC when we do expect a monotonic timer.
519
520         * Api/BackingStore.cpp:
521         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
522
523 2012-07-20  Crystal Zhang  <haizhang@rim.com>
524
525         [BlackBerry] Add Cancel button for Select popup
526         https://bugs.webkit.org/show_bug.cgi?id=91887
527
528         Reviewed by Yong Li.
529
530         PR 177706
531
532         * WebCoreSupport/SelectPopupClient.cpp:
533         (WebCore::SelectPopupClient::generateHTML):
534         (WebCore::SelectPopupClient::setValueAndClosePopup):
535
536 2012-07-19  Mary Wu  <mary.wu@torchmobile.com.cn>
537
538         [BlackBerry] Make sure to send favicon when go back/forward
539         https://bugs.webkit.org/show_bug.cgi?id=91808
540
541         Reviewed by George Staikos.
542
543         When go back/forward, if the page was in page cache, it would have no chance
544         to send favicon. So we'll send it in commitLoad right after send the blank
545         icon.
546         RIM PR# 177495
547
548         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
549         (WebCore::FrameLoaderClientBlackBerry::dispatchDidCommitLoad):
550
551 2012-07-19  Jakob Petsovits  <jpetsovits@rim.com>
552
553         [BlackBerry] Suspend when there's no target buffer until an external compositor is set
554         https://bugs.webkit.org/show_bug.cgi?id=91686
555         RIM PR 174365
556
557         Reviewed by Antonio Gomes.
558
559         If we don't have a client window (i.e. rendering to
560         GL directly) and a WebPageCompositor is only set
561         after a rendering operation, then we'll try to render
562         to BackingStorePrivate::buffer() which doesn't exist
563         at this point. That's bad, and gets us various
564         assertions and possibly worse.
565
566         Fix it by starting in a screen-suspended state and only
567         resuming screen and backingstore once a compositor is
568         actually set.
569
570         So, in effect, with this patch applied, the sequence
571         of events will look like this:
572
573         1) WebPage & BackingStore are initialize, neither window
574            nor compositor exists, therefore buffer() returns 0.
575            createSurface() therefore suspends screen and
576            backingstore.
577         2) loadURL() or loadData() is called, web page is
578            fully loaded, however we don't try to render because
579            we're still suspended, still have no target buffer.
580         3) A WebPageCompositor is being set from outside.
581            At the beginning of WebPage::setCompositor() we still
582            don't have a buffer() so there's nothing to suspend,
583            however, after the sync call to setCompositorHelper()
584            the compositor is set so buffer() will return a
585            nonzero value, causing us to resume at this point.
586
587         Using the existence of a target buffer to determine
588         whether or not to enable rendering or keep it suspended
589         seems like a good idea, and the implementation (while
590         not quite perfect yet) is a step forward from before.
591
592         * Api/BackingStore.cpp:
593         (BlackBerry::WebKit::BackingStorePrivate::createSurfaces):
594         * Api/WebPage.cpp:
595         (BlackBerry::WebKit::WebPagePrivate::setCompositor):
596         (BlackBerry::WebKit::WebPagePrivate::setCompositorHelper):
597         * Api/WebPage_p.h:
598         (WebPagePrivate):
599
600 2012-07-19  Jakob Petsovits  <jpetsovits@rim.com>
601
602         [BlackBerry] Allow nested suspend/resume screen & backingstore calls.
603         https://bugs.webkit.org/show_bug.cgi?id=91644
604         RIM PR 174365
605
606         Reviewed by Adam Treat and Antonio Gomes.
607
608         We expose suspendScreenAndBackingStoreUpdates() to the
609         outside API, but also use it internally when reacting
610         to a number of happenings, i.e. zooming, viewport resize,
611         resetting view state on Committed state or when restoring
612         it from previous pages, etc.
613
614         These two can clash. For instance, if we get a suspend
615         call from outside that suspends us for app inactivity,
616         or we are told to suspend because the main target surface
617         is not available at the time, and while being suspended
618         we try to rotate, finish loading a page, the we'll end up
619         resuming operations even though we shouldn't.
620
621         This patch changes the suspend flag to be a counter
622         instead, allowing nested suspend/resume calls and making
623         suspend/resume more robust this way. It also changes
624         several call sites to make sure suspend/resume calls are
625         paired up correctly.
626
627         * Api/BackingStore.cpp:
628         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
629         (BlackBerry::WebKit::BackingStorePrivate::suspendScreenAndBackingStoreUpdates):
630         (BlackBerry::WebKit::BackingStorePrivate::resumeScreenAndBackingStoreUpdates):
631         * Api/BackingStore_p.h:
632         (BackingStorePrivate):
633         * Api/WebPage.cpp:
634         (BlackBerry::WebKit::WebPagePrivate::shouldZoomAboutPoint):
635         (BlackBerry::WebKit::WebPagePrivate::zoomAboutPointTimerFired):
636         (BlackBerry::WebKit::WebPagePrivate::blockZoomRectForNode):
637         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
638         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
639
640 2012-07-18  Yong Li  <yoli@rim.com>
641
642         [BlackBerry] Move about: URL handling out of WebCore
643         https://bugs.webkit.org/show_bug.cgi?id=91541
644
645         Reviewed by Rob Buis.
646
647         Move about URL handling code to WebKit/blackberry. Now when WebPage is asked to load an about URL,
648         it directly calls loadString() with the generated source.
649
650         Also move AboutData.h/cpp from WebCoreSupport to WebKitSupport and change their namespace from WebCore
651         to BlackBerry::WebKit.
652
653         The change is very mechanical except "procss total memory usage" in about:memory now only accounts used
654         bytes and ignore free spaces in malloc.
655
656         * Api/WebPage.cpp:
657         (BlackBerry::WebKit::WebPagePrivate::loadAbout):
658         (WebKit):
659         (BlackBerry::WebKit::WebPage::load):
660         * Api/WebPage_p.h:
661         (WebPagePrivate):
662         * WebKitSupport/AboutData.cpp: Renamed from Source/WebKit/blackberry/WebCoreSupport/AboutData.cpp.
663         (WebKit):
664         (BlackBerry::WebKit::writeFeatures):
665         (BlackBerry::WebKit::numberToHTMLTr):
666         (BlackBerry::WebKit::bool):
667         (BlackBerry::WebKit::configPage):
668         (BlackBerry::WebKit::cacheTypeStatisticToHTMLTr):
669         (BlackBerry::WebKit::dumpJSCTypeCountSetToTableHTML):
670         (BlackBerry::WebKit::memoryPage):
671         * WebKitSupport/AboutData.h: Renamed from Source/WebKit/blackberry/WebCoreSupport/AboutData.h.
672         (WebKit):
673
674 2012-07-17  Jakob Petsovits  <jpetsovits@rim.com>
675
676         [BlackBerry] Remove unnecessary clearWindow() calls and the method itself
677         https://bugs.webkit.org/show_bug.cgi?id=91540
678         RIM PR 174365
679
680         Reviewed by Adam Treat.
681
682         If we resume the backingstore right afterwards with
683         RenderAndBlit then that'll fill the whole visible area
684         with content, making a clearWindow() call unnecessary.
685         This call is a remnant from ages ago, and is well suited
686         to disappear into nothingness.
687
688         (There is still a clearWindow() call, with rect argument,
689         which we continue using. This commit only removes the
690         rect-less version.)
691
692         * Api/BackingStore.cpp:
693         * Api/BackingStore_p.h:
694         (BackingStorePrivate):
695         * Api/WebPage.cpp:
696         (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint):
697         (BlackBerry::WebKit::WebPagePrivate::zoomBlock):
698
699 2012-07-17  Vivek Galatage  <vivekgalatage@gmail.com>
700
701         Web Inspector: refactor InspectorController::connectFrontend() to accept InspectorFrontendChannel.
702         https://bugs.webkit.org/show_bug.cgi?id=91196
703
704         Reviewed by Pavel Feldman.
705
706         Refactoring InspectorClients. InspectorClient::openInspectorFrontend
707         now returning the InspectorFrontendChannel.
708
709         * Api/WebPage.cpp:
710         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
711         (BlackBerry::WebKit::WebPagePrivate::init):
712         (BlackBerry::WebKit::WebPage::enableWebInspector):
713         * Api/WebPage_p.h:
714         (WebPagePrivate):
715         * WebCoreSupport/InspectorClientBlackBerry.cpp:
716         (WebCore::InspectorClientBlackBerry::openInspectorFrontend):
717         * WebCoreSupport/InspectorClientBlackBerry.h:
718         (InspectorClientBlackBerry):
719
720 2012-07-17  Chris Guan  <chris.guan@torchmobile.com.cn>
721
722         [BlackBerry] Enable registerProtocolHandler for Blackberry
723         https://bugs.webkit.org/show_bug.cgi?id=90422
724
725         Reviewed by George Staikos.
726
727         Implements APIs were added in Custom Scheme Handler specification
728         which is at http://dev.w3.org/html5/spec/Overview.html#custom-handlers.
729
730         Test cases:
731         fast/dom/register-protocol-handler.html
732         fast/dom/unregister-protocol-handler.html
733
734         * Api/WebPageClient.h:
735         * WebCoreSupport/ChromeClientBlackBerry.cpp:
736         (WebCore::ChromeClientBlackBerry::isProtocolHandlerRegistered):
737         (WebCore::ChromeClientBlackBerry::unregisterProtocolHandler):
738         (WebCore::ChromeClientBlackBerry::registerProtocolHandler):
739         * WebCoreSupport/ChromeClientBlackBerry.h:
740         (ChromeClientBlackBerry):
741
742 2012-07-16  Benjamin C Meyer  <bmeyer@rim.com>
743
744         Any webpage can crash webkit via qnx.callExtensionMethod assuming 'this' is the 'qnx' object.
745         https://bugs.webkit.org/show_bug.cgi?id=91419
746
747         Run the following in inspector to crash WebKit
748
749         qnx.callExtensionMethod.apply(window, []);
750
751         In the c++ that handles the function it assumes that when callExtensionMethod
752         is called that 'this' is the object 'qnx'.  The qnx object has a hidden
753         variable that the code casts and uses, but when 'this' is not qnx such as the
754         example this will cause a crash.  Any website can insert the above JavaScript
755         to cause the crash.
756
757         Reviewed by Yong Li.
758
759         * WebCoreSupport/ClientExtension.cpp:
760         (clientExtensionMethod):
761
762 2012-07-16  Yong Li  <yoli@rim.com>
763
764         [BlackBerry] Improve about:memory page
765         https://bugs.webkit.org/show_bug.cgi?id=87676
766
767         Reviewed by Rob Buis.
768
769         Add a table for process memory usage summary for easy read.
770
771         * WebCoreSupport/AboutData.cpp:
772         (WebCore::memoryPage):
773
774 2012-07-16  Kihong Kwon  <kihong.kwon@samsung.com>
775
776         Remove setController from BatteryClient
777         https://bugs.webkit.org/show_bug.cgi?id=90944
778
779         Reviewed by Adam Barth.
780
781         BatteryClient doesn't need to keep m_controller,
782         because BatteryController can be accessed using BatteryController::from().
783         Remove m_controller and Add webPagePrivate to BatteryClientBlackBerry.
784         And change all m_controller to BatteryController::from.
785
786         * Api/WebPage.cpp:
787         (BlackBerry::WebKit::WebPagePrivate::init):
788         * WebCoreSupport/BatteryClientBlackBerry.cpp:
789         (WebCore::BatteryClientBlackBerry::BatteryClientBlackBerry):
790         (WebCore::BatteryClientBlackBerry::onLevelChange):
791         (WebCore::BatteryClientBlackBerry::onChargingChange):
792         (WebCore::BatteryClientBlackBerry::onChargingTimeChange):
793         (WebCore::BatteryClientBlackBerry::onDischargingTimeChange):
794         * WebCoreSupport/BatteryClientBlackBerry.h:
795         (BatteryClientBlackBerry):
796
797 2012-07-16  Yongxin Dai  <yodai@rim.com>
798
799         [BlackBerry] Text selection with touch hold does not start on text field in some cases
800         https://bugs.webkit.org/show_bug.cgi?id=91267
801
802         Reviewed by Antonio Gomes.
803
804         Input fields host node is by spec non-editable unless the field itself has content editable enabled.
805         We enable selection if the shadow tree for the input field is selectable.
806         PR # 173450
807
808         Reviewed Internally by Mike Fenton.
809
810         * Api/WebPage.cpp:
811         (BlackBerry::WebKit::WebPagePrivate::webContext):
812         * Api/WebPage.cpp:
813         (BlackBerry::WebKit::WebPagePrivate::webContext):
814
815 2012-07-15  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
816
817         [BlackBerry] Move icon database to application data directory.
818         https://bugs.webkit.org/show_bug.cgi?id=91195
819
820         Reviewed by Rob Buis.
821
822         RIM PR: 156852
823         Create icon database in application data directory instead of
824         database or local storage directory, by doing this we can make
825         things easier when clearing database or local storage data files.
826
827         Internally reviewed by Charles Wei <charles.wei@torchmobile.com.cn>
828
829         * WebCoreSupport/IconDatabaseClientBlackBerry.cpp:
830         (WebCore::IconDatabaseClientBlackBerry::initIconDatabase):
831
832 2012-07-13  Xianzhu Wang  <wangxianzhu@chromium.org>
833
834         Move WebCore/platform/text/Base64 to WTF/wtf/text
835         https://bugs.webkit.org/show_bug.cgi?id=91162
836
837         Reviewed by Adam Barth.
838
839         * Api/WebKitTextCodec.cpp:
840         (BlackBerry::WebKit::base64DecodePolicyForWTF):
841         (BlackBerry::WebKit::base64Decode):
842         (BlackBerry::WebKit::base64EncodePolicyForWTF):
843         (BlackBerry::WebKit::base64Encode):
844         * Api/WebSettings.cpp:
845         (BlackBerry::WebKit::WebSettings::setUserStyleSheetString):
846         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
847
848 2012-07-13  George Staikos  <staikos@webkit.org>
849
850         [BlackBerry] Fix crash due to unguarded use of renderer in select
851         popup.
852         https://bugs.webkit.org/show_bug.cgi?id=91287
853
854         Reviewed by Rob Buis.
855
856         No known testcase for this.  Found in the wild.
857
858         * WebCoreSupport/SelectPopupClient.cpp:
859         (WebCore::SelectPopupClient::setValueAndClosePopup):
860
861 2012-07-13  Mike Fenton  <mifenton@rim.com>
862
863         [BlackBerry] Add support for attributes to define keyboard and enter key type on the Virtual Keyboard
864         https://bugs.webkit.org/show_bug.cgi?id=91248
865
866         Reviewed by Antonio Gomes.
867
868         PR 174733.
869
870         Add data-blackberry-virtual-keyboard-type and
871         data-blackberry-virtual-keyboard-enter-key to
872         enable configuration of the desired virtual keyboard
873         using element attributes.
874
875         Reviewed Internally by Gen Mak.
876
877         * Api/WebPageClient.h:
878         * WebKitSupport/InputHandler.cpp:
879         (BlackBerry::WebKit::convertStringToKeyboardType):
880         (WebKit):
881         (BlackBerry::WebKit::keyboardTypeAttribute):
882         (BlackBerry::WebKit::convertStringToKeyboardEnterKeyType):
883         (BlackBerry::WebKit::keyboardEnterKeyTypeAttribute):
884         (BlackBerry::WebKit::InputHandler::setElementFocused):
885
886 2012-07-13  Jacky Jiang  <zhajiang@rim.com>
887
888         [BlackBerry] resetBitmapZoomScale called while zooming preventing pinch zoom
889         https://bugs.webkit.org/show_bug.cgi?id=91247
890
891         Reviewed by Antonio Gomes.
892
893         PR: 175432
894         On yahoo.com, the web page stopped zooming while trying to pinch as
895         WebPageClient::resetBitmapZoomScale(double) was being called by
896         WebPagePrivate::zoomToInitialScaleOnLoad() after load finished.
897         And also yahoo.com was keeping updating layout, which made it really
898         bad that zoomToInitialScaleOnLoad() was called many times when load
899         finished and the load type was FrameLoadTypeStandard or FrameLoadTypeSame.
900         As we only care about the situation that dispatchDidFirstVisuallyNonEmptyLayout()
901         happens after load finished, we can move the code to that method and
902         set a flag for WebPage layoutFinished() and zoomToInitialScaleOnLoad()
903         instead. In this way, we can ensure that the flag is only enabled when
904         dispatchDidFirstVisuallyNonEmptyLayout() is called after load finished
905         and get rid of calling zoomToInitialScaleOnLoad() lots of times when
906         keeping updating layout in such kind of situation.
907
908         Internally reviewed by Arvid Nilsson
909
910         * Api/WebPage.cpp:
911         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
912         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
913         (BlackBerry::WebKit::WebPagePrivate::layoutFinished):
914         * Api/WebPage_p.h:
915         (BlackBerry::WebKit::WebPagePrivate::shouldZoomToInitialScaleOnLoad):
916         (BlackBerry::WebKit::WebPagePrivate::setShouldZoomToInitialScaleAfterLoadFinished):
917         (WebPagePrivate):
918         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
919         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFirstVisuallyNonEmptyLayout):
920
921 2012-07-13  Jakob Petsovits  <jpetsovits@rim.com>
922
923         [BlackBerry] Use fillBuffer() instead of a user-defined background image.
924         https://bugs.webkit.org/show_bug.cgi?id=91180
925         RIM PR 171458
926
927         Reviewed by Rob Buis.
928         Internally reviewed by Andrew Lo.
929
930         By using Platform::Graphics::fillBuffer() to fill the
931         overscroll area, we save graphics memory for the buffer
932         that the background image was occupying.
933
934         Also adapt checkerboard drawing as it is now done using
935         fillBuffer() which replaces checkerBuffer().
936
937         In the same go, use the opportunity of the WebSettings
938         API change to make it more consistent, renaming the
939         OverZoomColor setting to OverScrollColor.
940
941         * Api/BackingStore.cpp:
942         (WebKit):
943         (BlackBerry::WebKit::BackingStorePrivate::paintDefaultBackground):
944         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
945         (BlackBerry::WebKit::BackingStorePrivate::fillWindow):
946         * Api/BackingStore_p.h:
947         (BackingStorePrivate):
948         * Api/WebSettings.cpp:
949         (WebKit):
950         (BlackBerry::WebKit::WebSettings::standardSettings):
951         (BlackBerry::WebKit::WebSettings::overScrollColor):
952         (BlackBerry::WebKit::WebSettings::setOverScrollColor):
953         (BlackBerry::WebKit::WebSettings::isEnableDefaultOverScrollBackground):
954         (BlackBerry::WebKit::WebSettings::setEnableDefaultOverScrollBackground):
955         * Api/WebSettings.h:
956
957 2012-07-13  Joshua Netterfield  <jnetterfield@rim.com>
958
959         [BlackBerry] Update about:* pages
960         https://bugs.webkit.org/show_bug.cgi?id=91121
961
962         Reviewed by Yong Li.
963
964         Update the about:config pages, and improve the aesthetics of the about:build, about:version, about:credits, about:memory, about:config, and similar pages.
965
966         No new tests, because there is no new funtionality.
967
968         * WebCoreSupport/AboutData.cpp:
969         (WebCore):
970         (WebCore::writeFeatures):
971         (WebCore::numberToHTMLTr): Converted to template function, added bool specialization to write "true" and "false" instead of "1" and "0"
972         (WebCore::configPage):
973         (WebCore::memoryPage):
974         * WebCoreSupport/AboutTemplate.html.cpp: Template for BlackBerry about:* pages.
975
976 2012-07-12  Benjamin C Meyer  <bmeyer@rim.com>
977
978         WebPage::executeJavaScriptFunction crashes when there is an exception
979         https://bugs.webkit.org/show_bug.cgi?id=91098
980         RIM PR #149294
981
982         When there is an exception currently the code tries to get the string of
983         the exception via JSValueToStringCopy to pass back, but this cases a
984         crash inside JavaScriptCore, so change it to simply return false and not
985         set the return value with the exception string.
986
987         Reviewed by George Staikos.
988
989         * Api/WebPage.cpp:
990         (BlackBerry::WebKit::WebPage::executeJavaScriptFunction):
991
992 2012-07-12  Pawel Chomicki  <pchomicki@rim.com>
993
994         [BlackBerry] WebPage::touchEvent() should use Platform::TouchEvent's toString() for debugging.
995         https://bugs.webkit.org/show_bug.cgi?id=91002
996
997         Reviewed by Antonio Gomes.
998         Reviewed internally by Genevieve Mak.
999
1000         Updated DEBUG_TOUCH_EVENTS section of touchEvent method to utilize
1001         Platform::TouchEvent's toString method.
1002
1003         * Api/WebPage.cpp:
1004         (BlackBerry::WebKit::WebPage::touchEvent):
1005
1006 2012-07-12  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1007
1008         [BlackBerry] Cannot use digest proxy auth and NTLM auth at the same time
1009         https://bugs.webkit.org/show_bug.cgi?id=91054
1010
1011         Reviewed by George Staikos.
1012
1013         Implemented interface function syncProxyCredential() derived
1014         from class PageClientBlackBerry.
1015
1016         Internally reviewed by Jason Liu <jason.liu@torchmobile.com.cn>
1017
1018         * Api/WebPage.cpp:
1019         (BlackBerry::WebKit::WebPagePrivate::syncProxyCredential):
1020         (WebKit):
1021         * Api/WebPageClient.h:
1022         * Api/WebPage_p.h:
1023         (WebPagePrivate):
1024
1025 2012-07-11  Mike Lattanzio  <mlattanzio@rim.com>
1026
1027         [BlackBerry] UserViewportArguments are not properly respected.
1028         https://bugs.webkit.org/show_bug.cgi?id=91005
1029
1030         Reviewed by Rob Buis.
1031
1032         PR# 170088.
1033         Move scale and zooming reset on Committed before applying
1034         the user viewport to avoid overriding it immediately.
1035
1036         Internal review by Konrad Piascik, Jacky Jiang.
1037
1038         * Api/WebPage.cpp:
1039         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
1040
1041 2012-07-11  Crystal Zhang  <haizhang@rim.com>
1042
1043         [BlackBerry] Implement Date/Time picker
1044         https://bugs.webkit.org/show_bug.cgi?id=90911
1045
1046         Reviewed by Rob Buis.
1047
1048         Implement HTML Date/Time picker, also should delete popup when closing popup.
1049
1050         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1051         (WebCore::ChromeClientBlackBerry::closePagePopup):
1052         * WebCoreSupport/DatePickerClient.cpp: Added.
1053         (WebCore):
1054         (WebCore::DatePickerClient::DatePickerClient):
1055         (WebCore::DatePickerClient::~DatePickerClient):
1056         (WebCore::DatePickerClient::generateHTML):
1057         (WebCore::DatePickerClient::closePopup):
1058         (WebCore::DatePickerClient::contentSize):
1059         (WebCore::DatePickerClient::htmlSource):
1060         (WebCore::DatePickerClient::setValueAndClosePopup):
1061         (WebCore::DatePickerClient::didClosePopup):
1062         (WebCore::DatePickerClient::writeDocument):
1063         * WebCoreSupport/DatePickerClient.h: Added.
1064         (WebKit):
1065         (WebCore):
1066         (DatePickerClient):
1067         * WebKitSupport/InputHandler.cpp:
1068         (BlackBerry::WebKit::InputHandler::openDatePopup):
1069
1070 2012-07-10  Adam Barth  <abarth@webkit.org>
1071
1072         WebCore::Settings for Hixie76 WebSocket protocol doesn't do anything and should be removed
1073         https://bugs.webkit.org/show_bug.cgi?id=90910
1074
1075         Reviewed by Eric Seidel.
1076
1077         * Api/WebPage.cpp:
1078         (BlackBerry::WebKit::WebPagePrivate::init):
1079
1080 2012-07-10  Adam Barth  <abarth@webkit.org>
1081
1082         LayoutTestController.dumpConfigurationForViewport should move to Internals
1083         https://bugs.webkit.org/show_bug.cgi?id=45652
1084
1085         Reviewed by Eric Seidel.
1086
1087         * WebKitSupport/DumpRenderTreeSupport.cpp:
1088         * WebKitSupport/DumpRenderTreeSupport.h:
1089         (DumpRenderTreeSupport):
1090
1091 2012-07-09  Yong Li  <yoli@rim.com>
1092
1093         [BlackBerry] PagePopupBlackBerry::closePopup() should always clear the pointer in WebPagePrivate
1094         https://bugs.webkit.org/show_bug.cgi?id=90817
1095
1096         Reviewed by Rob Buis.
1097
1098         PR# 174085.
1099         PagePopupBlackBerry::closePopup() should always clear the pointer in WebPagePrivate to avoid crashes.
1100         This patch also removes unused variable m_parentPopup and its setter.
1101
1102         * Api/WebPage.cpp:
1103         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): Remove m_parentPopup.
1104         * Api/WebPage_p.h:
1105         (WebPagePrivate):
1106         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1107         (WebCore::ChromeClientBlackBerry::closePagePopup):
1108         * WebCoreSupport/PagePopupBlackBerry.cpp:
1109         (WebCore::PagePopupBlackBerry::init): Remove the setParentPopup() call.
1110         (WebCore::PagePopupBlackBerry::closePopup): Clear the reference in WebPagePrivate.
1111         * WebCoreSupport/SelectPopupClient.cpp:
1112         (WebCore::SelectPopupClient::setValueAndClosePopup): Add an assert for valid m_element.
1113
1114 2012-07-09  Mike Lattanzio  <mlattanzio@rim.com>
1115
1116         [BlackBerry] meta viewport initial-scale doesn't factor in device pixel ratio
1117         https://bugs.webkit.org/show_bug.cgi?id=90575
1118
1119         Reviewed by Rob Buis.
1120
1121         Refactor meta viewport handling to multiply the developer
1122         specified scale properties by the devicePixelRatio. This
1123         required moving the setting of these values until after
1124         the call to computeViewportAttributes.
1125
1126         This fixes an isssue where content wider than the meta viewport
1127         would case a zoom-out-to-fit scenario because we misinterpreted
1128         the specified initial-scale.
1129
1130         New test to verify wide content doesn't affect initial-scale:
1131         ManualTests/blackberry/meta-viewport-initial-scale-wide-content.html
1132
1133         Internal review from Konrad Piascik, Arvid Nilsson.
1134
1135         * Api/WebPage.cpp:
1136         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
1137         (BlackBerry::WebKit::WebPagePrivate::dispatchViewportPropertiesDidChange):
1138
1139 2012-07-07  George Staikos  <staikos@webkit.org>
1140
1141         Detach animation clients properly if we clear the web page pointer.
1142         https://bugs.webkit.org/show_bug.cgi?id=90730
1143
1144         Reviewed by Adam Treat.
1145
1146         * Api/WebPage.cpp:
1147         (BlackBerry::WebKit::WebPagePrivate::destroyCompositor):
1148         * Api/WebPageCompositor.cpp:
1149         (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
1150         (BlackBerry::WebKit::WebPageCompositorPrivate::~WebPageCompositorPrivate):
1151         (WebKit):
1152         (BlackBerry::WebKit::WebPageCompositorPrivate::detach):
1153         (BlackBerry::WebKit::WebPageCompositorPrivate::setPage):
1154         * Api/WebPageCompositor_p.h:
1155         (WebPageCompositorPrivate):
1156
1157 2012-07-06  Max Feil  <mfeil@rim.com>
1158
1159         [BlackBerry] exitFullScreenForElement() is not working for fullscreen elements in iframes
1160         https://bugs.webkit.org/show_bug.cgi?id=90327
1161
1162         Reviewed by Antonio Gomes.
1163
1164         Fix exit fullscreen problem for elements in iframes. The
1165         exitFullScreenForElement() call is passed a null element in
1166         this case, instead of the original element which entered
1167         fullscreen. If you look in Document.cpp you can see the
1168         exitFullScreenForElement() call being made on the topDocument
1169         (which has a null m_fullScreenElement) instead of the iframe's
1170         document.
1171
1172         The Chromium and Windows ports get around this problem by
1173         storing either the fullscreen element or its frame during
1174         enterFullScreenForElement(), so I will bring the BlackBerry port
1175         in line with this. See also bug 89817.
1176
1177         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1178         (WebCore::ChromeClientBlackBerry::enterFullScreenForElement):
1179         (WebCore::ChromeClientBlackBerry::exitFullScreenForElement):
1180         * WebCoreSupport/ChromeClientBlackBerry.h:
1181         (ChromeClientBlackBerry):
1182
1183 2012-07-06  Benjamin C Meyer  <bmeyer@rim.com>
1184
1185         Add an API to explicitly call a JavaScript function with args.
1186         https://bugs.webkit.org/show_bug.cgi?id=90694
1187
1188         Currently the Blackberry port doesn't expose the JavaScript
1189         engine to 3rd parties so they rely upon executeJavaScript
1190         which can be slower than necessary and unsafe as eval is used.
1191         This new API provides a way to explicitly call a specific
1192         JavaScript function with a list of args preventing the case
1193         where an argument comes from a untrusted source and tries to
1194         escape the arg list to take control of the JavaScript engine.
1195
1196         In the future if the Blackberry port introduces a formal
1197         way to interact with the JavaScript engine this function should
1198         be removed.
1199
1200         PR 149294
1201
1202         Reviewed by Unreviewed
1203
1204         * Api/WebPage.cpp:
1205         (BlackBerry::WebKit::WebPage::executeJavaScriptFunction):
1206         (WebKit):
1207         * Api/WebPage.h:
1208
1209 2012-07-05  Charles Wei  <charles.wei@torchmobile.com.cn>
1210
1211         [BlackBerry] Fix the build error introduced by enabling CUSTOM_THEME_HANDLER
1212         https://bugs.webkit.org/show_bug.cgi?id=90588
1213
1214         Reviewed by Rob Buis.
1215
1216         Fix the build error introduced by enabling CUSTOM_THEME_HANDLER.
1217         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1218         (WebCore::ChromeClientBlackBerry::isProtocolHandlerRegistered):
1219
1220 2012-07-04  Hanna Ma  <Hanma@rim.com>
1221
1222         [BlackBerry] Implement device metrics for blackberry.
1223         https://bugs.webkit.org/show_bug.cgi?id=90494
1224         RIM PR #159034
1225
1226         Reviewed by Rob Buis.
1227
1228         Implement calls to the application to change the device metrics for
1229         the web inspector.
1230
1231         * Api/WebPage.cpp:
1232         (BlackBerry::WebKit::WebPagePrivate::applySizeOverride):
1233         (WebKit):
1234         (BlackBerry::WebKit::WebPagePrivate::setTextZoomFactor):
1235         * Api/WebPage_p.h:
1236         (WebPagePrivate):
1237         * WebCoreSupport/InspectorClientBlackBerry.cpp:
1238         (WebCore::InspectorClientBlackBerry::InspectorClientBlackBerry):
1239         (WebCore::InspectorClientBlackBerry::canOverrideDeviceMetrics):
1240         (WebCore):
1241         (WebCore::InspectorClientBlackBerry::overrideDeviceMetrics):
1242         (WebCore::InspectorClientBlackBerry::supportsFrameInstrumentation):
1243         * WebCoreSupport/InspectorClientBlackBerry.h:
1244         (InspectorClientBlackBerry):
1245
1246 2012-07-03  Leo Yang  <leo.yang@torchmobile.com.cn>
1247
1248         [BlackBerry] Checkerboard shown when clicking on error page buttons
1249         https://bugs.webkit.org/show_bug.cgi?id=90152
1250         RIM PR #161867
1251
1252         Reviewed by George Staikos.
1253
1254         r121514 just made the race occur in lower possibility but can't avoid it.
1255         This path is using another approach to fix the problem. When we are resetting
1256         backingstore while committing a page we need to suspend backingstore and
1257         screen update to make sure no other threads can update backingstore and screen.
1258
1259         * Api/BackingStore.cpp:
1260         (BlackBerry::WebKit::BackingStorePrivate::resetTiles):
1261         * Api/WebPage.cpp:
1262         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
1263
1264 2012-07-03  George Staikos  <staikos@webkit.org>
1265
1266         [BlackBerry] Enable Custom Scheme Handlers for BlackBerry.
1267         https://bugs.webkit.org/show_bug.cgi?id=90422
1268
1269         Reviewed by Rob Buis.
1270
1271         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1272         (WebCore):
1273         (WebCore::ChromeClientBlackBerry::isProtocolHandlerRegistered):
1274         (WebCore::ChromeClientBlackBerry::unregisterProtocolHandler):
1275         * WebCoreSupport/ChromeClientBlackBerry.h:
1276         (ChromeClientBlackBerry):
1277
1278 2012-07-03  George Staikos  <staikos@webkit.org>
1279
1280         [BlackBerry] Enable RegisterProtocolHandler for BlackBerry.
1281         https://bugs.webkit.org/show_bug.cgi?id=90422
1282
1283         Reviewed by Rob Buis.
1284
1285         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1286         (WebCore):
1287         (WebCore::ChromeClientBlackBerry::registerProtocolHandler):
1288         * WebCoreSupport/ChromeClientBlackBerry.h:
1289         (ChromeClientBlackBerry):
1290
1291 2012-07-03  Jan Keromnes  <janx@linux.com>
1292
1293         Web Inspector: WebInspector.TextViewer should be renamed WebInspector.TextEditor
1294         https://bugs.webkit.org/show_bug.cgi?id=89939
1295
1296         Reviewed by Vsevolod Vlasov.
1297
1298         * WebCoreSupport/inspectorBB.html:
1299
1300 2012-07-02  Xiaobo Wang  <xbwang@torchmobile.com.cn>
1301
1302         [BlackBerry] Use PUBLIC_BUILD to enable/disable DRT
1303         https://bugs.webkit.org/show_bug.cgi?id=90271
1304
1305         Reviewed by George Staikos.
1306
1307         RIM PR #154707
1308
1309         Currently DRT code will be compiled only if ENABLE_DRT is set, and it's not
1310         defined by default.
1311         We should enable DRT by default unless PUBLIC_BUILD is set. In this way we don't
1312         need to rebuild webkit before running DRT.
1313
1314         * Api/WebPage.cpp:
1315         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
1316         (BlackBerry::WebKit::WebPagePrivate::init):
1317         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
1318         (BlackBerry::WebKit::WebPage::runLayoutTests):
1319         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1320         (WebCore::ChromeClientBlackBerry::addMessageToConsole):
1321         (WebCore::ChromeClientBlackBerry::runJavaScriptAlert):
1322         (WebCore::ChromeClientBlackBerry::runJavaScriptConfirm):
1323         (WebCore::ChromeClientBlackBerry::runJavaScriptPrompt):
1324         (WebCore::ChromeClientBlackBerry::createWindow):
1325         (WebCore::ChromeClientBlackBerry::runBeforeUnloadConfirmPanel):
1326         (WebCore::ChromeClientBlackBerry::setStatusbarText):
1327         (WebCore::ChromeClientBlackBerry::exceededDatabaseQuota):
1328         (WebCore::ChromeClientBlackBerry::keyboardUIMode):
1329
1330 2012-07-02  George Staikos  <staikos@webkit.org>
1331
1332         [BlackBerry] Implement cancelVibration, and make sure it's canceled on
1333         destruction.
1334         https://bugs.webkit.org/show_bug.cgi?id=90406
1335
1336         Reviewed by Rob Buis.
1337
1338         * WebCoreSupport/VibrationClientBlackBerry.cpp:
1339         (WebCore::VibrationClientBlackBerry::cancelVibration):
1340         (WebCore::VibrationClientBlackBerry::vibrationDestroyed):
1341
1342 2012-07-02  Benjamin Poulain  <bpoulain@apple.com>
1343
1344         Do not do any logging initialization when logging is disabled
1345         https://bugs.webkit.org/show_bug.cgi?id=90228
1346
1347         Reviewed by Simon Fraser.
1348
1349         * Api/BlackBerryGlobal.cpp:
1350         (BlackBerry::WebKit::globalInitialize):
1351
1352 2012-07-01  George Staikos  <staikos@webkit.org>
1353
1354         Clear visited links when clearing history.
1355         https://bugs.webkit.org/show_bug.cgi?id=90345
1356
1357         Reviewed by Antonio Gomes.
1358
1359         * Api/WebPage.cpp:
1360         (BlackBerry::WebKit::WebPage::clearHistory):
1361
1362 2012-06-30  Jason Liu  <jason.liu@torchmobile.com.cn>
1363
1364         [BlackBerry] WebView/Browser cause blank screen when selecting a dropdown field.
1365         https://bugs.webkit.org/show_bug.cgi?id=90241
1366
1367         This issue is caused by single quotes in option's labels.
1368         We should use the escape character of single quotes in JavaScript's string which 
1369         starts and ends with single quotes.
1370         So we replace lablels' single quotes with its escape character during generating the 
1371         select popUp's HTML.
1372
1373         Reviewed by George Staikos.
1374
1375         * WebCoreSupport/SelectPopupClient.cpp:
1376         (WebCore::SelectPopupClient::generateHTML):
1377
1378 2012-06-30  Jakob Petsovits  <jpetsovits@rim.com>
1379
1380         [BlackBerry] Allow surface resizing for use cases other than rotation.
1381         https://bugs.webkit.org/show_bug.cgi?id=90295
1382         RIM PR 171459
1383
1384         Reviewed by George Staikos.
1385
1386         A new API method setHasPendingSurfaceSizeChange() is
1387         introduced for that effect, and used inside of
1388         setViewportSize() to let the WebPageClient do the
1389         resizing. Methods are renamed to reflect that this
1390         is not exclusively meant for rotation anymore.
1391
1392         * Api/WebPage.cpp:
1393         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
1394         (BlackBerry::WebKit::WebPage::setScreenOrientation):
1395         (WebKit):
1396         (BlackBerry::WebKit::WebPage::setHasPendingSurfaceSizeChange):
1397         (BlackBerry::WebKit::WebPagePrivate::resizeSurfaceIfNeeded):
1398         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
1399         * Api/WebPage.h:
1400         * Api/WebPageClient.h:
1401         * Api/WebPage_p.h:
1402         (WebPagePrivate):
1403
1404 2012-06-29  Jacky Jiang  <zhajiang@rim.com>
1405
1406         [BlackBerry] Page jumps after post-pinch-zoom re-render
1407         https://bugs.webkit.org/show_bug.cgi?id=90282
1408
1409         Reviewed by Antonio Gomes.
1410
1411         PR: 170255
1412         In r120622, we moved ScrollableArea::setConstrainsScrollingToContentEdge(false|true)
1413         from WebPage::setScrollPosition() to BackingStorePrivate::setScrollingOrZooming()
1414         to address an overscroll reset issue.
1415         However, when we are ending bitmap zooming, UI thread can call
1416         BackingStorePrivate::setScrollingOrZooming(false) before WebKit thread
1417         calls WebPage::setScrollPosition(), in which case it will set
1418         ScrollableArea::m_constrainsScrollingToContentEdge to true earlier.
1419         To fix this, we can cache ScrollableArea::m_constrainsScrollingToContentEdge
1420         and always set it to false before we set scroll position in WebKit
1421         thread to avoid scroll position clamping during scrolling, and restore
1422         it to what it was after that.
1423
1424         * Api/WebPage.cpp:
1425         (BlackBerry::WebKit::WebPage::setScrollPosition):
1426
1427 2012-06-29  Jakob Petsovits  <jpetsovits@rim.com>
1428
1429         Add blitVisibleContents() as public API.
1430         https://bugs.webkit.org/show_bug.cgi?id=90211
1431
1432         Reviewed by Adam Treat.
1433
1434         We keep blitContents() (with src/dst rectangles)
1435         for compatibility with older Cascades sprints for now,
1436         but want to switch to always blitting the full viewport
1437         and this is a good first step.
1438
1439         * Api/BackingStore.cpp:
1440         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
1441         (BlackBerry::WebKit::BackingStore::blitVisibleContents):
1442         (WebKit):
1443         * Api/BackingStore.h:
1444
1445 2012-06-29  Konrad Piascik  <kpiascik@rim.com>
1446
1447         Don't hardcode target dpi of 160 (it should be 96 on desktop)
1448         https://bugs.webkit.org/show_bug.cgi?id=88114
1449
1450         Reviewed by Adam Barth.
1451
1452         Added new WebSetting to specify what the devicePixelRatio should be.
1453         Updated the call to computeViewportAttributes.
1454
1455         * Api/WebPage.cpp:
1456         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
1457         * Api/WebSettings.cpp:
1458         (WebKit):
1459         (BlackBerry::WebKit::WebSettings::standardSettings):
1460         (BlackBerry::WebKit::WebSettings::devicePixelRatio):
1461         (BlackBerry::WebKit::WebSettings::setDevicePixelRatio):
1462         * Api/WebSettings.h:
1463         * WebKitSupport/DumpRenderTreeSupport.cpp:
1464         (DumpRenderTreeSupport::dumpConfigurationForViewport):
1465
1466 2012-06-28  Jason Liu  <jason.liu@torchmobile.com.cn>
1467
1468         [BlackBerry] Selection items show as garbage for non-ascii characters.
1469         https://bugs.webkit.org/show_bug.cgi?id=89969
1470
1471         Add charset utf-8 to the select popup's page.
1472
1473         Reviewed by Antonio Gomes.
1474
1475         * WebCoreSupport/SelectPopupClient.cpp:
1476         (WebCore::SelectPopupClient::generateHTML):
1477
1478 2012-06-28  Leo Yang  <leo.yang@torchmobile.com.cn>
1479
1480         [BlackBerry] Checkerboard shown when clicking on error page buttons
1481         https://bugs.webkit.org/show_bug.cgi?id=90152
1482         RIM PR #161867
1483
1484         Reviewed by George Staikos.
1485
1486         Reset m_hasBlitJobs when resetting tiles to prevent ui thread from drawing checkerboard unintentionally.
1487
1488         * Api/BackingStore.cpp:
1489         (BlackBerry::WebKit::BackingStorePrivate::resetTiles):
1490
1491 2012-06-27  Andrew Lo  <anlo@rim.com>
1492
1493         [BlackBerry] Selection overlay can become visible after it has been hidden
1494         https://bugs.webkit.org/show_bug.cgi?id=90105
1495
1496         Reviewed by George Staikos.
1497
1498         When SelectionOverlay::hide is called from UI thread,
1499         rather than setting the override opacity, dispatch to the
1500         WebKit thread, which removes the overlay (normal case).
1501
1502         Internal PR164183.
1503         Internally Reviewed by: Arvid Nilsson.
1504
1505         * Api/WebPage.cpp:
1506         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
1507         (BlackBerry::WebKit::WebPage::selectionOverlay):
1508         * Api/WebPage_p.h:
1509         (WebPagePrivate):
1510         * Api/WebSelectionOverlay.h:
1511         * WebKitSupport/SelectionOverlay.cpp:
1512         (BlackBerry::WebKit::SelectionOverlay::SelectionOverlay):
1513         (BlackBerry::WebKit::SelectionOverlay::hide):
1514         * WebKitSupport/SelectionOverlay.h:
1515         (BlackBerry::WebKit::SelectionOverlay::create):
1516         (SelectionOverlay):
1517
1518 2012-06-25  Mark Hahnenberg  <mhahnenberg@apple.com>
1519
1520         JSLock should be per-JSGlobalData
1521         https://bugs.webkit.org/show_bug.cgi?id=89123
1522
1523         Reviewed by Geoffrey Garen.
1524
1525         Changed all sites that used JSLock to instead use the new JSLockHolder
1526         and pass in the correct JS context that the code is about to interact with that 
1527         needs protection. Also added a couple JSLocks to places that didn't already 
1528         have it that needed it.
1529
1530         * Api/BlackBerryGlobal.cpp:
1531         (BlackBerry::WebKit::clearMemoryCaches):
1532         * WebCoreSupport/ClientExtension.cpp:
1533         * WebCoreSupport/PagePopupBlackBerry.cpp:
1534         (WebCore::PagePopupBlackBerry::installDomFunction):
1535         * WebKitSupport/DumpRenderTreeSupport.cpp:
1536         (DumpRenderTreeSupport::computedStyleIncludingVisitedInfo):
1537
1538 2012-06-27  Jacky Jiang  <zhajiang@rim.com>
1539
1540         [BlackBerry] Wrong scale after leaving fullscreen <video>
1541         https://bugs.webkit.org/show_bug.cgi?id=89546
1542
1543         Reviewed by Antonio Gomes.
1544
1545         PR: 164948
1546         When we were entering fullscreen, the current scale A was clamped to a
1547         greater minimum scale B as we relayouted the contents during the change
1548         of the viewport size. When leaving fullscreen, we still used that scale
1549         B as the current scale which was incorrect.
1550         To fix this, we can save the current scale when entering fullscreen and
1551         restore it when leaving fullscreen.
1552
1553         * Api/WebPage.cpp:
1554         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
1555         (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
1556         (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
1557         * Api/WebPage_p.h:
1558         (WebPagePrivate):
1559
1560 2012-06-27  Jacky Jiang  <zhajiang@rim.com>
1561
1562         [BlackBerry] Scale was incorrect when reloading a simple web page after initial load
1563         https://bugs.webkit.org/show_bug.cgi?id=88889
1564
1565         Reviewed by Antonio Gomes.
1566
1567         PR: 164442
1568         For FrameLoadTypeStandard load, the layout timer can be fired which can
1569         call dispatchDidFirstVisuallyNonEmptyLayout() after the load Finished
1570         state, in which case the web page will have no chance to zoom to
1571         initial scale. We should give it a chance as well as FrameLoadTypeSame
1572         load.
1573
1574         * Api/WebPage.cpp:
1575         (BlackBerry::WebKit::WebPagePrivate::shouldZoomToInitialScaleOnLoad):
1576
1577 2012-06-26  Mike Fenton  <mifenton@rim.com>
1578
1579         [BlackBerry] Add WebPage interface for Async spell check.
1580         https://bugs.webkit.org/show_bug.cgi?id=89999
1581
1582         Reviewed by Rob Buis.
1583
1584         PR 124517.
1585
1586         Add interface for IMS async spell checking.
1587
1588         Reviewed Internally by Nima Ghanavatian.
1589
1590         * Api/WebPage.cpp:
1591         (BlackBerry::WebKit::WebPage::spellCheckingRequestProcessed):
1592         (WebKit):
1593         * Api/WebPage.h:
1594         * Api/WebPageClient.h:
1595         * WebKitSupport/InputHandler.cpp:
1596         (WebKit):
1597         (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
1598         * WebKitSupport/InputHandler.h:
1599         (InputHandler):
1600
1601 2012-06-26  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1602
1603         [BlackBerry] Limit session storage quota to 5MB by default
1604         https://bugs.webkit.org/show_bug.cgi?id=89941
1605
1606         Reviewed by Rob Buis.
1607
1608         Limit session storage quota to 5MB by default for BlackBerry
1609         porting.
1610         Internally reviewed by George Staikos.
1611
1612         * Api/WebPage.cpp:
1613         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
1614         * Api/WebSettings.cpp:
1615         (WebKit):
1616         (BlackBerry::WebKit::WebSettings::standardSettings):
1617         (BlackBerry::WebKit::WebSettings::sessionStorageQuota):
1618         (BlackBerry::WebKit::WebSettings::setSessionStorageQuota):
1619         * Api/WebSettings.h:
1620
1621 2012-06-26  Charles Wei  <charles.wei@torchmobile.com.cn>
1622
1623         [BlackBerry] Use gesture SwipeDown to exit fullscreen for both video and plugin.
1624         https://bugs.webkit.org/show_bug.cgi?id=89960
1625
1626         Reviewed by Antonio Gomes.
1627
1628         We used to use gesture swipedown to exit fullscreen for plugin, but not fullscreen
1629         HTML5 video; When a swipe down happens, it applies this event to all the pluginviews
1630         in a page, even though only the one in fullscreen mode will process this.
1631
1632         With this patch, the SwipeDown gesture will only apply to the fullscreen elemement,
1633         which is either a plugin, or an Video element.
1634
1635         * Api/WebPage.cpp:
1636         (BlackBerry::WebKit::WebPage::notifySwipeEvent):
1637
1638 2012-06-25  Leo Yang  <leo.yang@torchmobile.com.cn>
1639
1640         [BlackBerry] Fill more data in device motion event
1641         https://bugs.webkit.org/show_bug.cgi?id=89857
1642
1643         Reviewed by Antonio Gomes.
1644
1645         Reviewed internally by Robin Cao.
1646
1647         Fill acceleration and rotation rate into DeviceMotionData.
1648
1649         * WebCoreSupport/DeviceMotionClientBlackBerry.cpp:
1650         (DeviceMotionClientBlackBerry::onMotion):
1651
1652 2012-06-25  Yong Li  <yoli@rim.com>
1653
1654         [BlackBerry] Add JSC statistics into about:memory
1655         https://bugs.webkit.org/show_bug.cgi?id=89779
1656
1657         Reviewed by Rob Buis.
1658
1659         Add detailed JS memory statistics to about:memory page.
1660
1661         * WebCoreSupport/AboutData.cpp:
1662         (WebCore::dumpJSCTypeCountSetToTableHTML):
1663         (WebCore):
1664         (WebCore::memoryPage):
1665
1666 2012-06-25  Crystal Zhang  <haizhang@rim.com>
1667
1668         [BlackBerry] Use AIR controls if client doesn't support HTML control
1669         https://bugs.webkit.org/show_bug.cgi?id=89777
1670
1671         Reviewed by Yong Li.
1672
1673         Currently HTML controls depend on client implementing CreateWindow event, for those clients
1674         that don't implement CreateWindow event, use old AIR controls so we don't break them.
1675
1676         PR 163818.
1677
1678         Internal reviewed by Mike Fenton.
1679
1680         * Api/WebPageClient.h:
1681         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1682         (WebCore::ChromeClientBlackBerry::openPagePopup):
1683         * WebCoreSupport/PagePopupBlackBerry.cpp:
1684         (WebCore::PagePopupBlackBerry::sendCreatePopupWebViewRequest):
1685         * WebCoreSupport/PagePopupBlackBerry.h:
1686         (PagePopupBlackBerry):
1687         * WebKitSupport/InputHandler.cpp:
1688         (BlackBerry::WebKit::InputHandler::openSelectPopup):
1689
1690 2012-06-25  Rob Buis  <rbuis@rim.com>
1691
1692         [BlackBerry] Require text editable element to be enabled for VKB
1693         https://bugs.webkit.org/show_bug.cgi?id=89876
1694
1695         Reviewed by Yong Li.
1696
1697         After bug 58837 got in, children of <fieldset> now can inherit the disabled
1698         state of the fieldset. When trying for instance fast/forms/fieldset/fieldset-disabled.html,
1699         it can be seen that when they are visually disabled, the input handling can still be triggered. So
1700         add an extra check to isTextBasedContentEditableElement that the element is enabled.
1701
1702         Reviewed internally by Mike Fenton.
1703
1704         * WebKitSupport/DOMSupport.cpp:
1705         (BlackBerry::WebKit::DOMSupport::isTextBasedContentEditableElement):
1706
1707 2012-06-24  Simon Fraser  <simon.fraser@apple.com>
1708
1709         Rename isPositioned to isOutOfFlowPositioned for clarity
1710         https://bugs.webkit.org/show_bug.cgi?id=89836
1711
1712         Reviewed by Antti Koivisto.
1713         
1714         RenderObject and RenderStyle had an isPositioned() method that was
1715         confusing, because it excluded relative positioning. Rename to 
1716         isOutOfFlowPositioned(), which makes it clearer that it only applies
1717         to absolute and fixed positioning.
1718
1719         Simple rename; no behavior change.
1720
1721         * Api/WebPage.cpp:
1722         (BlackBerry::WebKit::isPositionedContainer):
1723         (BlackBerry::WebKit::isNonRenderViewFixedPositionedContainer):
1724         (BlackBerry::WebKit::isFixedPositionedContainer):
1725
1726 2012-06-23  Sheriff Bot  <webkit.review.bot@gmail.com>
1727
1728         Unreviewed, rolling out r121058.
1729         http://trac.webkit.org/changeset/121058
1730         https://bugs.webkit.org/show_bug.cgi?id=89809
1731
1732         Patch causes plugins tests to crash in GTK debug builds
1733         (Requested by zdobersek on #webkit).
1734
1735         * Api/BlackBerryGlobal.cpp:
1736         (BlackBerry::WebKit::clearMemoryCaches):
1737         * WebCoreSupport/ClientExtension.cpp:
1738         * WebCoreSupport/PagePopupBlackBerry.cpp:
1739         (WebCore::PagePopupBlackBerry::installDomFunction):
1740         * WebKitSupport/DumpRenderTreeSupport.cpp:
1741         (DumpRenderTreeSupport::computedStyleIncludingVisitedInfo):
1742
1743 2012-06-20  Mark Hahnenberg  <mhahnenberg@apple.com>
1744
1745         JSLock should be per-JSGlobalData
1746         https://bugs.webkit.org/show_bug.cgi?id=89123
1747
1748         Reviewed by Gavin Barraclough.
1749
1750         Changed all sites that used JSLock to instead use the new JSLockHolder
1751         and pass in the correct JS context that the code is about to interact with that 
1752         needs protection.
1753
1754         * Api/BlackBerryGlobal.cpp:
1755         (BlackBerry::WebKit::clearMemoryCaches):
1756         * WebCoreSupport/ClientExtension.cpp:
1757         * WebCoreSupport/PagePopupBlackBerry.cpp:
1758         (WebCore::PagePopupBlackBerry::installDomFunction):
1759         * WebKitSupport/DumpRenderTreeSupport.cpp:
1760         (DumpRenderTreeSupport::computedStyleIncludingVisitedInfo):
1761
1762 2012-06-22  Andrew Lo  <anlo@rim.com>
1763
1764         [BlackBerry] Tap highlight fade animations are added to overlay continuously during pinch zoom.
1765         https://bugs.webkit.org/show_bug.cgi?id=89772
1766
1767         Reviewed by Antonio Gomes.
1768
1769         When pinch zooming, DefaultTapHighlight::hide is continuously
1770         called from the UI thread. This resulted in fade animations being
1771         created and added to the override overlay continuously.
1772
1773         This patch moves the m_visible check so that it applies for both
1774         threads.
1775
1776         Internal PR164183
1777
1778         * WebKitSupport/DefaultTapHighlight.cpp:
1779         (BlackBerry::WebKit::DefaultTapHighlight::draw):
1780         (BlackBerry::WebKit::DefaultTapHighlight::hide):
1781         * WebKitSupport/DefaultTapHighlight.h:
1782         (DefaultTapHighlight):
1783
1784 2012-06-22  Yong Li  <yoli@rim.com>
1785
1786         [BlackBerry] Set WebSecurityEnabled flag accordingly.
1787         https://bugs.webkit.org/show_bug.cgi?id=89602
1788
1789         Reviewed by Rob Buis.
1790
1791         Disable web security checks if needed.
1792
1793         * Api/WebPage.cpp:
1794         (BlackBerry::WebKit::WebPagePrivate::init):
1795         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
1796
1797 2012-06-22  Parth Patel  <parpatel@rim.com>
1798
1799         [Blackberry] BlackBerry::Platform::Settings::get() rename to BlackBerry::Platform::Settings::instance() to make it consistent with our other singletons
1800         https://bugs.webkit.org/show_bug.cgi?id=89684
1801
1802         Reviewed by Yong Li.
1803
1804         Build Fix-Typo Update setting instance access to use instance() instead of get().
1805
1806         * WebKitSupport/InputHandler.cpp:
1807         (BlackBerry::WebKit::InputHandler::isInputModeEnabled):
1808
1809 2012-06-22  Amy Ousterhout  <aousterh@chromium.org>
1810
1811         Renamed DeviceOrientation to DeviceOrientationData
1812         https://bugs.webkit.org/show_bug.cgi?id=88663
1813
1814         Reviewed by Steve Block.
1815
1816         Updated files to use the renamed DeviceOrientationData instead of DeviceOrientation.
1817         This change makes DeviceOrientationData consistent with DeviceMotionData.
1818
1819         * WebCoreSupport/DeviceOrientationClientBlackBerry.h:
1820         (DeviceOrientationClientBlackBerry):
1821
1822 2012-06-22  Joseph Pecoraro  <pecoraro@apple.com>
1823
1824         Web Inspector: InspectorState::updateCookie should not do JSON serialization if unsupported
1825         https://bugs.webkit.org/show_bug.cgi?id=89743
1826
1827         Reviewed by Yury Semikhatsky.
1828
1829         * WebCoreSupport/InspectorClientBlackBerry.cpp:
1830         (WebCore::InspectorClientBlackBerry::updateInspectorStateCookie):
1831
1832 2012-06-21  Parth Patel  <parpatel@rim.com>
1833
1834         [Blackberry] BlackBerry::Platform::Settings::get() rename to BlackBerry::Platform::Settings::instance() to make it consistent with our other singletons
1835         https://bugs.webkit.org/show_bug.cgi?id=89684
1836
1837         Reviewed by Yong Li.
1838    
1839         Update setting instance access to use instance() instead of get().
1840
1841         * Api/BlackBerryGlobal.cpp:
1842         (BlackBerry::WebKit::globalInitialize):
1843         * Api/WebPage.cpp:
1844         (BlackBerry::WebKit::WebPagePrivate::init):
1845         (BlackBerry::WebKit::WebPagePrivate::shouldSendResizeEvent):
1846         * WebCoreSupport/AboutData.cpp:
1847         (WebCore::configPage):
1848         * WebCoreSupport/CacheClientBlackBerry.cpp:
1849         (WebCore::CacheClientBlackBerry::updateCacheCapacity):
1850         * WebKitSupport/FatFingers.cpp:
1851         (BlackBerry::WebKit::FatFingers::getPaddings):
1852         * WebKitSupport/InputHandler.cpp:
1853         (BlackBerry::WebKit::InputHandler::isInputModeEnabled):
1854         (BlackBerry::WebKit::InputHandler::setInputModeEnabled):
1855         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
1856         * WebKitSupport/SurfacePool.cpp:
1857         (BlackBerry::WebKit::SurfacePool::initialize):
1858
1859 2012-06-21  Genevieve Mak  <gmak@rim.com>
1860
1861         Add a parameter to handletTouchPoint to bypass FatFingers
1862         on touch up. There are some cases where the user may drag
1863         their finger off the element and we want to use the actual
1864         touch point instead of the FatFingers adjusted point.
1865         https://bugs.webkit.org/show_bug.cgi?id=89677
1866
1867         Reviewed by Antonio Gomes.
1868
1869         * Api/WebPage.cpp:
1870         (BlackBerry::WebKit::WebPage::touchPointAsMouseEvent):
1871         * Api/WebPage.h:
1872         * WebKitSupport/TouchEventHandler.cpp:
1873         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
1874         * WebKitSupport/TouchEventHandler.h:
1875         (TouchEventHandler):
1876
1877 2012-06-21  Mike Fenton  <mifenton@rim.com>
1878
1879         [BlackBerry] Input mode should adapt automatically to settings changes
1880         https://bugs.webkit.org/show_bug.cgi?id=89595
1881
1882         Reviewed by Antonio Gomes.
1883
1884         PR 167540.
1885
1886         Add helper function to check if input is enabled so that
1887         the override settings can be applied at any time.
1888
1889         Reviewed Internally by Gen Mak.
1890
1891         * Api/WebPage.cpp:
1892         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
1893         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
1894         * WebKitSupport/InputHandler.cpp:
1895         (BlackBerry::WebKit::InputHandler::isInputModeEnabled):
1896         (BlackBerry::WebKit::InputHandler::setInputModeEnabled):
1897         (BlackBerry::WebKit::InputHandler::setElementFocused):
1898         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
1899         (BlackBerry::WebKit::InputHandler::notifyClientOfKeyboardVisibilityChange):
1900         (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
1901         (BlackBerry::WebKit::InputHandler::setComposingText):
1902         * WebKitSupport/InputHandler.h:
1903         * WebKitSupport/TouchEventHandler.cpp:
1904         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
1905
1906 2012-06-20  Jacky Jiang  <zhajiang@rim.com>
1907
1908         Add a != operator to ViewportArguments
1909         https://bugs.webkit.org/show_bug.cgi?id=87505
1910
1911         Reviewed by Antonio Gomes.
1912         Patch by Jacky Jiang  <zhajiang@rim.com>
1913
1914         Use != operator of ViewportArguments.
1915
1916         * Api/WebPage.cpp:
1917         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
1918         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
1919         * Api/WebViewportArguments.cpp:
1920         (BlackBerry::WebKit::WebViewportArguments::operator!=):
1921
1922 2012-06-20  Christopher Hutten-Czapski  <chutten@rim.com>
1923
1924         [BlackBerry] Add an API to immediately enable cross-site XHR
1925         https://bugs.webkit.org/show_bug.cgi?id=89594
1926
1927         Internally Reviewed by Yong Li.
1928         Reviewed by Rob Buis.
1929
1930         There is no API to disable it as clients may rely on legacy behaviour
1931         of not disabling until the next frame load.
1932
1933         * Api/WebPage.cpp:
1934         (BlackBerry::WebKit::enableCrossSiteXHRRecursively):
1935         (WebKit):
1936         (BlackBerry::WebKit::WebPagePrivate::enableCrossSiteXHR):
1937         (BlackBerry::WebKit::WebPage::enableCrossSiteXHR):
1938         * Api/WebPage.h:
1939         * Api/WebPage_p.h:
1940         (WebPagePrivate):
1941
1942 2012-06-20  Konrad Piascik  <kpiascik@rim.com>
1943
1944         [BlackBerry] Enable setAcceleratedCompositingForFixedPositionEnabled
1945         https://bugs.webkit.org/show_bug.cgi?id=89575
1946
1947         Reviewed by Antonio Gomes.
1948
1949         Enable the flag so that we get position:fixed elemetns to be rendered
1950         using accelerated compositing.
1951
1952         * Api/WebPage.cpp:
1953         (BlackBerry::WebKit::WebPagePrivate::init):
1954
1955 2012-06-20  Julien Chaffraix  <jchaffraix@webkit.org>
1956
1957         Use IntSize in RenderLayer to represent scroll offsets
1958         https://bugs.webkit.org/show_bug.cgi?id=89154
1959
1960         Reviewed by Eric Seidel.
1961
1962         * Api/WebPage.cpp:
1963         (BlackBerry::WebKit::WebPagePrivate::scrollRenderer):
1964         Updated to pass an IntSize to scrollToOffset.
1965
1966 2012-06-19  Yong Li  <yoli@rim.com>
1967
1968         [BlackBerry] Should check the return value of fromUTF8() before executing the script.
1969         https://bugs.webkit.org/show_bug.cgi?id=89500
1970
1971         Reviewed by Rob Buis.
1972         PR# 166623.
1973
1974         WebPagePrivate::executeJavaScript() should check the return value of fromUTF8()
1975         before executing the script to avoid potential crash on invalid script source.
1976
1977         * Api/WebPage.cpp:
1978         (BlackBerry::WebKit::WebPagePrivate::executeJavaScript):
1979
1980 2012-06-19  Jakob Petsovits  <jpetsovits@rim.com>
1981
1982         [BlackBerry] Missing notifyContentRendered() when resuming rendering
1983         https://bugs.webkit.org/show_bug.cgi?id=89507
1984         RIM PR 150049
1985
1986         Reviewed by Antonio Gomes.
1987
1988         All the current calls to notifyContentRendered() are
1989         located in the RenderQueue, but this omits the case
1990         when we force rendering from resumeBackingStore()
1991         after rendering had been suspended for a while.
1992
1993         * Api/WebPage.cpp:
1994         (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore):
1995
1996 2012-06-19  Sergio Villar Senin  <svillar@igalia.com>
1997
1998         Calling nativeImageForCurrentFrame() causes assertion failure: m_verifier.isSafeToUse()
1999         https://bugs.webkit.org/show_bug.cgi?id=67582
2000
2001         Reviewed by David Levin.
2002
2003         Use synchronousNativeIconForPageURL() to retrieve favicons.
2004
2005         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2006         (WebCore::FrameLoaderClientBlackBerry::dispatchDidReceiveIcon):
2007
2008 2012-06-18  Antonio Gomes  <agomes@rim.com>
2009
2010        [BlackBerry] Overscroll can get reset while interacting with a page, due to style recalculations and scroll position clamping
2011        https://bugs.webkit.org/show_bug.cgi?id=89371
2012        PR #166982
2013
2014        Reviewed by Adam Treat.
2015
2016        While scrolling, the WebKit thread gets intercalated WebPage::setScrollPosition
2017        calls dispatched from the UI thread. These calls are wrapped with
2018        ScrollableArea::setConstrainsScrollingToContentEdge(false|true) calls, which
2019        can clamp the scroll position (removes overscroll) if set to 'true'.
2020
2021        The following situation can happen: user is scrolling, and WebKit
2022        thread is not in the middle of a WebPage::setScrollPosition call
2023        (so setConstrainsScrollingToContentEdge is 'true'), and a relayout happens.
2024        In this scenario, the scroll position will get clamped to 0,0, removing any
2025        possible overscrolling.
2026
2027        See the stack trace below, paying special attention to frame 16:
2028        #0  ScrollHandlerUserInterfaceThread::updateScrollPosition
2029        #1  0x782b4a3e in WebPageClientImpl::scrollChanged
2030        #2  0x78147484 in BlackBerry::WebKit::WebPagePrivate::notifyTransformedScrollChanged
2031        #3  0x78171f68 in BlackBerry::WebKit::BackingStoreClient::checkOriginOfCurrentScrollOperation
2032        #4  0x7816480a in WebCore::ChromeClientBlackBerry::scroll
2033        #5  0x7a78b290 in WebCore::Chrome::scroll
2034        #6  0x7a7ac8d0 in WebCore::FrameView::scrollContentsFastPath
2035        #7  0x7a7eba72 in WebCore::ScrollView::scrollContents
2036        #8  0x7a7ebb34 in WebCore::ScrollView::scrollTo
2037        #9  0x7a7a8dae in WebCore::FrameView::scrollTo
2038        #10 0x7a7e966e in WebCore::ScrollView::setScrollOffset
2039        #11 0x7a7e77cc in WebCore::ScrollableArea::scrollPositionChanged
2040        #12 0x7a7e7048 in WebCore::ScrollAnimator::notifyPositionChanged
2041        #13 0x7a7e700c in WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation
2042        #14 0x7a7e7588 in WebCore::ScrollableArea::scrollToOffsetWithoutAnimation
2043        #16 WebCore::ScrollView::updateScrollbars
2044        #18 WebCore::ScrollView::setContentsSize
2045        #19 0x7a7accd8 in WebCore::FrameView::setContentsSize
2046        #20 0x7a7a85f4 in WebCore::FrameView::adjustViewSize
2047        #22 WebCore::FrameView::layout
2048        #23 0x7a59d66e in WebCore::Document::updateLayoutIgnorePendingStylesheets
2049        #24 0x7a5ada92 in WebCore::Element::offsetHeight
2050        #25 0x7ab226b6 in WebCore::jsElementOffsetHeight
2051        #27 JSC::JSValue::get
2052        #28 0x796dd662 in JSC::JITStubThunked_op_get_by_id_generic
2053
2054        Patch fixes this issue by tying ScrollableArea::setConstrainsScrollingToContentEdge
2055        to BackingStore::m_isZoomingOrScrolling, when we are sure clamping should not happen.
2056
2057        * Api/BackingStore.cpp:
2058        (BlackBerry::WebKit::BackingStorePrivate::setScrollingOrZooming):
2059        * Api/WebPage.cpp:
2060        (BlackBerry::WebKit::WebPage::setScrollPosition):
2061
2062 2012-06-15  Eli Fidler  <efidler@rim.com>
2063
2064         [BlackBerry] Use platform font settings for the standard settings.
2065         https://bugs.webkit.org/show_bug.cgi?id=89232
2066
2067         Reviewed by Rob Buis.
2068
2069         RIM PR 159708
2070
2071         * Api/WebSettings.cpp:
2072         (BlackBerry::WebKit::WebSettings::standardSettings):
2073
2074 2012-06-15  Crystal Zhang  <haizhang@rim.com>
2075
2076         [BlackBerry] Remove touch events handling hook for popup
2077         https://bugs.webkit.org/show_bug.cgi?id=89245
2078
2079         Reviewed by Rob Buis.
2080
2081         In the old patches we create our own WebPage for popup, so we need to hook up our own
2082         touch handling functions, since we don't use our own WebPage any more, no need to keep
2083         the touch handling code, because it just does nothing other than passing out the events
2084         which might cause the touch events being handled twice.
2085
2086         * Api/WebPage.cpp:
2087         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
2088         * WebCoreSupport/PagePopupBlackBerry.cpp:
2089         * WebCoreSupport/PagePopupBlackBerry.h:
2090         (PagePopupBlackBerry):
2091
2092 2012-06-15  Antonio Gomes  <agomes@rim.com>
2093
2094         [BlackBerry] Disable WebCore::EventHandler synthesized mouse events during touch scrolling
2095         https://bugs.webkit.org/show_bug.cgi?id=89227
2096         PR #146642
2097
2098         Reviewed by Rob Buis.
2099
2100         Make use of the Settings::supportsMouseDevice setting in order to
2101         prevent mouse move event to fire as a response to a scroll action.
2102         We might still want to dynamically toggle this setting ON, in case for
2103         example of a mouse wheel driven scroll action, but we can revisit it
2104         when it becomes a fully supported/primary use case.
2105
2106         Internally reviewed by Eli Fidler.
2107
2108         * Api/WebPage.cpp:
2109         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
2110         * Api/WebSettings.cpp:
2111         (WebKit):
2112         (BlackBerry::WebKit::WebSettings::isDeviceSupportsMouseEnabled):
2113         (BlackBerry::WebKit::WebSettings::setDeviceSupportsMouseEnabled):
2114         * Api/WebSettings.h:
2115
2116 2012-06-15  Jacky Jiang  <zhajiang@rim.com>
2117
2118         [BlackBerry] Certain web pages (i.e., http://www.cloudtweaks.com/) are allowed to be wider than the screen
2119         https://bugs.webkit.org/show_bug.cgi?id=89211
2120
2121         Reviewed by Rob Buis.
2122         Patch by Jacky Jiang <zhajiang@rim.com>
2123
2124         PR: 135215
2125         Make simpler rules for zoom to fit scale:
2126         - Zoom to fit horizontally first without clamping the contents width.
2127         - Zoom to fit vertically instead without clamping the contents height
2128           if the horizontal zoom to fit can cause a grey area below the web
2129           page. Get rid of the virtual viewport guard as there may be cases
2130           that zooming can cause a grey area without a virtual viewport.
2131         - Clamp the scale by the minimum zoom to fit scale 0.25 and apply
2132           this rule to image documents as well. This minimum scale can be
2133           changed if there is a better vaule in the future.
2134         In this way, we can get rid of the issue that many web pages don't fit
2135         the screen.
2136
2137         Reviewed internally by Arvid Nilsson.
2138
2139         * Api/WebPage.cpp:
2140         (WebKit):
2141         (BlackBerry::WebKit::WebPagePrivate::zoomToFitScale):
2142
2143 2012-06-15  Yong Li  <yoli@rim.com>
2144
2145         [BlackBerry] Remove BackingStoreClient::scrollsHorizontally/scrollsVeritically()
2146         https://bugs.webkit.org/show_bug.cgi?id=89210
2147
2148         Reviewed by Antonio Gomes.
2149
2150         Remove BackingStoreClient::scrollsHorizontally()/scrollsVeritically(), because
2151         calling them is neither nessary nor safe.
2152
2153         * Api/BackingStore.cpp:
2154         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
2155         (BlackBerry::WebKit::BackingStorePrivate::blitHorizontalScrollbar):
2156         (BlackBerry::WebKit::BackingStorePrivate::blitVerticalScrollbar):
2157         * WebKitSupport/BackingStoreClient.cpp:
2158         * WebKitSupport/BackingStoreClient.h:
2159         (BackingStoreClient):
2160
2161 2012-06-15  Sheriff Bot  <webkit.review.bot@gmail.com>
2162
2163         Unreviewed, rolling out r120404.
2164         http://trac.webkit.org/changeset/120404
2165         https://bugs.webkit.org/show_bug.cgi?id=89193
2166
2167         This patch breaks [BlackBerry]'s text selection handles moving
2168         in editable elements. (Requested by Sean1 on #webkit).
2169
2170         * WebKitSupport/SelectionHandler.cpp:
2171         (BlackBerry::WebKit::visiblePositionForPointIgnoringClipping):
2172
2173 2012-06-14  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
2174
2175         [BlackBerry] Selection - Crash when manipulating selection by dragging handle
2176         https://bugs.webkit.org/show_bug.cgi?id=89160
2177
2178         RIMBUG:164970
2179         Avoid to set position in shadow tree to the new selection's base. It
2180         crashes when setting a shadow position to a selection' base.
2181
2182         Reviewed by Antonio Gomes.
2183
2184         * WebKitSupport/SelectionHandler.cpp:
2185         (BlackBerry::WebKit::visiblePositionForPointIgnoringClipping):
2186
2187 2012-06-14  Mary Wu  <mary.wu@torchmobile.com.cn>
2188
2189         [BlackBerry] empty plugin cause browser hang
2190         https://bugs.webkit.org/show_bug.cgi?id=89091
2191
2192         Reviewed by Rob Buis.
2193
2194         Add check before clean pluginView in FrameLoaderBlackBerry in case
2195         it didn't have any content.
2196         RIM PR# 165336
2197         Reviewed internally by George Staikos
2198
2199         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2200         (WebCore::FrameLoaderClientBlackBerry::finishedLoading):
2201
2202 2012-06-14  Genevieve Mak  <gmak@rim.com>
2203
2204         Always convert touch events to mouse events if the
2205         meta-tag TouchEventMode::PureWithMouseConversion is set.
2206         Minor style fix.
2207         https://bugs.webkit.org/show_bug.cgi?id=89115
2208
2209         Reviewed by Antonio Gomes.
2210
2211         Reviewed Internally by Antonio Gomes.
2212
2213         * WebKitSupport/TouchEventHandler.cpp:
2214         (BlackBerry::WebKit::TouchEventHandler::touchEventCancel):
2215         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
2216
2217 2012-06-14  Chris Guan  <chris.guan@torchmobile.com.cn>
2218
2219         [Blackberry] add a new Api named setAllowNotification
2220         https://bugs.webkit.org/show_bug.cgi?id=88950
2221
2222         Reviewed by Antonio Gomes.
2223
2224         * Api/WebPage.cpp:
2225         (BlackBerry::WebKit::WebPage::setAllowNotification):
2226         (WebKit):
2227         * Api/WebPage.h:
2228
2229 2012-06-13  Crystal Zhang  <haizhang@rim.com>
2230
2231         [BlackBerry] Apply New Style and JS for Select Popup
2232         https://bugs.webkit.org/show_bug.cgi?id=89020
2233
2234         Reviewed by Rob Buis.
2235
2236         PR 162854
2237
2238         Use new styled CSS files for select popup, also remove most JS functions
2239         to a separate JS file, only pass the parameters to JS, and use new python
2240         script for data generating, as the old one is too simple and problematic.
2241
2242         * WebCoreSupport/SelectPopupClient.cpp:
2243         (WebCore::SelectPopupClient::generateHTML):
2244
2245 2012-06-13  Amy Ousterhout  <aousterh@chromium.org>
2246
2247         Rename currentDeviceMotion to lastMotion in DeviceMotionClient
2248         https://bugs.webkit.org/show_bug.cgi?id=88854
2249
2250         Reviewed by Adam Barth.
2251
2252         Rename the function currentDeviceMotion to lastMotion in DeviceMotionClient.
2253         This makes it consistent with the similar function lastOrientation in DeviceOrientationClient.
2254
2255         * WebCoreSupport/DeviceMotionClientBlackBerry.cpp:
2256         (DeviceMotionClientBlackBerry::lastMotion):
2257         (DeviceMotionClientBlackBerry::onMotion):
2258         * WebCoreSupport/DeviceMotionClientBlackBerry.h:
2259         (DeviceMotionClientBlackBerry):
2260
2261 2012-06-13  Robin Cao  <robin.cao@torchmobile.com.cn>
2262
2263         [BlackBerry] Enable MEDIA_STREAM by default
2264         https://bugs.webkit.org/show_bug.cgi?id=88849
2265
2266         Reviewed by Antonio Gomes.
2267
2268         * Api/WebPage.cpp:
2269         (BlackBerry::WebKit::WebPagePrivate::init):
2270         * WebCoreSupport/UserMediaClientImpl.cpp: Added.
2271         (WebCore):
2272         (WebCore::UserMediaClientImpl::UserMediaClientImpl):
2273         (WebCore::UserMediaClientImpl::~UserMediaClientImpl):
2274         (WebCore::UserMediaClientImpl::pageDestroyed):
2275         (WebCore::UserMediaClientImpl::requestUserMedia):
2276         (WebCore::UserMediaClientImpl::cancelUserMediaRequest):
2277         * WebCoreSupport/UserMediaClientImpl.h: Added.
2278         (WebKit):
2279         (WebCore):
2280         (UserMediaClientImpl):
2281
2282 2012-06-12  Arvid Nilsson  <anilsson@rim.com>
2283
2284         [BlackBerry] Crash when rendering web page that's being destroyed
2285         https://bugs.webkit.org/show_bug.cgi?id=88915
2286
2287         Reviewed by Rob Buis.
2288
2289         PR #164943
2290
2291         This was a null pointer dereference that happened when the compositor
2292         was asked to render after being disconnected from its web page.
2293
2294         * Api/WebPageCompositor.cpp:
2295         (BlackBerry::WebKit::WebPageCompositorPrivate::render):
2296
2297 2012-06-12  Jacky Jiang  <zhajiang@rim.com>
2298
2299         [BlackBerry] Scale was incorrect when reloading a simple web page after initial load
2300         https://bugs.webkit.org/show_bug.cgi?id=88889
2301
2302         Reviewed by Adam Treat.
2303         Patch by Jacky Jiang <zhajiang@rim.com>
2304
2305         PR: 164442
2306         When we were reloading a web page with the load type FrameLoadTypeSame
2307         after the initial load, the first layout timer was fired after the load
2308         Finished state, in which case the web page would have no chance to zoom
2309         to the initial scale during the layout as it was only for load
2310         Committed state. This patch takes care of it.
2311
2312         * Api/WebPage.cpp:
2313         (BlackBerry::WebKit::WebPagePrivate::layoutFinished):
2314         (BlackBerry::WebKit::WebPagePrivate::shouldZoomToInitialScaleOnLoad):
2315         (WebKit):
2316         (BlackBerry::WebKit::WebPagePrivate::zoomToInitialScaleOnLoad):
2317         * Api/WebPage_p.h:
2318         (WebPagePrivate):
2319         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2320         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFirstVisuallyNonEmptyLayout):
2321
2322 2012-06-12  Crystal Zhang  <haizhang@rim.com>
2323
2324         [BlackBerry] Fix crash in InputHandler
2325         https://bugs.webkit.org/show_bug.cgi?id=88808
2326
2327         Reviewed by Antonio Gomes.
2328
2329         m_page is destroyed before InputHandler, so should move the call to destroy popup to chromeDestroyed().
2330
2331         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2332         (WebCore::ChromeClientBlackBerry::chromeDestroyed():
2333         * WebKitSupport/InputHandler.cpp:
2334         (BlackBerry::WebKit::InputHandler::~InputHandler):
2335
2336 2012-06-12  Yong Li  <yoli@rim.com>
2337
2338         [BlackBerry] Use a safer way to shrink JS memory usage
2339         https://bugs.webkit.org/show_bug.cgi?id=88811
2340
2341         Reviewed by Antonio Gomes.
2342
2343         We should just make a GC request and JSC will check if it is safe to do anything.
2344
2345         * Api/BlackBerryGlobal.cpp:
2346         (BlackBerry::WebKit::clearMemoryCaches):
2347
2348 2012-06-11  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2349
2350         [BlackBerry] Autofill feature implementation for BlackBerry porting
2351         https://bugs.webkit.org/show_bug.cgi?id=85577
2352
2353         Reviewed by Rob Buis.
2354
2355         Remove the autofill saving procedure out of dispatchWillSubmitForm, this procedure
2356         is same as the procedure in dispatchWillSendSubmitEvent.
2357         Some sites will redirect to other url in its login process, which will cause the
2358         user get notified to save credentials for this provisional redirecting url if we
2359         put this saving procedure in dispatchWillSubmitForm. So we should remove it to make
2360         sure we only save the autofill data before the submit event is fired.
2361
2362         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2363         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSubmitForm):
2364
2365 2012-06-11  Antonio Gomes  <agomes@rim.com>
2366
2367         [BlackBerry] [BlackBerry] browser video player fullscreen mode (portrait) does not play well with rotation
2368         https://bugs.webkit.org/show_bug.cgi?id=88809
2369
2370         Reviewed by Rob Buis.
2371
2372         Adjust the media container dimensions, whenever the FrameView::frameRect
2373         (aka viewport rect) changes
2374
2375         Reviewed internally by Jacky Jiang.
2376
2377         * Api/WebPage.cpp:
2378         (BlackBerry::WebKit::WebPagePrivate::updateViewportSize):
2379         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2380         (WebCore::ChromeClientBlackBerry::fullScreenRendererChanged):
2381
2382 2012-06-09  Antonio Gomes  <agomes@rim.com>
2383
2384         [BlackBerry] browser video player fullscreen mode (portrait) does not play well with viewport metatag - Controls are off screen so cannot exit fullscreen
2385         https://bugs.webkit.org/show_bug.cgi?id=88719
2386         PR #164026
2387
2388         Reviewed by Rob Buis.
2389
2390         Instead of using WebPage's viewport size, which suffers from
2391         dealing with transformed coordinates, viewport metatag changes,
2392         etc, lets use WebCore::FrameView's visibleContentRect::Size::Width,
2393         which abstract all these variations.
2394
2395         It fixes an overscale issue we were having when video player entered
2396         fullscreen, and webpage had viewport metatag set.
2397
2398         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2399         (WebCore::ChromeClientBlackBerry::fullScreenRendererChanged):
2400
2401 2012-06-11  Sam Weinig  <sam@webkit.org>
2402
2403         Remove support for disconnected/excluded from search frames, they are not used by Safari anymore
2404         https://bugs.webkit.org/show_bug.cgi?id=88723
2405
2406         Reviewed by Dan Bernstein.
2407
2408         * WebKitSupport/InPageSearchManager.cpp:
2409         (BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):
2410
2411 2012-06-10  Antonio Gomes  <agomes@rim.com>
2412
2413         [BlackBerry] Make media (<video> and <audio>) slide draggable again
2414         https://bugs.webkit.org/show_bug.cgi?id=88742
2415         PR #158199
2416
2417         Reviewed by George Staikos.
2418
2419         First check if the element is a range type then gets its
2420         shadow DOM ancestor.
2421
2422         * WebKitSupport/TouchEventHandler.cpp:
2423         (BlackBerry::WebKit::shouldConvertTouchToMouse):
2424
2425 2012-06-08  Crystal Zhang  <haizhang@rim.com>
2426
2427         [BlackBerry] Fix crash on PagePopupChromeClient
2428         https://bugs.webkit.org/show_bug.cgi?id=88675
2429
2430         Reviewed by Antonio Gomes.
2431
2432         PR 163672.
2433
2434         Actually it's the bug inside InputHandler, should delete the old popup and create a new one,
2435         because update() is problematic. Also no need to save pointer in InputHandler.
2436
2437         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2438         (WebCore::ChromeClientBlackBerry::openPagePopup):
2439         (WebCore::ChromeClientBlackBerry::closePagePopup):
2440         * WebKitSupport/InputHandler.cpp:
2441         (BlackBerry::WebKit::InputHandler::InputHandler):
2442         (BlackBerry::WebKit::InputHandler::~InputHandler):
2443         (BlackBerry::WebKit::InputHandler::openSelectPopup):
2444         * WebKitSupport/InputHandler.h:
2445         (WebCore):
2446         (InputHandler):
2447
2448 2012-06-08  Eli Fidler  <efidler@rim.com>
2449
2450         [BlackBerry] Default font settings are getting deleted
2451         https://bugs.webkit.org/show_bug.cgi?id=88670
2452
2453         Reviewed by Rob Buis.
2454
2455         RIM PR: 163720
2456
2457         WebSettings is overriding the default font settings with "", which deletes them.
2458
2459         * Api/WebPage.cpp:
2460         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
2461
2462 2012-06-07  Crystal Zhang  <haizhang@rim.com>
2463
2464         [BlackBerry] Should Use the WebPage Already Created by Client, No Need to Create New One.
2465         https://bugs.webkit.org/show_bug.cgi?id=88576
2466
2467         Reviewed by Rob Buis.
2468
2469         When PagePopupBlackBerry::init() is called, a WebPage is already created, we can just use 
2470         this to load popup, no need to create a new one. The old code is based on an old solution 
2471         which has been abandoned.
2472
2473         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2474         (WebCore::ChromeClientBlackBerry::openPagePopup):
2475         * WebCoreSupport/PagePopupBlackBerry.cpp:
2476         (WebCore::PagePopupBlackBerry::init):
2477         (WebCore::setValueAndClosePopupCallback):
2478         (WebCore::PagePopupBlackBerry::handleMouseEvent):
2479         (WebCore::PagePopupBlackBerry::closePopup):
2480         * WebCoreSupport/PagePopupBlackBerry.h:
2481         (PagePopupBlackBerry):
2482
2483 2012-06-07  Jacky Jiang  <zhajiang@rim.com>
2484
2485         [BlackBerry] Get rid of unused maximumLayoutSize in WebPage
2486         https://bugs.webkit.org/show_bug.cgi?id=88574
2487
2488         Reviewed by Rob Buis.
2489         Patch by Jacky Jiang <zhajiang@rim.com>
2490
2491         PR: 164098
2492         maximumLayoutSize was deprecated when we made use of
2493         WebCore::computeViewportAttributes for
2494         WebPagePrivate::recomputeVirtualViewportFromViewportArguments.
2495         So clean it up.
2496
2497         * Api/WebPage.cpp:
2498         (WebKit):
2499
2500 2012-06-07  Arvid Nilsson  <anilsson@rim.com>
2501
2502         [BlackBerry] User viewport arguments are not respected
2503         https://bugs.webkit.org/show_bug.cgi?id=88530
2504
2505         Reviewed by Antonio Gomes.
2506
2507         RIM PR #163767
2508
2509         Fixed by applying the user supplied viewport arguments if the page
2510         specifies default viewport arguments (i.e. the page has no viewport
2511         meta tag).
2512
2513         If the user didn't supply any viewport arguments either, the behaviour
2514         is the same as before the patch, the caller will successfully reset to
2515         default viewport arguments.
2516
2517         * Api/WebPage.cpp:
2518         (BlackBerry::WebKit::WebPagePrivate::dispatchViewportPropertiesDidChange):
2519
2520 2012-06-07  Arvid Nilsson  <anilsson@rim.com>
2521
2522         [BlackBerry] Allow WebPageCompositor to blend a transparent web page
2523         https://bugs.webkit.org/show_bug.cgi?id=88233
2524
2525         Reviewed by Rob Buis.
2526
2527         RIM PR #159998
2528
2529         Keep track of the web page background color in the compositor so we can
2530         determine whether the contents of the root layer are transparent.
2531
2532         Reviewed internally by Jakob Petsovits.
2533
2534         * Api/BackingStore.cpp:
2535         (BlackBerry::WebKit::BackingStorePrivate::compositeContents):
2536         * Api/BackingStore_p.h:
2537         (BackingStorePrivate):
2538         * Api/WebPage.cpp:
2539         (BlackBerry::WebKit::WebPagePrivate::setCompositor):
2540         (BlackBerry::WebKit::WebPagePrivate::setCompositorBackgroundColor):
2541         (WebKit):
2542         (BlackBerry::WebKit::WebPagePrivate::createCompositor):
2543         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
2544         * Api/WebPageCompositor.cpp:
2545         (BlackBerry::WebKit::WebPageCompositorPrivate::render):
2546         (BlackBerry::WebKit::WebPageCompositorPrivate::setBackgroundColor):
2547         (WebKit):
2548         * Api/WebPageCompositor_p.h:
2549         (BlackBerry::WebKit::WebPageCompositorPrivate::backgroundColor):
2550         (WebPageCompositorPrivate):
2551         * Api/WebPage_p.h:
2552         (WebPagePrivate):
2553
2554 2012-06-07  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2555
2556         [BlackBerry] Add enable credential autofill and enable form autofill feature control in WebSetting
2557         https://bugs.webkit.org/show_bug.cgi?id=88513
2558
2559         Reviewed by Rob Buis.
2560
2561         RIM PR: #163391
2562         Implemented credential autofill setting and form autofill setting.
2563
2564         Internally reviewed by Leo Yang <leo.yang@torchmobile.com.cn>.
2565
2566         * Api/WebPage.cpp:
2567         (BlackBerry::WebKit::WebPage::autofillTextField):
2568         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
2569         (BlackBerry::WebKit::WebPage::clearCredentials):
2570         (BlackBerry::WebKit::WebPage::clearAutofillData):
2571         (BlackBerry::WebKit::WebPage::clearNeverRememberSites):
2572         * Api/WebSettings.cpp:
2573         (WebKit):
2574         (BlackBerry::WebKit::WebSettings::standardSettings):
2575         (BlackBerry::WebKit::WebSettings::isCredentialAutofillEnabled):
2576         (BlackBerry::WebKit::WebSettings::setCredentialAutofillEnabled):
2577         (BlackBerry::WebKit::WebSettings::isFormAutofillEnabled):
2578         (BlackBerry::WebKit::WebSettings::setFormAutofillEnabled):
2579         * Api/WebSettings.h:
2580         * WebCoreSupport/EditorClientBlackBerry.cpp:
2581         (WebCore::EditorClientBlackBerry::textFieldDidEndEditing):
2582         (WebCore::EditorClientBlackBerry::textDidChangeInTextField):
2583         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
2584         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFinishLoad):
2585         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSubmitForm):
2586         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendSubmitEvent):
2587
2588 2012-06-06  Antonio Gomes  <agomes@rim.com>
2589
2590         [BlackBerry] browser video player fullscreen mode (portrait) - Controls are off screen so cannot exit fullscreen
2591         https://bugs.webkit.org/show_bug.cgi?id=88488
2592         PR #162991
2593
2594         Reviewed by George Staikos.
2595
2596         When we use width:100%/pageScale as the math to calculate the width of the
2597         FullScreen element, it goes too wide for horizontally scrollable webpages.
2598         The reason is that 100% is relative to the content size here, and we want 100%
2599         relative to the viewport size. However, since there is no such a thing in CSS,
2600         we set an absolute file.
2601
2602         A known problem with this will be rotating the device when in fullscreen mode
2603         that we can address when rotating is supported.
2604
2605         Internally reviewed by Jacky Jiang.
2606
2607         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2608         (WebCore::ChromeClientBlackBerry::fullScreenRendererChanged):
2609
2610 2012-06-05  Antonio Gomes  <agomes@rim.com>
2611
2612        [BlackBerry] Implement a top-down in-region boundary detection in InRegionScrollableArea
2613        https://bugs.webkit.org/show_bug.cgi?id=88254
2614        PR #125237
2615
2616        Reviewed by Rob Buis.
2617
2618        Patch implements a top-down visibleWindowRect calculation for all scrollable
2619        elements hit-tested by a given point.
2620
2621        The reason on why this approach is better is that it calculates the visible
2622        window rect from the outermost scrollable element towards the inner ones, and
2623        that allows it to use the visible window rect of the previous scrollable element
2624        as the clipping rect for the current one.
2625
2626        Patch also changes the return vector to store ScrollViewBase pointers, so
2627        we can make use of static_cast properly. As now also stated in the header
2628        file, the client is responsible for deleting the ScrollViewBase
2629        elements in the vector.
2630
2631        Internally reviewed by Jakob Petsovits.
2632
2633        * Api/WebPage.cpp:
2634        (BlackBerry::WebKit::pushBackInRegionScrollable):
2635        (BlackBerry::WebKit::WebPagePrivate::inRegionScrollableAreasForPoint):
2636        * Api/WebPageClient.h:
2637        * Api/WebPage_p.h:
2638        (WebPagePrivate):
2639        * WebKitSupport/InRegionScrollableArea.cpp:
2640        (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
2641        (BlackBerry::WebKit::InRegionScrollableArea::setVisibleWindowRect):
2642        (WebKit):
2643        (BlackBerry::WebKit::InRegionScrollableArea::visibleWindowRect):
2644        * WebKitSupport/InRegionScrollableArea.h:
2645        (InRegionScrollableArea):
2646
2647 2012-06-06  Charles Wei  <charles.wei@torchmobile.com.cn>
2648
2649         [BlackBerry] IndexedDB file should be sand-boxed to the application data directory.
2650         https://bugs.webkit.org/show_bug.cgi?id=88065
2651
2652         Reviewed by George Staikos.
2653
2654         * Api/WebPage.cpp:
2655         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
2656         * Api/WebSettings.cpp:
2657         (WebKit):
2658         (BlackBerry::WebKit::WebSettings::indexedDataBasePath):
2659         (BlackBerry::WebKit::WebSettings::setIndexedDataBasePath):
2660         * Api/WebSettings.h:
2661
2662 2012-06-05  Crystal Zhang  <haizhang@rim.com>
2663
2664         [BlackBerry]Differentiate options and group options by TypeOption and TypeOptionInGroup
2665         https://bugs.webkit.org/show_bug.cgi?id=88342
2666
2667         Reviewed by Rob Buis.
2668
2669         RIM PR: 163141
2670
2671         Reviewed internally by Mike Fenton.
2672
2673         We set all options' type to TypeOption, which can't tell if an option belongs to a group, 
2674         introduce TypeOptionInGroup to fix it.
2675
2676         * WebKitSupport/InputHandler.cpp:
2677         (BlackBerry::WebKit::InputHandler::openSelectPopup):
2678
2679 2012-06-05  Adam Barth  <abarth@webkit.org>
2680
2681         Remove support for target-densitydpi in the viewport meta tag
2682         https://bugs.webkit.org/show_bug.cgi?id=88047
2683
2684         Reviewed by Kenneth Rohde Christiansen.
2685
2686         * Api/WebPage.cpp:
2687         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
2688         * Api/WebViewportArguments.cpp:
2689         (BlackBerry::WebKit::WebViewportArguments::targetDensityDpi):
2690         (BlackBerry::WebKit::WebViewportArguments::setTargetDensityDpi):
2691         * Api/WebViewportArguments.h:
2692
2693 2012-06-05  Konrad Piascik  <kpiascik@rim.com>
2694
2695         [BlackBerry]Web Inspector highlight is slow
2696         https://bugs.webkit.org/show_bug.cgi?id=88331
2697
2698         Reviewed by Rob Buis.
2699
2700         Highlight is slow on large pages because of constant repaint calls.
2701         Change to use the accelerated layer highlight all the time.
2702
2703         * Api/BackingStore.cpp:
2704         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
2705         * WebCoreSupport/InspectorClientBlackBerry.cpp:
2706         (WebCore::InspectorClientBlackBerry::highlight):
2707         (WebCore::InspectorClientBlackBerry::hideHighlight):
2708         * WebCoreSupport/InspectorOverlay.cpp:
2709         (WebCore::InspectorOverlay::clear):
2710         (WebCore::InspectorOverlay::update):
2711
2712 2012-06-04  Andrew Lo  <anlo@rim.com>
2713
2714         [BlackBerry] Split AnimationFrameRateController into its own file
2715         https://bugs.webkit.org/show_bug.cgi?id=88242
2716
2717         Reviewed by Antonio Gomes.
2718
2719         Include new header file to reflect re-organization of platform animation
2720         header files.
2721
2722         * Api/WebPageCompositor_p.h:
2723
2724 2012-06-02  Antonio Gomes  <agomes@rim.com>
2725
2726         [BlackBerry] browser video player fullscreen mode (portrait) - out of screen/focus - cannot navigate or use the buttons on the screen (PART III)
2727         https://bugs.webkit.org/show_bug.cgi?id=88019
2728
2729         Reviewed by George Staikos.
2730
2731         Enter 'pure-with-mouse-conversion' mode when going fullscreen, so
2732         that it prevents user from scrolling the WebPage, pinch zooming,
2733         touch-and-hold, enter selection mode, etc ...
2734
2735         Internally reviewed by Gen Mak.
2736
2737         * Api/WebPage.cpp:
2738         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
2739         (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
2740         (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
2741         * Api/WebPage_p.h:
2742         (WebPagePrivate):
2743
2744 2012-06-02  Antonio Gomes  <agomes@rim.com>
2745
2746         [BlackBerry] browser video player fullscreen mode (portrait) - out of screen/focus - cannot navigate or use the buttons on the screen (PART II)
2747         https://bugs.webkit.org/show_bug.cgi?id=88019
2748
2749         Reviewed by George Staikos.
2750
2751         When an element goes fullscreen, its wrapper/container obeys all
2752         BlackBerry specific fixed position customizations: we fixed
2753         against Y, but not X. Then, in order to have the wrapper element
2754         properly positioned when entering fullscreen mode, we
2755         temporarily scroll x to 0.
2756
2757         The original x scroll position is restored when we leave
2758         fullscreen.
2759
2760         * Api/WebPage.cpp:
2761         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
2762         (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
2763         (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
2764         * Api/WebPage_p.h:
2765         (WebPagePrivate):
2766
2767 2012-06-02  Antonio Gomes  <agomes@rim.com>
2768
2769         [BlackBerry] browser video player fullscreen mode (portrait) - out of screen/focus - cannot navigate or use the buttons on the screen (PART I)
2770         https://bugs.webkit.org/show_bug.cgi?id=88019
2771         PR #158266
2772
2773         Reviewed by George Staikos.
2774
2775         The way elements go fullscreen with the new FULLSCREEN_API
2776         is that they get cloned and added to an out-of-DOM wrapper
2777         element. The wrapper is a normal fixed position element and
2778         then zoom in/out accordingly to how other layers do: following
2779         WebPage's scale.
2780
2781         When going fullscreen, we have to take the current WebPage scale
2782         into account in order to properly fit the element to the screen,
2783         regardless the web page scale.
2784
2785         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2786         (WebCore):
2787         (WebCore::ChromeClientBlackBerry::fullScreenRendererChanged):
2788         * WebCoreSupport/ChromeClientBlackBerry.h:
2789         (ChromeClientBlackBerry):
2790
2791 2012-06-01  Crystal Zhang  <haizhang@rim.com>
2792
2793         [BlackBerry] Fix the return value checking in SelectPopupClient
2794         https://bugs.webkit.org/show_bug.cgi?id=88130
2795
2796         Reviewed by Rob Buis.
2797
2798         In SelectPopupClient, return '1' means selected, '0' means not selected, 
2799         the ASCII value of '0' is 48, not 32, use '0' to be more readable.
2800
2801         * WebCoreSupport/SelectPopupClient.cpp:
2802         (WebCore::SelectPopupClient::setValueAndClosePopup):
2803
2804 2012-06-01  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2805
2806         [BlackBerry] Add end editing handling into AutofillManager
2807         https://bugs.webkit.org/show_bug.cgi?id=88071
2808
2809         Reviewed by Rob Buis.
2810
2811         RIM PR: 160857
2812         Implemented EditorClientBlackBerry::textFieldDidEndEditing
2813         to notify AutofillManager to send the dismissing autofill
2814         dialog notification to webpage client.
2815
2816         No new tests since there is no behavior changes.
2817
2818         * Api/WebPage.cpp:
2819         (BlackBerry::WebKit::WebPagePrivate::notifyDismissAutofillDialog):
2820         (WebKit):
2821         * Api/WebPageClient.h:
2822         * Api/WebPage_p.h:
2823         (WebPagePrivate):
2824         * WebCoreSupport/AutofillManager.cpp:
2825         (WebCore::AutofillManager::textFieldDidEndEditing):
2826         (WebCore):
2827         * WebCoreSupport/AutofillManager.h:
2828         (AutofillManager):
2829         * WebCoreSupport/EditorClientBlackBerry.cpp:
2830         (WebCore::EditorClientBlackBerry::textFieldDidEndEditing):
2831
2832 2012-05-31  Jacky Jiang  <zhajiang@rim.com>
2833
2834         [BlackBerry] Bridge Apps - Apps do not redraw correctly after orientation change
2835         https://bugs.webkit.org/show_bug.cgi?id=88033
2836
2837         Reviewed by Rob Buis.
2838         Patch by Jacky Jiang <zhajiang@rim.com>
2839
2840         PR: 142961
2841         When bridge apps were in carousel mode, the backing store was inactive
2842         as its memory had been released. When we rotated the device, we would
2843         call WebPagPrivate:setViewportSize and resume screen and backing store
2844         to render and blit visible contents. As backing store was inactive and
2845         the window usage was GLES2Usage, we were neither doing backing store
2846         rendering nor direct rendering. Therefore, we drew layers directly
2847         based on the invalid texture contents when blitting contents if
2848         accelerated compositing was enabled.
2849         This patch forces compositing mode to let the accelerated compositing
2850         layer take care of the rendering which can update texture contents
2851         before drawing when backing store is inactive and is openGL compositing.
2852
2853         Reviewed internally by George Staikos and Arvid Nilsson.
2854
2855         * Api/BackingStore.cpp:
2856         (BlackBerry::WebKit::BackingStorePrivate::resumeScreenAndBackingStoreUpdates):
2857
2858 2012-05-31  Hajime Morrita  <morrita@chromium.org>
2859
2860         REGRESSION(r117572): editing/spelling/spellcheck-async-remove-frame.html crashes on Mac
2861         https://bugs.webkit.org/show_bug.cgi?id=86859
2862
2863         Reviewed by Ryosuke Niwa.
2864
2865         * WebCoreSupport/EditorClientBlackBerry.cpp:
2866         (WebCore::EditorClientBlackBerry::requestCheckingOfString):
2867         * WebCoreSupport/EditorClientBlackBerry.h:
2868         (EditorClientBlackBerry):
2869
2870 2012-05-31  Arvid Nilsson  <anilsson@rim.com>
2871
2872         [BlackBerry] WebGL and 2D canvas output not available to WebPageCompositor
2873         https://bugs.webkit.org/show_bug.cgi?id=88012
2874
2875         Reviewed by George Staikos.
2876
2877         Properly set up resource sharing between WebKit thread EGL contexts and
2878         the compositing thread EGL context, so the texture ID produced by WebGL
2879         and 2D canvas makes sense to the compositing context.
2880
2881         There's no public API to supply an EGLContext yet, so we're lucky that
2882         the embedder never makes its context un-current. Just grab the current
2883         context on the compositing thread and use that as the compositing
2884         context.
2885
2886         * Api/WebPage.cpp:
2887         (BlackBerry::WebKit::WebPagePrivate::setCompositor):
2888         * Api/WebPageCompositor.cpp:
2889         (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor):
2890         (BlackBerry::WebKit::WebPageCompositor::~WebPageCompositor):
2891         * Api/WebPage_p.h:
2892         (WebPagePrivate):
2893
2894 2012-05-31  George Staikos  <staikos@webkit.org>
2895
2896         [Blackberry] Initialize the select client and delete the pointer
2897         in the destructor so it doesn't leak.  Fixes test crashes.
2898         https://bugs.webkit.org/show_bug.cgi?id=87992
2899
2900         Reviewed by Rob Buis.
2901
2902         * WebKitSupport/InputHandler.cpp:
2903         (BlackBerry::WebKit::InputHandler::InputHandler):
2904         (BlackBerry::WebKit::InputHandler::~InputHandler):
2905
2906 2012-05-31  Arvid Nilsson  <anilsson@rim.com>
2907
2908         [BlackBerry] Crash when destroying WebOverlay with active WebOverlayOverride
2909         https://bugs.webkit.org/show_bug.cgi?id=87968
2910
2911         Reviewed by Rob Buis.
2912
2913         The override object is using a compositing thread WebOverlayPrivate
2914         object with no client because the layer doesn't delegate drawing to the
2915         WebOverlayPrivate, it's only used to modify the override properties on
2916         the underlying compositing thread layer.
2917
2918         Since the m_layerCompositingThreadClient is optional, we have to add
2919         null checks.
2920
2921         * Api/WebOverlay.cpp:
2922         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::~WebOverlayPrivateCompositingThread):
2923         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setClient):
2924         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setContentsToImage):
2925         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setContentsToColor):
2926         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setDrawsContent):
2927         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::invalidate):
2928
2929 2012-05-31  Chris Guan  <chris.guan@torchmobile.com.cn>
2930
2931         [Blackberry] WebKit's fullscreen mode needs to notify page client.
2932         https://bugs.webkit.org/show_bug.cgi?id=87337
2933
2934         Reviewed by Antonio Gomes.
2935
2936         Move "fullScreenVideoCapable" into webpagePrivate to make code
2937         clean for "fullScreenForElement/Node" of cromeClientBlackberry,
2938         All Video checks and code path selections are in webpagePrivate now.
2939         For some UX and secure reasons, we could not apply fullscreen capacity
2940         for all elements, So we use client's fullscreenStart/Stop only for
2941         those video elements and those elements containing video tags.
2942
2943         * Api/WebPage.cpp:
2944         (BlackBerry::WebKit::WebPagePrivate::webContext):
2945         (BlackBerry::WebKit::WebPage::notifyFullScreenVideoExited):
2946         (WebKit):
2947         (BlackBerry::WebKit::containsVideoTags):
2948         (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
2949         (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
2950         * Api/WebPageClient.h:
2951         * Api/WebPage_p.h:
2952         (WebCore):
2953         (WebPagePrivate):
2954         * WebCoreSupport/ChromeClientBlackBerry.cpp:
2955         (WebCore::ChromeClientBlackBerry::enterFullScreenForElement):
2956         (WebCore::ChromeClientBlackBerry::exitFullScreenForElement):
2957
2958 2012-05-31  Arvid Nilsson  <anilsson@rim.com>
2959
2960         [BlackBerry] Crash when closing web page if selection is active
2961         https://bugs.webkit.org/show_bug.cgi?id=87962
2962
2963         Reviewed by Antonio Gomes.
2964
2965         The embedder may try to remove a layer from the compositor at a stage
2966         where the compositor has been set to 0.
2967
2968         * Api/WebPage.cpp:
2969         (BlackBerry::WebKit::WebPage::addCompositingThreadOverlay):
2970         (BlackBerry::WebKit::WebPage::removeCompositingThreadOverlay):
2971
2972 2012-05-30  Konrad Piascik  <kpiascik@rim.com>
2973
2974         [BlackBerry] Add an Accelerated Compositing layer for Web Inspector DOM highlight.
2975         https://bugs.webkit.org/show_bug.cgi?id=81001
2976
2977         Reviewed by Antonio Gomes.
2978         
2979         Implemented InspectorOverlay using WebOverlayAPI.
2980
2981         * Api/BackingStore.cpp:
2982         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
2983         * Api/WebPage.cpp:
2984         (BlackBerry::WebKit::WebPagePrivate::updateDelegatedOverlays):
2985         (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
2986         (BlackBerry::WebKit::WebPagePrivate::setInspectorOverlayClient):
2987         (WebKit):
2988         * Api/WebPage_p.h:
2989         (WebCore):
2990         (WebPagePrivate):
2991         * WebCoreSupport/InspectorClientBlackBerry.cpp:
2992         (WebCore::InspectorClientBlackBerry::highlight):
2993         (WebCore::InspectorClientBlackBerry::hideHighlight):
2994         (WebCore::InspectorClientBlackBerry::paintInspectorOverlay):
2995         (WebCore):
2996         * WebCoreSupport/InspectorClientBlackBerry.h:
2997         (InspectorClientBlackBerry):
2998         * WebCoreSupport/InspectorOverlay.cpp: Added.
2999         (WebCore):
3000         (WebCore::InspectorOverlay::create):
3001         (WebCore::InspectorOverlay::InspectorOverlay):
3002         (WebCore::InspectorOverlay::notifySyncRequired):
3003         (WebCore::InspectorOverlay::paintContents):
3004         (WebCore::InspectorOverlay::showDebugBorders):
3005         (WebCore::InspectorOverlay::showRepaintCounter):
3006         (WebCore::InspectorOverlay::contentsVisible):
3007         (WebCore::InspectorOverlay::~InspectorOverlay):
3008         (WebCore::InspectorOverlay::clear):
3009         (WebCore::InspectorOverlay::update):
3010         (WebCore::InspectorOverlay::paintWebFrame):
3011         (WebCore::InspectorOverlay::invalidateWebFrame):
3012         * WebCoreSupport/InspectorOverlay.h: Added.
3013         (WebKit):
3014         (WebCore):
3015         (InspectorOverlay):
3016         (InspectorOverlayClient):
3017         (WebCore::InspectorOverlay::setClient):
3018         (WebCore::InspectorOverlay::notifyAnimationStarted):
3019
3020 2012-05-30  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
3021
3022         [BlackBerry] Browser crashed when selecting in textarea
3023         https://bugs.webkit.org/show_bug.cgi?id=87484
3024
3025         The function FatFingers::checkForText() uses host node's whole text
3026         to checkFingerIntersection(). We should not give the text of shadow
3027         nodes to it.
3028
3029         Reviewed by Antonio Gomes.
3030
3031         * WebKitSupport/FatFingers.cpp:
3032         (BlackBerry::WebKit::FatFingers::getNodesFromRect): Avoid returning
3033         shadow nodes when the context is Text node.
3034
3035 2012-05-30  Zoltan Horvath  <zoltan@webkit.org>
3036
3037         [Qt] Set WebCore imagedecoders as default and add fallback to QImageDecoder
3038         https://bugs.webkit.org/show_bug.cgi?id=80400
3039
3040         Get rid of QT_IMAGE_DECODER flag.
3041
3042         Reviewed by Simon Hausmann.
3043
3044         * WebCoreSupport/AboutDataEnableFeatures.in:
3045
3046 2012-05-29  Max Feil  <mfeil@rim.com>
3047
3048         [BlackBerry] The Page's deviceScaleFactor() is not being properly maintained
3049         https://bugs.webkit.org/show_bug.cgi?id=87817
3050
3051         Reviewed by Antonio Gomes.
3052
3053         This bug fix in WebKit/blackberry is needed by the changes for
3054         fullscreen media control sizing in WebCore (bug 87551). The sizing
3055         of controls depends on the page's deviceScaleFactor(), which was
3056         not being maintained properly due to errors in logic. Viewport
3057         changes from non-default to default were being erroneously
3058         thrown out. Also, when the viewport did change back to default
3059         the deviceScaleFactor was not being updated.
3060
3061         * Api/WebPage.cpp:
3062         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
3063         (BlackBerry::WebKit::WebPagePrivate::dispatchViewportPropertiesDidChange):
3064
3065 2012-05-29  Arvid Nilsson  <anilsson@rim.com>
3066
3067         [BlackBerry] WebOverlay build fixes and bug fixes
3068         https://bugs.webkit.org/show_bug.cgi?id=87780
3069
3070         Reviewed by Rob Buis.
3071
3072         Fix build when accelerated compositing disabled, or debug build.
3073
3074         Also fix a bug where the selection overlay would not disappear properly
3075         because of a typo in WebPage::removeOverlay(). Also convert said method
3076         to early return style.
3077
3078         Debug build fixes contributed by Ming Xie.
3079
3080         * Api/WebOverlay.cpp:
3081         (BlackBerry::WebKit::WebOverlay::addAnimation):
3082         (BlackBerry::WebKit::WebOverlay::setContentsToImage):
3083         (WebKit):
3084         (BlackBerry::WebKit::WebOverlay::setContentsToColor):
3085         (BlackBerry::WebKit::WebOverlay::setDrawsContent):
3086         (BlackBerry::WebKit::WebOverlay::invalidate):
3087         (BlackBerry::WebKit::WebOverlay::setClient):
3088         (BlackBerry::WebKit::WebOverlay::override):
3089         (BlackBerry::WebKit::WebOverlay::resetOverrides):
3090         * Api/WebOverlayOverride.cpp:
3091         (BlackBerry::WebKit::WebOverlayOverride::WebOverlayOverride):
3092         * Api/WebOverlay_p.h:
3093         (BlackBerry::WebKit::WebOverlayPrivate::~WebOverlayPrivate):
3094         * Api/WebPage.cpp:
3095         (BlackBerry::WebKit::WebPage::removeOverlay):
3096         (BlackBerry::WebKit::WebPage::addCompositingThreadOverlay):
3097         (BlackBerry::WebKit::WebPage::removeCompositingThreadOverlay):
3098
3099 2012-05-29  Yong Li  <yoli@rim.com>
3100
3101         [BlackBerry] Add malloc info to about:memory page
3102         https://bugs.webkit.org/show_bug.cgi?id=87676
3103
3104         Reviewed by Rob Buis.
3105
3106         Detailed malloc info can tell us how much memory
3107         in the heaps is being in use.
3108
3109         * WebCoreSupport/AboutData.cpp:
3110         (WebCore::memoryPage):
3111
3112 2012-05-29  Arvid Nilsson  <anilsson@rim.com>
3113
3114         [BlackBerry] Make DefaultTapHighlight use the new WebOverlay API
3115         https://bugs.webkit.org/show_bug.cgi?id=87604
3116
3117         Reviewed by Antonio Gomes.
3118
3119         Also add a new method to allow the embedder to use the default tap
3120         highlight instead of replacing it with a custom one just to keep track
3121         of the "shouldHideAfterScroll" flag.
3122
3123         PR #160262.
3124
3125         * Api/WebTapHighlight.h:
3126         * WebKitSupport/DefaultTapHighlight.cpp:
3127         (BlackBerry::WebKit::DefaultTapHighlight::DefaultTapHighlight):
3128         (BlackBerry::WebKit::DefaultTapHighlight::draw):
3129         (BlackBerry::WebKit::DefaultTapHighlight::hide):
3130         (BlackBerry::WebKit::DefaultTapHighlight::paintContents):
3131         * WebKitSupport/DefaultTapHighlight.h:
3132         (BlackBerry::WebKit::DefaultTapHighlight::shouldHideAfterScroll):
3133         (DefaultTapHighlight):
3134
3135 2012-05-29  Arvid Nilsson  <anilsson@rim.com>
3136
3137         [BlackBerry] WebKit-side implementation of SelectionOverlay
3138         https://bugs.webkit.org/show_bug.cgi?id=87605
3139
3140         Reviewed by Rob Buis.
3141
3142         Leverage the new WebOverlay API to move SelectionOverlay to the WebKit
3143         library, so we always draw selection regardless of which embedder is
3144         integrating WebKit.
3145
3146         PR #160263
3147
3148         * Api/WebPage.cpp:
3149         (BlackBerry::WebKit::WebPagePrivate::init):
3150         (BlackBerry::WebKit::WebPage::selectionOverlay):
3151         (WebKit):
3152         * Api/WebPage.h:
3153         (WebKit):
3154         * Api/WebPage_p.h:
3155         (WebPagePrivate):
3156         * Api/WebSelectionOverlay.h: Added.
3157         (WebKit):
3158         * WebKitSupport/SelectionHandler.cpp:
3159         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
3160         * WebKitSupport/SelectionOverlay.cpp: Added.
3161         (WebKit):
3162         (BlackBerry::WebKit::SelectionOverlay::SelectionOverlay):
3163         (BlackBerry::WebKit::SelectionOverlay::~SelectionOverlay):
3164         (BlackBerry::WebKit::SelectionOverlay::draw):
3165         (BlackBerry::WebKit::SelectionOverlay::hide):
3166         (BlackBerry::WebKit::SelectionOverlay::notifySyncRequired):
3167         (BlackBerry::WebKit::SelectionOverlay::paintContents):
3168         * WebKitSupport/SelectionOverlay.h: Added.
3169         (WebKit):
3170         (SelectionOverlay):
3171         (BlackBerry::WebKit::SelectionOverlay::create):
3172         (BlackBerry::WebKit::SelectionOverlay::notifyAnimationStarted):
3173         (BlackBerry::WebKit::SelectionOverlay::showDebugBorders):
3174         (BlackBerry::WebKit::SelectionOverlay::showRepaintCounter):
3175         (BlackBerry::WebKit::SelectionOverlay::contentsVisible):
3176
3177 2012-05-29  Arvid Nilsson  <anilsson@rim.com>
3178
3179         [BlackBerry] WebOverlay API
3180         https://bugs.webkit.org/show_bug.cgi?id=87603
3181
3182         Reviewed by Rob Buis.
3183
3184         This new API makes it possible to leverage the BlackBerry accelerated
3185         compositing implementation to draw, transform and fluidly animate
3186         overlays in the embedding library or application.
3187
3188         A WebOverlay has an affinity for the thread where it was created. If
3189         the current thread is the WebKit thread, use WebPage::addOverlay() to
3190         add it to the page, and manipulate it only from the WebKit thread, with
3191         exception of the "override" functionality which can be used from the
3192         compositing thread. If the current thread is the compositing thread,
3193         use WebPage::addCompositingThreadOverlay() to add it to the page, and
3194         only manipulate it on the compositing thread.
3195
3196         A WebOverlay can be painted using Skia, or its contents can be set to
3197         an image or a solid color.
3198
3199         PR #156812
3200
3201         * Api/WebAnimation.cpp: Added.
3202         (WebKit):
3203         (BlackBerry::WebKit::WebAnimation::fadeAnimation):
3204         (BlackBerry::WebKit::WebAnimation::name):
3205         (BlackBerry::WebKit::WebAnimation::WebAnimation):
3206         (BlackBerry::WebKit::WebAnimation::~WebAnimation):
3207         (BlackBerry::WebKit::WebAnimation::operator=):
3208         * Api/WebAnimation.h: Added.
3209         (WebKit):
3210         * Api/WebAnimation_p.h: Added.
3211         (WebKit):
3212         (WebAnimationPrivate):
3213         (BlackBerry::WebKit::WebAnimationPrivate::WebAnimationPrivate):
3214         * Api/WebOverlay.cpp: Added.
3215         (WebKit):
3216         (BlackBerry::WebKit::WebOverlay::WebOverlay):
3217         (BlackBerry::WebKit::WebOverlay::~WebOverlay):
3218         (BlackBerry::WebKit::WebOverlay::position):
3219         (BlackBerry::WebKit::WebOverlay::setPosition):
3220         (BlackBerry::WebKit::WebOverlay::anchorPoint):
3221         (BlackBerry::WebKit::WebOverlay::setAnchorPoint):
3222         (BlackBerry::WebKit::WebOverlay::size):
3223         (BlackBerry::WebKit::WebOverlay::setSize):
3224         (BlackBerry::WebKit::WebOverlay::sizeIsScaleInvariant):
3225         (BlackBerry::WebKit::WebOverlay::setSizeIsScaleInvariant):
3226         (BlackBerry::WebKit::WebOverlay::transform):
3227         (BlackBerry::WebKit::WebOverlay::setTransform):
3228         (BlackBerry::WebKit::WebOverlay::opacity):
3229         (BlackBerry::WebKit::WebOverlay::setOpacity):
3230         (BlackBerry::WebKit::WebOverlay::addAnimation):
3231         (BlackBerry::WebKit::WebOverlay::removeAnimation):
3232         (BlackBerry::WebKit::WebOverlay::parent):
3233         (BlackBerry::WebKit::WebOverlay::addChild):
3234         (BlackBerry::WebKit::WebOverlay::removeFromParent):
3235         (BlackBerry::WebKit::WebOverlay::setContentsToImage):
3236         (BlackBerry::WebKit::WebOverlay::setContentsToColor):
3237         (BlackBerry::WebKit::WebOverlay::setDrawsContent):
3238         (BlackBerry::WebKit::WebOverlay::invalidate):
3239         (BlackBerry::WebKit::WebOverlay::setClient):
3240         (BlackBerry::WebKit::WebOverlay::override):
3241         (BlackBerry::WebKit::WebOverlay::resetOverrides):
3242         (BlackBerry::WebKit::WebOverlayPrivate::page):
3243         (BlackBerry::WebKit::WebOverlayPrivate::override):
3244         (BlackBerry::WebKit::WebOverlayPrivate::drawContents):
3245         (BlackBerry::WebKit::WebOverlayPrivate::scheduleCompositingRun):
3246         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::WebOverlayPrivateWebKitThread):
3247         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::override):
3248         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::position):
3249         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setPosition):
3250         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::anchorPoint):
3251         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setAnchorPoint):
3252         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::size):
3253         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setSize):
3254         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::sizeIsScaleInvariant):
3255         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setSizeIsScaleInvariant):
3256         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::transform):
3257         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setTransform):
3258         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::opacity):
3259         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setOpacity):
3260         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::addAnimation):
3261         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::removeAnimation):
3262         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::addChild):
3263         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::removeFromParent):
3264         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setContentsToImage):
3265         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setContentsToColor):
3266         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::setDrawsContent):
3267         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::clear):
3268         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::invalidate):
3269         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::resetOverrides):
3270         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::notifySyncRequired):
3271         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::paintContents):
3272         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::WebOverlayLayerCompositingThreadClient):
3273         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::~WebOverlayLayerCompositingThreadClient):
3274         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::setDrawsContent):
3275         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::invalidate):
3276         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::setContents):
3277         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::setContentsToColor):
3278         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::layerCompositingThreadDestroyed):
3279         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::layerVisibilityChanged):
3280         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded):
3281         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::drawTextures):
3282         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::deleteTextures):
3283         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::WebOverlayPrivateCompositingThread):
3284         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::~WebOverlayPrivateCompositingThread):
3285         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setClient):
3286         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::override):
3287         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::position):
3288         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setPosition):
3289         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::anchorPoint):
3290         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setAnchorPoint):
3291         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::size):
3292         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setSize):
3293         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::sizeIsScaleInvariant):
3294         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setSizeIsScaleInvariant):
3295         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::transform):
3296         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setTransform):
3297         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::opacity):
3298         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setOpacity):
3299         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::addAnimation):
3300         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::removeAnimation):
3301         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::addChild):
3302         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::removeFromParent):
3303         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setContentsToImage):
3304         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setContentsToColor):
3305         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::setDrawsContent):
3306         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::clear):
3307         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::invalidate):
3308         (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::resetOverrides):
3309         * Api/WebOverlay.h: Added.
3310         (WebCore):
3311         (WebKit):
3312         * Api/WebOverlayClient.h: Added.
3313         (WebKit):
3314         * Api/WebOverlayOverride.cpp: Added.
3315         (WebKit):
3316         (BlackBerry::WebKit::WebOverlayOverride::WebOverlayOverride):
3317         (BlackBerry::WebKit::WebOverlayOverride::~WebOverlayOverride):
3318         (BlackBerry::WebKit::WebOverlayOverride::setPosition):
3319         (BlackBerry::WebKit::WebOverlayOverride::setAnchorPoint):
3320         (BlackBerry::WebKit::WebOverlayOverride::setSize):
3321         (BlackBerry::WebKit::WebOverlayOverride::setTransform):
3322         (BlackBerry::WebKit::WebOverlayOverride::setOpacity):
3323         (BlackBerry::WebKit::WebOverlayOverride::addAnimation):
3324         (BlackBerry::WebKit::WebOverlayOverride::removeAnimation):
3325         * Api/WebOverlayOverride.h: Added.
3326         (WebKit):
3327         * Api/WebOverlay_p.h: Added.
3328         (WTF):
3329         (WebCore):
3330         (WebKit):
3331         (WebOverlayPrivate):
3332         (BlackBerry::WebKit::WebOverlayPrivate::WebOverlayPrivate):
3333         (BlackBerry::WebKit::WebOverlayPrivate::~WebOverlayPrivate):
3334         (BlackBerry::WebKit::WebOverlayPrivate::setPage):
3335         (BlackBerry::WebKit::WebOverlayPrivate::setClient):
3336         (BlackBerry::WebKit::WebOverlayPrivate::layerCompositingThread):
3337         (BlackBerry::WebKit::WebOverlayPrivate::graphicsLayer):
3338         (WebOverlayPrivateWebKitThread):
3339         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::graphicsLayer):
3340         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::notifyAnimationStarted):
3341         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::showDebugBorders):
3342         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::showRepaintCounter):
3343         (BlackBerry::WebKit::WebOverlayPrivateWebKitThread::contentsVisible):
3344         (WebOverlayLayerCompositingThreadClient):
3345         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::setLayer):
3346         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::setClient):
3347         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::drawsContent):
3348         (BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::contents):
3349         (WebOverlayPrivateCompositingThread):
3350         * Api/WebPage.cpp:
3351         (BlackBerry::WebKit::WebPage::addOverlay):
3352         (WebKit):
3353         (BlackBerry::WebKit::WebPage::removeOverlay):
3354         (BlackBerry::WebKit::WebPage::addCompositingThreadOverlay):
3355         (BlackBerry::WebKit::WebPage::removeCompositingThreadOverlay):
3356         * Api/WebPage.h:
3357         (WebKit):
3358         * Api/WebPageCompositor.cpp:
3359         (BlackBerry::WebKit::WebPageCompositorPrivate::prepareFrame):
3360         (BlackBerry::WebKit::WebPageCompositorPrivate::render):
3361         (WebKit):
3362         (BlackBerry::WebKit::WebPageCompositorPrivate::compositeLayers):
3363         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
3364         (BlackBerry::WebKit::WebPageCompositorPrivate::addOverlay):
3365         (BlackBerry::WebKit::WebPageCompositorPrivate::removeOverlay):
3366         * Api/WebPageCompositor_p.h:
3367         (BlackBerry::WebKit::WebPageCompositorPrivate::compositingThreadOverlayLayer):
3368         (WebPageCompositorPrivate):
3369
3370 2012-05-28  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
3371
3372         [BlackBerry] http authenticate dialog popup only once no matter authentication pass or fail
3373         https://bugs.webkit.org/show_bug.cgi?id=80135
3374
3375         Reviewed by Rob Buis.
3376
3377         RIM PR: 145660
3378         Fixed a regression introduced by r111810, which used the wrong
3379         credential object.
3380
3381         Added the interface function didReceivedAuthenticaitonChallenge()
3382         in interface class DumpRenderTreeClient;
3383         Called m_dumpRenderTree->didReceiveAuthenticationChallenge() in
3384         WebPagePrivate::authenticationChallenge() when DRT is enabled.
3385
3386         Test: reuse existing test cases:
3387         http/tests/loading/basic-credentials-sent-automatically.html
3388         http/tests/loading/basic-auth-resend-wrong-credentials.html
3389
3390         Resubmit the patch reverted by r115104 after the digest infinite loop
3391         issue for BlackBerry porting get identified and fixed.
3392
3393         Internally reviewed by Joe Mason <jmason@rim.com>
3394
3395         * Api/DumpRenderTreeClient.h:
3396         (WebCore):
3397         * Api/WebPage.cpp:
3398         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
3399         * Api/WebPageClient.h:
3400         * Api/WebPage_p.h:
3401         (WebPagePrivate):
3402
3403 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
3404
3405         [BlackBerry] Always create a compositor
3406         https://bugs.webkit.org/show_bug.cgi?id=87598
3407
3408         Reviewed by Rob Buis.
3409
3410         There will likely be compositing layers either due to web content or
3411         due to overlays.
3412
3413         Defer initialization of OpenGL objects (i.e., delay creation of the
3414         LayerRenderer object) until we actually need to draw and there are such
3415         layers, to avoid initializing OpenGL in the unlikely case that there
3416         are no compositing layers or overlay layers.
3417
3418         PR #156811
3419
3420         * Api/WebPage.cpp:
3421         (BlackBerry::WebKit::WebPagePrivate::init):
3422         (BlackBerry::WebKit::WebPagePrivate::createCompositor):
3423         * Api/WebPageCompositor.cpp:
3424         (BlackBerry::WebKit::WebPageCompositorPrivate::setContext):
3425         (BlackBerry::WebKit::WebPageCompositorPrivate::prepareFrame):
3426         (BlackBerry::WebKit::WebPageCompositorPrivate::render):
3427         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
3428         * Api/WebPageCompositor_p.h:
3429         (WebPageCompositorPrivate):
3430
3431 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
3432
3433         [BlackBerry] Dangling pointer in WebPagePrivate::setCompositor() message
3434         https://bugs.webkit.org/show_bug.cgi?id=87590
3435
3436         Reviewed by Rob Buis.
3437
3438         A crash would be seen in GuardedPointerBase::getWithGuardLocked when
3439         attempting to unpickle and execute serialized call to setCompositor.
3440
3441         The problem was that the message had been created with a dangling
3442         pointer as the target. The web page failed to inform its compositor
3443         that it was being destroyed due to an early return in
3444         WebPagePrivate::destroyCompositor.
3445
3446         The root cause was that a method called "destroyCompositor" was being
3447         called in two situations, when navigating to a new page as well as when
3448         actually deleting the web page. And in one case, we really only wanted
3449         to free up some memory by clearing textures, while in the other case we
3450         really did want to destroy the compositor.
3451
3452         Fixed by calling a method to release textures when that's what we want
3453         to do, and calling a method to destroy the compositor when that's what
3454         we want to do, and making that latter method unconditional.
3455
3456         Reviewed internally by Jeff Rogers.
3457
3458         PR #156765
3459
3460         * Api/WebPage.cpp:
3461         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
3462         (BlackBerry::WebKit::WebPagePrivate::destroyCompositor):
3463
3464 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
3465
3466         [BlackBerry] Add a default tap highlight
3467         https://bugs.webkit.org/show_bug.cgi?id=87569
3468
3469         Reviewed by Rob Buis.
3470
3471         We used to require the embedder to implement tap highlight drawing.
3472         Now, a default tap highlight, implemented using the recently added
3473         accelerated compositing overlay layer support, can be used instead.
3474
3475         The tap highlight appears instantly but fades out when hidden.
3476
3477         The default tap highlight can be overridden using the new
3478         WebPage::setTapHighlight() method.
3479
3480         Reviewed internally by Mike Lattanzio and Mike Fenton.
3481
3482         PR #154329
3483
3484         * Api/WebPage.cpp:
3485         (BlackBerry::WebKit::WebPagePrivate::init):
3486         (BlackBerry::WebKit::WebPage::tapHighlight):
3487         (WebKit):
3488         (BlackBerry::WebKit::WebPage::setTapHighlight):
3489         * Api/WebPage.h:
3490         (WebKit):
3491         * Api/WebPageClient.h:
3492         * Api/WebPage_p.h:
3493         (WebCore):
3494         (WebPagePrivate):
3495         * Api/WebTapHighlight.h: Added.
3496         (WebKit):
3497         * WebKitSupport/DefaultTapHighlight.cpp: Added.
3498         (WebKit):
3499         (BlackBerry::WebKit::fadeAnimationName):
3500         (BlackBerry::WebKit::DefaultTapHighlight::DefaultTapHighlight):
3501         (BlackBerry::WebKit::DefaultTapHighlight::~DefaultTapHighlight):
3502         (BlackBerry::WebKit::DefaultTapHighlight::draw):
3503         (BlackBerry::WebKit::DefaultTapHighlight::hide):
3504         (BlackBerry::WebKit::DefaultTapHighlight::notifySyncRequired):
3505         (BlackBerry::WebKit::DefaultTapHighlight::paintContents):
3506         * WebKitSupport/DefaultTapHighlight.h: Added.
3507         (WebKit):
3508         (DefaultTapHighlight):
3509         (BlackBerry::WebKit::DefaultTapHighlight::create):
3510         (BlackBerry::WebKit::DefaultTapHighlight::notifyAnimationStarted):
3511         (BlackBerry::WebKit::DefaultTapHighlight::showDebugBorders):
3512         (BlackBerry::WebKit::DefaultTapHighlight::showRepaintCounter):
3513         (BlackBerry::WebKit::DefaultTapHighlight::contentsVisible):
3514         * WebKitSupport/TouchEventHandler.cpp:
3515         (BlackBerry::WebKit::TouchEventHandler::drawTapHighlight):
3516
3517 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
3518
3519         [BlackBerry] Add an overlay layer
3520         https://bugs.webkit.org/show_bug.cgi?id=87567
3521
3522         Reviewed by Antonio Gomes.
3523
3524         The overlay layer allows us to have compositing layers even though the
3525         web page is not currently using accelerated compositing.
3526
3527         These layers can be used to implement tap highlight, inspector overlay
3528         and more.
3529
3530         Reviewed internally by Filip Spacek.
3531
3532         PR #154335
3533
3534         * Api/WebPage.cpp:
3535         (BlackBerry::WebKit::WebPagePrivate::scheduleRootLayerCommit):
3536         (BlackBerry::WebKit::WebPagePrivate::overlayLayer):
3537         (WebKit):
3538         (BlackBerry::WebKit::WebPagePrivate::commitRootLayer):
3539         (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
3540         * Api/WebPageCompositor.cpp:
3541         (BlackBerry::WebKit::WebPageCompositorPrivate::setOverlayLayer):
3542         (WebKit):
3543         (BlackBerry::WebKit::WebPageCompositorPrivate::prepareFrame):
3544         (BlackBerry::WebKit::WebPageCompositorPrivate::render):
3545         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
3546         * Api/WebPageCompositor_p.h:
3547         (BlackBerry::WebKit::WebPageCompositorPrivate::overlayLayer):
3548         (WebPageCompositorPrivate):
3549         * Api/WebPage_p.h:
3550         (WebPagePrivate):
3551
3552 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
3553
3554         [BlackBerry] Update WebPageCompositor::render() API
3555         https://bugs.webkit.org/show_bug.cgi?id=87565
3556
3557         Reviewed by Rob Buis.
3558
3559         The new API allows the embedder to specify the root transform and many
3560         OpenGL related parameters to be used when rendering the web page.
3561
3562         To honor the transform, we have to implement a way to composite the
3563         BackingStore output using a generic transform. This method,
3564         BackingStorePrivate::compositeContents(), uses a strategy that differs
3565         from blitContents(), because that one is optimized for software
3566         blitting, while this one is optimized for GPU rendering. Specifically,
3567         instead of drawing the checkerboard first, and the rendered subregions
3568         of the tile afterward, we draw the whole tile in one call, and then
3569         draw checkered regions on top, if any.
3570
3571         Removed the blit generation condvar from the new code paths for drawing
3572         BackingStore output using a transform, since the condvar is ineffective
3573         in preventing flicker when we're not in charge of swapping the window.
3574         Instead, another synchronization solution will be implemented in the
3575         future.
3576
3577         Reviewed internally by Filip Spacek.
3578         Some parts reviewed internally by Jacky Jiang and others by
3579         Mike Lattanzio.
3580
3581         PR #151887, #154334
3582
3583         * Api/BackingStore.cpp:
3584         (BlackBerry::WebKit::BackingStorePrivate::render):
3585         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
3586         (WebKit):
3587         (BlackBerry::WebKit::BackingStorePrivate::compositeContents):
3588         * Api/BackingStore_p.h:
3589         (WebCore):
3590         (BackingStorePrivate):
3591         * Api/WebPageCompositor.cpp:
3592         (BlackBerry::WebKit::WebPageCompositorPrivate::setContext):
3593         (BlackBerry::WebKit::WebPageCompositorPrivate::setRootLayer):
3594         (BlackBerry::WebKit::WebPageCompositorPrivate::prepareFrame):
3595         (BlackBerry::WebKit::WebPageCompositorPrivate::render):
3596         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
3597         (BlackBerry::WebKit::WebPageCompositor::prepareFrame):
3598         (BlackBerry::WebKit::WebPageCompositor::render):
3599         * Api/WebPageCompositor.h:
3600         * Api/WebPageCompositorClient.h:
3601         * Api/WebPageCompositor_p.h:
3602         (WebPageCompositorPrivate):
3603         * WebCoreSupport/ChromeClientBlackBerry.cpp:
3604
3605 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
3606
3607         [BlackBerry] Plumb through the return value of makeCurrent to caller
3608         https://bugs.webkit.org/show_bug.cgi?id=87564
3609
3610         Reviewed by Rob Buis.
3611
3612         This way the caller can take appropriate action if makeCurrent fails,
3613         for example because we're running out of memory.
3614
3615         Reviewed internally by George Staikos.
3616
3617         PR #149721
3618
3619         * WebKitSupport/GLES2Context.cpp:
3620         (BlackBerry::WebKit::GLES2Context::makeCurrent):
3621
3622 2012-05-27  Arvid Nilsson  <anilsson@rim.com>
3623
3624         [BlackBerry] Crash when deleting WebPageCompositor
3625         https://bugs.webkit.org/show_bug.cgi?id=87589
3626
3627         Reviewed by Rob Buis.
3628
3629         The WebPageCompositorPrivate is reference counted, so it may outlive
3630         either the WebPage or the WebPageCompositor, depending on who releases
3631         its reference first.
3632
3633         Fixed by disconnecting the objects properly, regardless of who goes
3634         away first.
3635
3636         Reviewed internally by Mike Lattanzio.
3637
3638         PR #156444
3639
3640         * Api/WebPage.cpp:
3641         (BlackBerry::WebKit::WebPagePrivate::setCompositor):
3642         (BlackBerry::WebKit::WebPagePrivate::destroyCompositor):
3643         * Api/WebPageCompositor.cpp:
3644         (BlackBerry::WebKit::WebPageCompositor::~WebPageCompositor):
3645         (BlackBerry::WebKit::WebPageCompositor::client):
3646         * Api/WebPageCompositor_p.h:
3647         (BlackBerry::WebKit::WebPageCompositorPrivate::setPage):
3648
3649 2012-05-27  Arvid Nilsson  <anilsson@rim.com>
3650
3651         2012-04-18  Arvid Nilsson  <anilsson@rim.com>
3652
3653         [BlackBerry] BackingStore accesses tiles even though it's not active
3654         https://bugs.webkit.org/show_bug.cgi?id=87563
3655
3656         Reviewed by Antonio Gomes.
3657
3658         There are many scenarios that can call render and cause tile access,
3659         and they used to be rerouted to the direct rendering code when the
3660         backing store was not active. This was thanks to an implicit check for
3661         isActive() by virtue of calling shouldDirectRenderingToWindow() from
3662         render().
3663
3664         If we're using OpenGL for compositing the backing store contents
3665         however, direct rendering is always disabled and we jump right into the
3666         tile based rendering code.
3667
3668         Fixed by adding an explicit check for isActive() in render(), now that
3669         the implicit check in shouldDirectRenderingToWindow() is conditional on
3670         having raster usage.
3671
3672         Since PR136381/bug83131, when OpenGL compositing is used, and the
3673         backing store is not active, it is not in charge of drawing the root
3674         layer. Instead, we switch off the paintingGoesToWindow flag on the root
3675         RenderLayer so no invalidates will reach the ChromeClient or the
3676         BackingStore any more. Instead, invalidations will cause the root
3677         accelerated compositing layer to be repainted. Any BackingStore render
3678         calls while in this state are pointless, and can safely do an early
3679         return.
3680
3681         Reviewed internally by Jakob Petsovits.
3682
3683         PR #150403
3684
3685         * Api/BackingStore.cpp:
3686         (BlackBerry::WebKit::BackingStorePrivate::render):
3687
3688 2012-05-27  Arvid Nilsson  <anilsson@rim.com>
3689
3690         2012-04-12  Arvid Nilsson  <anilsson@rim.com>
3691
3692         [BlackBerry] Web page fails to render after clicking link with target=_blank
3693         https://bugs.webkit.org/show_bug.cgi?id=87562
3694
3695         Reviewed by Antonio Gomes.
3696
3697         Clicking such a link opens a new tab. The compositor was briefly in
3698         charge of drawing the root layer while the backing store was inactive
3699         and the user was looking at the other tab. The problem was that the
3700         compositor believed it was still painting the root layer even after the
3701         backing store became active again. The flag was not properly cleared
3702         when turning off compositing.
3703
3704         Fixed by returning false from drawsRootLayer() if we don't have a root
3705         layer.
3706
3707         Reviewed internally by Filip Spacek.
3708
3709         PR #149342
3710
3711         * Api/WebPageCompositor.cpp:
3712         (BlackBerry::WebKit::WebPageCompositorPrivate::drawsRootLayer):
3713
3714 2012-05-24  Jacky Jiang  <zhajiang@rim.com>
3715
3716         [BlackBerry] History navigation caused google.com scale not kept
3717         https://bugs.webkit.org/show_bug.cgi?id=87438
3718
3719         Reviewed by Antonio Gomes.
3720         Patch by Jacky Jiang <zhajiang@rim.com>
3721
3722         PR: 159923
3723         For back/forward history navigation, we were trying to keep the values
3724         set by dispatchViewportDataDidChange. However, when we went back from
3725         the previous page, if the current page didn't contain the meta viewport
3726         tag, then those values set by previous page would never be reset.
3727         Although the current page could get correct saved scale when restoring
3728         view state, the scale would still be clamped by zoomToFitScale which
3729         was based on the virtual viewport of the previous page which could make
3730         the scale incorrect.
3731         Since we know the viewport arguments of the current document before
3732         setLoadState on back/forward history navigation, we can reset these
3733         previous values if the document doesn't have viewport arguments during
3734         setLoadState.
3735
3736         * Api/WebPage.cpp:
3737         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
3738
3739 2012-05-25  Mary Wu  <mary.wu@torchmobile.com.cn>
3740
3741         [BlackBerry] Pass http headers to loader in download request
3742         https://bugs.webkit.org/show_bug.cgi?id=87449
3743
3744         Reviewed by Rob Buis.
3745
3746         PR# 149283
3747
3748         This is to support byte-range download and we could pass http headers like
3749         "Range" in download request to loader.
3750
3751         Reviewed internally by Lyon Chen.
3752
3753         * Api/WebPage.cpp:
3754         (BlackBerry::WebKit::WebPage::download):
3755
3756 2012-05-24  Mike Fenton  <mifenton@rim.com>
3757
3758         [BlackBerry] InputHandler can hold a ref on an object when document is cleared.
3759         https://bugs.webkit.org/show_bug.cgi?id=87412
3760
3761         Reviewed by Rob Buis.
3762
3763         PR 145234.
3764
3765         When the document data is cleared, notify the InputHandler
3766         of the associated frame being unloaded.
3767
3768         Reviewed Internally by Nima Ghanavatian.
3769
3770         * Api/WebPage.cpp:
3771         (BlackBerry::WebKit::WebPagePrivate::clearDocumentData):
3772
3773 2012-05-24  Crystal Zhang  <haizhang@rim.com>
3774
3775         [BlackBerry] Implement select popup and remove old hook to air popup
3776         https://bugs.webkit.org/show_bug.cgi?id=87419
3777
3778         Reviewed by Rob Buis.
3779
3780         Introduce new html select popup client, remove the old hook to air popup.
3781
3782         * Api/WebPageClient.h:
3783         * WebCoreSupport/SelectPopupClient.cpp: Added.
3784         (WebCore):
3785         (WebCore::SelectPopupClient::SelectPopupClient):
3786         (WebCore::SelectPopupClient::~SelectPopupClient):
3787         (WebCore::SelectPopupClient::update):
3788         (WebCore::SelectPopupClient::generateHTML):
3789         (WebCore::SelectPopupClient::closePopup):
3790         (WebCore::SelectPopupClient::contentSize):
3791         (WebCore::SelectPopupClient::htmlSource):
3792         (WebCore::SelectPopupClient::setValueAndClosePopup):
3793         (WebCore::SelectPopupClient::didClosePopup):
3794         (WebCore::SelectPopupClient::writeDocument):
3795         * WebCoreSupport/SelectPopupClient.h: Added.
3796         (WebKit):
3797         (WebCore):
3798         (SelectPopupClient):
3799         * WebKitSupport/InputHandler.cpp:
3800         (BlackBerry::WebKit::InputHandler::openSelectPopup):
3801         * WebKitSupport/InputHandler.h:
3802         (WebCore):
3803         (InputHandler):
3804         * WebKitSupport/WebPopupType.h: Added.
3805         (BlackBerry):
3806         (WebKit):
3807
3808 2012-05-24  Antonio Gomes  <agomes@rim.com>
3809
3810         Possible missing layout in Iris browser after hiding VKB
3811         https://bugs.webkit.org/show_bug.cgi?id=87408
3812         PR #153056 / MKS_3674963
3813
3814         Reviewed by Adam Treat.
3815
3816         Also informally reviewed by Mike Fenton.
3817
3818         If we are not rotating and we've started a viewport resize with
3819         the Render tree in dirty state (i.e. it needs layout), lets
3820         reset the needsLayout flag for now but set our own 'needsLayout'.
3821
3822         Reason: calls like ScrollView::setFixedLayoutSize can trigger a layout
3823         if the render tree needs it. We want to avoid it till the viewport resize
3824         is actually done (i.e. ScrollView::setViewportSize gets called
3825         further down the method) so we do not get render artifacts.
3826
3827         Since our WebPage::setViewportSize calls rely on async Virtual
3828         Keyboard responses, we were getting it called with the render
3829         tree sometimes in a dirty state, sometimes not. It was flaky!
3830         Patch ensures a clear render tree state, and sets it as dirty
3831         afterwards as needed, so layout happens at the proper time.
3832
3833         * Api/WebPage.cpp:
3834         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
3835
3836 2012-05-24  Mike Fenton  <mifenton@rim.com>
3837
3838         [BlackBerry] Padding adjustment for determining the relative distance for a point was backwards.
3839         https://bugs.webkit.org/show_bug.cgi?id=87404
3840
3841         Reviewed by Rob Buis.
3842
3843         Fix padding calculation for handle adjustment.
3844
3845         Reviewed Internally by Mike Lattanzio.
3846
3847         * WebKitSupport/SelectionHandler.cpp:
3848         (BlackBerry::WebKit::directionOfPointRelativeToRect):
3849
3850 2012-05-24  Mike Fenton  <mifenton@rim.com>
3851
3852         [BlackBerry] Remove unused API function touchEventCancelAndClearFocusedNode.
3853         https://bugs.webkit.org/show_bug.cgi?id=87379
3854
3855         Reviewed by Antonio Gomes.
3856
3857         Remove unused API, touchEventCancelAndClearFocusedNode.
3858
3859         Reviewed Internally by Gen Mak.
3860
3861         * Api/WebPage.cpp:
3862         * Api/WebPage.h:
3863         * WebKitSupport/TouchEventHandler.cpp:
3864         * WebKitSupport/TouchEventHandler.h:
3865         (TouchEventHandler):
3866
3867 2012-05-23  Genevieve Mak  <gmak@rim.com>
3868
3869         Remove minimum and maximum scroll position as they are no
3870         longer required due to changes in ScrollViewBase.
3871         https://bugs.webkit.org/show_bug.cgi?id=87298
3872
3873         Reviewed by Antonio Gomes.
3874
3875         * WebKitSupport/InRegionScrollableArea.cpp:
3876         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
3877         * WebKitSupport/InRegionScrollableArea.h:
3878         (InRegionScrollableArea):
3879
3880 2012-05-22  Chris Guan  <chris.guan@torchmobile.com.cn>
3881
3882         [Blackberry]Pages contain video or audio tags should be in pageCache
3883         https://bugs.webkit.org/show_bug.cgi?id=87116
3884
3885         Reviewed by George Staikos.
3886         
3887         There is not any reason to disable pageCache for video/audio 
3888         tags probably. By my testing, Back and Forward are working for 
3889         those pages contain video and audio tags.
3890
3891         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
3892         (WebCore::FrameLoaderClientBlackBerry::canCachePage):
3893
3894 2012-05-22  Konrad Piascik  <kpaiscik@rim.com>
3895
3896         [BlackBerry] Remove unused/unimplemented methods from InspectorClientBlackberry
3897         https://bugs.webkit.org/show_bug.cgi?id=87125
3898
3899         Reviewed by Rob Buis.
3900
3901         Removed unimplemented methods that are no longer part of InspectorClient and added
3902         a new stub for InspectorStateClient::updateInspectorStateCookie
3903
3904         * WebCoreSupport/InspectorClientBlackBerry.cpp:
3905         (WebCore::InspectorClientBlackBerry::updateInspectorStateCookie):
3906         (WebCore):
3907         * WebCoreSupport/InspectorClientBlackBerry.h:
3908         (InspectorClientBlackBerry):
3909
3910 2012-05-18  Mike Fenton  <mifenton@rim.com>
3911
3912         [BlackBerry] Validation of Last Fat Finger result is needed for selection.
3913         https://bugs.webkit.org/show_bug.cgi?id=86888
3914
3915         Reviewed by Antonio Gomes.
3916
3917         PR 128393.
3918
3919         Cached FatFingersResults must be validatible against
3920         the desired request to ensure the result is both for
3921         the same point and of the same type.
3922
3923         * WebKitSupport/FatFingers.h:
3924         (WebKit):
3925         (FatFingersResult):
3926         (BlackBerry::WebKit::FatFingersResult::FatFingersResult):
3927         (BlackBerry::WebKit::FatFingersResult::reset):
3928         (BlackBerry::WebKit::FatFingersResult::resultMatches):
3929         (BlackBerry::WebKit::FatFingersResult::originPosition):
3930         (BlackBerry::WebKit::FatFingersResult::adjustedPosition):
3931         (BlackBerry::WebKit::FatFingersResult::positionWasAdjusted):
3932         (BlackBerry::WebKit::FatFingersResult::isTextInput):
3933         (BlackBerry::WebKit::FatFingersResult::isValid):
3934         (BlackBerry::WebKit::FatFingersResult::node):
3935         (BlackBerry::WebKit::FatFingersResult::nodeAsElementIfApplicable):
3936         * WebKitSupport/SelectionHandler.cpp:
3937         (BlackBerry::WebKit::SelectionHandler::selectAtPoint):
3938
3939 2012-05-18  MORITA Hajime  <morrita@google.com>
3940
3941         https://bugs.webkit.org/show_bug.cgi?id=85515
3942         Stale frame in WebCore::SpellChecker::didCheckSucceeded
3943
3944         Reviewed by Ryosuke Niwa.
3945
3946         * WebCoreSupport/EditorClientBlackBerry.h:
3947         (WebCore::EditorClientBlackBerry::frameWillDetachPage):
3948
3949 2012-05-17  Jacky Jiang  <zhajiang@rim.com>
3950
3951         [BlackBerry] www.thestar.com/iphone Viewport Weirdness
3952         https://bugs.webkit.org/show_bug.cgi?id=86756
3953
3954         Reviewed by George Staikos.
3955
3956         PR 156710
3957         On high DPI devices, the virtual viewport size of this page was smaller
3958         than screen size. During the refreshing of the page, we reset the scale
3959         when the state was Committed, then layouted and rendered contents based
3960         on the virtual viewport size and default scale 1, which caused a small
3961         size thumbnail before we restored the previous view state.
3962         Fixed it by keeping the previous scale, user scalable and
3963         m_userViewportArguments during the Committed state of refreshing.
3964
3965         * Api/WebPage.cpp:
3966         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
3967
3968 2012-05-17  Mike Fenton  <mifenton@rim.com>
3969
3970         [BlackBerry] Cleanup headers in SelectionHandler.cpp
3971         https://bugs.webkit.org/show_bug.cgi?id=86760
3972
3973         Reviewed by Antonio Gomes.
3974
3975         Clean up includes in SelectionHandler.cpp.
3976
3977         * WebKitSupport/SelectionHandler.cpp:
3978
3979 2012-05-17  Mike Fenton  <mifenton@rim.com>
3980
3981         [BlackBerry] expandSelectionToGranularity should only use VisibleSelection and not range.
3982         https://bugs.webkit.org/show_bug.cgi?id=86759
3983
3984         Reviewed by Antonio Gomes.
3985
3986         expandSelectionToGranularity unnecesarily converted the
3987         selection to range and back. Using the selection
3988         directly is preferred.
3989
3990         * WebKitSupport/SelectionHandler.cpp:
3991         (BlackBerry::WebKit::expandSelectionToGranularity):
3992
3993 2012-05-17  Hironori Bono  <hbono@chromium.org>
3994
3995         [Refactoring] Move platform-specific code in Editor::respondToChangedSelection to the WebKit layer
3996         https://bugs.webkit.org/show_bug.cgi?id=86591
3997
3998         Reviewed by Ryosuke Niwa.
3999
4000         This change adds a TextCheckerClient::shouldEraseMarkersAfterChangeSelection
4001         function to remove platform-specific code from Editor::respondToChangedSelection
4002         function.
4003
4004         No new tests, no change in behavior.
4005
4006         * WebCoreSupport/EditorClientBlackBerry.cpp:
4007         (WebCore::EditorClientBlackBerry::shouldEraseMarkersAfterChangeSelection):
4008         (WebCore):
4009         * WebCoreSupport/EditorClientBlackBerry.h:
4010         (EditorClientBlackBerry):
4011
4012 2012-05-17  Mike Fenton  <mifenton@rim.com>
4013
4014         [BlackBerry] Build fix, SelectionHandler extra debug logs
4015         https://bugs.webkit.org/show_bug.cgi?id=86743
4016
4017         Reviewed by Antonio Gomes.
4018
4019         Add include for BlackBerryPlatformLog to SelectionHandler.cpp
4020
4021
4022         * WebKitSupport/SelectionHandler.cpp:
4023
4024 2012-05-16  Yongxin Dai  <yodai@rim.com>
4025
4026         [BlackBerry] The FCC shows up on an empty input field
4027         https://bugs.webkit.org/show_bug.cgi?id=86657
4028
4029         Reviewed by Antonio Gomes.
4030
4031         Turn off the caret by sending a caret changed notification with empty caret.
4032         PR #120620
4033
4034         Reviewed Internally by Mike Fenton.
4035
4036         * WebKitSupport/SelectionHandler.cpp:
4037         (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
4038
4039 2012-05-16  Eli Fidler  <efidler@rim.com>
4040
4041         [BlackBerry] Don't reset the default font families in WebSettings
4042         https://bugs.webkit.org/show_bug.cgi?id=86660
4043
4044         Reviewed by Rob Buis.
4045
4046         PR 152467
4047         The default families are also set definitively in WebCore/page/blackberry/SettingsBlackBerry.cpp
4048
4049         * Api/WebSettings.cpp:
4050         (BlackBerry::WebKit::WebSettings::standardSettings):
4051
4052 2012-05-16  Genevieve Mak  <gmak@rim.com>
4053
4054         Add missing include that was causing build errors.
4055         https://bugs.webkit.org/show_bug.cgi?id=86502
4056
4057         Reviewed by Rob Buis.
4058         Reviewed Internally by Liam Quinn.
4059
4060         * WebKitSupport/InputHandler.cpp:
4061
4062 2012-05-15  Chris Guan  <chris.guan@torchmobile.com.cn>
4063
4064         [BlackBerry] Enhance an API of BackingStore::drawContents
4065         https://bugs.webkit.org/show_bug.cgi?id=86447
4066
4067         Reviewed by George Staikos.
4068
4069         Enhance the current APIs by adding parameters of id and destination
4070         contentSize, because chrome browser may want different contents from
4071         the same webview at different times.
4072
4073         * Api/BackingStore.cpp:
4074         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
4075         (BlackBerry::WebKit::BackingStore::drawContents):
4076         * Api/BackingStore.h:
4077         * Api/BackingStore_p.h:
4078         (BackingStorePrivate):
4079
4080 2012-05-15  Max Feil  <mfeil@rim.com>
4081
4082         [BlackBerry] Enable the Fullscreen API
4083         https://bugs.webkit.org/show_bug.cgi?id=86129
4084
4085         Reviewed by Antonio Gomes.
4086
4087         This patch enables the new document-based Fullscreen API.
4088         The ENABLE(FULLSCREEN_API) is already enabled in the
4089         BlackBerry WebKit build. My patch turns fullscreen on
4090         in the page settings by default and implements the missing
4091         ChromeClientBlackBerry::{supports,enter,exit}FullScreenForElement()
4092         member functions. I am also plumbing through the existing
4093         "fullScreenVideoCapable" that QNXStageWebView has always been
4094         sending to allow the presence of a native fullscreen video player
4095         to be checked.
4096
4097         * Api/WebPage.cpp:
4098         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
4099         * Api/WebSettings.cpp:
4100         (WebKit):
4101         (BlackBerry::WebKit::WebSettings::standardSettings):
4102         (BlackBerry::WebKit::WebSettings::fullScreenVideoCapable):
4103         (BlackBerry::WebKit::WebSettings::setFullScreenVideoCapable):
4104         * Api/WebSettings.h:
4105         * WebCoreSupport/ChromeClientBlackBerry.cpp:
4106         (WebCore):
4107         (WebCore::ChromeClientBlackBerry::supportsFullScreenForElement):
4108         (WebCore::ChromeClientBlackBerry::enterFullScreenForElement):
4109         (WebCore::ChromeClientBlackBerry::exitFullScreenForElement):
4110         * WebCoreSupport/ChromeClientBlackBerry.h:
4111         (ChromeClientBlackBerry):
4112
4113 2012-05-15  Hanna Ma  <Hanma@rim.com>
4114
4115         [BlackBerry] adding a functionality for web inspector to inspect current selected element
4116         https://bugs.webkit.org/show_bug.cgi?id=86394
4117
4118         Reviewed by Rob Buis.
4119
4120         Add a way to trigger the remote web inspector on selected element.
4121
4122         * Api/WebPage.cpp:
4123         (BlackBerry::WebKit::WebPage::inspectCurrentContextElement):
4124         (WebKit):
4125         * Api/WebPage.h:
4126
4127 2012-05-14  Jacky Jiang  <zhajiang@rim.com>
4128
4129         [BlackBerry] ASSERT failure in FrameView::paintContents when refleshing www.thestar.com/iphone
4130         https://bugs.webkit.org/show_bug.cgi?id=86391
4131
4132         Reviewed by Adam Treat.
4133
4134         PR 156992
4135         Request layout first if needed before painting contents.
4136
4137         * Api/BackingStore.cpp:
4138         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
4139
4140 2012-05-10  Mike Fenton  <mifenton@rim.com>
4141
4142         Caret node boundary should be adjusted to account for the visible region.
4143         https://bugs.webkit.org/show_bug.cgi?id=86116
4144
4145         Reviewed by Antonio Gomes.
4146
4147         PR 138988.
4148
4149         Update the node bounding box to be clipped and adjusted
4150         for the visible region of the frame.
4151
4152         Reviewed Internally by Gen Mak.
4153
4154         * WebKitSupport/SelectionHandler.cpp:
4155         (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
4156
4157 2012-05-10  Antonio Gomes  <agomes@rim.com>
4158
4159         [BlackBerry] Assertions and assumptions in BackingStoreClient around m_frame and m_frame->view() are invalid
4160         https://bugs.webkit.org/show_bug.cgi?id=86096
4161
4162         Reviewed by Rob Buis.
4163
4164         A Frame's FrameView has always to be checked since it is
4165         a volatile object, and gets created and destroyed all the time.
4166
4167         We have been facing a particular issue, where during our automated
4168         interaction tests, the main frame object was being pinch zoomed in
4169         the middle of it creation, and WebKit thread was blocked by a mutex.
4170         In practice, it is a case that would not be possible in a real
4171         world scenario, but shows that the ASSERTs are bogus regardless.
4172
4173         * WebKitSupport/BackingStoreClient.cpp:
4174         (BlackBerry::WebKit::BackingStoreClient::scrollPosition):
4175         (BlackBerry::WebKit::BackingStoreClient::setScrollPosition):
4176         (BlackBerry::WebKit::BackingStoreClient::maximumScrollPosition):
4177         (BlackBerry::WebKit::BackingStoreClient::viewportSize):
4178         (BlackBerry::WebKit::BackingStoreClient::transformedViewportSize):
4179         (BlackBerry::WebKit::BackingStoreClient::visibleContentsRect):
4180         (BlackBerry::WebKit::BackingStoreClient::contentsSize):
4181
4182 2012-05-09  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
4183
4184         [BlackBerry] Autofill feature implementation for BlackBerry porting
4185         https://bugs.webkit.org/show_bug.cgi?id=85577
4186
4187         Reviewed by Rob Buis.
4188
4189         * Api/WebPage.cpp:
4190         (BlackBerry::WebKit::WebPage::autofillTextField): Added this interface
4191         function to auto fill the inputting text field when user selects
4192         a autofill candidate value from autofill context dialog.
4193         (WebKit):
4194         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
4195         (BlackBerry::WebKit::WebPagePrivate::notifyPopupAutofillDialog): Added
4196         this interface function to notify WebPageClient to pop up the autofill
4197         context dialog with the suggested input items.
4198         (BlackBerry::WebKit::WebPage::clearAutofillData):
4199         * Api/WebPage.h:
4200         * Api/WebPageClient.h:
4201         * Api/WebPage_p.h:
4202         (WebCore):
4203         (WebPagePrivate):
4204         * WebCoreSupport/AutofillManager.cpp:
4205         (WebCore::AutofillManager::didChangeInTextField):
4206         * WebCoreSupport/EditorClientBlackBerry.cpp:
4207         (WebCore::EditorClientBlackBerry::textDidChangeInTextField): Implemented
4208         this function to listen to the notification of text field change, and
4209         notify AutofillManager to handle the autofill.
4210         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
4211         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSubmitForm):
4212         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendSubmitEvent):
4213         Save the name and value pair of every autofillable input text field when
4214         user submitting a form.
4215
4216 2012-05-09  Crystal Zhang  <haizhang@rim.com>
4217
4218         [BlackBerry] Enable PAGE_POPUP in make file, and implement required methods
4219         https://bugs.webkit.org/show_bug.cgi?id=85907
4220
4221         Reviewed by Rob Buis.
4222
4223         Internal reviewed by Yong Li.
4224
4225         Enable PAGE_POPUP so we can use WebCore::PagePopup and WebCore::PagePopupClient interface.
4226         Implement virtual methods in WebCore::ChromeClientBlackBerry that required for the 
4227         implementation and add methods in WebKit::WebPage that needed for PagePopupClient.
4228
4229         * Api/WebPage.cpp:
4230         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
4231         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
4232         (BlackBerry::WebKit::WebPage::initPopupWebView):
4233         (WebKit):
4234         (BlackBerry::WebKit::WebPage::popupOpened):
4235         (BlackBerry::WebKit::WebPage::popupClosed):
4236         (BlackBerry::WebKit::WebPage::hasOpenedPopup):
4237         (BlackBerry::WebKit::WebPage::popup):
4238         (BlackBerry::WebKit::WebPagePrivate::setParentPopup):
4239         * Api/WebPage.h:
4240         (WebCore):
4241         * Api/WebPage_p.h:
4242         (WebCore):
4243         (WebPagePrivate):
4244         * WebCoreSupport/ChromeClientBlackBerry.cpp:
4245         (WebCore::ChromeClientBlackBerry::hasOpenedPopup):
4246         (WebCore::ChromeClientBlackBerry::openPagePopup):
4247         (WebCore):
4248         (WebCore::ChromeClientBlackBerry::closePagePopup):
4249         * WebCoreSupport/ChromeClientBlackBerry.h:
4250         (WebCore):
4251         (ChromeClientBlackBerry):
4252
4253 2012-05-08  Jason Liu  <jason.liu@torchmobile.com.cn>
4254
4255         [BlackBerry] Auth credentials set in private mode are reused in public mode.
4256         https://bugs.webkit.org/show_bug.cgi?id=84697
4257
4258         Reviewed by Rob Buis.
4259
4260         Add setPrivateMode function for CredentialStorage.
4261
4262         We have to change Private Browsing to test, so have to write a manual test case.
4263         Test: ManualTests/blackberry/http-auth-private-mode-changed.html
4264
4265         * Api/WebPage.cpp:
4266         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
4267
4268 2012-05-08  Crystal Zhang  <haizhang@rim.com>
4269     
4270             [BlackBerry] Implement a popup client for HTML controls
4271             https://bugs.webkit.org/show_bug.cgi?id=85670
4272     
4273             Reviewed by Rob Buis.
4274     
4275             Implement a popup client for HTML controls, which would be used to load
4276             different popups according to popup type.
4277     
4278             * WebCoreSupport/PagePopupBlackBerry.cpp: Added.
4279             (WebCore):
4280             (PagePopupChromeClient):
4281             (WebCore::PagePopupChromeClient::PagePopupChromeClient):
4282             (WebCore::PagePopupChromeClient::closeWindowSoon):
4283             (WebCore::PagePopupChromeClient::webPage):
4284             (WebCore::PagePopupBlackBerry::PagePopupBlackBerry):
4285             (WebCore::PagePopupBlackBerry::~PagePopupBlackBerry):
4286             (WebCore::PagePopupBlackBerry::sendCreatePopupWebViewRequest):
4287             (WebCore::PagePopupBlackBerry::init):
4288             (WebCore::setValueAndClosePopupCallback):
4289             (WebCore::popUpExtensionInitialize):
4290             (WebCore::popUpExtensionFinalize):
4291             (WebCore::PagePopupBlackBerry::installDomFunction):
4292             (WebCore::PagePopupBlackBerry::handleMouseEvent):
4293             (WebCore::PagePopupBlackBerry::closePopup):
4294             (WebCore::PagePopupBlackBerry::closeWebPage):
4295             * WebCoreSupport/PagePopupBlackBerry.h: Added.
4296             (WebKit):
4297             (WebCore):
4298             (PagePopupBlackBerry):
4299
4300 2012-05-08  Andrew Lo  <anlo@rim.com>
4301
4302         [BlackBerry] Over-scroll image should be tiled
4303         https://bugs.webkit.org/show_bug.cgi?id=85860
4304
4305         Reviewed by Rob Buis.
4306
4307         Implement tiling for over-scroll image if image dimension don't match
4308         the surface dimensions.
4309
4310         * Api/BackingStore.cpp:
4311         (WebKit):
4312         (BlackBerry::WebKit::BackingStorePrivate::ensureOverScrollImage):
4313         (BlackBerry::WebKit::BackingStorePrivate::paintDefaultBackground):
4314         * Api/BackingStore_p.h:
4315         (BackingStorePrivate):
4316
4317 2012-05-08  Chris Guan  <chris.guan@torchmobile.com.cn>
4318
4319         [Blackberry] remove m_isRequestedByPlugin in ResourceRequest
4320         https://bugs.webkit.org/show_bug.cgi?id=84559
4321
4322         Reviewed by Antonio Gomes.
4323
4324         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
4325         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNewWindowAction):
4326
4327 2012-05-08  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
4328
4329         [BlackBerry] AutofillManager implementation upstream
4330         https://bugs.webkit.org/show_bug.cgi?id=85576
4331
4332         Reviewed by Rob Buis.
4333
4334         RIM PR: 136405
4335         Implemented class AutofillManager to handle the form autofill
4336         interactions.
4337         It listens to text changed notification from text input, searches
4338         autofill database for the suggested autofill candidate value,
4339         and notifies WebPageClient to pop up a context dialog for user;
4340         it also responds to user's choice by autofilling the text input.
4341
4342         * WebCoreSupport/AutofillManager.cpp: Added.
4343         (WebCore):
4344         (WebCore::AutofillManager::create):
4345         (WebCore::AutofillManager::didChangeInTextField):
4346         (WebCore::AutofillManager::autofillTextField):
4347         (WebCore::AutofillManager::saveTextFields):
4348         (WebCore::AutofillManager::clear):
4349         * WebCoreSupport/AutofillManager.h: Added.
4350         (WTF):
4351         (WebKit):
4352         (WebCore):
4353         (AutofillManager):
4354         (WebCore::AutofillManager::m_element):
4355
4356 2012-05-07  Andrew Lo  <anlo@rim.com>
4357
4358         [BlackBerry] Delete previous buffer when new over-scroll image path is set
4359         https://bugs.webkit.org/show_bug.cgi?id=85812
4360
4361         Reviewed by Rob Buis.
4362
4363         When a new over-scroll image path is set, delete old buffer before creating
4364         a new one.
4365
4366         * Api/BackingStore.cpp:
4367         (BlackBerry::WebKit::BackingStorePrivate::ensureOverScrollImage):
4368
4369 2012-05-07  Andrew Lo  <anlo@rim.com>
4370
4371         [BlackBerry] Over-scroll image path property should be relative to local application directory
4372         https://bugs.webkit.org/show_bug.cgi?id=85814
4373
4374         Reviewed by Rob Buis.
4375
4376         Over-scroll image path web setting should be relative to the local directory.
4377
4378         * Api/BackingStore.cpp:
4379         (BlackBerry::WebKit::BackingStorePrivate::ensureOverScrollImage):
4380
4381 2012-05-07  Crystal Zhang  <haizhang@rim.com>
4382
4383         [BlackBerry] Add methods need by client side
4384         https://bugs.webkit.org/show_bug.cgi?id=85661
4385
4386         Reviewed by Antonio Gomes.
4387
4388         Add methods needed by client side when create and close HTML popup dialogs.
4389         PR 154360
4390
4391         * Api/WebPageClient.h:
4392
4393 2012-05-06  Mary Wu  <mary.wu@torchmobile.com.cn>
4394
4395         [BlackBerry] Support html5 download attribute.
4396         https://bugs.webkit.org/show_bug.cgi?id=85044
4397
4398         Reviewed by Antonio Gomes.
4399
4400         If a link has download attribute, we should pass that value and be able to
4401         save file with the name according to HTML5:
4402         http://updates.html5rocks.com/2011/08/Downloading-resources-in-HTML5-a-download
4403
4404         * Api/WebPage.cpp:
4405         (BlackBerry::WebKit::WebPagePrivate::load):
4406         (BlackBerry::WebKit::WebPage::download):
4407         * Api/WebPage_p.h:
4408         (WebPagePrivate):
4409         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
4410         (WebCore::FrameLoaderClientBlackBerry::startDownload):
4411
4412 2012-05-06  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
4413
4414         [BlackBerry] Autofill backing store implementation upstream
4415         https://bugs.webkit.org/show_bug.cgi?id=85575
4416
4417         Reviewed by Rob Buis.
4418
4419         Replaced calling static function CredentialBackingStore::instance()
4420         with calling the helper function credentialBackingStore().
4421
4422         * WebCoreSupport/CredentialManager.cpp:
4423         (WebCore::CredentialManager::autofillAuthenticationChallenge):
4424         (WebCore::CredentialManager::autofillPasswordForms):
4425         (WebCore::CredentialManager::saveCredentialIfConfirmed):
4426         (WebCore::CredentialManager::clearCredentials):
4427         (WebCore::CredentialManager::clearNeverRememberSites):
4428
4429 2012-05-06  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
4430
4431         [BlackBerry] Enable credential persistance and auto fill
4432         https://bugs.webkit.org/show_bug.cgi?id=85572
4433
4434         Reviewed by Rob Buis.
4435
4436         Set autofilled status of credential input fields when credential
4437         information is auto filled by CredentialManager.
4438         By doing this the input element will get painted with yellow background
4439         which can notify user this input field is auto filled by the browser.
4440
4441         No behavior changes, so no new test.
4442
4443         * WebCoreSupport/CredentialTransformData.cpp:
4444         (WebCore::CredentialTransformData::setCredential):
4445
4446 2012-05-04  Andrew Lo  <anlo@rim.com>
4447
4448         [Blackberry] Implement over-scroll background image
4449         https://bugs.webkit.org/show_bug.cgi?id=85538
4450
4451         Reviewed by Rob Buis.
4452
4453         Use over-scroll image when set instead of the solid colour.
4454         Internal PR146652
4455
4456         * Api/BackingStore.cpp:
4457         (WebKit):
4458         (BlackBerry::WebKit::BackingStorePrivate::ensureOverScrollImage):
4459         (BlackBerry::WebKit::BackingStorePrivate::paintDefaultBackground):
4460         * Api/BackingStore_p.h:
4461         (BackingStorePrivate):
4462         * Api/WebSettings.cpp:
4463         (WebKit):
4464         (BlackBerry::WebKit::WebSettings::standardSettings):
4465         (BlackBerry::WebKit::WebSettings::overScrollImagePath):
4466         (BlackBerry::WebKit::WebSettings::setOverScrollImagePath):
4467         * Api/WebSettings.h:
4468
4469 2012-05-04  Rob Buis  <rbuis@rim.com>
4470
4471         [BlackBerry] Rendering bmp file as text file when Content-Type:image/x-ms-bmp from apache web server.
4472         https://bugs.webkit.org/show_bug.cgi?id=85036
4473
4474         Reviewed by Antonio Gomes.
4475
4476         Move getNormalizedMIMEType into WebCore::MIMETypeRegistry.
4477
4478         * Api/WebSettings.cpp:
4479         (WebKit):
4480         (BlackBerry::WebKit::WebSettings::isSupportedObjectMIMEType):
4481         * Api/WebSettings.h:
4482         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
4483         (WebCore::FrameLoaderClientBlackBerry::createPlugin):
4484         (WebCore::FrameLoaderClientBlackBerry::canShowMIMEType):
4485         (WebCore::FrameLoaderClientBlackBerry::objectContentType):
4486
4487 2012-05-04  Nate Chapin  <japhet@chromium.org>
4488
4489         Don't require FrameLoaderClient to manufacture a commitData() call for empty documents.
4490         https://bugs.webkit.org/show_bug.cgi?id=85533
4491
4492         Reviewed by Alexey Proskuryakov.
4493
4494         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
4495         (WebCore::FrameLoaderClientBlackBerry::finishedLoading):
4496
4497 2012-05-04  Sheriff Bot  <webkit.review.bot@gmail.com>
4498
4499         Unreviewed, rolling out r116085, r116091, and r116095.
4500         http://trac.webkit.org/changeset/116085
4501         http://trac.webkit.org/changeset/116091
4502         http://trac.webkit.org/changeset/116095
4503         https://bugs.webkit.org/show_bug.cgi?id=85628
4504
4505         We are not ready with dependencies on all platform yet (mac) +
4506         problems with debug builds. (Requested by Zoltan on #webkit).
4507
4508         * WebCoreSupport/AboutDataEnableFeatures.in:
4509
4510 2012-05-04  Zoltan Horvath  <zoltan@webkit.org>
4511
4512         [Qt] Set WebCore imagedecoders as default and add fallback to QImageDecoder
4513         https://bugs.webkit.org/show_bug.cgi?id=80400
4514
4515         Get rid off QT_IMAGE_DECODER flag.
4516
4517         Reviewed by Simon Hausmann.
4518
4519         * WebCoreSupport/AboutDataEnableFeatures.in:
4520
4521 2012-05-03  Fady Samuel  <fsamuel@chromium.org>
4522
4523         Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport
4524         https://bugs.webkit.org/show_bug.cgi?id=70609
4525
4526         Reviewed by Kenneth Rohde Christiansen.
4527
4528         * WebKitSupport/DumpRenderTreeSupport.cpp:
4529         (DumpRenderTreeSupport::dumpConfigurationForViewport):
4530
4531 2012-05-03  Mike Fenton  <mifenton@rim.com>
4532
4533         [BlackBerry] Add special attribute for alternate selection touch handling.
4534         https://bugs.webkit.org/show_bug.cgi?id=85284
4535
4536         Reviewed by Rob Buis.
4537
4538         Rename the custom attribute and make it a data- attribute.
4539
4540         * WebKitSupport/SelectionHandler.cpp:
4541         (BlackBerry::WebKit::SelectionHandler::inputNodeOverridesTouch):
4542
4543 2012-04-18  Jon Honeycutt  <jhoneycutt@apple.com>
4544
4545         FrameLoaderClient::dispatchWillSendSubmitEvent() should be given more
4546         information about the form being submitted
4547         https://bugs.webkit.org/show_bug.cgi?id=84297
4548
4549         Reviewed by Andy Estes.
4550
4551         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
4552         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendSubmitEvent):
4553         Updated to use the FormState.
4554
4555         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
4556         (FrameLoaderClientBlackBerry):
4557         Updated method declaration.
4558
4559 2012-05-02  Jacky Jiang  <zhajiang@rim.com>
4560
4561         [BlackBerry] Double tap zooming does nothing on small size table
4562         https://bugs.webkit.org/show_bug.cgi?id=85383
4563
4564         Reviewed by George Staikos.
4565
4566         PR: 153232
4567         When we search the best node for block zoom, if the initial node's new
4568         scale exceeds the maximum block zoom scale, we will try to walk through
4569         it's ancestors and pick the acceptable one. But the reality is that the
4570         acceptable ancestor's size can be too close to the size of the actual
4571         contents, we will do nothing for it. As we will still select the
4572         minimum of the new scale and the maximum block zoom scale as block zoom
4573         scale, we can ignore such kind of node and use the initial node instead.
4574
4575         * Api/WebPage.cpp:
4576         (BlackBerry::WebKit::WebPagePrivate::adjustedBlockZoomNodeForZoomLimits):
4577
4578 2012-05-01  Mike Fenton  <mifenton@rim.com>
4579
4580         Add special attribute for alternate selection touch handling.
4581         https://bugs.webkit.org/show_bug.cgi?id=85284
4582
4583         Reviewed by Antonio Gomes.
4584
4585         PR 152975.
4586
4587         Add attribute -bb-selection-touchoverride to override
4588         touch handling on selection overlay.
4589
4590         Reviewed Internally by Gen Mak.
4591
4592         * Api/WebPageClient.h:
4593         * WebKitSupport/SelectionHandler.cpp:
4594         (BlackBerry::WebKit::SelectionHandler::inputNodeOverridesTouch):
4595         (WebKit):
4596         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
4597         * WebKitSupport/SelectionHandler.h:
4598         (SelectionHandler):
4599
4600 2012-04-30  Benjamin Poulain  <benjamin@webkit.org>
4601
4602         Add String::startsWith() and endsWith() for string literals
4603         https://bugs.webkit.org/show_bug.cgi?id=85154
4604
4605         Reviewed by Darin Adler.
4606
4607         * WebKitSupport/DOMSupport.cpp:
4608         (BlackBerry::WebKit::DOMSupport::elementPatternMatches):
4609
4610 2012-04-27  Jacky Jiang  <zhajiang@rim.com>
4611
4612         [BlackBerry] Double tap zooming does nothing on table element on bustedtees.com
4613         https://bugs.webkit.org/show_bug.cgi?id=85104
4614
4615         Reviewed by George Staikos.
4616
4617         PR: 147006
4618         This was caused by the incorrect fix master_33/SHA:612caec4.
4619         Calculations like this "originalArea / pageArea" would always return 0
4620         so that the incorrect node and blockRect were used by block zoom. This
4621         patch takes care of it.
4622
4623         * Api/WebPage.cpp:
4624         (BlackBerry::WebKit::WebPagePrivate::blockZoomRectForNode):
4625         (BlackBerry::WebKit::WebPage::blockZoom):
4626
4627 2012-04-27  Nima Ghanavatian  <nghanavatian@rim.com>
4628
4629         [BlackBerry] Improve log output in InputHandler.cpp
4630         https://bugs.webkit.org/show_bug.cgi?id=85007
4631
4632         Reviewed by Antonio Gomes.
4633
4634         PR 138292
4635         Improving logging in InputHandler.
4636         In setText we had an early return which wasn't being captured.
4637         Also, cleaning up the output to make it more clear and descriptive.
4638
4639         Internally reviewed by Mike Fenton.
4640
4641         * WebKitSupport/InputHandler.cpp:
4642         (BlackBerry::WebKit::InputHandler::learnText):
4643         (BlackBerry::WebKit::InputHandler::enableInputMode):
4644         (BlackBerry::WebKit::InputHandler::setText):
4645
4646 2012-04-27  Chris Guan  <chris.guan@torchmobile.com.cn>
4647
4648         [Blackberry] remove redundant returns
4649         https://bugs.webkit.org/show_bug.cgi?id=85033
4650
4651         Reviewed by Antonio Gomes.
4652
4653         Remove two redundant returns which were added by accident.
4654
4655         No new test cases, because no behaviour has changed.
4656
4657         * Api/WebPage.cpp:
4658         (BlackBerry::WebKit::WebPage::setSelection):
4659         (BlackBerry::WebKit::WebPage::setCaretPosition):
4660
4661 2012-04-27  Andy Chen  <andchen@rim.com>
4662
4663         [BlackBerry] Find-in-page fails to deactivate the old active match when moving backwards
4664         https://bugs.webkit.org/show_bug.cgi?id=84892
4665
4666         Reviewed by Antonio Gomes.
4667
4668         Find in page fails to deactivate the old active match when moving backwards
4669         because searchStartingPoint was incorrectly initialized.
4670         Create a real range object instead of referencing other range object.
4671         PR 152009
4672
4673         Internally reviewed by Yongxin Dai.
4674
4675         * WebKitSupport/InPageSearchManager.cpp:
4676         (BlackBerry::WebKit::InPageSearchManager::findNextString):
4677
4678 2012-04-26  Yong Li  <yoli@rim.com>
4679
4680         [BlackBerry] A quick fix to the previous patch r115245.
4681         https://bugs.webkit.org/show_bug.cgi?id=84862
4682
4683         Reviewed by Antonio Gomes.
4684
4685         Fix an obvious bug in previous patch: DeferredTaskLoadManualScript
4686         was using a wrong flag.
4687
4688         * Api/WebPage.cpp:
4689         * Api/WebPage_p.h:
4690         (WebPagePrivate):
4691
4692 2012-04-25  Chris Guan  <chris.guan@torchmobile.com.cn>
4693
4694         [Blackberry] add a new function in BackingStore
4695         https://bugs.webkit.org/show_bug.cgi?id=84818
4696
4697         Reviewed by Antonio Gomes.
4698
4699         Adding two functions in BackingStorePrivate and
4700         BackingStore, which could render out webpage contents
4701         into BlackBerry::Platform::Graphics::Drawable.
4702
4703         * Api/BackingStore.cpp:
4704         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
4705         (WebKit):
4706         (BlackBerry::WebKit::BackingStore::drawContents):
4707         * Api/BackingStore.h:
4708         * Api/BackingStore_p.h:
4709         (BackingStorePrivate):
4710
4711 2012-04-25  Charles Wei  <charles.wei@torchmobile.com.cn>
4712
4713         [BlackBerry] Input Range element expects mouse events
4714         https://bugs.webkit.org/show_bug.cgi?id=84571
4715
4716         Reviewed by Antonio Gomes.
4717
4718         This just cleans up the code a bit to make it less code and more readable.
4719         * WebKitSupport/TouchEventHandler.cpp:
4720         (BlackBerry::WebKit::shouldConvertTouchToMouse):
4721         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
4722         (BlackBerry::WebKit::TouchEventHandler::spellCheck):
4723
4724 2012-04-25  Yong Li  <yoli@rim.com>
4725
4726         [BlackBerry] Possible JS re-entrancy caused by UI events.
4727         https://bugs.webkit.org/show_bug.cgi?id=84862
4728
4729         Reviewed by Antonio Gomes.
4730
4731         1. block UI events when running in nested event loop
4732         2. defer some tasks we still want to perform when it is safe to do,
4733            with cached data.
4734         3. deferred task can be cancelled by clearing the flag. duplicate tasks
4735            is not a problem because they share same flag and data.
4736         4. move deferred manual script from FrameLoaderClientBlackBerry to WebPagePrivate
4737            and make it a deferred task
4738
4739         * Api/WebPage.cpp:
4740         (WebKit):
4741         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
4742         (BlackBerry::WebKit::WebPagePrivate::load):
4743         (BlackBerry::WebKit::WebPagePrivate::stopCurrentLoad):
4744         (BlackBerry::WebKit::WebPagePrivate::willDeferLoading):
4745         (BlackBerry::WebKit::WebPagePrivate::didResumeLoading):
4746         (BlackBerry::WebKit::WebPagePrivate::deferredTasksTimerFired):
4747         (BlackBerry::WebKit::WebPage::assignFocus):
4748         (BlackBerry::WebKit::WebPagePrivate::setPageVisibilityState):
4749         (BlackBerry::WebKit::WebPage::setInputSelection):
4750         (BlackBerry::WebKit::WebPage::popupListClosed):
4751         (BlackBerry::WebKit::WebPage::setDateTimeInput):
4752         (BlackBerry::WebKit::WebPage::setColorInput):
4753         (BlackBerry::WebKit::WebPage::mouseEvent):
4754         (BlackBerry::WebKit::WebPage::touchEvent):
4755         (BlackBerry::WebKit::WebPage::touchPointAsMouseEvent):
4756         (BlackBerry::WebKit::WebPage::touchEventCancel):
4757         (BlackBerry::WebKit::WebPage::touchEventCancelAndClearFocusedNode):
4758         (BlackBerry::WebKit::WebPage::keyEvent):
4759         (BlackBerry::WebKit::WebPage::deleteTextRelativeToCursor):
4760         (BlackBerry::WebKit::WebPage::setComposingText):
4761         (BlackBerry::WebKit::WebPage::commitText):
4762         (BlackBerry::WebKit::WebPage::selectionCancelled):
4763         (BlackBerry::WebKit::WebPage::cutSelectedText):
4764         (BlackBerry::WebKit::WebPage::insertText):
4765         (BlackBerry::WebKit::WebPage::clearCurrentInputField):
4766         (BlackBerry::WebKit::WebPage::cut):
4767         (BlackBerry::WebKit::WebPage::paste):
4768         (BlackBerry::WebKit::WebPage::setSelection):
4769         (BlackBerry::WebKit::WebPage::setCaretPosition):
4770         (BlackBerry::WebKit::WebPage::selectAtPoint):
4771         (BlackBerry::WebKit::WebPage::setFocused):
4772         * Api/WebPage.h:
4773         * Api/WebPage_p.h:
4774         (WebCore):
4775         (WebPagePrivate):
4776         (DeferredTaskBase):
4777         (BlackBerry::WebKit::WebPagePrivate::DeferredTaskBase::perform):
4778         (BlackBerry::WebKit::WebPagePrivate::DeferredTaskBase::DeferredTaskBase):
4779         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
4780         (WebCore::FrameLoaderClientBlackBerry::FrameLoaderClientBlackBerry):
4781         (WebCore::FrameLoaderClientBlackBerry::~FrameLoaderClientBlackBerry):
4782         (WebCore::FrameLoaderClientBlackBerry::willDeferLoading):
4783         (WebCore::FrameLoaderClientBlackBerry::didResumeLoading):
4784         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
4785         (FrameLoaderClientBlackBerry):
4786         * WebKitSupport/InputHandler.cpp:
4787         (BlackBerry::WebKit::InputHandler::setPopupListIndexes):
4788         * WebKitSupport/InputHandler.h:
4789         (InputHandler):
4790
4791 2012-04-24  Nima Ghanavatian  <nghanavatian@rim.com>
4792
4793         [BlackBerry] Perform spellcheck before handling TouchRelease event
4794         https://bugs.webkit.org/show_bug.cgi?id=84744
4795
4796         After rebasing to master_35, it appears as though some code had been moved around.
4797         Here, we were handling the TouchReleased event before calling spellcheck.  This
4798         meant that when we finally got the call to spellcheck, the fatFinger result had been
4799         reset and the spelling markers had been removed.
4800
4801         In addition, based on https://bugs.webkit.org/show_bug.cgi?id=66330
4802         I am also updating the BlackBerry specific documentMarkerContainingPoint to use
4803         LayoutPoint instead of IntPoint.
4804
4805         Internally reviewed by Mike Fenton.
4806
4807         Reviewed by Antonio Gomes.
4808
4809         * WebKitSupport/TouchEventHandler.cpp:
4810         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
4811         (BlackBerry::WebKit::TouchEventHandler::spellCheck):
4812         * dom/DocumentMarkerController.cpp:
4813         (WebCore::DocumentMarkerController::markerContainingPoint):
4814         * dom/DocumentMarkerController.h:
4815
4816 2012-04-24  Mike Lattanzio  <mlattanzio@rim.com>
4817
4818         [BlackBerry] setUserViewportArguments not always respected.
4819         https://bugs.webkit.org/show_bug.cgi?id=84738
4820
4821         Reviewed by Antonio Gomes.
4822
4823         Remove the unnecessary logic in
4824         WebPagePrivate::recomputeVirtualViewportFromViewportArguments().
4825         Instead it is much simpler to just set the m_viewportArguments to
4826         m_userViewportArguments on LoadCommitted. If there is a viewport
4827         tag in the content, m_viewportArguments will be replaced with it
4828         as usual during normal page load.
4829
4830         * Api/WebPage.cpp:
4831         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
4832         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
4833
4834 2012-04-24  Joe Mason  <jmason@rim.com>
4835
4836         [BlackBerry] Revert broken changes to authentication dialog
4837         https://bugs.webkit.org/show_bug.cgi?id=80135
4838
4839         Reviewed by Antonio Gomes.
4840
4841         The previous patches from this bug caused an infinite loop when using digest auth;
4842         apparently they were only tested with basic.
4843
4844         * Api/DumpRenderTreeClient.h:
4845         * Api/WebPage.cpp:
4846         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
4847         * Api/WebPageClient.h:
4848         * Api/WebPage_p.h:
4849         (WebPagePrivate):
4850
4851 2012-04-24  Mike Fenton  <mifenton@rim.com>
4852
4853         [BlackBerry] Add additional details including the bounds of the box for caretPositionChanged.
4854         https://bugs.webkit.org/show_bug.cgi?id=84728
4855
4856         Reviewed by Antonio Gomes.
4857
4858         PR 138988.
4859
4860         Update caretPositionChanged to include the limit of the input field
4861         for single line inputs.
4862
4863         Reviewed Internally by Gen Mak.
4864
4865         * Api/WebPageClient.h:
4866         * WebKitSupport/InputHandler.cpp:
4867         (BlackBerry::WebKit::InputHandler::boundingBoxForInputField):
4868         (WebKit):
4869         * WebKitSupport/InputHandler.h:
4870         (InputHandler):
4871         * WebKitSupport/SelectionHandler.cpp:
4872         (BlackBerry::WebKit::SelectionHandler::clippingRectForVisibleContent):
4873         (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
4874
4875 2012-04-24  Charles Wei  <charles.wei@torchmobile.com.cn>
4876
4877         [BlackBerry] Input Range element expects mouse events
4878         https://bugs.webkit.org/show_bug.cgi?id=84571
4879
4880         Reviewed by Antonio Gomes.
4881
4882         Input element with Range type expects mouse events to
4883         drag the handle. Note that Input Range could appear
4884         in both the web page directly, or in some shadow tree,
4885         like the MediaControlTimeline and MediaControlVolume.
4886         * WebKitSupport/TouchEventHandler.cpp:
4887         (BlackBerry::WebKit::isRangeControlElement):
4888         (WebKit):
4889         (BlackBerry::WebKit::elementExpectsMouseEvents):
4890         (BlackBerry::WebKit::shouldConvertTouchToMouse):
4891
4892 2012-04-23  Charles Wei  <charles.wei@torchmobile.com.cn>
4893
4894         [BlackBerry] Build failure when DEBUG_FAT_FINGER is enabled
4895         https://bugs.webkit.org/show_bug.cgi?id=84563
4896
4897         Reviewed by Antonio Gomes.
4898
4899         Fat Finger log code uses obsolete IntRect::toString() for logging,
4900         which was first implemented interally and removed later.
4901
4902         * WebKitSupport/FatFingers.cpp:
4903         (BlackBerry::WebKit::FatFingers::findIntersectingRegions):
4904
4905 2012-04-21  Benjamin C Meyer  <bmeyer@rim.com>
4906
4907         Don't hard code the plugins that blackberry supports.
4908         https://bugs.webkit.org/show_bug.cgi?id=84535
4909
4910         Use the existing PluginDatabase to query for the plugins we can handle.
4911
4912         The original implemention of FrameLoaderClientBlackBerry::createPlugin
4913         was a partial copy from another port.  In the Qt port there is some
4914         workarounds for flash which is why this exists there.  Sadly the bits
4915         that were copied made it so only flash worked, but as flash was the only
4916         plugin on the system this issue was not noticed until QNX tried to get
4917         jnext working.  Tracing it down to this bit of code rather then
4918         correcting it they hardcoded the jnext into the same block as flash was.
4919
4920         The blackberry port isn't specifically suppose to only allow jnext and
4921         flash, but was an accident due to the way this code was developed.
4922
4923         Reviewed by Adam Treat.
4924
4925         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
4926         (WebCore::FrameLoaderClientBlackBerry::createPlugin):
4927
4928 2012-04-20  Brady Eidson  <beidson@apple.com>
4929
4930         https://bugs.webkit.org/show_bug.cgi?id=84512
4931         Repurpose ActiveDOMObject::WillShowDialog to WillDeferLoading
4932
4933         Reviewed by Eric Carlson.
4934
4935         PageGroupLoadDeferrer's don't take a ReasonForSuspension argument anymore;
4936         They just use WillDeferLoading by default.
4937
4938         * Api/WebPageGroupLoadDeferrer.cpp:
4939         (BlackBerry::WebKit::WebPageGroupLoadDeferrer::WebPageGroupLoadDeferrer):
4940
4941         * WebCoreSupport/ChromeClientBlackBerry.cpp:
4942         (WebCore::ChromeClientBlackBerry::createWindow):
4943         (WebCore::ChromeClientBlackBerry::runOpenPanel):
4944
4945 2012-04-20  Brady Eidson  <beidson@apple.com>
4946
4947         https://bugs.webkit.org/show_bug.cgi?id=84490
4948         PageGroupLoadDeferrer needs to take a ReasonForSuspension argument
4949
4950         Reviewed by Anders Carlsson.
4951
4952         * Api/WebPageGroupLoadDeferrer.cpp:
4953         (BlackBerry::WebKit::WebPageGroupLoadDeferrer::WebPageGroupLoadDeferrer): Pass along ActiveDOMObject::WillShowDialog,
4954           which used to be the default
4955
4956         * WebCoreSupport/ChromeClientBlackBerry.cpp:
4957         (WebCore::ChromeClientBlackBerry::createWindow): Pass along ActiveDOMObject::WillShowDialog, which used to be the default.
4958         (WebCore::ChromeClientBlackBerry::runOpenPanel): Ditto.
4959
4960 2012-04-20  Mike Lattanzio  <mlattanzio@rim.com>
4961
4962         [BlackBerry] Expose WebViewportArguments to WebPageClient
4963         https://bugs.webkit.org/show_bug.cgi?id=84471
4964
4965         Reviewed by Antonio Gomes.
4966
4967         Implement the ability for the WebPageClient to specify a fallback
4968         virtual viewport to be used whenever a meta viewport tag is not
4969         present in the HTML. This can drastically impact apparent layout.
4970         This patch is designed to provide a classic "Column View" style of
4971         layout without breaking the web by simply exposing meta viewport
4972         arguments to WebPageClients.
4973
4974         Note: As a side effect of this change. the WebPagePrivate::
4975         recomputeVirtualViewportFromViewportArguments method no longer
4976         modifies the targetDensityDpi property of the m_viewportArguments.
4977         However this does not affect the class because that property itself
4978         means nothing to us. Only the computeViewportArguments method from
4979         WebCore uses it, and the currentViewportArguments object we pass
4980         into that method has the adjusted targetDensityDpi value as before.
4981
4982         * Api/WebPage.cpp:
4983         (BlackBerry::WebKit::WebPage::setUserViewportArguments):
4984         (WebKit):
4985         (BlackBerry::WebKit::WebPage::resetUserViewportArguments):
4986         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
4987         * Api/WebPage.h:
4988         (WebKit):
4989         * Api/WebPage_p.h:
4990         (WebPagePrivate):
4991         * Api/WebViewportArguments.cpp: Added.
4992         (WebKit):
4993         (BlackBerry::WebKit:::d):
4994         (BlackBerry::WebKit::WebViewportArguments::~WebViewportArguments):
4995         (BlackBerry::WebKit::WebViewportArguments::initialScale):
4996         (BlackBerry::WebKit::WebViewportArguments::setInitialScale):
4997         (BlackBerry::WebKit::WebViewportArguments::minimumScale):
4998         (BlackBerry::WebKit::WebViewportArguments::setMinimumScale):
4999         (BlackBerry::WebKit::WebViewportArguments::maximumScale):
5000         (BlackBerry::WebKit::WebViewportArguments::setMaximumScale):
5001         (BlackBerry::WebKit::WebViewportArguments::width):
5002         (BlackBerry::WebKit::WebViewportArguments::setWidth):
5003         (BlackBerry::WebKit::WebViewportArguments::height):
5004         (BlackBerry::WebKit::WebViewportArguments::setHeight):
5005         (BlackBerry::WebKit::WebViewportArguments::targetDensityDpi):
5006         (BlackBerry::WebKit::WebViewportArguments::setTargetDensityDpi):
5007         (BlackBerry::WebKit::WebViewportArguments::userScalable):
5008         (BlackBerry::WebKit::WebViewportArguments::setUserScalable):
5009         (BlackBerry::WebKit::WebViewportArguments::operator==):
5010         (BlackBerry::WebKit::WebViewportArguments::operator!=):
5011         * Api/WebViewportArguments.h: Added.
5012         (WebCore):
5013         (WebKit):
5014
5015 2012-04-19  Arvid Nilsson  <anilsson@rim.com>
5016
5017         [BlackBerry] Always use the AnimationFrameRateController for accelerated animations
5018         https://bugs.webkit.org/show_bug.cgi?id=84323
5019
5020         Reviewed by Antonio Gomes.
5021
5022         PR 150750
5023         Regardless of whether there's a WebPageCompositorClient, we want the
5024         AnimationFrameRateController to manage animation frames.
5025         Reviewed internally by Andrew Lo.
5026
5027         * Api/BackingStore.cpp:
5028         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
5029         * Api/WebPageCompositor.cpp:
5030         (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
5031         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
5032         * Api/WebPageCompositor_p.h:
5033         (WebPageCompositorPrivate):
5034
5035 2012-04-18  Max Feil  <mfeil@rim.com>
5036
5037         [BlackBerry] Tab awareness for HTML5 concurrent audio
5038         https://bugs.webkit.org/show_bug.cgi?id=82930
5039         Support for concurrent HTML5 audio improvements being made in
5040         the platform library, which need to be aware of tabs and tab
5041         visibility. PR96004.
5042
5043         Reviewed by George Staikos.
5044
5045         * Api/WebPageClient.h:
5046         * Api/WebPage_p.h:
5047         (BlackBerry::WebKit::WebPagePrivate::isVisible):
5048
5049 2012-04-17  Jacky Jiang  <zhajiang@rim.com>
5050
5051         [BlackBerry] Viewport metatag doesn't disable double-tap zoom
5052         https://bugs.webkit.org/show_bug.cgi?id=84199
5053
5054         Reviewed by George Staikos.
5055
5056         PR: 148279
5057         When we set "user-scalable=no" in viewport meta-tag and change any
5058         other WebSettings, the WebPage can turn to be scalable.
5059         This is a regression of the change master_32/SHA:fa0f8ee9. In that
5060         change, we used setUserScalable(webSettings->isUserScalable())
5061         in WebPagePrivate::didChangeSettings which was incorrect for non-DRT
5062         case, as webSettings->isUserScalable() would always return true by
5063         default.
5064         Create a new API WebPage::setUserScalable which will be used in
5065         DumpRenderTree.cpp.
5066
5067         * Api/WebPage.cpp:
5068         (BlackBerry::WebKit::WebPage::setUserScalable):
5069         (WebKit):
5070         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
5071         * Api/WebPage.h:
5072
5073 2012-04-17  Mike Fenton  <mifenton@rim.com>
5074
5075         [BlackBerry] Pattern matching should be applied to numbers
5076         https://bugs.webkit.org/show_bug.cgi?id=84152
5077
5078         Reviewed by Antonio Gomes.
5079
5080         PR 148906.
5081
5082         Add pattern matching for number based on [0-9] to trigger
5083         input help matching number fields.
5084
5085         * WebKitSupport/DOMSupport.cpp:
5086         (BlackBerry::WebKit::DOMSupport::elementPatternIndicatesNumber):
5087         (DOMSupport):
5088         (BlackBerry::WebKit::DOMSupport::elementPatternIndicatesHexadecimal):
5089         (BlackBerry::WebKit::DOMSupport::elementPatternMatches):
5090         * WebKitSupport/DOMSupport.h:
5091         * WebKitSupport/InputHandler.cpp:
5092         (BlackBerry::WebKit::convertInputType):
5093
5094 2012-04-17  George Staikos  <staikos@webkit.org>
5095
5096         Export the initialization function so it can be called earlier.
5097         https://bugs.webkit.org/show_bug.cgi?id=84134
5098
5099         Reviewed by Nikolas Zimmermann.
5100
5101         * Api/BlackBerryGlobal.h: export globalInitialize()
5102         (WebKit):
5103
5104 2012-04-16  Antonio Gomes  <agomes@rim.com>
5105
5106         Screen shift down when VKB shows by clicking in a input box MKS_3601371
5107         https://bugs.webkit.org/show_bug.cgi?id=84057
5108
5109         Reviewed by Rob Buis.
5110
5111         After switching from ScrollView::canOverscroll to ScrollView::constrainsScrollingToContentEdge
5112         we had a less restricted code path allowing/disallowing overscrolling. That caused
5113         some webpages like google.com to get on overscroll when adjusting the scroll
5114         position to ensure the focused input field is visible.
5115
5116         Patch restricts the way we allow overscrolling to the bottom, where the virtual
5117         keyboard pops up from, clamping it to 0, 0 if it tries to
5118         overscroll upwards, and to maximum scroll position if it overscrolls
5119         downwards.
5120
5121         PR #149846
5122         Internally reviewed by Mike Fenton.
5123
5124         * WebKitSupport/InputHandler.cpp:
5125         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
5126
5127 2012-04-16  Yongxin Dai  <yodai@rim.com>
5128
5129         [BlackBerry] Increase padding for text element
5130         https://bugs.webkit.org/show_bug.cgi?id=83903
5131
5132         Reviewed by Antonio Gomes.
5133         
5134         PR 125888
5135         
5136         Increase the padding value for focused text element to make selection handle
5137         at least partially visible when the user is dragging at edge of viewport
5138         in in-region scoll mode.
5139  
5140         Reviewed internally by Mike Fenton.
5141
5142         * WebKitSupport/InputHandler.cpp:
5143         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
5144
5145 2012-04-16  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
5146
5147         [BlackBerry] Add ability for DRT to handle HTTP authentication challenges.
5148         https://bugs.webkit.org/show_bug.cgi?id=84031
5149
5150         Reviewed by Rob Buis.
5151
5152         Added the interface function didReceivedAuthenticaitonChallenge()
5153         in interface class DumpRenderTreeClient;
5154         Called m_dumpRenderTree->didReceiveAuthenticationChallenge() in
5155         WebPagePrivate::authenticationChallenge() when DRT is enabled.
5156
5157         Test: reuse existing test cases:
5158         http/tests/loading/basic-credentials-sent-automatically.html
5159         http/tests/loading/basic-auth-resend-wrong-credentials.html
5160
5161         * Api/DumpRenderTreeClient.h:
5162         (WebCore):
5163         * Api/WebPage.cpp:
5164         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
5165
5166 2012-04-16  Arvid Nilsson  <anilsson@rim.com>
5167
5168         [BlackBerry] Accelerated compositing layers fail to render in direct rendering mode
5169         https://bugs.webkit.org/show_bug.cgi?id=83933
5170
5171         Reviewed by Adam Treat.
5172
5173         RIM PR: 149609
5174         This was because I accidentally dropped an exclamation mark when
5175         upstreaming the patch for PR 136381 (bug #83131). Fixed by adding back
5176         the exclamation mark.
5177
5178         * Api/WebPage.cpp:
5179         (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
5180
5181 2012-04-12  Konrad Piascik  <kpiascik@rim.com>
5182
5183         [BlackBerry] Web Inspector messages incorrectly converted
5184         https://bugs.webkit.org/show_bug.cgi?id=83796
5185
5186         Reviewed by Rob Buis.
5187
5188         The JSON sent over from the remote Web Inspector front-end was being
5189         mis interpreted as ISO-8859-1.  This caused all non ascii characters to
5190         become garbled when using the String constructor, so we use fromtUTF8 instead.
5191
5192         * Api/WebPage.cpp:
5193         (BlackBerry::WebKit::WebPage::dispatchInspectorMessage):
5194
5195 2012-04-12  Mike Fenton  <mifenton@rim.com>
5196
5197         [BlackBerry] Speed up processing of Selection region generation.
5198         https://bugs.webkit.org/show_bug.cgi?id=82766
5199
5200         Reviewed by Rob Buis.
5201
5202         PR 136593.
5203
5204         Re-speed up text selection.  The previous patch had a merge
5205         error causing text selection not to function.  The fix
5206         implemented removed the optimization.  This fixes the error
5207         in the original patch and removes the temporary fix.
5208
5209         Make style updated as suggested by Antonio Gomes.
5210
5211         Reviewed Internally by Gen Mak.
5212
5213         * WebKitSupport/SelectionHandler.cpp:
5214         (BlackBerry::WebKit::SelectionHandler::regionForTextQuads):
5215         (BlackBerry::WebKit::regionRectListContainsPoint):
5216
5217 2012-04-12  Mike Fenton  <mifenton@rim.com>
5218
5219         Pattern matching for hexadecimal should include * as an allowable count.
5220         https://bugs.webkit.org/show_bug.cgi?id=83779
5221
5222         Reviewed by Rob Buis.
5223
5224         Update pattern matching check to allow wildcard for number
5225         of characters allowed.
5226
5227         PR 148907.
5228
5229         Reviewed Internally by Gen Mak.
5230
5231         * WebKitSupport/DOMSupport.cpp:
5232         (BlackBerry::WebKit::DOMSupport::elementPatternIndicatesHexadecimal):
5233
5234 2012-04-11  Joe Mason  <jmason@rim.com>
5235
5236         [BlackBerry] Update to the thread-safe GuardedPointer API
5237         https://bugs.webkit.org/show_bug.cgi?id=83603
5238
5239         Reviewed by Rob Buis.
5240
5241         RIM PR: 134984
5242         Make the destructors of all objects inheriting GuardedPointerBase protected or
5243         private, and delete them using BlackBerry::Platform::deleteGuardedObject.
5244         Access all GuardedPointers through GuardedPointerLocker.
5245
5246         No new tests, refactor.
5247
5248         Reviewed internally by Yong Li and George Staikos.
5249
5250         * Api/BackingStore.cpp:
5251         (BlackBerry::WebKit::BackingStore::~BackingStore):
5252         * Api/BackingStore_p.h:
5253         (BackingStorePrivate):
5254         * Api/WebPage.cpp:
5255         (BlackBerry::WebKit::WebPage::~WebPage):
5256         (BlackBerry::WebKit::WebPage::destroy):
5257         * Api/WebPage.h:
5258         * Api/WebPage_p.h:
5259         (WebPagePrivate):
5260
5261 2012-04-10  Arvid Nilsson  <anilsson@rim.com>
5262
5263         [BlackBerry] Crash when tearing down web page rendered using WebPageCompositor
5264         https://bugs.webkit.org/show_bug.cgi?id=83567
5265
5266         Reviewed by Antonio Gomes.
5267
5268         Fixed by checking if there's a layer renderer before calling into it.
5269
5270         * Api/WebPageCompositor.cpp:
5271         (BlackBerry::WebKit::WebPageCompositorPrivate::releaseLayerResources):
5272
5273 2012-04-09  Eli Fidler  <efidler@rim.com>
5274
5275         [BlackBerry] Update about:config page
5276         https://bugs.webkit.org/show_bug.cgi?id=83515
5277
5278         Reviewed by Rob Buis.
5279
5280         * WebCoreSupport/AboutData.cpp:
5281         (WebCore::configPage):
5282         * WebCoreSupport/AboutDataEnableFeatures.in:
5283         * WebCoreSupport/AboutDataHaveFeatures.in:
5284         * WebCoreSupport/AboutDataUseFeatures.in:
5285
5286 2012-04-07  Rob Buis  <rbuis@rim.com>
5287
5288         [BlackBerry] Add Battery Status API support
5289         https://bugs.webkit.org/show_bug.cgi?id=82615
5290
5291         Reviewed by George Staikos.
5292
5293         Add client implementation for Battery API.
5294
5295         * Api/WebPage.cpp:
5296         (BlackBerry::WebKit::WebPagePrivate::init):  initialize BatteryClient.
5297         * WebCoreSupport/BatteryClientBlackBerry.cpp: Added.
5298         (WebCore):
5299         (WebCore::BatteryClientBlackBerry::BatteryClientBlackBerry):
5300         (WebCore::BatteryClientBlackBerry::setController):
5301         (WebCore::BatteryClientBlackBerry::startUpdating):
5302         (WebCore::BatteryClientBlackBerry::stopUpdating):
5303         (WebCore::BatteryClientBlackBerry::batteryControllerDestroyed):
5304         (WebCore::BatteryClientBlackBerry::onLevelChange):
5305         (WebCore::BatteryClientBlackBerry::onChargingChange):
5306         (WebCore::BatteryClientBlackBerry::onChargingTimeChange):
5307         (WebCore::BatteryClientBlackBerry::onDischargingTimeChange):
5308         * WebCoreSupport/BatteryClientBlackBerry.h: Added.
5309         (WebCore):
5310         (BatteryClientBlackBerry):
5311         (WebCore::BatteryClientBlackBerry::~BatteryClientBlackBerry):
5312
5313 2012-04-06  Benjamin Poulain  <bpoulain@apple.com>
5314
5315         Get rid of the useless flag PREEMPT_GEOLOCATION_PERMISSION
5316         https://bugs.webkit.org/show_bug.cgi?id=83325
5317
5318         Reviewed by Ryosuke Niwa.
5319
5320         * WebCoreSupport/AboutDataUseFeatures.in:
5321
5322 2012-04-06  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
5323
5324         [BlackBerry] Text selection - Can't select texts
5325         https://bugs.webkit.org/show_bug.cgi?id=83355
5326
5327         Fix the problem of not sending out the result of the function 
5328         SelectionHandler::regionForTextQuads(). This regression issue
5329         is introduced by the git commit f9446b7d671d48a833ab0acf12b1e20637e0a910.
5330
5331         Reviewed by George Staikos.
5332
5333         * WebKitSupport/SelectionHandler.cpp:
5334         (BlackBerry::WebKit::SelectionHandler::regionForTextQuads):
5335             Add code to return the function result.
5336
5337 2012-04-05  Jason Liu  <jason.liu@torchmobile.com.cn>
5338
5339         [BlackBerry] Empty Referrer should not be set into ResourceRequest when loading a main resource.
5340         https://bugs.webkit.org/show_bug.cgi?id=83252
5341
5342         Reviewed by George Staikos.
5343
5344         Test: http/tests/misc/resources/referrer-main-resource.php
5345
5346         * Api/WebPage.cpp:
5347         (BlackBerry::WebKit::WebPagePrivate::load):
5348
5349 2012-04-05  George Staikos  <staikos@webkit.org>
5350
5351         Add a vibration client for BlackBerry and enable it.
5352         https://bugs.webkit.org/show_bug.cgi?id=83340
5353
5354         Reviewed by Rob Buis.
5355
5356         * Api/WebPage.cpp:
5357         (BlackBerry::WebKit::WebPagePrivate::init): enable the client
5358         * WebCoreSupport/VibrationClientBlackBerry.cpp: Added.
5359         (WebCore):
5360         (WebCore::VibrationClientBlackBerry::VibrationClientBlackBerry):
5361         (WebCore::VibrationClientBlackBerry::vibrate):
5362         (WebCore::VibrationClientBlackBerry::cancelVibration):
5363         (WebCore::VibrationClientBlackBerry::vibrationDestroyed):
5364         * WebCoreSupport/VibrationClientBlackBerry.h: Added.
5365         (WebCore):
5366         (VibrationClientBlackBerry):
5367         (WebCore::VibrationClientBlackBerry::~VibrationClientBlackBerry):
5368
5369 2012-04-05  Arvid Nilsson  <anilsson@rim.com>
5370
5371         [BlackBerry] Force compositing mode when backing store is not active
5372         https://bugs.webkit.org/show_bug.cgi?id=83131
5373
5374         Reviewed by George Staikos.
5375
5376         RIM PR: 136381
5377         Normally, the BlackBerry WebKit port resorts to direct rendering when
5378         the backing store is not active. However, direct rendering is broken
5379         with the OpenGL code path. This prevented multiple web pages from being
5380         displayed at once with the new WebPageCompositor API.
5381
5382         Fixed by using accelerated compositing layer to render the root layer
5383         instead of backing store. This will give us a tiled layer backing the
5384         root layer, which for some use cases is even better than direct
5385         rendering.
5386
5387         Reviewed internally by Filip Spacek.
5388
5389         * Api/BackingStore.cpp:
5390         (BlackBerry::WebKit::BackingStorePrivate::shouldDirectRenderingToWindow):
5391         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
5392         * Api/WebPage.cpp:
5393         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
5394         (BlackBerry::WebKit::WebPage::setVisible):
5395         (BlackBerry::WebKit::WebPagePrivate::suspendBackingStore):
5396         (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore):
5397         (BlackBerry::WebKit::WebPagePrivate::compositorDrawsRootLayer):
5398         (WebKit):
5399         (BlackBerry::WebKit::WebPagePrivate::setCompositorDrawsRootLayer):
5400         (BlackBerry::WebKit::WebPagePrivate::drawLayersOnCommit):
5401         (BlackBerry::WebKit::WebPagePrivate::scheduleRootLayerCommit):
5402         (BlackBerry::WebKit::WebPagePrivate::commitRootLayer):
5403         (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
5404         (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
5405         (BlackBerry::WebKit::WebPagePrivate::setRootLayerCompositingThread):
5406         (BlackBerry::WebKit::WebPagePrivate::createCompositor):
5407         (BlackBerry::WebKit::WebPagePrivate::suspendRootLayerCommit):
5408         (BlackBerry::WebKit::WebPagePrivate::setNeedsOneShotDrawingSynchronization):
5409         * Api/WebPageCompositor.cpp:
5410         (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
5411         (BlackBerry::WebKit::WebPageCompositorPrivate::drawsRootLayer):
5412         (WebKit):
5413         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
5414         * Api/WebPageCompositor_p.h:
5415         (BlackBerry::WebKit::WebPageCompositorPrivate::rootLayer):
5416         (WebPageCompositorPrivate):
5417         (BlackBerry::WebKit::WebPageCompositorPrivate::setDrawsRootLayer):
5418         * Api/WebPage_p.h:
5419         (WebPagePrivate):
5420
5421 2012-04-05  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
5422
5423         [BlackBerry] Clear local storage won't take effect until browser exit and relaunch
5424         https://bugs.webkit.org/show_bug.cgi?id=83253
5425
5426         Reviewed by Rob Buis.
5427
5428         RIM PR: #146871
5429         Cleared the local storage namespace of a WebPage's PageGroup
5430         when WebPage::clearLocalStorage() get called.
5431         Also deleted unused global function clearLocalStorage().
5432
5433         * Api/BlackBerryGlobal.cpp:
5434         * Api/BlackBerryGlobal.h:
5435         (WebKit):
5436         * Api/WebPage.cpp:
5437         (BlackBerry::WebKit::WebPage::clearLocalStorage):
5438
5439 2012-04-04  Rob Buis  <rbuis@rim.com>
5440
5441         [BlackBerry] Make the switch statement in WebPage::notifyAppActivationStateChange() stronger
5442         https://bugs.webkit.org/show_bug.cgi?id=83085
5443
5444         Reviewed by Antonio Gomes.
5445
5446         PR 121109
5447
5448         This way when we add something to the enum and forget to add to the switch we'll get a compile error.
5449
5450         * Api/WebPage.cpp:
5451         (BlackBerry::WebKit::WebPage::notifyAppActivationStateChange):
5452
5453 2012-04-03  Mike Lattanzio  <mlattanzio@rim.com>
5454
5455         [BlackBerry] Expose CaseSensitive, Wrap, and HighlightAllMatches in WebPage::findNextString()
5456         https://bugs.webkit.org/show_bug.cgi?id=82643
5457
5458         Enhance BlackBerry::WebKit::WebPage::findNextString()
5459
5460         This patch adds support for toggling case sensitivity,
5461         search wrapping, and whether or not to highlight all matches
5462         in addition to the next found match.
5463
5464         I refactored and renamed the new setActiveMatchAndMarker() method
5465         to move the active match from one range to another. This was
5466         required because in the case of a non wrapped search we do not
5467         want to adjust the m_activeMatch if another match is not found.
5468
5469         Internal Review by Andy Chen.
5470
5471         Reviewed by Rob Buis.
5472
5473         * Api/WebPage.cpp:
5474         (BlackBerry::WebKit::WebPage::findNextString):
5475         * Api/WebPage.h:
5476         * WebKitSupport/InPageSearchManager.cpp:
5477         (BlackBerry::WebKit::InPageSearchManager::InPageSearchManager):
5478         (BlackBerry::WebKit::InPageSearchManager::findNextString):
5479         (BlackBerry::WebKit::InPageSearchManager::findAndMarkText):
5480         (BlackBerry::WebKit::InPageSearchManager::setActiveMatchAndMarker):
5481         (BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):
5482         * WebKitSupport/InPageSearchManager.h:
5483         (InPageSearchManager):
5484
5485 2012-04-02  Jacky Jiang  <zhajiang@rim.com>
5486
5487         [BlackBerry] Adapt WebPagePrivate::webContext to the API change of r109570
5488         https://bugs.webkit.org/show_bug.cgi?id=82945
5489
5490         Reviewed by Rob Buis.
5491
5492         RIM PR: 147163
5493         Adapt WebPagePrivate::webContext to the API change of the security
5494         cherry-pick of r109570 and r112023.
5495
5496         * Api/WebPage.cpp:
5497         (BlackBerry::WebKit::WebPagePrivate::webContext):
5498
5499 2012-04-02  Lianghui Chen  <liachen@rim.com>
5500
5501         [BlackBerry] Set ResourceRequest TargetType in WebPagePrivate::load()
5502         https://bugs.webkit.org/show_bug.cgi?id=80519
5503
5504         Set the right TargetType for main loads if they are not already set in
5505         dispatchWillSendRequest().
5506
5507         Also adjust NetworkRequest TargetType for decidePolicyForExternalLoad()
5508         and dispatchDecidePolicyForNavigationAction() as they are called before
5509         dispatchWillSendRequest() is called. Patch to change ResourceRequest
5510         TargetType earlier has been rejected as in WebKit bug
5511         https://bugs.webkit.org/show_bug.cgi?id=80713
5512
5513         Reviewed by Rob Buis.
5514
5515         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
5516         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction):
5517         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendRequest):
5518         (WebCore::FrameLoaderClientBlackBerry::decidePolicyForExternalLoad):
5519
5520 2012-04-01  Arvid Nilsson  <anilsson@rim.com>
5521
5522         [BlackBerry] Simplify the code that gets accelerated compositing output onto the screen
5523         https://bugs.webkit.org/show_bug.cgi?id=82845
5524
5525         Reviewed by Rob Buis.
5526
5527         RIM PR: 136381
5528         The code accounted for a now obsolete setup where we used one OpenGL
5529         window for accelerated compositing and one native window for backing
5530         store output, and let the windowing system composite those two. In that
5531         setup an optimization to try and only update the window that had
5532         changed was viable.
5533
5534         Nowadays, we either use an offscreen surface for accelerated
5535         compositing output, which we blend onto the window containing the
5536         backing store output, or render both backing store and accelerated
5537         compositing output directly to one OpenGL window. We always have to
5538         blit the backingstore contents and draw the accelerated compositing
5539         output every frame with these code paths, so don't try to be clever
5540         about it.
5541
5542         Even when we use an OpenGL window, the compositing surface can be non-
5543         null, so don't try to glFinish() and swap the compositing surface when
5544         the GLES2Context is tied to a window.
5545
5546         * Api/BackingStore.cpp:
5547         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
5548         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
5549         (WebKit):
5550         * Api/BackingStore_p.h:
5551         (BackingStorePrivate):
5552         * Api/WebPage.cpp:
5553         (BlackBerry::WebKit::WebPagePrivate::drawLayersOnCommit):
5554         * WebKitSupport/GLES2Context.cpp:
5555         (BlackBerry::WebKit::GLES2Context::swapBuffers):
5556
5557 2012-03-31  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
5558
5559         [BlackBerry] http authenticate dialog popup only once no matter authentication pass or fail
5560         https://bugs.webkit.org/show_bug.cgi?id=80135
5561
5562         Reviewed by Rob Buis.
5563
5564         RIM PR: 145660
5565         Fixed a regression introduced by r111810, which used the wrong
5566         credential object.
5567
5568         * Api/WebPage.cpp:
5569         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
5570
5571 2012-03-30  Mike Fenton  <mifenton@rim.com>
5572
5573         [BlackBerry] Speed up processing of Selection region generation.
5574         https://bugs.webkit.org/show_bug.cgi?id=82766
5575
5576         Reviewed by Rob Buis.
5577
5578         PR 136593.
5579
5580         Refactor generation of Selection IntRectRegion to avoid
5581         the need for IntRectRegion's helper functions which were
5582         not available when using it as a container without
5583         unioning the rects.
5584
5585         This greatly speeds up rendering by maintaining the distinct
5586         rects as the union operation was length with large numbers of
5587         rects.
5588
5589         Reviewed Internally by Gen Mak, Mike Lattanzio and Tyler Abbott.
5590
5591         * WebKitSupport/DOMSupport.cpp:
5592         (BlackBerry::WebKit::DOMSupport::visibleTextQuads):
5593         (DOMSupport):
5594         * WebKitSupport/DOMSupport.h:
5595         * WebKitSupport/SelectionHandler.cpp:
5596         (BlackBerry::WebKit::SelectionHandler::clippingRectForVisibleContent):
5597         (BlackBerry::WebKit::SelectionHandler::regionForTextQuads):
5598         (BlackBerry::WebKit::SelectionHandler::setSelection):
5599         (WebKit):
5600         (BlackBerry::WebKit::regionRectListContainsPoint):
5601         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
5602         (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
5603         * WebKitSupport/SelectionHandler.h:
5604         (WebCore):
5605         (SelectionHandler):
5606
5607 2012-03-30  Mark Pilgrim  <pilgrim@chromium.org>
5608
5609         GEOLOCATION should be implemented as Page Supplement
5610         https://bugs.webkit.org/show_bug.cgi?id=82228
5611
5612         Reviewed by Adam Barth.
5613
5614         Geolocation is now a Supplement in Page so the interface
5615         has changed for setting up the page's geolocation client
5616         initially and accessing the controller later.
5617
5618         * Api/WebPage.cpp:
5619         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
5620         (BlackBerry::WebKit::WebPagePrivate::init):
5621         * WebCoreSupport/GeolocationControllerClientBlackBerry.cpp:
5622         (GeolocationControllerClientBlackBerry::onLocationUpdate):
5623         (GeolocationControllerClientBlackBerry::onLocationError):
5624         * WebKitSupport/DumpRenderTreeSupport.cpp:
5625         (DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests):
5626         (DumpRenderTreeSupport::resetGeolocationMock):
5627         (DumpRenderTreeSupport::setMockGeolocationError):
5628         (DumpRenderTreeSupport::setMockGeolocationPermission):
5629         (DumpRenderTreeSupport::setMockGeolocationPosition):
5630
5631 2012-03-30  Keishi Hattori  <keishi@webkit.org>
5632
5633         Change ENABLE_INPUT_COLOR to ENABLE_INPUT_TYPE_COLOR and enable it for chromium
5634         https://bugs.webkit.org/show_bug.cgi?id=80972
5635
5636         Reviewed by Kent Tamura.
5637
5638         * WebCoreSupport/AboutDataEnableFeatures.in:
5639         * WebCoreSupport/ChromeClientBlackBerry.h:
5640         (ChromeClientBlackBerry):
5641         * WebKitSupport/DOMSupport.cpp:
5642         (BlackBerry::WebKit::DOMSupport::isColorInputField):
5643         * WebKitSupport/InputHandler.cpp:
5644         (BlackBerry::WebKit::convertInputType):
5645
5646 2012-03-29  Sheriff Bot  <webkit.review.bot@gmail.com>
5647
5648         Unreviewed, rolling out r111259.
5649         http://trac.webkit.org/changeset/111259
5650         https://bugs.webkit.org/show_bug.cgi?id=82650
5651
5652         Caused selection regression in calculations due to
5653         misconstructed IntRectRegion. (Requested by mfenton on
5654         #webkit).
5655
5656         * WebKitSupport/SelectionHandler.cpp:
5657         (BlackBerry::WebKit::SelectionHandler::getConsolidatedRegionOfTextQuadsForSelection):
5658
5659 2012-03-29  Sheriff Bot  <webkit.review.bot@gmail.com>
5660
5661         Unreviewed, rolling out r112553.
5662         http://trac.webkit.org/changeset/112553
5663         https://bugs.webkit.org/show_bug.cgi?id=82638
5664
5665         It made all tests crash on Qt WK2 (Requested by Ossy_away on
5666         #webkit).
5667
5668         * Api/WebPage.cpp:
5669         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
5670         (BlackBerry::WebKit::WebPagePrivate::init):
5671         * WebCoreSupport/GeolocationControllerClientBlackBerry.cpp:
5672         (GeolocationControllerClientBlackBerry::onLocationUpdate):
5673         (GeolocationControllerClientBlackBerry::onLocationError):
5674         * WebKitSupport/DumpRenderTreeSupport.cpp:
5675         (DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests):
5676         (DumpRenderTreeSupport::resetGeolocationMock):
5677         (DumpRenderTreeSupport::setMockGeolocationError):
5678         (DumpRenderTreeSupport::setMockGeolocationPermission):
5679         (DumpRenderTreeSupport::setMockGeolocationPosition):
5680
5681 2012-03-29  Mark Pilgrim  <pilgrim@chromium.org>
5682
5683         GEOLOCATION should be implemented as Page Supplement
5684         https://bugs.webkit.org/show_bug.cgi?id=82228
5685
5686         Reviewed by Adam Barth.
5687
5688         Geolocation is now a Supplement in Page so the interface
5689         has changed for setting up the page's geolocation client
5690         initially and accessing the controller later.
5691
5692         * Api/WebPage.cpp:
5693         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
5694         (BlackBerry::WebKit::WebPagePrivate::init):
5695         * WebCoreSupport/GeolocationControllerClientBlackBerry.cpp:
5696         (GeolocationControllerClientBlackBerry::onLocationUpdate):
5697         (GeolocationControllerClientBlackBerry::onLocationError):
5698         * WebKitSupport/DumpRenderTreeSupport.cpp:
5699         (DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests):
5700         (DumpRenderTreeSupport::resetGeolocationMock):
5701         (DumpRenderTreeSupport::setMockGeolocationError):
5702         (DumpRenderTreeSupport::setMockGeolocationPermission):
5703         (DumpRenderTreeSupport::setMockGeolocationPosition):
5704
5705 2012-03-28  Nate Chapin  <japhet@chromium.org>
5706
5707         Remove dispatchDidLoadMainResource callback, since no
5708         port implements it.
5709         https://bugs.webkit.org/show_bug.cgi?id=82539
5710
5711         Reviewed by Alexey Proskuryakov.
5712
5713         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
5714         (FrameLoaderClientBlackBerry):
5715
5716 2012-03-28  Leo Yang  <leo.yang@torchmobile.com.cn>
5717
5718         [BlackBerry] Use WebCore::PlatformMouseEvent::globalPosition() instead of WebCore::PlatformMouseEvent::globalPos() in WebPage.cpp
5719         https://bugs.webkit.org/show_bug.cgi?id=82420
5720
5721         Reviewed by Rob Buis.
5722
5723         In PlatformMouseEvent.h the blackberry porting added globalPos() (but not upstreamed yet)
5724         for PlatformMouseEvent, but this method is same as globalPosition() that is available for
5725         every porting. We should use globalPosition().
5726
5727         * Api/WebPage.cpp:
5728         (BlackBerry::WebKit::WebPagePrivate::updateCursor):
5729
5730 2012-03-27  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
5731
5732         [BlackBerry] Text selection - selection gets broken in test.com/individuals.htm
5733         https://bugs.webkit.org/show_bug.cgi?id=82292
5734
5735         Change to check and avoid text selection across frames.
5736
5737         Internal reviewed by Mike Fenton
5738
5739         Reviewed by Rob Buis.
5740
5741         * WebKitSupport/SelectionHandler.cpp:
5742         (BlackBerry::WebKit::visiblePositionForPointIgnoringClipping):
5743             support selection across frames, so check if the *framePoint* is in
5744             the *frame*.
5745         (BlackBerry::WebKit::SelectionHandler::setSelection):
5746             function returns a null VisablePosition, it stands for a invalid position
5747             or a position in the different frames, therefor we don't execute setting
5748             handle's position.
5749
5750 2012-03-27  Andrew Lo  <anlo@rim.com>
5751
5752         [BlackBerry] Switch WebPageCompositor to use AnimationFrameRateController instead of timer
5753         https://bugs.webkit.org/show_bug.cgi?id=82350
5754
5755         Switch timer in WebPageCompositor to use AnimationFrameRateController.
5756
5757         Reviewed by Rob Buis.
5758
5759         * Api/WebPageCompositor.cpp:
5760         (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
5761         (BlackBerry::WebKit::WebPageCompositorPrivate::~WebPageCompositorPrivate):
5762         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
5763         (BlackBerry::WebKit::WebPageCompositorPrivate::animationFrameChanged):
5764         * Api/WebPageCompositor_p.h:
5765         (WebPageCompositorPrivate):
5766
5767 2012-03-27  Chris Guan  <chris.guan@torchmobile.com.cn>
5768
5769         A page containing multiparts with "multipart/x-mixed-replace" should not be cached.
5770         https://bugs.webkit.org/show_bug.cgi?id=82291
5771
5772         Reviewed by Rob Buis.
5773
5774         If we have a multiPart reponse with multipart/x-mixed-replace, 
5775         the current page should not be cached. I use isMultipartPayload() 
5776         API which was supposed to be set in NetworkJob to decide to 
5777         cache page or not.
5778
5779         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
5780         (WebCore::FrameLoaderClientBlackBerry::canCachePage):
5781
5782 2012-03-25  Arvid Nilsson  <anilsson@rim.com>
5783
5784         [BlackBerry] Accelerated compositing layers fail to render when using WebPageCompositor
5785         https://bugs.webkit.org/show_bug.cgi?id=82104
5786         RIM PR: 145963
5787
5788         Reviewed by Rob Buis.
5789
5790         The root layer may be set before we have a layer renderer, because the
5791         latter is not created until we get an OpenGL context from the embedder.
5792
5793         Fixed by setting the root layer on the layer renderer when it's created
5794         instead of assuming a certain order of events.
5795
5796         * Api/WebPageCompositor.cpp:
5797         (BlackBerry::WebKit::WebPageCompositorPrivate::setContext):
5798         (BlackBerry::WebKit::WebPageCompositorPrivate::setRootLayer):
5799
5800 2012-03-23  Arvid Nilsson  <anilsson@rim.com>
5801
5802         [BlackBerry] Add WebPageCompositor class to BlackBerry WebKit API
5803         https://bugs.webkit.org/show_bug.cgi?id=81121
5804         RIM PR: 136687
5805
5806         Reviewed by Rob Buis.
5807
5808         The idea is for the API client to use a WebPageCompositor object to
5809         render the WebPage when there's no screen window available.
5810
5811         The WebPageCompositorPrivate becomes reference counted in order to be
5812         kept alive either because it's used for accelerated compositing layers
5813         or used for the WebPageCompositor API. It can still work standalone.
5814
5815         Clean up some code - no need to keep track of a separate boolean
5816         WebPagePrivate::m_isAcceleratedCompositingActive when the state of
5817         m_compositor can tell you.
5818
5819         Also remove duplicated code from WebPagePrivate - go directly to the
5820         compositor object instead, if you need to draw the AC layers.
5821
5822         Reviewed internally by Robin Cao and the hasBlitJobs/blitOnIdle change
5823         by Filip Spacek.
5824
5825         * Api/BackingStore.cpp:
5826         (BlackBerry::WebKit::BackingStore::hasBlitJobs):
5827         (BlackBerry::WebKit::BackingStore::blitOnIdle):
5828         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
5829         (BlackBerry::WebKit::BackingStorePrivate::drawSubLayers):
5830         (BlackBerry::WebKit::BackingStorePrivate::drawAndBlendLayersForDirectRendering):
5831         (BlackBerry::WebKit::BackingStorePrivate::surfaceSize):
5832         (BlackBerry::WebKit::BackingStorePrivate::buffer):
5833         * Api/WebPage.cpp:
5834         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
5835         (BlackBerry::WebKit::WebPagePrivate::drawLayersOnCommit):
5836         (BlackBerry::WebKit::WebPagePrivate::setCompositor):
5837         (BlackBerry::WebKit::WebPagePrivate::setRootLayerCompositingThread):
5838         (BlackBerry::WebKit::WebPagePrivate::createCompositor):
5839         (BlackBerry::WebKit::WebPagePrivate::destroyCompositor):
5840         * Api/WebPage.h:
5841         * Api/WebPageCompositor.cpp:
5842         (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
5843         (BlackBerry::WebKit::WebPageCompositorPrivate::setContext):
5844         (BlackBerry::WebKit::WebPageCompositorPrivate::hardwareCompositing):
5845         (BlackBerry::WebKit::WebPageCompositorPrivate::setRootLayer):
5846         (BlackBerry::WebKit::WebPageCompositorPrivate::render):
5847         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
5848         (BlackBerry::WebKit::WebPageCompositorPrivate::animationTimerFired):
5849         (BlackBerry::WebKit::WebPageCompositorPrivate::compositorDestroyed):
5850         (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor):
5851         (BlackBerry::WebKit::WebPageCompositor::~WebPageCompositor):
5852         (BlackBerry::WebKit::WebPageCompositor::client):
5853         (BlackBerry::WebKit::WebPageCompositor::prepareFrame):
5854         (BlackBerry::WebKit::WebPageCompositor::render):
5855         (BlackBerry::WebKit::WebPageCompositor::cleanup):
5856         (BlackBerry::WebKit::WebPageCompositor::contextLost):
5857         * Api/WebPageCompositor.h: Added.
5858         * Api/WebPageCompositorClient.h: Added.
5859         * Api/WebPageCompositor_p.h:
5860         (BlackBerry::WebKit::WebPageCompositorPrivate::create):
5861         (BlackBerry::WebKit::WebPageCompositorPrivate::context):
5862         (BlackBerry::WebKit::WebPageCompositorPrivate::animationFrameTimestamp):
5863         (BlackBerry::WebKit::WebPageCompositorPrivate::page):
5864         (BlackBerry::WebKit::WebPageCompositorPrivate::client):
5865         * Api/WebPage_p.h:
5866         (BlackBerry::WebKit::WebPagePrivate::client):
5867         (BlackBerry::WebKit::WebPagePrivate::isAcceleratedCompositingActive):
5868         (BlackBerry::WebKit::WebPagePrivate::compositor):
5869
5870 2012-03-22  Charles Wei  <charles.wei@torchmobile.com.cn>
5871
5872         [BlackBerry] Need to store the meta info of a page in the ViewState of the history
5873         https://bugs.webkit.org/show_bug.cgi?id=82000
5874
5875         Reviewed by Rob Buis.
5876
5877         Internally reviewed by George Staikos.
5878
5879         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
5880         (WebCore::FrameLoaderClientBlackBerry::saveViewStateToItem):
5881         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
5882
5883 2012-03-22  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
5884
5885         [BlackBerry] add interface clearCredentials() and clearNeverRememberSites()
5886         https://bugs.webkit.org/show_bug.cgi?id=81887
5887
5888         Reviewed by Rob Buis.
5889
5890         Added two interface functions clearCredentials() and
5891         clearNeverRememberSites() into class WebPage, which
5892         should be used by UI to clear the stored credential
5893         information and never remember sites.
5894         Also implemented the corresponding functions in class
5895         CredentialManager to call CredentialBackingStore
5896         to perform the actual clear table work.
5897
5898         * Api/WebPage.cpp:
5899         (BlackBerry::WebKit::WebPage::clearCredentials):
5900         (WebKit):
5901         (BlackBerry::WebKit::WebPage::clearNeverRememberSites):
5902         * Api/WebPage.h:
5903         * WebCoreSupport/CredentialManager.cpp:
5904         (WebCore::CredentialManager::clearCredentials):
5905         (WebCore):
5906         (WebCore::CredentialManager::clearNeverRememberSites):
5907         * WebCoreSupport/CredentialManager.h:
5908         (CredentialManager):
5909
5910 2012-03-22  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
5911
5912         [BlackBerry] http authenticate dialog popup only once no matter authentication pass or fail
5913         https://bugs.webkit.org/show_bug.cgi?id=80135
5914
5915         Reviewed by Rob Buis.
5916
5917         Modified the interface function authenticationChallenge() in
5918         class WebPagePrivate by returning a bool to indicate if user
5919         pressed Ok button or not, and moved the Credential from return
5920         value to the reference parameter.
5921         Also updated the corresponding interface functions in class
5922         WebPageClient.
5923
5924         * Api/WebPage.cpp:
5925         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
5926         * Api/WebPageClient.h:
5927         * Api/WebPage_p.h:
5928         (WebPagePrivate):
5929
5930 2012-03-22  Mike Lattanzio  <mlattanzio@rim.com>
5931
5932         [BlackBerry] DeviceDPI Scaling is broken on mobile.
5933         https://bugs.webkit.org/show_bug.cgi?id=81966
5934
5935         Fix our viewport argument handling to only override the
5936         targetDensityDpi on tablet devices. Allow WebCore to use
5937         dpi scaling for smaller screen mobile devices.
5938
5939         Reviewed by Rob Buis.
5940
5941         * Api/WebPage.cpp:
5942         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
5943
5944 2012-03-22  Mike Fenton  <mifenton@rim.com>
5945
5946         [BlackBerry] Add pattern matching for hexadecimal type input fields
5947         https://bugs.webkit.org/show_bug.cgi?id=81944
5948
5949         Reviewed by Rob Buis.
5950
5951         PR 98504.
5952
5953         Add mapping of patterns matching hexadecimal input
5954         to a specialized type and provide input styling based
5955         on that format.
5956
5957         Reviewed Internally by Gen Mak.
5958
5959         * WebKitSupport/DOMSupport.cpp:
5960         (BlackBerry::WebKit::DOMSupport::elementPatternIndicatesHexadecimal):
5961         (DOMSupport):
5962         * WebKitSupport/DOMSupport.h:
5963         * WebKitSupport/InputHandler.cpp:
5964         (BlackBerry::WebKit::convertInputType):
5965         (BlackBerry::WebKit::inputStyle):
5966
5967 2012-03-22  Mike Fenton  <mifenton@rim.com>
5968
5969         [BlackBerry] DOMSupport isPositionInNode should have early returns for null nodes
5970         https://bugs.webkit.org/show_bug.cgi?id=81929
5971
5972         Reviewed by Rob Buis.
5973
5974         Make suggested style clean up and move int offset = 0 directly
5975         above is actual usage.
5976
5977         * WebKitSupport/DOMSupport.cpp:
5978         (BlackBerry::WebKit::DOMSupport::isPositionInNode):
5979
5980 2012-03-22  Mike Fenton  <mifenton@rim.com>
5981
5982         [BlackBerry] DOMSupport isPositionInNode should have early returns for null nodes
5983         https://bugs.webkit.org/show_bug.cgi?id=81929
5984
5985         Reviewed by Rob Buis.
5986
5987         Add early returns in isPositionInNode when either
5988         node or the position node is null.
5989
5990         * WebKitSupport/DOMSupport.cpp:
5991         (BlackBerry::WebKit::DOMSupport::isPositionInNode):
5992
5993 2012-03-21  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
5994
5995         [BlackBerry] Credential save and autofill implemetation
5996         https://bugs.webkit.org/show_bug.cgi?id=80401
5997
5998         Reviewed by Rob Buis.
5999
6000         This patch is intended to implement the credential persist
6001         and autofill feature for BlackBerry porting.
6002
6003         Moved interface authenticationChallenge() from class
6004         FrameLoaderClientBlackBerry to WebPagePrivate (derived from
6005         PageClientBlackBerry as changes made in its parent interface class);
6006         Implemented notifyShouldSaveCredential() in WebPagePrivate
6007         and WebPageClient as well.
6008         Added credentialManager() to retrive CredentialManager instance
6009         as a global singleton; removed its m_frameLoaderClient which is
6010         replaced with a passed in PageClientBlackBerry pointer, and modified
6011         the interface function accordingly.
6012
6013         For the http authentication, autofill the input dialog in
6014         function authenticationChallenge() and save the credential
6015         information in the same function;
6016         For the in-form authentication, autofill the username and
6017         password input fields in function dispatchDidFinishLoad(),
6018         and save the credential information in function
6019         dispatchWillSubmitForm() or dispatchWillSendSubmitEvent().
6020
6021         * Api/WebPage.cpp:
6022         (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
6023         (WebKit):
6024         (BlackBerry::WebKit::WebPagePrivate::notifyShouldSaveCredential):
6025         * Api/WebPageClient.h:
6026         * Api/WebPage_p.h:
6027         (WebPagePrivate):
6028         * WebCoreSupport/CredentialManager.cpp:
6029         (WebCore::credentialManager):
6030         (WebCore::CredentialManager::saveCredentialIfConfirmed):
6031         * WebCoreSupport/CredentialManager.h:
6032         (CredentialManager):
6033         (WebCore::CredentialManager::CredentialManager):
6034         (WebCore):
6035         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
6036         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFinishLoad):
6037         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSubmitForm):
6038         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendSubmitEvent):
6039         (WebCore):
6040         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
6041         (FrameLoaderClientBlackBerry):
6042
6043 2012-03-20  Jacky Jiang  <zhajiang@rim.com>
6044
6045         [BlackBerry] Dijit crash WebCore::CookieManager::getRawCookies
6046         https://bugs.webkit.org/show_bug.cgi?id=81686
6047
6048         Reviewed by Rob Buis.
6049
6050         When deciding the policy for navigation action, if the url of the
6051         request is null, ignore it to avoid the ASSERT failure in
6052         MainResourceLoader::willSendRequest.
6053
6054         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
6055         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction):
6056
6057 2012-03-20  Konrad Piascik  <kpiascik@rim.com>
6058
6059         [BlackBerry] BlackBerry can clear cookies and cache from the Web Inspector
6060         https://bugs.webkit.org/show_bug.cgi?id=81670
6061
6062         Reviewed by Rob Buis.
6063
6064         * WebCoreSupport/InspectorClientBlackBerry.h:
6065         (WebCore::InspectorClientBlackBerry::canClearBrowserCache):
6066         (WebCore::InspectorClientBlackBerry::canClearBrowserCookies):
6067
6068 2012-03-20  Nima Ghanavatian  <nghanavatian@rim.com>
6069
6070         [BlackBerry] Removing doubly defined methods in BackingStore.cpp
6071         https://bugs.webkit.org/show_bug.cgi?id=81664
6072
6073         Reviewed by Rob Buis.
6074
6075         * Api/BackingStore.cpp:
6076         (BlackBerry::WebKit::BackingStorePrivate::drawAndBlendLayersForDirectRendering):
6077
6078 2012-03-20  Mike Fenton  <mifenton@rim.com>
6079
6080         [BlackBerry] Crash when dragging the FCC caret over an invalid node.
6081         https://bugs.webkit.org/show_bug.cgi?id=81654
6082
6083         Reviewed by Rob Buis.
6084
6085         PR 144505.
6086
6087         The position did not have a valid container node and was causing
6088         a crash.  Validate the node pointer before using it.
6089
6090         * WebKitSupport/DOMSupport.cpp:
6091         (BlackBerry::WebKit::DOMSupport::DOMContainerNodeForPosition):
6092
6093 2012-03-20  Jason Liu  <jason.liu@torchmobile.com.cn>
6094
6095         [BlackBerry]Cookies shouldn't be set into each of webcore's request and platform's request. And this makes a regression.
6096         https://bugs.webkit.org/show_bug.cgi?id=80800
6097
6098         Reviewed by George Staikos.
6099
6100         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
6101         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction):
6102         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendRequest):
6103         (WebCore::FrameLoaderClientBlackBerry::decidePolicyForExternalLoad):
6104
6105 2012-03-19  Adam Barth  <abarth@webkit.org>
6106
6107         Remove support for "magic" iframe
6108         https://bugs.webkit.org/show_bug.cgi?id=81590
6109
6110         Reviewed by Eric Seidel.
6111
6112         Remove FrameLoaderClient methods that no longer exist.
6113
6114         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
6115         (WebCore):
6116         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
6117         (FrameLoaderClientBlackBerry):
6118         (WebCore::FrameLoaderClientBlackBerry::didDetectXSS):
6119
6120 2012-03-19  Tyler Abbott  <tabbott@rim.com>
6121
6122         [BlackBerry] speed up text selection for large selections
6123         https://bugs.webkit.org/show_bug.cgi?id=81536
6124
6125         When selecting large disjoint areas of text the cost
6126         of calculating the IntRectRegion union becomes very
6127         expensive. Simply placing all of the text quads into
6128         the IntRectRegion is faster despite the larger memory
6129         footprint and the additional calculations at render
6130         time.
6131
6132         Reviewed by Rob Buis.
6133
6134         * WebKitSupport/SelectionHandler.cpp:
6135         (BlackBerry::WebKit::SelectionHandler::getConsolidatedRegionOfTextQuadsForSelection):
6136
6137 2012-03-19  Mike Lattanzio  <mlattanzio@rim.com>
6138
6139         [BlackBerry] Use BlackBerry::Platform::DeviceInfo to generate UserAgent
6140         https://bugs.webkit.org/show_bug.cgi?id=81269
6141
6142         Generate the UserAgent lazily, using it as the default for the
6143         WebSettings object. BlackBerry::Platform::DeviceInfo is used
6144         to ensure the information is accurate to the specific device.
6145
6146         Remove the !isEmpty() assert when fetching the UA from the
6147         WebSettings object, as it will now always be properly initialized.
6148
6149         Add a static initializer block to ensure defaultUserAgent() is
6150         thread-safe from that moment onward.
6151
6152         Reviewed by Rob Buis.
6153
6154         * Api/WebPage.cpp:
6155         (WebKit):
6156         (BlackBerry::WebKit::WebPagePrivate::init):
6157         (BlackBerry::WebKit::WebPagePrivate::defaultUserAgent):
6158         * Api/WebPage_p.h:
6159         (WebPagePrivate):
6160         * Api/WebSettings.cpp:
6161         (BlackBerry::WebKit::WebSettings::setUserAgentString):
6162         * Api/WebSettings.h:
6163
6164 2012-03-19  Mike Fenton  <mifenton@rim.com>
6165
6166         [BlackBerry] Input fields with id of e-mail and url should be styled as such.
6167         https://bugs.webkit.org/show_bug.cgi?id=81364
6168
6169         Reviewed by Rob Buis.
6170
6171         Be less aggressive on matching url, and update as suggested by Rob.
6172
6173         * WebKitSupport/DOMSupport.cpp:
6174         (BlackBerry::WebKit::DOMSupport::matchesReservedStringUrl):
6175         * WebKitSupport/InputHandler.cpp:
6176         (BlackBerry::WebKit::inputStyle):
6177
6178 2012-03-19  Arvid Nilsson  <anilsson@rim.com>
6179
6180         [BlackBerry] Remove obsolete optimization in WebPageCompositorPrivate
6181         https://bugs.webkit.org/show_bug.cgi?id=81115
6182
6183         Reviewed by Benjamin Poulain.
6184
6185         The compositor tried to avoid rendering the same stuff twice, using a
6186         mechanism that didn't work properly and has been redundant since we
6187         introduced deferred blits. Remove this code.
6188
6189         Reviewed internally by Robin Cao.
6190
6191         * Api/WebPageCompositor.cpp:
6192         (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
6193         (BlackBerry::WebKit::WebPageCompositorPrivate::commit):
6194         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
6195         * Api/WebPageCompositor_p.h:
6196
6197 2012-03-17  Charles Wei  <charles.wei@torchmobile.com.cn>
6198
6199         [BlackBerry] Enable Web Timing for performance profiling and improvement.
6200         https://bugs.webkit.org/show_bug.cgi?id=81085
6201
6202         Reviewed by Rob Buis.
6203
6204         * Api/WebPage.cpp:
6205         (BlackBerry::WebKit::WebPagePrivate::init):
6206
6207 2012-03-16  Arvid Nilsson  <anilsson@rim.com>
6208
6209         [BlackBerry] Rename the existing WebPageCompositor class to WebPageCompositorPrivate
6210         https://bugs.webkit.org/show_bug.cgi?id=81108
6211         RIM PR: 136687
6212
6213         Reviewed by Rob Buis.
6214
6215         This is done in anticipation of a new WebPageCompositor class in the
6216         public API. The existing internal class will serve to d-pointerize the
6217         new public API. In addition, it is and will be possible to create only
6218         the private class, for cases where existing code paths require
6219         OpenGL compositing (i.e. due to accelerated compositing layers being
6220         added to the page).
6221
6222         Reviewed internally by Robin Cao.
6223
6224         * Api/BackingStore.h:
6225         * Api/WebPage.cpp:
6226         (BlackBerry::WebKit::WebPagePrivate::setIsAcceleratedCompositingActive):
6227         * Api/WebPageCompositor.cpp: Renamed from Source/WebKit/blackberry/WebKitSupport/WebPageCompositor.cpp.
6228         (BlackBerry::WebKit::WebPageCompositorPrivate::WebPageCompositorPrivate):
6229         (BlackBerry::WebKit::WebPageCompositorPrivate::~WebPageCompositorPrivate):
6230         (BlackBerry::WebKit::WebPageCompositorPrivate::hardwareCompositing):
6231         (BlackBerry::WebKit::WebPageCompositorPrivate::setRootLayer):
6232         (BlackBerry::WebKit::WebPageCompositorPrivate::setBackingStoreUsesOpenGL):
6233         (BlackBerry::WebKit::WebPageCompositorPrivate::commit):
6234         (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
6235         (BlackBerry::WebKit::WebPageCompositorPrivate::releaseLayerResources):
6236         (BlackBerry::WebKit::WebPageCompositorPrivate::animationTimerFired):
6237         * Api/WebPageCompositor_p.h: Renamed from Source/WebKit/blackberry/WebKitSupport/WebPageCompositor.h.
6238         (BlackBerry::WebKit::WebPageCompositorPrivate::layoutRectForCompositing):
6239         (BlackBerry::WebKit::WebPageCompositorPrivate::setLayoutRectForCompositing):
6240         (BlackBerry::WebKit::WebPageCompositorPrivate::contentsSizeForCompositing):
6241         (BlackBerry::WebKit::WebPageCompositorPrivate::setContentsSizeForCompositing):
6242         (BlackBerry::WebKit::WebPageCompositorPrivate::lastCompositingResults):
6243         (BlackBerry::WebKit::WebPageCompositorPrivate::setLastCompositingResults):
6244         * Api/WebPage_p.h:
6245         * CMakeListsBlackBerry.txt:
6246
6247 2012-03-16  Nima Ghanavatian  <nghanavatian@rim.com>
6248
6249         [BlackBerry] Syncing up left over bits in WebKitSupport from our local branch to upstream
6250         https://bugs.webkit.org/show_bug.cgi?id=81118
6251
6252         Reviewed by Rob Buis.
6253
6254         This is a consolidation of various changes that are in our local dev branch
6255         but do not appear in our upstreamed port.
6256
6257         * WebKitSupport/DumpRenderTreeSupport.cpp:
6258         (DumpRenderTreeSupport::computedStyleIncludingVisitedInfo):
6259         * WebKitSupport/FatFingers.cpp:
6260         (BlackBerry::WebKit::FatFingers::isElementClickable):
6261         * WebKitSupport/InputHandler.cpp:
6262         (BlackBerry::WebKit::InputHandler::spannableTextInRange):
6263         * WebKitSupport/SurfacePool.cpp:
6264         (BlackBerry::WebKit::SurfacePool::createBuffers):
6265         (BlackBerry::WebKit::SurfacePool::releaseBuffers):
6266         * WebKitSupport/TouchEventHandler.cpp:
6267         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
6268         (BlackBerry::WebKit::TouchEventHandler::handleFatFingerPressed):
6269         * WebKitSupport/WebPageCompositor.cpp:
6270         (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor):
6271         * WebKitSupport/WebPageCompositor.h:
6272         (WebPageCompositor):
6273
6274 2012-03-16  Nima Ghanavatian  <nghanavatian@rim.com>
6275
6276         [BlackBerry] Syncing up left over bits in WebCoreSupport from our local branch to upstream
6277         https://bugs.webkit.org/show_bug.cgi?id=81120
6278
6279         Reviewed by Rob Buis.
6280
6281         This is a consolidation of various changes that are in our local dev branch
6282         but do not appear in our upstreamed port.
6283
6284         * WebCoreSupport/AboutDataEnableFeatures.in:
6285         * WebCoreSupport/AboutDataHaveFeatures.in:
6286         * WebCoreSupport/AboutDataUseFeatures.in:
6287         * WebCoreSupport/ChromeClientBlackBerry.cpp:
6288         (WebCore::ChromeClientBlackBerry::hasOpenedPopup):
6289         (WebCore):
6290         (WebCore::ChromeClientBlackBerry::screenToRootView):
6291         (WebCore::ChromeClientBlackBerry::rootViewToScreen):
6292         (WebCore::ChromeClientBlackBerry::invalidateRootView):
6293         (WebCore::ChromeClientBlackBerry::invalidateContentsAndRootView):
6294         (WebCore::ChromeClientBlackBerry::invalidateContentsForSlowScroll):
6295         (WebCore::ChromeClientBlackBerry::scrollableAreasDidChange):
6296         (WebCore::ChromeClientBlackBerry::createColorChooser):
6297         * WebCoreSupport/ChromeClientBlackBerry.h:
6298         (ChromeClientBlackBerry):
6299         (WebCore::ChromeClientBlackBerry::numTouchEventHandlersChanged):
6300         * WebCoreSupport/EditorClientBlackBerry.cpp:
6301         (WebCore::EditorClientBlackBerry::registerUndoStep):
6302         (WebCore::EditorClientBlackBerry::registerRedoStep):
6303         (WebCore::EditorClientBlackBerry::undo):
6304         (WebCore::EditorClientBlackBerry::redo):
6305         * WebCoreSupport/EditorClientBlackBerry.h:
6306         (EditorClientBlackBerry):
6307         * WebCoreSupport/GeolocationControllerClientBlackBerry.cpp:
6308         (GeolocationControllerClientBlackBerry::requestPermission):
6309         (GeolocationControllerClientBlackBerry::cancelPermissionRequest):
6310         * WebCoreSupport/GeolocationControllerClientBlackBerry.h:
6311         * WebCoreSupport/InspectorClientBlackBerry.cpp:
6312         (WebCore::InspectorClientBlackBerry::closeInspectorFrontend):
6313         (WebCore):
6314         (WebCore::InspectorClientBlackBerry::bringFrontendToFront):
6315         * WebCoreSupport/InspectorClientBlackBerry.h:
6316         (InspectorClientBlackBerry):
6317         * WebCoreSupport/NotificationPresenterImpl.cpp:
6318         (WebCore::NotificationPresenterImpl::show):
6319
6320 2012-03-16  Mike Fenton  <mifenton@rim.com>
6321
6322         [BlackBerry] Input fields with id of e-mail and url should be styled as such.
6323         https://bugs.webkit.org/show_bug.cgi?id=81364
6324
6325         Reviewed by Rob Buis.
6326
6327         Treat fields that have name/id's that match url or
6328         email as url or email fields providing the appropriate
6329         keyboard.
6330
6331         PR 137259.
6332
6333         Reviewed Internally by Gen Mak and Nima Ghanavatian.
6334
6335         * WebKitSupport/DOMSupport.cpp:
6336         (BlackBerry::WebKit::DOMSupport::matchesReservedStringEmail):
6337         (DOMSupport):
6338         (BlackBerry::WebKit::DOMSupport::matchesReservedStringUrl):
6339         (BlackBerry::WebKit::DOMSupport::elementIdOrNameIndicatesEmail):
6340         (BlackBerry::WebKit::DOMSupport::elementIdOrNameIndicatesUrl):
6341         (BlackBerry::WebKit::DOMSupport::matchesReservedStringPreventingAutocomplete):
6342         * WebKitSupport/DOMSupport.h:
6343         (WebCore):
6344         * WebKitSupport/InputHandler.cpp:
6345         (BlackBerry::WebKit::convertInputType):
6346         (BlackBerry::WebKit::inputStyle):
6347
6348 2012-03-16  Nima Ghanavatian  <nghanavatian@rim.com>
6349
6350         [BlackBerry] Syncing up left over bits in Api from our local branch to upstream
6351         https://bugs.webkit.org/show_bug.cgi?id=81105
6352
6353         Reviewed by Rob Buis.
6354
6355         This patches fixes up a previous sync done in this directory and adds some new bits
6356         as well.  This is accurate as of ddea1528b37b29925638fe1183318b3c3994f1f8 in our
6357         local repo.
6358
6359         * Api/BackingStore.cpp:
6360         (BlackBerry::WebKit::BackingStorePrivate::drawAndBlendLayersForDirectRendering):
6361         (WebKit):
6362         (BlackBerry::WebKit::BackingStorePrivate::drawLayersOnCommitIfNeeded):
6363         * Api/WebPage.cpp:
6364         (BlackBerry::WebKit::WebPagePrivate::webContext):
6365         (BlackBerry::WebKit::WebPage::webContext):
6366         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
6367         * Api/WebPage.h:
6368         * Api/WebPage_p.h:
6369         (WebPagePrivate):
6370
6371 2012-03-16  Mike Fenton  <mifenton@rim.com>
6372
6373         [BlackBerry] Input processing mode should be cancelled when processing hot keys
6374         https://bugs.webkit.org/show_bug.cgi?id=81348
6375
6376         Reviewed by Rob Buis.
6377
6378         Don't suppress IMF notifications if we are handling
6379         the event as a hotkey.
6380
6381         Reviewed Internally by Nima Ghanavatian.
6382
6383         * WebCoreSupport/EditorClientBlackBerry.cpp:
6384         (WebCore::EditorClientBlackBerry::handleKeyboardEvent):
6385
6386 2012-03-16  Robin Cao  <robin.cao@torchmobile.com.cn>
6387
6388         [BlackBerry] Can not open certain links from bridge applications
6389         https://bugs.webkit.org/show_bug.cgi?id=81197
6390
6391         Reviewed by Rob Buis.
6392
6393         Currently, the engine asks the client to handle some type of requests externally.
6394         But WebPageClient::handleStringPattern is not yet implemented and exposed to
6395         the client. Before that, we still need to give the client a chance to decide
6396         how to handle requests such as 'mailto:'.
6397
6398         To address this problem, r108763 introduced a change that ask the client to
6399         decide how to handle the navigation in dispatchDecidePolicyForNewWindowAction().
6400         This is not intuitive and will bring troubles, because this navigation will
6401         happen in the new page. So the new page client is to decide how to handle
6402         the navigation, not the old one.
6403
6404         This patch reverts r108763 and skips calling WebPageClient::handleStringPattern
6405         since it's not implemented.
6406
6407         This way the new window action will continue, and the logic in
6408         dispatchDecidePolicyForNavigationAction() will handle the navigation correctly.
6409
6410         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
6411         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNewWindowAction):
6412         (WebCore::FrameLoaderClientBlackBerry::decidePolicyForExternalLoad):
6413
6414 2012-03-16  Leo Yang  <leo.yang@torchmobile.com.cn>
6415
6416         [BlackBerry] Crash when going back from an xhtml document containing <img>
6417         https://bugs.webkit.org/show_bug.cgi?id=81297
6418
6419         Reviewed by Rob Buis.
6420
6421         This is manually reverting the offending internal commit which checked-in before upstreaming.
6422
6423         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
6424         (WebCore::FrameLoaderClientBlackBerry::canCachePage):
6425
6426 2012-03-16  Genevieve Mak  <gmak@rim.com>
6427
6428         [BlackBerry] viewportRect has changed to viewportSize
6429         https://bugs.webkit.org/show_bug.cgi?id=81262
6430
6431         Reviewed by Antonio Gomes.
6432
6433         Set size instead of rect in constructor.
6434         * WebKitSupport/InRegionScrollableArea.cpp:
6435         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
6436
6437 2012-03-16  Andrew Lo  <anlo@rim.com>
6438
6439         [BlackBerry] Enable PAGE_VISIBILITY_API
6440         https://bugs.webkit.org/show_bug.cgi?id=81257
6441
6442         Set Page visibility state for BlackBerry port.
6443
6444         Reviewed by Rob Buis.
6445
6446         * Api/WebPage.cpp:
6447         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
6448         (WebKit):
6449         (BlackBerry::WebKit::WebPagePrivate::setPageVisibilityState):
6450         (BlackBerry::WebKit::WebPagePrivate::setVisible):
6451         (BlackBerry::WebKit::WebPage::setVisible):
6452         (BlackBerry::WebKit::WebPagePrivate::notifyAppActivationStateChange):
6453         (BlackBerry::WebKit::WebPage::notifyAppActivationStateChange):
6454         * Api/WebPage_p.h:
6455         (WebPagePrivate):
6456
6457 2012-03-14  Arvid Nilsson  <anilsson@rim.com>
6458
6459         [BlackBerry] Make sure WebPage and BackingStore don't crash without a Window
6460         https://bugs.webkit.org/show_bug.cgi?id=81099
6461
6462         Reviewed by Rob Buis.
6463
6464         Also rename the "compositing/blitting to main window" variables to
6465         instead refer to OpenGL compositing. The code paths it triggers are
6466         related to the BackingStore using OpenGL compositing, and can be useful
6467         even when there's no window.
6468
6469         * Api/BackingStore.cpp:
6470         (BlackBerry::WebKit::BackingStorePrivate::isOpenGLCompositing):
6471         (BlackBerry::WebKit::BackingStorePrivate::render):
6472         (BlackBerry::WebKit::BackingStorePrivate::copyPreviousContentsToBackSurfaceOfWindow):
6473         (BlackBerry::WebKit::BackingStorePrivate::paintDefaultBackground):
6474         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
6475         (BlackBerry::WebKit::BackingStorePrivate::blitTileRect):
6476         (BlackBerry::WebKit::BackingStorePrivate::blendCompositingSurface):
6477         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
6478         (BlackBerry::WebKit::BackingStorePrivate::blitToWindow):
6479         (BlackBerry::WebKit::BackingStorePrivate::checkerWindow):
6480         (BlackBerry::WebKit::BackingStorePrivate::invalidateWindow):
6481         (BlackBerry::WebKit::BackingStorePrivate::clearWindow):
6482         (BlackBerry::WebKit::BackingStorePrivate::drawSubLayers):
6483         (BlackBerry::WebKit::BackingStorePrivate::surfaceSize):
6484         (BlackBerry::WebKit::BackingStorePrivate::buffer):
6485         * Api/BackingStore_p.h:
6486         * Api/WebPage.cpp:
6487         (BlackBerry::WebKit::WebPagePrivate::didPluginEnterFullScreen):
6488         (BlackBerry::WebKit::WebPagePrivate::didPluginExitFullScreen):
6489         (BlackBerry::WebKit::WebPagePrivate::drawLayersOnCommit):
6490         (BlackBerry::WebKit::WebPagePrivate::drawSubLayers):
6491         (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
6492         * WebCoreSupport/ChromeClientBlackBerry.cpp:
6493         (WebCore::ChromeClientBlackBerry::windowRect):
6494         (WebCore::ChromeClientBlackBerry::screenToWindow):
6495         (WebCore::ChromeClientBlackBerry::windowToScreen):
6496         * WebKitSupport/GLES2Context.cpp:
6497         (BlackBerry::WebKit::GLES2Context::GLES2Context):
6498         * WebKitSupport/TouchEventHandler.h:
6499         * WebKitSupport/WebPageCompositor.cpp:
6500         (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor):
6501         (BlackBerry::WebKit::WebPageCompositor::setBackingStoreUsesOpenGL):
6502         (BlackBerry::WebKit::WebPageCompositor::drawLayers):
6503         * WebKitSupport/WebPageCompositor.h:
6504
6505 2012-03-13  Jon Lee  <jonlee@apple.com>
6506
6507         Separate NOTIFICATIONS and LEGACY_NOTIFICATIONS
6508         https://bugs.webkit.org/show_bug.cgi?id=80922
6509         <rdar://problem/11035082>
6510
6511         Reviewed by Jian Li.
6512
6513         You can include either NOTIFICATIONS or LEGACY_NOTIFICATIONS and have a complete API.
6514         LEGACY_NOTIFICATIONS should cover all of the previous functionality, and NOTIFICATIONS will cover the
6515         new API. Therefore, APIs that are common between the two will have:
6516         #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
6517
6518         This patch initially sets both to be exactly the same. As other bugs with patches begin to migrate to
6519         the new API, the defines will begin to split. This allows ports to decide which set of APIs to include.
6520
6521         Update everything to be #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
6522         * Api/WebPage.cpp:
6523         (BlackBerry::WebKit::WebPagePrivate::init):
6524         * WebCoreSupport/NotificationPresenterImpl.cpp:
6525         * WebCoreSupport/NotificationPresenterImpl.h:
6526
6527 2012-03-14  Nima Ghanavatian  <nghanavatian@rim.com>
6528
6529         [BlackBerry] Syncing up left over bits in Api from our local branch to upstream
6530         https://bugs.webkit.org/show_bug.cgi?id=81105
6531
6532         Reviewed by Rob Buis.
6533
6534         * Api/BackingStore.cpp:
6535         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
6536         (BlackBerry::WebKit::BackingStorePrivate::isActive):
6537         (BlackBerry::WebKit::BackingStore::createBackingStoreMemory):
6538         (WebKit):
6539         (BlackBerry::WebKit::BackingStore::releaseBackingStoreMemory):
6540         * Api/BackingStore.h:
6541         * Api/WebPage.cpp:
6542         (BlackBerry::WebKit::toWebCoreMouseEventType):
6543         (BlackBerry::WebKit::WebPagePrivate::init):
6544         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
6545         (BlackBerry::WebKit::WebPagePrivate::activeNodeContext):
6546         (BlackBerry::WebKit::WebPage::activeNodeContext):
6547         (BlackBerry::WebKit::WebPagePrivate::updateCursor):
6548         (BlackBerry::WebKit::WebPagePrivate::contextNode):
6549         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
6550         * Api/WebPage.h:
6551         * Api/WebPage_p.h:
6552         (WebPagePrivate):
6553
6554 2012-03-14  Andrew Lo  <anlo@rim.com>
6555
6556         [BlackBerry] Implement REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR using AnimationFrameRateController
6557         https://bugs.webkit.org/show_bug.cgi?id=81000
6558
6559         Set the platform display ID, needed for DisplayRefreshMonitor.
6560
6561         Reviewed by Antonio Gomes.
6562
6563         * Api/WebPage.cpp:
6564         (BlackBerry::WebKit::WebPagePrivate::init):
6565
6566 2012-03-14  Leo Yang  <leo.yang@torchmobile.com.cn>
6567
6568         [BlackBerry] Upstream the BlackBerry change to platform/Cursor.h
6569         https://bugs.webkit.org/show_bug.cgi?id=81086
6570
6571         Reviewed by Rob Buis.
6572
6573         There was an alias named PlatformCursorHandle for PlatformCursor
6574         in the internal version of Cursor.h. But it's not necessary so it's
6575         not included in the upstreaming version of Cursor.h. As a result,
6576         use PlatformCursor directly.
6577
6578         * Api/WebPage.cpp:
6579         (BlackBerry::WebKit::WebPagePrivate::setCursor):
6580         * Api/WebPage_p.h:
6581         (WebPagePrivate):
6582
6583 2012-03-13  Mike Fenton  <mifenton@rim.com>
6584
6585         [BlackBerry] Input focus state should unfocus the frame selection instead of the field.
6586         https://bugs.webkit.org/show_bug.cgi?id=81023
6587
6588         Reviewed by Antonio Gomes.
6589
6590         PR 137400.
6591
6592         Prevent cursor drawing by unfocusing the frame selection
6593         when input mode is not ready.
6594
6595         Greatly simplify the decision to focus input fields by removing
6596         all ties to the page load state and base it on input.  Input mode
6597         is disabled when a page load begins and enabled on any user input.
6598
6599         The field is focused and ready for input immediately, only the
6600         frame selection (or cursor) is unfocused.
6601
6602         Reviewed Internally by Gen Mak, Antonio Gomes and Nima Ghanavatian.
6603
6604         * Api/WebPage.cpp:
6605         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
6606         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
6607         * Api/WebPageClient.h:
6608         * WebCoreSupport/EditorClientBlackBerry.cpp:
6609         (WebCore::EditorClientBlackBerry::shouldBeginEditing):
6610         * WebKitSupport/InputHandler.cpp:
6611         (BlackBerry::WebKit::InputHandler::InputHandler):
6612         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
6613         (BlackBerry::WebKit::InputHandler::enableInputMode):
6614         (BlackBerry::WebKit::InputHandler::setElementFocused):
6615         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
6616         (BlackBerry::WebKit::InputHandler::notifyClientOfKeyboardVisibilityChange):
6617         (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
6618         (BlackBerry::WebKit::InputHandler::setComposingText):
6619         * WebKitSupport/InputHandler.h:
6620         (InputHandler):
6621         * WebKitSupport/TouchEventHandler.cpp:
6622         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
6623
6624 2012-03-13  Adam Barth  <abarth@webkit.org> && Benjamin Poulain  <bpoulain@apple.com>
6625
6626         Always enable ENABLE(CLIENT_BASED_GEOLOCATION)
6627         https://bugs.webkit.org/show_bug.cgi?id=78853
6628
6629         Reviewed by Adam Barth.
6630
6631         * Api/WebPage.cpp:
6632         (BlackBerry::WebKit::WebPagePrivate::init):
6633         * WebCoreSupport/AboutDataEnableFeatures.in:
6634         * WebCoreSupport/ChromeClientBlackBerry.cpp:
6635         * WebCoreSupport/ChromeClientBlackBerry.h:
6636         (ChromeClientBlackBerry):
6637         * WebKitSupport/DumpRenderTreeSupport.cpp:
6638         (toGeolocationClientMock):
6639         (DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests):
6640         (DumpRenderTreeSupport::resetGeolocationMock):
6641         (DumpRenderTreeSupport::setMockGeolocationError):
6642         (DumpRenderTreeSupport::setMockGeolocationPermission):
6643         (DumpRenderTreeSupport::setMockGeolocationPosition):
6644
6645 2012-03-13  Mike Lattanzio  <mlattanzio@rim.com>
6646
6647         Remove ActiveNodeContext in favour of BlackBerry::Platform::WebContext
6648         https://bugs.webkit.org/show_bug.cgi?id=80984
6649
6650         Remove ActiveNodeContext, and switch the implementation to
6651         provide a BlackBerry::Platform::WebContext. The new object
6652         adds an explicit IsImage flag, as well as IsAudio and IsVideo
6653         for the HTML5 elements.
6654
6655         Note that for many videos both IsVideo and IsAudio will be true,
6656         as videos typically have audio streams as well.
6657
6658         Reviewed by George Staikos.
6659
6660         * Api/ActiveNodeContext.h: Removed.
6661         * Api/WebPage.cpp:
6662         (BlackBerry::WebKit::WebPagePrivate::webContext):
6663         (BlackBerry::WebKit::WebPage::webContext):
6664         * Api/WebPage.h:
6665         * Api/WebPage_p.h:
6666
6667 2012-03-12  Andy Chen  <andchen@rim.com>
6668
6669         [Blackberry] Make the process of marking all matches interruptible and asynchronous for find-in-page
6670         https://bugs.webkit.org/show_bug.cgi?id=80831
6671
6672         Reviewed by Antonio Gomes.
6673
6674         * WebKitSupport/InPageSearchManager.cpp:
6675         (BlackBerry::WebKit::InPageSearchManager::DeferredScopeStringMatches::DeferredScopeStringMatches):
6676         (BlackBerry::WebKit::InPageSearchManager::DeferredScopeStringMatches::doTimeout):
6677         (BlackBerry::WebKit::InPageSearchManager::InPageSearchManager):
6678         (BlackBerry::WebKit::InPageSearchManager::~InPageSearchManager):
6679         (BlackBerry::WebKit::InPageSearchManager::findNextString):
6680         (BlackBerry::WebKit::InPageSearchManager::shouldSearchForText):
6681         (BlackBerry::WebKit::InPageSearchManager::findAndMarkText):
6682         (BlackBerry::WebKit::InPageSearchManager::clearTextMatches):
6683         (BlackBerry::WebKit::InPageSearchManager::frameUnloaded):
6684         (BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):
6685         (BlackBerry::WebKit::InPageSearchManager::scopeStringMatchesSoon):
6686         (BlackBerry::WebKit::InPageSearchManager::callScopeStringMatches):
6687         (BlackBerry::WebKit::InPageSearchManager::cancelPendingScopingEffort):
6688         * WebKitSupport/InPageSearchManager.h:
6689
6690 2012-03-09  Jon Lee  <jonlee@apple.com>
6691
6692         Rename NotificationPresenter to NotificationClient
6693         https://bugs.webkit.org/show_bug.cgi?id=80488
6694         <rdar://problem/10965558>
6695
6696         Reviewed by Kentaro Hara.
6697
6698         Refactor to use renamed WebCore::NotificationClient.
6699         * WebCoreSupport/NotificationPresenterImpl.cpp:
6700         (WebCore::NotificationPresenterImpl::instance):
6701         (WebCore::NotificationPresenterImpl::show):
6702         (WebCore::NotificationPresenterImpl::checkPermission):
6703         * WebCoreSupport/NotificationPresenterImpl.h:
6704         (NotificationPresenterImpl):
6705
6706 2012-03-09  Charles Wei  <charles.wei@torchmobile.com.cn>
6707
6708         [BlackBerry] Web Notification not working after rebase
6709         https://bugs.webkit.org/show_bug.cgi?id=80690
6710
6711         Reviewed by George Staikos.
6712
6713         1. NotificationPresenterImpl should be in namespace WebCore
6714         2. Need to connect NotificationPresenterImpl to webcore the new way:
6715            WebCore::provideNotification(Page*, NotificationPresenter*)
6716         3. Remove the old way of connecting the Notification:
6717            ChromeClientBlackBerry::notificationPresenter()
6718
6719         * Api/WebPage.cpp:
6720         (BlackBerry::WebKit::WebPagePrivate::init):
6721         * WebCoreSupport/ChromeClientBlackBerry.cpp:
6722         (WebCore):
6723         * WebCoreSupport/ChromeClientBlackBerry.h:
6724         (ChromeClientBlackBerry):
6725         * WebCoreSupport/NotificationPresenterImpl.cpp:
6726         * WebCoreSupport/NotificationPresenterImpl.h:
6727
6728 2012-03-08  Mike Fenton  <mifenton@rim.com>
6729
6730         [BlackBerry] Always use the current focused node when processing focus changes
6731         https://bugs.webkit.org/show_bug.cgi?id=80594
6732
6733         Reviewed by Antonio Gomes.
6734
6735         Guard against toRange or fromRange being null when called
6736         as part of a clear event.
6737
6738         * WebCoreSupport/EditorClientBlackBerry.cpp:
6739         (WebCore::EditorClientBlackBerry::shouldChangeSelectedRange):
6740
6741 2012-03-08  Yong Li  <yoli@rim.com>
6742
6743         [BlackBerry] Block file-to-file access by default
6744         https://bugs.webkit.org/show_bug.cgi?id=80605
6745
6746         Reviewed by Rob Buis.
6747
6748         Turn off allowFileAccessFromFileURLs() by default.
6749
6750         * Api/WebPage.cpp:
6751         (BlackBerry::WebKit::WebPagePrivate::init):
6752
6753 2012-03-08  Mike Fenton  <mifenton@rim.com>
6754
6755         [BlackBerry] Always use the current focused node when processing focus changes
6756         https://bugs.webkit.org/show_bug.cgi?id=80594
6757
6758         Reviewed by Antonio Gomes.
6759
6760         Update InputHandler focused node handling to strictly use
6761         the currently focused node.  This prevents a handling loop
6762         when JS is modifying the focus and we get a late notification
6763         of a past change from ChromeClientBlackBerry with the previously
6764         unfocused node.
6765
6766         * WebCoreSupport/ChromeClientBlackBerry.cpp:
6767         (WebCore::ChromeClientBlackBerry::focusedNodeChanged):
6768         * WebCoreSupport/EditorClientBlackBerry.cpp:
6769         (WebCore::EditorClientBlackBerry::shouldChangeSelectedRange):
6770         (WebCore::EditorClientBlackBerry::setInputMethodState):
6771         * WebKitSupport/InputHandler.cpp:
6772         (BlackBerry::WebKit::InputHandler::focusedNodeChanged):
6773         * WebKitSupport/InputHandler.h:
6774
6775 2012-03-07  Jacky Jiang  <zhajiang@rim.com>
6776
6777         [BlackBerry] WebKit rendering problem when show/hide VKB
6778         https://bugs.webkit.org/show_bug.cgi?id=80448
6779         RIM PR: 141727
6780
6781         Reviewed by Antonio Gomes.
6782
6783         When setting viewport size, layout happens inside
6784         WebPagePrivate::setDefaultLayoutSize(), in this way, the layout is
6785         outside of the code path of "needsLayout" so that the contents are
6786         not rendered into the backing store. This is a regression of r108718,
6787         switch back to do the layout inside the public API
6788         WebPage::setDefaultLayoutSize().
6789
6790         We haven't upstreamed the manual tests directory yet, therefore,
6791         the new manual test case will be upstreamed later.
6792
6793         * Api/WebPage.cpp:
6794         (BlackBerry::WebKit::WebPagePrivate::setDefaultLayoutSize):
6795         (BlackBerry::WebKit::WebPage::setDefaultLayoutSize):
6796
6797 2012-03-06  Lianghui Chen  <liachen@rim.com>
6798
6799         [BlackBerry] Set correct ResourceRequest target type.
6800         https://bugs.webkit.org/show_bug.cgi?id=80430
6801
6802         Reviewed by Rob Buis.
6803
6804         Removed unused code in dispatchWillSendRequest(). These codes are too
6805         late as the target type has already been referred to when calling
6806         ResourceRequest::initializePlatformRequest().
6807
6808         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
6809         (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendRequest):
6810
6811 2012-03-06  Lianghui Chen  <liachen@rim.com>
6812
6813         [BlackBerry] Remove unused and unneeded WebPageClient::downloadRequested(NetworkRequest&)
6814         https://bugs.webkit.org/show_bug.cgi?id=80438
6815
6816         Reviewed by Antonio Gomes.
6817
6818         * Api/WebPageClient.h:
6819
6820 2012-03-06  Jakob Petsovits  <jpetsovits@rim.com>
6821
6822         [BlackBerry] Don't suspend accel comp when backgrounding a page.
6823         https://bugs.webkit.org/show_bug.cgi?id=80369
6824         RIM PR: 137609
6825
6826         Reviewed by Adam Treat.
6827
6828         Just because the page is in the background doesn't mean
6829         it's invisible, doesn't mean it won't have to be redrawn
6830         at some point - on rotation, for instance.
6831
6832         We still suspend accelerated compositing on setVisible(false).
6833
6834         * Api/WebPage.cpp:
6835         (BlackBerry::WebKit::WebPage::notifyPageBackground):
6836         (BlackBerry::WebKit::WebPage::notifyPageForeground):
6837
6838 2012-03-06  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
6839
6840         [BlackBerry] function rename issue after MediaPlayerPrivateBlackBerry.[cpp\h] upstream
6841         https://bugs.webkit.org/show_bug.cgi?id=80377
6842
6843         Reviewed by Rob Buis.
6844
6845         As some of the function names changed in class MediaPlayerPrivate
6846         with the upstream of MediaPlayerPrivateBlackBerry.[cpp|h], we
6847         should update WebKit/blackberry/Api/WebPage.cpp which uses these
6848         functions accordingly.
6849         Renamed functions in class MediaPlayerPrivate:
6850         windowGet() -> getWindow()
6851         windowPositionGet() -> getWindowPosition()
6852         mmrContextNameGet() -> mmrContextName()
6853
6854         * Api/WebPage.cpp:
6855         (BlackBerry::WebKit::WebPagePrivate::enterFullscreenForNode):
6856
6857 2012-03-05  Eli Fidler  <efidler@rim.com>
6858
6859         The minimum font size WebSetting should actually change the LOGICAL font size in WebCore.
6860         https://bugs.webkit.org/show_bug.cgi?id=80312
6861         RIM PR: 139874
6862
6863         Reviewed by George Staikos.
6864
6865         * Api/WebPage.cpp:
6866         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
6867
6868 2012-03-05  Jakob Petsovits  <jpetsovits@rim.com>
6869
6870         Make accelerated compositing work again with direct rendering.
6871         https://bugs.webkit.org/show_bug.cgi?id=80181
6872         RIM PR: 139110
6873
6874         Reviewed by Antonio Gomes.
6875         Internally reviewed by Arvid Nilsson.
6876
6877         The significant amount of refactoring and optimization work
6878         that has gone into accelerated compositing missed out on
6879         some of the code paths that are being used in direct rendering.
6880
6881         Animations were relying on blitVisibleContents() only (which
6882         is a no-op in direct rendering mode). There were early returns
6883         which are suitable to determine whether screen contents need
6884         to be updated at all; however, when we're already forcing a
6885         re-render then those checks would cause the composition surface
6886         not to appear at all, or avoid drawing new animation frames.
6887
6888         We went through dispatchMessage(), potentially causing
6889         mismatches between rendered (but not yet posted) back content
6890         and layers composited on top of it. As we're rendering onto
6891         the sole target surface (the window) directly and posting
6892         from the same thread, we have to wait for compositing on the
6893         UI thread to finish before posting the window.
6894
6895         In turn, this patch combines both drawSubLayers() and
6896         blendCompositingSurface() calls into one method, reducing
6897         the number of messages to the UI thread within
6898         renderDirectToWindow() to one.
6899
6900         blendCompositingMessage() in renderDirectToScreen() was called
6901         with contents coordinates rather than viewport coordinates.
6902         That caused some of the composited content to be cut off when
6903         the scroll position wasn't (0, 0).
6904
6905         We called copyPreviousContentsToBackSurfaceOfWindow() twice for
6906         one frame, in both renderDirectToWindow() and invalidateWindow().
6907         Only one of those (the latter one) is necessary.
6908
6909         * Api/BackingStore.cpp:
6910         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
6911         (BlackBerry::WebKit::BackingStorePrivate::renderDirectToWindow):
6912         (BlackBerry::WebKit::BackingStorePrivate::drawSubLayers):
6913         (WebKit):
6914         (BlackBerry::WebKit::BackingStorePrivate::drawAndBlendLayersForDirectRendering):
6915         * Api/BackingStore.h:
6916         (WebKit):
6917         * Api/BackingStore_p.h:
6918         (BackingStorePrivate):
6919         (BlackBerry::WebKit::BackingStorePrivate::isDirectRenderingAnimationMessageScheduled):
6920         (BlackBerry::WebKit::BackingStorePrivate::setDirectRenderingAnimationMessageScheduled):
6921         * Api/WebPage_p.h:
6922         (BlackBerry::WebKit::WebPagePrivate::isAcceleratedCompositingActive):
6923         (WebPagePrivate):
6924         * WebKitSupport/WebPageCompositor.cpp:
6925         (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor):
6926         (BlackBerry::WebKit::WebPageCompositor::~WebPageCompositor):
6927         (BlackBerry::WebKit::WebPageCompositor::drawLayers):
6928         (BlackBerry::WebKit::WebPageCompositor::animationTimerFired):
6929         * WebKitSupport/WebPageCompositor.h:
6930         (WebPageCompositor):
6931
6932 2012-03-05  George Staikos  <gstaikos@rim.com>
6933
6934         [BlackBerry] DOMSupport visibleSelectionForRangeInputElement incorrectly dereferences a null range.
6935         https://bugs.webkit.org/show_bug.cgi?id=80274
6936
6937         Reviewed by Antonio Gomes.
6938
6939         A null range can be returned so we should not blindly deref it.
6940         Reviewed Internally by Mike Fenton.
6941
6942         * WebKitSupport/DOMSupport.cpp:
6943         (BlackBerry::WebKit::DOMSupport::visibleSelectionForRangeInputElement):
6944
6945 2012-03-04  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
6946
6947         [BlackBerry] upstream CredentialManager and CredentialTransformData implementation
6948         https://bugs.webkit.org/show_bug.cgi?id=80107
6949
6950         Reviewed by Antonio Gomes.
6951
6952         Initial upstream of CredentialManager.[h|cpp] and
6953         CredentialTransformData.[h|cpp].
6954         No new test.
6955
6956         * WebCoreSupport/CredentialManager.cpp: Added.
6957         (WebCore):
6958         (WebCore::CredentialManager::CredentialManager):
6959         (WebCore::CredentialManager::autofillAuthenticationChallenge):
6960         (WebCore::CredentialManager::autofillPasswordForms):
6961         (WebCore::CredentialManager::saveCredentialIfConfirmed):
6962         * WebCoreSupport/CredentialManager.h: Added.
6963         (WebKit):
6964         (WebCore):
6965         (CredentialManager):
6966         * WebCoreSupport/CredentialTransformData.cpp: Added.
6967         (WebCore::CredentialTransformData::CredentialTransformData):
6968         (WebCore):
6969         (WebCore::CredentialTransformData::url):
6970         (WebCore::CredentialTransformData::credential):
6971         (WebCore::CredentialTransformData::setCredential):
6972         (WebCore::CredentialTransformData::findPasswordFormFields):
6973         * WebCoreSupport/CredentialTransformData.h: Added.
6974         (WebCore):
6975         (CredentialTransformData):
6976         (WebCore::CredentialTransformData::isValid):
6977         (WebCore::CredentialTransformData::protectionSpace):
6978
6979 2012-03-04  Antonio Gomes  <agomes@rim.com>
6980
6981         [BlackBerry] Fixed positioned element not correctly positioned after orientation change, when viewport metatag is used
6982         https://bugs.webkit.org/show_bug.cgi?id=80228
6983         PR #138865
6984
6985         Reviewed by George Staikos.
6986
6987         Viewport size changes in two main scenarios:
6988         - orientation changes;
6989         - virtual keyboard pop up/hide.
6990
6991         When we are setting a new viewport size, we need to
6992         update the FixedReportedSize of the mainframe. This size
6993         is used to return innerWidth|Heigth as well as to calculate
6994         the fixed position elements height relative to the RenderView [1].
6995
6996         [1] RenderBox::containingBlockLogicalHeightForPositioned.
6997
6998         When we are rotating, we need to delay setting the new FixedReportedSize
6999         till we layout and are able to figure out the new contents size. At this
7000         time we call setFixedReportedSize, but we do not reposition the fixed elemts
7001         afterwards.
7002
7003         Patch adds a call to FrameView::repaintFixedElementsAfterScrolling, after
7004         setting the new size.
7005
7006         Source/WebKit/blackberry:
7007         * Api/WebPage.cpp:
7008         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
7009
7010 2012-03-02  Mike Fenton  <mifenton@rim.com>
7011
7012         [BlackBerry] Expose WebInspector state to client and clean up WebSettings
7013         https://bugs.webkit.org/show_bug.cgi?id=80177
7014
7015         Reviewed by Antonio Gomes.
7016
7017         Expose the Web Inspector state to WebPage client's and
7018         re-order initialization of WebSettings to be alphabetical
7019         matching their definitions.
7020
7021         * Api/WebPage.cpp:
7022         (BlackBerry::WebKit::WebPage::isWebInspectorEnabled):
7023         * Api/WebPage.h:
7024         * Api/WebSettings.cpp:
7025         (BlackBerry::WebKit::WebSettings::standardSettings):
7026
7027 2012-03-02  Arvid Nilsson  <anilsson@rim.com>
7028
7029         Accelerated compositing: Checkerboard never goes away
7030         https://bugs.webkit.org/show_bug.cgi?id=79020
7031         RIM PR #134164
7032
7033         Reviewed by Adam Treat.
7034
7035         Checkerboard appears in accelerated compositing layers when there's no
7036         texture for (part of) a layer. The layer renderer queues up some render
7037         jobs and schedules a commit to make the WebKit thread process those
7038         jobs. Render jobs performed during commit cause texture upload jobs to
7039         be scheduled on the UI thread. Texture uploads are performed when next
7040         drawing the layers.
7041
7042         Unfortunately, sometimes commit operation happens without a subsequent
7043         call draw the layers.
7044
7045         In order to implement one-shot drawing sync, I added a call to
7046         commitRootLayerIfNeeded() in BackingStore::renderContents(), and
7047         I was lucky that most of the time, renderContents() is followed by
7048         blit(Visible)Contents() which in turn draws the layers.
7049         However, render is not always followed by a blit, for example when
7050         rendering offscreen tiles in BackingStore::renderOnIdle(), and in
7051         direct rendering mode.
7052
7053         Fixed by making sure that every call to commitRootLayerIfNeeded() that
7054         returns true is followed by a call to drawLayersOnCommit(), unless a
7055         blit was requested already.
7056
7057         Also tweak the logic for one-shot drawing sync to make the code in
7058         drawLayersOnCommit() reusable outside of rootLayerCommitTimerFired().
7059
7060         * Api/BackingStore.cpp:
7061         (BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
7062         (BlackBerry::WebKit::BackingStorePrivate::renderOnTimer):
7063         (BlackBerry::WebKit::BackingStorePrivate::renderOnIdle):
7064         (BlackBerry::WebKit::BackingStorePrivate::willFireTimer):
7065         (BlackBerry::WebKit::BackingStorePrivate::renderDirectToWindow):
7066         (BlackBerry::WebKit::BackingStorePrivate::render):
7067         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
7068         (BlackBerry::WebKit::BackingStorePrivate::blitContents):
7069         (BlackBerry::WebKit::BackingStorePrivate::renderContents):
7070         (WebKit):
7071         (BlackBerry::WebKit::BackingStorePrivate::drawLayersOnCommitIfNeeded):
7072         * Api/BackingStore_p.h:
7073         (BackingStorePrivate):
7074         (BlackBerry::WebKit::BackingStorePrivate::willDrawLayersOnCommit):
7075
7076 2012-03-02  Adam Treat  <atreat@rim.com>
7077
7078         https://bugs.webkit.org/show_bug.cgi?id=80161
7079         PR: 141157
7080
7081         BlackBerryPlatformScreen.h API has been updated.  Reflect those
7082         changes in our usage.
7083
7084         Reviewed by Antonio Gomes.
7085         Internally reviewed by Jakob Petsovits.
7086
7087         * Api/BackingStore.cpp:
7088         (BlackBerry::WebKit::BackingStorePrivate::tileWidth):
7089         (BlackBerry::WebKit::BackingStorePrivate::tileHeight):
7090         * Api/WebPage.cpp:
7091         (BlackBerry::WebKit::WebPagePrivate::init):
7092         (BlackBerry::WebKit::WebPagePrivate::transformedViewportSize):
7093         (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize):
7094         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
7095         (BlackBerry::WebKit::WebPagePrivate::setDefaultLayoutSize):
7096         (BlackBerry::WebKit::WebPagePrivate::defaultMaxLayoutSize):
7097         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
7098         (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
7099         * WebKitSupport/SurfacePool.cpp:
7100         (BlackBerry::WebKit::createCompositingSurface):
7101
7102 2012-03-02  Konrad Piascik  <kpiascik@rim.com>
7103
7104         [BlackBerry] Set the devicePixelRatio from the results of computeViewportAttributes
7105         https://bugs.webkit.org/show_bug.cgi?id=80160
7106
7107         Reviewed by Antonio Gomes.
7108
7109         Tested by going to layout test fast/viewport/viewport-95.html and viewport-93.html
7110         Previously when executing window.devicePixelRatio these two pages returned 1 now
7111         they report the devicePixelRatio returned by computeViewportAttributes.
7112
7113         * Api/WebPage.cpp:
7114         (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
7115
7116 2012-03-02  Jacky Jiang  <zhajiang@rim.com>
7117
7118         Fix a warning in InputHandler::learnText()
7119         https://bugs.webkit.org/show_bug.cgi?id=80049
7120
7121         Reviewed by Antonio Gomes.
7122
7123         Fix a warning of the comparison "textInField.length() <=
7124         MaxLearnTextDataSize" in InputHandler::learnText().
7125
7126         Rubber-stamped internally by Mike Fenton.
7127
7128         * WebKitSupport/InputHandler.cpp:
7129         (BlackBerry::WebKit::InputHandler::learnText):
7130
7131 2012-03-01  Andy Chen  <andchen@rim.com>
7132
7133         [BlackBerry] Implement features for find-in-page
7134         https://bugs.webkit.org/show_bug.cgi?id=79820
7135
7136         Reviewed by Antonio Gomes.
7137
7138         - Make it be able to search text around the whole page instead of single frame.
7139         - Make it be able to start new search from active selection and last active match.
7140
7141         No new tests as this patch doesn't change behavior.
7142
7143         * Api/WebPage.cpp:
7144         (BlackBerry::WebKit::WebPagePrivate::frameUnloaded):
7145         * Api/WebPage_p.h:
7146         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
7147         (WebCore::FrameLoaderClientBlackBerry::dispatchWillClose):
7148         (WebCore::FrameLoaderClientBlackBerry::detachedFromParent2):
7149         * WebKitSupport/DOMSupport.cpp:
7150         (BlackBerry::WebKit::DOMSupport::incrementFrame):
7151         * WebKitSupport/DOMSupport.h:
7152         * WebKitSupport/InPageSearchManager.cpp:
7153         (BlackBerry::WebKit::InPageSearchManager::findNextString):
7154         (BlackBerry::WebKit::InPageSearchManager::shouldSearchForText):
7155         (BlackBerry::WebKit::InPageSearchManager::findAndMarkText):
7156         (BlackBerry::WebKit::InPageSearchManager::setMarkerActive):
7157         (BlackBerry::WebKit::InPageSearchManager::frameUnloaded):
7158         * WebKitSupport/InPageSearchManager.h:
7159         * WebKitSupport/InputHandler.cpp:
7160         (BlackBerry::WebKit::InputHandler::frameUnloaded):
7161         * WebKitSupport/InputHandler.h:
7162
7163 2012-03-01  Charles Wei  <charles.wei@torchmobile.com.cn>
7164
7165         [BlackBerry] Web Notification crashes the browser.
7166         https://bugs.webkit.org/show_bug.cgi?id=79897
7167
7168         Reviewed by Antonio Gomes.
7169
7170         The reason of the crash is that it still uses the iterator
7171         after been removed from the container, which invalidates the
7172         iterator. 
7173         We should stop processing after we have found the element
7174         and removed from the container through the iterator.
7175
7176         This patch only fixes the crash issue, but not any notification
7177         functionality issue, which is tracked seperatly.
7178
7179         Test case: http://sandbox.gtaero.net/chrome/notifications.php
7180
7181         * WebCoreSupport/NotificationPresenterImpl.cpp:
7182         (WebKit::NotificationPresenterImpl::onPermission):
7183         (WebKit::NotificationPresenterImpl::notificationClicked):
7184
7185 2012-03-01  Mike Fenton  <mifenton@rim.com>
7186
7187         Autocomplete attribute should apply to textarea's.
7188         https://bugs.webkit.org/show_bug.cgi?id=79929
7189
7190         Reviewed by Antonio Gomes.
7191
7192         Add local static Qualified name for autocorrect attribute.
7193
7194         * WebKitSupport/DOMSupport.cpp:
7195         (BlackBerry::WebKit::DOMSupport::elementSupportsAutocorrect):
7196
7197 2012-02-29  Mike Fenton  <mifenton@rim.com>
7198
7199         Autocomplete attribute should apply to textarea's.
7200         https://bugs.webkit.org/show_bug.cgi?id=79929
7201
7202         Reviewed by Antonio Gomes.
7203
7204         Allow the autocomplete attribute to bubble back to the form setting.
7205
7206         Expand support to include checking autocorrect, autocomplete and
7207         name/id matching to text areas.
7208
7209         Reviewed internally by Nima Ghanavatian and Gen Mak.
7210
7211         * WebKitSupport/DOMSupport.cpp:
7212         (BlackBerry::WebKit::DOMSupport::elementSupportsAutocorrect):
7213         (BlackBerry::WebKit::DOMSupport::elementSupportsAutocomplete):
7214         (BlackBerry::WebKit::DOMSupport::elementAttributeState):
7215         * WebKitSupport/DOMSupport.h:
7216         * WebKitSupport/InputHandler.cpp:
7217         (BlackBerry::WebKit::inputStyle):
7218
7219 2012-02-29  Max Feil  <mfeil@rim.com>
7220
7221         [BlackBerry] Add support for FLAC audio and OGG/Vorbis audio
7222         https://bugs.webkit.org/show_bug.cgi?id=79519
7223
7224         Reviewed by Antonio Gomes.
7225
7226         * Api/WebSettings.cpp:
7227         (BlackBerry::WebKit::mimeTypeAssociationMap):
7228
7229 2012-02-28  Konrad Piascik  <kpiascik@rim.com>
7230
7231         [BlackBerry] Change the API to use std::string
7232         https://bugs.webkit.org/show_bug.cgi?id=79818
7233
7234         Reviewed by Antonio Gomes.
7235
7236         * Api/WebPage.cpp:
7237         (BlackBerry::WebKit::WebPage::dispatchInspectorMessage):
7238         * Api/WebPage.h:
7239
7240 2012-02-28  Jacky Jiang  <zhajiang@rim.com>
7241
7242         [BlackBerry] x86 build fix after cleaning up WebPage.cpp
7243         https://bugs.webkit.org/show_bug.cgi?id=79814
7244
7245         Reviewed by Antonio Gomes.
7246
7247         x86 build fix, keep WebPage::destroyWebPageCompositor() method where it
7248         was which was outside of USE(ACCELERATED_COMPOSITING).
7249
7250         * Api/WebPage.cpp:
7251         (BlackBerry::WebKit::WebPage::destroyWebPageCompositor):
7252         (WebKit):
7253
7254 2012-02-28  Mike Fenton  <mifenton@rim.com>
7255
7256         [BlackBerry] Remove unused focusedNodeChange notifications from the Chrome client.
7257         https://bugs.webkit.org/show_bug.cgi?id=79794
7258
7259         Reviewed by Rob Buis.
7260
7261         Remove unused notification for focusedNodeChanged.
7262
7263         Internally reviewed by Gen Mak.
7264
7265         * Api/WebPageClient.h:
7266         * WebCoreSupport/ChromeClientBlackBerry.cpp:
7267         (WebCore::ChromeClientBlackBerry::focusedNodeChanged):
7268
7269 2012-02-27  Jacky Jiang  <zhajiang@rim.com>
7270
7271         [BlackBerry] Upstream BlackBerry API web page related files
7272         https://bugs.webkit.org/show_bug.cgi?id=74380
7273
7274         Reviewed by Antonio Gomes.
7275
7276         Clean up WebPage.{h, cpp} and WebPage_p.h.
7277         - Remove WebPage::mainFrame() as it is bad to expose WebCore::Frame in
7278           the public API, adapt to the change by adding a new method
7279           WebPagePrivate::core(Const WebPage*) and expose it to
7280           DumpRenderTreeSupport.
7281         - Rename WebPage::spellCheckingEnabled to
7282           WebPage::setSpellCheckingEnabled.
7283         - Remove unused WebPage::focusNodeRect().
7284         - Remove extra blank lines.
7285         - Put WebPage methods and their associated WebPagePrivate methods
7286           together.
7287
7288         No new tests as this patch doesn't change behavior.
7289
7290         * Api/WebPage.cpp:
7291         (BlackBerry::WebKit::WebPage::WebPage):
7292         (WebKit):
7293         (BlackBerry::WebKit::WebPage::~WebPage):
7294         (BlackBerry::WebKit::WebPagePrivate::core):
7295         (BlackBerry::WebKit::WebPage::load):
7296         (BlackBerry::WebKit::WebPage::loadExtended):
7297         (BlackBerry::WebKit::WebPage::loadFile):
7298         (BlackBerry::WebKit::WebPage::download):
7299         (BlackBerry::WebKit::WebPage::loadString):
7300         (BlackBerry::WebKit::WebPage::executeJavaScript):
7301         (BlackBerry::WebKit::WebPage::executeJavaScriptInIsolatedWorld):
7302         (BlackBerry::WebKit::WebPage::stopLoading):
7303         (BlackBerry::WebKit::WebPage::prepareToDestroy):
7304         (BlackBerry::WebKit::WebPage::setScrollPosition):
7305         (BlackBerry::WebKit::WebPage::scrollBy):
7306         (BlackBerry::WebKit::WebPage::notifyInRegionScrollStatusChanged):
7307         (BlackBerry::WebKit::WebPage::zoomToFitScale):
7308         (BlackBerry::WebKit::WebPage::initialScale):
7309         (BlackBerry::WebKit::WebPage::maximumScale):
7310         (BlackBerry::WebKit::WebPage::scrollPosition):
7311         (BlackBerry::WebKit::WebPage::viewportSize):
7312         (BlackBerry::WebKit::WebPage::activeNodeContext):
7313         (BlackBerry::WebKit::WebPage::assignFocus):
7314         (BlackBerry::WebKit::WebPage::blockZoomAnimationFinished):
7315         (BlackBerry::WebKit::WebPage::onInputLocaleChanged):
7316         (BlackBerry::WebKit::WebPage::setScreenOrientation):
7317         (BlackBerry::WebKit::WebPage::applyPendingOrientationIfNeeded):
7318         (BlackBerry::WebKit::WebPage::setViewportSize):
7319         (BlackBerry::WebKit::WebPage::setDefaultLayoutSize):
7320         (BlackBerry::WebKit::WebPage::setScrollOriginPoint):
7321         (BlackBerry::WebKit::WebPage::textEncoding):
7322         (BlackBerry::WebKit::WebPage::forcedTextEncoding):
7323         (BlackBerry::WebKit::WebPage::setForcedTextEncoding):
7324         (BlackBerry::WebKit::WebPage::setSpellCheckingEnabled):
7325         (BlackBerry::WebKit::parentLayer):
7326         (BlackBerry::WebKit::WebPagePrivate::inRegionScrollableAreasForPoint):
7327         (BlackBerry::WebKit::WebPage::destroyWebPageCompositor):
7328         * Api/WebPage.h:
7329         (WebCore):
7330         (WebKit):
7331         * Api/WebPage_p.h:
7332         (WebCore):
7333         (WebKit):
7334         * WebKitSupport/DumpRenderTreeSupport.cpp:
7335         (DumpRenderTreeSupport::corePage):
7336         (DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests):
7337         (DumpRenderTreeSupport::resetGeolocationMock):
7338         (DumpRenderTreeSupport::setMockGeolocationError):
7339         (DumpRenderTreeSupport::setMockGeolocationPermission):
7340         (DumpRenderTreeSupport::setMockGeolocationPosition):
7341         (DumpRenderTreeSupport::scalePageBy):
7342         * WebKitSupport/DumpRenderTreeSupport.h:
7343         (WebCore):
7344         (DumpRenderTreeSupport):
7345
7346 2012-02-27  Mike Fenton  <mifenton@rim.com>
7347
7348         [BlackBerry] Selection handling should be entirely directional
7349         https://bugs.webkit.org/show_bug.cgi?id=79692
7350
7351         Reviewed by Antonio Gomes.
7352
7353         Make all VisibleSelections directional.
7354
7355         * WebKitSupport/SelectionHandler.cpp:
7356         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
7357         (BlackBerry::WebKit::SelectionHandler::setSelection):
7358
7359 2012-02-27  Ed Baker  <edbaker@rim.com>
7360
7361         [BlackBerry] Dragging a selection handle outside of the content bounding box does not update the selection range correctly
7362         https://bugs.webkit.org/show_bug.cgi?id=78608
7363
7364         Ensure that when selection handles leave the content bounding box that
7365         the handle not being dragged remains fixed. Do not apply padding to a
7366         direction that would cause the selection to shrink when performing the
7367         handle direction detection.
7368
7369         Reviewed by Antonio Gomes.
7370
7371         * WebKitSupport/DOMSupport.cpp:
7372         (BlackBerry::WebKit::DOMSupport::convertPointToFrame):
7373         * WebKitSupport/DOMSupport.h:
7374         * WebKitSupport/SelectionHandler.cpp:
7375         (BlackBerry::WebKit::clamp):
7376         (BlackBerry::WebKit::directionalVisiblePositionAtExtentOfBox):
7377         (BlackBerry::WebKit::SelectionHandler::extendSelectionToFieldBoundary):
7378         (BlackBerry::WebKit::SelectionHandler::setSelection):
7379         (BlackBerry::WebKit::SelectionHandler::clipPointToVisibleContainer):
7380         * WebKitSupport/SelectionHandler.h:
7381
7382 2012-02-27  Leo Yang  <leo.yang@torchmobile.com.cn>
7383
7384         [BlackBerry] Upstream accelerated compositing helper class
7385         https://bugs.webkit.org/show_bug.cgi?id=78448
7386
7387         Reviewed by Antonio Gomes.
7388
7389         Initial upstream, no new tests.
7390
7391         * WebKitSupport/FrameLayers.cpp: Added.
7392         * WebKitSupport/FrameLayers.h: Added.
7393
7394 2012-02-26  Hajime Morrita  <morrita@chromium.org>
7395
7396         Move ChromeClient::showContextMenu() to ContextMenuClient
7397         https://bugs.webkit.org/show_bug.cgi?id=79427
7398
7399         Reviewed by Adam Barth.
7400
7401         * WebCoreSupport/ChromeClientBlackBerry.h:
7402         (ChromeClientBlackBerry):
7403
7404 2012-02-24  Mike Fenton  <mifenton@rim.com>
7405
7406         [BlackBerry] Eliminate excessive BlackBerry::Platform use in InputHandler
7407         https://bugs.webkit.org/show_bug.cgi?id=79393
7408
7409         Reviewed by Antonio Gomes.
7410
7411         Cleanup usage of BlackBerry::Platform in InputHandler.
7412
7413         * WebKitSupport/InputHandler.cpp:
7414         (BlackBerry::WebKit::convertStringToWchar):
7415         (BlackBerry::WebKit::convertStringToWcharVector):
7416         (BlackBerry::WebKit::convertSpannableStringToString):
7417         (BlackBerry::WebKit::InputHandler::learnText):
7418         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
7419         (BlackBerry::WebKit::InputHandler::shouldAcceptInputFocus):
7420         (BlackBerry::WebKit::InputHandler::setElementFocused):
7421         (BlackBerry::WebKit::InputHandler::nodeTextChanged):
7422         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
7423         (BlackBerry::WebKit::InputHandler::frameUnloaded):
7424         (BlackBerry::WebKit::InputHandler::selectionChanged):
7425         (BlackBerry::WebKit::InputHandler::setSelection):
7426         (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
7427         (BlackBerry::WebKit::InputHandler::deleteTextRelativeToCursor):
7428         (BlackBerry::WebKit::InputHandler::deleteText):
7429         (BlackBerry::WebKit::InputHandler::spannableTextInRange):
7430         (BlackBerry::WebKit::InputHandler::setComposingRegion):
7431         (BlackBerry::WebKit::InputHandler::finishComposition):
7432         (BlackBerry::WebKit::InputHandler::setText):
7433         (BlackBerry::WebKit::InputHandler::setTextAttributes):
7434         (BlackBerry::WebKit::InputHandler::setRelativeCursorPosition):
7435         (BlackBerry::WebKit::InputHandler::setSpannableTextAndRelativeCursor):
7436         (BlackBerry::WebKit::InputHandler::setComposingText):
7437         (BlackBerry::WebKit::InputHandler::commitText):
7438
7439 2012-02-24  Mike Fenton  <mifenton@rim.com>
7440
7441         [BlackBerry] Eliminate excessive BlackBerry::Platform use in SelectionHandler.
7442         https://bugs.webkit.org/show_bug.cgi?id=79391
7443
7444         Reviewed by Antonio Gomes.
7445
7446         Clean up usage of BlackBerry::Platform in SelectionHandler and
7447         explicitly define what namespace to use for ambiguous objects like
7448         IntRect and IntPoint.
7449
7450         * WebKitSupport/SelectionHandler.cpp:
7451         (BlackBerry::WebKit::SelectionHandler::cancelSelection):
7452         (BlackBerry::WebKit::SelectionHandler::getConsolidatedRegionOfTextQuadsForSelection):
7453         (BlackBerry::WebKit::visiblePositionForPointIgnoringClipping):
7454         (BlackBerry::WebKit::directionOfPointRelativeToRect):
7455         (BlackBerry::WebKit::SelectionHandler::shouldUpdateSelectionOrCaretForPoint):
7456         (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
7457         (BlackBerry::WebKit::directionalVisiblePositionAtExtentOfBox):
7458         (BlackBerry::WebKit::pointIsOutsideOfBoundingBoxInDirection):
7459         (BlackBerry::WebKit::SelectionHandler::extendSelectionToFieldBoundary):
7460         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
7461         (BlackBerry::WebKit::SelectionHandler::clipPointToFocusNode):
7462         (BlackBerry::WebKit::SelectionHandler::setSelection):
7463         (BlackBerry::WebKit::SelectionHandler::selectAtPoint):
7464         (BlackBerry::WebKit::SelectionHandler::selectObject):
7465         (BlackBerry::WebKit::comparePointsToReferencePoint):
7466         (BlackBerry::WebKit::minXMinYCorner):
7467         (BlackBerry::WebKit::maxXMinYCorner):
7468         (BlackBerry::WebKit::minXMaxYCorner):
7469         (BlackBerry::WebKit::maxXMaxYCorner):
7470         (BlackBerry::WebKit::caretLocationForRect):
7471         (BlackBerry::WebKit::caretComparisonPointForRect):
7472         (BlackBerry::WebKit::adjustCaretRects):
7473         (BlackBerry::WebKit::SelectionHandler::clipRegionToVisibleContainer):
7474         (BlackBerry::WebKit::referencePoint):
7475         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
7476         (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
7477         (BlackBerry::WebKit::SelectionHandler::selectionContains):
7478
7479 2012-02-24  Shinya Kawanaka  <shinyak@chromium.org>
7480
7481         SpellCheckRequest needs to know the context where the spellcheck happened.
7482         https://bugs.webkit.org/show_bug.cgi?id=79320
7483
7484         Reviewed by Hajime Morita.
7485
7486         * WebCoreSupport/EditorClientBlackBerry.cpp:
7487         (WebCore::EditorClientBlackBerry::requestCheckingOfString):
7488         * WebCoreSupport/EditorClientBlackBerry.h:
7489         (EditorClientBlackBerry):
7490
7491 2012-02-24  Charles Wei  <charles.wei@torchmobile.com.cn>
7492
7493         [BlackBerry] Anchor mailto: with target set won't launch Messaging application when clicked
7494         https://bugs.webkit.org/show_bug.cgi?id=79318
7495
7496         Need to give the client a chance to decide how to handle the new window request.
7497
7498         Reviewed by Rob Buis.
7499
7500         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
7501         (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNewWindowAction):
7502
7503 2012-02-23  Mike Fenton  <mifenton@rim.com>
7504
7505         [BlackBerry] Selection handler has compile failure with logs enabled.
7506         https://bugs.webkit.org/show_bug.cgi?id=79392
7507
7508         Reviewed by Antonio Gomes.
7509
7510         Build Fix.  Update log to avoid usage of toString which was removed.
7511
7512         * WebKitSupport/SelectionHandler.cpp:
7513         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
7514
7515 2012-02-19  Antonio Gomes  <agomes@rim.com>
7516
7517         Fat fingers - Add a clearer way to distinguish the node we want (shadow or non-shadow)
7518         https://bugs.webkit.org/show_bug.cgi?id=79256
7519         PR #127814 / MKS_2587410
7520
7521         Reviewed by Rob Buis.
7522
7523         Patch adds a cleaner way for call sites of FatFingersResult to
7524         query for the appropriated target node: shadow or non-shadow DOM nodes.
7525
7526         It also renames FatFingersResults::validNode to ::node, assuming
7527         that "invalid" nodes are not applicable in any context.
7528
7529         * Api/WebPage.cpp:
7530         (BlackBerry::WebKit::WebPagePrivate::clearDocumentData):
7531         (BlackBerry::WebKit::WebPagePrivate::contextNode):
7532         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
7533         * WebKitSupport/FatFingers.h:
7534         (FatFingersResult):
7535         (BlackBerry::WebKit::FatFingersResult::node):
7536         (BlackBerry::WebKit::FatFingersResult::nodeAsElementIfApplicable):
7537         * WebKitSupport/SelectionHandler.cpp:
7538         (BlackBerry::WebKit::SelectionHandler::selectAtPoint):
7539         * WebKitSupport/TouchEventHandler.cpp:
7540         (BlackBerry::WebKit::TouchEventHandler::touchHoldEvent):
7541         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
7542
7543 2012-02-23  Jacky Jiang  <zhajiang@rim.com>
7544
7545         [BlackBerry] Upstream BlackBerry API web page related files
7546         https://bugs.webkit.org/show_bug.cgi?id=74380
7547
7548         Reviewed by Antonio Gomes.
7549
7550         Initial upstream, no new tests.
7551
7552         * Api/WebPage.cpp: Added.
7553         * Api/WebPage.h: Added.
7554         * Api/WebPage_p.h: Added.
7555
7556 2012-02-23  Leo Yang  <leo.yang@torchmobile.com.cn>
7557
7558         [BlackBerry] Remove unused ChromeClientBlackBerry::platformCompositingWindow(), platformWindow() and WebPageClient::compositingWindow()
7559         https://bugs.webkit.org/show_bug.cgi?id=78681
7560
7561         Reviewed by Antonio Gomes.
7562
7563         * Api/WebPageClient.h:
7564         * WebCoreSupport/ChromeClientBlackBerry.cpp:
7565         (WebCore):
7566         * WebCoreSupport/ChromeClientBlackBerry.h:
7567         (ChromeClientBlackBerry):
7568
7569 2012-02-23  Leo Yang  <leo.yang@torchmobile.com.cn>
7570
7571         [BlackBerry] Upstream GLES2Context.{h, cpp}
7572         https://bugs.webkit.org/show_bug.cgi?id=79196
7573
7574         Reviewed by Rob Buis.
7575
7576         Initial upstream, no new tests.
7577
7578         * WebKitSupport/GLES2Context.cpp: Added.
7579         * WebKitSupport/GLES2Context.h: Added.
7580
7581 2012-02-23  Mike Fenton  <mifenton@rim.com>
7582
7583         [BlackBerry] InputHandler requires cleanup of Navigation Mode handling.
7584         https://bugs.webkit.org/show_bug.cgi?id=79366
7585
7586         Reviewed by Rob Buis.
7587
7588         Cleanup InputHandler navigation based code.
7589
7590         1) Remove the concept of NavigationMode and replace it
7591            with simple showKeyboard calls.
7592
7593         2) Remove navigation move events and replace with standard
7594            key events.
7595
7596         3) Standardize function/variable names and remove obsolete
7597            functions.
7598
7599         * Api/WebPageClient.h:
7600         * WebKitSupport/InputHandler.cpp:
7601         (BlackBerry::WebKit::InputHandler::InputHandler):
7602         (BlackBerry::WebKit::InputHandler::nodeFocused):
7603         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
7604         (BlackBerry::WebKit::InputHandler::setElementFocused):
7605         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
7606         (BlackBerry::WebKit::InputHandler::setDelayKeyboardVisibilityChange):
7607         (BlackBerry::WebKit::InputHandler::processPendingKeyboardVisibilityChange):
7608         (BlackBerry::WebKit::InputHandler::notifyClientOfKeyboardVisibilityChange):
7609         * WebKitSupport/InputHandler.h:
7610         (InputHandler):
7611         * WebKitSupport/SelectionHandler.cpp:
7612         (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
7613         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
7614         * WebKitSupport/TouchEventHandler.cpp:
7615         (BlackBerry::WebKit::TouchEventHandler::touchEventCancel):
7616         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
7617
7618 2012-02-21  Ryosuke Niwa  <rniwa@webkit.org>
7619
7620         Remove the remaining uses of CSSStyleDeclaration in Editor
7621         https://bugs.webkit.org/show_bug.cgi?id=78939
7622
7623         Reviewed by Enrica Casucci.
7624
7625         * WebCoreSupport/EditorClientBlackBerry.cpp:
7626         (WebCore::EditorClientBlackBerry::shouldApplyStyle):
7627         * WebCoreSupport/EditorClientBlackBerry.h:
7628         (EditorClientBlackBerry):
7629
7630 2012-02-22  Mike Fenton  <mifenton@rim.com>
7631
7632         [BlackBerry] InputHandler has signed vs unsigned comparison.
7633         https://bugs.webkit.org/show_bug.cgi?id=79261
7634
7635         Fix warning by casting the unsigned int to an int.
7636
7637         Reviewed by Rob Buis.
7638
7639         * WebKitSupport/InputHandler.cpp:
7640         (BlackBerry::WebKit::InputHandler::rectForCaret):
7641
7642 2012-02-22  Ryosuke Niwa  <rniwa@webkit.org>
7643
7644         Remove the remaining uses of CSSStyleDeclaration in Editor
7645         https://bugs.webkit.org/show_bug.cgi?id=78939
7646
7647         Reviewed by Enrica Casucci.
7648
7649         * WebCoreSupport/EditorClientBlackBerry.cpp:
7650         (WebCore::EditorClientBlackBerry::shouldApplyStyle):
7651         * WebCoreSupport/EditorClientBlackBerry.h:
7652         (EditorClientBlackBerry):
7653
7654 2012-02-18  Antonio Gomes  <agomes@rim.com>
7655
7656         Fat fingers - cache the first rect-based hit test so we do not need to do it again
7657         https://bugs.webkit.org/show_bug.cgi?id=79115
7658
7659         Reviewed by Adam Treat.
7660
7661         Our FatFingers implementation runs currently in two phases:
7662         the first checks for the elements intrinsically clickable;
7663         the second checks for elements made clickable by the page
7664         (for example, a div with a onclick event listener attached to it).
7665         For each phase, we perform a rect hittest, which is not needed since
7666         the result of each is the same.
7667
7668         Patch introduces a caching mechanism so we avoid on rect hittest:
7669         when the first phase runs, it caches each nodeset per document in
7670         a hashmap. This second phase works with the cached results.
7671
7672         No behavioral change, but performance is better since we
7673         avoid one (possibly expensive) rect hittest.
7674
7675         I measured the performance gain on https://www.kvd.se/, and we
7676         save up to 0.04 seconds, by caching and re-using the results.
7677
7678         * WebKitSupport/FatFingers.cpp:
7679         (BlackBerry::WebKit::dumpHitTestResult):
7680         (BlackBerry::WebKit::FatFingers::findBestPoint):
7681         (BlackBerry::WebKit::FatFingers::findIntersectingRegions):
7682         (BlackBerry::WebKit::FatFingers::cachingStrategy):
7683         (WebKit):
7684         (BlackBerry::WebKit::FatFingers::getNodesFromRect):
7685         * WebKitSupport/FatFingers.h:
7686
7687 2012-02-20  Antonio Gomes  <agomes@rim.com>
7688
7689         All default video/audio control elements should be rect-hit testable (Part II)
7690         PR #139518 / MKS_3005538
7691
7692         Reviewed by George Staikos.
7693
7694         Add HTMLInputElement::isMediaControlElement as a criteria
7695         to consider a element as clickable.
7696
7697         Note that is should be only used while in the "ClickableByDefault"
7698         phase of FatFingers.
7699
7700         * WebKitSupport/FatFingers.cpp:
7701         (BlackBerry::WebKit::FatFingers::isElementClickable):
7702
7703 2012-02-16  Antonio Gomes  <agomes@rim.com>
7704
7705         [BlackBerry] Implemented a way to defer client navigation change client notifications
7706         https://bugs.webkit.org/show_bug.cgi?id=78848
7707
7708         Reviewed by Rob Buis.
7709
7710         Currently we postpone touch_down till touch_up if user touches
7711         the screen and an input field has the WebKit focus. This is done
7712         so we can scroll the page without hidding the vkb needlessly.
7713
7714         However, it breaks the conversion of touch to mouse events
7715         if an input field has the focus in the following scenario:
7716         an <input type=text> is focused and an user grab and-drag
7717         a <input type=range> knob/slide. It does not work until the
7718         user unfocuses the currently focused edit field.
7719
7720         Patch introduces a way to unfocus a currently focused input field,
7721         without requesting the client to show or hide the virtual keyboard
7722         right way. Instead it gets a delayed notification of the vkb mode requested
7723         at either touch_released/mouse_up or touch_cancel time.
7724
7725         For now, due to content side issues with major web sites,
7726         only delay navigation mode notification changes if we are not dealing with
7727         input modes.
7728
7729         * WebKitSupport/InputHandler.cpp:
7730         (BlackBerry::WebKit::InputHandler::InputHandler):
7731         (BlackBerry::WebKit::InputHandler::nodeFocused):
7732         (BlackBerry::WebKit::InputHandler::setElementFocused):
7733         (BlackBerry::WebKit::InputHandler::setNavigationMode):
7734         (WebKit):
7735         (BlackBerry::WebKit::InputHandler::setDelayClientNotificationOfNavigationModeChange):
7736         (BlackBerry::WebKit::InputHandler::processPendingClientNavigationModeChangeNotification):
7737         (BlackBerry::WebKit::InputHandler::notifyClientOfNavigationModeChange):
7738         (BlackBerry::WebKit::InputHandler::willOpenPopupForNode):
7739         (BlackBerry::WebKit::InputHandler::setPopupListIndexes):
7740         (BlackBerry::WebKit::InputHandler::spannableTextInRange):
7741         (BlackBerry::WebKit::InputHandler::removeComposedText):
7742         (BlackBerry::WebKit::InputHandler::firstSpanInString):
7743         (BlackBerry::WebKit::InputHandler::setText):
7744         (BlackBerry::WebKit::InputHandler::setRelativeCursorPosition):
7745         * WebKitSupport/InputHandler.h:
7746         (InputHandler):
7747
7748 2012-02-16  Antonio Gomes  <agomes@rim.com>
7749
7750         Crash @WebPagePrivate::enqueueRenderingOfClippedContentOfScrollableNodeAfterInRegionScrolling MKS_2986818
7751         https://bugs.webkit.org/show_bug.cgi?id=78845
7752
7753         Reviewed by Rob Buis.
7754
7755         We were trying to operate on a cached Node when its page/frame/document
7756         were gone to PageCache already. To avoid such problems, lets clean up
7757         any document data we have cached when the Frame goes into the cache.
7758
7759         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
7760         (WebCore::FrameLoaderClientBlackBerry::didSaveToPageCache):
7761         (WebCore):
7762         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
7763         (FrameLoaderClientBlackBerry):
7764
7765 2012-02-16  Antonio Gomes  <agomes@rim.com>
7766
7767         [BlackBerry] Upstream touch handling related classes
7768         https://bugs.webkit.org/show_bug.cgi?id=78509
7769
7770         Reviewed by Adam Treat and Rob Buis.
7771
7772         FatFingers is the class responsible to the whole touch
7773         accuracy of the BlackBerry port. Initial upstream.
7774
7775         * WebKitSupport/FatFingers.cpp: Added.
7776         (WebKit):
7777         (BlackBerry::WebKit::FatFingers::fingerRectForPoint):
7778         (BlackBerry::WebKit::hasMousePressListener):
7779         (BlackBerry::WebKit::FatFingers::isElementClickable):
7780         (BlackBerry::WebKit::isFieldWithText):
7781         (BlackBerry::WebKit::distanceBetweenPoints):
7782         (BlackBerry::WebKit::compareDistanceBetweenPoints):
7783         (BlackBerry::WebKit::isValidFrameOwner):
7784         (BlackBerry::WebKit::FatFingers::FatFingers):
7785         (BlackBerry::WebKit::FatFingers::~FatFingers):
7786         (BlackBerry::WebKit::FatFingers::findBestPoint):
7787         (BlackBerry::WebKit::FatFingers::checkFingerIntersection):
7788         (BlackBerry::WebKit::FatFingers::findIntersectingRegions):
7789         (BlackBerry::WebKit::FatFingers::checkForClickableElement):
7790         (BlackBerry::WebKit::FatFingers::checkForText):
7791         (BlackBerry::WebKit::FatFingers::getPaddings):
7792         (BlackBerry::WebKit::FatFingers::nodesFromRect):
7793         (BlackBerry::WebKit::FatFingers::getRelevantInfoFromPoint):
7794         (BlackBerry::WebKit::FatFingers::setSuccessfulFatFingersResult):
7795         * WebKitSupport/FatFingers.h: Added.
7796         (WebCore):
7797         (WebKit):
7798         (FatFingersResult):
7799         (BlackBerry::WebKit::FatFingersResult::FatFingersResult):
7800         (BlackBerry::WebKit::FatFingersResult::reset):
7801         (BlackBerry::WebKit::FatFingersResult::originPosition):
7802         (BlackBerry::WebKit::FatFingersResult::adjustedPosition):
7803         (BlackBerry::WebKit::FatFingersResult::positionWasAdjusted):
7804         (BlackBerry::WebKit::FatFingersResult::isTextInput):
7805         (BlackBerry::WebKit::FatFingersResult::isValid):
7806         (BlackBerry::WebKit::FatFingersResult::validNode):
7807         (BlackBerry::WebKit::FatFingersResult::nodeAsElementIfApplicable):
7808         (FatFingers):
7809
7810 2012-02-16  Antonio Gomes  <agomes@rim.com>
7811
7812         [BlackBerry] Upstream touch handling related classes
7813         https://bugs.webkit.org/show_bug.cgi?id=78509
7814
7815         Reviewed by Adam Treat.
7816
7817         Initial upstream of the Blackberry specific single touch event
7818         handler class.
7819
7820         * blackberry/WebKitSupport/TouchEventHandler.cpp: Added.
7821         (WebKit):
7822         (BlackBerry::WebKit::hasMouseMoveListener):
7823         (BlackBerry::WebKit::hasTouchListener):
7824         (BlackBerry::WebKit::elementExpectsMouseEvents):
7825         (BlackBerry::WebKit::shouldConvertTouchToMouse):
7826         (BlackBerry::WebKit::TouchEventHandler::TouchEventHandler):
7827         (BlackBerry::WebKit::TouchEventHandler::~TouchEventHandler):
7828         (BlackBerry::WebKit::TouchEventHandler::shouldSuppressMouseDownOnTouchDown):
7829         [BlackBerry] Upstream touch handling related classes
7830         https://bugs.webkit.org/show_bug.cgi?id=78509
7831
7832         Reviewed by Rob Buis.
7833
7834         InRegionScrollableArea specializes the BlackBerry specific ScrollViewBase,
7835         working as a read-only wrapper object for a scrollable areas in the page.
7836         It is used in our client side to control in-region scrolling (scrollable boxes,
7837         inner frames, etc).
7838
7839         Initial upstream.
7840
7841         * WebKitSupport/InRegionScrollableArea.cpp: Added.
7842         (WebKit):
7843         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
7844         (BlackBerry::WebKit::InRegionScrollableArea::calculateMinimumScrollPosition):
7845         (BlackBerry::WebKit::InRegionScrollableArea::calculateMaximumScrollPosition):
7846         (BlackBerry::WebKit::InRegionScrollableArea::layer):
7847         (BlackBerry):
7848         * WebKitSupport/InRegionScrollableArea.h: Added.
7849         (WebCore):
7850         (WebKit):
7851         (InRegionScrollableArea):
7852
7853 2012-02-16  Antonio Gomes  <agomes@rim.com>
7854
7855         (BlackBerry::WebKit::TouchEventHandler::touchEventCancel):
7856         (BlackBerry::WebKit::TouchEventHandler::touchHoldEvent):
7857         (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
7858         (BlackBerry::WebKit::TouchEventHandler::spellCheck):
7859         (BlackBerry::WebKit::TouchEventHandler::handleFatFingerPressed):
7860         (BlackBerry::WebKit::elementForTapHighlight):
7861         (BlackBerry::WebKit::TouchEventHandler::drawTapHighlight):
7862         * blackberry/WebKitSupport/TouchEventHandler.h: Added.
7863         (WebCore):
7864         (WebKit):
7865         (TouchEventHandler):
7866         (BlackBerry::WebKit::TouchEventHandler::lastFatFingersResult):
7867         (BlackBerry::WebKit::TouchEventHandler::resetLastFatFingersResult):
7868