Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Side by Side Diff: Source/core/rendering/RenderBoxModelObject.cpp

Issue 55783002: Introduce BorderImageLength and BorderImageLengthBox (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Moved BorderImageLength{,Box} to core/rendering/style Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/css/CSSToStyleMap.cpp ('k') | Source/core/rendering/style/BorderImageLength.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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(const BorderImageLength& borderSlice, L ayoutUnit borderSide, LayoutUnit imageSide, LayoutUnit boxExtent, RenderView* re nderView)
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
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
OLDNEW
« no previous file with comments | « Source/core/css/CSSToStyleMap.cpp ('k') | Source/core/rendering/style/BorderImageLength.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698