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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2737253003: Remove floating objects from descendants of subtree roots (Closed)
Patch Set: Test from mstensho Created 3 years, 9 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/writing-mode/orthogonal-writing-modes-floats-crash-3.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) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 2163 matching lines...) Expand 10 before | Expand all | Expand 10 after
2174 // instance, when descendants of the moving child is floating, 2174 // instance, when descendants of the moving child is floating,
2175 // removeChildNode() does not clear them. In such cases, at this 2175 // removeChildNode() does not clear them. In such cases, at this
2176 // point, FloatingObjects may contain old or even deleted objects. 2176 // point, FloatingObjects may contain old or even deleted objects.
2177 // Dealing this in markAllDescendantsWithFloatsForLayout() could 2177 // Dealing this in markAllDescendantsWithFloatsForLayout() could
2178 // solve, but since that is likely to suffer the performance and 2178 // solve, but since that is likely to suffer the performance and
2179 // since the containing block of orthogonal writing mode roots 2179 // since the containing block of orthogonal writing mode roots
2180 // having floats is very rare, prefer to re-create 2180 // having floats is very rare, prefer to re-create
2181 // FloatingObjects. 2181 // FloatingObjects.
2182 if (LayoutBlock* cb = root.containingBlock()) { 2182 if (LayoutBlock* cb = root.containingBlock()) {
2183 if ((cb->normalChildNeedsLayout() || cb->selfNeedsLayout()) && 2183 if ((cb->normalChildNeedsLayout() || cb->selfNeedsLayout()) &&
2184 cb->isLayoutBlockFlow()) 2184 cb->isLayoutBlockFlow()) {
2185 toLayoutBlockFlow(cb)->removeFloatingObjects(); 2185 toLayoutBlockFlow(cb)->removeFloatingObjectsFromDescendants();
2186 }
2186 } 2187 }
2187 } 2188 }
2188 2189
2189 static bool prepareOrthogonalWritingModeRootForLayout(LayoutObject& root) { 2190 static bool prepareOrthogonalWritingModeRootForLayout(LayoutObject& root) {
2190 DCHECK(root.isBox() && toLayoutBox(root).isOrthogonalWritingModeRoot()); 2191 DCHECK(root.isBox() && toLayoutBox(root).isOrthogonalWritingModeRoot());
2191 if (!root.needsLayout() || root.isOutOfFlowPositioned() || 2192 if (!root.needsLayout() || root.isOutOfFlowPositioned() ||
2192 root.isColumnSpanAll() || 2193 root.isColumnSpanAll() ||
2193 !root.styleRef().logicalHeight().isIntrinsicOrAuto()) 2194 !root.styleRef().logicalHeight().isIntrinsicOrAuto())
2194 return false; 2195 return false;
2195 2196
(...skipping 3064 matching lines...) Expand 10 before | Expand all | Expand 10 after
5260 void FrameView::setAnimationHost( 5261 void FrameView::setAnimationHost(
5261 std::unique_ptr<CompositorAnimationHost> host) { 5262 std::unique_ptr<CompositorAnimationHost> host) {
5262 m_animationHost = std::move(host); 5263 m_animationHost = std::move(host);
5263 } 5264 }
5264 5265
5265 LayoutUnit FrameView::caretWidth() const { 5266 LayoutUnit FrameView::caretWidth() const {
5266 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); 5267 return LayoutUnit(getHostWindow()->windowToViewportScalar(1));
5267 } 5268 }
5268 5269
5269 } // namespace blink 5270 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/writing-mode/orthogonal-writing-modes-floats-crash-3.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698