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

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: Rebase on master 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
« no previous file with comments | « Source/core/html/HTMLCollection.cpp ('k') | Source/core/html/HTMLElement.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) 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 for (Node* node = dialog->firstChild(); node; node = next) { 45 for (Node* node = dialog->firstChild(); node; node = next) {
46 if (node->isElementNode() && toElement(node)->isFormControlElement()) { 46 if (node->isElementNode() && toElement(node)->isFormControlElement()) {
47 HTMLFormControlElement* control = toHTMLFormControlElement(node); 47 HTMLFormControlElement* control = toHTMLFormControlElement(node);
48 if (control->isAutofocusable()) { 48 if (control->isAutofocusable()) {
49 control->focus(); 49 control->focus();
50 control->setAutofocused(); 50 control->setAutofocused();
51 return; 51 return;
52 } 52 }
53 } 53 }
54 if (node->hasTagName(dialogTag)) 54 if (node->hasTagName(dialogTag))
55 next = NodeTraversal::nextSkippingChildren(node, dialog); 55 next = NodeTraversal::nextSkippingChildren(*node, dialog);
56 else 56 else
57 next = NodeTraversal::next(*node, dialog); 57 next = NodeTraversal::next(*node, dialog);
58 } 58 }
59 } 59 }
60 60
61 static void inertSubtreesChanged(Document& document) 61 static void inertSubtreesChanged(Document& document)
62 { 62 {
63 // When a modal dialog opens or closes, nodes all over the accessibility 63 // When a modal dialog opens or closes, nodes all over the accessibility
64 // tree can change inertness which means they must be added or removed from 64 // tree can change inertness which means they must be added or removed from
65 // the tree. The most foolproof way is to clear the entire tree and rebuild 65 // the tree. The most foolproof way is to clear the entire tree and rebuild
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 } 174 }
175 175
176 bool HTMLDialogElement::shouldBeReparentedUnderRenderView(const RenderStyle* sty le) const 176 bool HTMLDialogElement::shouldBeReparentedUnderRenderView(const RenderStyle* sty le) const
177 { 177 {
178 if (style && style->position() == AbsolutePosition) 178 if (style && style->position() == AbsolutePosition)
179 return true; 179 return true;
180 return Element::shouldBeReparentedUnderRenderView(style); 180 return Element::shouldBeReparentedUnderRenderView(style);
181 } 181 }
182 182
183 } // namespace WebCore 183 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLCollection.cpp ('k') | Source/core/html/HTMLElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698