Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
LayoutTests:
Reviewed by Eric. - test case that verifies that <object> containing html is treated like <iframe> in various respects http://bugzilla.opendarwin.org/show_bug.cgi?id=7125 * fast/dom/HTMLObjectElement/object-as-frame-expected.txt: Added. * fast/dom/HTMLObjectElement/object-as-frame.html: Added. - updated this test to reflect that the onload event now fires for iframes, including ones with empty src http://bugzilla.opendarwin.org/show_bug.cgi?id=3609 * fast/events/event-targets-expected.checksum: Removed. * fast/events/event-targets-expected.png: Removed. * fast/events/event-targets-expected.txt: * fast/events/event-targets.html: WebCore: Reviewed by Eric. - fixed "remove frame, renderer and completed flag from ChildFrame, make Frame track these" http://bugzilla.opendarwin.org/show_bug.cgi?id=7125 - fixed "onload event never called for iframe element with emtpy or about:blank src" http://bugzilla.opendarwin.org/show_bug.cgi?id=3609 * bridge/mac/MacFrame.h: * bridge/mac/MacFrame.mm: (WebCore::MacFrame::MacFrame): pass along renderer (WebCore::MacFrame::nextKeyViewInFrameHierarchy): get owner element in newfangled way * bridge/mac/WebCoreFrameBridge.h: * bridge/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge removeChild:]): don't mess with renderer (-[WebCoreFrameBridge init]): call new designated initializer (-[WebCoreFrameBridge initWithRenderer:]): new designated initializer (-[WebCoreFrameBridge dealloc]): don't mess with renderer (-[WebCoreFrameBridge finalize]): ditto (-[WebCoreFrameBridge installInFrame:]): ditto * page/Frame.cpp: (WebCore::FrameList::find): get name from frame not ChildFrame (WebCore::Frame::init): take renderer parameter (WebCore::Frame::clear): clear m_plugins, not m_objects (WebCore::Frame::childBegin): updated comment (WebCore::Frame::stop): add check-completed for documentless case here (WebCore::Frame::checkCompleted): don't track separate completed flag in ChildFrame, use the sub Frame object's own (WebCore::Frame::checkEmitLoadEvent): ditto (WebCore::Frame::requestFrame): don't store renderer and name in ChildFrame, instead pass them along (WebCore::Frame::requestObject): ditto above (WebCore::Frame::loadPlugin): expect renderer parameter (WebCore::Frame::loadSubframe): expect renderer and name parameters (WebCore::Frame::slotChildStarted): don't mess with ChildFrame (WebCore::Frame::slotChildCompleted): ditto (WebCore::Frame::childFrame): don't check m_objects (WebCore::Frame::frameExists): fix spacing, remove obsolete check and comment (WebCore::Frame::frameNames): get name from frame (WebCore::Frame::ownerElement): simplify a lot since the Frame knows its owner renderer now (WebCore::Frame::ownerRenderer): added (WebCore::Frame::canCachePage): check m_plugins not m_objects * page/Frame.h: * page/FramePrivate.h: (WebCore::ChildFrame): Remove constructor, most fields. (WebCore::FramePrivate::FramePrivate): Pass ownerRenderer * rendering/render_frames.cpp: (WebCore::RenderPartObject::updateWidget): Make sure to pass name attr to requestObject. WebKit: Reviewed by Eric. - fixed "remove frame, renderer and completed flag from ChildFrame, make Frame track these" http://bugzilla.opendarwin.org/show_bug.cgi?id=7125 - fixed "onload event never called for iframe element with emtpy or about:blank src" http://bugzilla.opendarwin.org/show_bug.cgi?id=3609 * WebCoreSupport/WebFrameBridge.h: * WebCoreSupport/WebFrameBridge.m: (-[WebFrameBridge initWithPage:webView:renderer:frameName:view:]): Pass along renderer. (-[WebFrameBridge createChildFrameNamed:withURL:referrer:renderPart:allowsScrolling:marginWidth:marginHeight:]): Pass along renderer. * WebCoreSupport/WebPageBridge.m: (-[WebPageBridge initWithMainFrameName:webView:frameView:]): Pass null for renderer. * WebView/WebView.m: * WebView/WebViewPrivate.h: Canonical link: https://commits.webkit.org/10652@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@12638 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
22 changed files
with
282 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
PASS window.frames.length is 2 | ||
PASS window.frames[0].frameElement.name is "frame" | ||
PASS window.frames[1].frameElement.name is "obj" | ||
Loading 'data:text/html,Updated contents of iframe' in iframe... | ||
Loading 'data:text/html,Updated contents of object' in object... | ||
PASS window.frames[0].location.toString() is "data:text/html,Updated contents of iframe" | ||
PASS window.frames[1].location.toString() is "data:text/html,Updated contents of object" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | ||
<html> | ||
<head> | ||
<link rel="stylesheet" href="../../js/resources/js-test-style.css"> | ||
<script src="../../js/resources/js-test-pre.js"></script> | ||
<script> | ||
|
||
if (window.layoutTestController) { | ||
layoutTestController.dumpAsText(); | ||
layoutTestController.waitUntilDone(); | ||
} | ||
|
||
var updatedFrameURL = "data:text/html,Updated contents of iframe"; | ||
var updatedObjectURL = "data:text/html,Updated contents of object"; | ||
|
||
function runTests() | ||
{ | ||
shouldBe("window.frames.length", "2"); | ||
shouldBe("window.frames[0].frameElement.name", '"frame"'); | ||
shouldBe("window.frames[1].frameElement.name", '"obj"'); | ||
debug("Loading '" + updatedFrameURL + "' in iframe..."); | ||
debug("Loading '" + updatedObjectURL + "' in object..."); | ||
open(updatedFrameURL, "frame"); | ||
open(updatedObjectURL, "obj"); | ||
setTimeout("runMoreTests()", 0); | ||
} | ||
|
||
function runMoreTests() | ||
{ | ||
shouldBe("window.frames[0].location.toString()", '"' + updatedFrameURL + '"'); | ||
shouldBe("window.frames[1].location.toString()", '"' + updatedObjectURL + '"'); | ||
if (window.layoutTestController) { | ||
layoutTestController.notifyDone(); | ||
} | ||
} | ||
</script> | ||
|
||
</head> | ||
<body onload="runTests()"> | ||
<p id="description"></p> | ||
<div id="console"></div> | ||
|
||
<iframe name="frame" src="data:text/html,Old contents of iframe"></iframe> | ||
<object name="obj" type="text/html" data="data:text/html,New contents of frame"></object> | ||
|
||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
Deleted file not rendered
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,15 @@ | ||
layer at (0,0) size 800x600 | ||
RenderCanvas at (0,0) size 800x600 | ||
layer at (0,0) size 800x288 | ||
RenderBlock {HTML} at (0,0) size 800x288 | ||
RenderBody {BODY} at (8,16) size 784x256 | ||
RenderBlock {P} at (0,0) size 784x18 | ||
RenderInline {U} at (0,0) size 392x18 | ||
RenderText {TEXT} at (0,0) size 392x18 | ||
text run at (0,0) width 392: "Any lines that are bold correspond to event handlers that fired." | ||
RenderBlock {P} at (0,34) size 784x18 | ||
RenderText {TEXT} at (0,0) size 115x18 | ||
text run at (0,0) width 115: "IMG onloadEvent" | ||
RenderBlock {P} at (0,68) size 784x18 | ||
RenderText {TEXT} at (0,0) size 144x18 | ||
text run at (0,0) width 144: "OBJECT onloadEvent" | ||
RenderBlock {P} at (0,102) size 784x18 | ||
RenderText {TEXT} at (0,0) size 145x18 | ||
text run at (0,0) width 145: "IFRAME onloadEvent" | ||
RenderBlock {P} at (0,136) size 784x18 | ||
RenderText {TEXT} at (0,0) size 131x18 | ||
text run at (0,0) width 131: "IMG onunloadEvent" | ||
RenderBlock {P} at (0,170) size 784x18 | ||
RenderText {TEXT} at (0,0) size 160x18 | ||
text run at (0,0) width 160: "OBJECT onunloadEvent" | ||
RenderBlock {P} at (0,204) size 784x18 | ||
RenderText {TEXT} at (0,0) size 161x18 | ||
text run at (0,0) width 161: "IFRAME onunloadEvent" | ||
RenderBlock {P} at (0,238) size 784x18 | ||
RenderText {TEXT} at (0,0) size 674x18 | ||
text run at (0,0) width 674: "NOTE: If IFRAME events start firing, make sure to check out the security issue <rdar://problem/4317593>" | ||
RenderBlock (anonymous) at (0,272) size 784x0 | ||
RenderText {TEXT} at (0,0) size 0x0 | ||
RenderText {TEXT} at (0,0) size 0x0 | ||
RenderText {TEXT} at (0,0) size 0x0 | ||
RenderText {TEXT} at (0,0) size 0x0 | ||
Any lines that are bold and say "- fired" correspond to event handlers that fired. Only the iframe onload event should fire in this test case. | ||
|
||
IMG onloadEvent | ||
|
||
OBJECT onloadEvent | ||
|
||
IFRAME onloadEvent - fired | ||
|
||
IMG onunloadEvent | ||
|
||
OBJECT onunloadEvent | ||
|
||
IFRAME onunloadEvent | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.