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

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

Issue 2539693002: Early-out from the prepaint tree walk (Closed)
Patch Set: Do not force subtree updates for all paint invalidation reasons, add todo to track paint offset cha… 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 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 if (m_frame->selection().isCaretBoundsDirty()) 1293 if (m_frame->selection().isCaretBoundsDirty())
1294 m_frame->selection().invalidateCaretRect(); 1294 m_frame->selection().invalidateCaretRect();
1295 1295
1296 // Temporary callback for crbug.com/487345,402044 1296 // Temporary callback for crbug.com/487345,402044
1297 // TODO(ojan): Make this more general to be used by PositionObserver 1297 // TODO(ojan): Make this more general to be used by PositionObserver
1298 // and rAF throttling. 1298 // and rAF throttling.
1299 IntRect visibleRect = rootFrameToContents(computeVisibleArea()); 1299 IntRect visibleRect = rootFrameToContents(computeVisibleArea());
1300 layoutViewItem().sendMediaPositionChangeNotifications(visibleRect); 1300 layoutViewItem().sendMediaPositionChangeNotifications(visibleRect);
1301 } 1301 }
1302 1302
1303 void FrameView::setNeedsPaintPropertyUpdate() {
1304 m_needsPaintPropertyUpdate = true;
1305 if (LayoutObject* owner = frame().ownerLayoutObject())
1306 owner->setDescendantNeedsPaintPropertyUpdate();
1307 }
1308
1303 IntRect FrameView::computeVisibleArea() { 1309 IntRect FrameView::computeVisibleArea() {
1304 // Return our clipping bounds in the root frame. 1310 // Return our clipping bounds in the root frame.
1305 IntRect us(frameRect()); 1311 IntRect us(frameRect());
1306 if (FrameView* parent = parentFrameView()) { 1312 if (FrameView* parent = parentFrameView()) {
1307 us = parent->contentsToRootFrame(us); 1313 us = parent->contentsToRootFrame(us);
1308 IntRect parentRect = parent->computeVisibleArea(); 1314 IntRect parentRect = parent->computeVisibleArea();
1309 if (parentRect.isEmpty()) 1315 if (parentRect.isEmpty())
1310 return IntRect(); 1316 return IntRect();
1311 1317
1312 us.intersect(parentRect); 1318 us.intersect(parentRect);
(...skipping 3338 matching lines...) Expand 10 before | Expand all | Expand 10 after
4651 DCHECK(m_frame->isMainFrame()); 4657 DCHECK(m_frame->isMainFrame());
4652 return m_initialViewportSize.width(); 4658 return m_initialViewportSize.width();
4653 } 4659 }
4654 4660
4655 int FrameView::initialViewportHeight() const { 4661 int FrameView::initialViewportHeight() const {
4656 DCHECK(m_frame->isMainFrame()); 4662 DCHECK(m_frame->isMainFrame());
4657 return m_initialViewportSize.height(); 4663 return m_initialViewportSize.height();
4658 } 4664 }
4659 4665
4660 } // namespace blink 4666 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698