WebCore:
Reviewed by Mitz.
- fix <rdar://problem/
5530185> WebKit does not show <object> fallback content when both
URL and MIME type is omitted
Already covered by existing tests (that had incorrect results).
* loader/FrameLoader.cpp: (WebCore::FrameLoader::requestObject): Return false to indicate
failure when both URL and MIME type are empty. The old code would not attempt a load, but
it would indicate success.
* rendering/RenderPartObject.cpp: (WebCore::RenderPartObject::updateWidget): Remove
non-helpful early exit for the case where there is no URL and no type. Returning early
prevents the fallback code from running.
WebKit:
Reviewed by Mitz.
- fix problem I ran into while doing some testing on Mac for
<rdar://problem/
5530185> WebKit does not show <object>
fallback content when both URL and MIME type is omitted
I don't know how to reproduce this failure in DumpRenderTree, so there is no
regression test.
* Plugins/WebNullPluginView.h: Removed some unneeded declarations, including
the didSendError local variable. Instead we just set the error to nil once
we've sent it.
* Plugins/WebNullPluginView.mm:
(-[WebNullPluginView initWithFrame:error:DOMElement:]): Refactored so that
the null plug-in image code is separate from the rest of the function and
so that the whole thing is not inside an if statement. Also don't hold a
reference to the DOM element if there is no error to report.
(-[WebNullPluginView reportFailure]): Added. Does the actual delegate
callback. Happens back at the top level of the run loop so it doesn't
fire deep inside layout. Also wrote this so that it is guaranteed not to
reenter and so that it can handle the case where the delegate destroys
the world (including this object). NOTE: This is not a real, general
solution to the problem of plug-ins that do work inside layout. We will need
a more general fix that works for other plug-ins, and we'll track that with
a separate bug report.
(-[WebNullPluginView viewDidMoveToWindow]): Removed most of the code;
changed so it just does a performSelector:afterDelay:0.
LayoutTests:
Reviewed by Mitz.
- update tests affected by fix for <rdar://problem/
5530185> WebKit does not show
<object> fallback content when both URL and MIME type is omitted
* dom/html/level2/html/AppletsCollection-expected.txt: The text "Nothing here!" renders now.
* fast/dom/HTMLDocument/object-by-name-unknown-child-element-expected.txt: Some blank
space renders now.
* platform/mac/fast/invalid/residual-style-expected.txt: A font element renders now.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27378
268f45cc-cd09-0410-ab3c-
d52691b4dbfc