Closed Bug 1354060 Opened 7 years ago Closed 7 years ago

Put defaultParagraphSeparator default change behind pref

Categories

(Core :: DOM: Editor, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: ayg, Assigned: ayg)

References

Details

Attachments

(1 file)

dev.platform discussion made it clear that we want this behind a pref.  At a minimum, this will allow more easily deploying a fix to switch it off.  We may also want to keep the new behavior to Aurora for now to get a better chance of smoking out breakage.
Comment on attachment 8855272 [details]
Bug 1354060 - Put defaultParagraphSeparator default change behind pref;

https://reviewboard.mozilla.org/r/127146/#review130158

::: editor/libeditor/HTMLEditor.h:1017
(Diff revision 1)
> -  ParagraphSeparator mDefaultParagraphSeparator = ParagraphSeparator::div;
> +  ParagraphSeparator mDefaultParagraphSeparator =
> +    Preferences::GetBool("editor.useDivForNewlines", true)
> +    ? ParagraphSeparator::div : ParagraphSeparator::br;

Okay, but please move this to the constructor in HTMLEditor.cpp. I don't like header file to require additional headers with this.

::: modules/libpref/init/all.js:1154
(Diff revision 1)
>  pref("editor.singleLine.pasteNewlines",      2);
>  pref("editor.use_css",                       false);
>  pref("editor.css.default_length_unit",       "px");
>  pref("editor.resizing.preserve_ratio",       true);
>  pref("editor.positioning.offset",            0);
> +pref("editor.useDivForNewlines",             true);

Perhaps, "editor.use_div_for_default_newlines" is better for consistency with the other prefs of editor.*.
Attachment #8855272 - Flags: review?(masayuki) → review+
Comment on attachment 8855272 [details]
Bug 1354060 - Put defaultParagraphSeparator default change behind pref;

https://reviewboard.mozilla.org/r/127146/#review130158

> Perhaps, "editor.use_div_for_default_newlines" is better for consistency with the other prefs of editor.*.

Ah, and if you don't release it for a while, use |#ifdef EARLY_BETA_OR_EARLIER| like this: https://reviewboard.mozilla.org/r/125956/diff/3#index_header
Priority: -- → P2
Pushed by ayg@aryeh.name:
https://hg.mozilla.org/integration/autoland/rev/adc83a5de17d
Put defaultParagraphSeparator default change behind pref; r=masayuki
Do you want this only for Aurora for now?  Or only for Aurora/beta?  So far there are two regressions.  (But bug 1355792 isn't fixed by turning off the pref, as of initial testing.)
Flags: needinfo?(masayuki)
Oops, bug 1355792 is a regression from a different bug, never mind that.  Only one regression so far, and it was a side problem (not because of the actual change to <div> but because of a bug in the implementation).
Aurora won't be available. So, I think that we should use |#ifdef EARLY_BETA_OR_EARLIER| instead.

If I were you and you won't go away on April 26, I'd make it ride train. However, I have other complicated jobs now. So, I cannot follow the regression of this. So, perhaps, only enabling it on Nightly and early Beta is safer for now.
Flags: needinfo?(masayuki)
https://hg.mozilla.org/mozilla-central/rev/adc83a5de17d
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: