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

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

Issue 1330993002: Invalidate all non-composited descendants on fixed-position changes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Higher expectations Created 5 years, 3 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
« no previous file with comments | « LayoutTests/platform/mac/fast/forms/submit/submit-focus-by-mouse-then-keydown-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 if (const DeprecatedPaintLayer* paintInvalidationLayer = enclosingLayer- >enclosingLayerForPaintInvalidationCrossingFrameBoundaries()) 1186 if (const DeprecatedPaintLayer* paintInvalidationLayer = enclosingLayer- >enclosingLayerForPaintInvalidationCrossingFrameBoundaries())
1187 paintInvalidationLayer->layoutObject()->invalidateDisplayItemClientO nBacking(displayItemClient); 1187 paintInvalidationLayer->layoutObject()->invalidateDisplayItemClientO nBacking(displayItemClient);
1188 } 1188 }
1189 } 1189 }
1190 1190
1191 void LayoutObject::invalidateDisplayItemClients(const LayoutBoxModelObject& pain tInvalidationContainer) const 1191 void LayoutObject::invalidateDisplayItemClients(const LayoutBoxModelObject& pain tInvalidationContainer) const
1192 { 1192 {
1193 ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled()); 1193 ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled());
1194 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*this); 1194 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*this);
1195 1195
1196 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) 1196 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
1197 enclosingLayer()->setNeedsRepaint(); 1197 if (DeprecatedPaintLayer* enclosingLayer = this->enclosingLayer())
1198 enclosingLayer->setNeedsRepaint();
1199 }
1198 } 1200 }
1199 1201
1200 LayoutRect LayoutObject::boundsRectForPaintInvalidation(const LayoutBoxModelObje ct* paintInvalidationContainer, const PaintInvalidationState* paintInvalidationS tate) const 1202 LayoutRect LayoutObject::boundsRectForPaintInvalidation(const LayoutBoxModelObje ct* paintInvalidationContainer, const PaintInvalidationState* paintInvalidationS tate) const
1201 { 1203 {
1202 if (!paintInvalidationContainer) 1204 if (!paintInvalidationContainer)
1203 return computePaintInvalidationRect(paintInvalidationContainer, paintInv alidationState); 1205 return computePaintInvalidationRect(paintInvalidationContainer, paintInv alidationState);
1204 return DeprecatedPaintLayer::computePaintInvalidationRect(this, paintInvalid ationContainer->layer(), paintInvalidationState); 1206 return DeprecatedPaintLayer::computePaintInvalidationRect(this, paintInvalid ationContainer->layer(), paintInvalidationState);
1205 } 1207 }
1206 1208
1207 const LayoutBoxModelObject* LayoutObject::invalidatePaintRectangleInternal(const LayoutRect& r) const 1209 const LayoutBoxModelObject* LayoutObject::invalidatePaintRectangleInternal(const LayoutRect& r) const
(...skipping 2099 matching lines...) Expand 10 before | Expand all | Expand 10 after
3307 DisableCompositingQueryAsserts disabler; 3309 DisableCompositingQueryAsserts disabler;
3308 const DeprecatedPaintLayer* paintInvalidationLayer = enclosingLayer->enclosi ngLayerForPaintInvalidationCrossingFrameBoundaries(); 3310 const DeprecatedPaintLayer* paintInvalidationLayer = enclosingLayer->enclosi ngLayerForPaintInvalidationCrossingFrameBoundaries();
3309 if (!paintInvalidationLayer) 3311 if (!paintInvalidationLayer)
3310 return; 3312 return;
3311 3313
3312 class Functor : public LayoutObjectTraversalFunctor { 3314 class Functor : public LayoutObjectTraversalFunctor {
3313 public: 3315 public:
3314 explicit Functor(const LayoutBoxModelObject& paintInvalidationContainer) : m_paintInvalidationContainer(paintInvalidationContainer) { } 3316 explicit Functor(const LayoutBoxModelObject& paintInvalidationContainer) : m_paintInvalidationContainer(paintInvalidationContainer) { }
3315 void operator()(LayoutObject& object) const override 3317 void operator()(LayoutObject& object) const override
3316 { 3318 {
3317 m_paintInvalidationContainer.invalidateDisplayItemClientOnBacking(ob ject); 3319 object.invalidateDisplayItemClients(m_paintInvalidationContainer);
3318 } 3320 }
3319 private: 3321 private:
3320 const LayoutBoxModelObject& m_paintInvalidationContainer; 3322 const LayoutBoxModelObject& m_paintInvalidationContainer;
3321 }; 3323 };
3322 3324
3323 const LayoutBoxModelObject& paintInvalidationContainer = *paintInvalidationL ayer->layoutObject(); 3325 const LayoutBoxModelObject& paintInvalidationContainer = *paintInvalidationL ayer->layoutObject();
3324 traverseNonCompositingDescendants(const_cast<LayoutObject&>(object), Functor (paintInvalidationContainer)); 3326 traverseNonCompositingDescendants(const_cast<LayoutObject&>(object), Functor (paintInvalidationContainer));
3325 } 3327 }
3326 3328
3327 void LayoutObject::invalidatePaintIncludingNonCompositingDescendants() 3329 void LayoutObject::invalidatePaintIncludingNonCompositingDescendants()
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
3405 const blink::LayoutObject* root = object1; 3407 const blink::LayoutObject* root = object1;
3406 while (root->parent()) 3408 while (root->parent())
3407 root = root->parent(); 3409 root = root->parent();
3408 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3410 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3409 } else { 3411 } else {
3410 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3412 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3411 } 3413 }
3412 } 3414 }
3413 3415
3414 #endif 3416 #endif
OLDNEW
« no previous file with comments | « LayoutTests/platform/mac/fast/forms/submit/submit-focus-by-mouse-then-keydown-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698