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

Side by Side Diff: Source/core/layout/LayoutBoxModelObject.cpp

Issue 1110653003: [Reland] Correct fixed-position recording for Slimming Paint (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 years, 7 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 if (layer()) { 217 if (layer()) {
218 // FIXME: Ideally we shouldn't need this setter but we can't easily infe r an overflow-only layer 218 // FIXME: Ideally we shouldn't need this setter but we can't easily infe r an overflow-only layer
219 // from the style. 219 // from the style.
220 layer()->setLayerType(type); 220 layer()->setLayerType(type);
221 221
222 layer()->styleChanged(diff, oldStyle); 222 layer()->styleChanged(diff, oldStyle);
223 if (hadLayer && layer()->isSelfPaintingLayer() != layerWasSelfPainting) 223 if (hadLayer && layer()->isSelfPaintingLayer() != layerWasSelfPainting)
224 setChildNeedsLayout(); 224 setChildNeedsLayout();
225 } 225 }
226 226
227 // Fixed-position is painted using transform. In the case that the object
228 // gets the same layout after changing position property, although no
229 // re-raster (rect-based invalidation) is needed, display items should
230 // still update their paint offset.
231 if (RuntimeEnabledFeatures::slimmingPaintEnabled() && oldStyle) {
232 bool newStyleIsFixedPosition = style()->position() == FixedPosition;
233 bool oldStyleIsFixedPosition = oldStyle->position() == FixedPosition;
234 if (newStyleIsFixedPosition != oldStyleIsFixedPosition)
235 invalidateDisplayItemClientForNonCompositingDescendants();
236 }
237
227 if (FrameView *frameView = view()->frameView()) { 238 if (FrameView *frameView = view()->frameView()) {
228 bool newStyleIsViewportConstained = style()->hasViewportConstrainedPosit ion(); 239 bool newStyleIsViewportConstained = style()->hasViewportConstrainedPosit ion();
229 bool oldStyleIsViewportConstrained = oldStyle && oldStyle->hasViewportCo nstrainedPosition(); 240 bool oldStyleIsViewportConstrained = oldStyle && oldStyle->hasViewportCo nstrainedPosition();
230 if (newStyleIsViewportConstained != oldStyleIsViewportConstrained) { 241 if (newStyleIsViewportConstained != oldStyleIsViewportConstrained) {
231 if (newStyleIsViewportConstained && layer()) 242 if (newStyleIsViewportConstained && layer())
232 frameView->addViewportConstrainedObject(this); 243 frameView->addViewportConstrainedObject(this);
233 else 244 else
234 frameView->removeViewportConstrainedObject(this); 245 frameView->removeViewportConstrainedObject(this);
235 } 246 }
236 } 247 }
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); 924 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent());
914 for (LayoutObject* child = startChild; child && child != endChild; ) { 925 for (LayoutObject* child = startChild; child && child != endChild; ) {
915 // Save our next sibling as moveChildTo will clear it. 926 // Save our next sibling as moveChildTo will clear it.
916 LayoutObject* nextSibling = child->nextSibling(); 927 LayoutObject* nextSibling = child->nextSibling();
917 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); 928 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert);
918 child = nextSibling; 929 child = nextSibling;
919 } 930 }
920 } 931 }
921 932
922 } // namespace blink 933 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698