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

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

Issue 1490063002: Implement Paint Containment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix merge Created 5 years 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 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 1000
1001 IntRect inflatedRect = pixelSnappedBorderBoxRect(); 1001 IntRect inflatedRect = pixelSnappedBorderBoxRect();
1002 LayoutTheme::theme().addVisualOverflow(*this, inflatedRect); 1002 LayoutTheme::theme().addVisualOverflow(*this, inflatedRect);
1003 addVisualOverflow(LayoutRect(inflatedRect)); 1003 addVisualOverflow(LayoutRect(inflatedRect));
1004 } 1004 }
1005 1005
1006 bool LayoutBlock::createsNewFormattingContext() const 1006 bool LayoutBlock::createsNewFormattingContext() const
1007 { 1007 {
1008 return isInlineBlockOrInlineTable() || isFloatingOrOutOfFlowPositioned() || hasOverflowClip() || isFlexItemIncludingDeprecated() 1008 return isInlineBlockOrInlineTable() || isFloatingOrOutOfFlowPositioned() || hasOverflowClip() || isFlexItemIncludingDeprecated()
1009 || style()->specifiesColumns() || isLayoutFlowThread() || isTableCell() || isTableCaption() || isFieldset() || isWritingModeRoot() 1009 || style()->specifiesColumns() || isLayoutFlowThread() || isTableCell() || isTableCaption() || isFieldset() || isWritingModeRoot()
1010 || isDocumentElement() || isColumnSpanAll() || isGridItem(); 1010 || isDocumentElement() || isColumnSpanAll() || isGridItem() || style()-> containsPaint();
1011 } 1011 }
1012 1012
1013 void LayoutBlock::updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, L ayoutBox& child) 1013 void LayoutBlock::updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, L ayoutBox& child)
1014 { 1014 {
1015 if (child.isOutOfFlowPositioned()) { 1015 if (child.isOutOfFlowPositioned()) {
1016 // It's rather useless to mark out-of-flow children at this point. We ma y not be their 1016 // It's rather useless to mark out-of-flow children at this point. We ma y not be their
1017 // containing block (and if we are, it's just pure luck), so this would be the wrong place 1017 // containing block (and if we are, it's just pure luck), so this would be the wrong place
1018 // for it. Furthermore, it would cause trouble for out-of-flow descendan ts of column 1018 // for it. Furthermore, it would cause trouble for out-of-flow descendan ts of column
1019 // spanners, if the containing block is outside the spanner but inside t he multicol container. 1019 // spanners, if the containing block is outside the spanner but inside t he multicol container.
1020 return; 1020 return;
(...skipping 1871 matching lines...) Expand 10 before | Expand all | Expand 10 after
2892 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const 2892 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const
2893 { 2893 {
2894 showLayoutObject(); 2894 showLayoutObject();
2895 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 2895 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
2896 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 2896 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
2897 } 2897 }
2898 2898
2899 #endif 2899 #endif
2900 2900
2901 } // namespace blink 2901 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698