OLD | NEW |
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. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. |
5 * All rights reserved. | 5 * 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 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
751 toLayoutPoint(accumulatedOffset - containingBlock()->location())); | 751 toLayoutPoint(accumulatedOffset - containingBlock()->location())); |
752 } | 752 } |
753 } | 753 } |
754 } | 754 } |
755 | 755 |
756 namespace { | 756 namespace { |
757 | 757 |
758 class AbsoluteQuadsGeneratorContext { | 758 class AbsoluteQuadsGeneratorContext { |
759 public: | 759 public: |
760 AbsoluteQuadsGeneratorContext(const LayoutInline* layoutObject, | 760 AbsoluteQuadsGeneratorContext(const LayoutInline* layoutObject, |
761 Vector<FloatQuad>& quads) | 761 Vector<FloatQuad>& quads, |
762 : m_quads(quads), m_geometryMap() { | 762 MapCoordinatesFlags mode) |
| 763 : m_quads(quads), m_geometryMap(mode) { |
763 m_geometryMap.pushMappingsToAncestor(layoutObject, 0); | 764 m_geometryMap.pushMappingsToAncestor(layoutObject, 0); |
764 } | 765 } |
765 | 766 |
766 void operator()(const FloatRect& rect) { | 767 void operator()(const FloatRect& rect) { |
767 m_quads.append(m_geometryMap.absoluteRect(rect)); | 768 m_quads.append(m_geometryMap.absoluteRect(rect)); |
768 } | 769 } |
769 void operator()(const LayoutRect& rect) { operator()(FloatRect(rect)); } | 770 void operator()(const LayoutRect& rect) { operator()(FloatRect(rect)); } |
770 | 771 |
771 private: | 772 private: |
772 Vector<FloatQuad>& m_quads; | 773 Vector<FloatQuad>& m_quads; |
773 LayoutGeometryMap m_geometryMap; | 774 LayoutGeometryMap m_geometryMap; |
774 }; | 775 }; |
775 | 776 |
776 } // unnamed namespace | 777 } // unnamed namespace |
777 | 778 |
778 void LayoutInline::absoluteQuadsForSelf(Vector<FloatQuad>& quads) const { | 779 void LayoutInline::absoluteQuadsForSelf(Vector<FloatQuad>& quads, |
779 AbsoluteQuadsGeneratorContext context(this, quads); | 780 MapCoordinatesFlags mode) const { |
| 781 AbsoluteQuadsGeneratorContext context(this, quads, mode); |
780 generateLineBoxRects(context); | 782 generateLineBoxRects(context); |
781 if (quads.isEmpty()) | 783 if (quads.isEmpty()) |
782 context(FloatRect()); | 784 context(FloatRect()); |
783 } | 785 } |
784 | 786 |
785 LayoutPoint LayoutInline::firstLineBoxTopLeft() const { | 787 LayoutPoint LayoutInline::firstLineBoxTopLeft() const { |
786 if (InlineBox* firstBox = firstLineBoxIncludingCulling()) | 788 if (InlineBox* firstBox = firstLineBoxIncludingCulling()) |
787 return firstBox->location(); | 789 return firstBox->location(); |
788 return LayoutPoint(); | 790 return LayoutPoint(); |
789 } | 791 } |
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1512 paintInvalidator.invalidateDisplayItemClient(*box, invalidationReason); | 1514 paintInvalidator.invalidateDisplayItemClient(*box, invalidationReason); |
1513 } | 1515 } |
1514 | 1516 |
1515 // TODO(lunalu): Not to just dump 0, 0 as the x and y here | 1517 // TODO(lunalu): Not to just dump 0, 0 as the x and y here |
1516 LayoutRect LayoutInline::debugRect() const { | 1518 LayoutRect LayoutInline::debugRect() const { |
1517 IntRect linesBox = enclosingIntRect(linesBoundingBox()); | 1519 IntRect linesBox = enclosingIntRect(linesBoundingBox()); |
1518 return LayoutRect(IntRect(0, 0, linesBox.width(), linesBox.height())); | 1520 return LayoutRect(IntRect(0, 0, linesBox.width(), linesBox.height())); |
1519 } | 1521 } |
1520 | 1522 |
1521 } // namespace blink | 1523 } // namespace blink |
OLD | NEW |