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

Side by Side Diff: Source/core/layout/LayoutBox.cpp

Issue 1128433003: quirky WIP Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | no next file » | 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 2469 matching lines...) Expand 10 before | Expand all | Expand 10 after
2480 } 2480 }
2481 2481
2482 LayoutUnit LayoutBox::computePercentageLogicalHeight(const Length& height) const 2482 LayoutUnit LayoutBox::computePercentageLogicalHeight(const Length& height) const
2483 { 2483 {
2484 LayoutUnit availableHeight = -1; 2484 LayoutUnit availableHeight = -1;
2485 2485
2486 bool skippedAutoHeightContainingBlock = false; 2486 bool skippedAutoHeightContainingBlock = false;
2487 LayoutBlock* cb = containingBlock(); 2487 LayoutBlock* cb = containingBlock();
2488 const LayoutBox* containingBlockChild = this; 2488 const LayoutBox* containingBlockChild = this;
2489 LayoutUnit rootMarginBorderPaddingHeight = 0; 2489 LayoutUnit rootMarginBorderPaddingHeight = 0;
2490 while (!cb->isLayoutView() && skipContainingBlockForPercentHeightCalculation (cb)) { 2490 while (!cb->isLayoutView() && height.type() == Percent && skipContainingBloc kForPercentHeightCalculation(cb)) {
2491 if (cb->isBody() || cb->isDocumentElement()) 2491 if (cb->isBody() || cb->isDocumentElement())
2492 rootMarginBorderPaddingHeight += cb->marginBefore() + cb->marginAfte r() + cb->borderAndPaddingLogicalHeight(); 2492 rootMarginBorderPaddingHeight += cb->marginBefore() + cb->marginAfte r() + cb->borderAndPaddingLogicalHeight();
2493 skippedAutoHeightContainingBlock = true; 2493 skippedAutoHeightContainingBlock = true;
2494 containingBlockChild = cb; 2494 containingBlockChild = cb;
2495 cb = cb->containingBlock(); 2495 cb = cb->containingBlock();
2496 } 2496 }
2497 cb->addPercentHeightDescendant(const_cast<LayoutBox*>(this)); 2497 cb->addPercentHeightDescendant(const_cast<LayoutBox*>(this));
2498 2498
2499 const ComputedStyle& cbstyle = cb->styleRef(); 2499 const ComputedStyle& cbstyle = cb->styleRef();
2500 2500
(...skipping 2202 matching lines...) Expand 10 before | Expand all | Expand 10 after
4703 computedValues.m_margins.m_end = marginEnd(); 4703 computedValues.m_margins.m_end = marginEnd();
4704 4704
4705 setLogicalTop(oldLogicalTop); 4705 setLogicalTop(oldLogicalTop);
4706 setLogicalWidth(oldLogicalWidth); 4706 setLogicalWidth(oldLogicalWidth);
4707 setLogicalLeft(oldLogicalLeft); 4707 setLogicalLeft(oldLogicalLeft);
4708 setMarginLeft(oldMarginLeft); 4708 setMarginLeft(oldMarginLeft);
4709 setMarginRight(oldMarginRight); 4709 setMarginRight(oldMarginRight);
4710 } 4710 }
4711 4711
4712 } // namespace blink 4712 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698