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

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

Issue 1630763002: Use even-odd fill rule for <area shape=poly> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « third_party/WebKit/LayoutTests/fast/html/area-processing-expected.txt ('k') | no next file » | 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 Path path; 150 Path path;
151 switch (shape) { 151 switch (shape) {
152 case Poly: 152 case Poly:
153 if (m_coords.size() >= 6) { 153 if (m_coords.size() >= 6) {
154 int numPoints = m_coords.size() / 2; 154 int numPoints = m_coords.size() / 2;
155 path.moveTo(FloatPoint(clampCoordinate(m_coords[0]), clampCoordinate (m_coords[1]))); 155 path.moveTo(FloatPoint(clampCoordinate(m_coords[0]), clampCoordinate (m_coords[1])));
156 for (int i = 1; i < numPoints; ++i) 156 for (int i = 1; i < numPoints; ++i)
157 path.addLineTo(FloatPoint(clampCoordinate(m_coords[i * 2]), clam pCoordinate(m_coords[i * 2 + 1]))); 157 path.addLineTo(FloatPoint(clampCoordinate(m_coords[i * 2]), clam pCoordinate(m_coords[i * 2 + 1])));
158 path.closeSubpath(); 158 path.closeSubpath();
159 path.setWindRule(RULE_EVENODD);
159 } 160 }
160 break; 161 break;
161 case Circle: 162 case Circle:
162 if (m_coords.size() >= 3) { 163 if (m_coords.size() >= 3) {
163 float r = clampCoordinate(m_coords[2]); 164 float r = clampCoordinate(m_coords[2]);
164 path.addEllipse(FloatRect(clampCoordinate(m_coords[0]) - r, clampCoo rdinate(m_coords[1]) - r, 2 * r, 2 * r)); 165 path.addEllipse(FloatRect(clampCoordinate(m_coords[0]) - r, clampCoo rdinate(m_coords[1]) - r, 2 * r, 2 * r));
165 } 166 }
166 break; 167 break;
167 case Rect: 168 case Rect:
168 if (m_coords.size() >= 4) { 169 if (m_coords.size() >= 4) {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 void HTMLAreaElement::updateFocusAppearance(SelectionBehaviorOnFocus selectionBe havior) 231 void HTMLAreaElement::updateFocusAppearance(SelectionBehaviorOnFocus selectionBe havior)
231 { 232 {
232 if (!isFocusable()) 233 if (!isFocusable())
233 return; 234 return;
234 235
235 if (HTMLImageElement* imageElement = this->imageElement()) 236 if (HTMLImageElement* imageElement = this->imageElement())
236 imageElement->updateFocusAppearance(selectionBehavior); 237 imageElement->updateFocusAppearance(selectionBehavior);
237 } 238 }
238 239
239 } // namespace blink 240 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/html/area-processing-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698