| 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 84a2646a0ba38acb65324f0e90636061ac38ca3b..80c4369931ae3a77906b1736e7b54b7fec49da31 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
|
| @@ -333,11 +333,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()) {
|
| @@ -366,7 +361,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();
|
| @@ -852,6 +846,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)
|
|
|