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

Unified Diff: Source/core/rendering/RenderBlock.cpp

Issue 775753002: Remove RenderFlowThread::offsetFromLogicalTopOfFirstRegion(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/rendering/RenderFlowThread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBlock.cpp
diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp
index 388b83a670e0fe316b9e2337f7bbc50495b45559..f26b0173ac338d5796daa7b03007fe10fe99ebf8 100644
--- a/Source/core/rendering/RenderBlock.cpp
+++ b/Source/core/rendering/RenderBlock.cpp
@@ -3645,22 +3645,18 @@ void RenderBlock::updateMinimumPageHeight(LayoutUnit offset, LayoutUnit minHeigh
LayoutUnit RenderBlock::offsetFromLogicalTopOfFirstPage() const
{
LayoutState* layoutState = view()->layoutState();
- if (layoutState && !layoutState->isPaginated())
- return 0;
-
- RenderFlowThread* flowThread = flowThreadContainingBlock();
- if (flowThread)
- return flowThread->offsetFromLogicalTopOfFirstRegion(this);
-
- if (layoutState) {
- ASSERT(layoutState->renderer() == this);
-
- LayoutSize offsetDelta = layoutState->layoutOffset() - layoutState->pageOffset();
- return isHorizontalWritingMode() ? offsetDelta.height() : offsetDelta.width();
- }
-
- ASSERT_NOT_REACHED();
- return 0;
+ if (!layoutState) {
Julien - ping for review 2014/12/04 16:46:19 ASSERT(layoutState) / RELEASE_ASSERT(layoutState)?
mstensho (USE GERRIT) 2014/12/04 18:19:43 Done.
+ ASSERT_NOT_REACHED();
+ return LayoutUnit();
+ }
+
+ if (!layoutState->isPaginated())
+ return LayoutUnit();
+ // It would be possible to remove the requirement that this block be the one currently being
+ // laid out, but nobody needs that at the moment.
+ ASSERT(layoutState->renderer() == this);
+ LayoutSize offsetDelta = layoutState->layoutOffset() - layoutState->pageOffset();
+ return isHorizontalWritingMode() ? offsetDelta.height() : offsetDelta.width();
}
LayoutUnit RenderBlock::collapsedMarginBeforeForChild(const RenderBox& child) const
« no previous file with comments | « no previous file | Source/core/rendering/RenderFlowThread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698