Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: sky/engine/web/WebDocument.cpp

Issue 760183003: Enable/Unprefix Animations & Transitions, add basic tests (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: patch for landing Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/engine/public/web/WebDocument.h ('k') | sky/engine/web/WebRuntimeFeatures.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 17 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "sky/engine/config.h" 31 #include "sky/engine/config.h"
32 #include "sky/engine/public/web/WebDocument.h" 32 #include "sky/engine/public/web/WebDocument.h"
33 33
34 #include "sky/engine/bindings/core/v8/Dictionary.h" 34 #include "sky/engine/bindings/core/v8/Dictionary.h"
35 #include "sky/engine/bindings/core/v8/ExceptionState.h" 35 #include "sky/engine/bindings/core/v8/ExceptionState.h"
36 #include "sky/engine/bindings/core/v8/ScriptState.h" 36 #include "sky/engine/bindings/core/v8/ScriptState.h"
37 #include "sky/engine/bindings/core/v8/ScriptValue.h" 37 #include "sky/engine/bindings/core/v8/ScriptValue.h"
38 #include "sky/engine/core/animation/AnimationTimeline.h"
38 #include "sky/engine/core/css/StyleSheetContents.h" 39 #include "sky/engine/core/css/StyleSheetContents.h"
39 #include "sky/engine/core/dom/Document.h" 40 #include "sky/engine/core/dom/Document.h"
40 #include "sky/engine/core/dom/Element.h" 41 #include "sky/engine/core/dom/Element.h"
41 #include "sky/engine/core/dom/StyleEngine.h" 42 #include "sky/engine/core/dom/StyleEngine.h"
42 #include "sky/engine/core/events/Event.h" 43 #include "sky/engine/core/events/Event.h"
43 #include "sky/engine/core/html/HTMLElement.h" 44 #include "sky/engine/core/html/HTMLElement.h"
44 #include "sky/engine/core/rendering/RenderObject.h" 45 #include "sky/engine/core/rendering/RenderObject.h"
45 #include "sky/engine/core/rendering/RenderView.h" 46 #include "sky/engine/core/rendering/RenderView.h"
46 #include "sky/engine/public/platform/WebURL.h" 47 #include "sky/engine/public/platform/WebURL.h"
47 #include "sky/engine/public/web/WebElement.h" 48 #include "sky/engine/public/web/WebElement.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 Document* document = unwrap<Document>(); 132 Document* document = unwrap<Document>();
132 Dictionary dictionary(options, isolate); 133 Dictionary dictionary(options, isolate);
133 TrackExceptionState exceptionState; 134 TrackExceptionState exceptionState;
134 ScriptValue constructor = document->registerElement(ScriptState::current(iso late), name, dictionary, exceptionState, CustomElement::EmbedderNames); 135 ScriptValue constructor = document->registerElement(ScriptState::current(iso late), name, dictionary, exceptionState, CustomElement::EmbedderNames);
135 ec = exceptionState.code(); 136 ec = exceptionState.code();
136 if (exceptionState.hadException()) 137 if (exceptionState.hadException())
137 return v8::Handle<v8::Value>(); 138 return v8::Handle<v8::Value>();
138 return constructor.v8Value(); 139 return constructor.v8Value();
139 } 140 }
140 141
142 void WebDocument::pauseAnimationsForTesting(double pauseTime) const {
143 constUnwrap<Document>()->frame()->view()->updateLayoutAndStyleForPainting();
144 constUnwrap<Document>()->timeline().pauseAnimationsForTesting(pauseTime);
145 }
146
141 WebDocument::WebDocument(const PassRefPtr<Document>& elem) 147 WebDocument::WebDocument(const PassRefPtr<Document>& elem)
142 : WebNode(elem) 148 : WebNode(elem)
143 { 149 {
144 } 150 }
145 151
146 WebDocument& WebDocument::operator=(const PassRefPtr<Document>& elem) 152 WebDocument& WebDocument::operator=(const PassRefPtr<Document>& elem)
147 { 153 {
148 m_private = elem; 154 m_private = elem;
149 return *this; 155 return *this;
150 } 156 }
151 157
152 WebDocument::operator PassRefPtr<Document>() const 158 WebDocument::operator PassRefPtr<Document>() const
153 { 159 {
154 return toDocument(m_private.get()); 160 return toDocument(m_private.get());
155 } 161 }
156 162
157 } // namespace blink 163 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/public/web/WebDocument.h ('k') | sky/engine/web/WebRuntimeFeatures.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698