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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 if (document().printing() || !m_frameView) | 465 if (document().printing() || !m_frameView) |
466 return; | 466 return; |
467 | 467 |
468 // We always just invalidate the root view, since we could be an iframe that
is clipped out | 468 // We always just invalidate the root view, since we could be an iframe that
is clipped out |
469 // or even invisible. | 469 // or even invisible. |
470 Element* elt = document().ownerElement(); | 470 Element* elt = document().ownerElement(); |
471 if (!elt) { | 471 if (!elt) { |
472 if (hasLayer() && layer()->compositingState() == PaintsIntoOwnBacking) | 472 if (hasLayer() && layer()->compositingState() == PaintsIntoOwnBacking) |
473 layer()->repainter().setBackingNeedsRepaintInRect(ur); | 473 layer()->repainter().setBackingNeedsRepaintInRect(ur); |
474 else | 474 else |
475 m_frameView->repaintContentRectangle(pixelSnappedIntRect(ur)); | 475 m_frameView->contentRectangleForPaintInvalidation(pixelSnappedIntRec
t(ur)); |
476 } else if (RenderBox* obj = elt->renderBox()) { | 476 } else if (RenderBox* obj = elt->renderBox()) { |
477 LayoutRect vr = viewRect(); | 477 LayoutRect vr = viewRect(); |
478 LayoutRect r = intersection(ur, vr); | 478 LayoutRect r = intersection(ur, vr); |
479 | 479 |
480 // Subtract out the contentsX and contentsY offsets to get our coords wi
thin the viewing | 480 // Subtract out the contentsX and contentsY offsets to get our coords wi
thin the viewing |
481 // rectangle. | 481 // rectangle. |
482 r.moveBy(-vr.location()); | 482 r.moveBy(-vr.location()); |
483 | 483 |
484 // FIXME: Hardcoded offsets here are not good. | 484 // FIXME: Hardcoded offsets here are not good. |
485 r.moveBy(obj->contentBoxRect().location()); | 485 r.moveBy(obj->contentBoxRect().location()); |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1016 return viewWidth(IncludeScrollbars) / scale; | 1016 return viewWidth(IncludeScrollbars) / scale; |
1017 } | 1017 } |
1018 | 1018 |
1019 double RenderView::layoutViewportHeight() const | 1019 double RenderView::layoutViewportHeight() const |
1020 { | 1020 { |
1021 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; | 1021 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; |
1022 return viewHeight(IncludeScrollbars) / scale; | 1022 return viewHeight(IncludeScrollbars) / scale; |
1023 } | 1023 } |
1024 | 1024 |
1025 } // namespace WebCore | 1025 } // namespace WebCore |
OLD | NEW |