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

Side by Side Diff: Source/core/rendering/RenderView.cpp

Issue 191693002: Delay scrollContents until the next paint (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix nit Created 6 years, 9 months 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/platform/scroll/ScrollView.h » ('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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 469
470 if (style()->isFlippedBlocksWritingMode()) { 470 if (style()->isFlippedBlocksWritingMode()) {
471 // We have to flip by hand since the view's logical height has not been determined. We 471 // We have to flip by hand since the view's logical height has not been determined. We
472 // can use the viewport width and height. 472 // can use the viewport width and height.
473 if (style()->isHorizontalWritingMode()) 473 if (style()->isHorizontalWritingMode())
474 rect.setY(viewHeight() - rect.maxY()); 474 rect.setY(viewHeight() - rect.maxY());
475 else 475 else
476 rect.setX(viewWidth() - rect.maxX()); 476 rect.setX(viewWidth() - rect.maxX());
477 } 477 }
478 478
479 if (fixed && m_frameView) 479 if (fixed && m_frameView) {
480 rect.move(m_frameView->scrollOffsetForFixedPosition()); 480 rect.move(m_frameView->scrollOffsetForFixedPosition());
481 // If we have a pending scroll, invalidate the previous scroll position.
482 if (!m_frameView->pendingScrollDelta().isZero()) {
483 rect.move(-m_frameView->pendingScrollDelta());
484 }
485 }
481 486
482 // Apply our transform if we have one (because of full page zooming). 487 // Apply our transform if we have one (because of full page zooming).
483 if (!repaintContainer && layer() && layer()->transform()) 488 if (!repaintContainer && layer() && layer()->transform())
484 rect = layer()->transform()->mapRect(rect); 489 rect = layer()->transform()->mapRect(rect);
485 } 490 }
486 491
487 void RenderView::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumu latedOffset) const 492 void RenderView::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumu latedOffset) const
488 { 493 {
489 rects.append(pixelSnappedIntRect(accumulatedOffset, layer()->size())); 494 rects.append(pixelSnappedIntRect(accumulatedOffset, layer()->size()));
490 } 495 }
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 return viewWidth(IncludeScrollbars) / scale; 963 return viewWidth(IncludeScrollbars) / scale;
959 } 964 }
960 965
961 double RenderView::layoutViewportHeight() const 966 double RenderView::layoutViewportHeight() const
962 { 967 {
963 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; 968 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1;
964 return viewHeight(IncludeScrollbars) / scale; 969 return viewHeight(IncludeScrollbars) / scale;
965 } 970 }
966 971
967 } // namespace WebCore 972 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/platform/scroll/ScrollView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698