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

Side by Side Diff: Source/core/layout/LayoutObject.cpp

Issue 1209253006: Need to update first-line when font finish loading. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review issue fix and virtual suite rebaseline. Created 5 years, 5 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
« no previous file with comments | « Source/core/layout/LayoutObject.h ('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) 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) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1689 matching lines...) Expand 10 before | Expand all | Expand 10 after
1700 if (isImage() || isQuote()) { 1700 if (isImage() || isQuote()) {
1701 RefPtr<ComputedStyle> style = ComputedStyle::create(); 1701 RefPtr<ComputedStyle> style = ComputedStyle::create();
1702 style->inheritFrom(*pseudoStyle); 1702 style->inheritFrom(*pseudoStyle);
1703 setStyle(style.release()); 1703 setStyle(style.release());
1704 return; 1704 return;
1705 } 1705 }
1706 1706
1707 setStyle(pseudoStyle); 1707 setStyle(pseudoStyle);
1708 } 1708 }
1709 1709
1710 void LayoutObject::firstLineStyleDidChange(const ComputedStyle& oldStyle, const ComputedStyle& newStyle)
1711 {
1712 StyleDifference diff = oldStyle.visualInvalidationDiff(newStyle);
1713 if (diff.hasDifference()) {
1714 // TODO(rune@opera.com): We should use the diff to determine whether a r epaint vs. layout
1715 // is needed, but for now just assume a layout will be required. The dif f code
1716 // in LayoutObject::setStyle would need to be factored out so that it co uld be reused.
1717 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalida tionReason::StyleChange);
1718 }
1719 }
1720
1710 void LayoutObject::markContainingBlocksForOverflowRecalc() 1721 void LayoutObject::markContainingBlocksForOverflowRecalc()
1711 { 1722 {
1712 for (LayoutBlock* container = containingBlock(); container && !container->ch ildNeedsOverflowRecalcAfterStyleChange(); container = container->containingBlock ()) 1723 for (LayoutBlock* container = containingBlock(); container && !container->ch ildNeedsOverflowRecalcAfterStyleChange(); container = container->containingBlock ())
1713 container->setChildNeedsOverflowRecalcAfterStyleChange(true); 1724 container->setChildNeedsOverflowRecalcAfterStyleChange(true);
1714 } 1725 }
1715 1726
1716 void LayoutObject::setNeedsOverflowRecalcAfterStyleChange() 1727 void LayoutObject::setNeedsOverflowRecalcAfterStyleChange()
1717 { 1728 {
1718 bool neededRecalc = needsOverflowRecalcAfterStyleChange(); 1729 bool neededRecalc = needsOverflowRecalcAfterStyleChange();
1719 setSelfNeedsOverflowRecalcAfterStyleChange(true); 1730 setSelfNeedsOverflowRecalcAfterStyleChange(true);
(...skipping 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after
3254 const blink::LayoutObject* root = object1; 3265 const blink::LayoutObject* root = object1;
3255 while (root->parent()) 3266 while (root->parent())
3256 root = root->parent(); 3267 root = root->parent();
3257 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3268 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3258 } else { 3269 } else {
3259 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3270 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3260 } 3271 }
3261 } 3272 }
3262 3273
3263 #endif 3274 #endif
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698