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

Changeset 176295 in webkit


Ignore:
Timestamp:
Nov 18, 2014, 4:37:35 PM (12 years ago)
Author:
hyatt@apple.com
Message:

REGRESSION (r167210): Invalid cast in WebCore::RenderBlock::blockSelectionGaps
https://bugs.webkit.org/show_bug.cgi?id=137590

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/block/selection-block-gaps-crash.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::blockSelectionGaps):
Check that we really are a RenderBlock before recurring.

LayoutTests:

  • fast/block/selection-block-gap-crash-expected.txt: Added.
  • fast/block/selection-block-gap-crash.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r176294 r176295  
     12014-11-18  David Hyatt  <hyatt@apple.com>
     2
     3        REGRESSION (r167210): Invalid cast in WebCore::RenderBlock::blockSelectionGaps
     4        https://bugs.webkit.org/show_bug.cgi?id=137590
     5
     6        Reviewed by Dean Jackson.
     7
     8        * fast/block/selection-block-gap-crash-expected.txt: Added.
     9        * fast/block/selection-block-gap-crash.html: Added.
     10
    1112014-11-18  Andreas Kling  <akling@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r176294 r176295  
     12014-11-18  David Hyatt  <hyatt@apple.com>
     2
     3        REGRESSION (r167210): Invalid cast in WebCore::RenderBlock::blockSelectionGaps
     4        https://bugs.webkit.org/show_bug.cgi?id=137590
     5
     6        Reviewed by Dean Jackson.
     7
     8        Added fast/block/selection-block-gaps-crash.html
     9
     10        * rendering/RenderBlock.cpp:
     11        (WebCore::RenderBlock::blockSelectionGaps):
     12        Check that we really are a RenderBlock before recurring.
     13
    1142014-11-18  Andreas Kling  <akling@apple.com>
    215
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r176262 r176295  
    19571957            lastLogicalLeft = logicalLeftSelectionOffset(rootBlock, curr->logicalBottom(), cache);
    19581958            lastLogicalRight = logicalRightSelectionOffset(rootBlock, curr->logicalBottom(), cache);
    1959         } else if (childState != SelectionNone) {
     1959        } else if (childState != SelectionNone && is<RenderBlock>(*curr)) {
    19601960            // We must be a block that has some selected object inside it.  Go ahead and recur.
    19611961            result.unite(downcast<RenderBlock>(*curr).selectionGaps(rootBlock, rootBlockPhysicalPosition, LayoutSize(offsetFromRootBlock.width() + curr->x(), offsetFromRootBlock.height() + curr->y()),
Note: See TracChangeset for help on using the changeset viewer.