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

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

Issue 9290001: Revert 105784 - Merge 104121 - Source/WebCore: Crash in RenderRegion::getRegionRangeForBox. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 8 years, 11 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, 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 6600 matching lines...) Expand 10 before | Expand all | Expand 10 after
6611 LayoutSize offsetDelta = layoutState->m_layoutOffset - layoutState->m_pageOf fset; 6611 LayoutSize offsetDelta = layoutState->m_layoutOffset - layoutState->m_pageOf fset;
6612 return isHorizontalWritingMode() ? offsetDelta.height() : offsetDelta.width( ); 6612 return isHorizontalWritingMode() ? offsetDelta.height() : offsetDelta.width( );
6613 } 6613 }
6614 6614
6615 RenderRegion* RenderBlock::regionAtBlockOffset(LayoutUnit blockOffset) const 6615 RenderRegion* RenderBlock::regionAtBlockOffset(LayoutUnit blockOffset) const
6616 { 6616 {
6617 if (!inRenderFlowThread()) 6617 if (!inRenderFlowThread())
6618 return 0; 6618 return 0;
6619 6619
6620 RenderFlowThread* flowThread = enclosingRenderFlowThread(); 6620 RenderFlowThread* flowThread = enclosingRenderFlowThread();
6621 if (!flowThread || !flowThread->hasValidRegionInfo()) 6621 if (!flowThread || !flowThread->hasValidRegions())
6622 return 0; 6622 return 0;
6623 6623
6624 return flowThread->renderRegionForLine(offsetFromLogicalTopOfFirstPage() + b lockOffset, true); 6624 return flowThread->renderRegionForLine(offsetFromLogicalTopOfFirstPage() + b lockOffset, true);
6625 } 6625 }
6626 6626
6627 void RenderBlock::setStaticInlinePositionForChild(RenderBox* child, LayoutUnit b lockOffset, LayoutUnit inlinePosition) 6627 void RenderBlock::setStaticInlinePositionForChild(RenderBox* child, LayoutUnit b lockOffset, LayoutUnit inlinePosition)
6628 { 6628 {
6629 if (inRenderFlowThread()) { 6629 if (inRenderFlowThread()) {
6630 // Shift the inline position to exclude the region offset. 6630 // Shift the inline position to exclude the region offset.
6631 inlinePosition += startOffsetForContent() - startOffsetForContent(blockO ffset); 6631 inlinePosition += startOffsetForContent() - startOffsetForContent(blockO ffset);
6632 } 6632 }
6633 child->layer()->setStaticInlinePosition(inlinePosition); 6633 child->layer()->setStaticInlinePosition(inlinePosition);
6634 } 6634 }
6635 6635
6636 bool RenderBlock::logicalWidthChangedInRegions() const 6636 bool RenderBlock::logicalWidthChangedInRegions() const
6637 { 6637 {
6638 if (!inRenderFlowThread()) 6638 if (!inRenderFlowThread())
6639 return false; 6639 return false;
6640 6640
6641 RenderFlowThread* flowThread = enclosingRenderFlowThread(); 6641 RenderFlowThread* flowThread = enclosingRenderFlowThread();
6642 if (!flowThread || !flowThread->hasValidRegionInfo()) 6642 if (!flowThread || !flowThread->hasValidRegions())
6643 return 0; 6643 return 0;
6644 6644
6645 return flowThread->logicalWidthChangedInRegions(this, offsetFromLogicalTopOf FirstPage()); 6645 return flowThread->logicalWidthChangedInRegions(this, offsetFromLogicalTopOf FirstPage());
6646 } 6646 }
6647 6647
6648 RenderRegion* RenderBlock::clampToStartAndEndRegions(RenderRegion* region) const 6648 RenderRegion* RenderBlock::clampToStartAndEndRegions(RenderRegion* region) const
6649 { 6649 {
6650 ASSERT(region && inRenderFlowThread()); 6650 ASSERT(region && inRenderFlowThread());
6651 6651
6652 // We need to clamp to the block, since we want any lines or blocks that ove rflow out of the 6652 // We need to clamp to the block, since we want any lines or blocks that ove rflow out of the
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
7046 } 7046 }
7047 7047
7048 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl oatingObject* floatingObject) 7048 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl oatingObject* floatingObject)
7049 { 7049 {
7050 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x( ), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY()); 7050 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x( ), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY());
7051 } 7051 }
7052 7052
7053 #endif 7053 #endif
7054 7054
7055 } // namespace WebCore 7055 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/regions/region-range-for-box-crash-expected.txt ('k') | Source/WebCore/rendering/RenderBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698