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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2510353004: Deprecating AutoplayExperimentHelper (Closed)
Patch Set: rebased Created 4 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
OLDNEW
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 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 1274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 } 1285 }
1286 1286
1287 void FrameView::invalidatePaintIfNeeded( 1287 void FrameView::invalidatePaintIfNeeded(
1288 const PaintInvalidationState& paintInvalidationState) { 1288 const PaintInvalidationState& paintInvalidationState) {
1289 RELEASE_ASSERT(!layoutViewItem().isNull()); 1289 RELEASE_ASSERT(!layoutViewItem().isNull());
1290 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) 1290 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled())
1291 invalidatePaintOfScrollControlsIfNeeded(paintInvalidationState); 1291 invalidatePaintOfScrollControlsIfNeeded(paintInvalidationState);
1292 1292
1293 if (m_frame->selection().isCaretBoundsDirty()) 1293 if (m_frame->selection().isCaretBoundsDirty())
1294 m_frame->selection().invalidateCaretRect(); 1294 m_frame->selection().invalidateCaretRect();
1295
1296 // Temporary callback for crbug.com/487345,402044
1297 // TODO(ojan): Make this more general to be used by PositionObserver
1298 // and rAF throttling.
1299 IntRect visibleRect = rootFrameToContents(computeVisibleArea());
1300 layoutViewItem().sendMediaPositionChangeNotifications(visibleRect);
1301 } 1295 }
1302 1296
1303 IntRect FrameView::computeVisibleArea() { 1297 IntRect FrameView::computeVisibleArea() {
1304 // Return our clipping bounds in the root frame. 1298 // Return our clipping bounds in the root frame.
1305 IntRect us(frameRect()); 1299 IntRect us(frameRect());
1306 if (FrameView* parent = parentFrameView()) { 1300 if (FrameView* parent = parentFrameView()) {
1307 us = parent->contentsToRootFrame(us); 1301 us = parent->contentsToRootFrame(us);
1308 IntRect parentRect = parent->computeVisibleArea(); 1302 IntRect parentRect = parent->computeVisibleArea();
1309 if (parentRect.isEmpty()) 1303 if (parentRect.isEmpty())
1310 return IntRect(); 1304 return IntRect();
(...skipping 3340 matching lines...) Expand 10 before | Expand all | Expand 10 after
4651 DCHECK(m_frame->isMainFrame()); 4645 DCHECK(m_frame->isMainFrame());
4652 return m_initialViewportSize.width(); 4646 return m_initialViewportSize.width();
4653 } 4647 }
4654 4648
4655 int FrameView::initialViewportHeight() const { 4649 int FrameView::initialViewportHeight() const {
4656 DCHECK(m_frame->isMainFrame()); 4650 DCHECK(m_frame->isMainFrame());
4657 return m_initialViewportSize.height(); 4651 return m_initialViewportSize.height();
4658 } 4652 }
4659 4653
4660 } // namespace blink 4654 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/BUILD.gn ('k') | third_party/WebKit/Source/core/frame/Settings.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698