| 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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 | 446 |
| 447 void RenderView::invalidatePaintForRectangle(const LayoutRect& paintInvalidation
Rect) const | 447 void RenderView::invalidatePaintForRectangle(const LayoutRect& paintInvalidation
Rect) const |
| 448 { | 448 { |
| 449 ASSERT(!paintInvalidationRect.isEmpty()); | 449 ASSERT(!paintInvalidationRect.isEmpty()); |
| 450 | 450 |
| 451 if (document().printing() || !m_frameView) | 451 if (document().printing() || !m_frameView) |
| 452 return; | 452 return; |
| 453 | 453 |
| 454 // We always just invalidate the root view, since we could be an iframe that
is clipped out | 454 // We always just invalidate the root view, since we could be an iframe that
is clipped out |
| 455 // or even invisible. | 455 // or even invisible. |
| 456 Element* owner = document().ownerElement(); | 456 HTMLFrameOwnerElement* owner = document().ownerElement(); |
| 457 if (layer()->compositingState() == PaintsIntoOwnBacking) { | 457 if (layer()->compositingState() == PaintsIntoOwnBacking) { |
| 458 layer()->paintInvalidator().setBackingNeedsPaintInvalidationInRect(paint
InvalidationRect); | 458 layer()->paintInvalidator().setBackingNeedsPaintInvalidationInRect(paint
InvalidationRect); |
| 459 } else if (!owner) { | 459 } else if (!owner) { |
| 460 m_frameView->contentRectangleForPaintInvalidation(pixelSnappedIntRect(pa
intInvalidationRect)); | 460 m_frameView->contentRectangleForPaintInvalidation(pixelSnappedIntRect(pa
intInvalidationRect)); |
| 461 } else if (RenderBox* obj = owner->renderBox()) { | 461 } else if (RenderBox* obj = owner->renderBox()) { |
| 462 // Intersect the viewport with the paint invalidation rect. | 462 // Intersect the viewport with the paint invalidation rect. |
| 463 LayoutRect viewRectangle = viewRect(); | 463 LayoutRect viewRectangle = viewRect(); |
| 464 LayoutRect rectToInvalidate = intersection(paintInvalidationRect, viewRe
ctangle); | 464 LayoutRect rectToInvalidate = intersection(paintInvalidationRect, viewRe
ctangle); |
| 465 | 465 |
| 466 // Adjust for scroll offset of the view. | 466 // Adjust for scroll offset of the view. |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 981 return viewWidth(IncludeScrollbars) / scale; | 981 return viewWidth(IncludeScrollbars) / scale; |
| 982 } | 982 } |
| 983 | 983 |
| 984 double RenderView::layoutViewportHeight() const | 984 double RenderView::layoutViewportHeight() const |
| 985 { | 985 { |
| 986 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; | 986 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; |
| 987 return viewHeight(IncludeScrollbars) / scale; | 987 return viewHeight(IncludeScrollbars) / scale; |
| 988 } | 988 } |
| 989 | 989 |
| 990 } // namespace blink | 990 } // namespace blink |
| OLD | NEW |