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