Closed Bug 1328832 Opened 3 years ago Closed 3 years ago

rename mozFlushType to mozilla::FlushType

Categories

(Core :: General, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: heycam, Assigned: heycam)

Details

Attachments

(2 files)

The naming of this was bothering me.  Will do the same for mozAutoDocUpdate in another bug.
Attachment #8824002 - Flags: review?(bzbarsky)
Attachment #8824003 - Flags: review?(bzbarsky)
Comment on attachment 8824002 [details]
Bug 1328832 - Part 1: Rename mozFlushType.h to FlushType.h.

https://reviewboard.mozilla.org/r/102502/#review103242

r=me
Attachment #8824002 - Flags: review?(bzbarsky) → review+
Comment on attachment 8824003 [details]
Bug 1328832 - Part 2: Rename mozFlushType to mozilla::FlushType and make it an enum class.

https://reviewboard.mozilla.org/r/102504/#review103252

r=me

::: editor/composer/nsEditingSession.cpp:10
(Diff revision 1)
>   * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
>  
>  #include <string.h>                     // for nullptr, strcmp
>  
>  #include "imgIContainer.h"              // for imgIContainer, etc
> -#include "mozilla/FlushType.h"          // for mozFlushType::Flush_Frames
> +#include "mozilla/FlushType.h"          // for FlushType::FlushType::Frames

No such thing as FlushType::FlushType.

::: editor/libeditor/EditorBase.cpp:32
(Diff revision 1)
>  #include "TextEditUtils.h"              // for TextEditUtils
>  #include "mozInlineSpellChecker.h"      // for mozInlineSpellChecker
>  #include "mozilla/CheckedInt.h"         // for CheckedInt
>  #include "mozilla/EditorUtils.h"        // for AutoRules, etc.
>  #include "mozilla/EditTransactionBase.h" // for EditTransactionBase
> -#include "mozilla/FlushType.h"          // for mozFlushType::Flush_Frames
> +#include "mozilla/FlushType.h"          // for FlushType::FlushType::Frames

Again no FlushType::FlushType.

::: layout/base/nsRefreshDriver.h:116
(Diff revision 1)
>     *     type to highest, in order registered)
>     *   + (in the future) which observers are suppressed when the display
>     *     doesn't require current position data or isn't currently
>     *     painting, and, correspondingly, which get notified when there
>     *     is a flush during such suppression
> -   * and it must be either Flush_Style, Flush_Layout, or Flush_Display.
> +   * and it must be either FlushType::Style, Flush_Layout, or Flush_Display.

Whatever replace you did here was missing an "all" parameter.  ;)

::: layout/generic/nsGfxScrollFrame.h:106
(Diff revision 1)
>  
>    /**
>     * This class handles the dispatching of scroll events to content.
>     *
>     * nsRefreshDriver maintains three lists of refresh observers, one for each
> -   * flush type: Flush_Style, Flush_Layout, and Flush_Display.
> +   * flush type: FlushType::Style, Flush_Layout, and Flush_Display.

Again, needs more "all" replacement.

::: layout/generic/nsSelection.cpp:1203
(Diff revision 1)
>      mFrameSelection ? mFrameSelection->GetShell() : nullptr;
>    if (!shell) {
>      aReturn.Truncate();
>      return NS_OK;
>    }
> -  shell->FlushPendingNotifications(Flush_Style);
> +  shell->FlushPendingNotifications(FlushType::Style);

This should be using FlushType::Frames, not FlushType::Style, since it wants to ensure frames.  Preexisting, but want to fix in a followup?
Attachment #8824003 - Flags: review?(bzbarsky) → review+
Thanks for looking through the patch in detail.
(In reply to Boris Zbarsky [:bz] (still a bit busy) from comment #4)
> This should be using FlushType::Frames, not FlushType::Style, since it wants
> to ensure frames.  Preexisting, but want to fix in a followup?

Filed bug 1329086.
Pushed by cmccormack@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f00c05c044ed
Part 1: Rename mozFlushType.h to FlushType.h. r=bzbarsky
https://hg.mozilla.org/integration/mozilla-inbound/rev/748010a48c9e
Part 2: Rename mozFlushType to mozilla::FlushType and make it an enum class. r=bzbarsky
Assignee: nobody → cam
You need to log in before you can comment on or make changes to this bug.