⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 248457 in webkit


Ignore:
Timestamp:
Aug 8, 2019, 10:01:15 PM (7 years ago)
Author:
Kocsen Chung
Message:

Cherry-pick r248436. rdar://problem/54093232

Set WKWebView opaque based on drawsBackground in PageConfiguration.
https://bugs.webkit.org/show_bug.cgi?id=200528

Reviewed by Tim Horton.

  • UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]): Set self.opaque = NO when !self.opaque
!pageConfiguration->drawsBackground().

It is almost impossible to have !self.opaque be NO at this point, since we are still inside initWithFrame:. A subclass could
override opaque and return NO, but checking pageConfiguration's drawsBackground is a good alternative.

  • WebProcess/WebPage/WebPage.h: Remove unused m_drawsBackground member.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248436 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-608.1-branch/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-608.1-branch/Source/WebKit/ChangeLog

    r248429 r248457  
     12019-08-08  Kocsen Chung  <kocsen_chung@apple.com>
     2
     3        Cherry-pick r248436. rdar://problem/54093232
     4
     5    Set WKWebView opaque based on drawsBackground in PageConfiguration.
     6    https://bugs.webkit.org/show_bug.cgi?id=200528
     7   
     8    Reviewed by Tim Horton.
     9   
     10    * UIProcess/API/Cocoa/WKWebView.mm:
     11    (-[WKWebView _initializeWithConfiguration:]): Set self.opaque = NO when !self.opaque || !pageConfiguration->drawsBackground().
     12    It is almost impossible to have !self.opaque be NO at this point, since we are still inside initWithFrame:. A subclass could
     13    override opaque and return NO, but checking pageConfiguration's drawsBackground is a good alternative.
     14    * WebProcess/WebPage/WebPage.h: Remove unused m_drawsBackground member.
     15   
     16   
     17    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248436 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     18
     19    2019-08-08  Timothy Hatcher  <timothy@apple.com>
     20
     21            Set WKWebView opaque based on drawsBackground in PageConfiguration.
     22            https://bugs.webkit.org/show_bug.cgi?id=200528
     23
     24            Reviewed by Tim Horton.
     25
     26            * UIProcess/API/Cocoa/WKWebView.mm:
     27            (-[WKWebView _initializeWithConfiguration:]): Set self.opaque = NO when !self.opaque || !pageConfiguration->drawsBackground().
     28            It is almost impossible to have !self.opaque be NO at this point, since we are still inside initWithFrame:. A subclass could
     29            override opaque and return NO, but checking pageConfiguration's drawsBackground is a good alternative.
     30            * WebProcess/WebPage/WebPage.h: Remove unused m_drawsBackground member.
     31
    1322019-08-08  Alan Coon  <alancoon@apple.com>
    233
  • branches/safari-608.1-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm

    r248341 r248457  
    706706    _page = [_contentView page];
    707707    [self _dispatchSetDeviceOrientation:deviceOrientation()];
    708     if (!self.opaque)
    709         _page->setBackgroundColor(WebCore::Color(WebCore::Color::transparent));
     708
     709    if (!self.opaque || !pageConfiguration->drawsBackground())
     710        self.opaque = NO;
    710711
    711712    [_contentView layer].anchorPoint = CGPointZero;
  • branches/safari-608.1-branch/Source/WebKit/WebProcess/WebPage/WebPage.h

    r248352 r248457  
    16281628
    16291629    bool m_useFixedLayout { false };
    1630     bool m_drawsBackground { true };
    16311630
    16321631    WebCore::Color m_underlayColor;
Note: See TracChangeset for help on using the changeset viewer.