Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(596)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutEmbeddedObject.cpp

Issue 2166813005: Remove layoutObject() dependency from HTMLPlugInElement::layoutObjectIsFocusable(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutEmbeddedObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutEmbeddedObject.cpp b/third_party/WebKit/Source/core/layout/LayoutEmbeddedObject.cpp
index f4e0ec81e123a638fa5a09e37ef76c17b79ff732..7aabeb7c9a062767aa21a3b48765989002d6aae2 100644
--- a/third_party/WebKit/Source/core/layout/LayoutEmbeddedObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutEmbeddedObject.cpp
@@ -42,7 +42,6 @@ using namespace HTMLNames;
LayoutEmbeddedObject::LayoutEmbeddedObject(Element* element)
: LayoutPart(element)
- , m_showsUnavailablePluginIndicator(false)
{
view()->frameView()->setIsVisuallyNonEmpty();
}
@@ -67,20 +66,19 @@ static String localizedUnavailablePluginReplacementText(Node* node, LayoutEmbedd
{
Locale& locale = node ? toElement(node)->locale() : Locale::defaultLocale();
switch (pluginUnavailabilityReason) {
+ case LayoutEmbeddedObject::PluginAvailable:
+ NOTREACHED();
+ return String();
case LayoutEmbeddedObject::PluginMissing:
return locale.queryString(WebLocalizedString::MissingPluginText);
case LayoutEmbeddedObject::PluginBlockedByContentSecurityPolicy:
return locale.queryString(WebLocalizedString::BlockedPluginText);
}
kochi 2016/07/21 02:09:56 It seems compilers are complaining that on cases n
tkent 2016/07/21 02:21:07 Try bots are red because of other reasons, I think
kochi 2016/07/21 02:27:21 See this, for this case. https://build.chromium.or
tkent 2016/07/21 04:08:25 Oh, you're right. Thank you.
-
- ASSERT_NOT_REACHED();
- return String();
}
void LayoutEmbeddedObject::setPluginUnavailabilityReason(PluginUnavailabilityReason pluginUnavailabilityReason)
{
- ASSERT(!m_showsUnavailablePluginIndicator);
- m_showsUnavailablePluginIndicator = true;
+ DCHECK_EQ(PluginAvailable, m_pluginUnavailabilityReason);
m_pluginUnavailabilityReason = pluginUnavailabilityReason;
m_unavailablePluginReplacementText = localizedUnavailablePluginReplacementText(node(), pluginUnavailabilityReason);
@@ -92,7 +90,7 @@ void LayoutEmbeddedObject::setPluginUnavailabilityReason(PluginUnavailabilityRea
bool LayoutEmbeddedObject::showsUnavailablePluginIndicator() const
{
- return m_showsUnavailablePluginIndicator;
+ return m_pluginUnavailabilityReason != PluginAvailable;
}
void LayoutEmbeddedObject::paintContents(const PaintInfo& paintInfo, const LayoutPoint& paintOffset) const

Powered by Google App Engine
This is Rietveld 408576698