| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |