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

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

Issue 2539813002: Avoid rogue line float re-layout. (Closed)
Patch Set: Created 4 years 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/fragmentation/change-fragmentainer-height-line-float.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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
4 * All right reserved. 4 * All right reserved.
5 * Copyright (C) 2010 Google Inc. All rights reserved. 5 * Copyright (C) 2010 Google Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 1914 matching lines...) Expand 10 before | Expand all | Expand 10 after
1925 LayoutBox* box = toLayoutBox(o); 1925 LayoutBox* box = toLayoutBox(o);
1926 box->setMayNeedPaintInvalidation(); 1926 box->setMayNeedPaintInvalidation();
1927 1927
1928 updateBlockChildDirtyBitsBeforeLayout(relayoutChildren, *box); 1928 updateBlockChildDirtyBitsBeforeLayout(relayoutChildren, *box);
1929 1929
1930 if (o->isOutOfFlowPositioned()) { 1930 if (o->isOutOfFlowPositioned()) {
1931 o->containingBlock()->insertPositionedObject(box); 1931 o->containingBlock()->insertPositionedObject(box);
1932 } else if (o->isFloating()) { 1932 } else if (o->isFloating()) {
1933 layoutState.floats().append(FloatWithRect(box)); 1933 layoutState.floats().append(FloatWithRect(box));
1934 if (box->needsLayout()) { 1934 if (box->needsLayout()) {
1935 box->layout(); 1935 // Be sure to at least mark the first line affected by the float as
1936 // Dirty any lineboxes potentially affected by the float, but don't 1936 // dirty, so that the float gets relaid out. Otherwise we'll miss
1937 // search outside this object as we are only interested in dirtying 1937 // it. After float layout, if it turns out that it changed size,
1938 // lineboxes to which we may attach the float. 1938 // any lines after this line will be deleted and relaid out.
1939 dirtyLinesFromChangedChild(box, MarkOnlyThis); 1939 dirtyLinesFromChangedChild(box, MarkOnlyThis);
1940 } 1940 }
1941 } else if (isFullLayout || o->needsLayout()) { 1941 } else if (isFullLayout || o->needsLayout()) {
1942 // Atomic inline. 1942 // Atomic inline.
1943 box->dirtyLineBoxes(isFullLayout); 1943 box->dirtyLineBoxes(isFullLayout);
1944 o->layoutIfNeeded(); 1944 o->layoutIfNeeded();
1945 } 1945 }
1946 } else if (o->isText() || 1946 } else if (o->isText() ||
1947 (o->isLayoutInline() && !walker.atEndOfInline())) { 1947 (o->isLayoutInline() && !walker.atEndOfInline())) {
1948 if (!o->isText()) 1948 if (!o->isText())
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
2511 2511
2512 bool LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const { 2512 bool LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const {
2513 // LayoutBlockFlow is in charge of paint invalidation of the first line. 2513 // LayoutBlockFlow is in charge of paint invalidation of the first line.
2514 if (firstLineBox()) 2514 if (firstLineBox())
2515 return false; 2515 return false;
2516 2516
2517 return LayoutBlock::paintedOutputOfObjectHasNoEffectRegardlessOfSize(); 2517 return LayoutBlock::paintedOutputOfObjectHasNoEffectRegardlessOfSize();
2518 } 2518 }
2519 2519
2520 } // namespace blink 2520 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fragmentation/change-fragmentainer-height-line-float.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698