⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 109395 in webkit


Ignore:
Timestamp:
Mar 1, 2012, 12:36:09 PM (15 years ago)
Author:
cevans@google.com
Message:

Merge 107627
BUG=113690
Review URL: ​https://chromiumcodereview.appspot.com/9566026

Location:
branches/chromium/963
Files:
1 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/chromium/963/Source/WebCore/rendering/RenderBlock.cpp

    r109380 r109395  
    424424RenderBlock* RenderBlock::containingColumnsBlock(bool allowAnonymousColumnBlock)
    425425{
     426    RenderBlock* firstChildIgnoringAnonymousWrappers = 0;
    426427    for (RenderObject* curr = this; curr; curr = curr->parent()) {
    427428        if (!curr->isRenderBlock() || curr->isFloatingOrPositioned() || curr->isTableCell() || curr->isRoot() || curr->isRenderView() || curr->hasOverflowClip()
    … …  
    430431       
    431432        RenderBlock* currBlock = toRenderBlock(curr);
     433        if (!currBlock->createsAnonymousWrapper())
     434            firstChildIgnoringAnonymousWrappers = currBlock;
     435
    432436        if (currBlock->style()->specifiesColumns() && (allowAnonymousColumnBlock || !currBlock->isAnonymousColumnsBlock()))
    433             return currBlock;
     437            return firstChildIgnoringAnonymousWrappers;
    434438           
    435439        if (currBlock->isAnonymousColumnSpanBlock())
    … …  
    668672    if (!newChild->isText() && newChild->style()->columnSpan() && !newChild->isBeforeOrAfterContent()
    669673        && !newChild->isFloatingOrPositioned() && !newChild->isInline() && !isAnonymousColumnSpanBlock()) {
    670         if (style()->specifiesColumns())
    671             columnsBlockAncestor = this;
    672         else if (!isInline() && parent() && parent()->isRenderBlock()) {
    673             columnsBlockAncestor = toRenderBlock(parent())->containingColumnsBlock(false);
    674            
    675             if (columnsBlockAncestor) {
    676                 // Make sure that none of the parent ancestors have a continuation.
    677                 // If yes, we do not want split the block into continuations.
    678                 RenderObject* curr = this;
    679                 while (curr && curr != columnsBlockAncestor) {
    680                     if (curr->isRenderBlock() && toRenderBlock(curr)->continuation()) {
    681                         columnsBlockAncestor = 0;
    682                         break;
    683                     }
    684                     curr = curr->parent();
     674        columnsBlockAncestor = containingColumnsBlock(false);
     675        if (columnsBlockAncestor) {
     676            // Make sure that none of the parent ancestors have a continuation.
     677            // If yes, we do not want split the block into continuations.
     678            RenderObject* curr = this;
     679            while (curr && curr != columnsBlockAncestor) {
     680                if (curr->isRenderBlock() && toRenderBlock(curr)->continuation()) {
     681                    columnsBlockAncestor = 0;
     682                    break;
    685683                }
     684                curr = curr->parent();
    686685            }
    687686        }
Note: See TracChangeset for help on using the changeset viewer.