Closed Bug 1227001 Opened 9 years ago Closed 9 years ago

Probably get rid of SetupBreakSinksFlags?

Categories

(Core :: Layout: Text and Fonts, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: xidorn, Assigned: xidorn)

Details

Attachments

(3 files)

It seems to me that SetupBreakSinksFlags completely makes no sense. Its three values:
SBS_DOUBLE_BYTE is set according to mDoubleByteText
SBS_EXISTING_TEXTRUN is never set
SBS_SUPPRESS_SINK is set according to mSkipIncompleteTextRuns

SetupBreakSinksForTextRun which accepts the flags is a method of BuildTextRunsScanner, which can access mDoubleByteText and mSkipIncompleteTextRuns. I don't see any reason why we need those flags there.
These flags was added in bug 703100 without explanation why they were necessary.
SBS_EXISTING_TEXTRUN never makes sense since its existing, because the only place set aExistingTextRun parameter of SetupBreakSinksForTextRun to true is removed in the bug created this constant.
Bug 1227001 part 1 - Remove SetupBreakSinksFlags from BuildTextRunsScanner.
Attachment #8690598 - Flags: review?(jfkthame)
Bug 1227001 part 2 - Remove no longer used mExistingTextRun from BreakSink.
Attachment #8690599 - Flags: review?(jfkthame)
Bug 1227001 part 3 - Remove no longer used mChangedBreaks from BreakSink.
Attachment #8690600 - Flags: review?(jfkthame)
Comment on attachment 8690598 [details]
MozReview Request: Bug 1227001 part 1 - Remove SetupBreakSinksFlags from BuildTextRunsScanner.

https://reviewboard.mozilla.org/r/25871/#review23311

Yeah, AFAICS this is fine. I don't remember anything specific about these flags; clearly they were just replacing existing bool parameters with a single flags word, but as you note, when we look a bit more closely there's no actual need to pass them at all. Thanks for the cleanup!
Attachment #8690598 - Flags: review?(jfkthame) → review+
Comment on attachment 8690599 [details]
MozReview Request: Bug 1227001 part 2 - Remove no longer used mExistingTextRun from BreakSink.

https://reviewboard.mozilla.org/r/25873/#review23313
Attachment #8690599 - Flags: review?(jfkthame) → review+
Attachment #8690600 - Flags: review?(jfkthame) → review+
Comment on attachment 8690600 [details]
MozReview Request: Bug 1227001 part 3 - Remove no longer used mChangedBreaks from BreakSink.

https://reviewboard.mozilla.org/r/25875/#review23315
https://hg.mozilla.org/integration/mozilla-inbound/rev/110de326fa1a77de38da6e4c088af5ec837cba06
Bug 1227001 part 1 - Remove SetupBreakSinksFlags from BuildTextRunsScanner. r=jfkthame

https://hg.mozilla.org/integration/mozilla-inbound/rev/4e16f87eda8902ba514f240032c9a00a7835da95
Bug 1227001 part 2 - Remove no longer used mExistingTextRun from BreakSink. r=jfkthame

https://hg.mozilla.org/integration/mozilla-inbound/rev/536455795509134faa9321924793a189c63ba104
Bug 1227001 part 3 - Remove no longer used mChangedBreaks from BreakSink. r=jfkthame
Assignee: nobody → quanxunzhen
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: