[webkit-changes] cvs commit: WebCore/kwq KWQKHTMLPart.h KWQKHTMLPart.mm WebCoreBridge.h

John sullivan at opensource.apple.com
Mon Dec 5 16:23:52 PST 2005


sullivan    05/12/05 16:23:52

  Modified:    .        ChangeLog
               kwq      KWQKHTMLPart.h KWQKHTMLPart.mm WebCoreBridge.h
  Log:
          Reviewed by Darin Adler.
  
          Fixed a problem from the patch to fix <rdar://problem/4365690>. After that checkin, KWQKHTMLPart was
          inadvertently left with both centerSelectionInVisibleArea() and centerSelectionInVisibleArea() const.
  
          * kwq/KWQKHTMLPart.h:
          renamed centerSelectionInVisibleArea() to revealSelection(). This is the method that
          was named jumpToSelection() before my recent checkin.
  
          * kwq/KWQKHTMLPart.mm:
          (KWQKHTMLPart::findString):
          call revealSelection() rather than centerSelectionInVisibleArea(); this restores the
          behavior from before my recent checkin.
          (KWQKHTMLPart::revealSelection):
          renamed from centerSelectionInVisibleArea()
          (KWQKHTMLPart::advanceToNextMisspelling):
          call revealSelection() rather than centerSelectionInVisibleArea(); this restores the
          behavior from before my recent checkin.
  
          * kwq/WebCoreBridge.h:
          removed one of the two declarations of centerSelectionInVisibleArea()
  
  Revision  Changes    Path
  1.476     +24 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.475
  retrieving revision 1.476
  diff -u -r1.475 -r1.476
  --- ChangeLog	5 Dec 2005 22:19:09 -0000	1.475
  +++ ChangeLog	6 Dec 2005 00:23:39 -0000	1.476
  @@ -1,5 +1,29 @@
   2005-12-05  John Sullivan  <sullivan at apple.com>
   
  +        Reviewed by Darin Adler.
  +
  +        Fixed a problem from the patch to fix <rdar://problem/4365690>. After that checkin, KWQKHTMLPart was
  +        inadvertently left with both centerSelectionInVisibleArea() and centerSelectionInVisibleArea() const.
  +
  +        * kwq/KWQKHTMLPart.h:
  +        renamed centerSelectionInVisibleArea() to revealSelection(). This is the method that
  +        was named jumpToSelection() before my recent checkin.
  +        
  +        * kwq/KWQKHTMLPart.mm:
  +        (KWQKHTMLPart::findString):
  +        call revealSelection() rather than centerSelectionInVisibleArea(); this restores the
  +        behavior from before my recent checkin.
  +        (KWQKHTMLPart::revealSelection):
  +        renamed from centerSelectionInVisibleArea()
  +        (KWQKHTMLPart::advanceToNextMisspelling):
  +        call revealSelection() rather than centerSelectionInVisibleArea(); this restores the
  +        behavior from before my recent checkin.
  +
  +        * kwq/WebCoreBridge.h:
  +        removed one of the two declarations of centerSelectionInVisibleArea()
  +
  +2005-12-05  John Sullivan  <sullivan at apple.com>
  +
           Reviewed by Tim Omernick.
           
           Removed some dead code I happened to stumble across. No test cases added.
  
  
  
  1.236     +3 -1      WebCore/kwq/KWQKHTMLPart.h
  
  Index: KWQKHTMLPart.h
  ===================================================================
  RCS file: /cvs/root/WebCore/kwq/KWQKHTMLPart.h,v
  retrieving revision 1.235
  retrieving revision 1.236
  diff -u -r1.235 -r1.236
  --- KWQKHTMLPart.h	5 Dec 2005 22:01:28 -0000	1.235
  +++ KWQKHTMLPart.h	6 Dec 2005 00:23:45 -0000	1.236
  @@ -143,7 +143,6 @@
       void scheduleHistoryNavigation( int steps );
       
       void scrollToAnchor(const KURL &);
  -    void centerSelectionInVisibleArea();
       QString advanceToNextMisspelling(bool startBeforeSelection = false);
       bool scrollOverflow(KWQScrollDirection direction, KWQScrollGranularity granularity);
       
  @@ -235,6 +234,9 @@
   
       QRect selectionRect() const;
       NSRect visibleSelectionRect() const;
  +    // Scrolls as necessary to reveal the selection
  +    void revealSelection();
  +    // Centers the selection regardless of whether it was already visible
       void centerSelectionInVisibleArea() const;
       NSImage *selectionImage() const;
       NSImage *snapshotDragImage(DOM::NodeImpl *node, NSRect *imageRect, NSRect *elementRect) const;
  
  
  
  1.696     +3 -3      WebCore/kwq/KWQKHTMLPart.mm
  
  Index: KWQKHTMLPart.mm
  ===================================================================
  RCS file: /cvs/root/WebCore/kwq/KWQKHTMLPart.mm,v
  retrieving revision 1.695
  retrieving revision 1.696
  diff -u -r1.695 -r1.696
  --- KWQKHTMLPart.mm	5 Dec 2005 22:01:29 -0000	1.695
  +++ KWQKHTMLPart.mm	6 Dec 2005 00:23:46 -0000	1.696
  @@ -636,7 +636,7 @@
       }
   
       setSelection(SelectionController(resultRange.get(), DOWNSTREAM, VP_UPSTREAM_IF_POSSIBLE));
  -    centerSelectionInVisibleArea();
  +    revealSelection();
       return true;
   }
   
  @@ -910,7 +910,7 @@
       KWQ_UNBLOCK_EXCEPTIONS;
   }
   
  -void KWQKHTMLPart::centerSelectionInVisibleArea()
  +void KWQKHTMLPart::revealSelection()
   {
       if (d->m_selection.start().isNotNull()) {
           if (selectionStart() && selectionStart()->renderer()) {
  @@ -1007,7 +1007,7 @@
                       misspellingRange->setEnd(chars.range()->startContainer(exception), chars.range()->startOffset(exception), exception);
   
                       setSelection(SelectionController(misspellingRange.get(), DOWNSTREAM, VP_UPSTREAM_IF_POSSIBLE));
  -                    centerSelectionInVisibleArea();
  +                    revealSelection();
                       // Mark misspelling in document.
                       xmlDocImpl()->addMarker(misspellingRange.get(), DocumentMarker::Spelling);
                       return result;
  
  
  
  1.353     +0 -1      WebCore/kwq/WebCoreBridge.h
  
  Index: WebCoreBridge.h
  ===================================================================
  RCS file: /cvs/root/WebCore/kwq/WebCoreBridge.h,v
  retrieving revision 1.352
  retrieving revision 1.353
  diff -u -r1.352 -r1.353
  --- WebCoreBridge.h	5 Dec 2005 22:01:30 -0000	1.352
  +++ WebCoreBridge.h	6 Dec 2005 00:23:49 -0000	1.353
  @@ -296,7 +296,6 @@
   - (NSString *)matchLabels:(NSArray *)labels againstElement:(DOMElement *)element;
   
   - (BOOL)searchFor:(NSString *)string direction:(BOOL)forward caseSensitive:(BOOL)caseFlag wrap:(BOOL)wrapFlag;
  -- (void)centerSelectionInVisibleArea;
   
   - (NSString *)advanceToNextMisspelling;
   - (NSString *)advanceToNextMisspellingStartingJustBeforeSelection;
  
  
  



More information about the webkit-changes mailing list