• tapted's avatar
    MacViews: Ensure the RootView is in place before the first call to ReorderNativeViews · f1d241a5
    tapted authored
    This gets 3 views_unittests passing:
     - ViewTargeterTest.HitTestCallsOnView,
     - ViewTest.CanProcessEventsWithinSubtree,
     - ViewTest.GetEventHandlerForRect.
    
    These were failing because the size of the RootView was being reset to
    the Widget size when first added. This happened because NativeWidgetMac
    was not ensuring the RootView was set up properly immediately after a
    call to Widget::Init() for all Widget types (i.e. those without a
    NonClientView).
    
    When there _is_ a NonClientView, Widget::Init() calls SetContentsView()
    which would eventually trickle down to
    NativeWidgetMac::ReorderNativeViews(), which is where NativeWidgetMac
    would set up the root view.
    
    BUG=378134
    
    Review URL: https://codereview.chromium.org/559873002
    
    Cr-Commit-Position: refs/heads/master@{#294296}
    f1d241a5
widget_unittest.cc 108 KB