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

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

Issue 156623004: Positioned <legend> element should honor width: auto (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
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 2492 matching lines...) Expand 10 before | Expand all | Expand 10 after
2503 2503
2504 if (isHorizontalWritingMode() != containingBlock()->isHorizontalWritingMode( )) 2504 if (isHorizontalWritingMode() != containingBlock()->isHorizontalWritingMode( ))
2505 return true; 2505 return true;
2506 2506
2507 return false; 2507 return false;
2508 } 2508 }
2509 2509
2510 bool RenderBox::autoWidthShouldFitContent() const 2510 bool RenderBox::autoWidthShouldFitContent() const
2511 { 2511 {
2512 return node() && (node()->hasTagName(inputTag) || node()->hasTagName(selectT ag) || node()->hasTagName(buttonTag) 2512 return node() && (node()->hasTagName(inputTag) || node()->hasTagName(selectT ag) || node()->hasTagName(buttonTag)
2513 || node()->hasTagName(textareaTag) || node()->hasTagName(legendTag)); 2513 || node()->hasTagName(textareaTag) || (node()->hasTagName(legendTag) && !style()->hasOutOfFlowPosition()));
2514 } 2514 }
2515 2515
2516 void RenderBox::computeInlineDirectionMargins(RenderBlock* containingBlock, Layo utUnit containerWidth, LayoutUnit childWidth, LayoutUnit& marginStart, LayoutUni t& marginEnd) const 2516 void RenderBox::computeInlineDirectionMargins(RenderBlock* containingBlock, Layo utUnit containerWidth, LayoutUnit childWidth, LayoutUnit& marginStart, LayoutUni t& marginEnd) const
2517 { 2517 {
2518 const RenderStyle* containingBlockStyle = containingBlock->style(); 2518 const RenderStyle* containingBlockStyle = containingBlock->style();
2519 Length marginStartLength = style()->marginStartUsing(containingBlockStyle); 2519 Length marginStartLength = style()->marginStartUsing(containingBlockStyle);
2520 Length marginEndLength = style()->marginEndUsing(containingBlockStyle); 2520 Length marginEndLength = style()->marginEndUsing(containingBlockStyle);
2521 2521
2522 if (isFloating() || isInline()) { 2522 if (isFloating() || isInline()) {
2523 // Inline blocks/tables and floats don't have their margins increased. 2523 // Inline blocks/tables and floats don't have their margins increased.
(...skipping 2393 matching lines...) Expand 10 before | Expand all | Expand 10 after
4917 return 0; 4917 return 0;
4918 4918
4919 if (!layoutState && !flowThreadContainingBlock()) 4919 if (!layoutState && !flowThreadContainingBlock())
4920 return 0; 4920 return 0;
4921 4921
4922 RenderBlock* containerBlock = containingBlock(); 4922 RenderBlock* containerBlock = containingBlock();
4923 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); 4923 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop();
4924 } 4924 }
4925 4925
4926 } // namespace WebCore 4926 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698