Commit 7a95ea43 authored by sashab@chromium.org's avatar sashab@chromium.org

Fix bug in CSSCursorImageValue::equals()

Fixed a bug in CSSCursorImageValue::equals() which was causing any
cursor images with the same hotspot to be treated as equal. Also added a
test.

BUG=510188

Review URL: https://codereview.chromium.org/1311783009

git-svn-id: svn://svn.chromium.org/blink/trunk@201288 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent a3ddd493
<!DOCTYPE html>
<div id="element"></div>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script>
var verticalCursor = "url(file:///a) 11 11, default";
var horizontalCursor = "url(file:///b) 11 11, default";
test(function () {
element.style.cursor = verticalCursor;
assert_equals(element.style.cursor, verticalCursor);
element.style.cursor = horizontalCursor;
assert_equals(element.style.cursor, horizontalCursor);
}, "Check that the cursor updates even when the hotspot is the same");
</script>
......@@ -196,7 +196,7 @@ void CSSCursorImageValue::removeReferencedElement(SVGElement* element)
bool CSSCursorImageValue::equals(const CSSCursorImageValue& other) const
{
return m_hotSpotSpecified ? other.m_hotSpotSpecified && m_hotSpot == other.m_hotSpot : !other.m_hotSpotSpecified
return (m_hotSpotSpecified ? other.m_hotSpotSpecified && m_hotSpot == other.m_hotSpot : !other.m_hotSpotSpecified)
&& compareCSSValuePtr(m_imageValue, other.m_imageValue);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment