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

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

Issue 1584903002: Improvement handling of background and outline paint phases (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@PaintPhaseRename
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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutTextControlSingleLine.cpp » ('j') | 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 * 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalidation Reason::SizeChanged); 109 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalidation Reason::SizeChanged);
110 } 110 }
111 111
112 void LayoutReplaced::paint(const PaintInfo& paintInfo, const LayoutPoint& paintO ffset) const 112 void LayoutReplaced::paint(const PaintInfo& paintInfo, const LayoutPoint& paintO ffset) const
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 && paintInfo.phase != PaintPhase Outline && paintInfo.phase != PaintPhaseSelfOutline 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)) 123 if (!paintInfo.shouldPaintWithinRoot(this))
124 return false; 124 return false;
125 125
126 // 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.
127 if (style()->visibility() != VISIBLE) 127 if (style()->visibility() != VISIBLE)
128 return false; 128 return false;
129 129
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 // 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
470 // 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.
471 if (hasLayer()) 471 if (hasLayer())
472 setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(containe rForPaintInvalidation())); 472 setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(containe rForPaintInvalidation()));
473 473
474 if (canUpdateSelectionOnRootLineBoxes()) 474 if (canUpdateSelectionOnRootLineBoxes())
475 inlineBoxWrapper()->root().setHasSelectedChildren(state != SelectionNone ); 475 inlineBoxWrapper()->root().setHasSelectedChildren(state != SelectionNone );
476 } 476 }
477 477
478 } 478 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutTextControlSingleLine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698