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

Changeset 207980 in webkit


Ignore:
Timestamp:
Oct 27, 2016, 3:19:51 AM (10 years ago)
Author:
Carlos Garcia Campos
Message:

Merge r207631 - Stop searching for first-letter containers at multi-column boundary.
​https://bugs.webkit.org/show_bug.cgi?id=163739
<rdar://problem/28810750>

Source/WebCore:

We should not cross the multi-column boundary while searching for the first-letter container.
While moving first-letter renderers to a multi-column parent, it could result in finding the wrong
container and end up adding a new wrapper under the original container (from where we are moving the renderers).

Reviewed by David Hyatt.

Test: fast/css-generated-content/first-letter-move-to-multicolumn-crash.html

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::moveChildrenTo):

  • rendering/RenderTextFragment.cpp:

(WebCore::RenderTextFragment::blockForAccompanyingFirstLetter):

LayoutTests:

Reviewed by David Hyatt.

  • fast/css-generated-content/first-letter-move-to-multicolumn-crash-expected.txt: Added.
  • fast/css-generated-content/first-letter-move-to-multicolumn-crash.html: Added.
Location:
releases/WebKitGTK/webkit-2.14
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • releases/WebKitGTK/webkit-2.14/LayoutTests/ChangeLog

    r207974 r207980  
     12016-10-20  Zalan Bujtas  <zalan@apple.com>
     2
     3        Stop searching for first-letter containers at multi-column boundary.
     4        https://bugs.webkit.org/show_bug.cgi?id=163739
     5        <rdar://problem/28810750>
     6
     7        Reviewed by David Hyatt.
     8
     9        * fast/css-generated-content/first-letter-move-to-multicolumn-crash-expected.txt: Added.
     10        * fast/css-generated-content/first-letter-move-to-multicolumn-crash.html: Added.
     11
    1122016-10-19  Zalan Bujtas  <zalan@apple.com>
    213
  • releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog

    r207979 r207980  
     12016-10-20  Zalan Bujtas  <zalan@apple.com>
     2
     3        Stop searching for first-letter containers at multi-column boundary.
     4        https://bugs.webkit.org/show_bug.cgi?id=163739
     5        <rdar://problem/28810750>
     6
     7        We should not cross the multi-column boundary while searching for the first-letter container.
     8        While moving first-letter renderers to a multi-column parent, it could result in finding the wrong
     9        container and end up adding a new wrapper under the original container (from where we are moving the renderers).   
     10
     11        Reviewed by David Hyatt.
     12
     13        Test: fast/css-generated-content/first-letter-move-to-multicolumn-crash.html
     14
     15        * rendering/RenderBoxModelObject.cpp:
     16        (WebCore::RenderBoxModelObject::moveChildrenTo):
     17        * rendering/RenderTextFragment.cpp:
     18        (WebCore::RenderTextFragment::blockForAccompanyingFirstLetter):
     19
    1202016-10-20  Carlos Alberto Lopez Perez  <clopez@igalia.com>
    221
  • releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderBoxModelObject.cpp

    r202927 r207980  
    25302530        RenderObject* nextSibling = child->nextSibling();
    25312531       
     2532        // FIXME: This logic here fails to detect the first letter in certain cases
     2533        // and skips a valid sibling renderer (see webkit.org/b/163737).
    25322534        // Check to make sure we're not saving the firstLetter as the nextSibling.
    25332535        // When the |child| object will be moved, its firstLetter will be recreated,
    2534         // so saving it now in nextSibling would let us with a destroyed object.
     2536        // so saving it now in nextSibling would leave us with a stale object.
    25352537        if (is<RenderTextFragment>(*child) && is<RenderText>(nextSibling)) {
    25362538            RenderObject* firstLetterObj = nullptr;
  • releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderTextFragment.cpp

    r200098 r207980  
    2626#include "RenderBlock.h"
    2727#include "RenderIterator.h"
     28#include "RenderMultiColumnFlowThread.h"
    2829#include "Text.h"
    2930
    … …  
    113114        return nullptr;
    114115    for (auto& block : ancestorsOfType<RenderBlock>(*m_firstLetter)) {
     116        if (is<RenderMultiColumnFlowThread>(block))
     117            break;
    115118        if (block.style().hasPseudoStyle(FIRST_LETTER) && block.canHaveChildren())
    116119            return &block;
Note: See TracChangeset for help on using the changeset viewer.