Deprecate event.layerX and event.layerY in WebKit
https://bugs.webkit.org/show_bug.cgi?id=69951
Reviewed by Darin Adler.
Source/WebCore:
layerX and layerY were concepts of the old Netscape code that stayed
in WebKit for a long time without changes. Now the code is completely
wrong and Mozilla has expressed some interest in removing it from their
API too.
This is a first step in the removal as layerX and layerY are exposed
in some APIs. Chromium and Win are fine with removing the property
directly, but ObjC needs to deprecate them first.
* bindings/objc/PublicDOMInterfaces.h: Mark the API as deprecated.
* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::layerX):
(WebCore::MouseRelatedEvent::layerY):
* dom/UIEvent.cpp:
(WebCore::UIEvent::layerX):
(WebCore::UIEvent::layerY):
Added a call to warnDeprecatedLayerXYUsage in the previous functions.
(WebCore::UIEvent::warnDeprecatedLayerXYUsage): Print a warning in the
console about the removal of event.layerX and event.layerY in the near future.
* dom/UIEvent.h: Added warnDeprecatedLayerXYUsage.
LayoutTests:
* fast/dom/Window/window-xy-properties-expected.txt:
* fast/events/init-events-expected.txt:
* fast/events/mouse-relative-position-expected.txt:
* fast/events/mouseclick-target-and-positioning-expected.txt:
* fast/events/simulated-click-coords-expected.txt:
* jquery/events-expected.txt:
Updated those tests with the console messages to keep our existing
coverage until we remove the 2 properties.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@97380
268f45cc-cd09-0410-ab3c-
d52691b4dbfc