Title: [154624] branches/safari-537-branch

Diff

Modified: branches/safari-537-branch/Source/WebCore/ChangeLog (154623 => 154624)


--- branches/safari-537-branch/Source/WebCore/ChangeLog	2013-08-26 18:41:26 UTC (rev 154623)
+++ branches/safari-537-branch/Source/WebCore/ChangeLog	2013-08-26 18:42:06 UTC (rev 154624)
@@ -1,5 +1,29 @@
 2013-08-26  Lucas Forschler  <[email protected]>
 
+        Merge r154528
+
+    2013-08-23  Beth Dakin  <[email protected]>
+
+            REGRESSION (r132545): Some PDFs generated by WebKit are blank when viewed in 
+            Adobe Reader
+            https://bugs.webkit.org/show_bug.cgi?id=120240
+            -and corresponding-
+            <rdar://problem/14634453>
+
+            Reviewed by Anders Carlsson.
+
+            This patch makes it so that we don’t use the infinite rect for the PDF context, 
+            and it adds WebCoreSystemInterface API to find out if the current content is the 
+            PDF context. 
+
+            * WebCore.exp.in:
+            * platform/graphics/cg/GraphicsContextCG.cpp:
+            (WebCore::GraphicsContext::clipOut):
+            * platform/mac/WebCoreSystemInterface.h:
+            * platform/mac/WebCoreSystemInterface.mm:
+
+2013-08-26  Lucas Forschler  <[email protected]>
+
         Merge r154529
 
     2013-08-23  Jer Noble  <[email protected]>

Modified: branches/safari-537-branch/Source/WebCore/WebCore.exp.in (154623 => 154624)


--- branches/safari-537-branch/Source/WebCore/WebCore.exp.in	2013-08-26 18:41:26 UTC (rev 154623)
+++ branches/safari-537-branch/Source/WebCore/WebCore.exp.in	2013-08-26 18:42:06 UTC (rev 154624)
@@ -1702,6 +1702,7 @@
 _stringIsCaseInsensitiveEqualToString
 _suggestedFilenameWithMIMEType
 _wkCGContextGetShouldSmoothFonts
+_wkCGContextIsPDFContext
 _wkCGContextResetClip
 _wkCGPatternCreateWithImageAndTransform
 _wkCTRunGetInitialAdvance

Modified: branches/safari-537-branch/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (154623 => 154624)


--- branches/safari-537-branch/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp	2013-08-26 18:41:26 UTC (rev 154623)
+++ branches/safari-537-branch/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp	2013-08-26 18:42:06 UTC (rev 154624)
@@ -838,9 +838,10 @@
 
     // FIXME: Using CGRectInfinite is much faster than getting the clip bounding box. However, due
     // to <rdar://problem/12584492>, CGRectInfinite can't be used with an accelerated context that
-    // has certain transforms that aren't just a translation or a scale.
+    // has certain transforms that aren't just a translation or a scale. And due to <rdar://problem/14634453>
+    // we cannot use it in for a printing context either.
     const AffineTransform& ctm = getCTM();
-    bool canUseCGRectInfinite = !isAcceleratedContext() || (!ctm.b() && !ctm.c());
+    bool canUseCGRectInfinite = !wkCGContextIsPDFContext(platformContext()) && (!isAcceleratedContext() || (!ctm.b() && !ctm.c()));
     CGRect rects[2] = { canUseCGRectInfinite ? CGRectInfinite : CGContextGetClipBoundingBox(platformContext()), rect };
     CGContextBeginPath(platformContext());
     CGContextAddRects(platformContext(), rects, 2);

Modified: branches/safari-537-branch/Source/WebCore/platform/mac/WebCoreSystemInterface.h (154623 => 154624)


--- branches/safari-537-branch/Source/WebCore/platform/mac/WebCoreSystemInterface.h	2013-08-26 18:41:26 UTC (rev 154623)
+++ branches/safari-537-branch/Source/WebCore/platform/mac/WebCoreSystemInterface.h	2013-08-26 18:42:06 UTC (rev 154624)
@@ -205,6 +205,7 @@
 extern void (*wkSetBaseCTM)(CGContextRef, CGAffineTransform);
 extern void (*wkSetPatternPhaseInUserSpace)(CGContextRef, CGPoint);
 extern CGAffineTransform (*wkGetUserToBaseCTM)(CGContextRef);
+extern bool (*wkCGContextIsPDFContext)(CGContextRef);
 extern void (*wkSetUpFontCache)();
 extern void (*wkSignalCFReadStreamEnd)(CFReadStreamRef stream);
 extern void (*wkSignalCFReadStreamError)(CFReadStreamRef stream, CFStreamError *error);

Modified: branches/safari-537-branch/Source/WebCore/platform/mac/WebCoreSystemInterface.mm (154623 => 154624)


--- branches/safari-537-branch/Source/WebCore/platform/mac/WebCoreSystemInterface.mm	2013-08-26 18:41:26 UTC (rev 154623)
+++ branches/safari-537-branch/Source/WebCore/platform/mac/WebCoreSystemInterface.mm	2013-08-26 18:42:06 UTC (rev 154624)
@@ -95,6 +95,7 @@
 void (*wkSetBaseCTM)(CGContextRef, CGAffineTransform);
 void (*wkSetPatternPhaseInUserSpace)(CGContextRef, CGPoint point);
 CGAffineTransform (*wkGetUserToBaseCTM)(CGContextRef);
+bool (*wkCGContextIsPDFContext)(CGContextRef);
 void (*wkSetUpFontCache)();
 void (*wkSignalCFReadStreamEnd)(CFReadStreamRef stream);
 void (*wkSignalCFReadStreamHasBytes)(CFReadStreamRef stream);

Modified: branches/safari-537-branch/Source/WebKit/mac/ChangeLog (154623 => 154624)


--- branches/safari-537-branch/Source/WebKit/mac/ChangeLog	2013-08-26 18:41:26 UTC (rev 154623)
+++ branches/safari-537-branch/Source/WebKit/mac/ChangeLog	2013-08-26 18:42:06 UTC (rev 154624)
@@ -1,3 +1,23 @@
+2013-08-26  Lucas Forschler  <[email protected]>
+
+        Merge r154528
+
+    2013-08-23  Beth Dakin  <[email protected]>
+
+            REGRESSION (r132545): Some PDFs generated by WebKit are blank when viewed in 
+            Adobe Reader
+            https://bugs.webkit.org/show_bug.cgi?id=120240
+            -and corresponding-
+            <rdar://problem/14634453>
+
+            Reviewed by Anders Carlsson.
+
+            Hook up new WebSystemInterface API to find out if the current context is the PDF 
+            context.
+
+            * WebCoreSupport/WebSystemInterface.mm:
+            (InitWebCoreSystemInterface):
+
 2013-08-16  Lucas Forschler  <[email protected]>
 
         Merge r154114

Modified: branches/safari-537-branch/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm (154623 => 154624)


--- branches/safari-537-branch/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm	2013-08-26 18:41:26 UTC (rev 154623)
+++ branches/safari-537-branch/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm	2013-08-26 18:42:06 UTC (rev 154624)
@@ -102,6 +102,7 @@
     INIT(SetNSURLConnectionDefersCallbacks);
     INIT(SetNSURLRequestShouldContentSniff);
     INIT(SetPatternPhaseInUserSpace);
+    INIT(CGContextIsPDFContext);
     INIT(GetUserToBaseCTM);
     INIT(SetUpFontCache);
     INIT(SignalCFReadStreamEnd);

Modified: branches/safari-537-branch/Source/WebKit2/ChangeLog (154623 => 154624)


--- branches/safari-537-branch/Source/WebKit2/ChangeLog	2013-08-26 18:41:26 UTC (rev 154623)
+++ branches/safari-537-branch/Source/WebKit2/ChangeLog	2013-08-26 18:42:06 UTC (rev 154624)
@@ -1,3 +1,23 @@
+2013-08-26  Lucas Forschler  <[email protected]>
+
+        Merge r154528
+
+    2013-08-23  Beth Dakin  <[email protected]>
+
+            REGRESSION (r132545): Some PDFs generated by WebKit are blank when viewed in 
+            Adobe Reader
+            https://bugs.webkit.org/show_bug.cgi?id=120240
+            -and corresponding-
+            <rdar://problem/14634453>
+
+            Reviewed by Anders Carlsson.
+
+            Hook up new WebSystemInterface API to find out if the current context is the PDF 
+            context. 
+
+            * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
+            (InitWebCoreSystemInterface):
+
 2013-08-23  Lucas Forschler  <[email protected]>
 
         Merge r154473

Modified: branches/safari-537-branch/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm (154623 => 154624)


--- branches/safari-537-branch/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm	2013-08-26 18:41:26 UTC (rev 154623)
+++ branches/safari-537-branch/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm	2013-08-26 18:42:06 UTC (rev 154624)
@@ -72,6 +72,7 @@
         INIT(SignedPublicKeyAndChallengeString);
         INIT(GetPreferredExtensionForMIMEType);
         INIT(GetUserToBaseCTM);
+        INIT(CGContextIsPDFContext);
         INIT(GetWheelEventDeltas);
         INIT(GetNSEventKeyChar);
         INIT(HitTestMediaUIPart);

Modified: branches/safari-537-branch/WebKitLibraries/ChangeLog (154623 => 154624)


--- branches/safari-537-branch/WebKitLibraries/ChangeLog	2013-08-26 18:41:26 UTC (rev 154623)
+++ branches/safari-537-branch/WebKitLibraries/ChangeLog	2013-08-26 18:42:06 UTC (rev 154624)
@@ -1,3 +1,21 @@
+2013-08-26  Lucas Forschler  <[email protected]>
+
+        Merge r154528
+
+    2013-08-23  Beth Dakin  <[email protected]>
+
+            REGRESSION (r132545): Some PDFs generated by WebKit are blank when viewed in 
+            Adobe Reader
+            https://bugs.webkit.org/show_bug.cgi?id=120240
+            -and corresponding-
+            <rdar://problem/14634453>
+
+            Reviewed by Anders Carlsson.
+
+            * WebKitSystemInterface.h:
+            * libWebKitSystemInterfaceLion.a:
+            * libWebKitSystemInterfaceMountainLion.a:
+
 2013-07-22  Lucas Forschler  <[email protected]>
 
         Merge r152874

Modified: branches/safari-537-branch/WebKitLibraries/WebKitSystemInterface.h (154623 => 154624)


--- branches/safari-537-branch/WebKitLibraries/WebKitSystemInterface.h	2013-08-26 18:41:26 UTC (rev 154623)
+++ branches/safari-537-branch/WebKitLibraries/WebKitSystemInterface.h	2013-08-26 18:42:06 UTC (rev 154624)
@@ -210,6 +210,7 @@
 
 
 BOOL WKCGContextIsBitmapContext(CGContextRef context);
+bool WKCGContextIsPDFContext(CGContextRef context);
 
 void WKGetWheelEventDeltas(NSEvent *, float *deltaX, float *deltaY, BOOL *continuous);
 

Modified: branches/safari-537-branch/WebKitLibraries/libWebKitSystemInterfaceLion.a


(Binary files differ)

Modified: branches/safari-537-branch/WebKitLibraries/libWebKitSystemInterfaceMountainLion.a


(Binary files differ)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to