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

Unified Diff: Source/core/frame/FrameView.cpp

Issue 625073002: Merge RenderWidget into single subclass, RenderPart (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments 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/frame/FrameView.h ('k') | Source/core/html/HTMLAppletElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index d1ecd0e3d8646ec5e40a986d3267757a11098927..ff9cab600aea3d473d42b598dd18f4b2250115ab 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -66,7 +66,6 @@
#include "core/rendering/RenderScrollbarPart.h"
#include "core/rendering/RenderTheme.h"
#include "core/rendering/RenderView.h"
-#include "core/rendering/RenderWidget.h"
#include "core/rendering/TextAutosizer.h"
#include "core/rendering/compositing/CompositedLayerMapping.h"
#include "core/rendering/compositing/CompositedSelectionBound.h"
@@ -1040,31 +1039,31 @@ RenderBox* FrameView::embeddedContentBox() const
}
-void FrameView::addWidget(RenderWidget* object)
+void FrameView::addPart(RenderPart* object)
{
- m_widgets.add(object);
+ m_parts.add(object);
}
-void FrameView::removeWidget(RenderWidget* object)
+void FrameView::removePart(RenderPart* object)
{
- m_widgets.remove(object);
+ m_parts.remove(object);
}
void FrameView::updateWidgetPositions()
{
- WillBeHeapVector<RefPtrWillBeMember<RenderWidget> > widgets;
- copyToVector(m_widgets, widgets);
+ WillBeHeapVector<RefPtrWillBeMember<RenderPart> > parts;
+ copyToVector(m_parts, parts);
// Script or plugins could detach the frame so abort processing if that happens.
- for (size_t i = 0; i < widgets.size() && renderView(); ++i)
- widgets[i]->updateWidgetPosition();
+ for (size_t i = 0; i < parts.size() && renderView(); ++i)
+ parts[i]->updateWidgetPosition();
- for (size_t i = 0; i < widgets.size() && renderView(); ++i)
- widgets[i]->widgetPositionsUpdated();
+ for (size_t i = 0; i < parts.size() && renderView(); ++i)
+ parts[i]->widgetPositionsUpdated();
}
-void FrameView::addWidgetToUpdate(RenderEmbeddedObject& object)
+void FrameView::addPartToUpdate(RenderEmbeddedObject& object)
{
ASSERT(isInPerformLayout());
// Tell the DOM element that it needs a widget update.
@@ -1073,7 +1072,7 @@ void FrameView::addWidgetToUpdate(RenderEmbeddedObject& object)
if (isHTMLObjectElement(*node) || isHTMLEmbedElement(*node))
toHTMLPlugInElement(node)->setNeedsWidgetUpdate(true);
- m_widgetUpdateSet.add(&object);
+ m_partUpdateSet.add(&object);
}
void FrameView::setMediaType(const AtomicString& mediaType)
@@ -1846,13 +1845,13 @@ bool FrameView::updateWidgets()
// This is always called from updateWidgetsTimerFired.
// m_updateWidgetsTimer should only be scheduled if we have widgets to update.
// Thus I believe we can stop checking isEmpty here, and just ASSERT isEmpty:
- ASSERT(!m_widgetUpdateSet.isEmpty());
- if (m_nestedLayoutCount > 1 || m_widgetUpdateSet.isEmpty())
+ ASSERT(!m_partUpdateSet.isEmpty());
+ if (m_nestedLayoutCount > 1 || m_partUpdateSet.isEmpty())
return true;
// Need to swap because script will run inside the below loop and invalidate the iterator.
EmbeddedObjectSet objects;
- objects.swap(m_widgetUpdateSet);
+ objects.swap(m_partUpdateSet);
for (EmbeddedObjectSet::iterator it = objects.begin(); it != objects.end(); ++it) {
RenderEmbeddedObject& object = **it;
@@ -1873,10 +1872,10 @@ bool FrameView::updateWidgets()
// Prevent plugins from causing infinite updates of themselves.
// FIXME: Do we really need to prevent this?
- m_widgetUpdateSet.remove(&object);
+ m_partUpdateSet.remove(&object);
}
- return m_widgetUpdateSet.isEmpty();
+ return m_partUpdateSet.isEmpty();
}
void FrameView::updateWidgetsTimerFired(Timer<FrameView>*)
@@ -1902,7 +1901,7 @@ void FrameView::flushAnyPendingPostLayoutTasks()
void FrameView::scheduleUpdateWidgetsIfNecessary()
{
ASSERT(!isInPerformLayout());
- if (m_updateWidgetsTimer.isActive() || m_widgetUpdateSet.isEmpty())
+ if (m_updateWidgetsTimer.isActive() || m_partUpdateSet.isEmpty())
return;
m_updateWidgetsTimer.startOneShot(0, FROM_HERE);
}
« no previous file with comments | « Source/core/frame/FrameView.h ('k') | Source/core/html/HTMLAppletElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698