Changeset 15170 in webkit
- Timestamp:
- Jul 5, 2006 2:29:41 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r15158 r15170 1 2006-07-05 Anders Carlsson <acarlsson@apple.com> 2 3 Reviewed by Maciej. 4 5 http://bugzilla.opendarwin.org/show_bug.cgi?id=3581 6 iFrames set to display:none are Missing from frames array 7 8 * fast/events/mouseover-mouseout2-expected.txt: 9 * fast/events/mouseover-mouseout2.html: 10 Update expected result. Since we now keep the frame around, the mouseout event is 11 now dispatched to the element in the frame. 12 13 * fast/events/onloadFrameCrash-expected.checksum: 14 * fast/events/onloadFrameCrash-expected.png: 15 * fast/events/onloadFrameCrash-expected.txt: 16 This does hide the frame now. 17 18 * fast/frames/iframe-display-none-expected.txt: Added. 19 * fast/frames/iframe-display-none.html: Added. 20 * fast/frames/resources/iframe-display-none-child.html: Added. 21 New test that tests JS interaction with frames. 22 23 * fast/frames/iframe-double-attach-expected.txt: Added. 24 * fast/frames/iframe-double-attach.html: Added. 25 1 26 2006-07-04 Maciej Stachowiak <mjs@apple.com> 2 27 -
trunk/LayoutTests/fast/events/mouseover-mouseout2-expected.txt
r13402 r15170 22 22 mouseover on frame3 23 23 mouseover on t3_1 24 mouseout on t3_1 24 25 mouseout on frame3 25 26 mouseover on t3_2 … … 48 49 mouseover on frame3 49 50 mouseover on t3_1 51 mouseout on t3_1 50 52 mouseout on frame3 51 53 mouseover on t3_2 -
trunk/LayoutTests/fast/events/mouseover-mouseout2.html
r13402 r15170 224 224 <tr> 225 225 <td id=log style="vertical-align:top"></td> 226 <td id=exp style="vertical-align:top"><LI>mouseover on frame1</LI><LI>mouseover on t1</LI><LI>mouseout on t1</LI><LI>mouseout on frame1</LI><LI>mouseover on frame2</LI><LI>mouseover on t2</LI><LI>mouseout on t2</LI><LI>mouseout on frame2</LI><LI>mouseover on frame3</LI><LI>mouseover on t3_1</LI><LI>mouseout on frame3</LI><LI>mouseover on t3_2</LI><LI>mouseout on t3_2</LI><LI>mouseover on t4_2</LI><LI>mouseout on t4_2</LI><LI>mouseover on frame4</LI><LI>mouseover on t4_1</LI><LI>mouseout on t4_1</LI><LI>mouseout on frame4</LI><LI>mouseover on frame5</LI><LI>mouseover on t5_1</LI><LI>mouseout on frame5</LI><LI>mouseover on t5_2</LI><LI>mouseout on t5_2</LI><LI>mouseover on t6</LI><LI>mouseout on t6</LI></td>226 <td id=exp style="vertical-align:top"><LI>mouseover on frame1</LI><LI>mouseover on t1</LI><LI>mouseout on t1</LI><LI>mouseout on frame1</LI><LI>mouseover on frame2</LI><LI>mouseover on t2</LI><LI>mouseout on t2</LI><LI>mouseout on frame2</LI><LI>mouseover on frame3</LI><LI>mouseover on t3_1</LI><LI>mouseout on t3_1</LI><LI>mouseout on frame3</LI><LI>mouseover on t3_2</LI><LI>mouseout on t3_2</LI><LI>mouseover on t4_2</LI><LI>mouseout on t4_2</LI><LI>mouseover on frame4</LI><LI>mouseover on t4_1</LI><LI>mouseout on t4_1</LI><LI>mouseout on frame4</LI><LI>mouseover on frame5</LI><LI>mouseover on t5_1</LI><LI>mouseout on frame5</LI><LI>mouseover on t5_2</LI><LI>mouseout on t5_2</LI><LI>mouseover on t6</LI><LI>mouseout on t6</LI></td> 227 227 </tr> 228 228 </table> -
trunk/LayoutTests/fast/events/onloadFrameCrash-expected.checksum
r11995 r15170 1 cbc367633746909085889bdfe6ac90ce 1 853de00567d121bea0b7bece66a5d61c -
trunk/LayoutTests/fast/events/onloadFrameCrash-expected.txt
r14684 r15170 3 3 layer at (0,0) size 800x600 4 4 RenderBlock {HTML} at (0,0) size 800x600 5 RenderBody {BODY} at (8,8) size 784x5846 RenderPartObject {IFRAME} at (0,0) size 300x1507 RenderText {#text} at (300,136) size 92x188 text run at (300,136) width 92: "This is the text" -
trunk/WebCore/ChangeLog
r15154 r15170 1 2006-07-05 Anders Carlsson <acarlsson@apple.com> 2 3 Reviewed by Maciej. 4 5 http://bugzilla.opendarwin.org/show_bug.cgi?id=3581 6 iFrames set to display:none are Missing from frames array 7 8 * bridge/mac/FrameMac.h: 9 * bridge/mac/FrameMac.mm: 10 (WebCore::FrameMac::FrameMac): 11 (WebCore::FrameMac::createFrame): 12 * bridge/mac/WebCoreFrameBridge.h: 13 * bridge/mac/WebCoreFrameBridge.mm: 14 (-[WebCoreFrameBridge initSubframeWithOwnerElement:]): 15 (-[WebCoreFrameBridge installInFrame:]): 16 Modify to pass the owner element instead of the owner renderer. 17 18 * dom/ContainerNode.cpp: 19 (WebCore::ContainerNode::insertBefore): 20 (WebCore::ContainerNode::replaceChild): 21 (WebCore::ContainerNode::appendChild): 22 Dispatch the node inserted events before attaching the nodes. This is what the 23 tokenizer does. 24 25 * html/HTMLFrameElement.cpp: 26 (WebCore::HTMLFrameElement::openURL): 27 (WebCore::HTMLFrameElement::attach): 28 Pass the element to requestFrame. 29 30 (WebCore::HTMLFrameElement::setLocation): 31 Don't call attach/detach on an iframe. 32 33 * html/HTMLIFrameElement.cpp: 34 (WebCore::HTMLIFrameElement::insertedIntoDocument): 35 Load the frame here (using openURL). 36 37 (WebCore::HTMLIFrameElement::removedFromDocument): 38 Call frameDetached. 39 40 (WebCore::HTMLIFrameElement::attach): 41 If there's a renderer, attach the content frame to it. 42 43 (WebCore::HTMLIFrameElement::detach): 44 Reset the renderer's frame. 45 46 (WebCore::HTMLIFrameElement::openURL): 47 Modify to request the frame. 48 49 * html/HTMLIFrameElement.h: 50 Add detach. 51 52 * page/Frame.cpp: 53 (WebCore::parentFromOwnerElement): 54 (WebCore::Frame::Frame): 55 (WebCore::Frame::~Frame): 56 (WebCore::Frame::requestFrame): 57 (WebCore::Frame::requestObject): 58 (WebCore::Frame::loadSubframe): 59 (WebCore::Frame::ownerElement): 60 (WebCore::Frame::ownerRenderer): 61 (WebCore::Frame::disconnectOwnerElement): 62 * page/Frame.h: 63 * page/FramePrivate.h: 64 (WebCore::FramePrivate::FramePrivate): 65 * rendering/RenderPart.cpp: 66 (WebCore::RenderPart::setFrame): 67 Modify to keep an owner element around instead of the renderer. 68 69 * rendering/RenderPartObject.cpp: 70 (WebCore::RenderPartObject::updateWidget): 71 Don't do anything for iframes. 72 1 73 2006-07-04 Kevin Ollivier <kevino@theolliviers.com> 2 74 -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r15154 r15170 7347 7347 isa = XCBuildConfiguration; 7348 7348 buildSettings = { 7349 DEBUG_INFORMATION_FORMAT = dwarf; 7349 7350 FEATURE_DEFINES = "SVG_SUPPORT XPATH_SUPPORT"; 7350 7351 GCC_ENABLE_CPP_EXCEPTIONS = NO; … … 7383 7384 isa = XCBuildConfiguration; 7384 7385 buildSettings = { 7386 DEBUG_INFORMATION_FORMAT = dwarf; 7385 7387 FEATURE_DEFINES = "SVG_SUPPORT XPATH_SUPPORT"; 7386 7388 GCC_ENABLE_CPP_EXCEPTIONS = NO; … … 7419 7421 isa = XCBuildConfiguration; 7420 7422 buildSettings = { 7423 DEBUG_INFORMATION_FORMAT = dwarf; 7421 7424 FEATURE_DEFINES = "SVG_SUPPORT XPATH_SUPPORT"; 7422 7425 GCC_ENABLE_CPP_EXCEPTIONS = NO; -
trunk/WebCore/bridge/mac/FrameMac.h
r15090 r15170 113 113 { 114 114 public: 115 FrameMac(Page*, RenderPart*);115 FrameMac(Page*, Element*); 116 116 ~FrameMac(); 117 117 … … 139 139 virtual void redirectDataToPlugin(Widget* pluginWidget); 140 140 141 virtual Frame* createFrame(const KURL& url, const String& name, RenderPart* renderer, const String& referrer);141 virtual Frame* createFrame(const KURL& url, const String& name, Element* ownerElement, const String& referrer); 142 142 143 143 virtual void scheduleClose(); -
trunk/WebCore/bridge/mac/FrameMac.mm
r15109 r15170 149 149 } 150 150 151 FrameMac::FrameMac(Page* page, RenderPart* ownerRenderer)152 : Frame(page, owner Renderer)151 FrameMac::FrameMac(Page* page, Element* ownerElement) 152 : Frame(page, ownerElement) 153 153 , _bridge(nil) 154 154 , _mouseDownView(nil) … … 540 540 541 541 542 Frame* FrameMac::createFrame(const KURL& url, const String& name, RenderPart* renderer, const String& referrer)542 Frame* FrameMac::createFrame(const KURL& url, const String& name, Element* ownerElement, const String& referrer) 543 543 { 544 544 BEGIN_BLOCK_OBJC_EXCEPTIONS; … … 547 547 int marginWidth = -1; 548 548 int marginHeight = -1; 549 if ( renderer->element()->hasTagName(frameTag) || renderer->element()->hasTagName(iframeTag)) {550 HTMLFrameElement* o = static_cast<HTMLFrameElement*>( renderer->element());549 if (ownerElement->hasTagName(frameTag) || ownerElement->hasTagName(iframeTag)) { 550 HTMLFrameElement* o = static_cast<HTMLFrameElement*>(ownerElement); 551 551 allowsScrolling = o->scrollingMode() != ScrollBarAlwaysOff; 552 552 marginWidth = o->getMarginWidth(); … … 557 557 withURL:url.getNSURL() 558 558 referrer:referrer 559 renderPart:renderer559 ownerElement:ownerElement 560 560 allowsScrolling:allowsScrolling 561 561 marginWidth:marginWidth -
trunk/WebCore/bridge/mac/WebCoreFrameBridge.h
r15106 r15170 36 36 namespace WebCore { 37 37 class FrameMac; 38 class RenderPart;38 class Element; 39 39 } 40 40 41 41 typedef WebCore::FrameMac WebCoreMacFrame; 42 typedef WebCore:: RenderPart WebCoreRenderPart;42 typedef WebCore::Element WebCoreElement; 43 43 44 44 #else 45 45 46 46 @class WebCoreMacFrame; 47 @class WebCore RenderPart;47 @class WebCoreElement; 48 48 @class RenderArena; 49 49 … … 190 190 191 191 - (id)initMainFrameWithPage:(WebCorePageBridge *)page; 192 - (id)initSubframeWith Renderer:(WebCoreRenderPart *)renderer;192 - (id)initSubframeWithOwnerElement:(WebCoreElement *)ownerElement; 193 193 194 194 - (void)close; … … 536 536 - (WebCoreFrameBridge *)createChildFrameNamed:(NSString *)frameName withURL:(NSURL *)URL 537 537 referrer:(NSString *)referrer 538 renderPart:(WebCoreRenderPart *)renderPart538 ownerElement:(WebCoreElement *)ownerElement 539 539 allowsScrolling:(BOOL)allowsScrolling marginWidth:(int)width marginHeight:(int)height; 540 540 -
trunk/WebCore/bridge/mac/WebCoreFrameBridge.mm
r15106 r15170 465 465 } 466 466 467 - (id)initSubframeWith Renderer:(RenderPart *)renderer467 - (id)initSubframeWithOwnerElement:(Element *)ownerElement 468 468 { 469 469 if (!(self = [super init])) 470 470 return nil; 471 471 472 m_frame = new FrameMac( renderer->node()->document()->frame()->page(), renderer);472 m_frame = new FrameMac(ownerElement->document()->frame()->page(), ownerElement); 473 473 m_frame->setBridge(self); 474 474 _shouldCreateRenderers = YES; … … 1007 1007 // If this isn't the main frame, it must have a render m_frame set, or it 1008 1008 // won't ever get installed in the view hierarchy. 1009 ASSERT(self == [[self page] mainFrame] || m_frame->owner Renderer());1009 ASSERT(self == [[self page] mainFrame] || m_frame->ownerElement()); 1010 1010 1011 1011 m_frame->view()->setView(view); -
trunk/WebCore/dom/ContainerNode.cpp
r14916 r15170 198 198 allowEventDispatch(); 199 199 200 // Dispatch the mutation events. 201 dispatchChildInsertionEvents(child.get(), ec); 202 200 203 // Add child to the rendering tree. 201 204 if (attached() && !child->attached()) 202 205 child->attach(); 203 204 // Dispatch the mutation events.205 dispatchChildInsertionEvents(child.get(), ec);206 206 207 207 child = nextChild.release(); … … 302 302 allowEventDispatch(); 303 303 304 // Dispatch the mutation events 305 dispatchChildInsertionEvents(child.get(), ec); 306 304 307 // Add child to the rendering tree 305 308 if (attached() && !child->attached()) 306 309 child->attach(); 307 308 // Dispatch the mutation events309 dispatchChildInsertionEvents(child.get(), ec);310 310 311 311 prev = child; … … 521 521 allowEventDispatch(); 522 522 523 // Dispatch the mutation events 524 dispatchChildInsertionEvents(child.get(), ec); 525 523 526 // Add child to the rendering tree 524 527 // ### should we detach() it first if it's already attached? … … 526 529 child->attach(); 527 530 528 // Dispatch the mutation events529 dispatchChildInsertionEvents(child.get(), ec);530 531 531 child = nextChild.release(); 532 532 } -
trunk/WebCore/html/HTMLFrameElement.cpp
r15050 r15170 123 123 childFrame->openURL(document()->completeURL(relativeURL.deprecatedString())); 124 124 else 125 parentFrame->requestFrame( static_cast<RenderFrame *>(renderer()), relativeURL, m_name);125 parentFrame->requestFrame(this, relativeURL, m_name); 126 126 } 127 127 … … 221 221 222 222 // load the frame contents 223 frame->requestFrame( static_cast<RenderFrame*>(renderer()), relativeURL, m_name);223 frame->requestFrame(this, relativeURL, m_name); 224 224 225 225 if (contentFrame()) … … 267 267 // Handle the common case where we decided not to make a frame the first time. 268 268 // Detach and the let attach() decide again whether to make the frame for this URL. 269 if (!renderer() ) {269 if (!renderer() && !hasTagName(iframeTag)) { 270 270 detach(); 271 271 attach(); -
trunk/WebCore/html/HTMLIFrameElement.cpp
r14334 r15170 49 49 HTMLIFrameElement::~HTMLIFrameElement() 50 50 { 51 if (Frame* frame = contentFrame()) { 52 frame->disconnectOwnerElement(); 53 frame->page()->decrementFrameCount(); 54 frame->frameDetached(); 55 ASSERT(!contentFrame()); 56 } 51 57 } 52 58 … … 94 100 95 101 HTMLElement::insertedIntoDocument(); 102 103 // Load the frame 104 m_name = getAttribute(nameAttr); 105 if (m_name.isNull()) 106 m_name = getAttribute(idAttr); 107 108 Frame* parentFrame = document()->frame(); 109 if (parentFrame) { 110 parentFrame->page()->incrementFrameCount(); 111 m_name = parentFrame->tree()->uniqueChildName(m_name); 112 113 openURL(); 114 } 96 115 } 97 116 … … 103 122 } 104 123 124 if (Frame* frame = contentFrame()) { 125 frame->disconnectOwnerElement(); 126 frame->page()->decrementFrameCount(); 127 frame->frameDetached(); 128 ASSERT(!contentFrame()); 129 } 130 105 131 HTMLElement::removedFromDocument(); 106 132 } … … 119 145 void HTMLIFrameElement::attach() 120 146 { 121 m_name = getAttribute(nameAttr);122 if (m_name.isNull())123 m_name = getAttribute(idAttr);124 125 147 HTMLElement::attach(); 126 148 127 Frame* parentFrame = document()->frame(); 128 if (renderer() && parentFrame) { 129 parentFrame->page()->incrementFrameCount(); 130 m_name = parentFrame->tree()->uniqueChildName(m_name); 131 static_cast<RenderPartObject*>(renderer())->updateWidget(); 149 RenderPartObject* renderPart = static_cast<RenderPartObject*>(renderer()); 150 151 if (renderPart) { 152 if (!contentFrame()) 153 openURL(); 154 155 renderPart->setFrame(contentFrame()); 156 renderPart->setWidget(contentFrame()->view()); 157 renderPart->updateWidget(); 132 158 needWidgetUpdate = false; 133 159 } 134 160 } 161 162 void HTMLIFrameElement::detach() 163 { 164 RenderPartObject* renderPart = static_cast<RenderPartObject*>(renderer()); 165 166 if (renderPart) 167 renderPart->setFrame(0); 168 169 HTMLElement::detach(); 170 } 171 135 172 136 173 void HTMLIFrameElement::recalcStyle( StyleChange ch ) … … 146 183 void HTMLIFrameElement::openURL() 147 184 { 148 needWidgetUpdate = true; 149 setChanged(); 185 if (!isURLAllowed(m_URL)) 186 return; 187 if (m_URL.isEmpty()) 188 m_URL = "about:blank"; 189 190 document()->frame()->requestFrame(this, m_URL, m_name); 191 if (contentFrame()) 192 contentFrame()->setInViewSourceMode(viewSourceMode()); 150 193 } 151 194 -
trunk/WebCore/html/HTMLIFrameElement.h
r14334 r15170 47 47 48 48 virtual void attach(); 49 virtual void detach(); 49 50 virtual bool rendererIsNeeded(RenderStyle*); 50 51 virtual RenderObject *createRenderer(RenderArena*, RenderStyle*); -
trunk/WebCore/page/Frame.cpp
r15097 r15170 140 140 #endif 141 141 142 static inline Frame* parentFromOwner Renderer(RenderPart* ownerRenderer)143 { 144 if (!owner Renderer)142 static inline Frame* parentFromOwnerElement(Element* ownerElement) 143 { 144 if (!ownerElement) 145 145 return 0; 146 return owner Renderer->node()->document()->frame();147 } 148 149 Frame::Frame(Page* page, RenderPart* ownerRenderer)150 : d(new FramePrivate(page, parentFromOwner Renderer(ownerRenderer), this, ownerRenderer))146 return ownerElement->document()->frame(); 147 } 148 149 Frame::Frame(Page* page, Element* ownerElement) 150 : d(new FramePrivate(page, parentFromOwnerElement(ownerElement), this, ownerElement)) 151 151 { 152 152 AtomicString::init(); … … 170 170 #endif 171 171 172 if (ownerRenderer )173 ownerRenderer ->setFrame(this);172 if (ownerRenderer()) 173 ownerRenderer()->setFrame(this); 174 174 } 175 175 … … 206 206 for (HashSet<Frame*>::iterator it = openedBy.begin(); it != end; ++it) 207 207 (*it)->setOpener(0); 208 209 if (d->m_ownerRenderer) 210 d->m_ownerRenderer->setFrame(0); 211 ASSERT(!d->m_ownerRenderer); 212 208 209 if (ownerRenderer()) { 210 ownerRenderer()->setFrame(0); 211 ASSERT(!d->m_ownerElement); 212 } 213 213 214 if (d->m_view) { 214 215 d->m_view->hide(); … … 1381 1382 } 1382 1383 1383 bool Frame::requestFrame( RenderPart* renderer, const String& urlParam, const AtomicString& frameName)1384 bool Frame::requestFrame(Element* ownerElement, const String& urlParam, const AtomicString& frameName) 1384 1385 { 1385 1386 DeprecatedString _url = urlParam.deprecatedString(); … … 1400 1401 frame->openURLRequest(request); 1401 1402 } else 1402 frame = loadSubframe( renderer, url, frameName, d->m_referrer);1403 frame = loadSubframe(ownerElement, url, frameName, d->m_referrer); 1403 1404 1404 1405 if (!frame) … … 1426 1427 1427 1428 // FIXME: ok to always make a new one? when does the old frame get removed? 1428 return loadSubframe( renderer, completedURL, frameName, d->m_referrer);1429 return loadSubframe(static_cast<Element*>(renderer->element()), completedURL, frameName, d->m_referrer); 1429 1430 } 1430 1431 … … 1472 1473 } 1473 1474 1474 Frame* Frame::loadSubframe( RenderPart* renderer, const KURL& url, const String& name, const String& referrer)1475 { 1476 Frame* frame = createFrame(url, name, renderer, referrer);1475 Frame* Frame::loadSubframe(Element* ownerElement, const KURL& url, const String& name, const String& referrer) 1476 { 1477 Frame* frame = createFrame(url, name, ownerElement, referrer); 1477 1478 if (!frame) { 1478 1479 checkEmitLoadEvent(); … … 1482 1483 frame->childBegin(); 1483 1484 1484 if ( renderer&& frame->view())1485 renderer->setWidget(frame->view());1485 if (ownerElement->renderer() && frame->view()) 1486 static_cast<RenderWidget*>(ownerElement->renderer())->setWidget(frame->view()); 1486 1487 1487 1488 checkEmitLoadEvent(); … … 2596 2597 Element* Frame::ownerElement() 2597 2598 { 2598 RenderPart* ownerElementRenderer = d->m_ownerRenderer; 2599 if (!ownerElementRenderer) 2599 return d->m_ownerElement; 2600 } 2601 2602 RenderPart* Frame::ownerRenderer() 2603 { 2604 Element* ownerElement = d->m_ownerElement; 2605 if (!ownerElement) 2600 2606 return 0; 2601 return static_cast<Element*>(ownerElementRenderer->element()); 2602 } 2603 2604 RenderPart* Frame::ownerRenderer() 2605 { 2606 return d->m_ownerRenderer; 2607 return static_cast<RenderPart*>(ownerElement->renderer()); 2607 2608 } 2608 2609 … … 3581 3582 } 3582 3583 3583 void Frame::disconnectOwner Renderer()3584 { 3585 d->m_owner Renderer= 0;3584 void Frame::disconnectOwnerElement() 3585 { 3586 d->m_ownerElement = 0; 3586 3587 } 3587 3588 -
trunk/WebCore/page/Frame.h
r15050 r15170 97 97 enum { NoXPosForVerticalArrowNavigation = INT_MIN }; 98 98 99 Frame(Page*, RenderPart*);99 Frame(Page*, Element*); 100 100 virtual ~Frame(); 101 101 … … 579 579 protected: 580 580 virtual Plugin* createPlugin(Element* node, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType) = 0; 581 virtual Frame* createFrame(const KURL& url, const String& name, RenderPart* renderer, const String& referrer) = 0;581 virtual Frame* createFrame(const KURL& url, const String& name, Element* ownerElement, const String& referrer) = 0; 582 582 virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType) = 0; 583 583 … … 618 618 bool loadPlugin(RenderPart* renderer, const KURL& url, const String& mimeType, 619 619 const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback); 620 Frame* loadSubframe( RenderPart* renderer, const KURL& url, const String& name, const String& referrer);620 Frame* loadSubframe(Element* ownerElement, const KURL& url, const String& name, const String& referrer); 621 621 622 622 public: … … 627 627 bool requestObject(RenderPart* frame, const String& url, const AtomicString& frameName, 628 628 const String& serviceType, const Vector<String>& paramNames, const Vector<String>& paramValues); 629 bool requestFrame( RenderPart* frame, const String& url, const AtomicString& frameName);629 bool requestFrame(Element* ownerElement, const String& url, const AtomicString& frameName); 630 630 631 631 Document* document() const; … … 746 746 void replaceContentsWithScriptResult(const KURL& url); 747 747 748 void disconnectOwner Renderer();748 void disconnectOwnerElement(); 749 749 750 750 void setNeedsReapplyStyles(); -
trunk/WebCore/page/FramePrivate.h
r15050 r15170 56 56 class FramePrivate { 57 57 public: 58 FramePrivate(Page* page, Frame* parent, Frame* thisFrame, RenderPart* ownerRenderer)58 FramePrivate(Page* page, Frame* parent, Frame* thisFrame, Element* ownerElement) 59 59 : m_page(page) 60 60 , m_treeNode(thisFrame, parent) 61 , m_owner Renderer(ownerRenderer)61 , m_ownerElement(ownerElement) 62 62 , m_extension(0) 63 63 , m_jscript(0) … … 119 119 Vector<RefPtr<Plugin> > m_plugins; 120 120 121 RenderPart* m_ownerRenderer;121 Element* m_ownerElement; 122 122 RefPtr<FrameView> m_view; 123 123 BrowserExtension* m_extension; -
trunk/WebCore/rendering/RenderPart.cpp
r14334 r15170 64 64 if (frame == m_frame) 65 65 return; 66 66 67 if (m_frame) 67 m_frame->disconnectOwner Renderer();68 m_frame->disconnectOwnerElement(); 68 69 m_frame = frame; 69 70 } -
trunk/WebCore/rendering/RenderPartObject.cpp
r15050 r15170 236 236 } 237 237 frame->requestObject(this, url, o->getAttribute(nameAttr), serviceType, paramNames, paramValues); 238 } else {239 assert(element()->hasTagName(iframeTag));240 HTMLIFrameElement* o = static_cast<HTMLIFrameElement*>(element());241 url = o->m_URL;242 if (!isURLAllowed(document(), url))243 return;244 if (url.isEmpty())245 url = "about:blank";246 FrameView* v = static_cast<FrameView*>(m_view);247 v->frame()->requestFrame(this, url, o->m_name);248 if (o->contentFrame())249 o->contentFrame()->setInViewSourceMode(o->viewSourceMode());250 238 } 251 239 } -
trunk/WebKit/ChangeLog
r15169 r15170 1 2006-07-05 Anders Carlsson <acarlsson@apple.com> 2 3 Reviewed by Maciej. 4 5 http://bugzilla.opendarwin.org/show_bug.cgi?id=3581 6 iFrames set to display:none are Missing from frames array 7 8 * WebCoreSupport/WebFrameBridge.m: 9 (-[WebFrameBridge initSubframeWithOwnerElement:frameName:view:]): 10 (-[WebFrameBridge createChildFrameNamed:withURL:referrer:ownerElement:allowsScrolling:marginWidth:marginHeight:]): 11 Modify to pass the owner element instead of the owner renderer. 12 13 * WebView/WebHTMLView.m: 14 (-[WebHTMLView _topHTMLView]): 15 Remove assertion, it's not valid anymore. 16 1 17 2006-07-05 Timothy Hatcher <timothy@apple.com> 2 18 … … 9 25 * WebKit.xcodeproj/project.pbxproj: 10 26 27 >>>>>>> .r15169 11 28 2006-07-04 Timothy Hatcher <timothy@apple.com> 12 29 -
trunk/WebKit/WebCoreSupport/WebFrameBridge.m
r15159 r15170 127 127 } 128 128 129 - (id)initSubframeWith Renderer:(WebCoreRenderPart *)rendererframeName:(NSString *)name view:(WebFrameView *)view130 { 131 self = [super initSubframeWith Renderer:renderer];129 - (id)initSubframeWithOwnerElement:(WebCoreElement *)ownerElement frameName:(NSString *)name view:(WebFrameView *)view 130 { 131 self = [super initSubframeWithOwnerElement:ownerElement]; 132 132 133 133 ++WebBridgeCount; … … 749 749 withURL:(NSURL *)URL 750 750 referrer:(NSString *)referrer 751 renderPart:(WebCoreRenderPart *)childRenderPart751 ownerElement:(WebCoreElement *)ownerElement 752 752 allowsScrolling:(BOOL)allowsScrolling 753 753 marginWidth:(int)width … … 762 762 WebFrameView *childView = [[WebFrameView alloc] initWithFrame:NSMakeRect(0,0,0,0)]; 763 763 [childView setAllowsScrolling:allowsScrolling]; 764 WebFrameBridge *newBridge = [[WebFrameBridge alloc] initSubframeWith Renderer:childRenderPart frameName:frameName view:childView];764 WebFrameBridge *newBridge = [[WebFrameBridge alloc] initSubframeWithOwnerElement:ownerElement frameName:frameName view:childView]; 765 765 [_frame _addChild:[newBridge webFrame]]; 766 766 [childView release]; -
trunk/WebKit/WebView/WebHTMLView.m
r15106 r15170 888 888 WebHTMLView *view = (WebHTMLView *)[[[[_private->dataSource _webView] mainFrame] frameView] documentView]; 889 889 ASSERT([view isKindOfClass:[WebHTMLView class]]); 890 ASSERT([self isDescendantOf:view]);891 890 return view; 892 891 }
Note: See TracChangeset
for help on using the changeset viewer.