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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutRubyBase.cpp

Issue 1991763002: Remove LayoutBlock::deleteLineBoxTree(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 return; 112 return;
113 113
114 if (toBase->childrenInline()) 114 if (toBase->childrenInline())
115 toBase->makeChildrenNonInline(); 115 toBase->makeChildrenNonInline();
116 116
117 // If an anonymous block would be put next to another such block, then merge those. 117 // If an anonymous block would be put next to another such block, then merge those.
118 LayoutObject* firstChildHere = firstChild(); 118 LayoutObject* firstChildHere = firstChild();
119 LayoutObject* lastChildThere = toBase->lastChild(); 119 LayoutObject* lastChildThere = toBase->lastChild();
120 if (firstChildHere->isAnonymousBlock() && firstChildHere->childrenInline() 120 if (firstChildHere->isAnonymousBlock() && firstChildHere->childrenInline()
121 && lastChildThere && lastChildThere->isAnonymousBlock() && lastChildTher e->childrenInline()) { 121 && lastChildThere && lastChildThere->isAnonymousBlock() && lastChildTher e->childrenInline()) {
122 LayoutBlock* anonBlockHere = toLayoutBlock(firstChildHere); 122 LayoutBlockFlow* anonBlockHere = toLayoutBlockFlow(firstChildHere);
123 LayoutBlock* anonBlockThere = toLayoutBlock(lastChildThere); 123 LayoutBlockFlow* anonBlockThere = toLayoutBlockFlow(lastChildThere);
124 anonBlockHere->moveAllChildrenTo(anonBlockThere, anonBlockThere->childre n()); 124 anonBlockHere->moveAllChildrenTo(anonBlockThere, anonBlockThere->childre n());
125 anonBlockHere->deleteLineBoxTree(); 125 anonBlockHere->deleteLineBoxTree();
126 anonBlockHere->destroy(); 126 anonBlockHere->destroy();
127 } 127 }
128 // Move all remaining children normally. 128 // Move all remaining children normally.
129 moveChildrenTo(toBase, firstChild(), beforeChild); 129 moveChildrenTo(toBase, firstChild(), beforeChild);
130 } 130 }
131 131
132 ETextAlign LayoutRubyBase::textAlignmentForLine(bool /* endsWithSoftBreak */) co nst 132 ETextAlign LayoutRubyBase::textAlignmentForLine(bool /* endsWithSoftBreak */) co nst
133 { 133 {
(...skipping 11 matching lines...) Expand all
145 expansionOpportunityCount = maxCount; 145 expansionOpportunityCount = maxCount;
146 146
147 // Inset the ruby base by half the inter-ideograph expansion amount. 147 // Inset the ruby base by half the inter-ideograph expansion amount.
148 LayoutUnit inset = (logicalWidth - maxPreferredLogicalWidth) / (expansionOpp ortunityCount + 1); 148 LayoutUnit inset = (logicalWidth - maxPreferredLogicalWidth) / (expansionOpp ortunityCount + 1);
149 149
150 logicalLeft += inset / 2; 150 logicalLeft += inset / 2;
151 logicalWidth -= inset; 151 logicalWidth -= inset;
152 } 152 }
153 153
154 } // namespace blink 154 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutInline.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutRubyRun.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698