Changeset 69345 in webkit


Ignore:
Timestamp:
Oct 7, 2010 3:00:02 PM (13 years ago)
Author:
inferno@chromium.org
Message:

2010-10-07 Abhishek Arya <inferno@chromium.org>

Reviewed by Dave Hyatt.

Set the m_selectedChildren flag on the root inline box if one of the leaf
inline box from the bidi runs walk has a selection state. Remove the flag
setting logic from addToLine, since line boxes created in createLinesBoxes
should not be propagating selection state to root inline box.
https://bugs.webkit.org/show_bug.cgi?id=47201

Test: editing/selection/root-inlinebox-selected-children-crash.html

  • rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::addToLine):
  • rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::constructLine):

2010-10-07 Abhishek Arya <inferno@chromium.org>

Reviewed by Dave Hyatt.

Tests that we don't crash while setting selected children on the root inline box.
https://bugs.webkit.org/show_bug.cgi?id=47201

  • editing/selection/root-inlinebox-selected-children-crash-expected.txt: Added.
  • editing/selection/root-inlinebox-selected-children-crash.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r69342 r69345  
     12010-10-07  Abhishek Arya  <inferno@chromium.org>
     2
     3        Reviewed by Dave Hyatt.
     4
     5        Tests that we don't crash while setting selected children on the root inline box.
     6        https://bugs.webkit.org/show_bug.cgi?id=47201
     7
     8        * editing/selection/root-inlinebox-selected-children-crash-expected.txt: Added.
     9        * editing/selection/root-inlinebox-selected-children-crash.html: Added.
     10
    1112010-10-07  Albert J. Wong  <ajwong@chromium.org>
    212
  • trunk/WebCore/ChangeLog

    r69344 r69345  
     12010-10-07  Abhishek Arya  <inferno@chromium.org>
     2
     3        Reviewed by Dave Hyatt.
     4
     5        Set the m_selectedChildren flag on the root inline box if one of the leaf
     6        inline box from the bidi runs walk has a selection state. Remove the flag
     7        setting logic from addToLine, since line boxes created in createLinesBoxes
     8        should not be propagating selection state to root inline box.
     9        https://bugs.webkit.org/show_bug.cgi?id=47201
     10
     11        Test: editing/selection/root-inlinebox-selected-children-crash.html
     12
     13        * rendering/InlineFlowBox.cpp:
     14        (WebCore::InlineFlowBox::addToLine):
     15        * rendering/RenderBlockLineLayout.cpp:
     16        (WebCore::RenderBlock::constructLine):
     17
    1182010-10-07  Benjamin Otte  <otte@gnome.org>
    219
  • trunk/WebCore/rendering/InlineFlowBox.cpp

    r69341 r69345  
    8484    if (child->isText())
    8585        m_hasTextChildren = true;
    86     if (child->renderer()->selectionState() != RenderObject::SelectionNone)
    87         root()->setHasSelectedChildren(true);
    8886
    8987    checkConsistency();
  • trunk/WebCore/rendering/RenderBlockLineLayout.cpp

    r69341 r69345  
    239239    ASSERT(firstRun);
    240240
     241    bool rootHasSelectedChildren = false;
    241242    InlineFlowBox* parentBox = 0;
    242243    for (BidiRun* r = firstRun; r; r = r->next()) {
     
    252253        if (!box)
    253254            continue;
     255
     256        if (!rootHasSelectedChildren && box->renderer()->selectionState() != RenderObject::SelectionNone)
     257            rootHasSelectedChildren = true;
    254258
    255259        // If we have no parent box yet, or if the run is not simply a sibling,
     
    279283    // be the last continuation of our line list.
    280284    ASSERT(lastLineBox() && !lastLineBox()->isConstructed());
     285
     286    // Set the m_selectedChildren flag on the root inline box if one of the leaf inline box
     287    // from the bidi runs walk above has a selection state.
     288    if (rootHasSelectedChildren)
     289        lastLineBox()->root()->setHasSelectedChildren(true);
    281290
    282291    // Set bits on our inline flow boxes that indicate which sides should
Note: See TracChangeset for help on using the changeset viewer.