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

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

Issue 1164533005: Don't double-inflate visual overflow rect for LayoutInlines (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Touch up Tc. Created 5 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/fast/repaint/inline-outline-repaint-2-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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 return clippedOverflowRect(paintInvalidationContainer); 1044 return clippedOverflowRect(paintInvalidationContainer);
1045 } 1045 }
1046 1046
1047 LayoutRect LayoutInline::clippedOverflowRect(const LayoutBoxModelObject* paintIn validationContainer, const PaintInvalidationState* paintInvalidationState) const 1047 LayoutRect LayoutInline::clippedOverflowRect(const LayoutBoxModelObject* paintIn validationContainer, const PaintInvalidationState* paintInvalidationState) const
1048 { 1048 {
1049 const LayoutBoxModelObject* continuation = this->continuation(); 1049 const LayoutBoxModelObject* continuation = this->continuation();
1050 if ((!firstLineBoxIncludingCulling() && !continuation) || style()->visibilit y() != VISIBLE) 1050 if ((!firstLineBoxIncludingCulling() && !continuation) || style()->visibilit y() != VISIBLE)
1051 return LayoutRect(); 1051 return LayoutRect();
1052 1052
1053 LayoutRect overflowRect(linesVisualOverflowBoundingBox()); 1053 LayoutRect overflowRect(linesVisualOverflowBoundingBox());
1054 mapRectToPaintInvalidationBacking(paintInvalidationContainer, overflowRect, paintInvalidationState);
1054 1055
1055 LayoutUnit outlineSize = style()->outlineSize(); 1056 LayoutUnit outlineSize = style()->outlineSize();
1056 overflowRect.inflate(outlineSize);
1057
1058 mapRectToPaintInvalidationBacking(paintInvalidationContainer, overflowRect, paintInvalidationState);
1059
1060 if (outlineSize) { 1057 if (outlineSize) {
1061 for (LayoutObject* curr = firstChild(); curr; curr = curr->nextSibling() ) { 1058 for (LayoutObject* curr = firstChild(); curr; curr = curr->nextSibling() ) {
1062 if (!curr->isText()) 1059 if (!curr->isText())
1063 overflowRect.unite(curr->rectWithOutlineForPaintInvalidation(pai ntInvalidationContainer, outlineSize)); 1060 overflowRect.unite(curr->rectWithOutlineForPaintInvalidation(pai ntInvalidationContainer, outlineSize));
1064 } 1061 }
1065 1062
1066 if (continuation && !continuation->isInline() && continuation->parent()) 1063 if (continuation && !continuation->isInline() && continuation->parent())
1067 overflowRect.unite(continuation->rectWithOutlineForPaintInvalidation (paintInvalidationContainer, outlineSize)); 1064 overflowRect.unite(continuation->rectWithOutlineForPaintInvalidation (paintInvalidationContainer, outlineSize));
1068 } 1065 }
1069 1066
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
1431 } 1428 }
1432 1429
1433 void LayoutInline::invalidateDisplayItemClients(const LayoutBoxModelObject& pain tInvalidationContainer) const 1430 void LayoutInline::invalidateDisplayItemClients(const LayoutBoxModelObject& pain tInvalidationContainer) const
1434 { 1431 {
1435 LayoutBoxModelObject::invalidateDisplayItemClients(paintInvalidationContaine r); 1432 LayoutBoxModelObject::invalidateDisplayItemClients(paintInvalidationContaine r);
1436 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox()) 1433 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox())
1437 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box); 1434 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box);
1438 } 1435 }
1439 1436
1440 } // namespace blink 1437 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/fast/repaint/inline-outline-repaint-2-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698