Closed Bug 1484306 Opened Last year Closed Last year

Add utility functions to nsFrameList

Categories

(Core :: Layout, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

Details

Attachments

(4 files)

The usage pattern "find the first frame which satisfies a condition, and use it the split frame list" [1] is common in ib-split code. I'll add more while implementing column-span. So I'll add nsFrameList::Split() so that the pattern is easier to use.

[1] https://searchfox.org/mozilla-central/rev/246f2b4fab2c1a6cca99418bc2e4d73d1102cc38/layout/base/nsCSSFrameConstructor.cpp#11237-11239
Use it to implement FindFirstBlock() and FindFirstNonBlock(). This is a
demonstration on how Find() is used. The usage of them will be overhauled in
Part 2 and 3.
Comment on attachment 9002048 [details]
Bug 1484306 Part 1 - Add nsFrameList::FrameLinkEnumerator::Find().

Daniel Holbert [:dholbert] has approved the revision.
Attachment #9002048 - Flags: review+
Comment on attachment 9002050 [details]
Bug 1484306 Part 2 - Add nsFrameList::Split(), and use it to replace the usage of FindFirstNonBlock().

Daniel Holbert [:dholbert] has approved the revision.
Attachment #9002050 - Flags: review+
Comment on attachment 9002051 [details]
Bug 1484306 Part 3 - Use nsFrameList::Split() to replace the usage of FindFirstBlock().

Daniel Holbert [:dholbert] has approved the revision.
Attachment #9002051 - Flags: review+
Comment on attachment 9002162 [details]
Bug 1484306 Part 4 - Use FunctionTypeTraits to yield better error message if aPredicate's signature is wrong.

Gerald Squelart [:gerald] has approved the revision.
Attachment #9002162 - Flags: review+
Pushed by aethanyc@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/82e6a73d8985
Part 1 - Add nsFrameList::FrameLinkEnumerator::Find(). r=dholbert
https://hg.mozilla.org/integration/mozilla-inbound/rev/3b91ab5a0554
Part 2 - Add nsFrameList::Split(), and use it to replace the usage of FindFirstNonBlock(). r=dholbert
https://hg.mozilla.org/integration/mozilla-inbound/rev/c7d40b7574ca
Part 3 - Use nsFrameList::Split() to replace the usage of FindFirstBlock(). r=dholbert
https://hg.mozilla.org/integration/mozilla-inbound/rev/b2814d1bbbd7
Part 4 - Use FunctionTypeTraits to yield better error message if aPredicate's signature is wrong. r=gerald
You need to log in before you can comment on or make changes to this bug.