Changeset 90855 in webkit


Ignore:
Timestamp:
Jul 12, 2011, 2:56:25 PM (14 years ago)
Author:
Adam Roben
Message:

Delete some redundant code in WebHTMLView

This code had no user-visible effect, as we were just duplicating work that AppKit would do
for us at a slightly different time.

Fixes <http://webkit.org/b/64390> WebHTMLView sets its root layer's transform unnecessarily

Reviewed by Simon Fraser.

  • WebView/WebHTMLView.mm:

(-[WebHTMLView viewDidMoveToWindow]):
(-[WebHTMLView attachRootLayer:]):
Don't bother setting the root layer's transform to account for the scale factor. AppKit
takes care of this for us nowadays.

Location:
trunk/Source/WebKit/mac
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/mac/ChangeLog

    r90707 r90855  
     12011-07-12  Adam Roben  <aroben@apple.com>
     2
     3        Delete some redundant code in WebHTMLView
     4
     5        This code had no user-visible effect, as we were just duplicating work that AppKit would do
     6        for us at a slightly different time.
     7
     8        Fixes <http://webkit.org/b/64390> WebHTMLView sets its root layer's transform unnecessarily
     9
     10        Reviewed by Simon Fraser.
     11
     12        * WebView/WebHTMLView.mm:
     13        (-[WebHTMLView viewDidMoveToWindow]):
     14        (-[WebHTMLView attachRootLayer:]):
     15        Don't bother setting the root layer's transform to account for the scale factor. AppKit
     16        takes care of this for us nowadays.
     17
    1182011-07-10  Kenichi Ishibashi  <bashi@chromium.org>
    219
  • trunk/Source/WebKit/mac/WebView/WebHTMLView.mm

    r88737 r90855  
    29352935
    29362936        _private->lastScrollPosition = NSZeroPoint;
    2937        
    2938 #if USE(ACCELERATED_COMPOSITING) && !defined(BUILDING_ON_LEOPARD)
    2939         // We may have created the layer hosting view while outside the window. Update the scale factor
    2940         // now that we have a window to get it from.
    2941         if (_private->layerHostingView) {
    2942             CGFloat scaleFactor;
    2943 #if !defined(BUILDING_ON_SNOW_LEOPARD)
    2944             scaleFactor = [[self window] backingScaleFactor];
    2945 #else
    2946             scaleFactor = [[self window] userSpaceScaleFactor];
    2947 #endif
    2948             [[_private->layerHostingView layer] setTransform:CATransform3DMakeScale(scaleFactor, scaleFactor, 1)];
    2949         }
    2950 #endif
    29512937    }
    29522938}
     
    54415427#endif
    54425428
    5443 #ifndef BUILDING_ON_LEOPARD
    5444     // If we aren't in the window yet, we'll use the screen's scale factor now, and reset the scale
    5445     // via -viewDidMoveToWindow.
    5446     NSWindow *window = [self window];
    5447     CGFloat scaleFactor;
    5448 #ifndef BUILDING_ON_SNOW_LEOPARD
    5449     if (window)
    5450         scaleFactor = [window backingScaleFactor];
    5451     else
    5452         scaleFactor = [[NSScreen mainScreen] backingScaleFactor];
    5453 #else
    5454     if (window)
    5455         scaleFactor = [window userSpaceScaleFactor];
    5456     else
    5457         scaleFactor = [[NSScreen mainScreen] userSpaceScaleFactor];
    5458 #endif
    5459 
    5460     [viewLayer setTransform:CATransform3DMakeScale(scaleFactor, scaleFactor, 1)];
    5461 #endif
    5462 
    54635429    if ([self layer]) {
    54645430        // If we are in a layer-backed view, we need to manually initialize the geometry for our layer.
Note: See TracChangeset for help on using the changeset viewer.