| 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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 // short-circuit on full-paint invalidation. | 330 // short-circuit on full-paint invalidation. |
| 331 LayoutRect dirtyRect = viewRect(); | 331 LayoutRect dirtyRect = viewRect(); |
| 332 if (doingFullPaintInvalidation() && !dirtyRect.isEmpty()) { | 332 if (doingFullPaintInvalidation() && !dirtyRect.isEmpty()) { |
| 333 const RenderLayerModelObject* paintInvalidationContainer = &paintInvalid
ationState.paintInvalidationContainer(); | 333 const RenderLayerModelObject* paintInvalidationContainer = &paintInvalid
ationState.paintInvalidationContainer(); |
| 334 mapRectToPaintInvalidationBacking(paintInvalidationContainer, dirtyRect,
&paintInvalidationState); | 334 mapRectToPaintInvalidationBacking(paintInvalidationContainer, dirtyRect,
&paintInvalidationState); |
| 335 invalidatePaintUsingContainer(paintInvalidationContainer, dirtyRect, Inv
alidationFull); | 335 invalidatePaintUsingContainer(paintInvalidationContainer, dirtyRect, Inv
alidationFull); |
| 336 } | 336 } |
| 337 RenderBlock::invalidateTreeIfNeeded(paintInvalidationState); | 337 RenderBlock::invalidateTreeIfNeeded(paintInvalidationState); |
| 338 } | 338 } |
| 339 | 339 |
| 340 void RenderView::invalidatePaintForRectangle(const LayoutRect& paintInvalidation
Rect) const | 340 void RenderView::invalidatePaintForRectangle(const LayoutRect& paintInvalidation
Rect, InvalidationReason invalidationReason) const |
| 341 { | 341 { |
| 342 ASSERT(!paintInvalidationRect.isEmpty()); | 342 ASSERT(!paintInvalidationRect.isEmpty()); |
| 343 | 343 |
| 344 if (document().printing() || !m_frameView) | 344 if (document().printing() || !m_frameView) |
| 345 return; | 345 return; |
| 346 | 346 |
| 347 ASSERT(layer()->compositingState() == PaintsIntoOwnBacking || !frame()->owne
rRenderer()); | 347 ASSERT(layer()->compositingState() == PaintsIntoOwnBacking || !frame()->owne
rRenderer()); |
| 348 | 348 |
| 349 if (layer()->compositingState() == PaintsIntoOwnBacking) { | 349 if (layer()->compositingState() == PaintsIntoOwnBacking) { |
| 350 setBackingNeedsPaintInvalidationInRect(paintInvalidationRect); | 350 setBackingNeedsPaintInvalidationInRect(paintInvalidationRect, invalidati
onReason); |
| 351 } else { | 351 } else { |
| 352 m_frameView->contentRectangleForPaintInvalidation(pixelSnappedIntRect(pa
intInvalidationRect)); | 352 m_frameView->contentRectangleForPaintInvalidation(pixelSnappedIntRect(pa
intInvalidationRect)); |
| 353 } | 353 } |
| 354 } | 354 } |
| 355 | 355 |
| 356 void RenderView::invalidatePaintForViewAndCompositedLayers() | 356 void RenderView::invalidatePaintForViewAndCompositedLayers() |
| 357 { | 357 { |
| 358 setShouldDoFullPaintInvalidation(true); | 358 setShouldDoFullPaintInvalidation(true); |
| 359 | 359 |
| 360 // The only way we know how to hit these ASSERTS below this point is via the
Chromium OS login screen. | 360 // The only way we know how to hit these ASSERTS below this point is via the
Chromium OS login screen. |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 897 return viewWidth(IncludeScrollbars) / scale; | 897 return viewWidth(IncludeScrollbars) / scale; |
| 898 } | 898 } |
| 899 | 899 |
| 900 double RenderView::layoutViewportHeight() const | 900 double RenderView::layoutViewportHeight() const |
| 901 { | 901 { |
| 902 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; | 902 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; |
| 903 return viewHeight(IncludeScrollbars) / scale; | 903 return viewHeight(IncludeScrollbars) / scale; |
| 904 } | 904 } |
| 905 | 905 |
| 906 } // namespace blink | 906 } // namespace blink |
| OLD | NEW |