Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Side by Side Diff: Source/core/testing/MockPagePopupDriver.cpp

Issue 66643004: Remove QualifiedName argument from most HTMLElement::create functions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Hack for XML prefix Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 RefPtr<HTMLIFrameElement> m_iframe; 55 RefPtr<HTMLIFrameElement> m_iframe;
56 Timer<MockPagePopup> m_closeTimer; 56 Timer<MockPagePopup> m_closeTimer;
57 }; 57 };
58 58
59 inline MockPagePopup::MockPagePopup(PagePopupClient* client, const IntRect& orig inBoundsInRootView, Frame* mainFrame) 59 inline MockPagePopup::MockPagePopup(PagePopupClient* client, const IntRect& orig inBoundsInRootView, Frame* mainFrame)
60 : m_popupClient(client) 60 : m_popupClient(client)
61 , m_closeTimer(this, &MockPagePopup::close) 61 , m_closeTimer(this, &MockPagePopup::close)
62 { 62 {
63 Document* document = mainFrame->document(); 63 Document* document = mainFrame->document();
64 ASSERT(document); 64 ASSERT(document);
65 m_iframe = HTMLIFrameElement::create(HTMLNames::iframeTag, *document); 65 m_iframe = HTMLIFrameElement::create(*document);
66 m_iframe->setIdAttribute("mock-page-popup"); 66 m_iframe->setIdAttribute("mock-page-popup");
67 m_iframe->setInlineStyleProperty(CSSPropertyBorderWidth, 0.0, CSSPrimitiveVa lue::CSS_PX); 67 m_iframe->setInlineStyleProperty(CSSPropertyBorderWidth, 0.0, CSSPrimitiveVa lue::CSS_PX);
68 m_iframe->setInlineStyleProperty(CSSPropertyPosition, CSSValueAbsolute); 68 m_iframe->setInlineStyleProperty(CSSPropertyPosition, CSSValueAbsolute);
69 m_iframe->setInlineStyleProperty(CSSPropertyLeft, originBoundsInRootView.x() , CSSPrimitiveValue::CSS_PX, true); 69 m_iframe->setInlineStyleProperty(CSSPropertyLeft, originBoundsInRootView.x() , CSSPrimitiveValue::CSS_PX, true);
70 m_iframe->setInlineStyleProperty(CSSPropertyTop, originBoundsInRootView.maxY (), CSSPrimitiveValue::CSS_PX, true); 70 m_iframe->setInlineStyleProperty(CSSPropertyTop, originBoundsInRootView.maxY (), CSSPrimitiveValue::CSS_PX, true);
71 if (document->body()) 71 if (document->body())
72 document->body()->appendChild(m_iframe.get()); 72 document->body()->appendChild(m_iframe.get());
73 Frame* contentFrame = m_iframe->contentFrame(); 73 Frame* contentFrame = m_iframe->contentFrame();
74 DocumentWriter* writer = contentFrame->loader().activeDocumentLoader()->begi nWriting("text/html", "UTF-8"); 74 DocumentWriter* writer = contentFrame->loader().activeDocumentLoader()->begi nWriting("text/html", "UTF-8");
75 const char scriptToSetUpPagePopupController[] = "<script>window.pagePopupCon troller = parent.internals.pagePopupController;</script>"; 75 const char scriptToSetUpPagePopupController[] = "<script>window.pagePopupCon troller = parent.internals.pagePopupController;</script>";
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 { 134 {
135 if (!popup || popup != m_mockPagePopup.get()) 135 if (!popup || popup != m_mockPagePopup.get())
136 return; 136 return;
137 m_mockPagePopup->closeLater(); 137 m_mockPagePopup->closeLater();
138 m_mockPagePopup.clear(); 138 m_mockPagePopup.clear();
139 m_pagePopupController->clearPagePopupClient(); 139 m_pagePopupController->clearPagePopupClient();
140 m_pagePopupController.clear(); 140 m_pagePopupController.clear();
141 } 141 }
142 142
143 } 143 }
OLDNEW
« Source/core/dom/Element.h ('K') | « Source/core/html/track/TextTrackCue.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698