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

Side by Side Diff: third_party/WebKit/Source/core/layout/shapes/Shape.cpp

Issue 1743803002: Rename enums/functions that collide in chromium style in core/style/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@get-names-8
Patch Set: get-names-9: rebase Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2012 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 const Vector<Length>& values = polygon->values(); 135 const Vector<Length>& values = polygon->values();
136 size_t valuesSize = values.size(); 136 size_t valuesSize = values.size();
137 ASSERT(!(valuesSize % 2)); 137 ASSERT(!(valuesSize % 2));
138 OwnPtr<Vector<FloatPoint>> vertices = adoptPtr(new Vector<FloatPoint>(va luesSize / 2)); 138 OwnPtr<Vector<FloatPoint>> vertices = adoptPtr(new Vector<FloatPoint>(va luesSize / 2));
139 for (unsigned i = 0; i < valuesSize; i += 2) { 139 for (unsigned i = 0; i < valuesSize; i += 2) {
140 FloatPoint vertex( 140 FloatPoint vertex(
141 floatValueForLength(values.at(i), boxWidth), 141 floatValueForLength(values.at(i), boxWidth),
142 floatValueForLength(values.at(i + 1), boxHeight)); 142 floatValueForLength(values.at(i + 1), boxHeight));
143 (*vertices)[i / 2] = physicalPointToLogical(vertex, logicalBoxSize.h eight().toFloat(), writingMode); 143 (*vertices)[i / 2] = physicalPointToLogical(vertex, logicalBoxSize.h eight().toFloat(), writingMode);
144 } 144 }
145 shape = createPolygonShape(vertices.release(), polygon->windRule()); 145 shape = createPolygonShape(vertices.release(), polygon->getWindRule());
146 break; 146 break;
147 } 147 }
148 148
149 case BasicShape::BasicShapeInsetType: { 149 case BasicShape::BasicShapeInsetType: {
150 const BasicShapeInset& inset = *toBasicShapeInset(basicShape); 150 const BasicShapeInset& inset = *toBasicShapeInset(basicShape);
151 float left = floatValueForLength(inset.left(), boxWidth); 151 float left = floatValueForLength(inset.left(), boxWidth);
152 float top = floatValueForLength(inset.top(), boxHeight); 152 float top = floatValueForLength(inset.top(), boxHeight);
153 float right = floatValueForLength(inset.right(), boxWidth); 153 float right = floatValueForLength(inset.right(), boxWidth);
154 float bottom = floatValueForLength(inset.bottom(), boxHeight); 154 float bottom = floatValueForLength(inset.bottom(), boxHeight);
155 FloatRect rect(left, top, std::max<float>(boxWidth - left - right, 0), s td::max<float>(boxHeight - top - bottom, 0)); 155 FloatRect rect(left, top, std::max<float>(boxWidth - left - right, 0), s td::max<float>(boxHeight - top - bottom, 0));
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 FloatRect rect(0, 0, roundedRect.rect().width(), roundedRect.rect().height() ); 245 FloatRect rect(0, 0, roundedRect.rect().width(), roundedRect.rect().height() );
246 FloatRoundedRect bounds(rect, roundedRect.radii()); 246 FloatRoundedRect bounds(rect, roundedRect.radii());
247 OwnPtr<Shape> shape = createInsetShape(bounds); 247 OwnPtr<Shape> shape = createInsetShape(bounds);
248 shape->m_writingMode = writingMode; 248 shape->m_writingMode = writingMode;
249 shape->m_margin = margin; 249 shape->m_margin = margin;
250 250
251 return shape.release(); 251 return shape.release();
252 } 252 }
253 253
254 } // namespace blink 254 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698