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

Side by Side Diff: Source/core/rendering/RenderBox.cpp

Issue 14759010: Fix the float logic to not return an anonymous block ancestor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update as per Julien's comments. Created 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 ASSERT(isFloatingOrOutOfFlowPositioned()); 179 ASSERT(isFloatingOrOutOfFlowPositioned());
180 180
181 if (documentBeingDestroyed()) 181 if (documentBeingDestroyed())
182 return; 182 return;
183 183
184 if (isFloating()) { 184 if (isFloating()) {
185 RenderBlock* parentBlock = 0; 185 RenderBlock* parentBlock = 0;
186 for (RenderObject* curr = parent(); curr && !curr->isRenderView(); curr = curr->parent()) { 186 for (RenderObject* curr = parent(); curr && !curr->isRenderView(); curr = curr->parent()) {
187 if (curr->isRenderBlock()) { 187 if (curr->isRenderBlock()) {
188 RenderBlock* currBlock = toRenderBlock(curr); 188 RenderBlock* currBlock = toRenderBlock(curr);
189 if (!parentBlock || currBlock->containsFloat(this)) 189 if (!parentBlock || parentBlock->isAnonymousBlock() || currBlock ->containsFloat(this))
190 parentBlock = currBlock; 190 parentBlock = currBlock;
191 } 191 }
192 } 192 }
193 193
194 if (parentBlock) { 194 if (parentBlock) {
195 RenderObject* parent = parentBlock->parent(); 195 RenderObject* parent = parentBlock->parent();
196 if (parent && parent->isFlexibleBoxIncludingDeprecated()) 196 if (parent && parent->isFlexibleBoxIncludingDeprecated())
197 parentBlock = toRenderBlock(parent); 197 parentBlock = toRenderBlock(parent);
198 198
199 parentBlock->markSiblingsWithFloatsForLayout(this); 199 parentBlock->markSiblingsWithFloatsForLayout(this);
(...skipping 4378 matching lines...) Expand 10 before | Expand all | Expand 10 after
4578 4578
4579 void RenderBox::reportStaticMembersMemoryUsage(MemoryInstrumentation* memoryInst rumentation) 4579 void RenderBox::reportStaticMembersMemoryUsage(MemoryInstrumentation* memoryInst rumentation)
4580 { 4580 {
4581 memoryInstrumentation->addRootObject(gOverrideHeightMap, WebCoreMemoryTypes: :RenderingStructures); 4581 memoryInstrumentation->addRootObject(gOverrideHeightMap, WebCoreMemoryTypes: :RenderingStructures);
4582 memoryInstrumentation->addRootObject(gOverrideWidthMap, WebCoreMemoryTypes:: RenderingStructures); 4582 memoryInstrumentation->addRootObject(gOverrideWidthMap, WebCoreMemoryTypes:: RenderingStructures);
4583 memoryInstrumentation->addRootObject(gOverrideContainingBlockLogicalHeightMa p, WebCoreMemoryTypes::RenderingStructures); 4583 memoryInstrumentation->addRootObject(gOverrideContainingBlockLogicalHeightMa p, WebCoreMemoryTypes::RenderingStructures);
4584 memoryInstrumentation->addRootObject(gOverrideContainingBlockLogicalWidthMap , WebCoreMemoryTypes::RenderingStructures); 4584 memoryInstrumentation->addRootObject(gOverrideContainingBlockLogicalWidthMap , WebCoreMemoryTypes::RenderingStructures);
4585 } 4585 }
4586 4586
4587 } // namespace WebCore 4587 } // namespace WebCore
OLDNEW
« Source/core/rendering/RenderBlock.cpp ('K') | « Source/core/rendering/RenderBlock.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698