OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
7 * Copyright (C) 2010 Google Inc. All rights reserved. | 7 * Copyright (C) 2010 Google Inc. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1055 geometry.setTileSize(fillTileSize); | 1055 geometry.setTileSize(fillTileSize); |
1056 | 1056 |
1057 EFillRepeat backgroundRepeatX = fillLayer->repeatX(); | 1057 EFillRepeat backgroundRepeatX = fillLayer->repeatX(); |
1058 EFillRepeat backgroundRepeatY = fillLayer->repeatY(); | 1058 EFillRepeat backgroundRepeatY = fillLayer->repeatY(); |
1059 RenderView* renderView = view(); | 1059 RenderView* renderView = view(); |
1060 int availableWidth = positioningAreaSize.width() - geometry.tileSize().width (); | 1060 int availableWidth = positioningAreaSize.width() - geometry.tileSize().width (); |
1061 int availableHeight = positioningAreaSize.height() - geometry.tileSize().hei ght(); | 1061 int availableHeight = positioningAreaSize.height() - geometry.tileSize().hei ght(); |
1062 | 1062 |
1063 LayoutUnit computedXPosition = minimumValueForLength(fillLayer->xPosition(), availableWidth, renderView, true); | 1063 LayoutUnit computedXPosition = minimumValueForLength(fillLayer->xPosition(), availableWidth, renderView, true); |
1064 if (backgroundRepeatX == RoundFill && positioningAreaSize.width() > 0 && fil lTileSize.width() > 0) { | 1064 if (backgroundRepeatX == RoundFill && positioningAreaSize.width() > 0 && fil lTileSize.width() > 0) { |
1065 int nrTiles = ceil((double)positioningAreaSize.width() / | 1065 long nrTiles = lroundf((float)positioningAreaSize.width() / fillTileSize .width()); |
eseidel
2013/09/17 18:07:00
So this is intentionally causing whitespace when t
eseidel
2013/09/17 18:08:32
I see. The author has *specifically* requested th
Julien - ping for review
2013/09/17 18:37:48
This mandated by the specification.
Thanks for ma
| |
1066 fillTileSize.width()); | |
1067 | 1066 |
1068 if (fillLayer->size().size.height().isAuto() && backgroundRepeatY != Rou ndFill) { | 1067 if (fillLayer->size().size.height().isAuto() && backgroundRepeatY != Rou ndFill) { |
1069 fillTileSize.setHeight(fillTileSize.height() * positioningAreaSize.w idth() / (nrTiles * fillTileSize.width())); | 1068 fillTileSize.setHeight(fillTileSize.height() * positioningAreaSize.w idth() / (nrTiles * fillTileSize.width())); |
1070 } | 1069 } |
1071 | 1070 |
1072 fillTileSize.setWidth(positioningAreaSize.width() / nrTiles); | 1071 fillTileSize.setWidth(positioningAreaSize.width() / nrTiles); |
1073 geometry.setTileSize(fillTileSize); | 1072 geometry.setTileSize(fillTileSize); |
1074 geometry.setPhaseX(geometry.tileSize().width() ? geometry.tileSize().wid th() - roundToInt(computedXPosition + left) % geometry.tileSize().width() : 0); | 1073 geometry.setPhaseX(geometry.tileSize().width() ? geometry.tileSize().wid th() - roundToInt(computedXPosition + left) % geometry.tileSize().width() : 0); |
1075 } | 1074 } |
1076 | 1075 |
1077 LayoutUnit computedYPosition = minimumValueForLength(fillLayer->yPosition(), availableHeight, renderView, true); | 1076 LayoutUnit computedYPosition = minimumValueForLength(fillLayer->yPosition(), availableHeight, renderView, true); |
1078 if (backgroundRepeatY == RoundFill && positioningAreaSize.height() > 0 && fi llTileSize.height() > 0) { | 1077 if (backgroundRepeatY == RoundFill && positioningAreaSize.height() > 0 && fi llTileSize.height() > 0) { |
1079 int nrTiles = ceil((double)positioningAreaSize.height() / | 1078 long nrTiles = lroundf((float)positioningAreaSize.height() / fillTileSiz e.height()); |
1080 fillTileSize.height()); | |
1081 | 1079 |
1082 if (fillLayer->size().size.width().isAuto() && backgroundRepeatX != Roun dFill) { | 1080 if (fillLayer->size().size.width().isAuto() && backgroundRepeatX != Roun dFill) { |
1083 fillTileSize.setWidth(fillTileSize.width() * positioningAreaSize.hei ght() / (nrTiles * fillTileSize.height())); | 1081 fillTileSize.setWidth(fillTileSize.width() * positioningAreaSize.hei ght() / (nrTiles * fillTileSize.height())); |
1084 } | 1082 } |
1085 | 1083 |
1086 fillTileSize.setHeight(positioningAreaSize.height() / nrTiles); | 1084 fillTileSize.setHeight(positioningAreaSize.height() / nrTiles); |
1087 geometry.setTileSize(fillTileSize); | 1085 geometry.setTileSize(fillTileSize); |
1088 geometry.setPhaseY(geometry.tileSize().height() ? geometry.tileSize().he ight() - roundToInt(computedYPosition + top) % geometry.tileSize().height() : 0) ; | 1086 geometry.setPhaseY(geometry.tileSize().height() ? geometry.tileSize().he ight() - roundToInt(computedYPosition + top) % geometry.tileSize().height() : 0) ; |
1089 } | 1087 } |
1090 | 1088 |
(...skipping 1695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2786 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); | 2784 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); |
2787 for (RenderObject* child = startChild; child && child != endChild; ) { | 2785 for (RenderObject* child = startChild; child && child != endChild; ) { |
2788 // Save our next sibling as moveChildTo will clear it. | 2786 // Save our next sibling as moveChildTo will clear it. |
2789 RenderObject* nextSibling = child->nextSibling(); | 2787 RenderObject* nextSibling = child->nextSibling(); |
2790 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); | 2788 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); |
2791 child = nextSibling; | 2789 child = nextSibling; |
2792 } | 2790 } |
2793 } | 2791 } |
2794 | 2792 |
2795 } // namespace WebCore | 2793 } // namespace WebCore |
OLD | NEW |