Reviewed by Kevin Decker and Darin Adler
authorsullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Jul 2007 17:53:01 +0000 (17:53 +0000)
committersullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Jul 2007 17:53:01 +0000 (17:53 +0000)
        - fixed <rdar://problem/5337529> Holes in Find banner overlay on PDF pages are left in wrong place after changing scale

        * WebView/WebPDFView.mm:
        (-[WebPDFView _scaleOrDisplayModeChanged:]):
        tell UI delegate that the entire PDF view has been redrawn

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

WebKit/ChangeLog
WebKit/WebView/WebPDFView.mm

index ccc7d9106d8bfb5f8c4963f45d23fe9cc2db1069..40112102434b31143eba0c9324a318de173cf8d7 100644 (file)
@@ -1,3 +1,13 @@
+2007-07-16  John Sullivan  <sullivan@apple.com>
+
+        Reviewed by Kevin Decker and Darin Adler
+        
+        - fixed <rdar://problem/5337529> Holes in Find banner overlay on PDF pages are left in wrong place after changing scale
+
+        * WebView/WebPDFView.mm:
+        (-[WebPDFView _scaleOrDisplayModeChanged:]):
+        tell UI delegate that the entire PDF view has been redrawn
+
 2007-07-14  Brady Eidson  <beidson@apple.com>
 
         Reviewed by Sam Weinig
index 060e9c5142943c934548723f5a945ce5f9b589a6..f63764e3ee905eaf41b458a2c4beb51925c7a9c6 100644 (file)
@@ -1190,7 +1190,7 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec
     }
     PDFSelection *foundSelection = [document findString:string fromSelection:selectionForInitialSearch withOptions:options];
     [selectionForInitialSearch release];
-    
+
     // If we first searched in the selection, and we found the selection, search again from just past the selection
     if (startInSelection && _PDFSelectionsAreEqual(foundSelection, initialSelection))
         foundSelection = [document findString:string fromSelection:initialSelection withOptions:options];
@@ -1302,8 +1302,13 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec
 - (void)_scaleOrDisplayModeChanged:(NSNotification *)notification
 {
     ASSERT([notification object] == PDFSubview);
-    if (!_ignoreScaleAndDisplayModeNotifications)
+    if (!_ignoreScaleAndDisplayModeNotifications) {
         [self _updatePreferencesSoon];
+        // Notify UI delegate that the entire page has been redrawn, since (unlike for WebHTMLView)
+        // we can't hook into the drawing mechanism itself. This fixes 5337529.
+        WebView *webView = [self _webView];
+        [[webView _UIDelegateForwarder] webView:webView didDrawRect:[webView bounds]];
+    }
 }
 
 - (NSAttributedString *)_scaledAttributedString:(NSAttributedString *)unscaledAttributedString