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

Unified Diff: Source/WebCore/page/mac/FrameMac.mm

Issue 10763005: Merge 121388 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 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
« no previous file with comments | « Source/WebCore/page/Frame.cpp ('k') | Source/WebCore/page/win/FrameCGWin.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/page/mac/FrameMac.mm
===================================================================
--- Source/WebCore/page/mac/FrameMac.mm (revision 122138)
+++ Source/WebCore/page/mac/FrameMac.mm (working copy)
@@ -157,6 +157,13 @@
renderer->updateDragState(true); // mark dragged nodes (so they pick up the right CSS)
m_doc->updateLayout(); // forces style recalc - needed since changing the drag state might
// imply new styles, plus JS could have changed other things
+
+
+ // Document::updateLayout may have blown away the original RenderObject.
+ renderer = node->renderer();
+ if (!renderer)
+ return nil;
+
LayoutRect topLevelRect;
NSRect paintingRect = pixelSnappedIntRect(renderer->paintingRootRect(topLevelRect));
@@ -175,12 +182,11 @@
DragImageRef Frame::nodeImage(Node* node)
{
+ m_doc->updateLayout(); // forces style recalc
+
RenderObject* renderer = node->renderer();
if (!renderer)
return nil;
-
- m_doc->updateLayout(); // forces style recalc
-
LayoutRect topLevelRect;
NSRect paintingRect = pixelSnappedIntRect(renderer->paintingRootRect(topLevelRect));
« no previous file with comments | « Source/WebCore/page/Frame.cpp ('k') | Source/WebCore/page/win/FrameCGWin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698