Loading content/canvas/src/nsCanvasRenderingContext2D.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,8 @@ #include "nsContentUtils.h" #include "nsIDOMDocument.h" #include "nsIDocument.h" #include "nsIDOMCanvasRenderingContext2D.h" #include "nsICanvasRenderingContextInternal.h" #include "nsPresContext.h" Loading Loading @@ -1871,6 +1873,16 @@ nsCanvasRenderingContext2D::DrawWindow(nsIDOMWindow* aWindow, PRInt32 aX, PRInt3 return NS_ERROR_DOM_SECURITY_ERR; } // Flush layout updates nsCOMPtr<nsIDOMDocument> domDoc; aWindow->GetDocument(getter_AddRefs(domDoc)); if (domDoc) { nsCOMPtr<nsIDocument> doc = do_QueryInterface(domDoc); if (doc) { doc->FlushPendingNotifications(Flush_Layout); } } nsCOMPtr<nsPresContext> presContext; nsCOMPtr<nsPIDOMWindow> win = do_QueryInterface(aWindow); if (win) { Loading Loading
content/canvas/src/nsCanvasRenderingContext2D.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,8 @@ #include "nsContentUtils.h" #include "nsIDOMDocument.h" #include "nsIDocument.h" #include "nsIDOMCanvasRenderingContext2D.h" #include "nsICanvasRenderingContextInternal.h" #include "nsPresContext.h" Loading Loading @@ -1871,6 +1873,16 @@ nsCanvasRenderingContext2D::DrawWindow(nsIDOMWindow* aWindow, PRInt32 aX, PRInt3 return NS_ERROR_DOM_SECURITY_ERR; } // Flush layout updates nsCOMPtr<nsIDOMDocument> domDoc; aWindow->GetDocument(getter_AddRefs(domDoc)); if (domDoc) { nsCOMPtr<nsIDocument> doc = do_QueryInterface(domDoc); if (doc) { doc->FlushPendingNotifications(Flush_Layout); } } nsCOMPtr<nsPresContext> presContext; nsCOMPtr<nsPIDOMWindow> win = do_QueryInterface(aWindow); if (win) { Loading