Changeset 66371 in webkit


Ignore:
Timestamp:
Aug 30, 2010 12:35:30 AM (14 years ago)
Author:
abarth@webkit.org
Message:

2010-08-30 Adam Barth <abarth@webkit.org>

Reviewed by Darin Adler.

WebCore::RenderBlock::addChild* NULL ptrs
https://bugs.webkit.org/show_bug.cgi?id=43722

  • fast/ruby/before-doesnt-crash-expected.txt: Added.
  • fast/ruby/before-doesnt-crash.html: Added.

2010-08-30 Adam Barth <abarth@webkit.org>

Reviewed by Darin Adler.

WebCore::RenderBlock::addChild* NULL ptrs
https://bugs.webkit.org/show_bug.cgi?id=43722

Also includes some cleanup of comments and ASSERTs.

Test: fast/ruby/before-doesnt-crash.html

  • rendering/RenderRuby.cpp: (WebCore::RenderRubyAsInline::addChild):
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r66359 r66371  
     12010-08-30  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        WebCore::RenderBlock::addChild* NULL ptrs
     6        https://bugs.webkit.org/show_bug.cgi?id=43722
     7
     8        * fast/ruby/before-doesnt-crash-expected.txt: Added.
     9        * fast/ruby/before-doesnt-crash.html: Added.
     10
    1112010-08-29  Adam Barth  <abarth@webkit.org>
    212
  • trunk/WebCore/ChangeLog

    r66370 r66371  
     12010-08-30  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        WebCore::RenderBlock::addChild* NULL ptrs
     6        https://bugs.webkit.org/show_bug.cgi?id=43722
     7
     8        Also includes some cleanup of comments and ASSERTs.
     9
     10        Test: fast/ruby/before-doesnt-crash.html
     11
     12        * rendering/RenderRuby.cpp:
     13        (WebCore::RenderRubyAsInline::addChild):
     14
    1152010-08-30  Marc-Antoine Ruel  <maruel@chromium.org>
    216
  • trunk/WebCore/rendering/RenderRuby.cpp

    r54758 r66371  
    7676void RenderRubyAsInline::addChild(RenderObject* child, RenderObject* beforeChild)
    7777{
    78     // Note: ':after' content is handled implicitely below
     78    // Note: ':after' content is handled implicitly below
    7979
    80     // if child is a ruby run, just add it normally
    8180    if (child->isRubyRun()) {
    8281        RenderInline::addChild(child, beforeChild);
     
    8483    }
    8584
    86     if (beforeChild && !isAfterContent(beforeChild)) {
    87         // insert child into run
    88         ASSERT(!beforeChild->isRubyRun());
    89         RenderRubyRun* run = findRubyRunParent(beforeChild);
    90         ASSERT(run); // beforeChild should always have a run as parent
    91         if (run) {
     85    if (beforeChild && !isAfterContent(beforeChild) && !beforeChild->isRubyRun()) {
     86        if (RenderRubyRun* run = findRubyRunParent(beforeChild)) {
    9287            run->addChild(child, beforeChild);
    9388            return;
    9489        }
    95         ASSERT(false); // beforeChild should always have a run as parent!
     90        ASSERT_NOT_REACHED(); // beforeChild should always have a run as parent!
    9691        // Emergency fallback: fall through and just append.
    9792    }
Note: See TracChangeset for help on using the changeset viewer.