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

Side by Side Diff: Source/core/rendering/style/RenderStyle.cpp

Issue 767543003: Remove unused functions from RenderStyle. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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/rendering/style/RenderStyle.h ('k') | no next file » | 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 Antti Koivisto (koivisto@kde.org) 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after
1279 continue; 1279 continue;
1280 float blurAndSpread = shadow.blur() + shadow.spread(); 1280 float blurAndSpread = shadow.blur() + shadow.spread();
1281 1281
1282 top = std::min<LayoutUnit>(top, shadow.y() - blurAndSpread); 1282 top = std::min<LayoutUnit>(top, shadow.y() - blurAndSpread);
1283 right = std::max<LayoutUnit>(right, shadow.x() + blurAndSpread); 1283 right = std::max<LayoutUnit>(right, shadow.x() + blurAndSpread);
1284 bottom = std::max<LayoutUnit>(bottom, shadow.y() + blurAndSpread); 1284 bottom = std::max<LayoutUnit>(bottom, shadow.y() + blurAndSpread);
1285 left = std::min<LayoutUnit>(left, shadow.x() - blurAndSpread); 1285 left = std::min<LayoutUnit>(left, shadow.x() - blurAndSpread);
1286 } 1286 }
1287 } 1287 }
1288 1288
1289 LayoutBoxExtent RenderStyle::getShadowInsetExtent(const ShadowList* shadowList) const
1290 {
1291 LayoutUnit top = 0;
1292 LayoutUnit right = 0;
1293 LayoutUnit bottom = 0;
1294 LayoutUnit left = 0;
1295
1296 size_t shadowCount = shadowList ? shadowList->shadows().size() : 0;
1297 for (size_t i = 0; i < shadowCount; ++i) {
1298 const ShadowData& shadow = shadowList->shadows()[i];
1299 if (shadow.style() == Normal)
1300 continue;
1301 float blurAndSpread = shadow.blur() + shadow.spread();
1302 top = std::max<LayoutUnit>(top, shadow.y() + blurAndSpread);
1303 right = std::min<LayoutUnit>(right, shadow.x() - blurAndSpread);
1304 bottom = std::min<LayoutUnit>(bottom, shadow.y() - blurAndSpread);
1305 left = std::max<LayoutUnit>(left, shadow.x() + blurAndSpread);
1306 }
1307
1308 return LayoutBoxExtent(top, right, bottom, left);
1309 }
1310
1311 void RenderStyle::getShadowHorizontalExtent(const ShadowList* shadowList, Layout Unit &left, LayoutUnit &right) const 1289 void RenderStyle::getShadowHorizontalExtent(const ShadowList* shadowList, Layout Unit &left, LayoutUnit &right) const
1312 { 1290 {
1313 left = 0; 1291 left = 0;
1314 right = 0; 1292 right = 0;
1315 1293
1316 size_t shadowCount = shadowList ? shadowList->shadows().size() : 0; 1294 size_t shadowCount = shadowList ? shadowList->shadows().size() : 0;
1317 for (size_t i = 0; i < shadowCount; ++i) { 1295 for (size_t i = 0; i < shadowCount; ++i) {
1318 const ShadowData& shadow = shadowList->shadows()[i]; 1296 const ShadowData& shadow = shadowList->shadows()[i];
1319 if (shadow.style() == Inset) 1297 if (shadow.style() == Inset)
1320 continue; 1298 continue;
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
1710 horizontal || includeLogicalRightEdge); 1688 horizontal || includeLogicalRightEdge);
1711 1689
1712 edges[BSLeft] = BorderEdge(borderLeftWidth(), 1690 edges[BSLeft] = BorderEdge(borderLeftWidth(),
1713 visitedDependentColor(CSSPropertyBorderLeftColor), 1691 visitedDependentColor(CSSPropertyBorderLeftColor),
1714 borderLeftStyle(), 1692 borderLeftStyle(),
1715 borderLeftIsTransparent(), 1693 borderLeftIsTransparent(),
1716 !horizontal || includeLogicalLeftEdge); 1694 !horizontal || includeLogicalLeftEdge);
1717 } 1695 }
1718 1696
1719 } // namespace blink 1697 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/style/RenderStyle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698