Closed Bug 1898083 Opened 1 year ago Closed 1 year ago

Fix documentation for HidesContentForLayout

Categories

(Core :: Layout, task)

task

Tracking

()

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

Details

Attachments

(1 file)

Quoting our documentation:

https://searchfox.org/mozilla-central/rev/21823adb7d8117239b7021fa5997d3234369568a/layout/generic/nsIFrame.h#3305-3320

/**
 * Whether this frame hides its contents via the `content-visibility`
 * property.
 * @param aInclude specifies what kind of `content-visibility` to include.
 */
bool HidesContent(const mozilla::EnumSet<IncludeContentVisibility>& =
                      IncludeAllContentVisibility()) const;

/**
 * Whether this frame hides its contents via the `content-visibility`
 * property, while doing layout. This might be true when `HidesContent()` is
 * true in the case that hidden content is being forced to lay out by position
 * or size queries from script.
 */
bool HidesContentForLayout() const;

In the HidesContentForLayout documentation, the phrase 'This might be true when HidesContent() is true' sounds like maybe it's got its words mixed up -- I suspect it really wants to say "...is false "This might be false" (i.e. we're trying to call out the case where the two functions return different answers), right?

[EDIT: Clarified to swap which part of the comment was actually wrong, per phabricator]

Flags: needinfo?(emilio)

Yeah, that's correct.

Flags: needinfo?(emilio)

DONTBUILD because comment-only change

Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Pushed by dholbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9cfa01a4488e Fix documentation for nsIFrame::HidesContentForLayout. r=emilio
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: