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

Side by Side Diff: Source/core/css/CSSBasicShapes.cpp

Issue 189543014: Ensure proper finalization of garbage-collected types. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase and sign error in Vector Created 6 years, 9 months 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/CSSBasicShapes.h ('k') | Source/core/css/CSSCalculationValue.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) 2011 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 21 matching lines...) Expand all
32 32
33 #include "core/css/CSSValuePool.h" 33 #include "core/css/CSSValuePool.h"
34 #include "core/css/Pair.h" 34 #include "core/css/Pair.h"
35 #include "platform/Length.h" 35 #include "platform/Length.h"
36 #include "wtf/text/StringBuilder.h" 36 #include "wtf/text/StringBuilder.h"
37 37
38 using namespace WTF; 38 using namespace WTF;
39 39
40 namespace WebCore { 40 namespace WebCore {
41 41
42 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(CSSBasicShape)
43
42 static String buildRectangleString(const String& x, const String& y, const Strin g& width, const String& height, const String& radiusX, const String& radiusY, co nst String& layoutBox) 44 static String buildRectangleString(const String& x, const String& y, const Strin g& width, const String& height, const String& radiusX, const String& radiusY, co nst String& layoutBox)
43 { 45 {
44 const char opening[] = "rectangle("; 46 const char opening[] = "rectangle(";
45 const char separator[] = ", "; 47 const char separator[] = ", ";
46 StringBuilder result; 48 StringBuilder result;
47 // Compute the required capacity in advance to reduce allocations. 49 // Compute the required capacity in advance to reduce allocations.
48 result.reserveCapacity((sizeof(opening) - 1) + (5 * (sizeof(separator) - 1)) + 1 + x.length() + y.length() + width.length() + height.length() + radiusX.leng th() + radiusY.length() + (layoutBox.isEmpty() ? 0 : layoutBox.length() + 1)); 50 result.reserveCapacity((sizeof(opening) - 1) + (5 * (sizeof(separator) - 1)) + 1 + x.length() + y.length() + width.length() + height.length() + radiusX.leng th() + radiusY.length() + (layoutBox.isEmpty() ? 0 : layoutBox.length() + 1));
49 result.appendLiteral(opening); 51 result.appendLiteral(opening);
50 result.append(x); 52 result.append(x);
51 result.appendLiteral(separator); 53 result.appendLiteral(separator);
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 visitor->trace(m_left); 602 visitor->trace(m_left);
601 visitor->trace(m_topLeftRadius); 603 visitor->trace(m_topLeftRadius);
602 visitor->trace(m_topRightRadius); 604 visitor->trace(m_topRightRadius);
603 visitor->trace(m_bottomRightRadius); 605 visitor->trace(m_bottomRightRadius);
604 visitor->trace(m_bottomLeftRadius); 606 visitor->trace(m_bottomLeftRadius);
605 CSSBasicShape::trace(visitor); 607 CSSBasicShape::trace(visitor);
606 } 608 }
607 609
608 } // namespace WebCore 610 } // namespace WebCore
609 611
OLDNEW
« no previous file with comments | « Source/core/css/CSSBasicShapes.h ('k') | Source/core/css/CSSCalculationValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698