| 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 return true; | 203 return true; |
| 204 | 204 |
| 205 if (height() != viewHeight()) { | 205 if (height() != viewHeight()) { |
| 206 if (RenderObject* backgroundRenderer = this->backgroundRenderer()) { | 206 if (RenderObject* backgroundRenderer = this->backgroundRenderer()) { |
| 207 // When background-attachment is 'fixed', we treat the viewport (ins
tead of the 'root' | 207 // When background-attachment is 'fixed', we treat the viewport (ins
tead of the 'root' |
| 208 // i.e. html or body) as the background positioning area, and we sho
uld full repaint | 208 // i.e. html or body) as the background positioning area, and we sho
uld full repaint |
| 209 // viewport resize if the background image is not composited and nee
ds full repaint on | 209 // viewport resize if the background image is not composited and nee
ds full repaint on |
| 210 // background positioning area resize. | 210 // background positioning area resize. |
| 211 if (!m_compositor || !m_compositor->needsFixedRootBackgroundLayer(la
yer())) { | 211 if (!m_compositor || !m_compositor->needsFixedRootBackgroundLayer(la
yer())) { |
| 212 if (backgroundRenderer->style()->hasFixedBackgroundImage() | 212 if (backgroundRenderer->style()->hasFixedBackgroundImage() |
| 213 && mustRepaintFillLayersOnHeightChange(*backgroundRenderer->
style()->backgroundLayers())) | 213 && mustInvalidateFillLayersPaintOnHeightChange(*backgroundRe
nderer->style()->backgroundLayers())) |
| 214 return true; | 214 return true; |
| 215 } | 215 } |
| 216 } | 216 } |
| 217 } | 217 } |
| 218 | 218 |
| 219 return false; | 219 return false; |
| 220 } | 220 } |
| 221 | 221 |
| 222 void RenderView::layout() | 222 void RenderView::layout() |
| 223 { | 223 { |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 { | 493 { |
| 494 paintInvalidationForWholeRenderer(); | 494 paintInvalidationForWholeRenderer(); |
| 495 | 495 |
| 496 // The only way we know how to hit these ASSERTS below this point is via the
Chromium OS login screen. | 496 // The only way we know how to hit these ASSERTS below this point is via the
Chromium OS login screen. |
| 497 DisableCompositingQueryAsserts disabler; | 497 DisableCompositingQueryAsserts disabler; |
| 498 | 498 |
| 499 if (compositor()->inCompositingMode()) | 499 if (compositor()->inCompositingMode()) |
| 500 compositor()->repaintCompositedLayers(); | 500 compositor()->repaintCompositedLayers(); |
| 501 } | 501 } |
| 502 | 502 |
| 503 void RenderView::mapRectToRepaintBacking(const RenderLayerModelObject* repaintCo
ntainer, LayoutRect& rect, bool fixed) const | 503 void RenderView::mapRectToPaintInvalidationBacking(const RenderLayerModelObject*
paintInvalidationContainer, LayoutRect& rect, bool fixed) const |
| 504 { | 504 { |
| 505 // If a container was specified, and was not 0 or the RenderView, | 505 // If a container was specified, and was not 0 or the RenderView, |
| 506 // then we should have found it by now. | 506 // then we should have found it by now. |
| 507 ASSERT_ARG(repaintContainer, !repaintContainer || repaintContainer == this); | 507 ASSERT_ARG(paintInvalidationContainer, !paintInvalidationContainer || paintI
nvalidationContainer == this); |
| 508 | 508 |
| 509 if (document().printing()) | 509 if (document().printing()) |
| 510 return; | 510 return; |
| 511 | 511 |
| 512 if (style()->isFlippedBlocksWritingMode()) { | 512 if (style()->isFlippedBlocksWritingMode()) { |
| 513 // We have to flip by hand since the view's logical height has not been
determined. We | 513 // We have to flip by hand since the view's logical height has not been
determined. We |
| 514 // can use the viewport width and height. | 514 // can use the viewport width and height. |
| 515 if (style()->isHorizontalWritingMode()) | 515 if (style()->isHorizontalWritingMode()) |
| 516 rect.setY(viewHeight() - rect.maxY()); | 516 rect.setY(viewHeight() - rect.maxY()); |
| 517 else | 517 else |
| 518 rect.setX(viewWidth() - rect.maxX()); | 518 rect.setX(viewWidth() - rect.maxX()); |
| 519 } | 519 } |
| 520 | 520 |
| 521 if (fixed && m_frameView) { | 521 if (fixed && m_frameView) { |
| 522 rect.move(m_frameView->scrollOffsetForFixedPosition()); | 522 rect.move(m_frameView->scrollOffsetForFixedPosition()); |
| 523 // If we have a pending scroll, invalidate the previous scroll position. | 523 // If we have a pending scroll, invalidate the previous scroll position. |
| 524 if (!m_frameView->pendingScrollDelta().isZero()) { | 524 if (!m_frameView->pendingScrollDelta().isZero()) { |
| 525 rect.move(-m_frameView->pendingScrollDelta()); | 525 rect.move(-m_frameView->pendingScrollDelta()); |
| 526 } | 526 } |
| 527 } | 527 } |
| 528 | 528 |
| 529 // Apply our transform if we have one (because of full page zooming). | 529 // Apply our transform if we have one (because of full page zooming). |
| 530 if (!repaintContainer && layer() && layer()->transform()) | 530 if (!paintInvalidationContainer && layer() && layer()->transform()) |
| 531 rect = layer()->transform()->mapRect(rect); | 531 rect = layer()->transform()->mapRect(rect); |
| 532 } | 532 } |
| 533 | 533 |
| 534 void RenderView::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumu
latedOffset) const | 534 void RenderView::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumu
latedOffset) const |
| 535 { | 535 { |
| 536 rects.append(pixelSnappedIntRect(accumulatedOffset, layer()->size())); | 536 rects.append(pixelSnappedIntRect(accumulatedOffset, layer()->size())); |
| 537 } | 537 } |
| 538 | 538 |
| 539 void RenderView::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) const | 539 void RenderView::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) const |
| 540 { | 540 { |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1018 return viewWidth(IncludeScrollbars) / scale; | 1018 return viewWidth(IncludeScrollbars) / scale; |
| 1019 } | 1019 } |
| 1020 | 1020 |
| 1021 double RenderView::layoutViewportHeight() const | 1021 double RenderView::layoutViewportHeight() const |
| 1022 { | 1022 { |
| 1023 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; | 1023 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; |
| 1024 return viewHeight(IncludeScrollbars) / scale; | 1024 return viewHeight(IncludeScrollbars) / scale; |
| 1025 } | 1025 } |
| 1026 | 1026 |
| 1027 } // namespace WebCore | 1027 } // namespace WebCore |
| OLD | NEW |