Chromium Code Reviews| 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 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1141 geometry.setSpaceSize(IntSize(geometry.spaceSize().width(), 0)); | 1141 geometry.setSpaceSize(IntSize(geometry.spaceSize().width(), 0)); |
| 1142 } | 1142 } |
| 1143 | 1143 |
| 1144 if (fixedAttachment) | 1144 if (fixedAttachment) |
| 1145 geometry.useFixedAttachment(snappedPaintRect.location()); | 1145 geometry.useFixedAttachment(snappedPaintRect.location()); |
| 1146 | 1146 |
| 1147 geometry.clip(snappedPaintRect); | 1147 geometry.clip(snappedPaintRect); |
| 1148 geometry.setDestOrigin(geometry.destRect().location()); | 1148 geometry.setDestOrigin(geometry.destRect().location()); |
| 1149 } | 1149 } |
| 1150 | 1150 |
| 1151 static LayoutUnit computeBorderImageSide(Length borderSlice, LayoutUnit borderSi de, LayoutUnit imageSide, LayoutUnit boxExtent, RenderView* renderView) | 1151 static LayoutUnit computeBorderImageSide(LengthOrNumber borderSlice, LayoutUnit borderSide, LayoutUnit imageSide, LayoutUnit boxExtent, RenderView* renderView) |
|
Julien - ping for review
2013/11/01 18:27:11
const LengthOrNumber& to avoid a copy.
davve
2013/11/04 12:42:54
OK.
| |
| 1152 { | 1152 { |
| 1153 if (borderSlice.isRelative()) | 1153 if (borderSlice.isNumber()) |
| 1154 return borderSlice.value() * borderSide; | 1154 return borderSlice.number() * borderSide; |
| 1155 if (borderSlice.isAuto()) | 1155 if (borderSlice.length().isAuto()) |
| 1156 return imageSide; | 1156 return imageSide; |
| 1157 return valueForLength(borderSlice, boxExtent, renderView); | 1157 return valueForLength(borderSlice.length(), boxExtent, renderView); |
| 1158 } | 1158 } |
| 1159 | 1159 |
| 1160 bool RenderBoxModelObject::paintNinePieceImage(GraphicsContext* graphicsContext, const LayoutRect& rect, const RenderStyle* style, | 1160 bool RenderBoxModelObject::paintNinePieceImage(GraphicsContext* graphicsContext, const LayoutRect& rect, const RenderStyle* style, |
| 1161 const NinePieceImage& ninePieceIm age, CompositeOperator op) | 1161 const NinePieceImage& ninePieceIm age, CompositeOperator op) |
| 1162 { | 1162 { |
| 1163 StyleImage* styleImage = ninePieceImage.image(); | 1163 StyleImage* styleImage = ninePieceImage.image(); |
| 1164 if (!styleImage) | 1164 if (!styleImage) |
| 1165 return false; | 1165 return false; |
| 1166 | 1166 |
| 1167 if (!styleImage->isLoaded()) | 1167 if (!styleImage->isLoaded()) |
| (...skipping 1670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2838 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); | 2838 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); |
| 2839 for (RenderObject* child = startChild; child && child != endChild; ) { | 2839 for (RenderObject* child = startChild; child && child != endChild; ) { |
| 2840 // Save our next sibling as moveChildTo will clear it. | 2840 // Save our next sibling as moveChildTo will clear it. |
| 2841 RenderObject* nextSibling = child->nextSibling(); | 2841 RenderObject* nextSibling = child->nextSibling(); |
| 2842 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); | 2842 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); |
| 2843 child = nextSibling; | 2843 child = nextSibling; |
| 2844 } | 2844 } |
| 2845 } | 2845 } |
| 2846 | 2846 |
| 2847 } // namespace WebCore | 2847 } // namespace WebCore |
| OLD | NEW |