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

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

Issue 2686913002: Stay within the containing block when looking for a line to dirty. (Closed)
Patch Set: Created 3 years, 10 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 | « third_party/WebKit/LayoutTests/fast/block/float/relayout-nested-float-after-line.html ('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) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 return; 286 return;
287 } 287 }
288 288
289 // Try to figure out which line box we belong in. First try to find a previous 289 // Try to figure out which line box we belong in. First try to find a previous
290 // line box by examining our siblings. If we are a float inside an inline then 290 // line box by examining our siblings. If we are a float inside an inline then
291 // check the siblings of our inline parent. If we didn't find a line box, then 291 // check the siblings of our inline parent. If we didn't find a line box, then
292 // use our parent's first line box. 292 // use our parent's first line box.
293 RootInlineBox* box = nullptr; 293 RootInlineBox* box = nullptr;
294 LineLayoutItem curr = child.previousSibling(); 294 LineLayoutItem curr = child.previousSibling();
295 if (child.isFloating() && !curr) { 295 if (child.isFloating() && !curr) {
296 LineLayoutItem parent = child.parent(); 296 LineLayoutInline outerInline;
297 while (parent && parent.isLayoutInline() && !parent.previousSibling()) 297 for (LineLayoutItem parent = child.parent();
298 parent = parent.parent(); 298 parent && parent.isLayoutInline() && !parent.previousSibling();
299 if (parent) 299 parent = parent.parent())
300 curr = parent.previousSibling(); 300 outerInline = LineLayoutInline(parent);
301 if (outerInline)
302 curr = outerInline.previousSibling();
301 } 303 }
302 304
303 for (; curr; curr = curr.previousSibling()) { 305 for (; curr; curr = curr.previousSibling()) {
304 if (curr.isFloatingOrOutOfFlowPositioned()) 306 if (curr.isFloatingOrOutOfFlowPositioned())
305 continue; 307 continue;
306 308
307 if (curr.isAtomicInlineLevel()) { 309 if (curr.isAtomicInlineLevel()) {
308 InlineBox* wrapper = LineLayoutBox(curr).inlineBoxWrapper(); 310 InlineBox* wrapper = LineLayoutBox(curr).inlineBoxWrapper();
309 if (wrapper) 311 if (wrapper)
310 box = &wrapper->root(); 312 box = &wrapper->root();
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 ASSERT(child->prevLineBox() == prev); 375 ASSERT(child->prevLineBox() == prev);
374 prev = child; 376 prev = child;
375 } 377 }
376 ASSERT(prev == m_lastLineBox); 378 ASSERT(prev == m_lastLineBox);
377 #endif 379 #endif
378 } 380 }
379 381
380 #endif 382 #endif
381 383
382 } // namespace blink 384 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/block/float/relayout-nested-float-after-line.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698