Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(395)

Side by Side Diff: Source/core/frame/FrameView.cpp

Issue 449723003: Simply rules for compositing fixed position elements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Moar dead code Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1286 // Fixed items should always have layers. 1286 // Fixed items should always have layers.
1287 ASSERT(renderer->hasLayer()); 1287 ASSERT(renderer->hasLayer());
1288 RenderLayer* layer = toRenderBoxModelObject(renderer)->layer(); 1288 RenderLayer* layer = toRenderBoxModelObject(renderer)->layer();
1289 1289
1290 // Layers that paint into their ancestor or into a grouped backing will still need 1290 // Layers that paint into their ancestor or into a grouped backing will still need
1291 // to apply a paint invalidation. If the layer paints into its own backi ng, then 1291 // to apply a paint invalidation. If the layer paints into its own backi ng, then
1292 // it does not need paint invalidation just to scroll. 1292 // it does not need paint invalidation just to scroll.
1293 if (layer->compositingState() == PaintsIntoOwnBacking) 1293 if (layer->compositingState() == PaintsIntoOwnBacking)
1294 continue; 1294 continue;
1295 1295
1296 if (layer->viewportConstrainedNotCompositedReason() == RenderLayer::NotC ompositedForBoundsOutOfView
1297 || layer->viewportConstrainedNotCompositedReason() == RenderLayer::N otCompositedForNoVisibleContent) {
1298 // Don't invalidate for invisible fixed layers.
1299 continue;
1300 }
1301
1302 if (layer->hasAncestorWithFilterOutsets()) { 1296 if (layer->hasAncestorWithFilterOutsets()) {
1303 // If the fixed layer has a blur/drop-shadow filter applied on at le ast one of its parents, we cannot 1297 // If the fixed layer has a blur/drop-shadow filter applied on at le ast one of its parents, we cannot
1304 // scroll using the fast path, otherwise the outsets of the filter w ill be moved around the page. 1298 // scroll using the fast path, otherwise the outsets of the filter w ill be moved around the page.
1305 return false; 1299 return false;
1306 } 1300 }
1307 1301
1308 IntRect updateRect = pixelSnappedIntRect(layer->repainter().repaintRectI ncludingNonCompositingDescendants()); 1302 IntRect updateRect = pixelSnappedIntRect(layer->repainter().repaintRectI ncludingNonCompositingDescendants());
1309 1303
1310 const RenderLayerModelObject* repaintContainer = layer->renderer()->cont ainerForPaintInvalidation(); 1304 const RenderLayerModelObject* repaintContainer = layer->renderer()->cont ainerForPaintInvalidation();
1311 if (repaintContainer && !repaintContainer->isRenderView()) { 1305 if (repaintContainer && !repaintContainer->isRenderView()) {
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
1599 1593
1600 // Fixed items should always have layers. 1594 // Fixed items should always have layers.
1601 ASSERT(renderer->hasLayer()); 1595 ASSERT(renderer->hasLayer());
1602 1596
1603 RenderLayer* layer = toRenderBoxModelObject(renderer)->layer(); 1597 RenderLayer* layer = toRenderBoxModelObject(renderer)->layer();
1604 1598
1605 // Don't need to do this for composited fixed items. 1599 // Don't need to do this for composited fixed items.
1606 if (layer->compositingState() == PaintsIntoOwnBacking) 1600 if (layer->compositingState() == PaintsIntoOwnBacking)
1607 continue; 1601 continue;
1608 1602
1609 // Also don't need to do this for invisible items.
1610 if (layer->viewportConstrainedNotCompositedReason() == RenderLayer::NotC ompositedForBoundsOutOfView
1611 || layer->viewportConstrainedNotCompositedReason() == RenderLayer::N otCompositedForNoVisibleContent)
1612 continue;
1613
1614 layer->repainter().computeRepaintRectsIncludingNonCompositingDescendants (); 1603 layer->repainter().computeRepaintRectsIncludingNonCompositingDescendants ();
1615 } 1604 }
1616 } 1605 }
1617 1606
1618 void FrameView::updateCompositedSelectionBoundsIfNeeded() 1607 void FrameView::updateCompositedSelectionBoundsIfNeeded()
1619 { 1608 {
1620 if (!RuntimeEnabledFeatures::compositedSelectionUpdatesEnabled()) 1609 if (!RuntimeEnabledFeatures::compositedSelectionUpdatesEnabled())
1621 return; 1610 return;
1622 1611
1623 Page* page = frame().page(); 1612 Page* page = frame().page();
(...skipping 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after
3207 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) 3196 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation)
3208 { 3197 {
3209 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); 3198 ScrollableArea::willRemoveScrollbar(scrollbar, orientation);
3210 if (AXObjectCache* cache = axObjectCache()) { 3199 if (AXObjectCache* cache = axObjectCache()) {
3211 cache->remove(scrollbar); 3200 cache->remove(scrollbar);
3212 cache->handleScrollbarUpdate(this); 3201 cache->handleScrollbarUpdate(this);
3213 } 3202 }
3214 } 3203 }
3215 3204
3216 } // namespace blink 3205 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698