Reviewed by Sam "The Intern" Weinig.
authoroliver <oliver@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jun 2007 06:38:16 +0000 (06:38 +0000)
committeroliver <oliver@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jun 2007 06:38:16 +0000 (06:38 +0000)
        Don't be overzealous with the input checks, firstRectForCharacterRange
        can be determined even when there is not an active editable region.

        This unbreaks editing/input/range-for-empty-document which was broken
        by aforementioned overzealousness.

        * WebView/WebHTMLView.mm:
        (-[WebHTMLView firstRectForCharacterRange:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@22063 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/ChangeLog
WebKit/WebView/WebHTMLView.mm

index 6688683057535fd23bd479909eb66d41c25fbb70..7f9b94c8e24cbcfb7f8e23e6cc69eec01d25411a 100644 (file)
@@ -1,3 +1,16 @@
+2007-06-07  Oliver Hunt  <oliver@apple.com>
+
+        Reviewed by Sam "The Intern" Weinig.
+        
+        Don't be overzealous with the input checks, firstRectForCharacterRange
+        can be determined even when there is not an active editable region.
+        
+        This unbreaks editing/input/range-for-empty-document which was broken
+        by aforementioned overzealousness. 
+
+        * WebView/WebHTMLView.mm:
+        (-[WebHTMLView firstRectForCharacterRange:]):
+
 2007-06-07  Oliver Hunt  <oliver@apple.com>
 
         Reviewed by Justin.
index e55562e75180bb8386377dda8c15e2c91678a8dc..7fa8ebc4eaabeba31daefed4f38eef75130144ed 100644 (file)
@@ -5271,10 +5271,7 @@ BOOL isTextInput(Frame *coreFrame)
 }
 
 - (NSRect)firstRectForCharacterRange:(NSRange)theRange
-{
-    if (!isTextInput(core([self _frame])))
-        return NSMakeRect(0,0,0,0);
-    
+{    
     WebFrameBridge *bridge = [self _bridge];
     
     // Just to match NSTextView's behavior. Regression tests cannot detect this;