react-native/React
Ramanpreet Nara 215fa14efc Implement 'backgroundColor' style
Summary:
@public

This diff implements background colors for the `RCTWKWebView` component by proxying the background color prop to the underlying `WKWebView` and its underlying `UIScrollView`.

There's few differences between `backgroundColor` in `RCTWebView` and `RCTWKWebView` implementations:
1. With `UIWebView,` the background color gets applied after the page loads. With `WKWebView`, this isn't necessarily true. This results in a white flicker on solid backgrounds because sometimes, the background color is set before the page loads. This video illustrates the problem: https://our.intern.facebook.com/intern/px/p/9QBH
1. As far as I can tell, `WKWebView` doesn't handle transparent backgrounds correctly. Either that, or I could be setting the background color incorrectly. I set the background color to `rgba(1, 1, 1, 0.5)` and recorded how both `RCTWebView` and `RCTWKWebView` render. These two videos indicate the differences:
**RCTWebView: Lighter background**
https://pxl.cl/9R13
**RCTWKWebView: Darker background**
https://pxl.cl/9R1b

I tried to replicate this on the web. According to [[ https://our.intern.facebook.com/intern/fiddle/zCHu/ | this fiddle ]], `RCTWebView` is correct. Clearly, RCTWKWebView is rendering transparent backgrounds a bit darker than necessary. This doesn't seem simple to debug, so I've created a task to document this work: T23815343. I'll get to it eventually.

Reviewed By: shergin

Differential Revision: D6398209

fbshipit-source-id: 1812cb68133bc18a3278f6b328d7b085362528b0
2018-08-16 16:52:44 -07:00
..
Base Implement 'dataDetectorTypes' prop 2018-08-16 16:52:44 -07:00
CxxBridge Add REGISTER_JS_SEGMENT perf markers 2018-08-10 09:37:42 -07:00
CxxModule iOS downgrade error to warning when invoking native module with invalid bridge 2018-08-14 18:19:01 -07:00
CxxUtils Update license headers for MIT license 2018-02-16 18:31:53 -08:00
DevSupport Hiding pre-bundled notification when not on dev mode 2018-07-17 07:17:09 -07:00
Fabric Fabric: Using `const &` pattern everywhere in RCTConversions 2018-08-04 09:47:30 -07:00
Inspector Show warning instead of error on duplicate connection 2018-08-02 03:16:33 -07:00
Modules Replace deprecated `UILineBreakModeWordWrap` with `NSLineBreakByWordWrapping` (#19791) 2018-07-15 00:16:32 -07:00
Profiler Fix memory usage display in Perf Monitor (#19664) 2018-08-09 12:46:47 -07:00
React.xcodeproj Added necessary headers and sources to fix compilation errors for tvOS target (#20406) 2018-07-30 20:16:19 -07:00
UIUtils Update license headers for MIT license 2018-02-16 18:31:53 -08:00
Views Implement 'backgroundColor' style 2018-08-16 16:52:44 -07:00
third-party.xcconfig OSS: upgrade Folly 2016.09.26 => 2016.10.31 2018-04-13 17:33:23 -07:00