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

Unified Diff: Source/core/html/HTMLImageElement.cpp

Issue 653023002: ASSERTION FAILED: factor > 0 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLImageElement.cpp
diff --git a/Source/core/html/HTMLImageElement.cpp b/Source/core/html/HTMLImageElement.cpp
index 74e7d1350790183f293fd66801efb85ce4ee3ea6..fdcc1377b3da43fd9a22f065be524d57eff74b71 100644
--- a/Source/core/html/HTMLImageElement.cpp
+++ b/Source/core/html/HTMLImageElement.cpp
@@ -358,6 +358,9 @@ void HTMLImageElement::attach(const AttachContext& context)
Node::InsertionNotificationRequest HTMLImageElement::insertedInto(ContainerNode* insertionPoint)
{
+ if (!document().isActive())
+ return InsertionDone;
bzsolt 2014/10/16 13:01:36 This modification caused to fail a test (fast/dom/
Yoav Weiss 2014/10/16 13:27:17 I don't know that this is correct. There are a lot
+
if (!m_formWasSetByParser || NodeTraversal::highestAncestorOrSelf(*insertionPoint) != NodeTraversal::highestAncestorOrSelf(*m_form.get()))
resetFormOwner();
if (m_listener)
@@ -625,6 +628,9 @@ FloatSize HTMLImageElement::defaultDestinationSize() const
void HTMLImageElement::selectSourceURL(ImageLoader::UpdateFromElementBehavior behavior)
{
+ if (!document().isActive())
+ return;
+
bool foundURL = false;
if (RuntimeEnabledFeatures::pictureEnabled()) {
ImageCandidate candidate = findBestFitImageFromPictureParent();
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698