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

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

Issue 1610063002: Revert of Remove PaintInfo's paintingRoot (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 * Copyright (C) 2000 Dirk Mueller (mueller@kde.org) 3 * Copyright (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved.
5 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. 5 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 { 113 {
114 ReplacedPainter(*this).paint(paintInfo, paintOffset); 114 ReplacedPainter(*this).paint(paintInfo, paintOffset);
115 } 115 }
116 116
117 bool LayoutReplaced::shouldPaint(const PaintInfo& paintInfo, const LayoutPoint& paintOffset) const 117 bool LayoutReplaced::shouldPaint(const PaintInfo& paintInfo, const LayoutPoint& paintOffset) const
118 { 118 {
119 if (paintInfo.phase != PaintPhaseForeground && !shouldPaintSelfOutline(paint Info.phase) 119 if (paintInfo.phase != PaintPhaseForeground && !shouldPaintSelfOutline(paint Info.phase)
120 && paintInfo.phase != PaintPhaseSelection && paintInfo.phase != PaintPha seMask && paintInfo.phase != PaintPhaseClippingMask) 120 && paintInfo.phase != PaintPhaseSelection && paintInfo.phase != PaintPha seMask && paintInfo.phase != PaintPhaseClippingMask)
121 return false; 121 return false;
122 122
123 if (!paintInfo.shouldPaintWithinRoot(this))
124 return false;
125
123 // if we're invisible or haven't received a layout yet, then just bail. 126 // if we're invisible or haven't received a layout yet, then just bail.
124 if (style()->visibility() != VISIBLE) 127 if (style()->visibility() != VISIBLE)
125 return false; 128 return false;
126 129
127 LayoutRect paintRect(visualOverflowRect()); 130 LayoutRect paintRect(visualOverflowRect());
128 paintRect.unite(localSelectionRect()); 131 paintRect.unite(localSelectionRect());
129 paintRect.moveBy(paintOffset + location()); 132 paintRect.moveBy(paintOffset + location());
130 133
131 if (!paintInfo.cullRect().intersectsCullRect(paintRect)) 134 if (!paintInfo.cullRect().intersectsCullRect(paintRect))
132 return false; 135 return false;
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 // We only include the space below the baseline in our layer's cached paint invalidation rect if the 469 // We only include the space below the baseline in our layer's cached paint invalidation rect if the
467 // image is selected. Since the selection state has changed update the rect. 470 // image is selected. Since the selection state has changed update the rect.
468 if (hasLayer()) 471 if (hasLayer())
469 setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(containe rForPaintInvalidation())); 472 setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(containe rForPaintInvalidation()));
470 473
471 if (canUpdateSelectionOnRootLineBoxes()) 474 if (canUpdateSelectionOnRootLineBoxes())
472 inlineBoxWrapper()->root().setHasSelectedChildren(state != SelectionNone ); 475 inlineBoxWrapper()->root().setHasSelectedChildren(state != SelectionNone );
473 } 476 }
474 477
475 } 478 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | third_party/WebKit/Source/core/paint/BlockPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698