Commit 1a6b9bb0 authored by jamesr@google.com's avatar jamesr@google.com
Browse files

2011-01-19 James Robinson <jamesr@chromium.org>

        Unreviewed, rolling out r76194.
        http://trac.webkit.org/changeset/76194
        https://bugs.webkit.org/show_bug.cgi?id=51218

        Caused mysterious compile failure on the chromium win
        build.webkit.org bots

        * fast/animation/request-animation-frame-cancel-expected.txt: Removed.
        * fast/animation/request-animation-frame-cancel.html: Removed.
        * fast/animation/request-animation-frame-cancel2-expected.txt: Removed.
        * fast/animation/request-animation-frame-cancel2.html: Removed.
        * fast/animation/request-animation-frame-display-expected.txt: Removed.
        * fast/animation/request-animation-frame-display.html: Removed.
        * fast/animation/request-animation-frame-expected.txt: Removed.
        * fast/animation/request-animation-frame-within-callback-expected.txt: Removed.
        * fast/animation/request-animation-frame-within-callback.html: Removed.
        * fast/animation/request-animation-frame.html: Removed.
        * platform/chromium/test_expectations.txt:
        * platform/gtk/Skipped:
        * platform/mac/Skipped:
        * platform/qt/Skipped:
        * platform/win/Skipped:
2011-01-19  James Robinson  <jamesr@chromium.org>

        Unreviewed, rolling out r76194.
        http://trac.webkit.org/changeset/76194
        https://bugs.webkit.org/show_bug.cgi?id=51218

        Caused mysterious compile failure on the chromium win
        build.webkit.org bots

        * WebCore.gypi:
        * dom/Document.cpp:
        (WebCore::Document::Document):
        * dom/Document.h:
        * dom/RequestAnimationFrameCallback.h: Removed.
        * dom/RequestAnimationFrameCallback.idl: Removed.
        * loader/EmptyClients.h:
        * page/Chrome.cpp:
        * page/Chrome.h:
        * page/ChromeClient.h:
        * page/DOMWindow.cpp:
        * page/DOMWindow.h:
        * page/DOMWindow.idl:
        * page/FrameView.cpp:
        * page/FrameView.h:
        * platform/HostWindow.h:
2011-01-19  James Robinson  <jamesr@chromium.org>

        Unreviewed, rolling out r76194.
        http://trac.webkit.org/changeset/76194
        https://bugs.webkit.org/show_bug.cgi?id=51218

        Caused mysterious compile failure on the chromium win
        build.webkit.org bots

        * features.gypi:
        * public/WebWidget.h:
        * public/WebWidgetClient.h:
        * src/ChromeClientImpl.cpp:
        * src/ChromeClientImpl.h:
        * src/WebPopupMenuImpl.cpp:
        * src/WebPopupMenuImpl.h:
        * src/WebViewImpl.cpp:
        * src/WebViewImpl.h:
2011-01-19  James Robinson  <jamesr@chromium.org>

        Unreviewed, rolling out r76194.
        http://trac.webkit.org/changeset/76194
        https://bugs.webkit.org/show_bug.cgi?id=51218

        Caused mysterious compile failure on the chromium win
        build.webkit.org bots

        * DumpRenderTree/chromium/WebViewHost.cpp:
        (WebViewHost::paintInvalidatedRegion):
        * DumpRenderTree/chromium/WebViewHost.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76198 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 52382a77
2011-01-19 James Robinson <jamesr@chromium.org>
Unreviewed, rolling out r76194.
http://trac.webkit.org/changeset/76194
https://bugs.webkit.org/show_bug.cgi?id=51218
Caused mysterious compile failure on the chromium win
build.webkit.org bots
* fast/animation/request-animation-frame-cancel-expected.txt: Removed.
* fast/animation/request-animation-frame-cancel.html: Removed.
* fast/animation/request-animation-frame-cancel2-expected.txt: Removed.
* fast/animation/request-animation-frame-cancel2.html: Removed.
* fast/animation/request-animation-frame-display-expected.txt: Removed.
* fast/animation/request-animation-frame-display.html: Removed.
* fast/animation/request-animation-frame-expected.txt: Removed.
* fast/animation/request-animation-frame-within-callback-expected.txt: Removed.
* fast/animation/request-animation-frame-within-callback.html: Removed.
* fast/animation/request-animation-frame.html: Removed.
* platform/chromium/test_expectations.txt:
* platform/gtk/Skipped:
* platform/mac/Skipped:
* platform/qt/Skipped:
* platform/win/Skipped:
2011-01-19 James Robinson <jamesr@chromium.org>
 
Reviewed by Darin Fisher.
......
<!DOCTYPE html>
<html>
<span id="e">PASS</span>
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
var e = document.getElementById("e");
var id = window.webkitRequestAnimationFrame(function() {
e.innerHTML = "FAIL";
}, e);
window.webkitCancelRequestAnimationFrame(id);
if (window.layoutTestController)
layoutTestController.display();
</script>
<!DOCTYPE html>
<html>
<span id="e">PASS</span>
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
var e = document.getElementById("e");
var secondCallbackId;
window.webkitRequestAnimationFrame(function() {
window.webkitCancelRequestAnimationFrame(secondCallbackId);
}, e);
secondCallbackId = window.webkitRequestAnimationFrame(function() {
e.innerHTML = "FAIL";
}, e);
if (window.layoutTestController)
layoutTestController.display();
</script>
<!DOCTYPE html>
<html>
<span id="a" style="display:none"></span>
<span id="b">FAIL</span>
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
var a = document.getElementById("a");
window.webkitRequestAnimationFrame(function() {
b.innerHTML="PASS";
}, a);
var b = document.getElementById("b");
window.webkitRequestAnimationFrame(function() {
a.style.display="";
}, b);
if (window.layoutTestController)
layoutTestController.display();
</script>
</html>
<!DOCTYPE html>
<html>
<span id="e">FAIL</span>
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
var e = document.getElementById("e");
var sameFrame;
window.webkitRequestAnimationFrame(function() {
sameFrame = true;
}, e);
window.webkitRequestAnimationFrame(function() {
window.webkitRequestAnimationFrame(function() {
e.innerHTML = sameFrame ? "FAIL" : "PASS";
}, e);
}, e);
window.webkitRequestAnimationFrame(function() {
sameFrame = false;
}, e);
// This should fire the three already registered callbacks, but not the one dynamically registered.
if (window.layoutTestController)
layoutTestController.display();
// This should fire the dynamically registered callback.
if (window.layoutTestController)
layoutTestController.display();
</script>
<!DOCTYPE html>
<html>
<span id="e">FAIL</span>
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
var e = document.getElementById("e");
window.webkitRequestAnimationFrame(function() {
e.innerHTML="PASS";
}, e);
if (window.layoutTestController)
layoutTestController.display();
</script>
......@@ -3059,9 +3059,6 @@ BUGWK52061 DEBUG : transitions/change-values-during-transition.html = PASS TEXT
BUGWK52061 DEBUG : transitions/interrupted-accelerated-transition.html = PASS TEXT
BUGWK52061 DEBUG : transitions/transition-timing-function.html = PASS TEXT
// These will fail on the canaries until a chromium-side features_overrides.gypi change lands
BUG_JAMESR : fast/animation = TEXT
// Failing since creation in http://trac.webkit.org/changeset/75308
BUG_ABARTH : svg/text/caret-in-svg-text.xhtml = TEXT
......@@ -3090,4 +3087,4 @@ BUGCR69736 : fast/js/js-continue-break-restrictions.html = TEXT
BUGCR1 REBASELINE MAC : fast/events/offsetX-offsetY.html = TEXT
// Waiting to rebaseline
BUG_DGLAZKOV : fast/forms/slider-mouse-events.html = TEXT
BUG_DGLAZKOV : fast/forms/slider-mouse-events.html = TEXT
\ No newline at end of file
......@@ -5588,9 +5588,6 @@ http/tests/inspector/console-websocket-error.html
http/tests/xmlhttprequest/basic-auth-nouser.html
http/tests/xmlhttprequest/basic-auth-nopassword.html
# Requires requestAnimationFrame support
fast/animation/
# https://bugs.webkit.org/show_bug.cgi?id=52297
editing/input/page-up-down-scrolls.html
......
......@@ -280,6 +280,3 @@ animations/stop-animation-on-suspend.html
# DRT does not support toggling caret browsing on / off
editing/selection/caret-mode-paragraph-keys-navigation.html
# Requires requestAnimationFrame support
fast/animation/
......@@ -5087,9 +5087,6 @@ editing/selection/caret-bidi-first-and-last-letters.html
# https://bugs.webkit.org/show_bug.cgi?id=52155
fast/text/emphasis-avoid-ruby.html
# Requires requestAnimationFrame support
fast/animation/
# https://bugs.webkit.org/show_bug.cgi?id=42578
# [Qt] DRT sideeffect revealed by r63657 and r75305
fast/tokenizer/flush-characters-in-document-write-evil.html
......
......@@ -1115,6 +1115,5 @@ fast/loader/user-stylesheet-fast-path.html
# DRT does not support toggling caret browsing on / off
editing/selection/caret-mode-paragraph-keys-navigation.html
# Requires requestAnimationFrame support
fast/animation/
# DRT does not obey addURLToRedirect
http/tests/loading/cross-origin-XHR-willLoadRequest.html
2011-01-19 James Robinson <jamesr@chromium.org>
Unreviewed, rolling out r76194.
http://trac.webkit.org/changeset/76194
https://bugs.webkit.org/show_bug.cgi?id=51218
Caused mysterious compile failure on the chromium win
build.webkit.org bots
* WebCore.gypi:
* dom/Document.cpp:
(WebCore::Document::Document):
* dom/Document.h:
* dom/RequestAnimationFrameCallback.h: Removed.
* dom/RequestAnimationFrameCallback.idl: Removed.
* loader/EmptyClients.h:
* page/Chrome.cpp:
* page/Chrome.h:
* page/ChromeClient.h:
* page/DOMWindow.cpp:
* page/DOMWindow.h:
* page/DOMWindow.idl:
* page/FrameView.cpp:
* page/FrameView.h:
* platform/HostWindow.h:
2011-01-19 Simon Fraser <simon.fraser@apple.com>
 
Reviewed by Sam Weinig.
......@@ -75,7 +75,6 @@
'dom/ProgressEvent.idl',
'dom/Range.idl',
'dom/RangeException.idl',
'dom/RequestAnimationFrameCallback.idl',
'dom/Text.idl',
'dom/TextEvent.idl',
'dom/Touch.idl',
......@@ -1316,7 +1315,6 @@
'dom/Range.h',
'dom/RangeBoundaryPoint.h',
'dom/RangeException.h',
'dom/RequestAnimationFrameCallback.h',
'dom/RawDataDocumentParser.h',
'dom/RegisteredEventListener.cpp',
'dom/RegisteredEventListener.h',
......
......@@ -206,10 +206,6 @@
#include "RenderFullScreen.h"
#endif
#if ENABLE(REQUEST_ANIMATION_FRAME)
#include "RequestAnimationFrameCallback.h"
#endif
using namespace std;
using namespace WTF;
using namespace Unicode;
......@@ -428,9 +424,6 @@ Document::Document(Frame* frame, const KURL& url, bool isXHTML, bool isHTML, con
, m_loadEventDelayTimer(this, &Document::loadEventDelayTimerFired)
, m_directionSetOnDocumentElement(false)
, m_writingModeSetOnDocumentElement(false)
#if ENABLE(REQUEST_ANIMATION_FRAME)
, m_nextRequestAnimationFrameCallbackId(0)
#endif
{
m_document = this;
......@@ -4949,86 +4942,6 @@ void Document::loadEventDelayTimerFired(Timer<Document>*)
frame()->loader()->checkCompleted();
}
#if ENABLE(REQUEST_ANIMATION_FRAME)
int Document::webkitRequestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback> callback, Element* e)
{
if (!m_requestAnimationFrameCallbacks)
m_requestAnimationFrameCallbacks = new RequestAnimationFrameCallbackList;
int id = m_nextRequestAnimationFrameCallbackId++;
callback->m_firedOrCancelled = false;
callback->m_id = id;
callback->m_element = e;
m_requestAnimationFrameCallbacks->append(callback);
if (FrameView* v = view())
v->scheduleAnimation();
return id;
}
void Document::webkitCancelRequestAnimationFrame(int id)
{
if (!m_requestAnimationFrameCallbacks)
return;
for (size_t i = 0; i < m_requestAnimationFrameCallbacks->size(); ++i) {
if (m_requestAnimationFrameCallbacks->at(i)->m_id == id) {
m_requestAnimationFrameCallbacks->at(i)->m_firedOrCancelled = true;
m_requestAnimationFrameCallbacks->remove(i);
return;
}
}
}
void Document::serviceScriptedAnimations()
{
if (!m_requestAnimationFrameCallbacks)
return;
// We want to run the callback for all elements in the document that have registered
// for a callback and that are visible. Running the callbacks can cause new callbacks
// to be registered, existing callbacks to be cancelled, and elements to gain or lose
// visibility so this code has to iterate carefully.
// FIXME: Currently, this code doesn't do any visibility tests beyond checking display:
// First, generate a list of callbacks to consider. Callbacks registered from this point
// on are considered only for the "next" frame, not this one.
RequestAnimationFrameCallbackList callbacks(*m_requestAnimationFrameCallbacks);
// Firing the callback may cause the visibility of other elements to change. To avoid
// missing any callbacks, we keep iterating through the list of candiate callbacks and firing
// them until nothing new becomes visible.
bool firedCallback;
do {
firedCallback = false;
// A previous iteration may have invalidated style (or layout). Update styles for each iteration
// for now since all we check is the existence of a renderer.
updateStyleIfNeeded();
for (size_t i = 0; i < callbacks.size(); ++i) {
RequestAnimationFrameCallback* callback = callbacks[i].get();
if (!callback->m_firedOrCancelled && (!callback->m_element || callback->m_element->renderer())) {
callback->m_firedOrCancelled = true;
callback->handleEvent();
firedCallback = true;
callbacks.remove(i);
break;
}
}
} while (firedCallback);
// Remove any callbacks we fired from the list of pending callbacks.
for (size_t i = 0; i < m_requestAnimationFrameCallbacks->size();) {
if (m_requestAnimationFrameCallbacks->at(i)->m_firedOrCancelled)
m_requestAnimationFrameCallbacks->remove(i);
else
++i;
}
// In most cases we expect this list to be empty, so no need to keep around the vector's inline buffer.
if (!m_requestAnimationFrameCallbacks->size())
m_requestAnimationFrameCallbacks.clear();
else if (FrameView* v = view())
v->scheduleAnimation();
}
#endif
#if ENABLE(TOUCH_EVENTS)
PassRefPtr<Touch> Document::createTouch(DOMWindow* window, EventTarget* target, int identifier, int pageX, int pageY, int screenX, int screenY, ExceptionCode&) const
{
......
......@@ -146,10 +146,6 @@ class Touch;
class TouchList;
#endif
#if ENABLE(REQUEST_ANIMATION_FRAME)
class RequestAnimationFrameCallback;
#endif
typedef int ExceptionCode;
class FormElementKey {
......@@ -1076,12 +1072,6 @@ public:
const DocumentTiming* timing() const { return &m_documentTiming; }
#if ENABLE(REQUEST_ANIMATION_FRAME)
int webkitRequestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback>, Element*);
void webkitCancelRequestAnimationFrame(int id);
void serviceScriptedAnimations();
#endif
bool mayCauseFlashOfUnstyledContent() const;
void initDNSPrefetch();
......@@ -1401,12 +1391,6 @@ private:
DocumentTiming m_documentTiming;
RefPtr<MediaQueryMatcher> m_mediaQueryMatcher;
#if ENABLE(REQUEST_ANIMATION_FRAME)
typedef Vector<RefPtr<RequestAnimationFrameCallback> > RequestAnimationFrameCallbackList;
OwnPtr<RequestAnimationFrameCallbackList> m_requestAnimationFrameCallbacks;
int m_nextRequestAnimationFrameCallbackId;
#endif
};
inline bool Document::DocumentOrderedMap::contains(AtomicStringImpl* id) const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment