Changeset 246717 in webkit


Ignore:
Timestamp:
Jun 22, 2019 2:09:51 PM (5 years ago)
Author:
Alan Bujtas
Message:

[LFC][IFC] The anonymous InlineBox wrapper for the text node should take the parent style.
https://bugs.webkit.org/show_bug.cgi?id=199127
<rdar://problem/52017744>

Reviewed by Antti Koivisto.

<span style="vertical-align: bottom">bottom aligned text</span>
The InlineBox wrapper for the "bottom aligned text" content should take the parent span's style.

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::TreeBuilder::createSubTree):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r246716 r246717  
     12019-06-22  Zalan Bujtas  <zalan@apple.com>
     2
     3        [LFC][IFC] The anonymous InlineBox wrapper for the text node should take the parent style.
     4        https://bugs.webkit.org/show_bug.cgi?id=199127
     5        <rdar://problem/52017744>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        <span style="vertical-align: bottom">bottom aligned text</span>
     10        The InlineBox wrapper for the "bottom aligned text" content should take the parent span's style.
     11
     12        * layout/layouttree/LayoutTreeBuilder.cpp:
     13        (WebCore::Layout::TreeBuilder::createSubTree):
     14
    1152019-06-22  Antoine Quint  <graouts@apple.com>
    216
  • trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp

    r245776 r246717  
    107107
    108108        if (is<RenderText>(child)) {
    109             box = std::make_unique<InlineBox>(Optional<Box::ElementAttributes>(), RenderStyle::createAnonymousStyleWithDisplay(rootRenderer.style(), DisplayType::Inline));
     109            // FIXME: Clearly there must be a helper function for this.
     110            if (rootRenderer.style().display() == DisplayType::Inline)
     111                box = std::make_unique<InlineBox>(Optional<Box::ElementAttributes>(), RenderStyle::clone(rootRenderer.style()));
     112            else
     113                box = std::make_unique<InlineBox>(Optional<Box::ElementAttributes>(), RenderStyle::createAnonymousStyleWithDisplay(rootRenderer.style(), DisplayType::Inline));
    110114            downcast<InlineBox>(*box).setTextContent(downcast<RenderText>(child).originalText());
    111115        } else if (is<RenderLineBreak>(child)) {
Note: See TracChangeset for help on using the changeset viewer.