这是indexloc提供的服务,不要输入任何密码
| Differences between
and this patch
- a/LayoutTests/ChangeLog +31 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2011-01-11  James Robinson  <jamesr@chromium.org>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        Implement mozilla's requestAnimationFrame API
6
        https://bugs.webkit.org/show_bug.cgi?id=51218
7
8
        Tests for window.webkitRequestAnimationFrame().  The new tests
9
        are in the Skipped lists for platforms that do not set
10
        ENABLE(REQUEST_ANIMATION_FRAME) - which is currently all but chromium.
11
12
        * fast/animation/request-animation-frame-cancel-expected.txt: Added.
13
        * fast/animation/request-animation-frame-cancel.html: Added.
14
            Tests cancelling a callback within a webkitRequestAnimationFrame() callback.
15
        * fast/animation/request-animation-frame-cancel2-expected.txt: Added.
16
        * fast/animation/request-animation-frame-cancel2.html: Added.
17
            Tests interactions between multiple webkitRequestAnimationFrame() callbacks.
18
        * fast/animation/request-animation-frame-display-expected.txt: Added.
19
        * fast/animation/request-animation-frame-display.html: Added.
20
            Tests changing the display: property of an element within a callback.
21
        * fast/animation/request-animation-frame-expected.txt: Added.
22
        * fast/animation/request-animation-frame.html: Added.
23
            Tests the basic use of window.webkitRequestAnimationFrame().
24
        * fast/animation/request-animation-frame-within-callback-expected.txt: Added.
25
        * fast/animation/request-animation-frame-within-callback.html: Added.
26
            Tests setting one webkit.webkitRequestAnimationFrame() callback within another.
27
        * platform/gtk/Skipped:
28
        * platform/mac/Skipped:
29
        * platform/qt/Skipped:
30
        * platform/win/Skipped:
31
1
2011-01-11  Dimitri Glazkov  <dglazkov@chromium.org>
32
2011-01-11  Dimitri Glazkov  <dglazkov@chromium.org>
2
33
3
        Reviewed by Eric Seidel.
34
        Reviewed by Eric Seidel.
- a/LayoutTests/fast/animation/request-animation-frame-cancel-expected.txt +1 lines
Line 0 a/LayoutTests/fast/animation/request-animation-frame-cancel-expected.txt_sec1
1
PASS
- a/LayoutTests/fast/animation/request-animation-frame-cancel.html +17 lines
Line 0 a/LayoutTests/fast/animation/request-animation-frame-cancel.html_sec1
1
<!DOCTYPE html>
2
<html>
3
<span id="e">PASS</span>
4
<script>
5
if (window.layoutTestController)
6
    layoutTestController.dumpAsText();
7
8
var e = document.getElementById("e");
9
var id = window.webkitRequestAnimationFrame(function() {
10
    e.innerHTML = "FAIL";
11
}, e);
12
13
window.webkitCancelRequestAnimationFrame(id);
14
15
if (window.layoutTestController)
16
    layoutTestController.display();
17
</script>
- a/LayoutTests/fast/animation/request-animation-frame-cancel2-expected.txt +1 lines
Line 0 a/LayoutTests/fast/animation/request-animation-frame-cancel2-expected.txt_sec1
1
PASS
- a/LayoutTests/fast/animation/request-animation-frame-cancel2.html +21 lines
Line 0 a/LayoutTests/fast/animation/request-animation-frame-cancel2.html_sec1
1
<!DOCTYPE html>
2
<html>
3
<span id="e">PASS</span>
4
<script>
5
if (window.layoutTestController)
6
    layoutTestController.dumpAsText();
7
8
var e = document.getElementById("e");
9
var secondCallbackId;
10
11
window.webkitRequestAnimationFrame(function() {
12
    window.webkitCancelRequestAnimationFrame(secondCallbackId);
13
}, e);
14
15
secondCallbackId = window.webkitRequestAnimationFrame(function() {
16
    e.innerHTML =  "FAIL";
17
}, e);
18
19
if (window.layoutTestController)
20
    layoutTestController.display();
21
</script>
- a/LayoutTests/fast/animation/request-animation-frame-display-expected.txt +1 lines
Line 0 a/LayoutTests/fast/animation/request-animation-frame-display-expected.txt_sec1
1
PASS
- a/LayoutTests/fast/animation/request-animation-frame-display.html +22 lines
Line 0 a/LayoutTests/fast/animation/request-animation-frame-display.html_sec1
1
<!DOCTYPE html>
2
<html>
3
<span id="a" style="display:none"></span>
4
<span id="b">FAIL</span>
5
<script>
6
if (window.layoutTestController)
7
    layoutTestController.dumpAsText();
8
9
var a = document.getElementById("a");
10
window.webkitRequestAnimationFrame(function() {
11
    b.innerHTML="PASS";
12
}, a);
13
14
var b = document.getElementById("b");
15
window.webkitRequestAnimationFrame(function() {
16
    a.style.display="";
17
}, b);
18
19
if (window.layoutTestController)
20
    layoutTestController.display();
21
</script>
22
</html>
- a/LayoutTests/fast/animation/request-animation-frame-expected.txt +1 lines
Line 0 a/LayoutTests/fast/animation/request-animation-frame-expected.txt_sec1
1
PASS
- a/LayoutTests/fast/animation/request-animation-frame-within-callback-expected.txt +1 lines
Line 0 a/LayoutTests/fast/animation/request-animation-frame-within-callback-expected.txt_sec1
1
PASS
- a/LayoutTests/fast/animation/request-animation-frame-within-callback.html +28 lines
Line 0 a/LayoutTests/fast/animation/request-animation-frame-within-callback.html_sec1
1
<!DOCTYPE html>
2
<html>
3
<span id="e">FAIL</span>
4
<script>
5
if (window.layoutTestController)
6
    layoutTestController.dumpAsText();
7
8
var e = document.getElementById("e");
9
var sameFrame;
10
window.webkitRequestAnimationFrame(function() {
11
    sameFrame = true;
12
}, e);
13
window.webkitRequestAnimationFrame(function() {
14
    window.webkitRequestAnimationFrame(function() {
15
        e.innerHTML = sameFrame ? "FAIL" : "PASS";
16
    }, e);
17
}, e);
18
window.webkitRequestAnimationFrame(function() {
19
    sameFrame = false;
20
}, e);
21
22
// This should fire the three already registered callbacks, but not the one dynamically registered.
23
if (window.layoutTestController)
24
    layoutTestController.display();
25
// This should fire the dynamically registered callback.
26
if (window.layoutTestController)
27
    layoutTestController.display();
28
</script>
- a/LayoutTests/fast/animation/request-animation-frame.html +14 lines
Line 0 a/LayoutTests/fast/animation/request-animation-frame.html_sec1
1
<!DOCTYPE html>
2
<html>
3
<span id="e">FAIL</span>
4
<script>
5
if (window.layoutTestController)
6
    layoutTestController.dumpAsText();
7
8
var e = document.getElementById("e");
9
window.webkitRequestAnimationFrame(function() {
10
    e.innerHTML="PASS";
11
}, e);
12
if (window.layoutTestController)
13
    layoutTestController.display();
14
</script>
- a/LayoutTests/platform/gtk/Skipped +6 lines
Lines 5594-5596 http/tests/inspector/console-websocket-error.html a/LayoutTests/platform/gtk/Skipped_sec1
5594
# layoutTestController.queueLoad() does not work
5594
# layoutTestController.queueLoad() does not work
5595
http/tests/xmlhttprequest/basic-auth-nouser.html
5595
http/tests/xmlhttprequest/basic-auth-nouser.html
5596
http/tests/xmlhttprequest/basic-auth-nopassword.html
5596
http/tests/xmlhttprequest/basic-auth-nopassword.html
5597
5598
# Requires requestAnimationFrame support
5599
fast/animation/
5600
5601
# https://bugs.webkit.org/show_bug.cgi?id=51734
5602
fast/multicol/span/double-merge-anonymous-block-crash.html
- a/LayoutTests/platform/mac/Skipped +3 lines
Lines 284-286 editing/selection/caret-mode-paragraph-keys-navigation.html a/LayoutTests/platform/mac/Skipped_sec1
284
# This test is failing on the Leopard Intel Debug buildbot
284
# This test is failing on the Leopard Intel Debug buildbot
285
# https://bugs.webkit.org/show_bug.cgi?id=51807
285
# https://bugs.webkit.org/show_bug.cgi?id=51807
286
fast/blockflow/broken-ideograph-small-caps.html
286
fast/blockflow/broken-ideograph-small-caps.html
287
288
# Requires requestAnimationFrame support
289
fast/animation/
- a/LayoutTests/platform/qt/Skipped +3 lines
Lines 5369-5374 editing/selection/caret-bidi-first-and-last-letters.html a/LayoutTests/platform/qt/Skipped_sec1
5369
# https://bugs.webkit.org/show_bug.cgi?id=52155
5369
# https://bugs.webkit.org/show_bug.cgi?id=52155
5370
fast/text/emphasis-avoid-ruby.html
5370
fast/text/emphasis-avoid-ruby.html
5371
5371
5372
# Requires requestAnimationFrame support
5373
fast/animation/
5374
5372
# https://bugs.webkit.org/show_bug.cgi?id=42578
5375
# https://bugs.webkit.org/show_bug.cgi?id=42578
5373
# [Qt] DRT sideeffect revealed by r63657 and r75305
5376
# [Qt] DRT sideeffect revealed by r63657 and r75305
5374
fast/tokenizer/flush-characters-in-document-write-evil.html
5377
fast/tokenizer/flush-characters-in-document-write-evil.html
- a/LayoutTests/platform/win/Skipped +3 lines
Lines 1114-1116 fast/loader/user-stylesheet-fast-path.html a/LayoutTests/platform/win/Skipped_sec1
1114
1114
1115
# DRT does not support toggling caret browsing on / off
1115
# DRT does not support toggling caret browsing on / off
1116
editing/selection/caret-mode-paragraph-keys-navigation.html
1116
editing/selection/caret-mode-paragraph-keys-navigation.html
1117
1118
# Requires requestAnimationFrame support
1119
fast/animation/
- a/Source/WebCore/ChangeLog +66 lines
Lines 1-5 a/Source/WebCore/ChangeLog_sec1
1
2011-01-11  James Robinson  <jamesr@chromium.org>
1
2011-01-11  James Robinson  <jamesr@chromium.org>
2
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        Implement mozilla's requestAnimationFrame API
6
        https://bugs.webkit.org/show_bug.cgi?id=51218
7
8
        This implements mozilla's proposed requestAnimationFrame API.  The idea with this API is that
9
        an author driving an animation from script could use window.requestAnimationFrame(callback)
10
        instead of window.setTimeout(callback, 0) to schedule their update logic and let the browser
11
        decide when to update the animations.  This avoids doing unnecessary work when the page content
12
        is offscreen or is being displayed at a different framerate than what the page author expects.
13
14
        Mozilla's proposal is here: https://developer.mozilla.org/en/DOM/window.mozRequestAnimationFrame
15
        This implements window.mozRequestAnimationFrame as window.webkitRequestAnimationFrame with the
16
        following changes:
17
        *) Only the callback syntax is supported, there is no before paint event
18
        *) webkitRequestAnimationFrame supports a second parameter Element to let the author indicate
19
            what content they intend to animate.  That way if the page is being displayed but the element
20
            in question is offscreen, we can avoid invoking the callback.
21
        *) No timestamp is provided to the caller and there is no window.animationStartTime property
22
            (see https://bugs.webkit.org/show_bug.cgi?id=51952 for discussion of this property)
23
        *) window.webkitRequestAnimationFrame returns a numerical id that can be used to cancel the callback
24
            using window.cancelWebkitRequestAnimationFrame, to parallel window.setTimeout()/window.clearTime().
25
26
        The implementation depends on the embedder scheduling the callbacks since the callback invocation
27
        depends on the page's visibility and the embedder's paint scheduling, neither of which are exposed
28
        to WebCore.  The expectation for the embedder is that at some point Chrome::scheduleAnimation() is
29
        called FrameView::serviceScriptedAnimations() should be called for the associated Page's main frame.
30
        Ideally serviceScriptedAnimations() would be called prior to rendering - although in practice the
31
        embedder has to rate limit callbacks and may not be able to tie the callback directly to the
32
        rendering loop.
33
34
        Tests: fast/animation/request-animation-frame-cancel.html
35
               fast/animation/request-animation-frame-cancel2.html
36
               fast/animation/request-animation-frame-display.html
37
               fast/animation/request-animation-frame-within-callback.html
38
               fast/animation/request-animation-frame.html
39
40
        * WebCore.gypi:
41
        * dom/Document.cpp:
42
        (WebCore::Document::Document):
43
        (WebCore::Document::webkitRequestAnimationFrame):
44
        (WebCore::Document::webkitCancelRequestAnimationFrame):
45
        (WebCore::Document::serviceScriptedAnimations):
46
        * dom/Document.h:
47
        * dom/RequestAnimationFrameCallback.h: Added.
48
        (WebCore::RequestAnimationFrameCallback::~RequestAnimationFrameCallback):
49
        * dom/RequestAnimationFrameCallback.idl: Added.
50
        * loader/EmptyClients.h:
51
        (WebCore::EmptyChromeClient::scheduleAnimation):
52
        * page/Chrome.cpp:
53
        (WebCore::Chrome::scheduleAnimation):
54
        * page/Chrome.h:
55
        * page/ChromeClient.h:
56
        * page/DOMWindow.cpp:
57
        (WebCore::DOMWindow::webkitRequestAnimationFrame):
58
        (WebCore::DOMWindow::webkitCancelRequestAnimationFrame):
59
        * page/DOMWindow.h:
60
        * page/DOMWindow.idl:
61
        * page/FrameView.cpp:
62
        (WebCore::FrameView::scheduleAnimation):
63
        (WebCore::FrameView::serviceScriptedAnimations):
64
        * page/FrameView.h:
65
        * platform/HostWindow.h:
66
67
2011-01-11  James Robinson  <jamesr@chromium.org>
68
3
        Reviewed by Dimitri Glazkov.
69
        Reviewed by Dimitri Glazkov.
4
70
5
        Set all RenderBlocks as replaced when an inline display type is specified
71
        Set all RenderBlocks as replaced when an inline display type is specified
- a/Source/WebCore/WebCore.gypi +2 lines
Lines 75-80 a/Source/WebCore/WebCore.gypi_sec1
75
            'dom/ProgressEvent.idl',
75
            'dom/ProgressEvent.idl',
76
            'dom/Range.idl',
76
            'dom/Range.idl',
77
            'dom/RangeException.idl',
77
            'dom/RangeException.idl',
78
            'dom/RequestAnimationFrameCallback.idl',
78
            'dom/Text.idl',
79
            'dom/Text.idl',
79
            'dom/TextEvent.idl',
80
            'dom/TextEvent.idl',
80
            'dom/Touch.idl',
81
            'dom/Touch.idl',
Lines 1314-1319 a/Source/WebCore/WebCore.gypi_sec2
1314
            'dom/Range.h',
1315
            'dom/Range.h',
1315
            'dom/RangeBoundaryPoint.h',
1316
            'dom/RangeBoundaryPoint.h',
1316
            'dom/RangeException.h',
1317
            'dom/RangeException.h',
1318
            'dom/RequestAnimationFrameCallback.h',
1317
            'dom/RawDataDocumentParser.h',
1319
            'dom/RawDataDocumentParser.h',
1318
            'dom/RegisteredEventListener.cpp',
1320
            'dom/RegisteredEventListener.cpp',
1319
            'dom/RegisteredEventListener.h',
1321
            'dom/RegisteredEventListener.h',
- a/Source/WebCore/dom/Document.cpp +87 lines
Lines 207-212 a/Source/WebCore/dom/Document.cpp_sec1
207
#include "RenderFullScreen.h"
207
#include "RenderFullScreen.h"
208
#endif
208
#endif
209
209
210
#if ENABLE(REQUEST_ANIMATION_FRAME)
211
#include "RequestAnimationFrameCallback.h"
212
#endif
213
210
using namespace std;
214
using namespace std;
211
using namespace WTF;
215
using namespace WTF;
212
using namespace Unicode;
216
using namespace Unicode;
Lines 425-430 Document::Document(Frame* frame, const KURL& url, bool isXHTML, bool isHTML, con a/Source/WebCore/dom/Document.cpp_sec2
425
    , m_loadEventDelayTimer(this, &Document::loadEventDelayTimerFired)
429
    , m_loadEventDelayTimer(this, &Document::loadEventDelayTimerFired)
426
    , m_directionSetOnDocumentElement(false)
430
    , m_directionSetOnDocumentElement(false)
427
    , m_writingModeSetOnDocumentElement(false)
431
    , m_writingModeSetOnDocumentElement(false)
432
#if ENABLE(REQUEST_ANIMATION_FRAME)
433
    , m_nextRequestAnimationFrameCallbackId(0)
434
#endif
428
{
435
{
429
    m_document = this;
436
    m_document = this;
430
437
Lines 4947-4952 void Document::loadEventDelayTimerFired(Timer<Document>*) a/Source/WebCore/dom/Document.cpp_sec3
4947
        frame()->loader()->checkCompleted();
4954
        frame()->loader()->checkCompleted();
4948
}
4955
}
4949
4956
4957
#if ENABLE(REQUEST_ANIMATION_FRAME)
4958
int Document::webkitRequestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback> callback, Element* e)
4959
{
4960
    if (!m_requestAnimationFrameCallbacks)
4961
        m_requestAnimationFrameCallbacks = new RequestAnimationFrameCallbackList;
4962
    int id = m_nextRequestAnimationFrameCallbackId++;
4963
    callback->m_firedOrCancelled = false;
4964
    callback->m_id = id;
4965
    callback->m_element = e;
4966
    m_requestAnimationFrameCallbacks->append(callback);
4967
    if (FrameView* v = view())
4968
        v->scheduleAnimation();
4969
    return id;
4970
}
4971
4972
void Document::webkitCancelRequestAnimationFrame(int id)
4973
{
4974
    if (!m_requestAnimationFrameCallbacks)
4975
        return;
4976
    for (size_t i = 0; i < m_requestAnimationFrameCallbacks->size(); ++i) {
4977
        if (m_requestAnimationFrameCallbacks->at(i)->m_id == id) {
4978
            m_requestAnimationFrameCallbacks->at(i)->m_firedOrCancelled = true;
4979
            m_requestAnimationFrameCallbacks->remove(i);
4980
            return;
4981
        }
4982
    }
4983
}
4984
4985
void Document::serviceScriptedAnimations()
4986
{
4987
    if (!m_requestAnimationFrameCallbacks)
4988
        return;
4989
    // We want to run the callback for all elements in the document that have registered
4990
    // for a callback and that are visible.  Running the callbacks can cause new callbacks
4991
    // to be registered, existing callbacks to be cancelled, and elements to gain or lose
4992
    // visibility so this code has to iterate carefully.
4993
4994
    // FIXME: Currently, this code doesn't do any visibility tests beyond checking display:
4995
4996
    // First, generate a list of callbacks to consider.  Callbacks registered from this point
4997
    // on are considered only for the "next" frame, not this one.
4998
    RequestAnimationFrameCallbackList callbacks(*m_requestAnimationFrameCallbacks);
4999
5000
    // Firing the callback may cause the visibility of other elements to change.  To avoid
5001
    // missing any callbacks, we keep iterating through the list of candiate callbacks and firing
5002
    // them until nothing new becomes visible.
5003
    bool firedCallback;
5004
    do {
5005
        firedCallback = false;
5006
        // A previous iteration may have invalidated style (or layout).  Update styles for each iteration
5007
        // for now since all we check is the existence of a renderer.
5008
        updateStyleIfNeeded();
5009
        for (size_t i = 0; i < callbacks.size(); ++i) {
5010
            RequestAnimationFrameCallback* callback = callbacks[i].get();
5011
            if (!callback->m_firedOrCancelled && (!callback->m_element || callback->m_element->renderer())) {
5012
                callback->m_firedOrCancelled = true;
5013
                callback->handleEvent();
5014
                firedCallback = true;
5015
                callbacks.remove(i);
5016
                break;
5017
            }
5018
        }
5019
    } while (firedCallback);
5020
5021
    // Remove any callbacks we fired from the list of pending callbacks.
5022
    for (size_t i = 0; i < m_requestAnimationFrameCallbacks->size();) {
5023
        if (m_requestAnimationFrameCallbacks->at(i)->m_firedOrCancelled)
5024
            m_requestAnimationFrameCallbacks->remove(i);
5025
        else
5026
            ++i;
5027
    }
5028
5029
    // In most cases we expect this list to be empty, so no need to keep around the vector's inline buffer.
5030
    if (!m_requestAnimationFrameCallbacks->size())
5031
        m_requestAnimationFrameCallbacks.clear();
5032
    else if (FrameView* v = view())
5033
        v->scheduleAnimation();
5034
}
5035
#endif
5036
4950
#if ENABLE(TOUCH_EVENTS)
5037
#if ENABLE(TOUCH_EVENTS)
4951
PassRefPtr<Touch> Document::createTouch(DOMWindow* window, EventTarget* target, int identifier, int pageX, int pageY, int screenX, int screenY, ExceptionCode&) const
5038
PassRefPtr<Touch> Document::createTouch(DOMWindow* window, EventTarget* target, int identifier, int pageX, int pageY, int screenX, int screenY, ExceptionCode&) const
4952
{
5039
{
- a/Source/WebCore/dom/Document.h +16 lines
Lines 147-152 class Touch; a/Source/WebCore/dom/Document.h_sec1
147
class TouchList;
147
class TouchList;
148
#endif
148
#endif
149
149
150
#if ENABLE(REQUEST_ANIMATION_FRAME)
151
class RequestAnimationFrameCallback;
152
#endif
153
150
typedef int ExceptionCode;
154
typedef int ExceptionCode;
151
155
152
class FormElementKey {
156
class FormElementKey {
Lines 1072-1077 public: a/Source/WebCore/dom/Document.h_sec2
1072
1076
1073
    const DocumentTiming* timing() const { return &m_documentTiming; }
1077
    const DocumentTiming* timing() const { return &m_documentTiming; }
1074
1078
1079
#if ENABLE(REQUEST_ANIMATION_FRAME)
1080
    int webkitRequestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback>, Element*);
1081
    void webkitCancelRequestAnimationFrame(int id);
1082
    void serviceScriptedAnimations();
1083
#endif
1084
1075
    bool mayCauseFlashOfUnstyledContent() const;
1085
    bool mayCauseFlashOfUnstyledContent() const;
1076
1086
1077
    void initDNSPrefetch();
1087
    void initDNSPrefetch();
Lines 1391-1396 private: a/Source/WebCore/dom/Document.h_sec3
1391
1401
1392
    DocumentTiming m_documentTiming;
1402
    DocumentTiming m_documentTiming;
1393
    RefPtr<MediaQueryMatcher> m_mediaQueryMatcher;
1403
    RefPtr<MediaQueryMatcher> m_mediaQueryMatcher;
1404
1405
#if ENABLE(REQUEST_ANIMATION_FRAME)
1406
    typedef Vector<RefPtr<RequestAnimationFrameCallback> > RequestAnimationFrameCallbackList;
1407
    OwnPtr<RequestAnimationFrameCallbackList> m_requestAnimationFrameCallbacks;
1408
    int m_nextRequestAnimationFrameCallbackId;
1409
#endif
1394
};
1410
};
1395
1411
1396
inline bool Document::DocumentOrderedMap::contains(AtomicStringImpl* id) const
1412
inline bool Document::DocumentOrderedMap::contains(AtomicStringImpl* id) const
- a/Source/WebCore/dom/RequestAnimationFrameCallback.h +53 lines
Line 0 a/Source/WebCore/dom/RequestAnimationFrameCallback.h_sec1
1
/*
2
 * Copyright (C) 2011 Google Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions are
6
 * met:
7
 *
8
 *     * Redistributions of source code must retain the above copyright
9
 * notice, this list of conditions and the following disclaimer.
10
 *     * Redistributions in binary form must reproduce the above
11
 * copyright notice, this list of conditions and the following disclaimer
12
 * in the documentation and/or other materials provided with the
13
 * distribution.
14
 *     * Neither the name of Google Inc. nor the names of its
15
 * contributors may be used to endorse or promote products derived from
16
 * this software without specific prior written permission.
17
 *
18
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
 */
30
31
#ifndef RequestAnimationFrameCallback_h
32
#define RequestAnimationFrameCallback_h
33
34
#include "Element.h"
35
#include <wtf/PassRefPtr.h>
36
#include <wtf/RefCounted.h>
37
38
namespace WebCore {
39
40
class RequestAnimationFrameCallback : public RefCounted<RequestAnimationFrameCallback> {
41
public:
42
    virtual ~RequestAnimationFrameCallback() { }
43
    virtual bool handleEvent() = 0;
44
45
    RefPtr<Element> m_element;
46
    int m_id;
47
    bool m_firedOrCancelled;
48
};
49
50
}
51
52
#endif // RequestAnimationFrameCallback_h
53
- a/Source/WebCore/dom/RequestAnimationFrameCallback.idl +37 lines
Line 0 a/Source/WebCore/dom/RequestAnimationFrameCallback.idl_sec1
1
/*
2
 * Copyright (C) 2010 Google Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions are
6
 * met:
7
 *
8
 *     * Redistributions of source code must retain the above copyright
9
 * notice, this list of conditions and the following disclaimer.
10
 *     * Redistributions in binary form must reproduce the above
11
 * copyright notice, this list of conditions and the following disclaimer
12
 * in the documentation and/or other materials provided with the
13
 * distribution.
14
 *     * Neither the name of Google Inc. nor the names of its
15
 * contributors may be used to endorse or promote products derived from
16
 * this software without specific prior written permission.
17
 *
18
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
 */
30
31
module core {
32
    interface [
33
        Callback=FunctionOnly,Conditional=REQUEST_ANIMATION_FRAME
34
    ] RequestAnimationFrameCallback{
35
        boolean handleEvent();
36
    };
37
}
- a/Source/WebCore/loader/EmptyClients.h +3 lines
Lines 157-162 public: a/Source/WebCore/loader/EmptyClients.h_sec1
157
#if ENABLE(TILED_BACKING_STORE)
157
#if ENABLE(TILED_BACKING_STORE)
158
    virtual void delegatedScrollRequested(const IntSize&) { }
158
    virtual void delegatedScrollRequested(const IntSize&) { }
159
#endif
159
#endif
160
#if ENABLE(REQUEST_ANIMATION_FRAME)
161
    virtual void scheduleAnimation() { }
162
#endif
160
163
161
    virtual IntPoint screenToWindow(const IntPoint& p) const { return p; }
164
    virtual IntPoint screenToWindow(const IntPoint& p) const { return p; }
162
    virtual IntRect windowToScreen(const IntRect& r) const { return r; }
165
    virtual IntRect windowToScreen(const IntRect& r) const { return r; }
- a/Source/WebCore/page/Chrome.cpp +7 lines
Lines 448-453 void Chrome::setCursor(const Cursor& cursor) a/Source/WebCore/page/Chrome.cpp_sec1
448
    m_client->setCursor(cursor);
448
    m_client->setCursor(cursor);
449
}
449
}
450
450
451
#if ENABLE(REQUEST_ANIMATION_FRAME)
452
void Chrome::scheduleAnimation()
453
{
454
    m_client->scheduleAnimation();
455
}
456
#endif
457
451
#if ENABLE(NOTIFICATIONS)
458
#if ENABLE(NOTIFICATIONS)
452
NotificationPresenter* Chrome::notificationPresenter() const
459
NotificationPresenter* Chrome::notificationPresenter() const
453
{
460
{
- a/Source/WebCore/page/Chrome.h +3 lines
Lines 78-83 namespace WebCore { a/Source/WebCore/page/Chrome.h_sec1
78
        virtual PlatformPageClient platformPageClient() const;
78
        virtual PlatformPageClient platformPageClient() const;
79
        virtual void scrollbarsModeDidChange() const;
79
        virtual void scrollbarsModeDidChange() const;
80
        virtual void setCursor(const Cursor&);
80
        virtual void setCursor(const Cursor&);
81
#if ENABLE(REQUEST_ANIMATION_FRAME)
82
        virtual void scheduleAnimation();
83
#endif
81
84
82
        void scrollRectIntoView(const IntRect&) const;
85
        void scrollRectIntoView(const IntRect&) const;
83
86
- a/Source/WebCore/page/ChromeClient.h +3 lines
Lines 151-156 namespace WebCore { a/Source/WebCore/page/ChromeClient.h_sec1
151
        virtual PlatformPageClient platformPageClient() const = 0;
151
        virtual PlatformPageClient platformPageClient() const = 0;
152
        virtual void scrollbarsModeDidChange() const = 0;
152
        virtual void scrollbarsModeDidChange() const = 0;
153
        virtual void setCursor(const Cursor&) = 0;
153
        virtual void setCursor(const Cursor&) = 0;
154
#if ENABLE(REQUEST_ANIMATION_FRAME)
155
        virtual void scheduleAnimation() = 0;
156
#endif
154
        // End methods used by HostWindow.
157
        // End methods used by HostWindow.
155
158
156
        virtual void dispatchViewportDataDidChange(const ViewportArguments&) const { }
159
        virtual void dispatchViewportDataDidChange(const ViewportArguments&) const { }
- a/Source/WebCore/page/DOMWindow.cpp +19 lines
Lines 105-110 a/Source/WebCore/page/DOMWindow.cpp_sec1
105
#include "LocalFileSystem.h"
105
#include "LocalFileSystem.h"
106
#endif
106
#endif
107
107
108
#if ENABLE(REQUEST_ANIMATION_FRAME)
109
#include "RequestAnimationFrameCallback.h"
110
#endif
111
108
using std::min;
112
using std::min;
109
using std::max;
113
using std::max;
110
114
Lines 1464-1469 void DOMWindow::clearInterval(int timeoutId) a/Source/WebCore/page/DOMWindow.cpp_sec2
1464
    DOMTimer::removeById(context, timeoutId);
1468
    DOMTimer::removeById(context, timeoutId);
1465
}
1469
}
1466
1470
1471
#if ENABLE(REQUEST_ANIMATION_FRAME)
1472
int DOMWindow::webkitRequestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback> callback, Element* e)
1473
{
1474
    if (Document* d = document())
1475
        return d->webkitRequestAnimationFrame(callback, e);
1476
    return 0;
1477
}
1478
1479
void DOMWindow::webkitCancelRequestAnimationFrame(int id)
1480
{
1481
    if (Document* d = document())
1482
        d->webkitCancelRequestAnimationFrame(id);
1483
}
1484
#endif
1485
1467
bool DOMWindow::addEventListener(const AtomicString& eventType, PassRefPtr<EventListener> listener, bool useCapture)
1486
bool DOMWindow::addEventListener(const AtomicString& eventType, PassRefPtr<EventListener> listener, bool useCapture)
1468
{
1487
{
1469
    if (!EventTarget::addEventListener(eventType, listener, useCapture))
1488
    if (!EventTarget::addEventListener(eventType, listener, useCapture))
- a/Source/WebCore/page/DOMWindow.h +10 lines
Lines 64-69 namespace WebCore { a/Source/WebCore/page/DOMWindow.h_sec1
64
    class StyleMedia;
64
    class StyleMedia;
65
    class WebKitPoint;
65
    class WebKitPoint;
66
66
67
#if ENABLE(REQUEST_ANIMATION_FRAME)
68
    class RequestAnimationFrameCallback;
69
#endif
70
67
    struct WindowFeatures;
71
    struct WindowFeatures;
68
72
69
    typedef int ExceptionCode;
73
    typedef int ExceptionCode;
Lines 237-242 namespace WebCore { a/Source/WebCore/page/DOMWindow.h_sec2
237
        int setInterval(PassOwnPtr<ScheduledAction>, int timeout, ExceptionCode&);
241
        int setInterval(PassOwnPtr<ScheduledAction>, int timeout, ExceptionCode&);
238
        void clearInterval(int timeoutId);
242
        void clearInterval(int timeoutId);
239
243
244
        // WebKit animation extensions
245
#if ENABLE(REQUEST_ANIMATION_FRAME)
246
        int webkitRequestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback>, Element*);
247
        void webkitCancelRequestAnimationFrame(int id);
248
#endif
249
240
        // Events
250
        // Events
241
        // EventTarget API
251
        // EventTarget API
242
        virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture);
252
        virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture);
- a/Source/WebCore/page/DOMWindow.idl +6 lines
Lines 235-240 module window { a/Source/WebCore/page/DOMWindow.idl_sec1
235
        // [Custom] long setInterval(in DOMString code, in long timeout);
235
        // [Custom] long setInterval(in DOMString code, in long timeout);
236
        void clearInterval(in long handle);
236
        void clearInterval(in long handle);
237
237
238
#if defined(ENABLE_REQUEST_ANIMATION_FRAME)
239
        // WebKit animation extensions
240
        long webkitRequestAnimationFrame(in [Callback] RequestAnimationFrameCallback callback, in Element element);
241
        void webkitCancelRequestAnimationFrame(in long id);
242
#endif
243
238
        // Base64
244
        // Base64
239
        DOMString atob(in [ConvertNullToNullString] DOMString string)
245
        DOMString atob(in [ConvertNullToNullString] DOMString string)
240
            raises(DOMException);
246
            raises(DOMException);
- a/Source/WebCore/page/FrameView.cpp +16 lines
Lines 342-347 void FrameView::setFrameRect(const IntRect& newRect) a/Source/WebCore/page/FrameView.cpp_sec1
342
#endif
342
#endif
343
}
343
}
344
344
345
#if ENABLE(REQUEST_ANIMATION_FRAME)
346
void FrameView::scheduleAnimation()
347
{
348
    if (hostWindow())
349
        hostWindow()->scheduleAnimation();
350
}
351
#endif
352
345
void FrameView::setMarginWidth(int w)
353
void FrameView::setMarginWidth(int w)
346
{
354
{
347
    // make it update the rendering area when set
355
    // make it update the rendering area when set
Lines 1639-1644 void FrameView::unscheduleRelayout() a/Source/WebCore/page/FrameView.cpp_sec2
1639
    m_delayedLayout = false;
1647
    m_delayedLayout = false;
1640
}
1648
}
1641
1649
1650
#if ENABLE(REQUEST_ANIMATION_FRAME)
1651
void FrameView::serviceScriptedAnimations()
1652
{
1653
    for (Frame* frame = m_frame.get(); frame; frame = frame->tree()->traverseNext())
1654
        frame->document()->serviceScriptedAnimations();
1655
}
1656
#endif
1657
1642
bool FrameView::isTransparent() const
1658
bool FrameView::isTransparent() const
1643
{
1659
{
1644
    return m_isTransparent;
1660
    return m_isTransparent;
- a/Source/WebCore/page/FrameView.h +7 lines
Lines 62-67 public: a/Source/WebCore/page/FrameView.h_sec1
62
    
62
    
63
    virtual void invalidateRect(const IntRect&);
63
    virtual void invalidateRect(const IntRect&);
64
    virtual void setFrameRect(const IntRect&);
64
    virtual void setFrameRect(const IntRect&);
65
#if ENABLE(REQUEST_ANIMATION_FRAME)
66
    void scheduleAnimation();
67
#endif
65
68
66
    Frame* frame() const { return m_frame.get(); }
69
    Frame* frame() const { return m_frame.get(); }
67
    void clearFrame();
70
    void clearFrame();
Lines 97-102 public: a/Source/WebCore/page/FrameView.h_sec2
97
100
98
    bool needsFullRepaint() const { return m_doFullRepaint; }
101
    bool needsFullRepaint() const { return m_doFullRepaint; }
99
102
103
#if ENABLE(REQUEST_ANIMATION_FRAME)
104
    void serviceScriptedAnimations();
105
#endif
106
100
#if USE(ACCELERATED_COMPOSITING)
107
#if USE(ACCELERATED_COMPOSITING)
101
    void updateCompositingLayers();
108
    void updateCompositingLayers();
102
109
- a/Source/WebCore/platform/HostWindow.h +4 lines
Lines 66-71 public: a/Source/WebCore/platform/HostWindow.h_sec1
66
66
67
    // Request that the cursor change.
67
    // Request that the cursor change.
68
    virtual void setCursor(const Cursor&) = 0;
68
    virtual void setCursor(const Cursor&) = 0;
69
70
#if ENABLE(REQUEST_ANIMATION_FRAME)
71
    virtual void scheduleAnimation() = 0;
72
#endif
69
};
73
};
70
74
71
} // namespace WebCore
75
} // namespace WebCore
- a/Tools/ChangeLog +15 lines
Lines 1-3 a/Tools/ChangeLog_sec1
1
2011-01-11  James Robinson  <jamesr@chromium.org>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        Implement mozilla's requestAnimationFrame API
6
        https://bugs.webkit.org/show_bug.cgi?id=51218
7
8
        Chromium DumpRenderTree support for window.webkitRequestAnimationFrame.
9
10
        * DumpRenderTree/chromium/WebViewHost.cpp:
11
        (invokeScheduleComposite):
12
        (WebViewHost::scheduleAnimation):
13
        (WebViewHost::paintInvalidatedRegion):
14
        * DumpRenderTree/chromium/WebViewHost.h:
15
1
2011-01-11  Eric Seidel  <eric@webkit.org>
16
2011-01-11  Eric Seidel  <eric@webkit.org>
2
17
3
        Unreviewed.
18
        Unreviewed.
- a/Tools/DumpRenderTree/chromium/WebViewHost.cpp +16 lines
Lines 624-629 void WebViewHost::scheduleComposite() a/Tools/DumpRenderTree/chromium/WebViewHost.cpp_sec1
624
    didInvalidateRect(clientRect);
624
    didInvalidateRect(clientRect);
625
}
625
}
626
626
627
#if ENABLE(REQUEST_ANIMATION_FRAME)
628
static void invokeScheduleComposite(void* context)
629
{
630
    WebViewHost* wvh = static_cast<WebViewHost*>(context);
631
    wvh->scheduleComposite();
632
}
633
634
void WebViewHost::scheduleAnimation()
635
{
636
    webkit_support::PostDelayedTask(invokeScheduleComposite, this, 0);
637
}
638
#endif
639
627
void WebViewHost::didFocus()
640
void WebViewHost::didFocus()
628
{
641
{
629
    m_shell->setFocus(webWidget(), true);
642
    m_shell->setFocus(webWidget(), true);
Lines 1438-1443 void WebViewHost::paintRect(const WebRect& rect) a/Tools/DumpRenderTree/chromium/WebViewHost.cpp_sec2
1438
1451
1439
void WebViewHost::paintInvalidatedRegion()
1452
void WebViewHost::paintInvalidatedRegion()
1440
{
1453
{
1454
#if ENABLE(REQUEST_ANIMATION_FRAME)
1455
    webWidget()->animate();
1456
#endif
1441
    webWidget()->layout();
1457
    webWidget()->layout();
1442
    WebSize widgetSize = webWidget()->size();
1458
    WebSize widgetSize = webWidget()->size();
1443
    WebRect clientRect(0, 0, widgetSize.width, widgetSize.height);
1459
    WebRect clientRect(0, 0, widgetSize.width, widgetSize.height);
- a/Tools/DumpRenderTree/chromium/WebViewHost.h +3 lines
Lines 147-152 class WebViewHost : public WebKit::WebViewClient, public WebKit::WebFrameClient, a/Tools/DumpRenderTree/chromium/WebViewHost.h_sec1
147
    virtual void didInvalidateRect(const WebKit::WebRect&);
147
    virtual void didInvalidateRect(const WebKit::WebRect&);
148
    virtual void didScrollRect(int dx, int dy, const WebKit::WebRect&);
148
    virtual void didScrollRect(int dx, int dy, const WebKit::WebRect&);
149
    virtual void scheduleComposite();
149
    virtual void scheduleComposite();
150
#if ENABLE(REQUEST_ANIMATION_FRAME)
151
    virtual void scheduleAnimation();
152
#endif
150
    virtual void didFocus();
153
    virtual void didFocus();
151
    virtual void didBlur();
154
    virtual void didBlur();
152
    virtual void didChangeCursor(const WebKit::WebCursorInfo&);
155
    virtual void didChangeCursor(const WebKit::WebCursorInfo&);
- a/WebKit/chromium/ChangeLog +24 lines
Lines 1-3 a/WebKit/chromium/ChangeLog_sec1
1
2011-01-11  James Robinson  <jamesr@chromium.org>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        Implement mozilla's requestAnimationFrame API
6
        https://bugs.webkit.org/show_bug.cgi?id=51218
7
8
        Chromium WebKit API support for window.webkitRequestAnimationFrame()
9
10
        * features.gypi:
11
        * public/WebWidget.h:
12
        * public/WebWidgetClient.h:
13
        (WebKit::WebWidgetClient::scheduleAnimation):
14
        * src/ChromeClientImpl.cpp:
15
        (WebKit::ChromeClientImpl::scheduleAnimation):
16
        * src/ChromeClientImpl.h:
17
        * src/WebPopupMenuImpl.cpp:
18
        (WebKit::WebPopupMenuImpl::animate):
19
        (WebKit::WebPopupMenuImpl::scheduleAnimation):
20
        * src/WebPopupMenuImpl.h:
21
        * src/WebViewImpl.cpp:
22
        (WebKit::WebViewImpl::animate):
23
        * src/WebViewImpl.h:
24
1
2011-01-11  Pavel Feldman  <pfeldman@chromium.org>
25
2011-01-11  Pavel Feldman  <pfeldman@chromium.org>
2
26
3
        Reviewed by Yury Semikhatsky.
27
        Reviewed by Yury Semikhatsky.
- a/WebKit/chromium/features.gypi +1 lines
Lines 69-74 a/WebKit/chromium/features.gypi_sec1
69
        'ENABLE_OPENTYPE_SANITIZER=1',
69
        'ENABLE_OPENTYPE_SANITIZER=1',
70
        'ENABLE_ORIENTATION_EVENTS=0',
70
        'ENABLE_ORIENTATION_EVENTS=0',
71
        'ENABLE_PROGRESS_TAG=1',
71
        'ENABLE_PROGRESS_TAG=1',
72
        'ENABLE_REQUEST_ANIMATION_FRAME=1',
72
        'ENABLE_SHARED_WORKERS=1',
73
        'ENABLE_SHARED_WORKERS=1',
73
        'ENABLE_SVG=1',
74
        'ENABLE_SVG=1',
74
        'ENABLE_SVG_ANIMATION=1',
75
        'ENABLE_SVG_ANIMATION=1',
- a/WebKit/chromium/public/WebWidget.h +4 lines
Lines 56-61 public: a/WebKit/chromium/public/WebWidget.h_sec1
56
    // Called to resize the WebWidget.
56
    // Called to resize the WebWidget.
57
    virtual void resize(const WebSize&) = 0;
57
    virtual void resize(const WebSize&) = 0;
58
58
59
    // Called to update imperative animation state.  This should be called before
60
    // paint, although the client can rate-limit these calls.
61
    virtual void animate() = 0;
62
59
    // Called to layout the WebWidget.  This MUST be called before Paint,
63
    // Called to layout the WebWidget.  This MUST be called before Paint,
60
    // and it may result in calls to WebWidgetClient::didInvalidateRect.
64
    // and it may result in calls to WebWidgetClient::didInvalidateRect.
61
    virtual void layout() = 0;
65
    virtual void layout() = 0;
- a/WebKit/chromium/public/WebWidgetClient.h +3 lines
Lines 56-61 public: a/WebKit/chromium/public/WebWidgetClient.h_sec1
56
    // Called when a call to WebWidget::composite is required
56
    // Called when a call to WebWidget::composite is required
57
    virtual void scheduleComposite() { }
57
    virtual void scheduleComposite() { }
58
58
59
    // Called when a call to WebWidget::animate is required
60
    virtual void scheduleAnimation() { }
61
59
    // Called when the widget acquires or loses focus, respectively.
62
    // Called when the widget acquires or loses focus, respectively.
60
    virtual void didFocus() { }
63
    virtual void didFocus() { }
61
    virtual void didBlur() { }
64
    virtual void didBlur() { }
- a/WebKit/chromium/src/ChromeClientImpl.cpp +7 lines
Lines 532-537 void ChromeClientImpl::invalidateContentsForSlowScroll(const IntRect& updateRect a/WebKit/chromium/src/ChromeClientImpl.cpp_sec1
532
    invalidateContentsAndWindow(updateRect, immediate);
532
    invalidateContentsAndWindow(updateRect, immediate);
533
}
533
}
534
534
535
#if ENABLE(REQUEST_ANIMATION_FRAME)
536
void ChromeClientImpl::scheduleAnimation()
537
{
538
    m_webView->client()->scheduleAnimation();
539
}
540
#endif
541
535
void ChromeClientImpl::scroll(
542
void ChromeClientImpl::scroll(
536
    const IntSize& scrollDelta, const IntRect& scrollRect,
543
    const IntSize& scrollDelta, const IntRect& scrollRect,
537
    const IntRect& clipRect)
544
    const IntRect& clipRect)
- a/WebKit/chromium/src/ChromeClientImpl.h +3 lines
Lines 105-110 public: a/WebKit/chromium/src/ChromeClientImpl.h_sec1
105
    virtual void invalidateWindow(const WebCore::IntRect&, bool);
105
    virtual void invalidateWindow(const WebCore::IntRect&, bool);
106
    virtual void invalidateContentsAndWindow(const WebCore::IntRect&, bool);
106
    virtual void invalidateContentsAndWindow(const WebCore::IntRect&, bool);
107
    virtual void invalidateContentsForSlowScroll(const WebCore::IntRect&, bool);
107
    virtual void invalidateContentsForSlowScroll(const WebCore::IntRect&, bool);
108
#if ENABLE(REQUEST_ANIMATION_FRAME)
109
    virtual void scheduleAnimation();
110
#endif
108
    virtual void scroll(
111
    virtual void scroll(
109
        const WebCore::IntSize& scrollDelta, const WebCore::IntRect& rectToScroll,
112
        const WebCore::IntSize& scrollDelta, const WebCore::IntRect& rectToScroll,
110
        const WebCore::IntRect& clipRect);
113
        const WebCore::IntRect& clipRect);
- a/WebKit/chromium/src/WebPopupMenuImpl.cpp +8 lines
Lines 151-156 void WebPopupMenuImpl::resize(const WebSize& newSize) a/WebKit/chromium/src/WebPopupMenuImpl.cpp_sec1
151
    }
151
    }
152
}
152
}
153
153
154
void WebPopupMenuImpl::animate()
155
{
156
}
157
154
void WebPopupMenuImpl::layout()
158
void WebPopupMenuImpl::layout()
155
{
159
{
156
}
160
}
Lines 299-304 void WebPopupMenuImpl::invalidateContentsForSlowScroll(const IntRect& updateRect a/WebKit/chromium/src/WebPopupMenuImpl.cpp_sec2
299
    invalidateContentsAndWindow(updateRect, immediate);
303
    invalidateContentsAndWindow(updateRect, immediate);
300
}
304
}
301
305
306
void WebPopupMenuImpl::scheduleAnimation()
307
{
308
}
309
302
void WebPopupMenuImpl::scroll(const IntSize& scrollDelta,
310
void WebPopupMenuImpl::scroll(const IntSize& scrollDelta,
303
                              const IntRect& scrollRect,
311
                              const IntRect& scrollRect,
304
                              const IntRect& clipRect)
312
                              const IntRect& clipRect)
- a/WebKit/chromium/src/WebPopupMenuImpl.h +2 lines
Lines 61-66 public: a/WebKit/chromium/src/WebPopupMenuImpl.h_sec1
61
    virtual void close();
61
    virtual void close();
62
    virtual WebSize size() { return m_size; }
62
    virtual WebSize size() { return m_size; }
63
    virtual void resize(const WebSize&);
63
    virtual void resize(const WebSize&);
64
    virtual void animate();
64
    virtual void layout();
65
    virtual void layout();
65
    virtual void paint(WebCanvas* canvas, const WebRect& rect);
66
    virtual void paint(WebCanvas* canvas, const WebRect& rect);
66
    virtual void themeChanged();
67
    virtual void themeChanged();
Lines 105-110 public: a/WebKit/chromium/src/WebPopupMenuImpl.h_sec2
105
    virtual void invalidateWindow(const WebCore::IntRect&, bool);
106
    virtual void invalidateWindow(const WebCore::IntRect&, bool);
106
    virtual void invalidateContentsAndWindow(const WebCore::IntRect&, bool);
107
    virtual void invalidateContentsAndWindow(const WebCore::IntRect&, bool);
107
    virtual void invalidateContentsForSlowScroll(const WebCore::IntRect&, bool);
108
    virtual void invalidateContentsForSlowScroll(const WebCore::IntRect&, bool);
109
    virtual void scheduleAnimation();
108
    virtual void scroll(
110
    virtual void scroll(
109
        const WebCore::IntSize& scrollDelta, const WebCore::IntRect& scrollRect,
111
        const WebCore::IntSize& scrollDelta, const WebCore::IntRect& scrollRect,
110
        const WebCore::IntRect& clipRect);
112
        const WebCore::IntRect& clipRect);
- a/WebKit/chromium/src/WebViewImpl.cpp +12 lines
Lines 973-978 void WebViewImpl::resize(const WebSize& newSize) a/WebKit/chromium/src/WebViewImpl.cpp_sec1
973
#endif
973
#endif
974
}
974
}
975
975
976
void WebViewImpl::animate()
977
{
978
#if ENABLE(REQUEST_ANIMATION_FRAME)
979
    WebFrameImpl* webframe = mainFrameImpl();
980
    if (webframe) {
981
        FrameView* view = webframe->frameView();
982
        if (view)
983
            view->serviceScriptedAnimations();
984
    }
985
#endif
986
}
987
976
void WebViewImpl::layout()
988
void WebViewImpl::layout()
977
{
989
{
978
    WebFrameImpl* webframe = mainFrameImpl();
990
    WebFrameImpl* webframe = mainFrameImpl();
- a/WebKit/chromium/src/WebViewImpl.h +1 lines
Lines 92-97 public: a/WebKit/chromium/src/WebViewImpl.h_sec1
92
    virtual void close();
92
    virtual void close();
93
    virtual WebSize size() { return m_size; }
93
    virtual WebSize size() { return m_size; }
94
    virtual void resize(const WebSize&);
94
    virtual void resize(const WebSize&);
95
    virtual void animate();
95
    virtual void layout();
96
    virtual void layout();
96
    virtual void paint(WebCanvas*, const WebRect&);
97
    virtual void paint(WebCanvas*, const WebRect&);
97
    virtual void themeChanged();
98
    virtual void themeChanged();

Return to Bug 51218