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

Side by Side Diff: Source/WebCore/rendering/RenderBlock.cpp

Issue 11377109: Merge 133717 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 years, 1 month 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) 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) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 { 527 {
528 RenderBlock* firstChildIgnoringAnonymousWrappers = 0; 528 RenderBlock* firstChildIgnoringAnonymousWrappers = 0;
529 for (RenderObject* curr = this; curr; curr = curr->parent()) { 529 for (RenderObject* curr = this; curr; curr = curr->parent()) {
530 if (!curr->isRenderBlock() || curr->isFloatingOrOutOfFlowPositioned() || curr->isTableCell() || curr->isRoot() || curr->isRenderView() || curr->hasOverf lowClip() 530 if (!curr->isRenderBlock() || curr->isFloatingOrOutOfFlowPositioned() || curr->isTableCell() || curr->isRoot() || curr->isRenderView() || curr->hasOverf lowClip()
531 || curr->isInlineBlockOrInlineTable()) 531 || curr->isInlineBlockOrInlineTable())
532 return 0; 532 return 0;
533 533
534 // FIXME: Table manages its own table parts, most of which are RenderBox es. 534 // FIXME: Table manages its own table parts, most of which are RenderBox es.
535 // Multi-column code cannot handle splitting the flow in table. Disablin g it 535 // Multi-column code cannot handle splitting the flow in table. Disablin g it
536 // to prevent crashes. 536 // to prevent crashes.
537 if (curr->isTable()) 537 // Similarly, RenderButton maintains an anonymous block child and overri des
538 // addChild() to prevent itself from having additional direct children. This
539 // causes problems for split flows.
540 if (curr->isTable() || curr->isRenderButton())
538 return 0; 541 return 0;
539 542
540 RenderBlock* currBlock = toRenderBlock(curr); 543 RenderBlock* currBlock = toRenderBlock(curr);
541 if (!currBlock->createsAnonymousWrapper()) 544 if (!currBlock->createsAnonymousWrapper())
542 firstChildIgnoringAnonymousWrappers = currBlock; 545 firstChildIgnoringAnonymousWrappers = currBlock;
543 546
544 if (currBlock->style()->specifiesColumns() && (allowAnonymousColumnBlock || !currBlock->isAnonymousColumnsBlock())) 547 if (currBlock->style()->specifiesColumns() && (allowAnonymousColumnBlock || !currBlock->isAnonymousColumnsBlock()))
545 return firstChildIgnoringAnonymousWrappers; 548 return firstChildIgnoringAnonymousWrappers;
546 549
547 if (currBlock->isAnonymousColumnSpanBlock()) 550 if (currBlock->isAnonymousColumnSpanBlock())
(...skipping 7069 matching lines...) Expand 10 before | Expand all | Expand 10 after
7617 } 7620 }
7618 7621
7619 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl oatingObject* floatingObject) 7622 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl oatingObject* floatingObject)
7620 { 7623 {
7621 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->fr ameRect().pixelSnappedX(), floatingObject->frameRect().pixelSnappedY(), floating Object->frameRect().pixelSnappedMaxX(), floatingObject->frameRect().pixelSnapped MaxY()); 7624 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->fr ameRect().pixelSnappedX(), floatingObject->frameRect().pixelSnappedY(), floating Object->frameRect().pixelSnappedMaxX(), floatingObject->frameRect().pixelSnapped MaxY());
7622 } 7625 }
7623 7626
7624 #endif 7627 #endif
7625 7628
7626 } // namespace WebCore 7629 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/block/colspan-under-button-crash-expected.txt ('k') | Source/WebCore/rendering/RenderButton.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698