Commit e548428b authored by Rune Lillesveen's avatar Rune Lillesveen Committed by Commit Bot

Update style and layout tree explicitly for svg images.

Trying to remove the forced UpdateStyleAndLayoutTree on finished parsing
caused svg image regressions becaused it relied on it. Instead make that
dependency explicit for svg images.

Bug: 742413
Change-Id: I74b5f238651348dbb0dff4fa3002525a526e5275
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1624565
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: default avatarFredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#662160}
parent f031becf
...@@ -810,6 +810,10 @@ Image::SizeAvailability SVGImage::DataChanged(bool all_data_received) { ...@@ -810,6 +810,10 @@ Image::SizeAvailability SVGImage::DataChanged(bool all_data_received) {
frame->ForceSynchronousDocumentInstall("image/svg+xml", Data()); frame->ForceSynchronousDocumentInstall("image/svg+xml", Data());
// Intrinsic sizing relies on computed style (e.g. font-size and
// writing-mode).
frame->GetDocument()->UpdateStyleAndLayoutTree();
// Set the concrete object size before a container size is available. // Set the concrete object size before a container size is available.
intrinsic_size_ = RoundedIntSize(ConcreteObjectSize(FloatSize( intrinsic_size_ = RoundedIntSize(ConcreteObjectSize(FloatSize(
LayoutReplaced::kDefaultWidth, LayoutReplaced::kDefaultHeight))); LayoutReplaced::kDefaultWidth, LayoutReplaced::kDefaultHeight)));
......
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