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

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

Issue 1158323005: Include 'outline' in LayoutSVGBlock::visualOverflowRect (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Move fix to layout-side. Created 5 years, 6 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 | « Source/core/layout/svg/LayoutSVGBlock.cpp ('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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 checkLayoutAttributesConsistency(this, m_layoutAttributes); 362 checkLayoutAttributesConsistency(this, m_layoutAttributes);
363 363
364 // Reduced version of LayoutBlock::layoutBlock(), which only takes care of S VG text. 364 // Reduced version of LayoutBlock::layoutBlock(), which only takes care of S VG text.
365 // All if branches that could cause early exit in LayoutBlocks layoutBlock() method are turned into assertions. 365 // All if branches that could cause early exit in LayoutBlocks layoutBlock() method are turned into assertions.
366 ASSERT(!isInline()); 366 ASSERT(!isInline());
367 ASSERT(!simplifiedLayout()); 367 ASSERT(!simplifiedLayout());
368 ASSERT(!scrollsOverflow()); 368 ASSERT(!scrollsOverflow());
369 ASSERT(!hasControlClip()); 369 ASSERT(!hasControlClip());
370 ASSERT(!hasColumns()); 370 ASSERT(!hasColumns());
371 ASSERT(!positionedObjects()); 371 ASSERT(!positionedObjects());
372 ASSERT(!m_overflow);
373 ASSERT(!isAnonymousBlock()); 372 ASSERT(!isAnonymousBlock());
374 373
375 if (!firstChild()) 374 if (!firstChild())
376 setChildrenInline(true); 375 setChildrenInline(true);
377 376
378 // FIXME: We need to find a way to only layout the child boxes, if needed. 377 // FIXME: We need to find a way to only layout the child boxes, if needed.
379 FloatRect oldBoundaries = objectBoundingBox(); 378 FloatRect oldBoundaries = objectBoundingBox();
380 ASSERT(childrenInline()); 379 ASSERT(childrenInline());
381 380
382 rebuildFloatsFromIntruding(); 381 rebuildFloatsFromIntruding();
383 382
384 LayoutUnit beforeEdge = borderBefore() + paddingBefore(); 383 LayoutUnit beforeEdge = borderBefore() + paddingBefore();
385 LayoutUnit afterEdge = borderAfter() + paddingAfter() + scrollbarLogicalHeig ht(); 384 LayoutUnit afterEdge = borderAfter() + paddingAfter() + scrollbarLogicalHeig ht();
386 setLogicalHeight(beforeEdge); 385 setLogicalHeight(beforeEdge);
387 386
388 LayoutState state(*this, locationOffset()); 387 LayoutState state(*this, locationOffset());
389 LayoutUnit paintInvalidationLogicalTop = 0; 388 LayoutUnit paintInvalidationLogicalTop = 0;
390 LayoutUnit paintInvalidationLogicalBottom = 0; 389 LayoutUnit paintInvalidationLogicalBottom = 0;
391 layoutInlineChildren(true, paintInvalidationLogicalTop, paintInvalidationLog icalBottom, afterEdge); 390 layoutInlineChildren(true, paintInvalidationLogicalTop, paintInvalidationLog icalBottom, afterEdge);
392 391
393 if (m_needsReordering) 392 if (m_needsReordering)
394 m_needsReordering = false; 393 m_needsReordering = false;
395 394
396 // If we don't have any line boxes, then make sure the frame rect is still c leared. 395 // If we don't have any line boxes, then make sure the frame rect is still c leared.
397 if (!firstLineBox()) 396 if (!firstLineBox())
398 setFrameRect(LayoutRect()); 397 setFrameRect(LayoutRect());
399 398
399 m_overflow.clear();
400 addVisualEffectOverflow();
chrishtr 2015/06/04 16:57:03 So now LayoutSVGBlock inherits behavior from Layou
fs 2015/06/05 09:01:47 If the derived class does not override that in any
401
400 if (!updateCachedBoundariesInParents) 402 if (!updateCachedBoundariesInParents)
401 updateCachedBoundariesInParents = oldBoundaries != objectBoundingBox(); 403 updateCachedBoundariesInParents = oldBoundaries != objectBoundingBox();
402 404
403 // Invalidate all resources of this client if our layout changed. 405 // Invalidate all resources of this client if our layout changed.
404 if (everHadLayout() && selfNeedsLayout()) 406 if (everHadLayout() && selfNeedsLayout())
405 SVGResourcesCache::clientLayoutChanged(this); 407 SVGResourcesCache::clientLayoutChanged(this);
406 408
407 // If our bounds changed, notify the parents. 409 // If our bounds changed, notify the parents.
408 if (updateCachedBoundariesInParents) 410 if (updateCachedBoundariesInParents)
409 LayoutSVGBlock::setNeedsBoundariesUpdate(); 411 LayoutSVGBlock::setNeedsBoundariesUpdate();
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 SVGResourcesCache::clientWillBeRemovedFromTree(child); 507 SVGResourcesCache::clientWillBeRemovedFromTree(child);
506 508
507 Vector<SVGTextLayoutAttributes*, 2> affectedAttributes; 509 Vector<SVGTextLayoutAttributes*, 2> affectedAttributes;
508 FontCachePurgePreventer fontCachePurgePreventer; 510 FontCachePurgePreventer fontCachePurgePreventer;
509 subtreeChildWillBeRemoved(child, affectedAttributes); 511 subtreeChildWillBeRemoved(child, affectedAttributes);
510 LayoutSVGBlock::removeChild(child); 512 LayoutSVGBlock::removeChild(child);
511 subtreeChildWasRemoved(affectedAttributes); 513 subtreeChildWasRemoved(affectedAttributes);
512 } 514 }
513 515
514 } 516 }
OLDNEW
« no previous file with comments | « Source/core/layout/svg/LayoutSVGBlock.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698