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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBlock.cpp

Issue 2007003003: Check subtree paint invalidation when overflow clip status changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 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
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) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 } 238 }
239 239
240 void LayoutBlock::updateFromStyle() 240 void LayoutBlock::updateFromStyle()
241 { 241 {
242 LayoutBox::updateFromStyle(); 242 LayoutBox::updateFromStyle();
243 243
244 bool shouldClipOverflow = !styleRef().isOverflowVisible() && allowsOverflowC lip(); 244 bool shouldClipOverflow = !styleRef().isOverflowVisible() && allowsOverflowC lip();
245 if (shouldClipOverflow != hasOverflowClip()) { 245 if (shouldClipOverflow != hasOverflowClip()) {
246 if (!shouldClipOverflow) 246 if (!shouldClipOverflow)
247 getScrollableArea()->invalidateAllStickyConstraints(); 247 getScrollableArea()->invalidateAllStickyConstraints();
248 for (LayoutObject* child = firstChild(); child; child = child->nextSibli ng()) 248 setMayNeedPaintInvalidationSubtree();
249 child->setMayNeedPaintInvalidation();
250 } 249 }
251 setHasOverflowClip(shouldClipOverflow); 250 setHasOverflowClip(shouldClipOverflow);
252 } 251 }
253 252
254 bool LayoutBlock::allowsOverflowClip() const 253 bool LayoutBlock::allowsOverflowClip() const
255 { 254 {
256 // If overflow has been propagated to the viewport, it has no effect here. 255 // If overflow has been propagated to the viewport, it has no effect here.
257 return node() != document().viewportDefiningElement(); 256 return node() != document().viewportDefiningElement();
258 } 257 }
259 258
(...skipping 1655 matching lines...) Expand 10 before | Expand all | Expand 10 after
1915 for (TrackedLayoutBoxListHashSet::const_iterator it = positionedDescenda ntSet->begin(); it != end; ++it) { 1914 for (TrackedLayoutBoxListHashSet::const_iterator it = positionedDescenda ntSet->begin(); it != end; ++it) {
1916 LayoutBox* currBox = *it; 1915 LayoutBox* currBox = *it;
1917 ASSERT(!currBox->needsLayout()); 1916 ASSERT(!currBox->needsLayout());
1918 } 1917 }
1919 } 1918 }
1920 } 1919 }
1921 1920
1922 #endif 1921 #endif
1923 1922
1924 } // namespace blink 1923 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698