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

Changeset 182835 in webkit


Ignore:
Timestamp:
Apr 14, 2015, 9:24:14 PM (11 years ago)
Author:
Alan Bujtas
Message:

Make inline continuation style change logic consistent.
https://bugs.webkit.org/show_bug.cgi?id=143737
rdar://problem/20486596

Reviewed by Simon Fraser.

Do not force RenderBlock type-casting on the first sibling of the continuation's container.
The first sibling of the container of a continuation should be handled as the rest of the siblings.

Source/WebCore:

Test: fast/inline/inline-with-column-span-and-remove-block-child-crash.html

  • rendering/RenderInline.cpp:

(WebCore::updateStyleOfAnonymousBlockContinuations):
(WebCore::RenderInline::styleDidChange):

LayoutTests:

  • fast/inline/inline-with-column-span-and-remove-block-child-crash-expected.txt: Added.
  • fast/inline/inline-with-column-span-and-remove-block-child-crash.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r182830 r182835  
     12015-04-14  Zalan Bujtas  <zalan@apple.com>
     2
     3        Make inline continuation style change logic consistent.
     4        https://bugs.webkit.org/show_bug.cgi?id=143737
     5        rdar://problem/20486596
     6
     7        Reviewed by Simon Fraser.
     8
     9        Do not force RenderBlock type-casting on the first sibling of the continuation's container.
     10        The first sibling of the container of a continuation should be handled as the rest of the siblings.
     11
     12        * fast/inline/inline-with-column-span-and-remove-block-child-crash-expected.txt: Added.
     13        * fast/inline/inline-with-column-span-and-remove-block-child-crash.html: Added.
     14
    1152015-04-14  Daniel Bates  <dabates@apple.com>
    216
  • trunk/Source/WebCore/ChangeLog

    r182829 r182835  
     12015-04-14  Zalan Bujtas  <zalan@apple.com>
     2
     3        Make inline continuation style change logic consistent.
     4        https://bugs.webkit.org/show_bug.cgi?id=143737
     5        rdar://problem/20486596
     6
     7        Reviewed by Simon Fraser.
     8
     9        Do not force RenderBlock type-casting on the first sibling of the continuation's container.
     10        The first sibling of the container of a continuation should be handled as the rest of the siblings.
     11
     12        Test: fast/inline/inline-with-column-span-and-remove-block-child-crash.html
     13
     14        * rendering/RenderInline.cpp:
     15        (WebCore::updateStyleOfAnonymousBlockContinuations):
     16        (WebCore::RenderInline::styleDidChange):
     17
    1182015-04-14  Chris Dumez  <cdumez@apple.com>
    219
  • trunk/Source/WebCore/rendering/RenderInline.cpp

    r182146 r182835  
    140140}
    141141
    142 static void updateStyleOfAnonymousBlockContinuations(RenderBlock& block, const RenderStyle* newStyle, const RenderStyle* oldStyle)
    143 {
    144     for (RenderBox* box = &block; box && box->isAnonymousBlock(); box = box->nextSiblingBox()) {
     142static void updateStyleOfAnonymousBlockContinuations(const RenderBlock& block, const RenderStyle* newStyle, const RenderStyle* oldStyle)
     143{
     144    // If any descendant blocks exist then they will be in the next anonymous block and its siblings.
     145    for (RenderBox* box = block.nextSiblingBox(); box && box->isAnonymousBlock(); box = box->nextSiblingBox()) {
    145146        if (box->style().position() == newStyle->position())
    146147            continue;
     
    186187        // then any descendant blocks will need to change their in-flow positioning accordingly.
    187188        // Do this by updating the position of the descendant blocks' containing anonymous blocks - there may be more than one.
    188         if (containingBlock()->isAnonymousBlock() && oldStyle && newStyle.position() != oldStyle->position() && (newStyle.hasInFlowPosition() || oldStyle->hasInFlowPosition())) {
    189             // If any descendant blocks exist then they will be in the next anonymous block and its siblings.
    190             ASSERT(containingBlock()->nextSibling());
    191             RenderBlock& block = downcast<RenderBlock>(*containingBlock()->nextSibling());
    192             ASSERT(block.isAnonymousBlock());
    193             updateStyleOfAnonymousBlockContinuations(block, &newStyle, oldStyle);
    194         }
     189        if (containingBlock()->isAnonymousBlock() && oldStyle && newStyle.position() != oldStyle->position() && (newStyle.hasInFlowPosition() || oldStyle->hasInFlowPosition()))
     190            updateStyleOfAnonymousBlockContinuations(*containingBlock(), &newStyle, oldStyle);
    195191    }
    196192
Note: See TracChangeset for help on using the changeset viewer.