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

Unified Diff: Source/core/rendering/RenderWidget.cpp

Issue 132913002: Harden the machinery around updateWidgetPositions() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add FIXME Created 6 years, 11 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/rendering/RenderWidget.h ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderWidget.cpp
diff --git a/Source/core/rendering/RenderWidget.cpp b/Source/core/rendering/RenderWidget.cpp
index f74f21c7c9c4f20af7efc36fb23074ac70cdf0b5..ca9fa8433a68586894238a62c691b8818fdc8883 100644
--- a/Source/core/rendering/RenderWidget.cpp
+++ b/Source/core/rendering/RenderWidget.cpp
@@ -32,7 +32,6 @@
#include "core/rendering/LayoutRectRecorder.h"
#include "core/rendering/RenderLayer.h"
#include "core/rendering/RenderView.h"
-#include "platform/graphics/GraphicsContext.h"
#include "wtf/HashMap.h"
namespace WebCore {
@@ -88,19 +87,18 @@ static void moveWidgetToParentSoon(Widget* child, FrameView* parent)
RenderWidget::RenderWidget(Element* element)
: RenderReplaced(element)
, m_widget(0)
- , m_frameView(element->document().view())
// Reference counting is used to prevent the widget from being
// destroyed while inside the Widget code, which might not be
// able to handle that.
, m_refCount(1)
{
- view()->addWidget(this);
+ ASSERT(element);
+ frameView()->addWidget(this);
}
void RenderWidget::willBeDestroyed()
{
- if (RenderView* v = view())
- v->removeWidget(this);
+ frameView()->removeWidget(this);
if (AXObjectCache* cache = document().existingAXObjectCache()) {
cache->childrenChanged(this->parent());
@@ -199,7 +197,7 @@ void RenderWidget::setWidget(PassRefPtr<Widget> widget)
repaint();
}
}
- moveWidgetToParentSoon(m_widget.get(), m_frameView);
+ moveWidgetToParentSoon(m_widget.get(), frameView());
}
if (AXObjectCache* cache = document().existingAXObjectCache())
@@ -278,7 +276,7 @@ void RenderWidget::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
if ((paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSelfOutline) && hasOutline())
paintOutline(paintInfo, LayoutRect(adjustedPaintOffset, size()));
- if (!m_frameView || paintInfo.phase != PaintPhaseForeground)
+ if (paintInfo.phase != PaintPhaseForeground)
return;
if (style()->hasBorderRadius()) {
« no previous file with comments | « Source/core/rendering/RenderWidget.h ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698