summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authoraelias <aelias@chromium.org>2015-09-09 13:45:46 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-09 20:46:30 +0000
commit60b43d0fb14581c647034594f29e98f4ec2babf5 (patch)
tree829dbfe657c231307070fa73aa7b60108b090067 /cc
parentafc3598691aafb66f7975c9f522617797294d37e (diff)
downloadchromium_src-60b43d0fb14581c647034594f29e98f4ec2babf5.zip
chromium_src-60b43d0fb14581c647034594f29e98f4ec2babf5.tar.gz
chromium_src-60b43d0fb14581c647034594f29e98f4ec2babf5.tar.bz2
Replace ViewMsg_DidChangeBodyBackgroundColor with a frame metadata field.
This cleans out an Android-specific IPC. Doing it this way should also allow more perfect synchronization (although we hadn't observed the previous lack of synchronization to cause any visible bugs in practice). BUG=527284 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1311093007 Cr-Commit-Position: refs/heads/master@{#347997}
Diffstat (limited to 'cc')
-rw-r--r--cc/output/compositor_frame_metadata.cc4
-rw-r--r--cc/output/compositor_frame_metadata.h6
-rw-r--r--cc/trees/layer_tree_host_impl.cc1
3 files changed, 9 insertions, 2 deletions
diff --git a/cc/output/compositor_frame_metadata.cc b/cc/output/compositor_frame_metadata.cc
index dad78a0..b3a9b2d 100644
--- a/cc/output/compositor_frame_metadata.cc
+++ b/cc/output/compositor_frame_metadata.cc
@@ -12,8 +12,8 @@ CompositorFrameMetadata::CompositorFrameMetadata()
min_page_scale_factor(0.f),
max_page_scale_factor(0.f),
root_overflow_x_hidden(false),
- root_overflow_y_hidden(false) {
-}
+ root_overflow_y_hidden(false),
+ root_background_color(SK_ColorWHITE) {}
CompositorFrameMetadata::~CompositorFrameMetadata() {
}
diff --git a/cc/output/compositor_frame_metadata.h b/cc/output/compositor_frame_metadata.h
index 999a6b4..72035e3 100644
--- a/cc/output/compositor_frame_metadata.h
+++ b/cc/output/compositor_frame_metadata.h
@@ -9,6 +9,7 @@
#include "cc/base/cc_export.h"
#include "cc/output/viewport_selection_bound.h"
+#include "third_party/skia/include/core/SkColor.h"
#include "ui/events/latency_info.h"
#include "ui/gfx/geometry/size_f.h"
#include "ui/gfx/geometry/vector2d_f.h"
@@ -42,6 +43,11 @@ class CC_EXPORT CompositorFrameMetadata {
gfx::Vector2dF location_bar_offset;
gfx::Vector2dF location_bar_content_translation;
+ // This color is usually obtained from the background color of the <body>
+ // element. It can be used for filling in gutter areas around the frame when
+ // it's too small to fill the box the parent reserved for it.
+ SkColor root_background_color;
+
// Provides selection region updates relative to the current viewport. If the
// selection is empty or otherwise unused, the bound types will indicate such.
ViewportSelection selection;
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 7372d1d..9770aac 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1459,6 +1459,7 @@ CompositorFrameMetadata LayerTreeHostImpl::MakeCompositorFrameMetadata() const {
gfx::Vector2dF(0.f, top_controls_manager_->ControlsTopOffset());
metadata.location_bar_content_translation =
gfx::Vector2dF(0.f, top_controls_manager_->ContentTopOffset());
+ metadata.root_background_color = active_tree_->background_color();
active_tree_->GetViewportSelection(&metadata.selection);