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

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

Issue 1025213002: Begin tracking why layout is invalidated (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase 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 | « Source/core/layout/LayoutReplaced.cpp ('k') | Source/core/layout/LayoutTable.h » ('j') | 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) 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 ASSERT_ARG(toBase, toBase); 65 ASSERT_ARG(toBase, toBase);
66 66
67 if (beforeChild && beforeChild->parent() != this) 67 if (beforeChild && beforeChild->parent() != this)
68 beforeChild = splitAnonymousBoxesAroundChild(beforeChild); 68 beforeChild = splitAnonymousBoxesAroundChild(beforeChild);
69 69
70 if (childrenInline()) 70 if (childrenInline())
71 moveInlineChildren(toBase, beforeChild); 71 moveInlineChildren(toBase, beforeChild);
72 else 72 else
73 moveBlockChildren(toBase, beforeChild); 73 moveBlockChildren(toBase, beforeChild);
74 74
75 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); 75 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalidation Reason::Unknown);
76 toBase->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); 76 toBase->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInva lidationReason::Unknown);
77 } 77 }
78 78
79 void LayoutRubyBase::moveInlineChildren(LayoutRubyBase* toBase, LayoutObject* be foreChild) 79 void LayoutRubyBase::moveInlineChildren(LayoutRubyBase* toBase, LayoutObject* be foreChild)
80 { 80 {
81 ASSERT(childrenInline()); 81 ASSERT(childrenInline());
82 ASSERT_ARG(toBase, toBase); 82 ASSERT_ARG(toBase, toBase);
83 83
84 if (!firstChild()) 84 if (!firstChild())
85 return; 85 return;
86 86
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 return; 141 return;
142 142
143 // Inset the ruby base by half the inter-ideograph expansion amount. 143 // Inset the ruby base by half the inter-ideograph expansion amount.
144 float inset = (logicalWidth - maxPreferredLogicalWidth) / (expansionOpportun ityCount + 1); 144 float inset = (logicalWidth - maxPreferredLogicalWidth) / (expansionOpportun ityCount + 1);
145 145
146 logicalLeft += inset / 2; 146 logicalLeft += inset / 2;
147 logicalWidth -= inset; 147 logicalWidth -= inset;
148 } 148 }
149 149
150 } // namespace blink 150 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutReplaced.cpp ('k') | Source/core/layout/LayoutTable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698