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

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

Issue 23886003: Have HTMLElements / SVGElements constructors take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another Android build fix Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLDialogElement.h ('k') | Source/core/html/HTMLDirectoryElement.h » ('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) 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 23 matching lines...) Expand all
34 34
35 namespace WebCore { 35 namespace WebCore {
36 36
37 using namespace HTMLNames; 37 using namespace HTMLNames;
38 38
39 static bool needsCenteredPositioning(const RenderStyle* style) 39 static bool needsCenteredPositioning(const RenderStyle* style)
40 { 40 {
41 return style->position() == AbsolutePosition && style->hasAutoTopAndBottom() ; 41 return style->position() == AbsolutePosition && style->hasAutoTopAndBottom() ;
42 } 42 }
43 43
44 HTMLDialogElement::HTMLDialogElement(const QualifiedName& tagName, Document* doc ument) 44 HTMLDialogElement::HTMLDialogElement(const QualifiedName& tagName, Document& doc ument)
45 : HTMLElement(tagName, document) 45 : HTMLElement(tagName, document)
46 , m_topIsValid(false) 46 , m_topIsValid(false)
47 , m_top(0) 47 , m_top(0)
48 , m_returnValue("") 48 , m_returnValue("")
49 { 49 {
50 ASSERT(hasTagName(dialogTag)); 50 ASSERT(hasTagName(dialogTag));
51 setHasCustomStyleCallbacks(); 51 setHasCustomStyleCallbacks();
52 ScriptWrappable::init(this); 52 ScriptWrappable::init(this);
53 } 53 }
54 54
55 PassRefPtr<HTMLDialogElement> HTMLDialogElement::create(const QualifiedName& tag Name, Document* document) 55 PassRefPtr<HTMLDialogElement> HTMLDialogElement::create(const QualifiedName& tag Name, Document& document)
56 { 56 {
57 return adoptRef(new HTMLDialogElement(tagName, document)); 57 return adoptRef(new HTMLDialogElement(tagName, document));
58 } 58 }
59 59
60 void HTMLDialogElement::close(const String& returnValue, ExceptionState& es) 60 void HTMLDialogElement::close(const String& returnValue, ExceptionState& es)
61 { 61 {
62 if (!fastHasAttribute(openAttr)) { 62 if (!fastHasAttribute(openAttr)) {
63 es.throwDOMException(InvalidStateError); 63 es.throwDOMException(InvalidStateError);
64 return; 64 return;
65 } 65 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 } 152 }
153 153
154 bool HTMLDialogElement::shouldBeReparentedUnderRenderView(const RenderStyle* sty le) const 154 bool HTMLDialogElement::shouldBeReparentedUnderRenderView(const RenderStyle* sty le) const
155 { 155 {
156 if (style && style->position() == AbsolutePosition) 156 if (style && style->position() == AbsolutePosition)
157 return true; 157 return true;
158 return Element::shouldBeReparentedUnderRenderView(style); 158 return Element::shouldBeReparentedUnderRenderView(style);
159 } 159 }
160 160
161 } // namespace WebCore 161 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLDialogElement.h ('k') | Source/core/html/HTMLDirectoryElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698