Changeset 205565 in webkit
- Timestamp:
- Sep 7, 2016 1:19:48 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r205562 r205565 1 2016-09-07 Chris Dumez <cdumez@apple.com> 2 3 Fix handling of negative radius in HTMLAreaElement's coords when in circle state 4 https://bugs.webkit.org/show_bug.cgi?id=161690 5 6 Reviewed by Daniel Bates. 7 8 Rebaseline existing test now that one more check is passing. 9 10 * web-platform-tests/html/semantics/embedded-content/the-area-element/area-processing-expected.txt: 11 1 12 2016-09-07 Chris Dumez <cdumez@apple.com> 2 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-area-element/area-processing-expected.txt
r196091 r205565 10 10 PASS negative: "-10,-10,-10,-10" (default) 11 11 PASS too few numbers: "20,40" (circle) 12 FAIL negative radius: "20,40,-10" (circle) assert_equals: elementFromPoint(21, 41) expected Element node <img src="/images/threecolors.png" usemap="#x" id="img" w... but got Element node <area id="area" shape="circle" coords="20,40,-10"></area> 12 PASS negative radius: "20,40,-10" (circle) 13 13 PASS zero radius: "20,40,0" (circle) 14 14 PASS too few numbers: "100,100,120,100,100" (poly) -
trunk/Source/WebCore/ChangeLog
r205562 r205565 1 2016-09-07 Chris Dumez <cdumez@apple.com> 2 3 Fix handling of negative radius in HTMLAreaElement's coords when in circle state 4 https://bugs.webkit.org/show_bug.cgi?id=161690 5 6 Reviewed by Daniel Bates. 7 8 Fix handling of negative radius in HTMLAreaElement's coords when in 9 circle state: 10 - https://html.spec.whatwg.org/#attr-area-shape-circle 11 12 The radius must be non-negative as per the specification. However, our 13 code fails to check. 14 15 Firefox and Chrome both reject negative radius. 16 17 No new tests, rebaselined existing test. 18 19 * html/HTMLAreaElement.cpp: 20 (WebCore::HTMLAreaElement::getRegion): 21 1 22 2016-09-07 Chris Dumez <cdumez@apple.com> 2 23 -
trunk/Source/WebCore/html/HTMLAreaElement.cpp
r205562 r205565 162 162 case Circle: 163 163 if (m_coords.size() >= 3) { 164 double r = m_coords[2]; 165 path.addEllipse(FloatRect(m_coords[0] - r, m_coords[1] - r, 2 * r, 2 * r)); 164 double radius = m_coords[2]; 165 if (radius > 0) 166 path.addEllipse(FloatRect(m_coords[0] - radius, m_coords[1] - radius, 2 * radius, 2 * radius)); 166 167 } 167 168 break;
Note: See TracChangeset
for help on using the changeset viewer.