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

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

Issue 203743002: Fix "unreachable code" warnings (MSVC warning 4702) in Blink. (Closed) Base URL: svn://svn.chromium.org/blink/trunk/
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/RuleFeature.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBox.cpp
===================================================================
--- Source/core/rendering/RenderBox.cpp (revision 169502)
+++ Source/core/rendering/RenderBox.cpp (working copy)
@@ -353,30 +353,8 @@
bool RenderBox::canDetermineWidthWithoutLayout() const
{
- // FIXME: This optimization is incorrect as written.
- // We need to be able to opt-in to this behavior only when
- // it's guarentted correct.
- // Until then disabling this optimization to be safe.
+ // FIXME: Remove function and callers.
return false;
-
- // FIXME: There are likely many subclasses of RenderBlockFlow which
- // cannot determine their layout just from style!
- // Perhaps we should create a "PlainRenderBlockFlow"
- // and move this optimization there?
- if (!isRenderBlockFlow()
- // Flexbox items can be expanded beyond their width.
- || isFlexItemIncludingDeprecated()
- // Table Layout controls cell size and can expand beyond width.
- || isTableCell())
- return false;
-
- RenderStyle* style = this->style();
- return style->width().isFixed()
- && style->minWidth().isFixed()
- && (style->maxWidth().isUndefined() || style->maxWidth().isFixed())
- && style->paddingLeft().isFixed()
- && style->paddingRight().isFixed()
- && style->boxSizing() == CONTENT_BOX;
}
LayoutUnit RenderBox::fixedOffsetWidth() const
« no previous file with comments | « Source/core/css/RuleFeature.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698