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

Unified Diff: Source/WebCore/css/StyleBuilder.cpp

Issue 10698133: Merge 121599 - Allow non-borders to be adjusted to less than 1 when zoomed out (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 years, 5 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/WebCore/css/CSSPrimitiveValue.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/css/StyleBuilder.cpp
===================================================================
--- Source/WebCore/css/StyleBuilder.cpp (revision 122237)
+++ Source/WebCore/css/StyleBuilder.cpp (working copy)
@@ -587,7 +587,16 @@
length = 5;
} else if (ident == CSSValueInvalid) {
float zoom = (svgZoomEnabled && styleResolver->useSVGZoomRules()) ? 1.0f : styleResolver->style()->effectiveZoom();
- length = primitiveValue->computeLength<T>(styleResolver->style(), styleResolver->rootElementStyle(), zoom);
+
+ // Any original result that was >= 1 should not be allowed to fall below 1.
+ // This keeps border lines from vanishing.
+ length = primitiveValue->computeLength<T>(styleResolver->style(), styleResolver->rootElementStyle(), 1.0);
+ T zoomedLength = length * zoom;
+ if (zoom < 1.0f && zoomedLength < 1.0 && length >= 1.0)
+ length = 1.0;
+ else
+ length = zoomedLength;
+
} else {
ASSERT_NOT_REACHED();
length = 0;
« no previous file with comments | « Source/WebCore/css/CSSPrimitiveValue.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698