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

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

Issue 1817693002: Support edge-inclusive intersections in mapToVisibleRectInAncestorSpace (Closed) Base URL: https://chromium.googlesource.com/chromium/src@intersection-observer-idle-callback
Patch Set: compiler warning fix Created 4 years, 9 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 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after
1572 rect = rect.transposedRect(); 1572 rect = rect.transposedRect();
1573 return rect; 1573 return rect;
1574 } 1574 }
1575 1575
1576 LayoutRect LayoutText::clippedOverflowRectForPaintInvalidation(const LayoutBoxMo delObject* paintInvalidationContainer, const PaintInvalidationState* paintInvali dationState) const 1576 LayoutRect LayoutText::clippedOverflowRectForPaintInvalidation(const LayoutBoxMo delObject* paintInvalidationContainer, const PaintInvalidationState* paintInvali dationState) const
1577 { 1577 {
1578 if (style()->visibility() != VISIBLE) 1578 if (style()->visibility() != VISIBLE)
1579 return LayoutRect(); 1579 return LayoutRect();
1580 1580
1581 LayoutRect paintInvalidationRect(visualOverflowRect()); 1581 LayoutRect paintInvalidationRect(visualOverflowRect());
1582 mapToVisibleRectInAncestorSpace(paintInvalidationContainer, paintInvalidatio nRect, paintInvalidationState); 1582 mapToVisibleRectInAncestorSpace(paintInvalidationContainer, paintInvalidatio nRect, paintInvalidationState, false);
1583 return paintInvalidationRect; 1583 return paintInvalidationRect;
1584 } 1584 }
1585 1585
1586 LayoutRect LayoutText::selectionRectForPaintInvalidation(const LayoutBoxModelObj ect* paintInvalidationContainer) const 1586 LayoutRect LayoutText::selectionRectForPaintInvalidation(const LayoutBoxModelObj ect* paintInvalidationContainer) const
1587 { 1587 {
1588 ASSERT(!needsLayout()); 1588 ASSERT(!needsLayout());
1589 1589
1590 if (getSelectionState() == SelectionNone) 1590 if (getSelectionState() == SelectionNone)
1591 return LayoutRect(); 1591 return LayoutRect();
1592 LayoutBlock* cb = containingBlock(); 1592 LayoutBlock* cb = containingBlock();
(...skipping 18 matching lines...) Expand all
1611 LayoutRect rect; 1611 LayoutRect rect;
1612 1612
1613 if (startPos == endPos) 1613 if (startPos == endPos)
1614 return rect; 1614 return rect;
1615 1615
1616 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) { 1616 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) {
1617 rect.unite(box->localSelectionRect(startPos, endPos)); 1617 rect.unite(box->localSelectionRect(startPos, endPos));
1618 rect.unite(LayoutRect(ellipsisRectForBox(box, startPos, endPos))); 1618 rect.unite(LayoutRect(ellipsisRectForBox(box, startPos, endPos)));
1619 } 1619 }
1620 1620
1621 mapToVisibleRectInAncestorSpace(paintInvalidationContainer, rect, 0); 1621 mapToVisibleRectInAncestorSpace(paintInvalidationContainer, rect, 0, false);
1622 // FIXME: groupedMapping() leaks the squashing abstraction. 1622 // FIXME: groupedMapping() leaks the squashing abstraction.
1623 if (paintInvalidationContainer->layer()->groupedMapping()) 1623 if (paintInvalidationContainer->layer()->groupedMapping())
1624 PaintLayer::mapRectToPaintBackingCoordinates(paintInvalidationContainer, rect); 1624 PaintLayer::mapRectToPaintBackingCoordinates(paintInvalidationContainer, rect);
1625 return rect; 1625 return rect;
1626 } 1626 }
1627 1627
1628 int LayoutText::caretMinOffset() const 1628 int LayoutText::caretMinOffset() const
1629 { 1629 {
1630 InlineTextBox* box = firstTextBox(); 1630 InlineTextBox* box = firstTextBox();
1631 if (!box) 1631 if (!box)
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1751 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) { 1751 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) {
1752 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box, in validationReason); 1752 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box, in validationReason);
1753 if (box->truncation() != cNoTruncation) { 1753 if (box->truncation() != cNoTruncation) {
1754 if (EllipsisBox* ellipsisBox = box->root().ellipsisBox()) 1754 if (EllipsisBox* ellipsisBox = box->root().ellipsisBox())
1755 paintInvalidationContainer.invalidateDisplayItemClientOnBacking( *ellipsisBox, invalidationReason); 1755 paintInvalidationContainer.invalidateDisplayItemClientOnBacking( *ellipsisBox, invalidationReason);
1756 } 1756 }
1757 } 1757 }
1758 } 1758 }
1759 1759
1760 } // namespace blink 1760 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698