[webkit-changes] cvs commit: LayoutTests/fast/dom inner-text-rtl-expected.txt inner-text-rtl.html

Darin darin at opensource.apple.com
Sat Dec 10 12:34:46 PST 2005


darin       05/12/10 12:34:46

  Modified:    .        ChangeLog
               khtml/editing visible_text.cpp
               kwq      KWQListImpl.h KWQListImpl.mm KWQPtrList.h
               .        ChangeLog
  Added:       fast/dom inner-text-rtl-expected.txt inner-text-rtl.html
  Log:
  LayoutTests:
  
          Reviewed and landed by Darin.
  
          Test for: http://bugzilla.opendarwin.org/show_bug.cgi?id=6029
          plainText() returns a partial result when the node contains RTL text
  
          * fast/dom/inner-text-rtl-expected.txt: Added.
          * fast/dom/inner-text-rtl.html: Added.
  
  WebCore:
  
          Reviewed and landed by Darin.
  
          - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6029
            plainText() returns a partial result when the node contains RTL text
  
          Test: fast/dom/inner-text-rtl.html
  
          * khtml/editing/visible_text.cpp:
          (khtml::TextIterator::handleTextBox): Avoid advancing m_sortedTextBoxes if textBoxEnd wasn't reached.
          * kwq/KWQListImpl.h:
          * kwq/KWQListImpl.mm:
          (KWQListImpl::getNext): Added.
          (KWQListImpl::getPrev): Added.
          * kwq/KWQPtrList.h:
          (QPtrList::getNext): Added.
          (QPtrList::getPrev): Added.
  
  Revision  Changes    Path
  1.502     +19 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.501
  retrieving revision 1.502
  diff -u -r1.501 -r1.502
  --- ChangeLog	10 Dec 2005 20:21:48 -0000	1.501
  +++ ChangeLog	10 Dec 2005 20:34:34 -0000	1.502
  @@ -1,5 +1,24 @@
   2005-12-10  Mitz Pettel  <opendarwin.org at mitzpettel.com>
   
  +        Reviewed and landed by Darin.
  +
  +        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6029
  +          plainText() returns a partial result when the node contains RTL text
  +
  +        Test: fast/dom/inner-text-rtl.html
  +
  +        * khtml/editing/visible_text.cpp:
  +        (khtml::TextIterator::handleTextBox): Avoid advancing m_sortedTextBoxes if textBoxEnd wasn't reached.
  +        * kwq/KWQListImpl.h:
  +        * kwq/KWQListImpl.mm:
  +        (KWQListImpl::getNext): Added.
  +        (KWQListImpl::getPrev): Added.
  +        * kwq/KWQPtrList.h:
  +        (QPtrList::getNext): Added.
  +        (QPtrList::getPrev): Added.
  +
  +2005-12-10  Mitz Pettel  <opendarwin.org at mitzpettel.com>
  +
           Reviewed by Hyatt, landed by Darin.
   
           - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=5826
  
  
  
  1.43      +5 -1      WebCore/khtml/editing/visible_text.cpp
  
  Index: visible_text.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/editing/visible_text.cpp,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- visible_text.cpp	1 Dec 2005 10:32:15 -0000	1.42
  +++ visible_text.cpp	10 Dec 2005 20:34:42 -0000	1.43
  @@ -287,7 +287,7 @@
           int runEnd = kMin(textBoxEnd, end);
           
           // Determine what the next text box will be, but don't advance yet
  -        InlineTextBox *nextTextBox = renderer->containsReversedText() ? m_sortedTextBoxes.next() : m_textBox->nextTextBox();
  +        InlineTextBox *nextTextBox = renderer->containsReversedText() ? m_sortedTextBoxes.getNext() : m_textBox->nextTextBox();
   
           if (runStart < runEnd) {
               // Handle either a single newline character (which becomes a space),
  @@ -327,10 +327,14 @@
                   m_lastTextNodeEndedWithCollapsedSpace = true; // collapsed space between runs or at the end
               }
               m_textBox = nextTextBox;
  +            if (renderer->containsReversedText())
  +                m_sortedTextBoxes.next();
               return;
           }
           // Advance and continue
           m_textBox = nextTextBox;
  +        if (renderer->containsReversedText())
  +            m_sortedTextBoxes.next();
       }
   }
   
  
  
  
  1.9       +2 -0      WebCore/kwq/KWQListImpl.h
  
  Index: KWQListImpl.h
  ===================================================================
  RCS file: /cvs/root/WebCore/kwq/KWQListImpl.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- KWQListImpl.h	3 Jul 2005 09:45:08 -0000	1.8
  +++ KWQListImpl.h	10 Dec 2005 20:34:42 -0000	1.9
  @@ -56,6 +56,8 @@
   
       void *getFirst() const;
       void *getLast() const;
  +    void *getNext() const;
  +    void *getPrev() const;
       void *current() const;
       void *first();
       void *last();
  
  
  
  1.24      +10 -0     WebCore/kwq/KWQListImpl.mm
  
  Index: KWQListImpl.mm
  ===================================================================
  RCS file: /cvs/root/WebCore/kwq/KWQListImpl.mm,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- KWQListImpl.mm	3 Oct 2005 21:13:06 -0000	1.23
  +++ KWQListImpl.mm	10 Dec 2005 20:34:43 -0000	1.24
  @@ -373,6 +373,16 @@
       return tail ? tail->data : 0;
   }
   
  +void *KWQListImpl::getNext() const
  +{
  +    return cur && cur->next ? cur->next->data : 0;
  +}
  +
  +void *KWQListImpl::getPrev() const
  +{
  +    return cur && cur->prev ? cur->prev->data : 0;
  +}
  +
   void *KWQListImpl::current() const
   {
       if (cur != NULL) {
  
  
  
  1.31      +2 -0      WebCore/kwq/KWQPtrList.h
  
  Index: KWQPtrList.h
  ===================================================================
  RCS file: /cvs/root/WebCore/kwq/KWQPtrList.h,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- KWQPtrList.h	2 Sep 2005 10:03:19 -0000	1.30
  +++ KWQPtrList.h	10 Dec 2005 20:34:43 -0000	1.31
  @@ -60,6 +60,8 @@
   
       T *getFirst() const { return (T *)impl.getFirst(); }
       T *getLast() const { return (T *)impl.getLast(); }
  +    T *getNext() const { return (T *)impl.getNext(); }
  +    T *getPrev() const { return (T *)impl.getPrev(); }
       T *current() const { return (T *)impl.current(); }
       T *first() { return (T *)impl.first(); }
       T *last() { return (T *)impl.last(); }
  
  
  
  1.137     +10 -0     LayoutTests/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/LayoutTests/ChangeLog,v
  retrieving revision 1.136
  retrieving revision 1.137
  diff -u -r1.136 -r1.137
  --- ChangeLog	10 Dec 2005 20:21:57 -0000	1.136
  +++ ChangeLog	10 Dec 2005 20:34:44 -0000	1.137
  @@ -1,3 +1,13 @@
  +2005-12-10  Mitz Pettel  <opendarwin.org at mitzpettel.com>
  +
  +        Reviewed and landed by Darin.
  +        
  +        Test for: http://bugzilla.opendarwin.org/show_bug.cgi?id=6029
  +        plainText() returns a partial result when the node contains RTL text 
  +
  +        * fast/dom/inner-text-rtl-expected.txt: Added.
  +        * fast/dom/inner-text-rtl.html: Added.
  +
   2005-12-10  Darin Adler  <darin at apple.com>
   
           New layout test for http://bugzilla.opendarwin.org/show_bug.cgi?id=5826
  
  
  
  1.1                  LayoutTests/fast/dom/inner-text-rtl-expected.txt
  
  Index: inner-text-rtl-expected.txt
  ===================================================================
  This is a test for http://bugzilla.opendarwin.org/show_bug.cgi?id=6029 plainText() returns a partial result when the node contains RTL text.
  
  The following lines should be identical.
  
  בבקשה select and copy this sentence.
  
  בבקשה select and copy this sentence.
  
  
  
  
  
  1.1                  LayoutTests/fast/dom/inner-text-rtl.html
  
  Index: inner-text-rtl.html
  ===================================================================
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html>
  <head>
  <title>plainText() returning partial result</title>
  <script type="text/javascript">
  if (window.layoutTestController)
      layoutTestController.dumpAsText();
  </script>
  </head>
  <body>
  <p>
  This is a test for <i>http://bugzilla.opendarwin.org/show_bug.cgi?id=6029
  plainText() returns a partial result when the node contains RTL text</i>.
  </p>
  <p>
  The following lines should be identical.
  </p>
  <hr>
  <p id="target">&#x05d1;&#x05d1;&#x05e7;&#x05e9;&#x05d4; select
   and copy this sentence.</p>
  <p><script type="text/javascript">
      document.write(document.getElementById('target').innerText);
  </script></p>
  </body>
  </html>
  
  
  



More information about the webkit-changes mailing list