Commit 12901c98 authored by Rune Lillesveen's avatar Rune Lillesveen Committed by Commit Bot

Don't use EnsureComputedStyle in LayoutBoxModelObject.

There should be no reason to force computed style for the root element
if it doesn't have one when trying to figure out if body background is
propagated to the viewport.

Change-Id: Ibf0beb7848101bd1acc20f16a826f0787ef010b9
Reviewed-on: https://chromium-review.googlesource.com/c/1280278Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#599717}
parent cc0e9d5e
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "third_party/blink/renderer/core/layout/layout_box_model_object.h" #include "third_party/blink/renderer/core/layout/layout_box_model_object.h"
#include "third_party/blink/renderer/core/dom/node_computed_style.h"
#include "third_party/blink/renderer/core/frame/local_frame.h" #include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h" #include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/html/html_body_element.h" #include "third_party/blink/renderer/core/html/html_body_element.h"
...@@ -1467,8 +1468,8 @@ bool LayoutBoxModelObject::BackgroundStolenForBeingBody( ...@@ -1467,8 +1468,8 @@ bool LayoutBoxModelObject::BackgroundStolenForBeingBody(
return false; return false;
if (!root_element_style) if (!root_element_style)
root_element_style = root_element->EnsureComputedStyle(); root_element_style = root_element->GetComputedStyle();
if (root_element_style->HasBackground()) if (!root_element_style || root_element_style->HasBackground())
return false; return false;
if (GetNode() != GetDocument().FirstBodyElement()) if (GetNode() != GetDocument().FirstBodyElement())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment