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

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 layout tests 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
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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 481
482 if (style()->isFlippedBlocksWritingMode()) { 482 if (style()->isFlippedBlocksWritingMode()) {
483 // We have to flip by hand since the view's logical height has not been determined. We 483 // We have to flip by hand since the view's logical height has not been determined. We
484 // can use the viewport width and height. 484 // can use the viewport width and height.
485 if (style()->isHorizontalWritingMode()) 485 if (style()->isHorizontalWritingMode())
486 rect.setY(viewHeight() - rect.maxY()); 486 rect.setY(viewHeight() - rect.maxY());
487 else 487 else
488 rect.setX(viewWidth() - rect.maxX()); 488 rect.setX(viewWidth() - rect.maxX());
489 } 489 }
490 490
491 if (fixed && m_frameView) 491 if (fixed && m_frameView) {
492 rect.move(m_frameView->scrollOffsetForFixedPosition()); 492 rect.move(m_frameView->scrollOffsetForFixedPosition());
493 // If we have a pending scroll, invalidate the previous scroll position.
494 if (!m_frameView->pendingScrollDelta().isZero()) {
495 rect.move(-m_frameView->pendingScrollDelta());
496 }
497 }
493 498
494 // Apply our transform if we have one (because of full page zooming). 499 // Apply our transform if we have one (because of full page zooming).
495 if (!repaintContainer && layer() && layer()->transform()) 500 if (!repaintContainer && layer() && layer()->transform())
496 rect = layer()->transform()->mapRect(rect); 501 rect = layer()->transform()->mapRect(rect);
497 } 502 }
498 503
499 void RenderView::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumu latedOffset) const 504 void RenderView::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumu latedOffset) const
500 { 505 {
501 rects.append(pixelSnappedIntRect(accumulatedOffset, layer()->size())); 506 rects.append(pixelSnappedIntRect(accumulatedOffset, layer()->size()));
502 } 507 }
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 return viewWidth(IncludeScrollbars) / scale; 988 return viewWidth(IncludeScrollbars) / scale;
984 } 989 }
985 990
986 double RenderView::layoutViewportHeight() const 991 double RenderView::layoutViewportHeight() const
987 { 992 {
988 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; 993 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1;
989 return viewHeight(IncludeScrollbars) / scale; 994 return viewHeight(IncludeScrollbars) / scale;
990 } 995 }
991 996
992 } // namespace WebCore 997 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698