Chromium Code Reviews| 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 292 { | 292 { |
| 293 ASSERT(!needsLayout()); | 293 ASSERT(!needsLayout()); |
| 294 | 294 |
| 295 // We specifically need to issue paint invalidations for the viewRect since other renderers | 295 // We specifically need to issue paint invalidations for the viewRect since other renderers |
| 296 // short-circuit on full-paint invalidation. | 296 // short-circuit on full-paint invalidation. |
| 297 LayoutRect dirtyRect = viewRect(); | 297 LayoutRect dirtyRect = viewRect(); |
| 298 if (doingFullPaintInvalidation() && !dirtyRect.isEmpty()) { | 298 if (doingFullPaintInvalidation() && !dirtyRect.isEmpty()) { |
| 299 const RenderLayerModelObject* paintInvalidationContainer = &paintInvalid ationState.paintInvalidationContainer(); | 299 const RenderLayerModelObject* paintInvalidationContainer = &paintInvalid ationState.paintInvalidationContainer(); |
| 300 mapRectToPaintInvalidationBacking(paintInvalidationContainer, dirtyRect, &paintInvalidationState); | 300 mapRectToPaintInvalidationBacking(paintInvalidationContainer, dirtyRect, &paintInvalidationState); |
| 301 invalidatePaintUsingContainer(paintInvalidationContainer, dirtyRect, Inv alidationFull); | 301 invalidatePaintUsingContainer(paintInvalidationContainer, dirtyRect, Inv alidationFull); |
| 302 | |
| 303 // Also need to handle iframes, since they have a separate view outside | |
| 304 // the hierarchy. | |
| 305 for (auto& iframe: m_iframes) | |
| 306 iframe->invalidateWidgetBounds(); | |
|
esprehn
2014/11/17 19:04:32
We don't always repaint if you move, for example i
| |
| 302 } | 307 } |
| 303 RenderBlock::invalidateTreeIfNeeded(paintInvalidationState); | 308 RenderBlock::invalidateTreeIfNeeded(paintInvalidationState); |
| 304 } | 309 } |
| 305 | 310 |
| 306 void RenderView::invalidatePaintForRectangle(const LayoutRect& paintInvalidation Rect) const | 311 void RenderView::invalidatePaintForRectangle(const LayoutRect& paintInvalidation Rect) const |
| 307 { | 312 { |
| 308 ASSERT(!paintInvalidationRect.isEmpty()); | 313 ASSERT(!paintInvalidationRect.isEmpty()); |
| 309 | 314 |
| 310 if (!m_frameView) | 315 if (!m_frameView) |
| 311 return; | 316 return; |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 747 { | 752 { |
| 748 return viewWidth(IncludeScrollbars); | 753 return viewWidth(IncludeScrollbars); |
| 749 } | 754 } |
| 750 | 755 |
| 751 // FIXME(sky): remove | 756 // FIXME(sky): remove |
| 752 double RenderView::layoutViewportHeight() const | 757 double RenderView::layoutViewportHeight() const |
| 753 { | 758 { |
| 754 return viewHeight(IncludeScrollbars); | 759 return viewHeight(IncludeScrollbars); |
| 755 } | 760 } |
| 756 | 761 |
| 762 void RenderView::addIFrame(RenderIFrame* iframe) | |
| 763 { | |
| 764 m_iframes.add(iframe); | |
| 765 } | |
| 766 | |
| 767 void RenderView::removeIFrame(RenderIFrame* iframe) | |
| 768 { | |
| 769 m_iframes.remove(iframe); | |
| 770 } | |
| 771 | |
| 757 } // namespace blink | 772 } // namespace blink |
| OLD | NEW |