Closed Bug 1500609 Opened Last year Closed Last year

layout/generic/nsFrame.cpp:5223:20: error: use of undeclared identifier 'CachedFlexMeasuringReflow'

Categories

(Core :: Layout: Flexbox, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: mats, Assigned: mats)

Details

Attachments

(2 files, 1 obsolete file)

I'm adding a new file under layout/generic/ and it triggered
this build error, presumably because nsFrame.cpp/nsFlexContainerFrame.cpp
are no longer in the same compilation unit.
Attached patch wallpaper (obsolete) — Splinter Review
I hacked this up temporarily to be able to build...
Does this look like a reasonable fix to you?
Flags: needinfo?(dholbert)
Sure, this seems fine.  Nit: might want to add "Mark" to the beginning of the funciton-name, for consistency & more-obvious-connection to MarkIntrinsicISizesDirty().  (The current name "FlexItemIntrinsicISizesDirty()" almost sounds like it could be a const boolean getter, rather than a function that actively does something.)

Maybe "MarkCachedFlexMeasurementsDirty", or something like that?
Flags: needinfo?(dholbert)
Totally makes sense that this would be a build failure, too -- looks like CachedFlexMeasuringReflow is declared inside of nsFlexContainerFrame.cpp (and nowhere else), so it's bogus to reference it from nsFrame.cpp.

  https://dxr.mozilla.org/mozilla-central/search?q=CachedFlexMeasuringReflow
Attached patch fixSplinter Review
Assignee: nobody → mats
Attachment #9018734 - Attachment is obsolete: true
Attachment #9018772 - Flags: review?(dholbert)
Attached patch fix2Splinter Review
Apparently the above patch wasn't enough for non-DEBUG builds:

 0:19.87 In file included from layout/base/nsLayoutUtils.h:31:
 0:19.87 mozilla/ToString.h:26:10: error: invalid operands to binary expression ('std::ostringstream' (aka 'basic_ostringstream<char>') and 'const nsReflowStatus')
 0:19.87   stream << aValue;
 0:19.87   ~~~~~~ ^  ~~~~~~
 0:19.87 layout/generic/nsColumnSetFrame.cpp:746:22: note: in instantiation of function template specialization 'mozilla::ToString<nsReflowStatus>' requested here
 0:19.87                      ToString(aStatus).c_str());
 0:19.87                      ^

So I'll tag along this fix too...
Pushed by mpalmgren@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e1fde2f49f84
part 1 - Add a nsFlexContainerFrame method to remove cached data that depend on flex items' intrinsic isize (idempotent patch).  r=dholbert
https://hg.mozilla.org/integration/mozilla-inbound/rev/ea09443dac28
part 2 - Make the declaration of operator<< for nsReflowStatus unconditional since it's needed to build some COLUMN_SET_LOG expression in nsColumnSetFrame.cpp (idempotent patch).  r=me
https://hg.mozilla.org/mozilla-central/rev/e1fde2f49f84
https://hg.mozilla.org/mozilla-central/rev/ea09443dac28
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.