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

Side by Side Diff: third_party/WebKit/Source/core/style/ComputedStyle.cpp

Issue 2494333002: Replace wrapUnique(new T(args)) by makeUnique<T>(args) in Blink (Closed)
Patch Set: Drop redundant WTF:: Created 4 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
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 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
4 * reserved. 4 * reserved.
5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 m_rareInheritedData->m_textDecorationSkip != 1131 m_rareInheritedData->m_textDecorationSkip !=
1132 other.m_rareInheritedData->m_textDecorationSkip || 1132 other.m_rareInheritedData->m_textDecorationSkip ||
1133 m_rareInheritedData->appliedTextDecorations != 1133 m_rareInheritedData->appliedTextDecorations !=
1134 other.m_rareInheritedData->appliedTextDecorations)) { 1134 other.m_rareInheritedData->appliedTextDecorations)) {
1135 diff.setTextDecorationOrColorChanged(); 1135 diff.setTextDecorationOrColorChanged();
1136 } 1136 }
1137 } 1137 }
1138 } 1138 }
1139 1139
1140 void ComputedStyle::addPaintImage(StyleImage* image) { 1140 void ComputedStyle::addPaintImage(StyleImage* image) {
1141 if (!m_rareNonInheritedData.access()->m_paintImages) 1141 if (!m_rareNonInheritedData.access()->m_paintImages) {
1142 m_rareNonInheritedData.access()->m_paintImages = 1142 m_rareNonInheritedData.access()->m_paintImages =
1143 WTF::wrapUnique(new Vector<Persistent<StyleImage>>()); 1143 makeUnique<Vector<Persistent<StyleImage>>>();
1144 }
1144 m_rareNonInheritedData.access()->m_paintImages->append(image); 1145 m_rareNonInheritedData.access()->m_paintImages->append(image);
1145 } 1146 }
1146 1147
1147 void ComputedStyle::addCursor(StyleImage* image, 1148 void ComputedStyle::addCursor(StyleImage* image,
1148 bool hotSpotSpecified, 1149 bool hotSpotSpecified,
1149 const IntPoint& hotSpot) { 1150 const IntPoint& hotSpot) {
1150 if (!m_rareInheritedData.access()->cursorData) 1151 if (!m_rareInheritedData.access()->cursorData)
1151 m_rareInheritedData.access()->cursorData = new CursorList; 1152 m_rareInheritedData.access()->cursorData = new CursorList;
1152 m_rareInheritedData.access()->cursorData->append( 1153 m_rareInheritedData.access()->cursorData->append(
1153 CursorData(image, hotSpotSpecified, hotSpot)); 1154 CursorData(image, hotSpotSpecified, hotSpot));
(...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after
2416 if (value < 0) 2417 if (value < 0)
2417 fvalue -= 0.5f; 2418 fvalue -= 0.5f;
2418 else 2419 else
2419 fvalue += 0.5f; 2420 fvalue += 0.5f;
2420 } 2421 }
2421 2422
2422 return roundForImpreciseConversion<int>(fvalue / zoomFactor); 2423 return roundForImpreciseConversion<int>(fvalue / zoomFactor);
2423 } 2424 }
2424 2425
2425 } // namespace blink 2426 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698