Changeset 76889 in webkit


Ignore:
Timestamp:
Jan 27, 2011 6:03:58 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-01-27 Finnur Thorarinsson <finnur.webkit@gmail.com>

Reviewed by Ojan Vafai.

This addresses a regression introduced by r75784, as described in:
https://bugs.webkit.org/show_bug.cgi?id=53176

The problem is that originalEndContainer and originalEndOffset was
meant to capture the end of the document, but was being assigned after
a call to searchRange->setStart() (when scoping is restarted), which can
result in the Range being collapsed to start (thereby assigning the
wrong value to the Container/Offset pair).

This code is never triggered by layout tests, but I'm adding a regressiono
test on the Chromium side for this.

  • src/WebFrameImpl.cpp: (WebKit::WebFrameImpl::scopeStringMatches):
Location:
trunk/Source/WebKit/chromium
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/chromium/ChangeLog

    r76876 r76889  
     12011-01-27  Finnur Thorarinsson  <finnur.webkit@gmail.com>
     2
     3        Reviewed by Ojan Vafai.
     4
     5        This addresses a regression introduced by r75784, as described in:
     6        https://bugs.webkit.org/show_bug.cgi?id=53176
     7
     8        The problem is that originalEndContainer and originalEndOffset was
     9        meant to capture the end of the document, but was being assigned after
     10        a call to searchRange->setStart() (when scoping is restarted), which can
     11        result in the Range being collapsed to start (thereby assigning the
     12        wrong value to the Container/Offset pair).
     13
     14        This code is never triggered by layout tests, but I'm adding a regressiono
     15        test on the Chromium side for this.
     16
     17        * src/WebFrameImpl.cpp:
     18        (WebKit::WebFrameImpl::scopeStringMatches):
     19
    1202011-01-27  Zhenyao Mo  <zmo@google.com>
    221
  • trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp

    r76744 r76889  
    15451545    RefPtr<Range> searchRange(rangeOfContents(frame()->document()));
    15461546
     1547    Node* originalEndContainer = searchRange->endContainer();
     1548    int originalEndOffset = searchRange->endOffset();
     1549
    15471550    ExceptionCode ec = 0, ec2 = 0;
    15481551    if (m_resumeScopingFromRange.get()) {
     
    15581561        }
    15591562    }
    1560 
    1561     Node* originalEndContainer = searchRange->endContainer();
    1562     int originalEndOffset = searchRange->endOffset();
    15631563
    15641564    // This timeout controls how long we scope before releasing control.  This
Note: See TracChangeset for help on using the changeset viewer.