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

Side by Side Diff: Source/core/rendering/RenderBox.cpp

Issue 143653008: Enable sticky positioning for table elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Got better fix for containingBlock() from webkit and updated by review comments. Created 6 years, 10 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
« no previous file with comments | « Source/core/css/resolver/StyleAdjuster.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 3199 matching lines...) Expand 10 before | Expand all | Expand 10 after
3210 // Use viewport as container for top-level fixed-position elements. 3210 // Use viewport as container for top-level fixed-position elements.
3211 if (style()->position() == FixedPosition && containingBlock->isRenderView()) { 3211 if (style()->position() == FixedPosition && containingBlock->isRenderView()) {
3212 const RenderView* view = toRenderView(containingBlock); 3212 const RenderView* view = toRenderView(containingBlock);
3213 if (FrameView* frameView = view->frameView()) { 3213 if (FrameView* frameView = view->frameView()) {
3214 LayoutRect viewportRect = frameView->viewportConstrainedVisibleConte ntRect(); 3214 LayoutRect viewportRect = frameView->viewportConstrainedVisibleConte ntRect();
3215 return containingBlock->isHorizontalWritingMode() ? viewportRect.hei ght() : viewportRect.width(); 3215 return containingBlock->isHorizontalWritingMode() ? viewportRect.hei ght() : viewportRect.width();
3216 } 3216 }
3217 } 3217 }
3218 3218
3219 if (containingBlock->isBox()) { 3219 if (containingBlock->isBox()) {
3220 const RenderBlock* cb = toRenderBlock(containingBlock); 3220 const RenderBlock* cb = containingBlock->isRenderBlock() ?
3221 toRenderBlock(containingBlock) : containingBlock->containingBlock();
3221 LayoutUnit result = cb->clientLogicalHeight(); 3222 LayoutUnit result = cb->clientLogicalHeight();
3222 RenderFlowThread* flowThread = flowThreadContainingBlock(); 3223 RenderFlowThread* flowThread = flowThreadContainingBlock();
3223 if (flowThread && containingBlock->isRenderFlowThread() && flowThread->i sHorizontalWritingMode() == containingBlock->isHorizontalWritingMode()) 3224 if (flowThread && containingBlock->isRenderFlowThread() && flowThread->i sHorizontalWritingMode() == containingBlock->isHorizontalWritingMode())
3224 return toRenderFlowThread(containingBlock)->contentLogicalHeightOfFi rstRegion(); 3225 return toRenderFlowThread(containingBlock)->contentLogicalHeightOfFi rstRegion();
3225 return result; 3226 return result;
3226 } 3227 }
3227 3228
3228 ASSERT(containingBlock->isRenderInline() && containingBlock->isInFlowPositio ned()); 3229 ASSERT(containingBlock->isRenderInline() && containingBlock->isInFlowPositio ned());
3229 3230
3230 const RenderInline* flow = toRenderInline(containingBlock); 3231 const RenderInline* flow = toRenderInline(containingBlock);
(...skipping 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after
4917 return 0; 4918 return 0;
4918 4919
4919 if (!layoutState && !flowThreadContainingBlock()) 4920 if (!layoutState && !flowThreadContainingBlock())
4920 return 0; 4921 return 0;
4921 4922
4922 RenderBlock* containerBlock = containingBlock(); 4923 RenderBlock* containerBlock = containingBlock();
4923 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); 4924 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop();
4924 } 4925 }
4925 4926
4926 } // namespace WebCore 4927 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/resolver/StyleAdjuster.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698