⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 249086 in webkit


Ignore:
Timestamp:
Aug 24, 2019, 6:36:29 AM (7 years ago)
Author:
Alan Bujtas
Message:

[LFC][TFC] Add section renderers to the layout tree (THEAD/TBODY/TFOOT)
https://bugs.webkit.org/show_bug.cgi?id=201114
<rdar://problem/54664992>

Reviewed by Antti Koivisto.

Section renderers (THEAD/TBODY/TFOOT) are direct children of the RenderTable. Let's include them in the layout tree as well.

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::TreeBuilder::createTableStructure):
(WebCore::Layout::outputInlineRuns):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r249085 r249086  
     12019-08-24  Zalan Bujtas  <zalan@apple.com>
     2
     3        [LFC][TFC] Add section renderers to the layout tree (THEAD/TBODY/TFOOT)
     4        https://bugs.webkit.org/show_bug.cgi?id=201114
     5        <rdar://problem/54664992>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        Section renderers (THEAD/TBODY/TFOOT) are direct children of the RenderTable. Let's include them in the layout tree as well.
     10
     11        * layout/layouttree/LayoutTreeBuilder.cpp:
     12        (WebCore::Layout::TreeBuilder::createTableStructure):
     13        (WebCore::Layout::outputInlineRuns):
     14
    1152019-08-24  Zalan Bujtas  <zalan@apple.com>
    216
  • trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp

    r249085 r249086  
    216216    auto tableBox = makeUnique<Container>(Box::ElementAttributes { Box::ElementType::TableBox }, RenderStyle::clone(tableRenderer.style()));
    217217    appendChild(tableWrapperBox, *tableBox);
    218     while (tableChild) {
    219         TreeBuilder::createSubTree(downcast<RenderElement>(*tableChild), *tableBox);
    220         tableChild = tableChild->nextSibling();
     218    auto* sectionRenderer = tableChild;
     219    while (sectionRenderer) {
     220        auto sectionBox = createLayoutBox(tableRenderer, *sectionRenderer);
     221        appendChild(*tableBox, *sectionBox);
     222        auto& sectionContainer = downcast<Container>(*sectionBox);
     223        TreeBuilder::createSubTree(downcast<RenderElement>(*sectionRenderer), sectionContainer);
     224        sectionBox.release();
     225        sectionRenderer = sectionRenderer->nextSibling();
    221226    }
    222227    // Temporary
     
    260265        if (inlineRun->textContext())
    261266            stream << "inline text box";
    262         else 
     267        else
    263268            stream << "inline box";
    264269        stream << " at (" << inlineRun->logicalLeft() << "," << inlineRun->logicalTop() << ") size " << inlineRun->logicalWidth() << "x" << inlineRun->logicalHeight();
Note: See TracChangeset for help on using the changeset viewer.