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

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

Issue 69543007: Have NodeTraversal::nextSkippingChildren() take a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 for (Node* node = dialog->firstChild(); node; node = next) { 44 for (Node* node = dialog->firstChild(); node; node = next) {
45 if (node->isElementNode() && toElement(node)->isFormControlElement()) { 45 if (node->isElementNode() && toElement(node)->isFormControlElement()) {
46 HTMLFormControlElement* control = toHTMLFormControlElement(node); 46 HTMLFormControlElement* control = toHTMLFormControlElement(node);
47 if (control->isAutofocusable()) { 47 if (control->isAutofocusable()) {
48 control->focus(); 48 control->focus();
49 control->setAutofocused(); 49 control->setAutofocused();
50 return; 50 return;
51 } 51 }
52 } 52 }
53 if (node->hasTagName(dialogTag)) 53 if (node->hasTagName(dialogTag))
54 next = NodeTraversal::nextSkippingChildren(node, dialog); 54 next = NodeTraversal::nextSkippingChildren(*node, dialog);
55 else 55 else
56 next = NodeTraversal::next(*node, dialog); 56 next = NodeTraversal::next(*node, dialog);
57 } 57 }
58 } 58 }
59 59
60 HTMLDialogElement::HTMLDialogElement(Document& document) 60 HTMLDialogElement::HTMLDialogElement(Document& document)
61 : HTMLElement(dialogTag, document) 61 : HTMLElement(dialogTag, document)
62 , m_centeringMode(Uninitialized) 62 , m_centeringMode(Uninitialized)
63 , m_centeredPosition(0) 63 , m_centeredPosition(0)
64 , m_returnValue("") 64 , m_returnValue("")
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 } 156 }
157 157
158 bool HTMLDialogElement::shouldBeReparentedUnderRenderView(const RenderStyle* sty le) const 158 bool HTMLDialogElement::shouldBeReparentedUnderRenderView(const RenderStyle* sty le) const
159 { 159 {
160 if (style && style->position() == AbsolutePosition) 160 if (style && style->position() == AbsolutePosition)
161 return true; 161 return true;
162 return Element::shouldBeReparentedUnderRenderView(style); 162 return Element::shouldBeReparentedUnderRenderView(style);
163 } 163 }
164 164
165 } // namespace WebCore 165 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698