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

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

Issue 2510353004: Deprecating AutoplayExperimentHelper (Closed)
Patch Set: cleaned up the layout code no longer used 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 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after
1299 } 1299 }
1300 1300
1301 void FrameView::invalidatePaintIfNeeded( 1301 void FrameView::invalidatePaintIfNeeded(
1302 const PaintInvalidationState& paintInvalidationState) { 1302 const PaintInvalidationState& paintInvalidationState) {
1303 RELEASE_ASSERT(!layoutViewItem().isNull()); 1303 RELEASE_ASSERT(!layoutViewItem().isNull());
1304 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) 1304 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled())
1305 invalidatePaintOfScrollControlsIfNeeded(paintInvalidationState); 1305 invalidatePaintOfScrollControlsIfNeeded(paintInvalidationState);
1306 1306
1307 if (m_frame->selection().isCaretBoundsDirty()) 1307 if (m_frame->selection().isCaretBoundsDirty())
1308 m_frame->selection().invalidateCaretRect(); 1308 m_frame->selection().invalidateCaretRect();
1309
1310 // Temporary callback for crbug.com/487345,402044
1311 // TODO(ojan): Make this more general to be used by PositionObserver
1312 // and rAF throttling.
1313 IntRect visibleRect = rootFrameToContents(computeVisibleArea());
1314 layoutViewItem().sendMediaPositionChangeNotifications(visibleRect);
1315 } 1309 }
1316 1310
1317 IntRect FrameView::computeVisibleArea() { 1311 IntRect FrameView::computeVisibleArea() {
1318 // Return our clipping bounds in the root frame. 1312 // Return our clipping bounds in the root frame.
1319 IntRect us(frameRect()); 1313 IntRect us(frameRect());
1320 if (FrameView* parent = parentFrameView()) { 1314 if (FrameView* parent = parentFrameView()) {
1321 us = parent->contentsToRootFrame(us); 1315 us = parent->contentsToRootFrame(us);
1322 IntRect parentRect = parent->computeVisibleArea(); 1316 IntRect parentRect = parent->computeVisibleArea();
1323 if (parentRect.isEmpty()) 1317 if (parentRect.isEmpty())
1324 return IntRect(); 1318 return IntRect();
(...skipping 3322 matching lines...) Expand 10 before | Expand all | Expand 10 after
4647 DCHECK(m_frame->isMainFrame()); 4641 DCHECK(m_frame->isMainFrame());
4648 return m_initialViewportSize.width(); 4642 return m_initialViewportSize.width();
4649 } 4643 }
4650 4644
4651 int FrameView::initialViewportHeight() const { 4645 int FrameView::initialViewportHeight() const {
4652 DCHECK(m_frame->isMainFrame()); 4646 DCHECK(m_frame->isMainFrame());
4653 return m_initialViewportSize.height(); 4647 return m_initialViewportSize.height();
4654 } 4648 }
4655 4649
4656 } // namespace blink 4650 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698