Closed Bug 984271 Opened 10 years ago Closed 10 years ago

Rename nsEventStateManager to mozilla::EventStateManager

Categories

(Core :: DOM: Events, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(7 files, 3 obsolete files)

3.11 KB, patch
smaug
: review+
Details | Diff | Splinter Review
4.09 KB, patch
smaug
: review+
Details | Diff | Splinter Review
229.83 KB, patch
smaug
: review+
Details | Diff | Splinter Review
443.39 KB, patch
smaug
: review+
Details | Diff | Splinter Review
13.65 KB, patch
smaug
: review+
Details | Diff | Splinter Review
23.10 KB, patch
smaug
: review+
Details | Diff | Splinter Review
15.30 KB, patch
smaug
: review+
Details | Diff | Splinter Review
This might break other people's patches, though.
First, separate nsMouseWheelTransaction, nsScrollbarsForWheel and some other static methods which help handling wheel event.

The file name is, WheelHandlingHelper.

It has mozilla::DeltaValues (DeltaValues), mozilla::WheelHandlingUtils (old static methods in nsEventStateManager.cpp), mozilla::WheelTransaction (nsMouseWheelTransaction) and mozilla::ScrollbarsForWheel (nsScrollbarsForWheel).

And IsMouseEventReal() is implemented in WidgetMouseEvent by this patch.
Attachment #8394143 - Flags: review?(bugs)
Although, I'm not sure the reason why we need to define friend class starting with mozilla namespace. Without it, some compilers cannot compile Event.cpp... (error of "incomplete event type mozilla::EventStateManager")

And I find a bug of nsEventStateManager.h. That is, OverOutElementsWrapper implements its constructor and destructor as inline. However, this needs nsIContent definition but nsEventStateManager.h only has forward declaration. So, nsIContent.h must be included before nsEventStateManager.h. Therefore, I moved them to EventStateManager.cpp.
Attachment #8394147 - Flags: review?(bugs)
Status: NEW → ASSIGNED
Part 1 and 2 are massive. Couldn't you have separate patches for
code move, then renames, and then for random small fixes (like adding {} to few places)
Attachment #8394149 - Flags: review?(bugs) → review+
Attachment #8394150 - Flags: review?(bugs) → review+
Comment on attachment 8397869 [details] [diff] [review]
part.2 Rename nsEventStateManager to mozilla::EventStateManager

Or I guess this is fine, but the part 1 should be done in few pieces.
Attachment #8397869 - Flags: review?(bugs) → review+
Attachment #8397867 - Flags: review?(bugs) → review-
Comment on attachment 8399331 [details] [diff] [review]
part.1-1 Separate mouse wheel handling helper classes and methods from nsEventStateManager.cpp

This had still some random small changes. Hopefully I didn't miss anything.
Attachment #8399331 - Flags: review?(bugs) → review+
Attachment #8399332 - Flags: review?(bugs) → review+
Attachment #8399333 - Flags: review?(bugs) → review+
Comment on attachment 8399334 [details] [diff] [review]
part.1-4 Clean up WheelHandlingHelper.cpp


>+/**
>+ * WheelTransaction manages a series of wheel events as a transaction.
>+ * While a transaction, every wheel event should scroll same scrollable element
>+ * even after different scrollable element is moved under the mouse cursor by
>+ * scroll.

While in a transaction.... scroll the same...
even if a different element is under the mouse cursor.
Attachment #8399334 - Flags: review?(bugs) → review+
The following changesets are now in Firefox Nightly:

> f9d6b3557b32 Bug 984271 part.1-1 Separate mouse wheel handling helper classes and methods from nsEventStateManager.cpp r=smaug
> fac67900bc20 Bug 984271 part.1-2 Rename nsScrollbarsForWheel to mozilla::ScrollbarsForWheel r=smaug
> 77372b1a1ba6 Bug 984271 part.1-3 Rename nsMouseWheelTransaction to mozilla::WheelTransaction r=smaug
> df1a290b1c22 Bug 984271 part.1-4 Clean up WheelHandlingHelper.cpp r=smaug
> 77b2c81993b5 Bug 984271 part.2 Rename nsEventStateManager to mozilla::EventStateManager r=smaug
> 6e171e00a903 Bug 984271 part.3 Move OverOutElementsWrapper into mozilla:: namespace r=smaug
> e522bee65d65 Bug 984271 part.4 Move the all other stuff in EventStateManager.cpp into mozilla:: namespace r=smaug

Nightly Build Information:

        ID: 20140402030201
 Changeset: 4941a2ac0786109b08856738019b016a6c5a66a6
   Version: 31.0a1
      TBPL: https://tbpl.mozilla.org/?rev=4941a2ac0786
       URL: https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2014/04/2014-04-02-03-02-01-mozilla-central

Download Links:

>         Linux x86: https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2014/04/2014-04-02-03-02-01-mozilla-central/firefox-31.0a1.en-US.linux-i686.tar.bz2
>      Linux x86_64: https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2014/04/2014-04-02-03-02-01-mozilla-central/firefox-31.0a1.en-US.linux-x86_64.tar.bz2
> Linux x86_64 ASAN: https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2014/04/2014-04-02-03-02-01-mozilla-central/firefox-31.0a1.en-US.linux-x86_64-asan.tar.bz2
>               Mac: https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2014/04/2014-04-02-03-02-01-mozilla-central/firefox-31.0a1.en-US.mac.dmg
>             Win32: https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2014/04/2014-04-02-03-02-01-mozilla-central/firefox-31.0a1.en-US.win32.installer.exe
>             Win64: https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2014/04/2014-04-02-03-02-01-mozilla-central/firefox-31.0a1.en-US.win64-x86_64.installer.exe

Previous Nightly Build Information:

        ID: 20140401030203
 Changeset: 1417d180a1d8665b1a91b897d1cc4cc31e7980d4
   Version: 31.0a1
      TBPL: https://tbpl.mozilla.org/?rev=1417d180a1d8
       URL: https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2014/04/2014-04-01-03-02-03-mozilla-central
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: