Title: [187135] trunk/Source/WebKit2
Revision
187135
Author
simon.fra...@apple.com
Date
2015-07-21 16:31:48 -0700 (Tue, 21 Jul 2015)

Log Message

Rename the 'View' log channel to 'Printing'
https://bugs.webkit.org/show_bug.cgi?id=147172

Reviewed by Zalan Bujtas.

"View" was a terrible name for a log channel that was all about printing.
Sort the log channels.

* Platform/Logging.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView drawRect:]):
(-[WKView printOperationWithPrintInfo:forFrame:]):
* UIProcess/mac/WKPrintingView.mm:
(-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]):
(pageDidComputePageRects):
(-[WKPrintingView knowsPageRange:]):
(-[WKPrintingView drawRect:]):
(-[WKPrintingView rectForPage:]):
(-[WKPrintingView beginDocument]):
(-[WKPrintingView endDocument]):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (187134 => 187135)


--- trunk/Source/WebKit2/ChangeLog	2015-07-21 23:31:44 UTC (rev 187134)
+++ trunk/Source/WebKit2/ChangeLog	2015-07-21 23:31:48 UTC (rev 187135)
@@ -1,3 +1,26 @@
+2015-07-21  Simon Fraser  <simon.fra...@apple.com>
+
+        Rename the 'View' log channel to 'Printing'
+        https://bugs.webkit.org/show_bug.cgi?id=147172
+
+        Reviewed by Zalan Bujtas.
+
+        "View" was a terrible name for a log channel that was all about printing.
+        Sort the log channels.
+
+        * Platform/Logging.h:
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView drawRect:]):
+        (-[WKView printOperationWithPrintInfo:forFrame:]):
+        * UIProcess/mac/WKPrintingView.mm:
+        (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]):
+        (pageDidComputePageRects):
+        (-[WKPrintingView knowsPageRange:]):
+        (-[WKPrintingView drawRect:]):
+        (-[WKPrintingView rectForPage:]):
+        (-[WKPrintingView beginDocument]):
+        (-[WKPrintingView endDocument]):
+
 2015-07-21  Zalan Bujtas  <za...@apple.com>
 
         [iOS] Menu drop down such as on nike.com does not stay

Modified: trunk/Source/WebKit2/Platform/Logging.h (187134 => 187135)


--- trunk/Source/WebKit2/Platform/Logging.h	2015-07-21 23:31:44 UTC (rev 187134)
+++ trunk/Source/WebKit2/Platform/Logging.h	2015-07-21 23:31:48 UTC (rev 187135)
@@ -39,20 +39,20 @@
 
 #define WEBKIT2_LOG_CHANNELS(M) \
     M(ContextMenu) \
+    M(IDB) \
     M(IconDatabase) \
     M(InspectorServer) \
     M(KeyHandling) \
     M(Network) \
+    M(NetworkCache) \
+    M(NetworkCacheStorage) \
     M(NetworkScheduling) \
     M(Plugins) \
+    M(Printing) \
     M(RemoteLayerTree) \
     M(SessionState) \
     M(StorageAPI) \
     M(TextInput) \
-    M(View) \
-    M(IDB) \
-    M(NetworkCache) \
-    M(NetworkCacheStorage) \
 
 #define DECLARE_LOG_CHANNEL(name) \
     extern WTFLogChannel JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, name);

Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (187134 => 187135)


--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm	2015-07-21 23:31:44 UTC (rev 187134)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm	2015-07-21 23:31:48 UTC (rev 187135)
@@ -2812,7 +2812,7 @@
 
 - (void)drawRect:(NSRect)rect
 {
-    LOG(View, "drawRect: x:%g, y:%g, width:%g, height:%g", rect.origin.x, rect.origin.y, rect.size.width, rect.size.height);
+    LOG(Printing, "drawRect: x:%g, y:%g, width:%g, height:%g", rect.origin.x, rect.origin.y, rect.size.width, rect.size.height);
     _data->_page->endPrinting();
 }
 
@@ -4002,7 +4002,7 @@
 
 - (NSPrintOperation *)printOperationWithPrintInfo:(NSPrintInfo *)printInfo forFrame:(WKFrameRef)frameRef
 {
-    LOG(View, "Creating an NSPrintOperation for frame '%s'", toImpl(frameRef)->url().utf8().data());
+    LOG(Printing, "Creating an NSPrintOperation for frame '%s'", toImpl(frameRef)->url().utf8().data());
 
     // FIXME: If the frame cannot be printed (e.g. if it contains an encrypted PDF that disallows
     // printing), this function should return nil.

Modified: trunk/Source/WebKit2/UIProcess/mac/WKPrintingView.mm (187134 => 187135)


--- trunk/Source/WebKit2/UIProcess/mac/WKPrintingView.mm	2015-07-21 23:31:44 UTC (rev 187134)
+++ trunk/Source/WebKit2/UIProcess/mac/WKPrintingView.mm	2015-07-21 23:31:48 UTC (rev 187135)
@@ -258,7 +258,7 @@
 
     ASSERT(firstPage > 0);
     ASSERT(firstPage <= lastPage);
-    LOG(View, "WKPrintingView requesting PDF data for pages %u...%u", firstPage, lastPage);
+    LOG(Printing, "WKPrintingView requesting PDF data for pages %u...%u", firstPage, lastPage);
 
     PrintInfo printInfo([_printOperation printInfo]);
     // Return to printing mode if we're already back to screen (e.g. due to window resizing).
@@ -317,7 +317,7 @@
         NSRect newFrameSize = NSMakeRect(0, 0, 
             ceil(lastPrintingPageRect.maxX() * view->_totalScaleFactorForPrinting), 
             ceil(lastPrintingPageRect.maxY() * view->_totalScaleFactorForPrinting));
-        LOG(View, "WKPrintingView setting frame size to x:%g y:%g width:%g height:%g", newFrameSize.origin.x, newFrameSize.origin.y, newFrameSize.size.width, newFrameSize.size.height);
+        LOG(Printing, "WKPrintingView setting frame size to x:%g y:%g width:%g height:%g", newFrameSize.origin.x, newFrameSize.origin.y, newFrameSize.size.width, newFrameSize.size.height);
         [view setFrame:newFrameSize];
 
         if ([view _isPrintingPreview]) {
@@ -374,7 +374,7 @@
 
 - (BOOL)knowsPageRange:(NSRangePointer)range
 {
-    LOG(View, "-[WKPrintingView %p knowsPageRange:], %s, %s", self, [self _hasPageRects] ? "print data is available" : "print data is not available yet", RunLoop::isMain() ? "on main thread" : "on secondary thread");
+    LOG(Printing, "-[WKPrintingView %p knowsPageRange:], %s, %s", self, [self _hasPageRects] ? "print data is available" : "print data is not available yet", RunLoop::isMain() ? "on main thread" : "on secondary thread");
     ASSERT(_printOperation == [NSPrintOperation currentOperation]);
 
     // Assuming that once we switch to printing from a secondary thread, we don't go back.
@@ -522,7 +522,7 @@
 
 - (void)drawRect:(NSRect)nsRect
 {
-    LOG(View, "WKPrintingView %p printing rect x:%g, y:%g, width:%g, height:%g%s", self, nsRect.origin.x, nsRect.origin.y, nsRect.size.width, nsRect.size.height, [self _isPrintingPreview] ? " for preview" : "");
+    LOG(Printing, "WKPrintingView %p printing rect x:%g, y:%g, width:%g, height:%g%s", self, nsRect.origin.x, nsRect.origin.y, nsRect.size.width, nsRect.size.height, [self _isPrintingPreview] ? " for preview" : "");
 
     ASSERT(_printOperation == [NSPrintOperation currentOperation]);
 
@@ -606,7 +606,7 @@
 {
     ASSERT(_printOperation == [NSPrintOperation currentOperation]);
     if (![self _hasPageRects]) {
-        LOG(View, "-[WKPrintingView %p rectForPage:%d] - data is not yet available", self, (int)page);
+        LOG(Printing, "-[WKPrintingView %p rectForPage:%d] - data is not yet available", self, (int)page);
         if (!_webFrame->page()) {
             // We may have not told AppKit how many pages there are, so it will try to print until a null rect is returned.
             return NSMakeRect(0, 0, 0, 0);
@@ -625,7 +625,7 @@
 
     IntRect rect = _printingPageRects[page - 1];
     rect.scale(_totalScaleFactorForPrinting);
-    LOG(View, "-[WKPrintingView %p rectForPage:%d] -> x %d, y %d, width %d, height %d", self, (int)page, rect.x(), rect.y(), rect.width(), rect.height());
+    LOG(Printing, "-[WKPrintingView %p rectForPage:%d] -> x %d, y %d, width %d, height %d", self, (int)page, rect.x(), rect.y(), rect.width(), rect.height());
     return rect;
 }
 
@@ -644,7 +644,7 @@
     if (isForcingPreviewUpdate)
         return;
 
-    LOG(View, "-[WKPrintingView %p beginDocument]", self);
+    LOG(Printing, "-[WKPrintingView %p beginDocument]", self);
 
     [super beginDocument];
 
@@ -659,7 +659,7 @@
     if (isForcingPreviewUpdate)
         return;
 
-    LOG(View, "-[WKPrintingView %p endDocument] - clearing cached data", self);
+    LOG(Printing, "-[WKPrintingView %p endDocument] - clearing cached data", self);
 
     // Both existing data and pending responses are now obsolete.
     _printingPageRects.clear();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to