Summary: | [LFC][TFC] Add rowSpan and colSpan to Box | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | zalan <zalan> | ||||
Component: | Layout and Rendering | Assignee: | zalan <zalan> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | bfulgham, commit-queue, koivisto, simon.fraser, webkit-bug-importer, zalan | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
zalan
2019-08-12 20:05:42 PDT
Created attachment 376135 [details]
Patch
Comment on attachment 376135 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=376135&action=review > Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp:193 > + if (is<RenderTableCell>(renderer)) { > + auto& cellElement = downcast<HTMLTableCellElement>(*renderer.element()); > + auto rowSpan = cellElement.rowSpan(); > + if (rowSpan > 1) > + childLayoutBox->setRowSpan(rowSpan); > + > + auto columnSpan = cellElement.colSpan(); > + if (columnSpan > 1) > + childLayoutBox->setColumnSpan(columnSpan); > + } You will probably also need invalidation for dynamic changes. See RenderTableCell::colSpanOrRowSpanChanged and callers. (In reply to Antti Koivisto from comment #3) > Comment on attachment 376135 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=376135&action=review > > > Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp:193 > > + if (is<RenderTableCell>(renderer)) { > > + auto& cellElement = downcast<HTMLTableCellElement>(*renderer.element()); > > + auto rowSpan = cellElement.rowSpan(); > > + if (rowSpan > 1) > > + childLayoutBox->setRowSpan(rowSpan); > > + > > + auto columnSpan = cellElement.colSpan(); > > + if (columnSpan > 1) > > + childLayoutBox->setColumnSpan(columnSpan); > > + } > > You will probably also need invalidation for dynamic changes. See > RenderTableCell::colSpanOrRowSpanChanged and callers. Absolutely. At this point LFC does not deal with incremental changes. Each layout frame starts from scratch. Comment on attachment 376135 [details] Patch Clearing flags on attachment: 376135 Committed r248594: <https://trac.webkit.org/changeset/248594> All reviewed patches have been landed. Closing bug. |