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

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

Issue 8216022: Merge 97075 - Style for updated due to inability to locate (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 2 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
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 Apple Inc. All r ights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r ights 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 1539 matching lines...) Expand 10 before | Expand all | Expand 10 after
1550 { 1550 {
1551 // See if we have a run-in element with inline children. If the 1551 // See if we have a run-in element with inline children. If the
1552 // children aren't inline, then just treat the run-in as a normal 1552 // children aren't inline, then just treat the run-in as a normal
1553 // block. 1553 // block.
1554 if (!child->isRunIn() || !child->childrenInline()) 1554 if (!child->isRunIn() || !child->childrenInline())
1555 return false; 1555 return false;
1556 // FIXME: We don't handle non-block elements with run-in for now. 1556 // FIXME: We don't handle non-block elements with run-in for now.
1557 if (!child->isRenderBlock()) 1557 if (!child->isRenderBlock())
1558 return false; 1558 return false;
1559 1559
1560 // Get the next non-positioned/non-floating RenderBlock.
1561 RenderBlock* blockRunIn = toRenderBlock(child); 1560 RenderBlock* blockRunIn = toRenderBlock(child);
1562 RenderObject* curr = blockRunIn->nextSibling(); 1561 RenderObject* curr = blockRunIn->nextSibling();
1563 while (curr && curr->isFloatingOrPositioned()) 1562 if (!curr || !curr->isRenderBlock() || !curr->childrenInline() || curr->isRu nIn() || curr->isAnonymous() || curr->isFloatingOrPositioned())
1564 curr = curr->nextSibling();
1565
1566 if (!curr || !curr->isRenderBlock() || !curr->childrenInline() || curr->isRu nIn() || curr->isAnonymous())
1567 return false; 1563 return false;
1568 1564
1569 RenderBlock* currBlock = toRenderBlock(curr); 1565 RenderBlock* currBlock = toRenderBlock(curr);
1570 1566
1571 // Remove the old child. 1567 // Remove the old child.
1572 children()->removeChildNode(this, blockRunIn); 1568 children()->removeChildNode(this, blockRunIn);
1573 1569
1574 // Create an inline. 1570 // Create an inline.
1575 Node* runInNode = blockRunIn->node(); 1571 Node* runInNode = blockRunIn->node();
1576 RenderInline* inlineRunIn = new (renderArena()) RenderInline(runInNode ? run InNode : document()); 1572 RenderInline* inlineRunIn = new (renderArena()) RenderInline(runInNode ? run InNode : document());
(...skipping 5028 matching lines...) Expand 10 before | Expand all | Expand 10 after
6605 } 6601 }
6606 6602
6607 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl oatingObject* floatingObject) 6603 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl oatingObject* floatingObject)
6608 { 6604 {
6609 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x( ), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY()); 6605 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x( ), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY());
6610 } 6606 }
6611 6607
6612 #endif 6608 #endif
6613 6609
6614 } // namespace WebCore 6610 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/runin/runin-not-go-into-float-expected.txt ('k') | Source/WebCore/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698