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

Side by Side Diff: Source/core/html/PluginDocument.cpp

Issue 19098002: Introduce isHTMLHtmlElement and toHTMLHtmlElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 7 years, 5 months 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
« no previous file with comments | « Source/core/html/HTMLHtmlElement.h ('k') | Source/core/html/parser/HTMLElementStack.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 Apple 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 PluginView* pluginView() const; 66 PluginView* pluginView() const;
67 67
68 HTMLEmbedElement* m_embedElement; 68 HTMLEmbedElement* m_embedElement;
69 }; 69 };
70 70
71 void PluginDocumentParser::createDocumentStructure() 71 void PluginDocumentParser::createDocumentStructure()
72 { 72 {
73 RefPtr<Element> rootElement = document()->createElement(htmlTag, false); 73 RefPtr<Element> rootElement = document()->createElement(htmlTag, false);
74 document()->appendChild(rootElement, IGNORE_EXCEPTION); 74 document()->appendChild(rootElement, IGNORE_EXCEPTION);
75 static_cast<HTMLHtmlElement*>(rootElement.get())->insertedByParser(); 75 toHTMLHtmlElement(rootElement.get())->insertedByParser();
76 76
77 if (document()->frame() && document()->frame()->loader()) 77 if (document()->frame() && document()->frame()->loader())
78 document()->frame()->loader()->dispatchDocumentElementAvailable(); 78 document()->frame()->loader()->dispatchDocumentElementAvailable();
79 79
80 RefPtr<Element> body = document()->createElement(bodyTag, false); 80 RefPtr<Element> body = document()->createElement(bodyTag, false);
81 body->setAttribute(marginwidthAttr, "0"); 81 body->setAttribute(marginwidthAttr, "0");
82 body->setAttribute(marginheightAttr, "0"); 82 body->setAttribute(marginheightAttr, "0");
83 body->setAttribute(styleAttr, "background-color: rgb(38,38,38)"); 83 body->setAttribute(styleAttr, "background-color: rgb(38,38,38)");
84 84
85 rootElement->appendChild(body, IGNORE_EXCEPTION); 85 rootElement->appendChild(body, IGNORE_EXCEPTION);
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // with how many times we call beforeload on object elements. <rdar://proble m/8441094>. 196 // with how many times we call beforeload on object elements. <rdar://proble m/8441094>.
197 if (!shouldLoadPluginManually()) 197 if (!shouldLoadPluginManually())
198 return; 198 return;
199 199
200 DocumentLoader* documentLoader = frame()->loader()->activeDocumentLoader(); 200 DocumentLoader* documentLoader = frame()->loader()->activeDocumentLoader();
201 documentLoader->cancelMainResourceLoad(frame()->loader()->cancelledError(doc umentLoader->request())); 201 documentLoader->cancelMainResourceLoad(frame()->loader()->cancelledError(doc umentLoader->request()));
202 setShouldLoadPluginManually(false); 202 setShouldLoadPluginManually(false);
203 } 203 }
204 204
205 } 205 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLHtmlElement.h ('k') | Source/core/html/parser/HTMLElementStack.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698