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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLObjectElement.cpp

Issue 2557583003: Move Form Association Code to FormAssociated::associateWith (Closed)
Patch Set: Check for m_inputType before accessing it Created 4 years 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 | « third_party/WebKit/Source/core/html/HTMLInputElement.cpp ('k') | no next file » | 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights
6 * reserved. 6 * reserved.
7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 using namespace HTMLNames; 50 using namespace HTMLNames;
51 51
52 inline HTMLObjectElement::HTMLObjectElement(Document& document, 52 inline HTMLObjectElement::HTMLObjectElement(Document& document,
53 HTMLFormElement* form, 53 HTMLFormElement* form,
54 bool createdByParser) 54 bool createdByParser)
55 : HTMLPlugInElement(objectTag, 55 : HTMLPlugInElement(objectTag,
56 document, 56 document,
57 createdByParser, 57 createdByParser,
58 ShouldNotPreferPlugInsForImages), 58 ShouldNotPreferPlugInsForImages),
59 m_useFallbackContent(false) { 59 m_useFallbackContent(false) {
60 associateByParser(form);
61 } 60 }
62 61
63 inline HTMLObjectElement::~HTMLObjectElement() {} 62 inline HTMLObjectElement::~HTMLObjectElement() {}
64 63
65 HTMLObjectElement* HTMLObjectElement::create(Document& document, 64 HTMLObjectElement* HTMLObjectElement::create(Document& document,
66 HTMLFormElement* form, 65 HTMLFormElement* form,
67 bool createdByParser) { 66 bool createdByParser) {
68 HTMLObjectElement* element = 67 HTMLObjectElement* element =
69 new HTMLObjectElement(document, form, createdByParser); 68 new HTMLObjectElement(document, form, createdByParser);
70 element->ensureUserAgentShadowRoot(); 69 element->ensureUserAgentShadowRoot();
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 } 457 }
459 458
460 bool HTMLObjectElement::useFallbackContent() const { 459 bool HTMLObjectElement::useFallbackContent() const {
461 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent; 460 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent;
462 } 461 }
463 462
464 bool HTMLObjectElement::willUseFallbackContentAtLayout() const { 463 bool HTMLObjectElement::willUseFallbackContentAtLayout() const {
465 return !hasValidClassId() && hasFallbackContent(); 464 return !hasValidClassId() && hasFallbackContent();
466 } 465 }
467 466
468 void HTMLObjectElement::associateWith(HTMLFormElement*){}; 467 void HTMLObjectElement::associateWith(HTMLFormElement* form) {
468 associateByParser(form);
469 };
469 470
470 } // namespace blink 471 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLInputElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698