Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Unified Diff: ios/web/web_state/ui/crw_web_view_content_view.mm

Issue 1682273002: Use consistent background color for WKWebViews. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/web_state/ui/crw_web_controller.mm ('k') | ios/web/web_state/web_view_internal_creation_util.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/ui/crw_web_view_content_view.mm
diff --git a/ios/web/web_state/ui/crw_web_view_content_view.mm b/ios/web/web_state/ui/crw_web_view_content_view.mm
index 36ff49cbc3c78ce80e4d4072c27ab8bff02b4642..a583215e0a0c83f3c84a3ecebd0374efefcd02b8 100644
--- a/ios/web/web_state/ui/crw_web_view_content_view.mm
+++ b/ios/web/web_state/ui/crw_web_view_content_view.mm
@@ -9,17 +9,6 @@
#include "base/logging.h"
#include "base/mac/scoped_nsobject.h"
-namespace {
-
-// Background color RGB values for the content view which is displayed when the
-// |_webView| is offset from the screen due to user interaction. Displaying this
-// background color is handled by UIWebView but not WKWebView, so it needs to be
-// set in CRWWebViewContentView to support both. The color value matches that
-// used by UIWebView.
-const CGFloat kBackgroundRGBComponents[] = {0.75f, 0.74f, 0.76f};
-
-} // namespace
-
@interface CRWWebViewContentView () {
// The web view being shown.
base::scoped_nsobject<UIView> _webView;
@@ -75,10 +64,6 @@ const CGFloat kBackgroundRGBComponents[] = {0.75f, 0.74f, 0.76f};
self.autoresizingMask =
UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[self addSubview:_webView];
- self.backgroundColor = [UIColor colorWithRed:kBackgroundRGBComponents[0]
stuartmorgan 2016/02/11 17:04:34 Why don't we still need a background color on the
kkhorimoto 2016/02/11 18:27:24 I'm not sure what you mean about the web view draw
- green:kBackgroundRGBComponents[1]
- blue:kBackgroundRGBComponents[2]
- alpha:1.0];
// The frame needs to be set immediately after the web view is added
// as a subview. The change in the frame triggers drawing operations and
// if not done after it's added as a subview, the web view exhibits
« no previous file with comments | « ios/web/web_state/ui/crw_web_controller.mm ('k') | ios/web/web_state/web_view_internal_creation_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698