Commit d9c5b507 authored by Chris Harrelson's avatar Chris Harrelson Committed by Commit Bot

[PE] Update style for SVG embedded frame even on first layout

Previously, if an SVG embedded frame was not yet attached,
then we would not detect it as SVG and fail to update its style.
As a result, its intrinsic sizing may not be up to date at the time
it is needed to size the embedded content element that contains the
embedded frame.

Bug: 820095
Change-Id: I21c9ee3d3303fb0a773dd3963d238970be25effa
Reviewed-on: https://chromium-review.googlesource.com/997177
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: default avatarFredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#548600}
parent c96940cb
......@@ -3507,13 +3507,13 @@ void LocalFrameView::UpdateStyleAndLayoutIfNeededRecursiveInternal() {
frame_->GetDocument()->UpdateStyleAndLayoutTree();
// Update style for all embedded replaced content under this frame, so
// Update style for all embedded SVG documents underneath this frame, so
// that intrinsic size computation for any embedded objects has up-to-date
// information.
// TODO(chrishtr): generalize this to fully separate style from layout.
// information before layout.
ForAllChildLocalFrameViews([](LocalFrameView& view) {
if (view.EmbeddedReplacedContent())
view.GetLayoutView()->GetDocument().UpdateStyleAndLayoutTree();
Document& document = *view.GetFrame().GetDocument();
if (document.IsSVGDocument())
document.UpdateStyleAndLayoutTree();
});
CHECK(!ShouldThrottleRendering());
......
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