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

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

Issue 1952613002: Move LayoutDeprecatedFlexibleBox-specific line handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Const all the things! 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 1916 matching lines...) Expand 10 before | Expand all | Expand 10 after
1927 } 1927 }
1928 1928
1929 void LayoutBlockFlow::deleteLineBoxTree() 1929 void LayoutBlockFlow::deleteLineBoxTree()
1930 { 1930 {
1931 if (containsFloats()) 1931 if (containsFloats())
1932 m_floatingObjects->clearLineBoxTreePointers(); 1932 m_floatingObjects->clearLineBoxTreePointers();
1933 1933
1934 m_lineBoxes.deleteLineBoxTree(); 1934 m_lineBoxes.deleteLineBoxTree();
1935 } 1935 }
1936 1936
1937 int LayoutBlockFlow::lineCount(const RootInlineBox* stopRootInlineBox) const
1938 {
1939 #ifndef NDEBUG
1940 ASSERT(!stopRootInlineBox || stopRootInlineBox->block().debugPointer() == th is);
1941 #endif
1942 if (!childrenInline())
1943 return 0;
1944
1945 int count = 0;
1946 for (const RootInlineBox* box = firstRootBox(); box; box = box->nextRootBox( )) {
1947 count++;
1948 if (box == stopRootInlineBox)
1949 break;
1950 }
1951 return count;
1952 }
1953
1937 void LayoutBlockFlow::removeFloatingObjectsFromDescendants() 1954 void LayoutBlockFlow::removeFloatingObjectsFromDescendants()
1938 { 1955 {
1939 if (!containsFloats()) 1956 if (!containsFloats())
1940 return; 1957 return;
1941 removeFloatingObjects(); 1958 removeFloatingObjects();
1942 setChildNeedsLayout(MarkOnlyThis); 1959 setChildNeedsLayout(MarkOnlyThis);
1943 1960
1944 // If our children are inline, then the only boxes which could contain float s are atomic inlines (e.g. inline-block, float etc.) 1961 // If our children are inline, then the only boxes which could contain float s are atomic inlines (e.g. inline-block, float etc.)
1945 // and these create formatting contexts, so can't pick up intruding floats f rom ancestors/siblings - making them safe to skip. 1962 // and these create formatting contexts, so can't pick up intruding floats f rom ancestors/siblings - making them safe to skip.
1946 if (childrenInline()) 1963 if (childrenInline())
(...skipping 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after
3100 // FIXME: Glyph overflow will get lost in this case, but not really a big de al. 3117 // FIXME: Glyph overflow will get lost in this case, but not really a big de al.
3101 GlyphOverflowAndFallbackFontsMap textBoxDataMap; 3118 GlyphOverflowAndFallbackFontsMap textBoxDataMap;
3102 for (ListHashSet<RootInlineBox*>::const_iterator it = lineBoxes.begin(); it != lineBoxes.end(); ++it) { 3119 for (ListHashSet<RootInlineBox*>::const_iterator it = lineBoxes.begin(); it != lineBoxes.end(); ++it) {
3103 RootInlineBox* box = *it; 3120 RootInlineBox* box = *it;
3104 box->computeOverflow(box->lineTop(), box->lineBottom(), textBoxDataMap); 3121 box->computeOverflow(box->lineTop(), box->lineBottom(), textBoxDataMap);
3105 } 3122 }
3106 return childrenOverflowChanged; 3123 return childrenOverflowChanged;
3107 } 3124 }
3108 3125
3109 } // namespace blink 3126 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698