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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 // short-circuit on full-paint invalidation. | 399 // short-circuit on full-paint invalidation. |
400 LayoutRect dirtyRect = viewRect(); | 400 LayoutRect dirtyRect = viewRect(); |
401 if (doingFullPaintInvalidation() && !dirtyRect.isEmpty()) { | 401 if (doingFullPaintInvalidation() && !dirtyRect.isEmpty()) { |
402 const RenderLayerModelObject* paintInvalidationContainer = &paintInvalid
ationState.paintInvalidationContainer(); | 402 const RenderLayerModelObject* paintInvalidationContainer = &paintInvalid
ationState.paintInvalidationContainer(); |
403 mapRectToPaintInvalidationBacking(paintInvalidationContainer, dirtyRect,
&paintInvalidationState); | 403 mapRectToPaintInvalidationBacking(paintInvalidationContainer, dirtyRect,
&paintInvalidationState); |
404 invalidatePaintUsingContainer(paintInvalidationContainer, dirtyRect, Inv
alidationFull); | 404 invalidatePaintUsingContainer(paintInvalidationContainer, dirtyRect, Inv
alidationFull); |
405 } | 405 } |
406 RenderBlock::invalidateTreeIfNeeded(paintInvalidationState); | 406 RenderBlock::invalidateTreeIfNeeded(paintInvalidationState); |
407 } | 407 } |
408 | 408 |
409 void RenderView::invalidatePaintForRectangle(const LayoutRect& paintInvalidation
Rect) const | 409 void RenderView::invalidatePaintForRectangle(const LayoutRect& paintInvalidation
Rect, InvalidationReason invalidationReason) const |
410 { | 410 { |
411 ASSERT(!paintInvalidationRect.isEmpty()); | 411 ASSERT(!paintInvalidationRect.isEmpty()); |
412 | 412 |
413 if (document().printing() || !m_frameView) | 413 if (document().printing() || !m_frameView) |
414 return; | 414 return; |
415 | 415 |
416 ASSERT(layer()->compositingState() == PaintsIntoOwnBacking || !frame()->owne
rRenderer()); | 416 ASSERT(layer()->compositingState() == PaintsIntoOwnBacking || !frame()->owne
rRenderer()); |
417 | 417 |
418 if (layer()->compositingState() == PaintsIntoOwnBacking) { | 418 if (layer()->compositingState() == PaintsIntoOwnBacking) { |
419 setBackingNeedsPaintInvalidationInRect(paintInvalidationRect); | 419 setBackingNeedsPaintInvalidationInRect(paintInvalidationRect, invalidati
onReason); |
420 } else { | 420 } else { |
421 m_frameView->contentRectangleForPaintInvalidation(pixelSnappedIntRect(pa
intInvalidationRect)); | 421 m_frameView->contentRectangleForPaintInvalidation(pixelSnappedIntRect(pa
intInvalidationRect)); |
422 } | 422 } |
423 } | 423 } |
424 | 424 |
425 void RenderView::invalidatePaintForViewAndCompositedLayers() | 425 void RenderView::invalidatePaintForViewAndCompositedLayers() |
426 { | 426 { |
427 setShouldDoFullPaintInvalidation(true); | 427 setShouldDoFullPaintInvalidation(true); |
428 | 428 |
429 // The only way we know how to hit these ASSERTS below this point is via the
Chromium OS login screen. | 429 // 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... |
966 return viewWidth(IncludeScrollbars) / scale; | 966 return viewWidth(IncludeScrollbars) / scale; |
967 } | 967 } |
968 | 968 |
969 double RenderView::layoutViewportHeight() const | 969 double RenderView::layoutViewportHeight() const |
970 { | 970 { |
971 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; | 971 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; |
972 return viewHeight(IncludeScrollbars) / scale; | 972 return viewHeight(IncludeScrollbars) / scale; |
973 } | 973 } |
974 | 974 |
975 } // namespace blink | 975 } // namespace blink |
OLD | NEW |