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

Side by Side Diff: Source/core/rendering/RenderBlock.cpp

Issue 215503003: Reland text autosizing changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
OLDNEW
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 * (C) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 currCont->setContinuation(0); 337 currCont->setContinuation(0);
338 currCont->setStyle(newStyle); 338 currCont->setStyle(newStyle);
339 currCont->setContinuation(nextCont); 339 currCont->setContinuation(nextCont);
340 } 340 }
341 } 341 }
342 342
343 if (FastTextAutosizer* textAutosizer = document().fastTextAutosizer()) 343 if (FastTextAutosizer* textAutosizer = document().fastTextAutosizer())
344 textAutosizer->record(this); 344 textAutosizer->record(this);
345 345
346 propagateStyleToAnonymousChildren(true); 346 propagateStyleToAnonymousChildren(true);
347 m_lineHeight = -1; 347 invalidateLineHeight();
348 348
349 // It's possible for our border/padding to change, but for the overall logic al width of the block to 349 // It's possible for our border/padding to change, but for the overall logic al width of the block to
350 // end up being the same. We keep track of this change so in layoutBlock, we can know to set relayoutChildren=true. 350 // end up being the same. We keep track of this change so in layoutBlock, we can know to set relayoutChildren=true.
351 m_hasBorderOrPaddingLogicalWidthChanged = oldStyle && diff == StyleDifferenc eLayout && needsLayout() && borderOrPaddingLogicalWidthChanged(oldStyle, newStyl e); 351 m_hasBorderOrPaddingLogicalWidthChanged = oldStyle && diff == StyleDifferenc eLayout && needsLayout() && borderOrPaddingLogicalWidthChanged(oldStyle, newStyl e);
352 352
353 // If the style has unloaded images, want to notify the ResourceLoadPriority Optimizer so that 353 // If the style has unloaded images, want to notify the ResourceLoadPriority Optimizer so that
354 // network priorities can be set. 354 // network priorities can be set.
355 Vector<ImageResource*> images; 355 Vector<ImageResource*> images;
356 appendImagesFromStyle(images, *newStyle); 356 appendImagesFromStyle(images, *newStyle);
357 if (images.isEmpty()) 357 if (images.isEmpty())
(...skipping 4671 matching lines...) Expand 10 before | Expand all | Expand 10 after
5029 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const 5029 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const
5030 { 5030 {
5031 showRenderObject(); 5031 showRenderObject();
5032 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 5032 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
5033 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 5033 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
5034 } 5034 }
5035 5035
5036 #endif 5036 #endif
5037 5037
5038 } // namespace WebCore 5038 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698