[TablesNG] TablePart style adjustments
Legacy tables code does two style adjustments that need to be modified for TablesNG. 1) Legacy cannot handle position:relative/fixed on Section/Rows, but TablesNG can. In Legacy, style used to be modified in style_adjuster.cc:AdjustStyleForDisplay AdjustStyleForDisplay does not know if style is layout object is legacy, or ng. Therefore, style adjustment cannot be done here. The adjustment code was moved to LayoutObjectFactory, which knows type of object being created. 2) Legacy cells cannot handle orthogonal writing modes. Cell writing mode is reset to parent's writing mode. This one was tricky, because neither AdjustStyleForDisplay, nor LayoutObject factory have data needed to modify the style. AdjustStyleForDisplay does not know if layout object is legacy or ng. LayoutObjectFactory does not have parent's writing mode. One option is to plumb parent's style to LayoutObjectFactory. There is a lot of layers here, and feels like an unnecessary complexity just to support temporary table weirdness. My solution was to modify cell's style in LayoutTableRow::AddChild. It is hacky, but I believe it is safe. Bug: 958381 Change-Id: I77dd9c7a253282d0f8647c9add0b5c1fc908d8eb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2356849 Commit-Queue: Aleks Totic <atotic@chromium.org> Reviewed-by:Morten Stenshorne <mstensho@chromium.org> Reviewed-by:
Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/master@{#800505}
Showing
Please register or sign in to comment