Rename nsHTMLScrollFrame to mozilla::ScrollContainerFrame
Categories
(Core :: Layout: Scrolling and Overflow, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox128 | --- | fixed |
People
(Reporter: TYLin, Assigned: TYLin)
References
(Blocks 1 open bug)
Details
Attachments
(6 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
Bug 1824877 Part 4 - Drop unnecessary using declarations and mozilla namespace qualifiers. r?#layout
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
After bug 1823455, we can rename nsHTMLScrollFrame to mozilla::ScrollFrame, and rename nsGfxScrollFrame.h/cpp to ScrollFrame.h/cpp.
Updated•1 year ago
|
Assignee | ||
Comment 1•3 months ago
|
||
Per https://phabricator.services.mozilla.com/D201893#6924920, we should consider removing nsIScrollableFrame
since nsHTMLScrollFrame
is the only class implementing nsIScrollableFrame
.
Assignee | ||
Comment 2•5 days ago
|
||
Remove the #include from nsFrameState.cpp
because it is not used.
Assignee | ||
Comment 3•5 days ago
|
||
-
Change the ScrollFrame::GetFrameName() to return "Scroll" instead of
"HTMLScroll". -
Replace NS_NewHTMLScrollFrame() with ScrollFrame::New() because I failed to
make thefriend
declaration work after the rename. I keep getting build
error: "calling a protected constructor of class 'mozilla::ScrollFrame'".
Updated•5 days ago
|
Assignee | ||
Comment 4•4 days ago
|
||
Let's name it ScrollContainerFrame
to align with the spec term https://drafts.csswg.org/css-overflow-3/#scroll-container
Updated•4 days ago
|
Updated•4 days ago
|
Assignee | ||
Comment 5•4 days ago
|
||
This effectively changes the IsScrollFrame()
helper to
IsScrollContainerFrame()
.
Assignee | ||
Comment 6•4 days ago
|
||
We can simplify them because ScrollContainerFrame
is within mozilla
namespace.
Assignee | ||
Comment 7•4 days ago
|
||
Assignee | ||
Comment 8•3 days ago
|
||
This is to avoid confusion with IsScrollContainerFrame()
introduced in Part 3.
A note to performance concern:
We've used IsScrollContainerOrSubclass()
in bug 1873414 to avoid expensive
nsIScrollableFrame* sf = do_QueryFrame()
. Per [1], casting from nsIFrame*
to
nsIScrollableFrame*
has no fast path.
Ideally, ScrollContainerFrame* sf = do_QueryFrame()
should be fast, and we can
use it to implement IsScrollContainerOrSubclass()
like
IsImageFrameOrSubclass()
. However, in this patch, I intend to keep the
performance metrics unchanged.
Remove GetAsScrollContainer()
since it's only used in MOZ_ASSERT
, and I'm
planning to remove nsIScrollableFrame
in bug 1896516.
Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/416d4c538f83 Part 1 - Rename nsGfxScrollFrame.{h,cpp} to ScrollContainerFrame.{h,cpp}. r=dholbert https://hg.mozilla.org/integration/autoland/rev/ef4c00fe4624 Part 2 - Rename nsHTMLScrollFrame to mozilla::ScrollContainerFrame. r=dholbert https://hg.mozilla.org/integration/autoland/rev/ce99fe13a24e Part 3 - Change ScrollContainerFrame's type from Scroll to ScrollContainer. r=dholbert https://hg.mozilla.org/integration/autoland/rev/2a498d6dc8b4 Part 4 - Drop unnecessary using declarations and mozilla namespace qualifiers. r=dholbert https://hg.mozilla.org/integration/autoland/rev/78bbb09a4cc5 Part 5 - Revise build scroll container frame APIs in frame constructor. r=dholbert https://hg.mozilla.org/integration/autoland/rev/b033344df9c7 Part 6 - Rename IsScrollContainer() to IsScrollContainerOrSubclass(). r=dholbert
Comment 10•2 days ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/416d4c538f83
https://hg.mozilla.org/mozilla-central/rev/ef4c00fe4624
https://hg.mozilla.org/mozilla-central/rev/ce99fe13a24e
https://hg.mozilla.org/mozilla-central/rev/2a498d6dc8b4
https://hg.mozilla.org/mozilla-central/rev/78bbb09a4cc5
https://hg.mozilla.org/mozilla-central/rev/b033344df9c7
Description
•