[BlackBerry] Make screen updates dependent on the existence of a drawing buffer.
[WebKit-https.git] / Source / WebKit / blackberry / ChangeLog
1 2013-05-26  Jakob Petsovits  <jpetsovits@blackberry.com>
2
3         [BlackBerry] Make screen updates dependent on the existence of a drawing buffer.
4         https://bugs.webkit.org/show_bug.cgi?id=116539
5         Internal PR 330917
6
7         Reviewed by Carlos Garcia Campos.
8         Internally reviewed by Xiaobo Wang and Arvid Nilsson.
9
10         This reduces complexity by relying on the current state,
11         rather than the suspend counter, which in turn makes it
12         possible to simplify the code in setCompositor().
13
14         * Api/BackingStore.cpp:
15         (BlackBerry::WebKit::BackingStorePrivate::updateSuspendScreenUpdateState):
16         (BlackBerry::WebKit::BackingStorePrivate::createSurfaces):
17         * Api/WebPage.cpp:
18         (BlackBerry::WebKit::WebPagePrivate::setCompositor):
19
20 2013-05-26  Kent Tamura  <tkent@chromium.org>
21
22         Remove ENABLE_CALENDAR_PICKER
23         https://bugs.webkit.org/show_bug.cgi?id=116795
24
25         Reviewed by Ryosuke Niwa.
26
27         * WebCoreSupport/AboutDataEnableFeatures.in:
28         The list was wrong. Blackberry port doesn't use CALENDAR_PICKER code.
29
30 2013-05-26  Andreas Kling  <akling@apple.com>
31
32         FocusController::setFocusedNode() should be setFocusedElement().
33         <http://webkit.org/b/116780>
34
35         Reviewed by Antti Koivisto.
36
37         * Api/WebPage.cpp:
38         (BlackBerry::WebKit::WebPagePrivate::clearFocusNode):
39         (BlackBerry::WebKit::WebPage::setNodeFocus):
40         * WebKitSupport/SelectionHandler.cpp:
41         (BlackBerry::WebKit::SelectionHandler::selectObject):
42
43 2013-05-24  Anders Carlsson  <andersca@apple.com>
44
45         Remove PagePopup code
46         https://bugs.webkit.org/show_bug.cgi?id=116732
47
48         Reviewed by Andreas Kling.
49
50         * WebCoreSupport/AboutDataEnableFeatures.in:
51         Remove PAGE_POPUP.
52
53 2013-05-24  Mike Fenton  <mifenton@rim.com>
54
55         [BlackBerry] Fix bad type warning in InputHandler log.
56         https://bugs.webkit.org/show_bug.cgi?id=116720
57
58         Reviewed by Carlos Garcia Campos.
59
60         Fix warning in inputLog string.
61
62         * WebKitSupport/InputHandler.cpp:
63         (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
64
65 2013-05-24  Mike Fenton  <mifenton@rim.com>
66
67         [BlackBerry] Respect tabindex when using form controls.
68         https://bugs.webkit.org/show_bug.cgi?id=116676
69
70         Reviewed by Xan Lopez.
71
72         PR 337419.
73
74         Update form control navigation tracking to take tabindex
75         order into account when calculating next and previous nodes.
76
77         The order to follow is tab index 1 - N, followed by all items
78         without a tab index or tab index 0 in rendering order to match
79         with standard desktop behavior.
80
81         Internally Reviewed by Genevieve Mak and Nima Ghanavatian.
82
83         * WebKitSupport/InputHandler.cpp:
84         (BlackBerry::WebKit::InputHandler::updateFormState):
85
86 2013-05-24  Jeff Rogers  <jrogers@rim.com>
87
88         [BlackBerry] Remove SKIA leftovers from WebPage.cpp
89         https://bugs.webkit.org/show_bug.cgi?id=116656
90
91         Reviewed by Rob Buis.
92
93         * Api/WebPage.cpp:
94         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
95
96 2013-05-23  Xiaobo Wang  <xiaobwang@blackberry.com>
97
98         [BlackBerry] Need to suspend/resume RootLayerCommit when the application becomes inactive/active
99         https://bugs.webkit.org/show_bug.cgi?id=115245
100
101         Reviewed by Rob Buis.
102
103         PR 330917.
104         Internally reviewed by Arvid Nilsson.
105
106         1. Suspend/resumeRootLayerCommit when notified app activation state
107         change.
108         2. Schedule root layer commit in resumeRootLayerCommit() to explicitly
109         start root layer commit timer, so that there's a commit even if
110         BackingStore got disabled/removed.
111
112         * Api/WebPage.cpp:
113         (BlackBerry::WebKit::WebPagePrivate::notifyAppActivationStateChange):
114         (BlackBerry::WebKit::WebPagePrivate::resumeRootLayerCommit):
115
116 2013-05-23  Andy Chen  <andchen@blackberry.com>
117
118         [BlackBerry] Need to forward the opener frame url to client when creating a new window
119         https://bugs.webkit.org/show_bug.cgi?id=116566
120
121         Reviewed by Rob Buis.
122
123         PR 337935
124         Internally reviewed by Arvid Nilsson.
125         When creating a new window, forward the opener frame url to client.
126
127         * Api/WebPageClient.h:
128         * WebCoreSupport/ChromeClientBlackBerry.cpp:
129         (WebCore::ChromeClientBlackBerry::createWindow):
130         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
131         (WebCore::FrameLoaderClientBlackBerry::dispatchCreatePage):
132
133 2013-05-23  Jakob Petsovits  <jpetsovits@blackberry.com>
134
135         [BlackBerry] Compositor API change: Don't pass the unused "viewport" parameter.
136         https://bugs.webkit.org/show_bug.cgi?id=116545
137         Internal PR 189775
138
139         Reviewed by Rob Buis.
140
141         Also change the name of the "documentContents" parameter
142         to the more descriptive "documentSrcRect".
143
144         * Api/WebPageCompositor.cpp:
145         (BlackBerry::WebKit::WebPageCompositorPrivate::render):
146         (BlackBerry::WebKit::WebPageCompositor::render):
147         * Api/WebPageCompositor.h:
148         * Api/WebPageCompositor_p.h:
149         (WebPageCompositorPrivate):
150
151 2013-05-23  Ed Baker  <edbaker@blackberry.com>
152
153         [BlackBerry] The web context does not contain any link properties if the context node is an image enclosed by a link node
154         https://bugs.webkit.org/show_bug.cgi?id=116627
155
156         Reviewed by Xan Lopez.
157
158         PR #341084
159
160         If the context node has an image tag and an enclosing link node was detected then add the link properties to the context.
161
162         Internally Reviewed by Gen Mak.
163
164         * Api/WebPage.cpp:
165         (BlackBerry::WebKit::WebPagePrivate::webContext):
166
167 2013-05-23  Mike Fenton  <mifenton@rim.com>
168
169         [BlackBerry] Validate form data before doing direct submission.
170         https://bugs.webkit.org/show_bug.cgi?id=116674
171
172         Reviewed by Xan Lopez.
173
174         PR 314202.
175
176         Check validation of the input form before triggering direct submission.
177
178         Internally Reviewed by Nima Ghanavatian.
179
180         * WebKitSupport/InputHandler.cpp:
181         (BlackBerry::WebKit::InputHandler::submitForm):
182
183 2013-05-23  Rob Buis  <rbuis@rim.com>
184
185         [BlackBerry] Properly fill the ResourceError in FrameLoaderClientBlackBerry::cannotShowURLError
186         https://bugs.webkit.org/show_bug.cgi?id=116603
187
188         Reviewed by Xan Lopez.
189
190         PR 119789
191         Internally reviewed by Yong Li.
192
193         Provide a domain value for this ResourceError instance. Note that
194         this does not change behavior.
195
196         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
197         (WebCore::FrameLoaderClientBlackBerry::didRestoreFromPageCache):
198
199 2013-05-21  Carlos Garcia Campos  <cgarcia@igalia.com>
200
201         [BlackBerry] Make PagePopup implementation independent from WebCore
202         https://bugs.webkit.org/show_bug.cgi?id=116448
203
204         Reviewed by Anders Carlsson.
205
206         Add our own implementation of PagePopupClient and make all the
207         pickers inherit from it. Unused methods have been removed and
208         common implementation have been moved from the pickers to the
209         parent class.
210
211         * Api/WebPage.cpp:
212         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate): Destroy the
213         popup if there's one active.
214         (BlackBerry::WebKit::WebPagePrivate::setVisible): Call
215         closePagePopup() directly.
216         (BlackBerry::WebKit::WebPagePrivate::openPagePopup): Create a new
217         PagePopupBlackBerry for the given client.
218         (BlackBerry::WebKit::WebPagePrivate::closePagePopup): Close the
219         active popup if there's one.
220         (BlackBerry::WebKit::WebPagePrivate::hasOpenedPopup): Return
221         whether there's an active popup.
222         * Api/WebPage.h:
223         * Api/WebPage_p.h:
224         * WebCoreSupport/ChromeClientBlackBerry.cpp:
225         (WebCore::ChromeClientBlackBerry::chromeDestroyed): Remove
226         closePagePopup() call since this is now handled by
227         WebPagePrivate.
228         (WebCore::ChromeClientBlackBerry::hasOpenedPopup): Call
229         WebPagePrivate::hasOpenedPopup().
230         * WebCoreSupport/ChromeClientBlackBerry.h:
231         (ChromeClientBlackBerry):
232         * WebCoreSupport/ColorPickerClient.cpp:
233         (BlackBerry::WebKit::ColorPickerClient::ColorPickerClient):
234         (BlackBerry::WebKit::ColorPickerClient::didClosePopup):
235         * WebCoreSupport/ColorPickerClient.h:
236         (ColorPickerClient):
237         * WebCoreSupport/DatePickerClient.cpp:
238         (BlackBerry::WebKit::DatePickerClient::DatePickerClient):
239         (BlackBerry::WebKit::DatePickerClient::didClosePopup):
240         * WebCoreSupport/DatePickerClient.h:
241         (DatePickerClient):
242         * WebCoreSupport/PagePopupBlackBerry.cpp:
243         (BlackBerry::WebKit::PagePopupBlackBerry::PagePopupBlackBerry):
244         (BlackBerry::WebKit::PagePopupBlackBerry::closePopup):
245         * WebCoreSupport/PagePopupBlackBerry.h:
246         (PagePopupBlackBerry):
247         (BlackBerry::WebKit::PagePopupBlackBerry::SharedClientPointer::SharedClientPointer):
248         (BlackBerry::WebKit::PagePopupBlackBerry::SharedClientPointer::get):
249         (SharedClientPointer):
250         * WebCoreSupport/PagePopupBlackBerryClient.cpp: Added.
251         (BlackBerry::WebKit::PagePopupBlackBerryClient::PagePopupBlackBerryClient):
252         (BlackBerry::WebKit::PagePopupBlackBerryClient::closePopup):
253         (BlackBerry::WebKit::PagePopupBlackBerryClient::didClosePopup):
254         (BlackBerry::WebKit::PagePopupBlackBerryClient::contentSize):
255         (BlackBerry::WebKit::PagePopupBlackBerryClient::writeDocument):
256         * WebCoreSupport/PagePopupBlackBerryClient.h: Added.
257         (PagePopupBlackBerryClient):
258         (BlackBerry::WebKit::PagePopupBlackBerryClient::~PagePopupBlackBerryClient):
259         * WebCoreSupport/SelectPopupClient.cpp:
260         (BlackBerry::WebKit::SelectPopupClient::SelectPopupClient):
261         (BlackBerry::WebKit::SelectPopupClient::didClosePopup):
262         * WebCoreSupport/SelectPopupClient.h:
263         (SelectPopupClient):
264         * WebKitSupport/InputHandler.cpp:
265         (BlackBerry::WebKit::InputHandler::openDatePopup): Do not call
266         closePagePopup() since this is already done by openPagePopup() and
267         use openPagePopup() from WebPagePrivate directly.
268         (BlackBerry::WebKit::InputHandler::openColorPopup): Ditto.
269         (BlackBerry::WebKit::InputHandler::openSelectPopup): Ditto.
270
271 2013-05-20  Carlos Garcia Campos  <cgarcia@igalia.com>
272
273         [BlackBerry] Do not use skia in FrameLoaderClientBlackBerry::dispatchDidReceiveIcon()
274         https://bugs.webkit.org/show_bug.cgi?id=116302
275
276         Reviewed by Rob Buis.
277
278         TiledImage is now the NativeImage of the BlackBerry port.
279
280         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
281         (WebCore::FrameLoaderClientBlackBerry::dispatchDidReceiveIcon):
282
283 2013-05-19  Anders Carlsson  <andersca@apple.com>
284
285         Remove link prerendering code
286         https://bugs.webkit.org/show_bug.cgi?id=116415
287
288         Reviewed by Darin Adler.
289
290         This code was only used by Chromium and is dead now.
291
292         * WebCoreSupport/AboutDataEnableFeatures.in:
293
294 2013-05-19  Anders Carlsson  <andersca@apple.com>
295
296         Remove ChromeClient::webView()
297         https://bugs.webkit.org/show_bug.cgi?id=116054
298
299         Reviewed by Andreas Kling.
300
301         This blatantly horrible layer violation was only used by the Chromium port; get rid of it.
302
303         * WebCoreSupport/ChromeClientBlackBerry.h:
304         (ChromeClientBlackBerry):
305
306 2013-05-17  Carlos Garcia Campos  <cgarcia@igalia.com>
307
308         [BlackBerry] REGRESSION(r150060): Crash in LayerWebKitThread::updateTextureContents
309         https://bugs.webkit.org/show_bug.cgi?id=116305
310
311         Reviewed by Rob Buis.
312
313         PR 340537.
314         Internally reviewed by Arvid Nilsson.
315
316         Use updateLayoutAndStyleIfNeededRecursive() instead of
317         layoutIfNeeded() since we are about to draw in
318         rootLayerCommitTimerFired().
319
320         * Api/WebPage.cpp:
321         (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
322
323 2013-05-17  Mike Fenton  <mifenton@rim.com>
324
325         [BlackBerry] Remove stale comment for select mouse handling.
326         https://bugs.webkit.org/show_bug.cgi?id=116309
327
328         Reviewed by Rob Buis.
329
330         PR 135935.
331
332         Remove a FIXME that has been invalidated by a change
333         to our touch -> mouse model.
334
335         Internally Rubberstamped by Genevieve Mak.
336
337         * Api/WebPage.cpp:
338         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
339
340 2013-05-17  Alberto Garcia  <agarcia@igalia.com>
341
342         [BlackBerry] DumpRenderTreeSupport: fix build in setMockDeviceOrientation()
343         https://bugs.webkit.org/show_bug.cgi?id=116298
344
345         Reviewed by Carlos Garcia Campos.
346
347         Pass the correct parameter to toDeviceOrientationClientMock()
348
349         * WebKitSupport/DumpRenderTreeSupport.cpp:
350         (DumpRenderTreeSupport::setMockDeviceOrientation):
351
352 2013-05-16  Mike Fenton  <mifenton@rim.com>
353
354         [BlackBerry] Optimize caret bounds calculation when leaving an input field.
355         https://bugs.webkit.org/show_bug.cgi?id=116224
356
357         Reviewed by Rob Buis.
358
359         PR 340132.
360
361         If the caret is no longer active in the field, do not allow it
362         to go into the single line input logic and calculate the node
363         bounding box.
364
365         Internally Reviewed By Gen Mak
366
367         * WebKitSupport/SelectionHandler.cpp:
368         (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
369
370 2013-05-16  Mary Wu  <mary.wu@torchmobile.com.cn>
371
372         [BlackBerry] Unable to download blob resource
373         https://bugs.webkit.org/show_bug.cgi?id=115888
374
375         Reviewed by Benjamin Poulain.
376
377         For blob resource (blob:http....), it's not suitable to go to NetworkStream
378         which don't handle "blob" protocol at all. since blob data already handled
379         in BlobResourceHandle, simply get the data out to download stream.
380
381         RIM bug 331086, internally reviewed by Charles Wei and Leo Yang.
382
383         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
384         (WebCore::FrameLoaderClientBlackBerry::convertMainResourceLoadToDownload):
385
386 2013-05-16  Andreas Kling  <akling@apple.com>
387
388         Page::chrome() should return a reference.
389         <http://webkit.org/b/116185>
390
391         Reviewed by Anders Carlsson.
392
393 2013-05-13  Anders Carlsson  <andersca@apple.com>
394
395         Frame::editor() should return a reference
396         https://bugs.webkit.org/show_bug.cgi?id=116037
397
398         Reviewed by Darin Adler.
399
400         * WebCoreSupport/EditorClientBlackBerry.cpp:
401         (WebCore::EditorClientBlackBerry::shouldSpellCheckFocusedField):
402         (WebCore::EditorClientBlackBerry::handleKeyboardEvent):
403         * WebKitSupport/DOMSupport.cpp:
404         (BlackBerry::WebKit::DOMSupport::elementHasContinuousSpellCheckingEnabled):
405         * WebKitSupport/InPageSearchManager.cpp:
406         (BlackBerry::WebKit::InPageSearchManager::findAndMarkText):
407         (BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):
408         * WebKitSupport/SelectionHandler.cpp:
409         (BlackBerry::WebKit::SelectionHandler::selectedText):
410
411 2013-05-14  Carlos Garcia Campos  <cgarcia@igalia.com>
412
413         Remove WTF_USE_PLATFORM_STRATEGIES
414         https://bugs.webkit.org/show_bug.cgi?id=114431
415
416         Reviewed by Darin Adler.
417
418         * WebCoreSupport/AboutDataUseFeatures.in:
419
420 2013-05-14  Tiancheng Jiang  <tijiang@rim.com>
421
422         [BlackBerry] Improve Fatfinger phase.
423         https://bugs.webkit.org/show_bug.cgi?id=107403
424
425         Reviewed by Rob Buis.
426
427         Internally reviewed by Genevieve Mak.
428         BlackBerry PR 324965.
429
430         Cache and reuse intersected nodes as long as hit position has not been
431         changed.
432
433         * Api/WebPage.cpp:
434         (BlackBerry::WebKit::WebPagePrivate::hitTestResult):
435         * Api/WebPage_p.h:
436         (WebPagePrivate):
437         * WebKitSupport/FatFingers.cpp:
438         (BlackBerry::WebKit::FatFingers::findBestPoint):
439         (BlackBerry::WebKit::FatFingers::findIntersectingRegions):
440         (BlackBerry::WebKit::FatFingers::getNodesFromRect):
441         * WebKitSupport/FatFingers.h:
442
443 2013-05-14  Andrew Lo  <anlo@rim.com>
444
445         [BlackBerry] Hook up frame render begin/end in PerformanceMonitor
446         https://bugs.webkit.org/show_bug.cgi?id=116110
447
448         Reviewed by Rob Buis.
449
450         Internally reviewed by Jeff Rogers, Jonathan Jiang.
451         Internal PR 299155.
452
453         Mark frame render begin & end for BlackBerry performance monitoring
454         in blitVisibleContents.
455
456         * Api/BackingStore.cpp:
457         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
458
459 2013-05-14  Carlos Garcia Campos  <cgarcia@igalia.com>
460
461         [BlackBerry] Use requestAnimationFrame for animations
462         https://bugs.webkit.org/show_bug.cgi?id=115896
463
464         Reviewed by Rob Buis.
465
466         Make WebPagePrivate a
467         BlackBerry::Platform::AnimationFrameRateClient and use it to
468         schedule animations.
469
470         * Api/WebPage.cpp:
471         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
472         (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
473         (WebKit):
474         (BlackBerry::WebKit::WebPagePrivate::animationFrameChanged):
475         (BlackBerry::WebKit::WebPagePrivate::scheduleAnimation):
476         (BlackBerry::WebKit::WebPagePrivate::startRefreshAnimationClient):
477         (BlackBerry::WebKit::WebPagePrivate::stopRefreshAnimationClient):
478         (BlackBerry::WebKit::WebPagePrivate::handleServiceScriptedAnimationsOnMainThread):
479         * Api/WebPage_p.h:
480         (WebPagePrivate):
481         * WebCoreSupport/ChromeClientBlackBerry.cpp:
482         (WebCore):
483         (WebCore::ChromeClientBlackBerry::scheduleAnimation):
484         * WebCoreSupport/ChromeClientBlackBerry.h:
485         (ChromeClientBlackBerry):
486
487 2013-05-14  Carlos Garcia Campos  <cgarcia@igalia.com>
488
489         [BlackBerry] Implement platform strategies
490         https://bugs.webkit.org/show_bug.cgi?id=112162
491
492         Reviewed by Rob Buis.
493
494         * Api/BlackBerryGlobal.cpp:
495         (BlackBerry::WebKit::globalInitialize): Initialize platform
496         strategies.
497         * WebCoreSupport/PlatformStrategiesBlackBerry.cpp: Added.
498         (PlatformStrategiesBlackBerry::initialize):
499         (PlatformStrategiesBlackBerry::PlatformStrategiesBlackBerry):
500         (PlatformStrategiesBlackBerry::createCookiesStrategy):
501         (PlatformStrategiesBlackBerry::createDatabaseStrategy):
502         (PlatformStrategiesBlackBerry::createLoaderStrategy):
503         (PlatformStrategiesBlackBerry::createPasteboardStrategy):
504         (PlatformStrategiesBlackBerry::createPluginStrategy):
505         (PlatformStrategiesBlackBerry::createSharedWorkerStrategy):
506         (PlatformStrategiesBlackBerry::createStorageStrategy):
507         (PlatformStrategiesBlackBerry::createVisitedLinkStrategy):
508         (PlatformStrategiesBlackBerry::cookiesForDOM):
509         (PlatformStrategiesBlackBerry::setCookiesFromDOM):
510         (PlatformStrategiesBlackBerry::cookiesEnabled):
511         (PlatformStrategiesBlackBerry::cookieRequestHeaderFieldValue):
512         (PlatformStrategiesBlackBerry::getRawCookies):
513         (PlatformStrategiesBlackBerry::deleteCookie):
514         (PlatformStrategiesBlackBerry::refreshPlugins):
515         (PlatformStrategiesBlackBerry::getPluginInfo):
516         (PlatformStrategiesBlackBerry::isLinkVisited):
517         (PlatformStrategiesBlackBerry::addVisitedLink):
518         * WebCoreSupport/PlatformStrategiesBlackBerry.h: Added.
519         (PlatformStrategiesBlackBerry):
520
521 2013-05-14  Carlos Garcia Campos  <cgarcia@igalia.com>
522
523         [BlackBerry] Crash due to an assert in FrameView::doDeferredRepaints
524         https://bugs.webkit.org/show_bug.cgi?id=115412
525
526         Reviewed by Rob Buis.
527
528         PR 115412
529
530         The problem is that we are calling
531         updateLayoutAndStyleIfNeededRecursive() (because of
532         zoomToInitialScaleOnLoad) from ChomeClient::layoutUpdated()
533         callback which is not expected. It's expected to be called right
534         before painting, and not right after painting. Even if a new
535         layout is not done, updateLayoutAndStyleIfNeededRecursive() calls
536         flushDeferredRepaints() and it's possible that this is called in
537         the middle of a beginDeferredRepaints() and endDeferredRepaints()
538         apparently.
539         In general only BackingStore should call
540         updateLayoutAndStyleIfNeededRecursive before painting, and a simple
541         layout is enough in all other cases like resizing. This patch renames
542         requestLayoutIfNeeded as updateLayoutAndStyleIfNeededRecursive to
543         make more obvious what it does, and adds layoutIfNeeded that calls
544         layout. The former is used by the BackingStore and the latter by
545         WebPage.
546
547         * Api/BackingStore.cpp:
548         (BlackBerry::WebKit::BackingStorePrivate::resumeScreenUpdates):
549         (BlackBerry::WebKit::BackingStorePrivate::requestLayoutIfNeeded):
550         * Api/WebPage.cpp:
551         (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint):
552         (BlackBerry::WebKit::WebPagePrivate::updateLayoutAndStyleIfNeededRecursive):
553         (BlackBerry::WebKit::WebPagePrivate::layoutIfNeeded):
554         (WebKit):
555         (BlackBerry::WebKit::WebPagePrivate::overflowExceedsContentsSize):
556         (BlackBerry::WebKit::WebPagePrivate::zoomToInitialScaleOnLoad):
557         (BlackBerry::WebKit::WebPagePrivate::webContext):
558         (BlackBerry::WebKit::WebPagePrivate::zoomAnimationFinished):
559         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
560         (BlackBerry::WebKit::WebPage::setDefaultLayoutSize):
561         (BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
562         * Api/WebPage_p.h:
563         (WebPagePrivate):
564
565 2013-05-10  Laszlo Gombos  <l.gombos@samsung.com>
566
567         Remove USE(OS_RANDOMNESS)
568         https://bugs.webkit.org/show_bug.cgi?id=108095
569
570         Reviewed by Darin Adler.
571
572         Remove the USE(OS_RANDOMNESS) guard as it is turned on for all
573         ports.
574
575         * WebCoreSupport/AboutDataUseFeatures.in:
576
577 2013-05-10  Jacky Jiang  <zhajiang@blackberry.com>
578
579         Fix some compiler warnings (miscellaneous)
580         https://bugs.webkit.org/show_bug.cgi?id=80790
581
582         Reviewed by Rob Buis.
583
584         Fix the following warnings for BlackBerry:
585         BackingStore.cpp:852:60: warning: suggest parentheses around '&&' within
586         '||' [-Wparentheses].
587         WebPage.cpp:2858:40: warning: suggest parentheses around assignment used
588         as truth value [-Wparentheses].
589         WebPage.cpp:2880:42: warning: suggest parentheses around assignment used
590         as truth value [-Wparentheses]
591
592         * Api/BackingStore.cpp:
593         (BlackBerry::WebKit::BackingStorePrivate::updateTilesAfterBackingStoreRectChange):
594         * Api/WebPage.cpp:
595         (BlackBerry::WebKit::WebPagePrivate::adjustRectOffsetForFrameOffset):
596         (BlackBerry::WebKit::WebPagePrivate::blockZoomRectForNode):
597
598 2013-05-09  Mike Fenton  <mifenton@rim.com>
599
600         [BlackBerry] Style updates required based on new check-webkit-style
601         https://bugs.webkit.org/show_bug.cgi?id=115857
602
603         Reviewed by Rob Buis.
604
605         Update iInRegionScroller, WebKitTextCodec and WebPageCompositor
606         to match check-webkit-style updates.
607
608         * Api/InRegionScroller.cpp:
609         (BlackBerry::WebKit::InRegionScrollerPrivate::setScrollPositionCompositingThread):
610         * Api/InRegionScroller_p.h:
611         * Api/WebKitTextCodec.cpp:
612         (BlackBerry::WebKit::transcode):
613         * Api/WebPageCompositor.cpp:
614         (BlackBerry::WebKit::WebPageCompositor::render):
615         * Api/WebPageCompositor.h:
616         * Api/WebPageCompositor_p.h:
617         (WebPageCompositorPrivate):
618         * Api/WebSettings_p.h:
619
620 2013-05-09  Max Feil  <mfeil@rim.com>
621
622         shouldUsePluginDocument() needs to be respected when a document is created
623         https://bugs.webkit.org/show_bug.cgi?id=110308
624
625         Reviewed by Rob Buis.
626
627         This patch implements shouldAlwaysUsePluginDocument() in the
628         BlackBerry frame loader client. It is called in several places
629         within WebCore to determine whether a PluginDocument should
630         be created.
631
632         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
633         (WebCore::FrameLoaderClientBlackBerry::shouldAlwaysUsePluginDocument):
634         (WebCore):
635         (WebCore::FrameLoaderClientBlackBerry::createPlugin):
636         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
637         (FrameLoaderClientBlackBerry):
638
639 2013-05-09  Mike Fenton <mifenton@rim.com>
640
641         [BlackBerry] Style updates required based on new check-webkit-style
642         https://bugs.webkit.org/show_bug.cgi?id=115857
643
644         Reviewed by Rob Buis.
645
646         Update SelectionHandler to match check-webkit-style updates.
647
648         * WebKitSupport/SelectionHandler.cpp:
649         (BlackBerry::WebKit::shouldExtendSelectionInDirection):
650         (BlackBerry::WebKit::SelectionHandler::extendSelectionToFieldBoundary):
651         (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
652         (BlackBerry::WebKit::adjustCaretRects):
653         (BlackBerry::WebKit::SelectionHandler::clipPointToVisibleContainer):
654         (BlackBerry::WebKit::regionRectListContainsPoint):
655         * WebKitSupport/SelectionHandler.h:
656         (SelectionHandler):
657
658 2013-05-09  Mike Fenton  <mifenton@rim.com>
659
660         [BlackBerry] Style updates required based on new check-webkit-style
661         https://bugs.webkit.org/show_bug.cgi?id=115857
662
663         Reviewed by Rob Buis.
664
665         Update WebPage and WebPageClient to match check-webkit-style updates.
666
667         * Api/WebPage.cpp:
668         (BlackBerry::WebKit::WebPagePrivate::init):
669         (BlackBerry::WebKit::WebPage::executeJavaScriptInIsolatedWorld):
670         (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint):
671         (BlackBerry::WebKit::WebPagePrivate::calculateReflowedScrollPosition):
672         (BlackBerry::WebKit::WebPagePrivate::centerOfVisibleContentsRect):
673         (BlackBerry::WebKit::WebPage::assignFocus):
674         (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore):
675         (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
676         (BlackBerry::WebKit::WebPage::deleteTextRelativeToCursor):
677         (BlackBerry::WebKit::WebPage::addVisitedLink):
678         (BlackBerry::WebKit::WebPagePrivate::findPatternStringForUrl):
679         (BlackBerry::WebKit::WebPage::notifySwipeEvent):
680         (BlackBerry::WebKit::WebPage::notifyScreenPowerStateChanged):
681         (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
682         (BlackBerry::WebKit::WebPagePrivate::setRootLayerWebKitThread):
683         (BlackBerry::WebKit::WebPagePrivate::releaseLayerResourcesCompositingThread):
684         * Api/WebPageClient.h:
685         * Api/WebPage_p.h:
686
687 2013-05-09  Mike Fenton  <mifenton@rim.com>
688
689
690         [BlackBerry] Style updates required based on new check-webkit-style
691         https://bugs.webkit.org/show_bug.cgi?id=115857
692
693         Reviewed by Rob Buis.
694
695         Update BackingStore to match check-webkit-style updates.
696
697         Internally reviewed by Jakob Petsovits.
698
699         * Api/BackingStore.cpp:
700         (BlackBerry::WebKit::bestDivisor):
701         (BlackBerry::WebKit::BackingStorePrivate::repaint):
702         (BlackBerry::WebKit::BackingStorePrivate::shouldMoveLeft):
703         (BlackBerry::WebKit::BackingStorePrivate::shouldMoveRight):
704         (BlackBerry::WebKit::BackingStorePrivate::shouldMoveUp):
705         (BlackBerry::WebKit::BackingStorePrivate::shouldMoveDown):
706         (BlackBerry::WebKit::BackingStorePrivate::canMoveLeft):
707         (BlackBerry::WebKit::BackingStorePrivate::canMoveRight):
708         (BlackBerry::WebKit::BackingStorePrivate::canMoveUp):
709         (BlackBerry::WebKit::BackingStorePrivate::canMoveDown):
710         (BlackBerry::WebKit::BackingStorePrivate::indexOfTile):
711         (BlackBerry::WebKit::BackingStorePrivate::clearAndUpdateTileOfNotRenderedRegion):
712         (BlackBerry::WebKit::BackingStorePrivate::scrollBackingStore):
713         (BlackBerry::WebKit::BackingStoreGeometry::originOfTile):
714         (BlackBerry::WebKit::BackingStore::repaint):
715         * Api/BackingStore_p.h:
716         (BackingStoreGeometry):
717
718 2013-05-09  Mike Fenton  <mifenton@rim.com>
719
720         [BlackBerry] Style updates required based on new check-webkit-style
721         https://bugs.webkit.org/show_bug.cgi?id=115857
722
723         Reviewed by Rob Buis.
724
725         Update ChromeClientBlackBerry, CredentialManager, FrameLoaderClientBlackBerry,
726         GeolocationClientBlackBerry and IconDatabaseClientBlackberry to
727         match check-webkit-style updates.
728
729         * WebCoreSupport/ChromeClientBlackBerry.h:
730         (ChromeClientBlackBerry):
731         * WebCoreSupport/CredentialManager.h:
732         (CredentialManager):
733         * WebCoreSupport/CredentialTransformData.cpp:
734         * WebCoreSupport/FrameLoaderClientBlackBerry.h:
735         (WebCore::FrameLoaderClientBlackBerry::assignIdentifierToInitialRequest):
736         (FrameLoaderClientBlackBerry):
737         (WebCore::FrameLoaderClientBlackBerry::dispatchDidReceiveAuthenticationChallenge):
738         (WebCore::FrameLoaderClientBlackBerry::dispatchDidCancelAuthenticationChallenge):
739         (WebCore::FrameLoaderClientBlackBerry::dispatchDidReceiveContentLength):
740         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFinishLoading):
741         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFailLoading):
742         * WebCoreSupport/GeolocationClientBlackBerry.cpp:
743         (GeolocationClientBlackBerry::onLocationUpdate):
744         * WebCoreSupport/GeolocationClientBlackBerry.h:
745         (GeolocationClientBlackBerry):
746         * WebCoreSupport/IconDatabaseClientBlackBerry.cpp:
747         (WebCore::IconDatabaseClientBlackBerry::initIconDatabase):
748
749 2013-05-09  Jacky Jiang  <zhajiang@blackberry.com>
750
751         Fix some compiler warnings (miscellaneous)
752         https://bugs.webkit.org/show_bug.cgi?id=80790
753
754         Reviewed by Rob Buis.
755
756         Fix the following warnings for BlackBerry:
757         InRegionScroller.cpp:286:39: warning: suggest parentheses around
758         assignment used as truth value [-Wparentheses].
759         InRegionScroller.cpp:349:39: warning: suggest parentheses around
760         assignment used as truth value [-Wparentheses].
761         InRegionScroller.cpp:456:82: warning: suggest parentheses around '&&'
762         within '||' [-Wparentheses].
763         InRegionScrollableArea.cpp:134:16: warning: suggest explicit braces to
764         avoid ambiguous 'else' [-Wparentheses].
765         SelectionHandler.cpp:390:109: warning: suggest parentheses around '&&'
766         within '||' [-Wparentheses].
767         SelectionOverlay.cpp:56:47: warning: comparison between signed and
768         unsigned integer expressions [-Wsign-compare].
769
770
771         * Api/InRegionScroller.cpp:
772         (BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint):
773         (BlackBerry::WebKit::InRegionScrollerPrivate::firstScrollableInRegionForNode):
774         (BlackBerry::WebKit::InRegionScrollerPrivate::canScrollRenderBox):
775         * WebKitSupport/InRegionScrollableArea.cpp:
776         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
777         * WebKitSupport/SelectionHandler.cpp:
778         (BlackBerry::WebKit::SelectionHandler::extendSelectionToFieldBoundary):
779         * WebKitSupport/SelectionOverlay.cpp:
780         (BlackBerry::WebKit::SelectionOverlay::draw):
781
782 2013-05-09  Mike Fenton  <mifenton@rim.com>
783
784         [BlackBerry] Style updates required based on new check-webkit-style
785         https://bugs.webkit.org/show_bug.cgi?id=115857
786
787         Reviewed by Rob Buis.
788
789         Update ColorPickerClient and PagePopupBlackBerry
790         to match check-webkit-style updates.
791
792         * WebCoreSupport/ColorPickerClient.cpp:
793         (WebCore::ColorPickerClient::generateHTML):
794         * WebCoreSupport/PagePopupBlackBerry.cpp:
795         (WebCore::setValueAndClosePopupCallback):
796         (WebCore::PagePopupBlackBerry::installDOMFunction):
797
798 2013-05-09  Alberto Garcia  <agarcia@igalia.com>
799
800         [BlackBerry] Upstream the input popups
801         https://bugs.webkit.org/show_bug.cgi?id=114608
802
803         Reviewed by Rob Buis.
804
805         This patch contains contributions from many members of the
806         BlackBerry WebKit team, including:
807
808         Chris Hutten-Czapski
809         David Hoon
810         Jessica Cao
811         Rob Buis
812         Tiancheng Jiang
813
814         * WebCoreSupport/ColorPickerClient.cpp:
815         (WebCore):
816         (WebCore::ColorPickerClient::generateHTML):
817         * WebCoreSupport/DatePickerClient.cpp:
818         (WebCore):
819         (WebCore::DatePickerClient::generateHTML):
820         (WebCore::DatePickerClient::generateDateLabels):
821         * WebCoreSupport/DatePickerClient.h:
822         (DatePickerClient):
823         * WebCoreSupport/SelectPopupClient.cpp:
824         (WebCore):
825         (WebCore::SelectPopupClient::generateHTML):
826
827 2013-05-09  Mike Fenton  <mifenton@rim.com>
828
829         [BlackBerry] Style updates required based on new check-webkit-style
830         https://bugs.webkit.org/show_bug.cgi?id=115857
831
832         Reviewed by Rob Buis.
833
834         Update DOMSupport to match check-webkit-style updates.
835
836         * WebKitSupport/DOMSupport.cpp:
837         (BlackBerry::WebKit::DOMSupport::isTextInputElement):
838         (BlackBerry::WebKit::DOMSupport::isPasswordElement):
839         (BlackBerry::WebKit::DOMSupport::convertPointToFrame):
840
841 2013-05-09  Xuefei Ren  <xren@blackberry.com>
842
843         [BLACKBERRY]fix regression in Webpage
844         and FrameLoaderClientBlackberry
845         https://bugs.webkit.org/show_bug.cgi?id=115843
846
847         Reviewed by Rob Buis.
848
849         Internally reviewed by Mary Wu.
850
851         * Api/WebPage.cpp:
852         (BlackBerry::WebKit::WebPage::loadFile):
853         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
854         (WebCore::FrameLoaderClientBlackBerry::startDownload):
855
856 2013-05-09  Mike Fenton  <mifenton@rim.com>
857
858         [BlackBerry] Style updates required based on new check-webkit-style
859         https://bugs.webkit.org/show_bug.cgi?id=115857
860
861         Reviewed by Rob Buis.
862
863         Update FatFingers to match check-webkit-style updates.
864
865         * WebKitSupport/FatFingers.cpp:
866         (BlackBerry::WebKit::FatFingers::checkFingerIntersection):
867         (BlackBerry::WebKit::FatFingers::checkForClickableElement):
868         * WebKitSupport/FatFingers.h:
869         (FatFingersResult):
870
871 2013-05-09  Mike Fenton  <mifenton@rim.com>
872
873         [BlackBerry] Style updates required based on new check-webkit-style
874         https://bugs.webkit.org/show_bug.cgi?id=115857
875
876         Reviewed by Rob Buis.
877
878         Update InRegionScrollableArea, TileIndexHash
879         and TouchEventHandler to match check-webkit-style updates.
880
881         * WebKitSupport/InRegionScrollableArea.cpp:
882         * WebKitSupport/TileIndexHash.h:
883         * WebKitSupport/TouchEventHandler.cpp:
884         (BlackBerry::WebKit::TouchEventHandler::drawTapHighlight):
885
886 2013-05-09  Mike Fenton  <mifenton@rim.com>
887
888         [BlackBerry] Style updates required based on new check-webkit-style
889         https://bugs.webkit.org/show_bug.cgi?id=115857
890
891         Reviewed by Rob Buis.
892
893         Styles fixes required for InputHandler based on updated
894         check-webkit-style.
895
896         * WebKitSupport/InputHandler.cpp:
897         (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
898         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
899         (BlackBerry::WebKit::InputHandler::ensureFocusPluginElementVisible):
900         (BlackBerry::WebKit::InputHandler::setPopupListIndexes):
901         (BlackBerry::WebKit::InputHandler::firstSpanInString):
902         (BlackBerry::WebKit::InputHandler::setTextAttributes):
903         * WebKitSupport/InputHandler.h:
904
905 2013-05-08  Eli Fidler  <efidler@blackberry.com>
906
907         [BlackBerry] Fix usage of BlackBerry::Platform::String
908         https://bugs.webkit.org/show_bug.cgi?id=115781
909
910         Reviewed by Rob Buis.
911
912         BlackBerry PRs 304193 and 327181
913         Internally Reviewed by Mike Lattanzio, Arvid Nilsson, Joe Mason, Jeff Rogers, and George Staikos
914
915         We currently have a problem where we're passing UTF-8 encoded data into
916         the char* constructors of BlackBerry::Platform::String. This means the string
917         thinks its data is not UTF-8.
918
919         * Api/JavaScriptVariant.cpp:
920         (BlackBerry::WebKit::JSValueRefToBlackBerryJavaScriptVariant):
921         * Api/WebKitTextCodec.cpp:
922         (BlackBerry::WebKit::base64Encode):
923         * Api/WebPage.cpp:
924         (BlackBerry::WebKit::WebPage::loadFile):
925         (BlackBerry::WebKit::WebPage::textEncoding):
926         (BlackBerry::WebKit::WebPage::textHasAttribute):
927         (BlackBerry::WebKit::WebPagePrivate::defaultUserAgent):
928         * Api/WebPage.h:
929         * Api/WebSettings.cpp:
930         (BlackBerry::WebKit::WebSettings::standardSettings):
931         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
932         (WebCore::FrameLoaderClientBlackBerry::dispatchDidFinishLoad):
933         (WebCore::FrameLoaderClientBlackBerry::dispatchDidReceiveIcon):
934         * WebKitSupport/DefaultTapHighlight.cpp:
935         (WebKit):
936         (BlackBerry::WebKit::DefaultTapHighlight::draw):
937         (BlackBerry::WebKit::DefaultTapHighlight::hide):
938
939 2013-05-08  Rob Buis  <rbuis@rim.com>
940
941         Fix some compiler warnings (miscellaneous)
942         https://bugs.webkit.org/show_bug.cgi?id=80790
943
944         Reviewed by Philip Rogers.
945
946         Get rid of the following warning for BlackBerry:
947
948         BackingStoreClient.cpp:54:21: warning: unused parameter 'parentFrame' [-Wunused-parameter]
949
950         by using ASSERT_UNUSED instead of ASSERT.
951
952         * WebKitSupport/BackingStoreClient.cpp:
953         (BlackBerry::WebKit::BackingStoreClient::create):
954
955 2013-05-07  Xuefei Ren  <xren@blackberry.com>
956
957         Clean up load interface in WebPage
958         https://bugs.webkit.org/show_bug.cgi?id=115622
959         Reviewed by Rob Buis.
960
961         Internal PR:315535
962         Internal reviewed by  Mary Wu
963
964         * Api/WebPage.cpp:
965         (BlackBerry::WebKit::WebPagePrivate::load):
966         (BlackBerry::WebKit::WebPage::loadFile):
967         (BlackBerry::WebKit::WebPage::load):
968         * Api/WebPage.h:
969         * Api/WebPage_p.h:
970         (WebPagePrivate):
971         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
972         (WebCore::FrameLoaderClientBlackBerry::startDownload):
973
974 2013-05-07  Mike Fenton  <mifenton@rim.com>
975
976         [BlackBerry] Increase the padding size for caret based scrolling.
977         https://bugs.webkit.org/show_bug.cgi?id=115749
978
979         Reviewed by Rob Buis.
980
981         PR 322670.
982
983         Increasing the padding size for scrolling in order to optimize the
984         number of scrolls required during typing.
985
986         * WebKitSupport/InputHandler.cpp:
987         (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
988
989 2013-05-07  Nima Ghanavatian  <nghanavatian@blackberry.com>
990
991         [BlackBerry] Maintain touch event state throughout processing
992         https://bugs.webkit.org/show_bug.cgi?id=115663
993
994         Reviewed by Rob Buis.
995
996         Internally reviewed by Otto Cheung and Genevieve Mak.
997
998         PR 297691
999         By maintaining our touch event state, we can get a better idea
1000         of what triggered an update to selection and respond appropriately.
1001         On touch press we set userTouchTriggered to give the UI thread
1002         some context.
1003
1004         * Api/WebPage.cpp:
1005         (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
1006         (BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
1007         (BlackBerry::WebKit::WebPage::setExtraPluginDirectory):
1008         * Api/WebPage_p.h:
1009         (WebPagePrivate):
1010         * WebKitSupport/SelectionHandler.cpp:
1011         (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
1012
1013 2013-05-07  Nima Ghanavatian  <nghanavatian@blackberry.com>
1014
1015         [BlackBerry] Read-only fields should not get keyboard focus
1016         https://bugs.webkit.org/show_bug.cgi?id=115725
1017
1018         Reviewed by Rob Buis.
1019
1020         Internally reviewed by Mike Fenton.
1021
1022         PR332887
1023         Prevent keyboard focus and FCC from displaying when the user taps on a
1024         read-only field. Further, ensure form controls skip over these fields
1025         with the next/previous buttons.
1026
1027         * WebKitSupport/DOMSupport.cpp:
1028         (BlackBerry::WebKit::DOMSupport::elementIsReadOnly):
1029         (DOMSupport):
1030         * WebKitSupport/DOMSupport.h:
1031         * WebKitSupport/InputHandler.cpp:
1032         (BlackBerry::WebKit::InputHandler::focusedNodeChanged):
1033         (BlackBerry::WebKit::InputHandler::setInputModeEnabled):
1034         (BlackBerry::WebKit::InputHandler::notifyClientOfKeyboardVisibilityChange):
1035         (BlackBerry::WebKit::InputHandler::isActiveTextEdit):
1036         (WebKit):
1037         * WebKitSupport/InputHandler.h:
1038
1039 2013-05-07  Nima Ghanavatian  <nghanavatian@blackberry.com>
1040
1041         [BlackBerry] Expand spellcheck logging
1042         https://bugs.webkit.org/show_bug.cgi?id=115482
1043
1044         Reviewed by Rob Buis.
1045
1046         Internally reviewed by Mike Fenton.
1047
1048         Fix some build errors when SpellingLog was turned on and expand on the debug
1049         statements to be more verbose. Set up timers and print the duration of each
1050         iteration as we traverse the text to create a range to send out for checking.
1051
1052         * WebKitSupport/InputHandler.cpp:
1053         (BlackBerry::WebKit::InputHandler::spellCheckingRequestCancelled):
1054         (BlackBerry::WebKit::InputHandler::spellCheckingRequestProcessed):
1055         (BlackBerry::WebKit::InputHandler::setElementFocused):
1056         (WebKit):
1057         (BlackBerry::WebKit::InputHandler::spellCheckTextBlock):
1058         * WebKitSupport/SpellingHandler.cpp:
1059         (BlackBerry::WebKit::SpellingHandler::spellCheckTextBlock):
1060         (BlackBerry::WebKit::SpellingHandler::parseBlockForSpellChecking):
1061
1062 2013-05-06  Mike Lattanzio  <mlattanzio@blackberry.com>
1063
1064         [BlackBerry] Enable and Expose Text Autosizing through BlackBerry::WebKit::WebSettings
1065         https://bugs.webkit.org/show_bug.cgi?id=113808
1066
1067         Reviewed by Rob Buis.
1068
1069         Create a WebSetting for text autosizing. The default is off.
1070
1071         * Api/WebPage.cpp:
1072         (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
1073         * Api/WebSettings.cpp:
1074         (WebKit):
1075         (BlackBerry::WebKit::WebSettings::standardSettings):
1076         (BlackBerry::WebKit::WebSettings::isTextAutosizingEnabled):
1077         (BlackBerry::WebKit::WebSettings::setTextAutosizingEnabled):
1078         * Api/WebSettings.h:
1079
1080 2013-05-06  Nima Ghanavatian  <nghanavatian@blackberry.com>
1081
1082         [BlackBerry] Ensure document is attached before accessing its FrameSelection
1083         https://bugs.webkit.org/show_bug.cgi?id=115565
1084
1085         Reviewed by Rob Buis.
1086
1087         Internally reviewed by Mike Fenton.
1088
1089         PR 312101
1090         We need to make sure that the node and document
1091         are attached before accessing the FrameSelection. This was
1092         handled earlier but not all call paths were covered.
1093
1094         * WebKitSupport/InputHandler.cpp:
1095         (BlackBerry::WebKit::InputHandler::setElementUnfocused):
1096         (BlackBerry::WebKit::InputHandler::isActiveTextEdit):
1097         (WebKit):
1098         * WebKitSupport/InputHandler.h:
1099
1100 2013-05-06  Nima Ghanavatian  <nghanavatian@blackberry.com>
1101
1102         [BlackBerry] Do not spellcheck when composition is active.
1103         https://bugs.webkit.org/show_bug.cgi?id=115562
1104
1105         Reviewed by Rob Buis.
1106
1107         Internally reviewed by Mike Fenton.
1108
1109         PR331344
1110         Typing can trigger rechecking since layout changes. Ensure
1111         extra work is only done when we need it, and that it won't
1112         be triggered when composition is active. If the user hasn't
1113         finished a word yet, it is likely future key events will be
1114         arriving, so checking the string at this point is extraneous.
1115
1116         * WebKitSupport/InputHandler.cpp:
1117         (BlackBerry::WebKit::InputHandler::requestCheckingOfString):
1118
1119 2013-05-06  Nima Ghanavatian  <nghanavatian@blackberry.com>
1120
1121         [BlackBerry] Reduce the spellcheck checking range
1122         https://bugs.webkit.org/show_bug.cgi?id=115479
1123
1124         Reviewed by Rob Buis.
1125
1126         Internally reviewed by Mike Fenton.
1127
1128         PR332773
1129         Previously we were spellchecking the entire field on focus. If relayouting
1130         occurred we rechecked this region, which is very costly. Switch to check
1131         only a small region around the caret in both cases, which should alleviate
1132         much of the delays experienced in very large contenteditable fields. This
1133         allows for faster key input response and less time processing these requests
1134         on the WebKit thread.
1135
1136         * WebKitSupport/InputHandler.cpp:
1137         (BlackBerry::WebKit::InputHandler::requestCheckingOfString):
1138         (BlackBerry::WebKit::InputHandler::spellCheckTextBlock):
1139         * WebKitSupport/SpellingHandler.cpp:
1140         (WebKit):
1141         (BlackBerry::WebKit::SpellingHandler::spellCheckTextBlock):
1142         * WebKitSupport/SpellingHandler.h:
1143         (SpellingHandler):
1144
1145 2013-05-06  Nima Ghanavatian  <nghanavatian@blackberry.com>
1146
1147         [BlackBerry] Use a more descriptive timer name
1148         https://bugs.webkit.org/show_bug.cgi?id=115481
1149
1150         Reviewed by Rob Buis.
1151
1152         Internally reviewed by Mike Fenton.
1153
1154         Changing m_timer to m_iterationDelayTimer.
1155
1156         * WebKitSupport/SpellingHandler.cpp:
1157         (BlackBerry::WebKit::SpellingHandler::SpellingHandler):
1158         (BlackBerry::WebKit::SpellingHandler::spellCheckTextBlock):
1159         (BlackBerry::WebKit::SpellingHandler::parseBlockForSpellChecking):
1160         * WebKitSupport/SpellingHandler.h:
1161         (SpellingHandler):
1162
1163 2013-05-04  Nima Ghanavatian  <nghanavatian@blackberry.com>
1164
1165         [BlackBerry] Clean up unused spellcheck code
1166         https://bugs.webkit.org/show_bug.cgi?id=115560
1167
1168         Reviewed by Benjamin Poulain.
1169         Internally reviewed by Mike Lattanzio
1170
1171         * Api/WebPage.cpp:
1172         (BlackBerry::WebKit::WebPage::setExtraPluginDirectory):
1173         * Api/WebPage.h:
1174         * WebKitSupport/InputHandler.cpp:
1175         * WebKitSupport/InputHandler.h:
1176         (InputHandler):
1177
1178 2013-05-03  Jacky Jiang  <zhajiang@blackberry.com>
1179
1180         [BlackBerry] Page rendering scale is changed after go back and forward
1181         https://bugs.webkit.org/show_bug.cgi?id=115573
1182
1183         Reviewed by Rob Buis.
1184         Internally reviewed by Jeff Rogers.
1185
1186         PR: 326886
1187         When navigating back from page A with viewport to page B without
1188         viewport, we didn't call setViewMode(); therefore, we didn't change
1189         the fixed layout size which was set by page A. In that case, WebCore
1190         would just pick up page A's fixed layout size to layout page B which
1191         caused this issue.
1192         Expecting zoomToInitialScaleOnLoad() or other functions to setViewMode()
1193         later is not a good way, because zoomToInitialScaleOnLoad() has never
1194         been called in this case. So we should always call setViewMode() to set
1195         fixed layout size when a new page is committed.
1196
1197         * Api/WebPage.cpp:
1198         (BlackBerry::WebKit::WebPagePrivate::setLoadState):
1199
1200 2013-05-02  Genevieve Mak  <gmak@rim.com>
1201
1202         [BlackBerry] Cannot touch scroll readonly text input.
1203         https://bugs.webkit.org/show_bug.cgi?id=115378
1204
1205         Reviewed by Rob Buis.
1206
1207         PR #332902
1208         Reviewed Internally by Mike Fenton.
1209         Forgot half the patch.
1210         Node::rendererIsEditable() returns false if the input element has the readonly tag set.
1211         Check the node type instead.
1212
1213         * Api/InRegionScroller.cpp:
1214         (BlackBerry::WebKit::InRegionScrollerPrivate::canScrollRenderBox):
1215
1216 2013-05-02  Iris Wu  <shuwu@blackberry.com>
1217
1218         [BlackBerry] Make scroll position adjustment work with pages with fixed position elements.
1219         https://bugs.webkit.org/show_bug.cgi?id=115178
1220
1221         Reviewed by Rob Buis.
1222
1223         PR 308796
1224         Debug build fix.
1225
1226         * Api/WebPage.cpp:
1227         (BlackBerry::WebKit::WebPage::fixedElementSizeDelta):
1228
1229 2013-05-01  Iris Wu  <shuwu@blackberry.com>
1230
1231          [BlackBerry] Upstream smart selection
1232          https://bugs.webkit.org/show_bug.cgi?id=111226
1233
1234         Reviewed by Rob Buis.
1235
1236         Calling userInterfaceViewportAccessor()->documentViewportRect() on WK thread
1237         caused crash.
1238         But viewport from webkitThreadViewportAccessor uses unadjusted size which is
1239         wrong for email.
1240         The solution here is to get actual viewport size on UI thread and then pass it
1241         to WebKit::SelectionHandler.
1242
1243         PR 333763
1244         Reviewed Internally By Jakob Petsovits.
1245
1246         * Api/InRegionScroller.cpp:
1247         (BlackBerry::WebKit::InRegionScrollerPrivate::updateSelectionScrollView):
1248         * Api/WebPage.cpp:
1249         (BlackBerry::WebKit::WebPage::setSelectionDocumentViewportSize):
1250         (WebKit):
1251         * Api/WebPage.h:
1252         * WebKitSupport/SelectionHandler.cpp:
1253         (BlackBerry::WebKit::SelectionHandler::selectAtPoint):
1254         (BlackBerry::WebKit::SelectionHandler::ensureSelectedTextVisible):
1255         (BlackBerry::WebKit::SelectionHandler::selectionViewportRect):
1256         * WebKitSupport/SelectionHandler.h:
1257         (BlackBerry::WebKit::SelectionHandler::setSelectionViewportSize):
1258         (BlackBerry::WebKit::SelectionHandler::setSelectionSubframeViewportRect):
1259         (SelectionHandler):
1260
1261 2013-04-30  Genevieve Mak  <gmak@rim.com>
1262
1263         [BlackBerry] Cannot touch scroll readonly text input.
1264         https://bugs.webkit.org/show_bug.cgi?id=115378
1265
1266         Reviewed by Rob Buis.
1267
1268         PR #332902
1269         Reviewed Internally by Mike Fenton.
1270         Node::rendererIsEditable() returns false if the input element has the readonly tag set.
1271         Check the node type instead.
1272
1273         * WebKitSupport/DOMSupport.cpp:
1274         (BlackBerry::WebKit::DOMSupport::isShadowHostTextInputElement):
1275         (DOMSupport):
1276         * WebKitSupport/DOMSupport.h:
1277         * WebKitSupport/InRegionScrollableArea.cpp:
1278         (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
1279
1280 2013-04-29  Jakob Petsovits  <jpetsovits@blackberry.com>
1281
1282         [BlackBerry] Replace disappearing fillBuffer() API with graphics context drawing
1283         https://bugs.webkit.org/show_bug.cgi?id=115360
1284         Internal PR 303048.
1285
1286         Reviewed by Rob Buis.
1287
1288         Instead of using fillBuffer() to draw directly to the
1289         target buffer, we now lock a Drawable on it and fill it
1290         with PlatformGraphicsContext::addPredefinedPattern().
1291
1292         As a bonus, this also includes related clean-ups -
1293         simpler checkerboard painting code, removal of
1294         fillWindow(), clearWindow() and paintDefaultBackground(),
1295         as well as getting rid of the DEBUG_CHECKERBOARD define
1296         which has been useless for performance tracing purposes
1297         for a while now.
1298
1299         * Api/BackingStore.cpp:
1300         (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
1301         * Api/BackingStore_p.h:
1302
1303 2013-04-26  Nima Ghanavatian  <nghanavatian@blackberry.com>
1304
1305         [BlackBerry] Check for valid element in elementTouched
1306         https://bugs.webkit.org/show_bug.cgi?id=115205
1307
1308         Reviewed by Rob Buis.
1309
1310         Internally reviewed by Genevieve Mak.
1311
1312         PR 331546
1313         We might receive a null ptr from nodeAsElementIfApplicable which
1314         is passed in here. Check to make sure it's valid before using.
1315
1316         * WebKitSupport/InputHandler.cpp:
1317         (BlackBerry::WebKit::InputHandler::elementTouched):
1318
1319 2013-04-26  Martin Robinson  <mrobinson@igalia.com>
1320
1321         Remove the remaining Skia #ifdefs
1322         https://bugs.webkit.org/show_bug.cgi?id=114886
1323
1324         Reviewed by Benjamin Poulain.
1325
1326         * Api/WebPage.cpp: Remove Skia #ifdef references.
1327         * WebCoreSupport/AboutDataUseFeatures.in: Ditto.
1328
1329 2013-04-26  Mary Wu  <mary.wu@torchmobile.com.cn>
1330
1331         [BlackBerry] Should check if it's cached resource before download
1332         https://bugs.webkit.org/show_bug.cgi?id=115101
1333
1334         Reviewed by Rob Buis.
1335
1336         Since main resource maybe cached, if user want to save the resource, we first check
1337         if it's cached. If yes, don't need to initiate a fresh load again, but get the
1338         cached resource data out to save.
1339
1340         RIM bug# 324003, internally reviewed by Charles Wei.
1341
1342         * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
1343         (WebCore::FrameLoaderClientBlackBerry::convertMainResourceLoadToDownload):
1344
1345 2013-04-26  Mary Wu  <mary.wu@torchmobile.com.cn>
1346
1347         [BlackBerry] Clean up load interface in WebPage
1348         https://bugs.webkit.org/show_bug.cgi?id=113267
1349
1350         Reviewed by Rob Buis.
1351
1352         Remove unused loadExtended(), combine load() and download() api in WebPage.
1353         RIM Bug# 315535, internally reviewed by Joe Mason.
1354
1355         * Api/WebPage.cpp:
1356         (BlackBerry::WebKit::WebPage::load):
1357         * Api/WebPage.h:
1358
1359 2013-04-25  Andrew Lo  <anlo@rim.com>
1360
1361         [BlackBerry] Selection overlay on non-composited iframes are incorrectly positioned.
1362         https://bugs.webkit.org/show_bug.cgi?id=115197
1363
1364         Reviewed by Rob Buis.
1365
1366         When drawing the selection overlay, the rects to
1367         paint when selecting text on non-composited sub-frames
1368         need to be adjusted by the frame position.
1369
1370         * WebKitSupport/SelectionOverlay.cpp:
1371         (BlackBerry::WebKit::SelectionOverlay::paintContents):
1372
1373 2013-04-25  Andreas Kling  <akling@apple.com>
1374
1375         Remove ENABLE(PARSED_STYLE_SHEET_CACHING) and make it always-on.
1376
1377         Rubber-stamped by Anders Koivisto.
1378
1379         * WebCoreSupport/AboutDataEnableFeatures.in:
1380
1381 2013-04-25  Iris Wu  <shuwu@blackberry.com>
1382
1383         [BlackBerry] Make scroll position adjustment work with pages with fixed position elements.
1384         https://bugs.webkit.org/show_bug.cgi?id=115178
1385
1386         Reviewed by Rob Buis.
1387
1388         PR 308796
1389
1390         Currently the position WebPage::adjustDocumentScrollPosition adjusts is the top
1391         left point of the viewport.
1392         On the page with fixed position elements, we want it to adjust the position beneath
1393         the fixed elements so it can be always visible.
1394
1395         The basic idea is:
1396         1.  Detect if there are fixed position elements before going through ProximityDetector.
1397         2.  If the fixed element exists, calculate its the size and the actual visible position
1398             beneath it.
1399         3.  Pass the position to ProximityDetector. Then according to the new position we get,
1400             calculate the top left position of the viewport (final scroll position).
1401
1402         * Api/WebPage.cpp:
1403         (BlackBerry::WebKit::WebPage::fixedElementSizeDelta):
1404         (WebKit):
1405         * Api/WebPage.h:
1406         * Api/WebPageCompositor.cpp:
1407         (BlackBerry::WebKit::WebPageCompositorPrivate::findFixedElementRect):
1408         (WebKit):
1409         * Api/WebPageCompositor_p.h:
1410         (WebPageCompositorPrivate):
1411
1412 2013-04-25  Mike Lattanzio  <mlattanzio@blackberry.com>
1413
1414         [BlackBerry] Enable balanced page group load deferrer behaviour.
1415         https://bugs.webkit.org/show_bug.cgi?id=115189
1416
1417         Reviewed by Rob Buis.
1418
1419         Prevent a possible deadlock by enabling balanced deferrers.
1420         Internally reviewed by: Joe Mason
1421         PR 329986
1422
1423         * Api/WebPage.cpp:
1424         (BlackBerry::WebKit::WebPagePrivate::init):
1425
1426 2013-04-25  Joseph Pecoraro  <pecoraro@apple.com>
1427
1428         Web Inspector: ConsoleMessage should include line and column number where possible
1429         https://bugs.webkit.org/show_bug.cgi?id=114929
1430
1431         Reviewed by Timothy Hatcher.
1432
1433         * Api/DumpRenderTreeClient.h:
1434         * Api/WebPageClient.h:
1435         * WebCoreSupport/ChromeClientBlackBerry.cpp:
1436         (WebCore::ChromeClientBlackBerry::addMessageToConsole):
1437         * WebCoreSupport/ChromeClientBlackBerry.h:
1438         (ChromeClientBlackBerry):
1439
1440 2013-04-25  Konrad Piascik  <kpiascik@blackberry.com>
1441
1442         [BlackBerry] Get rid of return in void method
1443         https://bugs.webkit.org/show_bug.cgi?id=115186
1444
1445         Reviewed by Rob Buis.
1446
1447         * Api/WebPage.cpp:
1448         (BlackBerry::WebKit::WebPage::setForcedTextEncoding):
1449
1450 2013-04-24  Nima Ghanavatian  <nghanavatian@blackberry.com>
1451
1452         [BlackBerry] Do not clear focus on a node when tapping on form controls
1453         https://bugs.webkit.org/show_bug.cgi?id=115055
1454
1455         Reviewed by Rob Buis.
1456
1457         Internally reviewed by Genevieve Mak.
1458
1459         PR316069
1460         To allow for rich text editors to apply styles on an input field
1461         or highlighted text, we must maintain focus on the current element
1462         when tapping on form elements. Moving the code that clears this
1463         context to trigger off TouchHold instead of TouchPress.
1464
1465         * WebKitSupport/TouchEventHandler.cpp:
1466         (BlackBerry::WebKit::TouchEventHandler::doFatFingers):
1467
1468 == Rolled over to ChangeLog-2013-04-24 ==