Changeset 187135 in webkit


Ignore:
Timestamp:
Jul 21, 2015 4:31:48 PM (9 years ago)
Author:
Simon Fraser
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]):

Location:
trunk/Source/WebKit2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r187131 r187135  
     12015-07-21  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Rename the 'View' log channel to 'Printing'
     4        https://bugs.webkit.org/show_bug.cgi?id=147172
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        "View" was a terrible name for a log channel that was all about printing.
     9        Sort the log channels.
     10
     11        * Platform/Logging.h:
     12        * UIProcess/API/mac/WKView.mm:
     13        (-[WKView drawRect:]):
     14        (-[WKView printOperationWithPrintInfo:forFrame:]):
     15        * UIProcess/mac/WKPrintingView.mm:
     16        (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]):
     17        (pageDidComputePageRects):
     18        (-[WKPrintingView knowsPageRange:]):
     19        (-[WKPrintingView drawRect:]):
     20        (-[WKPrintingView rectForPage:]):
     21        (-[WKPrintingView beginDocument]):
     22        (-[WKPrintingView endDocument]):
     23
    1242015-07-21  Zalan Bujtas  <zalan@apple.com>
    225
  • trunk/Source/WebKit2/Platform/Logging.h

    r177294 r187135  
    4040#define WEBKIT2_LOG_CHANNELS(M) \
    4141    M(ContextMenu) \
     42    M(IDB) \
    4243    M(IconDatabase) \
    4344    M(InspectorServer) \
    4445    M(KeyHandling) \
    4546    M(Network) \
     47    M(NetworkCache) \
     48    M(NetworkCacheStorage) \
    4649    M(NetworkScheduling) \
    4750    M(Plugins) \
     51    M(Printing) \
    4852    M(RemoteLayerTree) \
    4953    M(SessionState) \
    5054    M(StorageAPI) \
    5155    M(TextInput) \
    52     M(View) \
    53     M(IDB) \
    54     M(NetworkCache) \
    55     M(NetworkCacheStorage) \
    5656
    5757#define DECLARE_LOG_CHANNEL(name) \
  • trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm

    r186662 r187135  
    28132813- (void)drawRect:(NSRect)rect
    28142814{
    2815     LOG(View, "drawRect: x:%g, y:%g, width:%g, height:%g", rect.origin.x, rect.origin.y, rect.size.width, rect.size.height);
     2815    LOG(Printing, "drawRect: x:%g, y:%g, width:%g, height:%g", rect.origin.x, rect.origin.y, rect.size.width, rect.size.height);
    28162816    _data->_page->endPrinting();
    28172817}
     
    40034003- (NSPrintOperation *)printOperationWithPrintInfo:(NSPrintInfo *)printInfo forFrame:(WKFrameRef)frameRef
    40044004{
    4005     LOG(View, "Creating an NSPrintOperation for frame '%s'", toImpl(frameRef)->url().utf8().data());
     4005    LOG(Printing, "Creating an NSPrintOperation for frame '%s'", toImpl(frameRef)->url().utf8().data());
    40064006
    40074007    // FIXME: If the frame cannot be printed (e.g. if it contains an encrypted PDF that disallows
  • trunk/Source/WebKit2/UIProcess/mac/WKPrintingView.mm

    r182842 r187135  
    259259    ASSERT(firstPage > 0);
    260260    ASSERT(firstPage <= lastPage);
    261     LOG(View, "WKPrintingView requesting PDF data for pages %u...%u", firstPage, lastPage);
     261    LOG(Printing, "WKPrintingView requesting PDF data for pages %u...%u", firstPage, lastPage);
    262262
    263263    PrintInfo printInfo([_printOperation printInfo]);
     
    318318            ceil(lastPrintingPageRect.maxX() * view->_totalScaleFactorForPrinting),
    319319            ceil(lastPrintingPageRect.maxY() * view->_totalScaleFactorForPrinting));
    320         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);
     320        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);
    321321        [view setFrame:newFrameSize];
    322322
     
    375375- (BOOL)knowsPageRange:(NSRangePointer)range
    376376{
    377     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");
     377    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");
    378378    ASSERT(_printOperation == [NSPrintOperation currentOperation]);
    379379
     
    523523- (void)drawRect:(NSRect)nsRect
    524524{
    525     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" : "");
     525    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" : "");
    526526
    527527    ASSERT(_printOperation == [NSPrintOperation currentOperation]);
     
    607607    ASSERT(_printOperation == [NSPrintOperation currentOperation]);
    608608    if (![self _hasPageRects]) {
    609         LOG(View, "-[WKPrintingView %p rectForPage:%d] - data is not yet available", self, (int)page);
     609        LOG(Printing, "-[WKPrintingView %p rectForPage:%d] - data is not yet available", self, (int)page);
    610610        if (!_webFrame->page()) {
    611611            // We may have not told AppKit how many pages there are, so it will try to print until a null rect is returned.
     
    626626    IntRect rect = _printingPageRects[page - 1];
    627627    rect.scale(_totalScaleFactorForPrinting);
    628     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());
     628    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());
    629629    return rect;
    630630}
     
    645645        return;
    646646
    647     LOG(View, "-[WKPrintingView %p beginDocument]", self);
     647    LOG(Printing, "-[WKPrintingView %p beginDocument]", self);
    648648
    649649    [super beginDocument];
     
    660660        return;
    661661
    662     LOG(View, "-[WKPrintingView %p endDocument] - clearing cached data", self);
     662    LOG(Printing, "-[WKPrintingView %p endDocument] - clearing cached data", self);
    663663
    664664    // Both existing data and pending responses are now obsolete.
Note: See TracChangeset for help on using the changeset viewer.