| OLD | NEW |
| 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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 } | 468 } |
| 469 quads.append(localToAbsoluteQuad(FloatRect(r))); | 469 quads.append(localToAbsoluteQuad(FloatRect(r))); |
| 470 } else { | 470 } else { |
| 471 FloatRect rect = localQuadForTextBox(box, start, end, useSelectionHe
ight); | 471 FloatRect rect = localQuadForTextBox(box, start, end, useSelectionHe
ight); |
| 472 if (!rect.isZero()) | 472 if (!rect.isZero()) |
| 473 quads.append(localToAbsoluteQuad(rect)); | 473 quads.append(localToAbsoluteQuad(rect)); |
| 474 } | 474 } |
| 475 } | 475 } |
| 476 } | 476 } |
| 477 | 477 |
| 478 FloatRect LayoutText::localBoundingBoxRectForAccessibility() const |
| 479 { |
| 480 FloatRect result; |
| 481 Vector<FloatQuad> quads; |
| 482 this->quads(quads, LayoutText::ClipToEllipsis, LayoutText::LocalQuads); |
| 483 for (const FloatQuad& quad : quads) |
| 484 result.unite(quad.boundingBox()); |
| 485 return result; |
| 486 } |
| 487 |
| 478 enum ShouldAffinityBeDownstream { AlwaysDownstream, AlwaysUpstream, UpstreamIfPo
sitionIsNotAtStart }; | 488 enum ShouldAffinityBeDownstream { AlwaysDownstream, AlwaysUpstream, UpstreamIfPo
sitionIsNotAtStart }; |
| 479 | 489 |
| 480 static bool lineDirectionPointFitsInBox(int pointLineDirection, InlineTextBox* b
ox, ShouldAffinityBeDownstream& shouldAffinityBeDownstream) | 490 static bool lineDirectionPointFitsInBox(int pointLineDirection, InlineTextBox* b
ox, ShouldAffinityBeDownstream& shouldAffinityBeDownstream) |
| 481 { | 491 { |
| 482 shouldAffinityBeDownstream = AlwaysDownstream; | 492 shouldAffinityBeDownstream = AlwaysDownstream; |
| 483 | 493 |
| 484 // the x coordinate is equal to the left edge of this box | 494 // the x coordinate is equal to the left edge of this box |
| 485 // the affinity must be downstream so the position doesn't jump back to the
previous line | 495 // the affinity must be downstream so the position doesn't jump back to the
previous line |
| 486 // except when box is the first box in the line | 496 // except when box is the first box in the line |
| 487 if (pointLineDirection <= box->logicalLeft()) { | 497 if (pointLineDirection <= box->logicalLeft()) { |
| (...skipping 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1757 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) { | 1767 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) { |
| 1758 paintInvalidator.invalidateDisplayItemClient(*box, invalidationReason); | 1768 paintInvalidator.invalidateDisplayItemClient(*box, invalidationReason); |
| 1759 if (box->truncation() != cNoTruncation) { | 1769 if (box->truncation() != cNoTruncation) { |
| 1760 if (EllipsisBox* ellipsisBox = box->root().ellipsisBox()) | 1770 if (EllipsisBox* ellipsisBox = box->root().ellipsisBox()) |
| 1761 paintInvalidator.invalidateDisplayItemClient(*ellipsisBox, inval
idationReason); | 1771 paintInvalidator.invalidateDisplayItemClient(*ellipsisBox, inval
idationReason); |
| 1762 } | 1772 } |
| 1763 } | 1773 } |
| 1764 } | 1774 } |
| 1765 | 1775 |
| 1766 } // namespace blink | 1776 } // namespace blink |
| OLD | NEW |