| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. | 2 * Copyright (C) 2006 Apple Computer, Inc. |
| 3 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> | 3 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> |
| 4 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> | 4 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> |
| 5 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 5 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 6 * Copyright (C) 2008 Rob Buis <buis@kde.org> | 6 * Copyright (C) 2008 Rob Buis <buis@kde.org> |
| 7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
| 8 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved. | 8 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved. |
| 9 * Copyright (C) 2012 Google Inc. | 9 * Copyright (C) 2012 Google Inc. |
| 10 * | 10 * |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 const LayoutObject* start) { | 91 const LayoutObject* start) { |
| 92 return findTextRoot(start); | 92 return findTextRoot(start); |
| 93 } | 93 } |
| 94 | 94 |
| 95 static inline void collectDescendantTextNodes( | 95 static inline void collectDescendantTextNodes( |
| 96 LayoutSVGText& textRoot, | 96 LayoutSVGText& textRoot, |
| 97 Vector<LayoutSVGInlineText*>& descendantTextNodes) { | 97 Vector<LayoutSVGInlineText*>& descendantTextNodes) { |
| 98 for (LayoutObject* descendant = textRoot.firstChild(); descendant; | 98 for (LayoutObject* descendant = textRoot.firstChild(); descendant; |
| 99 descendant = descendant->nextInPreOrder(&textRoot)) { | 99 descendant = descendant->nextInPreOrder(&textRoot)) { |
| 100 if (descendant->isSVGInlineText()) | 100 if (descendant->isSVGInlineText()) |
| 101 descendantTextNodes.append(toLayoutSVGInlineText(descendant)); | 101 descendantTextNodes.push_back(toLayoutSVGInlineText(descendant)); |
| 102 } | 102 } |
| 103 } | 103 } |
| 104 | 104 |
| 105 void LayoutSVGText::invalidatePositioningValues( | 105 void LayoutSVGText::invalidatePositioningValues( |
| 106 LayoutInvalidationReasonForTracing reason) { | 106 LayoutInvalidationReasonForTracing reason) { |
| 107 m_descendantTextNodes.clear(); | 107 m_descendantTextNodes.clear(); |
| 108 setNeedsPositioningValuesUpdate(); | 108 setNeedsPositioningValuesUpdate(); |
| 109 setNeedsLayoutAndFullPaintInvalidation(reason); | 109 setNeedsLayoutAndFullPaintInvalidation(reason); |
| 110 } | 110 } |
| 111 | 111 |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 clippedPointInContents); | 339 clippedPointInContents); |
| 340 if (!closestBox) | 340 if (!closestBox) |
| 341 return createPositionWithAffinity(0); | 341 return createPositionWithAffinity(0); |
| 342 | 342 |
| 343 return closestBox->getLineLayoutItem().positionForPoint( | 343 return closestBox->getLineLayoutItem().positionForPoint( |
| 344 LayoutPoint(clippedPointInContents.x(), closestBox->y())); | 344 LayoutPoint(clippedPointInContents.x(), closestBox->y())); |
| 345 } | 345 } |
| 346 | 346 |
| 347 void LayoutSVGText::absoluteQuads(Vector<FloatQuad>& quads, | 347 void LayoutSVGText::absoluteQuads(Vector<FloatQuad>& quads, |
| 348 MapCoordinatesFlags mode) const { | 348 MapCoordinatesFlags mode) const { |
| 349 quads.append(localToAbsoluteQuad(strokeBoundingBox(), mode)); | 349 quads.push_back(localToAbsoluteQuad(strokeBoundingBox(), mode)); |
| 350 } | 350 } |
| 351 | 351 |
| 352 void LayoutSVGText::paint(const PaintInfo& paintInfo, | 352 void LayoutSVGText::paint(const PaintInfo& paintInfo, |
| 353 const LayoutPoint&) const { | 353 const LayoutPoint&) const { |
| 354 SVGTextPainter(*this).paint(paintInfo); | 354 SVGTextPainter(*this).paint(paintInfo); |
| 355 } | 355 } |
| 356 | 356 |
| 357 FloatRect LayoutSVGText::objectBoundingBox() const { | 357 FloatRect LayoutSVGText::objectBoundingBox() const { |
| 358 if (const RootInlineBox* box = firstRootBox()) | 358 if (const RootInlineBox* box = firstRootBox()) |
| 359 return FloatRect(box->frameRect()); | 359 return FloatRect(box->frameRect()); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 380 | 380 |
| 381 if (const ShadowList* textShadow = style()->textShadow()) | 381 if (const ShadowList* textShadow = style()->textShadow()) |
| 382 textShadow->adjustRectForShadow(visualRect); | 382 textShadow->adjustRectForShadow(visualRect); |
| 383 | 383 |
| 384 return visualRect; | 384 return visualRect; |
| 385 } | 385 } |
| 386 | 386 |
| 387 void LayoutSVGText::addOutlineRects(Vector<LayoutRect>& rects, | 387 void LayoutSVGText::addOutlineRects(Vector<LayoutRect>& rects, |
| 388 const LayoutPoint&, | 388 const LayoutPoint&, |
| 389 IncludeBlockVisualOverflowOrNot) const { | 389 IncludeBlockVisualOverflowOrNot) const { |
| 390 rects.append(LayoutRect(objectBoundingBox())); | 390 rects.push_back(LayoutRect(objectBoundingBox())); |
| 391 } | 391 } |
| 392 | 392 |
| 393 bool LayoutSVGText::isObjectBoundingBoxValid() const { | 393 bool LayoutSVGText::isObjectBoundingBoxValid() const { |
| 394 // If we don't have any line boxes, then consider the bbox invalid. | 394 // If we don't have any line boxes, then consider the bbox invalid. |
| 395 return firstLineBox(); | 395 return firstLineBox(); |
| 396 } | 396 } |
| 397 | 397 |
| 398 void LayoutSVGText::addChild(LayoutObject* child, LayoutObject* beforeChild) { | 398 void LayoutSVGText::addChild(LayoutObject* child, LayoutObject* beforeChild) { |
| 399 LayoutSVGBlock::addChild(child, beforeChild); | 399 LayoutSVGBlock::addChild(child, beforeChild); |
| 400 | 400 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 411 | 411 |
| 412 void LayoutSVGText::invalidateTreeIfNeeded( | 412 void LayoutSVGText::invalidateTreeIfNeeded( |
| 413 const PaintInvalidationState& paintInvalidationState) { | 413 const PaintInvalidationState& paintInvalidationState) { |
| 414 // TODO(wangxianzhu): Verify if the inherited | 414 // TODO(wangxianzhu): Verify if the inherited |
| 415 // LayoutBoxModelObject::invalidateTreeIfNeeded() | 415 // LayoutBoxModelObject::invalidateTreeIfNeeded() |
| 416 // is applicable here. If yes, remove this overriding method. | 416 // is applicable here. If yes, remove this overriding method. |
| 417 LayoutObject::invalidateTreeIfNeeded(paintInvalidationState); | 417 LayoutObject::invalidateTreeIfNeeded(paintInvalidationState); |
| 418 } | 418 } |
| 419 | 419 |
| 420 } // namespace blink | 420 } // namespace blink |
| OLD | NEW |