| 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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 { | 442 { |
| 443 ASSERT(!ur.isEmpty()); | 443 ASSERT(!ur.isEmpty()); |
| 444 | 444 |
| 445 if (document().printing() || !m_frameView) | 445 if (document().printing() || !m_frameView) |
| 446 return; | 446 return; |
| 447 | 447 |
| 448 // We always just invalidate the root view, since we could be an iframe that
is clipped out | 448 // We always just invalidate the root view, since we could be an iframe that
is clipped out |
| 449 // or even invisible. | 449 // or even invisible. |
| 450 Element* elt = document().ownerElement(); | 450 Element* elt = document().ownerElement(); |
| 451 if (!elt) | 451 if (!elt) |
| 452 m_frameView->repaintContentRectangle(pixelSnappedIntRect(ur)); | 452 m_frameView->invalidatedContentRectangleForPaint(pixelSnappedIntRect(ur)
); |
| 453 else if (RenderBox* obj = elt->renderBox()) { | 453 else if (RenderBox* obj = elt->renderBox()) { |
| 454 LayoutRect vr = viewRect(); | 454 LayoutRect vr = viewRect(); |
| 455 LayoutRect r = intersection(ur, vr); | 455 LayoutRect r = intersection(ur, vr); |
| 456 | 456 |
| 457 // Subtract out the contentsX and contentsY offsets to get our coords wi
thin the viewing | 457 // Subtract out the contentsX and contentsY offsets to get our coords wi
thin the viewing |
| 458 // rectangle. | 458 // rectangle. |
| 459 r.moveBy(-vr.location()); | 459 r.moveBy(-vr.location()); |
| 460 | 460 |
| 461 // FIXME: Hardcoded offsets here are not good. | 461 // FIXME: Hardcoded offsets here are not good. |
| 462 r.moveBy(obj->contentBoxRect().location()); | 462 r.moveBy(obj->contentBoxRect().location()); |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 993 return viewWidth(IncludeScrollbars) / scale; | 993 return viewWidth(IncludeScrollbars) / scale; |
| 994 } | 994 } |
| 995 | 995 |
| 996 double RenderView::layoutViewportHeight() const | 996 double RenderView::layoutViewportHeight() const |
| 997 { | 997 { |
| 998 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; | 998 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; |
| 999 return viewHeight(IncludeScrollbars) / scale; | 999 return viewHeight(IncludeScrollbars) / scale; |
| 1000 } | 1000 } |
| 1001 | 1001 |
| 1002 } // namespace WebCore | 1002 } // namespace WebCore |
| OLD | NEW |