Source/WTF/ChangeLog

 12012-07-25 Zeno Albisser <zeno@webkit.org>
 2
 3 [Qt] requestAnimationFrame should only trigger when a new frame can be displayed.
 4 https://bugs.webkit.org/show_bug.cgi?id=88638
 5
 6 Disable REQUEST_ANIMATION_FRAME_TIMER for the Qt port and tie
 7 the servicing of scripted animations to layer syncing for WK2.
 8 For WK1 we rely on the RefreshAnimation that is based on QAbstractAnimation.
 9
 10 Reviewed by NOBODY (OOPS!).
 11
 12 * wtf/Platform.h:
 13
1142012-07-25 Csaba Osztrogonác <ossy@webkit.org>
215
316 [Qt] There are parallel GC related crashes regularly

Source/WTF/wtf/Platform.h

11051105#define WTF_USE_COREMEDIA 1
11061106#endif
11071107
1108 #if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(EFL) || (PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(WIN_CAIRO)) || PLATFORM(QT) || PLATFORM(BLACKBERRY)
 1108#if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(EFL) || (PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(WIN_CAIRO)) || PLATFORM(BLACKBERRY)
11091109#define WTF_USE_REQUEST_ANIMATION_FRAME_TIMER 1
11101110#endif
11111111

Source/WebKit/qt/ChangeLog

 12012-07-25 Zeno Albisser <zeno@webkit.org>
 2
 3 [Qt] requestAnimationFrame should only trigger when a new frame can be displayed.
 4 https://bugs.webkit.org/show_bug.cgi?id=88638
 5
 6 Disable REQUEST_ANIMATION_FRAME_TIMER for the Qt port and tie
 7 the servicing of scripted animations to the renderNextFrame call for WK2.
 8 For WK1 we rely on the RefreshAnimation that is based on QAbstractAnimation.
 9
 10 Reviewed by NOBODY (OOPS!).
 11
 12 * WebCoreSupport/ChromeClientQt.cpp:
 13 (RefreshAnimation):
 14 Add a RefreshAnimation that is based on QAbstractAnimation
 15 and drives the servicing of the scripted animations for WK1.
 16 (WebCore::RefreshAnimation::RefreshAnimation):
 17 (WebCore::RefreshAnimation::duration):
 18 (WebCore::RefreshAnimation::scheduleAnimation):
 19 Set m_animationScheduled to true and start the animation
 20 timer in case it is not running yet.
 21 (WebCore::RefreshAnimation::updateCurrentTime):
 22 Call serviceScriptedAnimations if m_animationScheduled is true.
 23 If this is not the case, the animation timer can be stopped,
 24 because no animation needs to be scheduled anymore.
 25 (WebCore):
 26 (WebCore::ChromeClientQt::scheduleAnimation):
 27 Create and start the RefreshAnimation instance with the
 28 first call to scheduleAnimation.
 29 * WebCoreSupport/ChromeClientQt.h:
 30 (WebCore):
 31 (ChromeClientQt):
 32
1332012-07-24 Pierre Rossi <pierre.rossi@gmail.com>
234
335 [Qt][WK1] color input type support

Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp

7070#include "qwebsecurityorigin.h"
7171#include "qwebsecurityorigin_p.h"
7272#include "qwebview.h"
 73#include <qabstractanimation.h>
7374#include <qdebug.h>
7475#include <qeventloop.h>
7576#include <qtooltip.h>

8889
8990namespace WebCore {
9091
 92class RefreshAnimation : public QAbstractAnimation {
 93public:
 94 RefreshAnimation(ChromeClientQt* chromeClient)
 95 : QAbstractAnimation()
 96 , m_chromeClient(chromeClient)
 97 , m_animationScheduled(false)
 98 { }
 99
 100 virtual int duration() const { return -1; }
 101
 102 void scheduleAnimation()
 103 {
 104 m_animationScheduled = true;
 105 if (state() != QAbstractAnimation::Running)
 106 start();
 107 }
 108
 109protected:
 110 virtual void updateCurrentTime(int currentTime)
 111 {
 112 UNUSED_PARAM(currentTime);
 113 if (m_animationScheduled) {
 114 m_animationScheduled = false;
 115 m_chromeClient->serviceScriptedAnimations();
 116 } else
 117 stop();
 118 }
 119private:
 120 ChromeClientQt* m_chromeClient;
 121 bool m_animationScheduled;
 122};
 123
91124bool ChromeClientQt::dumpVisitedLinksCallbacks = false;
92125
93126ChromeClientQt::ChromeClientQt(QWebPage* webPage)

@@void ChromeClientQt::setCursor(const Cursor& cursor)
618651#endif
619652}
620653
 654void ChromeClientQt::scheduleAnimation()
 655{
 656 if (!m_refreshAnimation)
 657 m_refreshAnimation = adoptPtr(new RefreshAnimation(this));
 658 m_refreshAnimation->scheduleAnimation();
 659}
 660
 661void ChromeClientQt::serviceScriptedAnimations()
 662{
 663 m_webPage->mainFrame()->d->frame->view()->serviceScriptedAnimations(convertSecondsToDOMTimeStamp(currentTime()));
 664}
621665
622666#if USE(ACCELERATED_COMPOSITING)
623667void ChromeClientQt::attachRootGraphicsLayer(Frame* frame, GraphicsLayer* graphicsLayer)

Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h

@@class FileChooser;
4949class FileIconLoader;
5050class FloatRect;
5151class Page;
 52class RefreshAnimation;
5253struct FrameLoadRequest;
5354class QtAbstractWebPopup;
5455struct ViewportArguments;

@@public:
176177 virtual void setCursor(const Cursor&);
177178 virtual void setCursorHiddenUntilMouseMoves(bool) { }
178179
 180 virtual void scheduleAnimation();
 181 virtual void serviceScriptedAnimations();
 182
179183 virtual void scrollRectIntoView(const LayoutRect) const { }
180184
181185 virtual bool selectItemWritingDirectionIsNatural();

@@public:
201205 bool statusBarVisible;
202206 bool menuBarVisible;
203207 QEventLoop* m_eventLoop;
 208 OwnPtr<RefreshAnimation> m_refreshAnimation;
204209
205210#if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA) || USE(QTKIT))
206211 FullScreenVideoQt* m_fullScreenVideo;

Source/WebKit2/ChangeLog

 12012-07-25 Zeno Albisser <zeno@webkit.org>
 2
 3 [Qt] requestAnimationFrame should only trigger when a new frame can be displayed.
 4 https://bugs.webkit.org/show_bug.cgi?id=88638
 5
 6 Disable REQUEST_ANIMATION_FRAME_TIMER for the Qt port and tie
 7 the servicing of scripted animations to layer syncing for WK2.
 8 For WK1 we rely on the RefreshAnimation that is based on QAbstractAnimation.
 9
 10 Reviewed by NOBODY (OOPS!).
 11
 12 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
 13 (WebKit):
 14 (WebKit::WebChromeClient::scheduleAnimation):
 15 * WebProcess/WebCoreSupport/WebChromeClient.h:
 16 (WebChromeClient):
 17 * WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.cpp:
 18 (WebKit::LayerTreeCoordinator::performScheduledLayerFlush):
 19 (WebKit::LayerTreeCoordinator::scheduleAnimation):
 20 (WebKit):
 21 * WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.h:
 22 (LayerTreeCoordinator):
 23 * WebProcess/WebPage/LayerTreeHost.h:
 24 (LayerTreeHost):
 25
1262012-07-25 Gyuyoung Kim <gyuyoung.kim@samsung.com>
227
328 [EFL] Use eina_stringshare_add instead of strdup.

Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp

@@void WebChromeClient::setCursorHiddenUntilMouseMoves(bool hiddenUntilMouseMoves)
635635 m_page->send(Messages::WebPageProxy::SetCursorHiddenUntilMouseMoves(hiddenUntilMouseMoves));
636636}
637637
 638#if ENABLE(REQUEST_ANIMATION_FRAME) && !USE(REQUEST_ANIMATION_FRAME_TIMER)
 639void WebChromeClient::scheduleAnimation()
 640{
 641#if USE(UI_SIDE_COMPOSITING)
 642 m_page->drawingArea()->layerTreeHost()->scheduleAnimation();
 643#endif
 644}
 645#endif
 646
638647void WebChromeClient::formStateDidChange(const Node*)
639648{
640649 notImplemented();

Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h

@@private:
162162
163163 virtual void setCursor(const WebCore::Cursor&) OVERRIDE;
164164 virtual void setCursorHiddenUntilMouseMoves(bool) OVERRIDE;
 165#if ENABLE(REQUEST_ANIMATION_FRAME) && !USE(REQUEST_ANIMATION_FRAME_TIMER)
 166 virtual void scheduleAnimation() OVERRIDE;
 167#endif
165168
166169 // Notification that the given form element has changed. This function
167170 // will be called frequently, so handling should be very fast.

Source/WebKit2/WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.cpp

@@void LayerTreeCoordinator::performScheduledLayerFlush()
357357 if (m_isSuspended || m_waitingForUIProcess)
358358 return;
359359
 360 // Make sure that any previously registered animation callbacks are being executed before we flush the layers.
 361 m_webPage->corePage()->mainFrame()->view()->serviceScriptedAnimations(convertSecondsToDOMTimeStamp(currentTime()));
 362
360363 m_webPage->layoutIfNeeded();
361364
362365 if (!m_isValid)

@@void LayerTreeCoordinator::setVisibleContentsRect(const IntRect& rect, float sca
544547 m_shouldSendScrollPositionUpdate = true;
545548}
546549
 550void LayerTreeCoordinator::scheduleAnimation()
 551{
 552 scheduleLayerFlush();
 553}
 554
547555void LayerTreeCoordinator::renderNextFrame()
548556{
549557 m_waitingForUIProcess = false;

Source/WebKit2/WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.h

@@public:
8686 virtual void syncFixedLayers();
8787
8888 virtual PassOwnPtr<WebCore::GraphicsContext> beginContentUpdate(const WebCore::IntSize&, ShareableBitmap::Flags, ShareableSurface::Handle&, WebCore::IntPoint&);
 89 virtual void scheduleAnimation() OVERRIDE;
8990
9091protected:
9192 explicit LayerTreeCoordinator(WebPage*);

Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h

@@public:
105105 virtual WebCore::GraphicsDeviceAdapter* graphicsDeviceAdapter() const { return 0; }
106106#endif
107107
 108#if USE(UI_SIDE_COMPOSITING)
 109 virtual void scheduleAnimation() = 0;
 110#endif
 111
108112protected:
109113 explicit LayerTreeHost(WebPage*);
110114