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

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

Issue 341503002: Remove unused RenderReplaced::hasReplacedLogicalWidth() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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/rendering/RenderReplaced.h ('k') | 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 * Copyright (C) 2000 Dirk Mueller (mueller@kde.org) 3 * Copyright (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved.
5 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. 5 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 for (; !containingBlock->isRenderView() && !containingBlock->isBody(); conta iningBlock = containingBlock->containingBlock()) { 223 for (; !containingBlock->isRenderView() && !containingBlock->isBody(); conta iningBlock = containingBlock->containingBlock()) {
224 if (containingBlock->style()->logicalWidth().isSpecified() 224 if (containingBlock->style()->logicalWidth().isSpecified()
225 && containingBlock->style()->logicalMinWidth().isSpecified() 225 && containingBlock->style()->logicalMinWidth().isSpecified()
226 && (containingBlock->style()->logicalMaxWidth().isSpecified() || con tainingBlock->style()->logicalMaxWidth().isUndefined())) 226 && (containingBlock->style()->logicalMaxWidth().isSpecified() || con tainingBlock->style()->logicalMaxWidth().isUndefined()))
227 return containingBlock; 227 return containingBlock;
228 } 228 }
229 229
230 return 0; 230 return 0;
231 } 231 }
232 232
233 bool RenderReplaced::hasReplacedLogicalWidth() const
234 {
235 if (style()->logicalWidth().isSpecified())
236 return true;
237
238 if (style()->logicalWidth().isAuto())
239 return false;
240
241 return firstContainingBlockWithLogicalWidth(this);
242 }
243
244 bool RenderReplaced::hasReplacedLogicalHeight() const 233 bool RenderReplaced::hasReplacedLogicalHeight() const
245 { 234 {
246 if (style()->logicalHeight().isAuto()) 235 if (style()->logicalHeight().isAuto())
247 return false; 236 return false;
248 237
249 if (style()->logicalHeight().isSpecified()) { 238 if (style()->logicalHeight().isSpecified()) {
250 if (hasAutoHeightOrContainingBlockWithAutoHeight()) 239 if (hasAutoHeightOrContainingBlockWithAutoHeight())
251 return false; 240 return false;
252 return true; 241 return true;
253 } 242 }
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 // FIXME: layoutDelta needs to be applied in parts before/after transfor ms and 612 // FIXME: layoutDelta needs to be applied in parts before/after transfor ms and
624 // repaint containers. https://bugs.webkit.org/show_bug.cgi?id=23308 613 // repaint containers. https://bugs.webkit.org/show_bug.cgi?id=23308
625 r.move(v->layoutDelta()); 614 r.move(v->layoutDelta());
626 } 615 }
627 616
628 mapRectToPaintInvalidationBacking(paintInvalidationContainer, r); 617 mapRectToPaintInvalidationBacking(paintInvalidationContainer, r);
629 return r; 618 return r;
630 } 619 }
631 620
632 } 621 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderReplaced.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698