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

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

Issue 578723003: Don't allow negative width for positioned elements (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add a test Created 6 years, 3 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
Index: Source/core/rendering/RenderBox.cpp
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index ef86f2943fdc59b3cad488d411f7f2720369d011..0ad8c3cbc048633237d212948fca39720983cd32 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -3302,6 +3302,8 @@ void RenderBox::computePositionedLogicalWidthUsing(Length logicalWidth, const Re
computedValues.m_extent = adjustContentBoxLogicalWidthForBoxSizing(valueForLength(logicalWidth, containerLogicalWidth));
}
}
+ if (computedValues.m_extent < 0)
mstensho (USE GERRIT) 2014/09/17 11:48:22 Might consider moving this to "RULE 5" a few lines
Kyungtae Kim 2014/09/18 12:50:07 Done.
+ computedValues.m_extent = 0;
// Use computed values to calculate the horizontal position.

Powered by Google App Engine
This is Rietveld 408576698