| Index: third_party/WebKit/Source/core/html/HTMLImageElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLImageElement.cpp b/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
|
| index e779e7be54a631ed36c838a0d943ece4d8e03b2b..a574c90babc57617f521a2b050dc7ace90e4d29a 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
|
| @@ -334,11 +334,6 @@ ImageCandidate HTMLImageElement::findBestFitImageFromPictureParent() {
|
| return ImageCandidate();
|
| }
|
|
|
| -bool HTMLImageElement::layoutObjectIsNeeded(const ComputedStyle& style) {
|
| - return m_layoutDisposition != LayoutDisposition::Collapsed &&
|
| - HTMLElement::layoutObjectIsNeeded(style);
|
| -}
|
| -
|
| LayoutObject* HTMLImageElement::createLayoutObject(const ComputedStyle& style) {
|
| const ContentData* contentData = style.contentData();
|
| if (contentData && contentData->isImage()) {
|
| @@ -367,7 +362,6 @@ LayoutObject* HTMLImageElement::createLayoutObject(const ComputedStyle& style) {
|
|
|
| void HTMLImageElement::attachLayoutTree(const AttachContext& context) {
|
| HTMLElement::attachLayoutTree(context);
|
| -
|
| if (layoutObject() && layoutObject()->isImage()) {
|
| LayoutImage* layoutImage = toLayoutImage(layoutObject());
|
| LayoutImageResource* layoutImageResource = layoutImage->imageResource();
|
| @@ -853,6 +847,10 @@ void HTMLImageElement::ensurePrimaryContent() {
|
| setLayoutDisposition(LayoutDisposition::PrimaryContent);
|
| }
|
|
|
| +bool HTMLImageElement::isCollapsed() const {
|
| + return m_layoutDisposition == LayoutDisposition::Collapsed;
|
| +}
|
| +
|
| void HTMLImageElement::setLayoutDisposition(LayoutDisposition layoutDisposition,
|
| bool forceReattach) {
|
| if (m_layoutDisposition == layoutDisposition && !forceReattach)
|
|
|