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

Side by Side Diff: Source/core/layout/svg/LayoutSVGText.cpp

Issue 1078193002: Clear LayoutSVGText's frame rect if no line boxes are produced (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/svg/text/text-bbox-of-empty-after-change.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 setLogicalHeight(beforeEdge); 388 setLogicalHeight(beforeEdge);
389 389
390 LayoutState state(*this, locationOffset()); 390 LayoutState state(*this, locationOffset());
391 LayoutUnit paintInvalidationLogicalTop = 0; 391 LayoutUnit paintInvalidationLogicalTop = 0;
392 LayoutUnit paintInvalidationLogicalBottom = 0; 392 LayoutUnit paintInvalidationLogicalBottom = 0;
393 layoutInlineChildren(true, paintInvalidationLogicalTop, paintInvalidationLog icalBottom, afterEdge); 393 layoutInlineChildren(true, paintInvalidationLogicalTop, paintInvalidationLog icalBottom, afterEdge);
394 394
395 if (m_needsReordering) 395 if (m_needsReordering)
396 m_needsReordering = false; 396 m_needsReordering = false;
397 397
398 // If we don't have any line boxes, then make sure the frame rect is still c leared.
399 if (!firstLineBox())
400 setFrameRect(LayoutRect());
401
398 if (!updateCachedBoundariesInParents) 402 if (!updateCachedBoundariesInParents)
399 updateCachedBoundariesInParents = oldBoundaries != objectBoundingBox(); 403 updateCachedBoundariesInParents = oldBoundaries != objectBoundingBox();
400 404
401 // Invalidate all resources of this client if our layout changed. 405 // Invalidate all resources of this client if our layout changed.
402 if (everHadLayout() && selfNeedsLayout()) 406 if (everHadLayout() && selfNeedsLayout())
403 SVGResourcesCache::clientLayoutChanged(this); 407 SVGResourcesCache::clientLayoutChanged(this);
404 408
405 // If our bounds changed, notify the parents. 409 // If our bounds changed, notify the parents.
406 if (updateCachedBoundariesInParents) 410 if (updateCachedBoundariesInParents)
407 LayoutSVGBlock::setNeedsBoundariesUpdate(); 411 LayoutSVGBlock::setNeedsBoundariesUpdate();
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 SVGResourcesCache::clientWillBeRemovedFromTree(child); 507 SVGResourcesCache::clientWillBeRemovedFromTree(child);
504 508
505 Vector<SVGTextLayoutAttributes*, 2> affectedAttributes; 509 Vector<SVGTextLayoutAttributes*, 2> affectedAttributes;
506 FontCachePurgePreventer fontCachePurgePreventer; 510 FontCachePurgePreventer fontCachePurgePreventer;
507 subtreeChildWillBeRemoved(child, affectedAttributes); 511 subtreeChildWillBeRemoved(child, affectedAttributes);
508 LayoutSVGBlock::removeChild(child); 512 LayoutSVGBlock::removeChild(child);
509 subtreeChildWasRemoved(affectedAttributes); 513 subtreeChildWasRemoved(affectedAttributes);
510 } 514 }
511 515
512 } 516 }
OLDNEW
« no previous file with comments | « LayoutTests/svg/text/text-bbox-of-empty-after-change.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698