Title: [141359] trunk/Source/WebKit2
- Revision
- 141359
- Author
- [email protected]
- Date
- 2013-01-30 18:19:23 -0800 (Wed, 30 Jan 2013)
Log Message
PDFPlugin: Update scrollbars if PDFLayerController's display mode changes
https://bugs.webkit.org/show_bug.cgi?id=108412
<rdar://problem/13002261>
Reviewed by Simon Fraser.
* WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Add pdfLayerController:didChangeDisplayMode:
* WebProcess/Plugins/PDF/PDFPlugin.h: Add notifyDisplayModeChanged().
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(-[WKPDFLayerControllerDelegate pdfLayerController:didChangeDisplayMode:]): Forward didChangeDisplayMode to notifyDisplayModeChanged.
(WebKit::PDFPlugin::notifyDisplayModeChanged): Update content size and scrollbar size when display mode changes.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (141358 => 141359)
--- trunk/Source/WebKit2/ChangeLog 2013-01-31 02:17:35 UTC (rev 141358)
+++ trunk/Source/WebKit2/ChangeLog 2013-01-31 02:19:23 UTC (rev 141359)
@@ -1,3 +1,17 @@
+2013-01-30 Tim Horton <[email protected]>
+
+ PDFPlugin: Update scrollbars if PDFLayerController's display mode changes
+ https://bugs.webkit.org/show_bug.cgi?id=108412
+ <rdar://problem/13002261>
+
+ Reviewed by Simon Fraser.
+
+ * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Add pdfLayerController:didChangeDisplayMode:
+ * WebProcess/Plugins/PDF/PDFPlugin.h: Add notifyDisplayModeChanged().
+ * WebProcess/Plugins/PDF/PDFPlugin.mm:
+ (-[WKPDFLayerControllerDelegate pdfLayerController:didChangeDisplayMode:]): Forward didChangeDisplayMode to notifyDisplayModeChanged.
+ (WebKit::PDFPlugin::notifyDisplayModeChanged): Update content size and scrollbar size when display mode changes.
+
2013-01-30 Alexey Proskuryakov <[email protected]>
<rdar://problem/12695827> PPT: Make loading file URLs work with a sandboxed NetworkProcess
Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFLayerControllerDetails.h (141358 => 141359)
--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFLayerControllerDetails.h 2013-01-31 02:17:35 UTC (rev 141358)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFLayerControllerDetails.h 2013-01-31 02:19:23 UTC (rev 141359)
@@ -37,6 +37,7 @@
- (void)pdfLayerController:(PDFLayerController *)pdfLayerController didChangeActiveAnnotation:(PDFAnnotation *)annotation;
- (void)pdfLayerController:(PDFLayerController *)pdfLayerController clickedLinkWithURL:(NSURL *)url;
- (void)pdfLayerController:(PDFLayerController *)pdfLayerController didChangeContentScaleFactor:(CGFloat)scaleFactor;
+- (void)pdfLayerController:(PDFLayerController *)pdfLayerController didChangeDisplayMode:(int)mode;
@end
Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.h (141358 => 141359)
--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.h 2013-01-31 02:17:35 UTC (rev 141358)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.h 2013-01-31 02:19:23 UTC (rev 141359)
@@ -70,6 +70,7 @@
using ScrollableArea::notifyScrollPositionChanged;
void notifyContentScaleFactorChanged(CGFloat scaleFactor);
+ void notifyDisplayModeChanged(int);
void clickedLink(NSURL *);
void saveToPDF();
Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm (141358 => 141359)
--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm 2013-01-31 02:17:35 UTC (rev 141358)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm 2013-01-31 02:19:23 UTC (rev 141359)
@@ -187,6 +187,11 @@
_pdfPlugin->notifyContentScaleFactorChanged(scaleFactor);
}
+- (void)pdfLayerController:(PDFLayerController *)pdfLayerController didChangeDisplayMode:(int)mode
+{
+ _pdfPlugin->notifyDisplayModeChanged(mode);
+}
+
@end
namespace WebKit {
@@ -751,6 +756,12 @@
updateScrollbars();
}
+void PDFPlugin::notifyDisplayModeChanged(int)
+{
+ calculateSizes();
+ updateScrollbars();
+}
+
void PDFPlugin::saveToPDF()
{
// FIXME: We should probably notify the user that they can't save before the document is finished loading.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes