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

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

Issue 1955423004: Include selection rect in paint invalidation for LayoutText. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to head and add one test. Created 4 years, 7 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 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Dirk Mueller (mueller@kde.org) 3 * (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net)
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
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 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after
1571 if (!style()->isHorizontalWritingMode()) 1571 if (!style()->isHorizontalWritingMode())
1572 rect = rect.transposedRect(); 1572 rect = rect.transposedRect();
1573 return rect; 1573 return rect;
1574 } 1574 }
1575 1575
1576 LayoutRect LayoutText::localOverflowRectForPaintInvalidation() const 1576 LayoutRect LayoutText::localOverflowRectForPaintInvalidation() const
1577 { 1577 {
1578 if (style()->visibility() != VISIBLE) 1578 if (style()->visibility() != VISIBLE)
1579 return LayoutRect(); 1579 return LayoutRect();
1580 1580
1581 return visualOverflowRect(); 1581 return unionRect(visualOverflowRect(), localSelectionRect());
1582 } 1582 }
1583 1583
1584 LayoutRect LayoutText::localSelectionRect() const 1584 LayoutRect LayoutText::localSelectionRect() const
1585 { 1585 {
1586 ASSERT(!needsLayout()); 1586 ASSERT(!needsLayout());
1587 1587
1588 if (getSelectionState() == SelectionNone) 1588 if (getSelectionState() == SelectionNone)
1589 return LayoutRect(); 1589 return LayoutRect();
1590 LayoutBlock* cb = containingBlock(); 1590 LayoutBlock* cb = containingBlock();
1591 if (!cb) 1591 if (!cb)
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
1699 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) { 1699 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) {
1700 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box, in validationReason); 1700 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box, in validationReason);
1701 if (box->truncation() != cNoTruncation) { 1701 if (box->truncation() != cNoTruncation) {
1702 if (EllipsisBox* ellipsisBox = box->root().ellipsisBox()) 1702 if (EllipsisBox* ellipsisBox = box->root().ellipsisBox())
1703 paintInvalidationContainer.invalidateDisplayItemClientOnBacking( *ellipsisBox, invalidationReason); 1703 paintInvalidationContainer.invalidateDisplayItemClientOnBacking( *ellipsisBox, invalidationReason);
1704 } 1704 }
1705 } 1705 }
1706 } 1706 }
1707 1707
1708 } // namespace blink 1708 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | third_party/WebKit/Source/core/paint/BoxClipper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698