Changeset 184065 in webkit
- Timestamp:
- May 10, 2015, 8:56:15 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 8 added
- 5 edited
- 1 copied
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/tiled-drawing/resources/bordered-image.png (added)
-
LayoutTests/platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover-expected.html (added)
-
LayoutTests/platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover-local-expected.html (added)
-
LayoutTests/platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover-local.html (copied) (copied from trunk/LayoutTests/platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment.html ) (2 diffs)
-
LayoutTests/platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover.html (added)
-
LayoutTests/platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-expected.html (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-local-expected.html (added)
-
LayoutTests/platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-local.html (added)
-
LayoutTests/platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-positioned-expected.html (added)
-
LayoutTests/platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-positioned.html (added)
-
LayoutTests/platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment.html (modified) (2 diffs)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderBoxModelObject.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r184060 r184065 1 2015-05-10 Simon Fraser <simon.fraser@apple.com> 2 3 background-position sometimes doesn't work properly with background-attachment: fixed 4 https://bugs.webkit.org/show_bug.cgi?id=103757 5 rdar://problem/18749925 6 7 Reviewed by Darin Adler. 8 9 Tests various configurations for painting the fixed backgrounds. The existing test was 10 actually wrong, so fixed to use a gradient (so you can see where the edges of the image are), 11 and be valid. Testing is complicated by the fact that setting top content inset actually 12 causes the snapshot to be inset at the top. 13 14 * platform/mac-wk2/tiled-drawing/resources/bordered-image.png: Added. 15 * platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover-expected.html: Added. 16 * platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover-local-expected.html: Added. 17 * platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover-local.html: Copied from LayoutTests/platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment.html. 18 * platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover.html: Added. 19 * platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-expected.html: 20 * platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-local-expected.html: Added. 21 * platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-local.html: Added. 22 * platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-positioned-expected.html: Added. 23 * platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-positioned.html: Added. 24 * platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment.html: 25 1 26 2015-05-10 Martin Robinson <mrobinson@igalia.com> 2 27 -
trunk/LayoutTests/platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover-local.html
r184064 r184065 3 3 <style> 4 4 5 html { 6 background-color: white; 7 } 5 8 body { 6 height:2000px; 7 margin:0; 8 overflow:hidden; 9 } 10 11 #fixed-background-box { 12 width:400px; 13 height:600px; 14 background-image:url(resources/green.png); 15 background-attachment:fixed; 9 margin: 0; 10 height: 2000px; 11 overflow: hidden; 12 background-image: url('resources/bordered-image.png'); 13 background-attachment: fixed; 14 background-size: contain; 15 background-repeat: no-repeat; 16 16 } 17 17 … … 24 24 window.scrollTo(0, 100); 25 25 } 26 27 26 window.addEventListener('load', runTest, false); 28 27 </script> 29 28 </head> 30 31 29 <body> 32 33 <div id="fixed-background-box"></div>34 35 30 </body> 36 31 </html> -
trunk/LayoutTests/platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-expected.html
r172417 r184065 10 10 11 11 #fixed-background-box { 12 position: absolute; 13 top: -100px; 12 14 width:400px; 13 15 height:600px; 14 background-image: url(resources/green.png);16 background-image: linear-gradient(blue, blue 10px, green 10px, green 490px, black 490px, black); 15 17 background-attachment:fixed; 18 background-repeat:no-repeat; 16 19 } 17 20 18 21 </style> 22 <script> 23 function runTest() { 24 if (window.internals) 25 window.internals.setTopContentInset(100); 26 } 27 window.addEventListener('load', runTest, false); 28 </script> 19 29 </head> 20 21 30 <body> 22 23 <div id="fixed-background-box"></div> 24 31 <div id="fixed-background-box"></div> 25 32 </body> 26 33 </html> -
trunk/LayoutTests/platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment.html
r172417 r184065 10 10 11 11 #fixed-background-box { 12 width:400px; 13 height:600px; 14 background-image:url(resources/green.png); 15 background-attachment:fixed; 12 width: 400px; 13 height: 600px; 14 background-image: linear-gradient(blue, blue 10px, green 10px, green 490px, black 490px, black); 15 background-attachment: fixed; 16 background-repeat:no-repeat; 16 17 } 17 18 18 19 </style> 19 20 20 <script> 21 21 function runTest() { … … 24 24 window.scrollTo(0, 100); 25 25 } 26 27 26 window.addEventListener('load', runTest, false); 28 27 </script> 29 28 </head> 30 31 29 <body> 32 33 <div id="fixed-background-box"></div> 34 30 <div id="fixed-background-box"></div> 35 31 </body> 36 32 </html> -
trunk/Source/WebCore/ChangeLog
r184056 r184065 1 2015-05-10 Simon Fraser <simon.fraser@apple.com> 2 3 background-position sometimes doesn't work properly with background-attachment: fixed 4 https://bugs.webkit.org/show_bug.cgi?id=103757 5 rdar://problem/18749925 6 7 Reviewed by Darin Adler. 8 9 Fix sizing issues with fixed backgrounds when top content inset (blurred toolbar) is in 10 effect. 11 12 The primary issue was that positioningAreaSize was including the top content inset 13 height, and should not have been, but there were also issues with the "fixedBackgroundPaintsInLocalCoordinates" 14 code path, which kicks in when the root background is fixed. 15 16 Tests: platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover-local.html 17 platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover.html 18 platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-local.html 19 platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-positioned.html 20 21 * rendering/RenderBoxModelObject.cpp: 22 (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): 23 1 24 2015-05-10 Sungmann Cho <sungmann.cho@navercorp.com> 2 25 -
trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp
r184055 r184065 1112 1112 } else { 1113 1113 LayoutRect viewportRect; 1114 float topContentInset = 0; 1114 1115 if (frame().settings().fixedBackgroundsPaintRelativeToDocument()) 1115 1116 viewportRect = view().unscaledDocumentRect(); 1116 1117 else { 1117 viewportRect.setSize(view().frameView().unscaledVisibleContentSizeIncludingObscuredArea()); 1118 FrameView& frameView = view().frameView(); 1119 viewportRect.setSize(frameView.unscaledVisibleContentSizeIncludingObscuredArea()); 1120 topContentInset = frameView.topContentInset(ScrollView::TopContentInsetType::WebCoreOrPlatformContentInset); 1121 1118 1122 if (fixedBackgroundPaintsInLocalCoordinates()) 1119 viewportRect.setLocation(LayoutPoint( ));1120 else {1121 viewportRect.setLocation(toLayoutPoint( view().frameView().documentScrollOffsetRelativeToViewOrigin()));1122 top += view().frameView().topContentInset(ScrollView::TopContentInsetType::WebCoreOrPlatformContentInset); 1123 }1123 viewportRect.setLocation(LayoutPoint(0, -topContentInset)); 1124 else 1125 viewportRect.setLocation(toLayoutPoint(frameView.documentScrollOffsetRelativeToViewOrigin())); 1126 1127 top += topContentInset; 1124 1128 } 1125 1129 … … 1129 1133 destinationRect = viewportRect; 1130 1134 positioningAreaSize = destinationRect.size(); 1135 positioningAreaSize.setHeight(positioningAreaSize.height() - topContentInset); 1131 1136 } 1132 1137
Note:
See TracChangeset
for help on using the changeset viewer.