First sentence is missing or clipped when printing a inline PDF
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Jan 2012 19:24:38 +0000 (19:24 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Jan 2012 19:24:38 +0000 (19:24 +0000)
        https://bugs.webkit.org/show_bug.cgi?id=75514
        <rdar://problem/10640680>

        Reviewed by Dan Bernstein.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::headerHeight):
        (WebKit::WebPageProxy::footerHeight):
        (WebKit::WebPageProxy::drawHeader):
        (WebKit::WebPageProxy::drawFooter):
        Do not ask the client about headers and footers when printing a PDF.

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/WebPageProxy.cpp

index f910d3a..688bcc2 100644 (file)
@@ -1,3 +1,18 @@
+2012-01-04  Alexey Proskuryakov  <ap@apple.com>
+
+        First sentence is missing or clipped when printing a inline PDF
+        https://bugs.webkit.org/show_bug.cgi?id=75514
+        <rdar://problem/10640680>
+
+        Reviewed by Dan Bernstein.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::headerHeight):
+        (WebKit::WebPageProxy::footerHeight):
+        (WebKit::WebPageProxy::drawHeader):
+        (WebKit::WebPageProxy::drawFooter):
+        Do not ask the client about headers and footers when printing a PDF.
+
 2012-01-04  Alexander Færøy  <alexander.faeroy@nokia.com>
 
         [Qt] Fix test regressions after r104025
index 6af2cf4..15abf9c 100644 (file)
@@ -3321,21 +3321,29 @@ void WebPageProxy::showNotification(const String& title, const String& body, con
 
 float WebPageProxy::headerHeight(WebFrameProxy* frame)
 {
+    if (frame->isDisplayingPDFDocument())
+        return 0;
     return m_uiClient.headerHeight(this, frame);
 }
 
 float WebPageProxy::footerHeight(WebFrameProxy* frame)
 {
+    if (frame->isDisplayingPDFDocument())
+        return 0;
     return m_uiClient.footerHeight(this, frame);
 }
 
 void WebPageProxy::drawHeader(WebFrameProxy* frame, const FloatRect& rect)
 {
+    if (frame->isDisplayingPDFDocument())
+        return;
     m_uiClient.drawHeader(this, frame, rect);
 }
 
 void WebPageProxy::drawFooter(WebFrameProxy* frame, const FloatRect& rect)
 {
+    if (frame->isDisplayingPDFDocument())
+        return;
     m_uiClient.drawFooter(this, frame, rect);
 }