On Thursday 2014-10-16 05:32 -0700, Nicholas Nethercote wrote: > I was wondering what people think is the worst piece of code in the > entire Mozilla codebase. I'll leave the exact meanings of "worst" and > "piece of code" unspecified...
I'd probably pick the table and row height computation code in the table layout code. There's row height code in nsTableRowGroupFrame::ReflowChildren, nsTableRowGroupFrame::CalculateRowHeights, nsTableRowGroupFrame::GetHeightBasis, and nsTableRowFrame::CalculateCellActualHeight, which then has interesting interactions with table/cell height code via things like the mPercentHeightObserver member of nsHTMLReflowState and nsTableCellFrame::NotifyPercentHeight, and the SpecialHeightReflow concept in nsTableFrame. (The worst bit is that we could have massively simplified it and sped it up by matching IE6's much cleaner model, but now it's probably too late for that since other browsers have copied us.) -David -- 𝄞 L. David Baron http://dbaron.org/ 𝄂 𝄢 Mozilla https://www.mozilla.org/ 𝄂 Before I built a wall I'd ask to know What I was walling in or walling out, And to whom I was like to give offense. - Robert Frost, Mending Wall (1914)
signature.asc
Description: Digital signature
_______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform