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

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

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 3 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/html/HTMLAppletElement.cpp ('k') | Source/core/html/HTMLBaseElement.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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 if (shape == Unknown) { 135 if (shape == Unknown) {
136 if (m_coords.size() == 3) 136 if (m_coords.size() == 3)
137 shape = Circle; 137 shape = Circle;
138 else if (m_coords.size() == 4) 138 else if (m_coords.size() == 4)
139 shape = Rect; 139 shape = Rect;
140 else if (m_coords.size() >= 6) 140 else if (m_coords.size() >= 6)
141 shape = Poly; 141 shape = Poly;
142 } 142 }
143 143
144 Path path; 144 Path path;
145 RenderView* renderView = document()->renderView(); 145 RenderView* renderView = document().renderView();
146 switch (shape) { 146 switch (shape) {
147 case Poly: 147 case Poly:
148 if (m_coords.size() >= 6) { 148 if (m_coords.size() >= 6) {
149 int numPoints = m_coords.size() / 2; 149 int numPoints = m_coords.size() / 2;
150 path.moveTo(FloatPoint(minimumValueForLength(m_coords[0], width, renderView), minimumValueForLength(m_coords[1], height, renderView))); 150 path.moveTo(FloatPoint(minimumValueForLength(m_coords[0], width, renderView), minimumValueForLength(m_coords[1], height, renderView)));
151 for (int i = 1; i < numPoints; ++i) 151 for (int i = 1; i < numPoints; ++i)
152 path.addLineTo(FloatPoint(minimumValueForLength(m_coords[i * 2], width, renderView), minimumValueForLength(m_coords[i * 2 + 1], height, rend erView))); 152 path.addLineTo(FloatPoint(minimumValueForLength(m_coords[i * 2], width, renderView), minimumValueForLength(m_coords[i * 2 + 1], height, rend erView)));
153 path.closeSubpath(); 153 path.closeSubpath();
154 } 154 }
155 break; 155 break;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 // FIXME: This means that an AREA that is not a link cannot be made focusabl e through contenteditable or tabindex. Is it correct? 246 // FIXME: This means that an AREA that is not a link cannot be made focusabl e through contenteditable or tabindex. Is it correct?
247 return isLink(); 247 return isLink();
248 } 248 }
249 249
250 String HTMLAreaElement::target() const 250 String HTMLAreaElement::target() const
251 { 251 {
252 return getAttribute(targetAttr); 252 return getAttribute(targetAttr);
253 } 253 }
254 254
255 } 255 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLAppletElement.cpp ('k') | Source/core/html/HTMLBaseElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698