Chromium Code Reviews| Index: third_party/WebKit/Source/core/css/resolver/SharedStyleFinder.cpp |
| diff --git a/third_party/WebKit/Source/core/css/resolver/SharedStyleFinder.cpp b/third_party/WebKit/Source/core/css/resolver/SharedStyleFinder.cpp |
| index 27dc1c6c58c3e139f572f5bbfcee5b5c120a0c70..6c0529d8398a6af248d1e0b841d7f70320b7fbf0 100644 |
| --- a/third_party/WebKit/Source/core/css/resolver/SharedStyleFinder.cpp |
| +++ b/third_party/WebKit/Source/core/css/resolver/SharedStyleFinder.cpp |
| @@ -45,6 +45,7 @@ |
| #include "core/dom/shadow/ElementShadow.h" |
| #include "core/dom/shadow/InsertionPoint.h" |
| #include "core/html/HTMLElement.h" |
| +#include "core/html/HTMLImageElement.h" |
| #include "core/html/HTMLInputElement.h" |
| #include "core/html/HTMLOptGroupElement.h" |
| #include "core/html/HTMLOptionElement.h" |
| @@ -286,6 +287,12 @@ bool SharedStyleFinder::canShareStyleWithElement(Element& candidate) const { |
| if (candidate.isHTMLElement() && toHTMLElement(candidate).hasDirectionAuto()) |
| return false; |
| + if (isHTMLImageElement(candidate) && isHTMLImageElement(element()) && |
| + toHTMLImageElement(candidate).isCollapsed() != |
| + toHTMLImageElement(element()).isCollapsed()) { |
|
esprehn
2017/02/15 02:08:46
good catch!
|
| + return false; |
| + } |
| + |
| if (candidate.isLink() && m_context.elementLinkState() != style->insideLink()) |
| return false; |