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

Side by Side Diff: Source/core/html/HTMLAreaElement.cpp

Issue 334593005: Removing using declarations that import names in the C++ Standard library. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | Source/core/html/HTMLFormControlElement.cpp » ('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 * Copyright (C) 2004, 2005, 2006, 2009, 2011 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2009, 2011 Apple Inc. 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 14 matching lines...) Expand all
25 #include "HTMLNames.h" 25 #include "HTMLNames.h"
26 #include "core/html/HTMLImageElement.h" 26 #include "core/html/HTMLImageElement.h"
27 #include "core/html/HTMLMapElement.h" 27 #include "core/html/HTMLMapElement.h"
28 #include "core/rendering/HitTestResult.h" 28 #include "core/rendering/HitTestResult.h"
29 #include "core/rendering/RenderImage.h" 29 #include "core/rendering/RenderImage.h"
30 #include "core/rendering/RenderView.h" 30 #include "core/rendering/RenderView.h"
31 #include "platform/LengthFunctions.h" 31 #include "platform/LengthFunctions.h"
32 #include "platform/graphics/Path.h" 32 #include "platform/graphics/Path.h"
33 #include "platform/transforms/AffineTransform.h" 33 #include "platform/transforms/AffineTransform.h"
34 34
35 using namespace std;
36
37 namespace WebCore { 35 namespace WebCore {
38 36
39 using namespace HTMLNames; 37 using namespace HTMLNames;
40 38
41 inline HTMLAreaElement::HTMLAreaElement(Document& document) 39 inline HTMLAreaElement::HTMLAreaElement(Document& document)
42 : HTMLAnchorElement(areaTag, document) 40 : HTMLAnchorElement(areaTag, document)
43 , m_lastSize(-1, -1) 41 , m_lastSize(-1, -1)
44 , m_shape(Unknown) 42 , m_shape(Unknown)
45 { 43 {
46 ScriptWrappable::init(this); 44 ScriptWrappable::init(this);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 int numPoints = m_coords.size() / 2; 143 int numPoints = m_coords.size() / 2;
146 path.moveTo(FloatPoint(minimumValueForLength(m_coords[0], width) .toFloat(), minimumValueForLength(m_coords[1], height).toFloat())); 144 path.moveTo(FloatPoint(minimumValueForLength(m_coords[0], width) .toFloat(), minimumValueForLength(m_coords[1], height).toFloat()));
147 for (int i = 1; i < numPoints; ++i) 145 for (int i = 1; i < numPoints; ++i)
148 path.addLineTo(FloatPoint(minimumValueForLength(m_coords[i * 2], width).toFloat(), minimumValueForLength(m_coords[i * 2 + 1], height).toFloa t())); 146 path.addLineTo(FloatPoint(minimumValueForLength(m_coords[i * 2], width).toFloat(), minimumValueForLength(m_coords[i * 2 + 1], height).toFloa t()));
149 path.closeSubpath(); 147 path.closeSubpath();
150 } 148 }
151 break; 149 break;
152 case Circle: 150 case Circle:
153 if (m_coords.size() >= 3) { 151 if (m_coords.size() >= 3) {
154 Length radius = m_coords[2]; 152 Length radius = m_coords[2];
155 float r = min(minimumValueForLength(radius, width).toFloat(), mi nimumValueForLength(radius, height).toFloat()); 153 float r = std::min(minimumValueForLength(radius, width).toFloat( ), minimumValueForLength(radius, height).toFloat());
156 path.addEllipse(FloatRect(minimumValueForLength(m_coords[0], wid th).toFloat() - r, minimumValueForLength(m_coords[1], height).toFloat() - r, 2 * r, 2 * r)); 154 path.addEllipse(FloatRect(minimumValueForLength(m_coords[0], wid th).toFloat() - r, minimumValueForLength(m_coords[1], height).toFloat() - r, 2 * r, 2 * r));
157 } 155 }
158 break; 156 break;
159 case Rect: 157 case Rect:
160 if (m_coords.size() >= 4) { 158 if (m_coords.size() >= 4) {
161 float x0 = minimumValueForLength(m_coords[0], width).toFloat(); 159 float x0 = minimumValueForLength(m_coords[0], width).toFloat();
162 float y0 = minimumValueForLength(m_coords[1], height).toFloat(); 160 float y0 = minimumValueForLength(m_coords[1], height).toFloat();
163 float x1 = minimumValueForLength(m_coords[2], width).toFloat(); 161 float x1 = minimumValueForLength(m_coords[2], width).toFloat();
164 float y1 = minimumValueForLength(m_coords[3], height).toFloat(); 162 float y1 = minimumValueForLength(m_coords[3], height).toFloat();
165 path.addRect(FloatRect(x0, y0, x1 - x0, y1 - y0)); 163 path.addRect(FloatRect(x0, y0, x1 - x0, y1 - y0));
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 return; 228 return;
231 229
232 HTMLImageElement* imageElement = this->imageElement(); 230 HTMLImageElement* imageElement = this->imageElement();
233 if (!imageElement) 231 if (!imageElement)
234 return; 232 return;
235 233
236 imageElement->updateFocusAppearance(restorePreviousSelection); 234 imageElement->updateFocusAppearance(restorePreviousSelection);
237 } 235 }
238 236
239 } 237 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/HTMLFormControlElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698