Bug 54597

Summary: InspectorAgent calls offsetWidth in the middle of painting
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: Web Inspector (Deprecated)Assignee: Pavel Feldman <pfeldman>
Status: RESOLVED FIXED    
Severity: Normal CC: pfeldman
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch none

Simon Fraser (smfr)
Reported 2011-02-16 15:44:19 PST
I just hit this assertion: ASSERTION FAILED: !view() || (!view()->isInLayout() && !view()->isPainting()) /Volumes/InternalData/Development/webkit/OpenSource/Source/WebCore/dom/Document.cpp(1554) : virtual void WebCore::Document::updateStyleIfNeeded() -> WebCore::Document::updateStyleIfNeeded() -> WebCore::Document::updateLayout() -> WebCore::Document::updateLayoutIgnorePendingStylesheets() -> WebCore::Element::offsetWidth() -> WebCore::InspectorAgent::drawElementTitle(WebCore::GraphicsContext&, WebCore::IntRect const&, WebCore::FloatRect const&, WebCore::Settings*) const -> WebCore::InspectorAgent::drawNodeHighlight(WebCore::GraphicsContext&) const -> WebCore::InspectorController::drawNodeHighlight(WebCore::GraphicsContext&) const -> -[WebNodeHighlightView drawRect:] -> -[NSView _drawRect:clip:] -> -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] -> -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] -> -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] -> -[NSNextStepFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] -> -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] -> -[NSView displayIfNeeded] -> -[WebNodeHighlight setNeedsUpdateInTargetViewRect:] -> -[WebHTMLView drawSingleRect:] -> -[WebHTMLView drawRect:] -> -[NSView _drawRect:clip:] -> -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] -> -[WebHTMLView(WebPrivate) _recursiveDisplayAllDirtyWithLockFocus:visRect:] -> -[NSView _recursiveDisplaySelfAndDescendantsInRect:] -> -[NSView _recursiveDisplayDescendantsInRect:] -> -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] -> -[NSView _recursiveDisplaySelfAndDescendantsInRect:] -> -[NSView _recursiveDisplayDescendantsInRect:] -> -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] -> -[NSView _recursiveDisplaySelfAndDescendantsInRect:] -> -[NSView _recursiveDisplayDescendantsInRect:] -> -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] -> -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] InspectorAgent::drawElementTitle() does: nodeTitle += String::number(highlightedElement ? highlightedElement->offsetWidth() : boundingBox.width()); Calling offsetWidth in the middle of painting is not allowed, because it can cause layout to happen.
Attachments
Patch (5.13 KB, patch)
2011-02-26 07:03 PST, Pavel Feldman
no flags
Pavel Feldman
Comment 1 2011-02-26 07:03:13 PST
Pavel Feldman
Comment 2 2011-02-28 03:24:19 PST
Comment on attachment 83938 [details] Patch Clearing flags on attachment: 83938 Committed r79850: <http://trac.webkit.org/changeset/79850>
Pavel Feldman
Comment 3 2011-02-28 03:24:27 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.