Changeset 102983 in webkit
- Timestamp:
- Dec 15, 2011 2:00:09 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r102982 r102983 1 2011-12-15 Eric Seidel <eric@webkit.org> 2 3 WebCore has two (disconnected) ways to keep track of updated widgets, should be unified 4 https://bugs.webkit.org/show_bug.cgi?id=74367 5 6 Reviewed by Adam Barth. 7 8 It seems the FrameView updateWidgets set is needed for now, 9 so just making FrameView::addWidgetToUpdate mark the DOM node 10 as needing a widget update and later when it goes to call 11 updateWidget() checking first if it needs an update. 12 13 No new tests, just adding an assert. 14 15 * html/HTMLEmbedElement.cpp: 16 (WebCore::HTMLEmbedElement::updateWidget): 17 * html/HTMLObjectElement.cpp: 18 (WebCore::HTMLObjectElement::updateWidget): 19 * html/HTMLPlugInImageElement.h: 20 (WebCore::HTMLPlugInImageElement::needsWidgetUpdate): 21 (WebCore::HTMLPlugInImageElement::setNeedsWidgetUpdate): 22 * page/FrameView.cpp: 23 (WebCore::FrameView::addWidgetToUpdate): 24 (WebCore::FrameView::updateWidget): 25 1 26 2011-12-15 Alexandru Chiculita <achicu@adobe.com> 2 27 -
trunk/Source/WebCore/html/HTMLEmbedElement.cpp
r102511 r102983 142 142 { 143 143 ASSERT(!renderEmbeddedObject()->pluginCrashedOrWasMissing()); 144 // FIXME: We should ASSERT(needsWidgetUpdate()), but currently 145 // FrameView::updateWidget() calls updateWidget(false) without checking if 146 // the widget actually needs updating! 144 ASSERT(needsWidgetUpdate()); 147 145 setNeedsWidgetUpdate(false); 148 146 -
trunk/Source/WebCore/html/HTMLObjectElement.cpp
r102511 r102983 291 291 { 292 292 ASSERT(!renderEmbeddedObject()->pluginCrashedOrWasMissing()); 293 // FIXME: We should ASSERT(needsWidgetUpdate()), but currently 294 // FrameView::updateWidget() calls updateWidget(false) without checking if 295 // the widget actually needs updating! 293 ASSERT(needsWidgetUpdate()); 296 294 setNeedsWidgetUpdate(false); 297 295 // FIXME: This should ASSERT isFinishedParsingChildren() instead. -
trunk/Source/WebCore/html/HTMLPlugInImageElement.h
r102962 r102983 55 55 bool shouldPreferPlugInsForImages() const { return m_shouldPreferPlugInsForImages; } 56 56 57 // Public for FrameView::addWidgetToUpdate() 58 bool needsWidgetUpdate() const { return m_needsWidgetUpdate; } 59 void setNeedsWidgetUpdate(bool needsWidgetUpdate) { m_needsWidgetUpdate = needsWidgetUpdate; } 60 57 61 protected: 58 62 HTMLPlugInImageElement(const QualifiedName& tagName, Document*, bool createdByParser, PreferPlugInsForImagesOption); … … 67 71 virtual void attach(); 68 72 virtual void detach(); 69 70 bool needsWidgetUpdate() const { return m_needsWidgetUpdate; }71 void setNeedsWidgetUpdate(bool needsWidgetUpdate) { m_needsWidgetUpdate = needsWidgetUpdate; }72 73 73 74 bool allowedToLoadFrameURL(const String& url); -
trunk/Source/WebCore/page/FrameView.cpp
r102903 r102983 1233 1233 m_widgetUpdateSet = adoptPtr(new RenderEmbeddedObjectSet); 1234 1234 1235 // Tell the DOM element that it needs a widget update. 1236 Node* node = object->node(); 1237 if (node->hasTagName(objectTag) || node->hasTagName(embedTag)) { 1238 HTMLPlugInImageElement* pluginElement = static_cast<HTMLPlugInImageElement*>(node); 1239 pluginElement->setNeedsWidgetUpdate(true); 1240 } 1241 1235 1242 m_widgetUpdateSet->add(object); 1236 1243 } … … 2214 2221 2215 2222 // FIXME: This could turn into a real virtual dispatch if we defined 2216 // updateWidget(bool) on HTMLElement. 2217 if (ownerElement->hasTagName(objectTag) || ownerElement->hasTagName(embedTag)) 2218 static_cast<HTMLPlugInImageElement*>(ownerElement)->updateWidget(CreateAnyWidgetType); 2223 // updateWidget(PluginCreationOption) on HTMLElement. 2224 if (ownerElement->hasTagName(objectTag) || ownerElement->hasTagName(embedTag)) { 2225 HTMLPlugInImageElement* pluginElement = static_cast<HTMLPlugInImageElement*>(ownerElement); 2226 if (pluginElement->needsWidgetUpdate()) 2227 pluginElement->updateWidget(CreateAnyWidgetType); 2228 } 2219 2229 // FIXME: It is not clear that Media elements need or want this updateWidget() call. 2220 2230 #if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
Note: See TracChangeset
for help on using the changeset viewer.