Closed Bug 1543571 Opened 9 months ago Closed 9 months ago

More on replacing reflow state with reflow input

Categories

(Core :: Layout, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

Details

Attachments

(5 files)

There are still many "reflow state" in layout code. Let's get rid of them.

This patch is generated by the following script on Linux:

function rename() {
find .
-type f
! -path "./obj*"
! -path "./.git"
! -path "./.hg"
( -name ".cpp" -or
-name "
.h" )
-exec sed -i -e "s/$1/$2/g" "{}" ;
}
rename "reflow state" "reflow input"

This patch is generated by the following script running on Linux:

function rename() {
find .
-type f
! -path "./obj*"
! -path "./.git"
! -path "./.hg"
( -name ".cpp" -or
-name "
.h" )
-exec sed -i -e "s/$1/$2/g" "{}" ;
}
rename DUMMY_PARENT_REFLOW_STATE DUMMY_PARENT_REFLOW_INPUT

Depends on D27022

nsBlockReflowState is rename to BlockReflowInput in bug 1277129, so
remove the "Html" in the variable name.

Also, remove the comment "ReflowBlock will initialize it." because
ReflowInput::Init() is called in the constructor. We are not using
ReflowInput::CALLER_WILL_INIT flag here.

Depends on D27023

As requested in a comment on part 1, could you add a "Part 4" here that does...

 s/  state/  input/

...for the 5 mentions of "reflow state" that are unfortunately wrapped across a newline in this block:
https://searchfox.org/mozilla-central/rev/69ace9da347adcc4a33c6fa3d8e074759b91068c/layout/generic/ReflowInput.cpp#301-331

(Those are the only ones I ran across, I think)

Flags: needinfo?(aethanyc)

This is a follow-up for Part 1. I find all the candidates by running the
following command under layout/, and manually replace them.

ag -A 1 reflow$ | ag -B 1 state

Depends on D27024

(In reply to Daniel Holbert [:dholbert] from comment #4)

As requested in a comment on part 1, could you add a "Part 4" here that does...

 s/  state/  input/

...for the 5 mentions of "reflow state" that are unfortunately wrapped across a newline in this block:
https://searchfox.org/mozilla-central/rev/69ace9da347adcc4a33c6fa3d8e074759b91068c/layout/generic/ReflowInput.cpp#301-331

(Those are the only ones I ran across, I think)

Sure, I upload Part 4 to fix them. There are more in other files, but the command I use (in comment 6) should be able to find all of them.

Flags: needinfo?(aethanyc)
Pushed by aethanyc@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/dfe3306614fd
Part 0 - Adjust a comment to prevent it from being adjusted in Part 1. r=dholbert
https://hg.mozilla.org/integration/autoland/rev/4eb0aa21e01d
Part 1 - Replace "reflow state" with "reflow input". r=dholbert
https://hg.mozilla.org/integration/autoland/rev/2668dff6a521
Part 2 - Replace DUMMY_PARENT_REFLOW_STATE with DUMMY_PARENT_REFLOW_INPUT. r=dholbert
https://hg.mozilla.org/integration/autoland/rev/cb49246c2a26
Part 3 - Rename blockHtmlRI to blockReflowInput in nsBlockFrame::ReflowBlockFrame(). r=dholbert
https://hg.mozilla.org/integration/autoland/rev/1a92c531a9af
Part 4 - Manually replace "reflow state" with "reflow input" that are break across lines. r=dholbert
You need to log in before you can comment on or make changes to this bug.