|
Merge 121599 - Allow non-borders to be adjusted to less than 1 when zoomed out
https://bugs.webkit.org/show_bug.cgi?id=90104
Reviewed by Eric Seidel.
Source/WebCore:
Change CSSPrimitiveValue::computeLengthDouble to allow values to be
adjusted to less than 1.0 when zoomed out. This avoids an off by one
error for floats with margins when zoomed out that can cause floats to
wrap and break pages.
The logic that prevents the value from being adjusted to less than 1 was
added to ensure that borders are still painted even when zoomed out.
By moving the logic to ApplyPropertyComputeLength::applyValue, which is
used for borders and outlines, that functionality is preserved.
Test: fast/sub-pixel/float-with-margin-in-container.html
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::computeLengthDouble):
* css/StyleBuilder.cpp:
(WebCore::ApplyPropertyComputeLength::applyValue):
LayoutTests:
Add test ensuring that floats with margins do not wrap in fixed sized
containers and update existing results as needed.
* fast/css/zoom-background-repeat-x.html:
* fast/sub-pixel/float-with-margin-in-container-expected.txt: Added.
* fast/sub-pixel/float-with-margin-in-container.html: Added.
* platform/chromium-linux/fast/reflections/reflection-with-zoom-expected.png:
* platform/chromium-linux/fast/transforms/bounding-rect-zoom-expected.png:
* platform/chromium-linux/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png:
* platform/chromium-linux/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png:
* platform/chromium-mac/fast/transforms/bounding-rect-zoom-expected.txt:
* platform/chromium-mac/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.txt:
* platform/chromium-mac/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.txt:
* platform/chromium-win/fast/transforms/bounding-rect-zoom-expected.txt:
* platform/chromium-win/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.txt:
* platform/chromium-win/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.txt:
* platform/mac/fast/transforms/bounding-rect-zoom-expected.txt:
* platform/mac/http/tests/misc/object-embedding-svg-delayed-size-negotiation-2-expected.txt:
* platform/mac/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.txt:
* platform/mac/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.txt:
TBR=eae@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=122238
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+497 lines, -493 lines) |
Patch |
|
M |
LayoutTests/fast/css/zoom-background-repeat-x.html
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
A + |
LayoutTests/fast/sub-pixel/float-with-margin-in-container.html
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
A + |
LayoutTests/fast/sub-pixel/float-with-margin-in-container-expected.txt
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
|
M |
LayoutTests/platform/chromium-linux/fast/reflections/reflection-with-zoom-expected.png
|
View
|
|
Binary file |
0 comments
|
Download
|
|
M |
LayoutTests/platform/chromium-linux/fast/transforms/bounding-rect-zoom-expected.png
|
View
|
|
Binary file |
0 comments
|
Download
|
|
M |
LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png
|
View
|
|
Binary file |
0 comments
|
Download
|
|
M |
LayoutTests/platform/chromium-linux/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png
|
View
|
|
Binary file |
0 comments
|
Download
|
|
M |
LayoutTests/platform/chromium-mac/fast/transforms/bounding-rect-zoom-expected.txt
|
View
|
|
1 chunk |
+9 lines, -9 lines |
0 comments
|
Download
|
|
M |
LayoutTests/platform/chromium-mac/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.txt
|
View
|
|
7 chunks |
+84 lines, -84 lines |
0 comments
|
Download
|
|
M |
LayoutTests/platform/chromium-mac/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.txt
|
View
|
|
1 chunk |
+52 lines, -52 lines |
0 comments
|
Download
|
|
M |
LayoutTests/platform/chromium-win/fast/transforms/bounding-rect-zoom-expected.txt
|
View
|
|
1 chunk |
+9 lines, -9 lines |
0 comments
|
Download
|
|
M |
LayoutTests/platform/chromium-win/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.txt
|
View
|
|
7 chunks |
+84 lines, -84 lines |
0 comments
|
Download
|
|
M |
LayoutTests/platform/chromium-win/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.txt
|
View
|
|
1 chunk |
+52 lines, -52 lines |
0 comments
|
Download
|
|
M |
LayoutTests/platform/mac/fast/transforms/bounding-rect-zoom-expected.txt
|
View
|
|
1 chunk |
+9 lines, -9 lines |
0 comments
|
Download
|
|
M |
LayoutTests/platform/mac/http/tests/misc/object-embedding-svg-delayed-size-negotiation-2-expected.txt
|
View
|
|
1 chunk |
+52 lines, -52 lines |
0 comments
|
Download
|
|
M |
LayoutTests/platform/mac/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.txt
|
View
|
|
7 chunks |
+84 lines, -84 lines |
0 comments
|
Download
|
|
M |
LayoutTests/platform/mac/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.txt
|
View
|
|
1 chunk |
+52 lines, -52 lines |
0 comments
|
Download
|
|
M |
Source/WebCore/css/CSSPrimitiveValue.cpp
|
View
|
|
1 chunk |
+1 line, -6 lines |
0 comments
|
Download
|
|
M |
Source/WebCore/css/StyleBuilder.cpp
|
View
|
|
1 chunk |
+10 lines, -1 line |
0 comments
|
Download
|
Total messages: 1 (0 generated)
|