Deprecate event.layerX and event.layerY in WebKit
authorjchaffraix@webkit.org <jchaffraix@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Oct 2011 19:07:00 +0000 (19:07 +0000)
committerjchaffraix@webkit.org <jchaffraix@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Oct 2011 19:07:00 +0000 (19:07 +0000)
commit8deaea9397967bb0aef25e2898c390da1765560d
treefcd862c7cbbb5eeb2b33ab4b74ca50f76870870d
parent55284f0ece36f9677b20c2df346178f4267adc98
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
12 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/Window/window-xy-properties-expected.txt
LayoutTests/fast/events/init-events-expected.txt
LayoutTests/fast/events/mouse-relative-position-expected.txt
LayoutTests/fast/events/mouseclick-target-and-positioning-expected.txt
LayoutTests/fast/events/simulated-click-coords-expected.txt
LayoutTests/jquery/event-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/bindings/objc/PublicDOMInterfaces.h
Source/WebCore/dom/MouseRelatedEvent.cpp
Source/WebCore/dom/UIEvent.cpp
Source/WebCore/dom/UIEvent.h