frame state bits now all defined in nsFrameStateBits.h

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

frame state bits now all defined in nsFrameStateBits.h

Cameron McCormack-4
FYI, I've just landed bug 960848 which changed nsFrameState from a
typedefed uint64_t to an enum, and moved all of the #defines that were
in various frame class header files into a single, pre-processed file,
nsFrameStateBits.h.  This gives us slightly more type safety.

It also provides the ability to iterate over the frame state bit names,
which I've used in bug 960899 to write a function that can print out a
frame's state symbolically.  You can use it like this:

(gdb) p this
$1 = (nsTextFrame*) 0x........
(gdb) p/x mState
$2 = (nsFrameState) 0x0000004080604000
(gdb) call mozilla::PrintFrameState(this)
TEXT_HAS_NONCOLLAPSED_CHARACTERS | TEXT_END_OF_LINE | TEXT_START_OF_LINE
| NS_FRAME_PAINTED_THEBES | NS_FRAME_INDEPENDENT_SELECTION
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: frame state bits now all defined in nsFrameStateBits.h

Cameron McCormack-4
On 18/01/2014 6:17 PM, Cameron McCormack wrote:
> FYI, I've just landed bug 960848 which changed nsFrameState from a
> typedefed uint64_t to an enum, and moved all of the #defines that were
> in various frame class header files into a single, pre-processed file,
> nsFrameStateBits.h.  This gives us slightly more type safety.

This caused problems on Windows, partly because it looks like VC++ isn't
doing performing implicit conversions of sized enums to an int of an
appropriate size, which caused compile errors, and some test failures
after fixing the compile errors, so I've backed it out for now.
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: frame state bits now all defined in nsFrameStateBits.h

Cameron McCormack-4
Cameron McCormack wrote:
> This caused problems on Windows, partly because it looks like VC++ isn't
> doing performing implicit conversions of sized enums to an int of an
> appropriate size, which caused compile errors, and some test failures
> after fixing the compile errors, so I've backed it out for now.

This re-landed.
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout