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 WTF::Vector<RenderIFrame*> iframes; | |
| 306 copyToVector(m_iframes, iframes); | |
| 307 for (size_t i = 0; i < iframes.size(); ++i) | |
|
esprehn
2014/11/14 21:46:08
You don't need to copy to a Vector, there's no syn
Matt Perry
2014/11/14 22:03:34
Done.
| |
| 308 iframes[i]->invalidateWidgetBounds(); | |
| 302 } | 309 } |
| 303 RenderBlock::invalidateTreeIfNeeded(paintInvalidationState); | 310 RenderBlock::invalidateTreeIfNeeded(paintInvalidationState); |
| 304 } | 311 } |
| 305 | 312 |
| 306 void RenderView::invalidatePaintForRectangle(const LayoutRect& paintInvalidation Rect) const | 313 void RenderView::invalidatePaintForRectangle(const LayoutRect& paintInvalidation Rect) const |
| 307 { | 314 { |
| 308 ASSERT(!paintInvalidationRect.isEmpty()); | 315 ASSERT(!paintInvalidationRect.isEmpty()); |
| 309 | 316 |
| 310 if (!m_frameView) | 317 if (!m_frameView) |
| 311 return; | 318 return; |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 747 { | 754 { |
| 748 return viewWidth(IncludeScrollbars); | 755 return viewWidth(IncludeScrollbars); |
| 749 } | 756 } |
| 750 | 757 |
| 751 // FIXME(sky): remove | 758 // FIXME(sky): remove |
| 752 double RenderView::layoutViewportHeight() const | 759 double RenderView::layoutViewportHeight() const |
| 753 { | 760 { |
| 754 return viewHeight(IncludeScrollbars); | 761 return viewHeight(IncludeScrollbars); |
| 755 } | 762 } |
| 756 | 763 |
| 764 void RenderView::addIFrame(RenderIFrame* iframe) | |
| 765 { | |
| 766 m_iframes.add(iframe); | |
| 767 } | |
| 768 | |
| 769 void RenderView::removeIFrame(RenderIFrame* iframe) | |
| 770 { | |
| 771 m_iframes.remove(iframe); | |
| 772 } | |
| 773 | |
| 757 } // namespace blink | 774 } // namespace blink |
| OLD | NEW |