Changeset 25617 in webkit


Ignore:
Timestamp:
Sep 18, 2007 10:23:22 AM (17 years ago)
Author:
harrison
Message:

WebCore:

Reviewed by Darin.

<rdar://problem/5486974> REGRESSION(r25373): 1/4 second to doubleclick word in GMail when using Kotoeri IM, also slow in other IMs (15163)

Updated tests:

  • fast/dom/Window/window-xy-properties-expected.txt:
  • fast/dom/plugin-attributes-enumeration-expected.txt:
  • fast/events/onerror-bubbling-expected.txt:
  • fast/events/related-target-expected.txt:
  • fast/forms/select-namedItem-expected.txt:
  • fast/table/incomplete-table-in-fragment-2-expected.txt:
  • fast/table/incomplete-table-in-fragment-hang-expected.txt:
  • fast/table/large-rowspan-crash-expected.txt:
  • plugins/embed-attributes-setting-expected.txt:
  • editing/TextIterator.cpp: (WebCore::TextIterator::shouldRepresentNodeOffsetZero): Avoid VisiblePosition check if the current node is a descendant of the start container and the start offset was 0. In that case we already had enough context to correctly decide whether to emit a newline after a preceding block. We chose not to emit (m_haveEmitted is false), so don't second guess that.


(WebCore::TextIterator::exitNode):
Changed some comments.

LayoutTests:

Reviewed by Darin.

Updated for:
<rdar://problem/5486974> REGRESSION(r25373): 1/4 second to doubleclick word in GMail when using Kotoeri IM, also slow in other IMs (15163)

NOTE: This reverts the test result changes I made for rdar://5472125, back to not emitting
a newline for collapsed block or hr at start of range.


  • fast/dom/Window/window-xy-properties-expected.txt:
  • fast/dom/plugin-attributes-enumeration-expected.txt:
  • fast/events/onerror-bubbling-expected.txt:
  • fast/events/related-target-expected.txt:
  • fast/forms/select-namedItem-expected.txt:
  • fast/table/incomplete-table-in-fragment-2-expected.txt:
  • fast/table/incomplete-table-in-fragment-hang-expected.txt:
  • fast/table/large-rowspan-crash-expected.txt:
  • plugins/embed-attributes-setting-expected.txt:
Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r25598 r25617  
     12007-09-18  David Harrison  <harrison@apple.com>
     2
     3        Reviewed by Darin.
     4
     5        Updated for:
     6        <rdar://problem/5486974> REGRESSION(r25373): 1/4 second to doubleclick word in GMail when using Kotoeri IM, also slow in other IMs (15163)
     7
     8        NOTE: This reverts the test result changes I made for rdar://5472125, back to not emitting
     9        a newline for collapsed block or hr at start of range.
     10               
     11        * fast/dom/Window/window-xy-properties-expected.txt:
     12        * fast/dom/plugin-attributes-enumeration-expected.txt:
     13        * fast/events/onerror-bubbling-expected.txt:
     14        * fast/events/related-target-expected.txt:
     15        * fast/forms/select-namedItem-expected.txt:
     16        * fast/table/incomplete-table-in-fragment-2-expected.txt:
     17        * fast/table/incomplete-table-in-fragment-hang-expected.txt:
     18        * fast/table/large-rowspan-crash-expected.txt:
     19        * plugins/embed-attributes-setting-expected.txt:
     20
    1212007-09-17  Antti Koivisto  <antti@apple.com>
    222
  • trunk/LayoutTests/fast/dom/Window/window-xy-properties-expected.txt

    r25586 r25617  
    1 
    21PASS event.clientX is 50
    32PASS event.clientY is 50
  • trunk/LayoutTests/fast/dom/plugin-attributes-enumeration-expected.txt

    r25586 r25617  
    1 
    21[OBJECT, EMBED, APPLET] share:
    32align
  • trunk/LayoutTests/fast/events/onerror-bubbling-expected.txt

    r25586 r25617  
    1 
    21PASS: inline script load error bubbled
    32PASS: dynamic script load error bubbled
  • trunk/LayoutTests/fast/events/related-target-expected.txt

    r25586 r25617  
    1 
    21This test checks that the relatedTarget property is set on mouse out and mouse over events.
    32
  • trunk/LayoutTests/fast/forms/select-namedItem-expected.txt

    r25586 r25617  
    1 
    21Test for HTMLSelectElement.namedItem()
    32
  • trunk/LayoutTests/fast/table/incomplete-table-in-fragment-2-expected.txt

    r25586 r25617  
    1 
    21Test error handling for incomplete tables inside a document fragment. These should not crash or hang.
    32
  • trunk/LayoutTests/fast/table/incomplete-table-in-fragment-hang-expected.txt

    r25586 r25617  
    1 
    21Test error handling for incomplete tables inside a document fragment. These should not crash or hang.
    32
  • trunk/LayoutTests/fast/table/large-rowspan-crash-expected.txt

    r25586 r25617  
    1 
    21If the browser didn't crash, the test passed.
  • trunk/LayoutTests/plugins/embed-attributes-setting-expected.txt

    r25586 r25617  
    1 
    21[Embed is element specified in markup]
    32PASS: embed.getAttribute('align') should be 1 and is.
  • trunk/WebCore/ChangeLog

    r25612 r25617  
     12007-09-18  David Harrison  <harrison@apple.com>
     2
     3        Reviewed by Darin.
     4
     5        <rdar://problem/5486974> REGRESSION(r25373): 1/4 second to doubleclick word in GMail when using Kotoeri IM, also slow in other IMs (15163)
     6
     7        Updated tests:
     8        * fast/dom/Window/window-xy-properties-expected.txt:
     9        * fast/dom/plugin-attributes-enumeration-expected.txt:
     10        * fast/events/onerror-bubbling-expected.txt:
     11        * fast/events/related-target-expected.txt:
     12        * fast/forms/select-namedItem-expected.txt:
     13        * fast/table/incomplete-table-in-fragment-2-expected.txt:
     14        * fast/table/incomplete-table-in-fragment-hang-expected.txt:
     15        * fast/table/large-rowspan-crash-expected.txt:
     16        * plugins/embed-attributes-setting-expected.txt:
     17
     18        * editing/TextIterator.cpp:
     19        (WebCore::TextIterator::shouldRepresentNodeOffsetZero):
     20        Avoid VisiblePosition check if the current node is a descendant
     21        of the start container and the start offset was 0. In that case
     22        we already had enough context to correctly decide whether to emit
     23        a newline after a preceding block. We chose not to emit
     24        (m_haveEmitted is false), so don't second guess that.
     25           
     26        (WebCore::TextIterator::exitNode):
     27        Changed some comments.
     28
    1292007-09-17  Geoffrey Garen  <ggaren@apple.com>
    230
  • trunk/WebCore/editing/TextIterator.cpp

    r25522 r25617  
    521521    // is whether the inline vs block flow changed since the previous visible element.
    522522    // I think we're already in a special enough case that that won't be needed, tho.
     523
     524    // If we are at the start, obviously no newline is needed.
     525    if (m_node == m_startContainer)
     526        return false;
     527   
     528    // If we are outside the start container's subtree, assume we need a newline.
     529    // FIXME: m_startContainer could be an inline block
     530    if (!m_node->isDescendantOf(m_startContainer))
     531        return true;
     532
     533    // If we started as m_startContainer offset 0 and the current node is a descendant of
     534    // the start container, we already had enough context to correctly decide whether to
     535    // emit a newline after a preceding block. We chose not to emit (m_haveEmitted is false),
     536    // so don't second guess that now.
     537    // NOTE: Is this really correct when m_node is not a leftmost descendant? Probably
     538    // immaterial since we likely would have already emitted something by now.
     539    if (m_startOffset == 0)
     540        return false;
     541   
    523542    // The currPos.isNotNull() check is needed because positions in non-html content
    524543    // (like svg) do not have visible positions, and we don't want to emit for them either.
    525     if (m_node == m_startContainer)
    526         return false;
    527    
    528     if (!m_node->isDescendantOf(m_startContainer))
    529         return true;
    530    
    531544    VisiblePosition startPos = VisiblePosition(m_startContainer, m_startOffset, DOWNSTREAM);
    532545    VisiblePosition currPos = VisiblePosition(m_node, 0, DOWNSTREAM);
     
    568581{
    569582    // prevent emitting a newline when exiting a collapsed block at beginning of the range
     583    // FIXME: !m_haveEmitted does not necessarily mean there was a collapsed block... it could
     584    // have been an hr (e.g.). Also, a collapsed block could have height (e.g. a table) and
     585    // therefore look like a blank line.
    570586    if (!m_haveEmitted)
    571587        return;
     
    576592    Node* baseNode = m_node->lastChild() ? m_node->lastChild() : m_node;
    577593    // FIXME: This shouldn't require the m_lastTextNode to be true, but we can't change that without making
    578     // the logic in _web_attributedStringFromRange match.  We'll get that for free when we switch to use TextIterator in _web_attributedStringFromRange.
     594    // the logic in _web_attributedStringFromRange match.  We'll get that for free when we switch to use
     595    // TextIterator in _web_attributedStringFromRange.
    579596    // See <rdar://problem/5428427> for an example of how this mismatch will cause problems.
    580597    if (m_lastTextNode && shouldEmitNewlineAfterNode(m_node)) {
Note: See TracChangeset for help on using the changeset viewer.