Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 489 | 489 |
| 490 if (style()->isFlippedBlocksWritingMode()) { | 490 if (style()->isFlippedBlocksWritingMode()) { |
| 491 // We have to flip by hand since the view's logical height has not been determined. We | 491 // We have to flip by hand since the view's logical height has not been determined. We |
| 492 // can use the viewport width and height. | 492 // can use the viewport width and height. |
| 493 if (style()->isHorizontalWritingMode()) | 493 if (style()->isHorizontalWritingMode()) |
| 494 rect.setY(viewHeight() - rect.maxY()); | 494 rect.setY(viewHeight() - rect.maxY()); |
| 495 else | 495 else |
| 496 rect.setX(viewWidth() - rect.maxX()); | 496 rect.setX(viewWidth() - rect.maxX()); |
| 497 } | 497 } |
| 498 | 498 |
| 499 if (fixed && m_frameView) | 499 if (fixed && m_frameView) { |
| 500 rect.move(m_frameView->scrollOffsetForFixedPosition()); | 500 rect.move(m_frameView->scrollOffsetForFixedPosition()); |
| 501 // If we're in the middle of scrolling, also invalidate the previous scr oll position. | |
|
abarth-chromium
2014/03/08 06:54:52
I might say that we have a pending scroll delta ra
ykyyip
2014/03/11 01:59:39
Done.
| |
| 502 if (!m_frameView->scrollDelta().isZero()) { | |
| 503 LayoutRect scrolledPrev = rect; | |
| 504 scrolledPrev.move(-m_frameView->scrollDelta()); | |
| 505 rect.unite(scrolledPrev); | |
| 506 } | |
| 507 } | |
| 501 | 508 |
| 502 // Apply our transform if we have one (because of full page zooming). | 509 // Apply our transform if we have one (because of full page zooming). |
| 503 if (!repaintContainer && layer() && layer()->transform()) | 510 if (!repaintContainer && layer() && layer()->transform()) |
| 504 rect = layer()->transform()->mapRect(rect); | 511 rect = layer()->transform()->mapRect(rect); |
| 505 } | 512 } |
| 506 | 513 |
| 507 void RenderView::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumu latedOffset) const | 514 void RenderView::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumu latedOffset) const |
| 508 { | 515 { |
| 509 rects.append(pixelSnappedIntRect(accumulatedOffset, layer()->size())); | 516 rects.append(pixelSnappedIntRect(accumulatedOffset, layer()->size())); |
| 510 } | 517 } |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 991 return viewWidth(IncludeScrollbars) / scale; | 998 return viewWidth(IncludeScrollbars) / scale; |
| 992 } | 999 } |
| 993 | 1000 |
| 994 double RenderView::layoutViewportHeight() const | 1001 double RenderView::layoutViewportHeight() const |
| 995 { | 1002 { |
| 996 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; | 1003 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; |
| 997 return viewHeight(IncludeScrollbars) / scale; | 1004 return viewHeight(IncludeScrollbars) / scale; |
| 998 } | 1005 } |
| 999 | 1006 |
| 1000 } // namespace WebCore | 1007 } // namespace WebCore |
| OLD | NEW |