Commit 621f6fdd authored by Morten Stenshorne's avatar Morten Stenshorne Committed by Commit Bot

Use LayoutObjectFactory for HTMLImageElement.

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I4aeecfada142ad85b575703a4a9ed66c4228714b
Reviewed-on: https://chromium-review.googlesource.com/1101326
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: default avatarEmil A Eklund <eae@chromium.org>
Reviewed-by: default avatarChristian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567397}
parent 4675b1de
......@@ -49,6 +49,7 @@
#include "third_party/blink/renderer/core/layout/adjust_for_absolute_zoom.h"
#include "third_party/blink/renderer/core/layout/layout_block_flow.h"
#include "third_party/blink/renderer/core/layout/layout_image.h"
#include "third_party/blink/renderer/core/layout/layout_object_factory.h"
#include "third_party/blink/renderer/core/layout/ng/layout_ng_block_flow.h"
#include "third_party/blink/renderer/core/loader/resource/image_resource_content.h"
#include "third_party/blink/renderer/core/media_type_names.h"
......@@ -356,10 +357,7 @@ LayoutObject* HTMLImageElement::CreateLayoutObject(const ComputedStyle& style) {
switch (layout_disposition_) {
case LayoutDisposition::kFallbackContent:
if (!RuntimeEnabledFeatures::LayoutNGEnabled() ||
style.ForceLegacyLayout())
return new LayoutBlockFlow(this);
return new LayoutNGBlockFlow(this);
return LayoutObjectFactory::CreateBlockFlow(*this, style);
case LayoutDisposition::kPrimaryContent: {
LayoutImage* image = new LayoutImage(this);
image->SetImageResource(LayoutImageResource::Create());
......
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