Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "core/paint/BoxPainter.h" | 6 #include "core/paint/BoxPainter.h" |
| 7 | 7 |
| 8 #include "core/HTMLNames.h" | 8 #include "core/HTMLNames.h" |
| 9 #include "core/frame/Settings.h" | 9 #include "core/frame/Settings.h" |
| 10 #include "core/html/HTMLFrameOwnerElement.h" | 10 #include "core/html/HTMLFrameOwnerElement.h" |
| (...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 679 if (fixedBackgroundPaintsInLocalCoordinates(obj)) | 679 if (fixedBackgroundPaintsInLocalCoordinates(obj)) |
| 680 viewportRect.setLocation(IntPoint()); | 680 viewportRect.setLocation(IntPoint()); |
| 681 else if (FrameView* frameView = obj.view()->frameView()) | 681 else if (FrameView* frameView = obj.view()->frameView()) |
| 682 viewportRect.setLocation(IntPoint(frameView->scrollOffsetForViewport ConstrainedObjects())); | 682 viewportRect.setLocation(IntPoint(frameView->scrollOffsetForViewport ConstrainedObjects())); |
| 683 | 683 |
| 684 if (paintContainer) { | 684 if (paintContainer) { |
| 685 IntPoint absoluteContainerOffset = roundedIntPoint(paintContainer->l ocalToAbsolute(FloatPoint())); | 685 IntPoint absoluteContainerOffset = roundedIntPoint(paintContainer->l ocalToAbsolute(FloatPoint())); |
| 686 viewportRect.moveBy(-absoluteContainerOffset); | 686 viewportRect.moveBy(-absoluteContainerOffset); |
| 687 } | 687 } |
| 688 | 688 |
| 689 geometry.setDestRect(pixelSnappedIntRect(viewportRect)); | 689 geometry.setDestRect(viewportRect); |
|
leviw_travelin_and_unemployed
2015/02/25 18:32:28
Can't we pixel snap this just a few more times to
| |
| 690 positioningAreaSize = geometry.destRect().size(); | 690 positioningAreaSize = geometry.destRect().size(); |
| 691 } | 691 } |
| 692 | 692 |
| 693 const LayoutObject* clientForBackgroundImage = backgroundObject ? background Object : &obj; | 693 const LayoutObject* clientForBackgroundImage = backgroundObject ? background Object : &obj; |
| 694 IntSize fillTileSize = calculateFillTileSize(obj, fillLayer, positioningArea Size); | 694 IntSize fillTileSize = calculateFillTileSize(obj, fillLayer, positioningArea Size); |
| 695 fillLayer.image()->setContainerSizeForRenderer(clientForBackgroundImage, fil lTileSize, obj.style()->effectiveZoom()); | 695 fillLayer.image()->setContainerSizeForRenderer(clientForBackgroundImage, fil lTileSize, obj.style()->effectiveZoom()); |
| 696 geometry.setTileSize(fillTileSize); | 696 geometry.setTileSize(fillTileSize); |
| 697 | 697 |
| 698 EFillRepeat backgroundRepeatX = fillLayer.repeatX(); | 698 EFillRepeat backgroundRepeatX = fillLayer.repeatX(); |
| 699 EFillRepeat backgroundRepeatY = fillLayer.repeatY(); | 699 EFillRepeat backgroundRepeatY = fillLayer.repeatY(); |
| (...skipping 1491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2191 | 2191 |
| 2192 FloatPoint secondQuad[4]; | 2192 FloatPoint secondQuad[4]; |
| 2193 secondQuad[0] = quad[0]; | 2193 secondQuad[0] = quad[0]; |
| 2194 secondQuad[1] = FloatPoint(quad[0].x() - r1 * cx, quad[0].y() - r1 * cy); | 2194 secondQuad[1] = FloatPoint(quad[0].x() - r1 * cx, quad[0].y() - r1 * cy); |
| 2195 secondQuad[2] = quad[2]; | 2195 secondQuad[2] = quad[2]; |
| 2196 secondQuad[3] = quad[3]; | 2196 secondQuad[3] = quad[3]; |
| 2197 graphicsContext->clipPolygon(4, secondQuad, !secondEdgeMatches); | 2197 graphicsContext->clipPolygon(4, secondQuad, !secondEdgeMatches); |
| 2198 } | 2198 } |
| 2199 | 2199 |
| 2200 } // namespace blink | 2200 } // namespace blink |
| OLD | NEW |