OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
5 * 2000 Simon Hausmann <hausmann@kde.org> | 5 * 2000 Simon Hausmann <hausmann@kde.org> |
6 * 2000 Stefan Schimanski <1Stein@gmx.de> | 6 * 2000 Stefan Schimanski <1Stein@gmx.de> |
7 * 2001 George Staikos <staikos@kde.org> | 7 * 2001 George Staikos <staikos@kde.org> |
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> | 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> |
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 ASSERT_ARG(widget, widget); | 304 ASSERT_ARG(widget, widget); |
305 | 305 |
306 if (RenderWidget* renderer = RenderWidget::find(widget)) { | 306 if (RenderWidget* renderer = RenderWidget::find(widget)) { |
307 if (Node* node = renderer->node()) | 307 if (Node* node = renderer->node()) |
308 return node->document().frame(); | 308 return node->document().frame(); |
309 } | 309 } |
310 | 310 |
311 // Assume all widgets are either a FrameView or owned by a RenderWidget. | 311 // Assume all widgets are either a FrameView or owned by a RenderWidget. |
312 // FIXME: That assumption is not right for scroll bars! | 312 // FIXME: That assumption is not right for scroll bars! |
313 ASSERT_WITH_SECURITY_IMPLICATION(widget->isFrameView()); | 313 ASSERT_WITH_SECURITY_IMPLICATION(widget->isFrameView()); |
314 return toFrameView(widget)->frame(); | 314 return &toFrameView(widget)->frame(); |
315 } | 315 } |
316 | 316 |
317 void Frame::clearTimers(FrameView *view, Document *document) | 317 void Frame::clearTimers(FrameView *view, Document *document) |
318 { | 318 { |
319 if (view) { | 319 if (view) { |
320 view->unscheduleRelayout(); | 320 view->unscheduleRelayout(); |
321 if (view->frame()) { | 321 if (!RuntimeEnabledFeatures::webAnimationsCSSEnabled()) |
322 if (!RuntimeEnabledFeatures::webAnimationsCSSEnabled()) | 322 view->frame().animation()->suspendAnimationsForDocument(document); |
323 view->frame()->animation()->suspendAnimationsForDocument(documen
t); | 323 view->frame().eventHandler()->stopAutoscrollTimer(); |
324 view->frame()->eventHandler()->stopAutoscrollTimer(); | |
325 } | |
326 } | 324 } |
327 } | 325 } |
328 | 326 |
329 void Frame::clearTimers() | 327 void Frame::clearTimers() |
330 { | 328 { |
331 clearTimers(m_view.get(), document()); | 329 clearTimers(m_view.get(), document()); |
332 } | 330 } |
333 | 331 |
334 void Frame::dispatchVisibilityStateChangeEvent() | 332 void Frame::dispatchVisibilityStateChangeEvent() |
335 { | 333 { |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
710 if (!m_page) | 708 if (!m_page) |
711 return 0; | 709 return 0; |
712 | 710 |
713 double ratio = m_page->deviceScaleFactor(); | 711 double ratio = m_page->deviceScaleFactor(); |
714 if (RuntimeEnabledFeatures::devicePixelRatioIncludesZoomEnabled()) | 712 if (RuntimeEnabledFeatures::devicePixelRatioIncludesZoomEnabled()) |
715 ratio *= pageZoomFactor(); | 713 ratio *= pageZoomFactor(); |
716 return ratio; | 714 return ratio; |
717 } | 715 } |
718 | 716 |
719 } // namespace WebCore | 717 } // namespace WebCore |
OLD | NEW |