I'd hope that compilers could optimize this to the equivalent of what we
do now (rewriting the whole thing in condensed form in derived classes).
Sounds good to me.
Agreed, as long as we check that compilers actually optimize that well.
(it may even be that if we do the below change that optimizers would
have an even easier time optimizing it).
What was the reasoning behind IsFrameOfType/IsContentOfType having the
signature they have, instead of using methods that return a flags word?
The latter is a bit more expressive and may avoid multiple method calls
in some (hypothetical) cases.
I was, reluctantly, following the precedent of IsContentOfType (now
IsNodeOfType) when I created IsFrameOfType. Having virtual NodeType()
and FrameType() and then inline IsNodeOfType/IsFrameOfType wrapping them
is definitely a better solution performance-wise.
There are already places where we call IsNodeOfType multiple times.
/ Jonas
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout