| 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 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 #include "bindings/core/v8/ExceptionState.h" | 29 #include "bindings/core/v8/ExceptionState.h" |
| 30 #include "core/dom/AXObjectCache.h" | 30 #include "core/dom/AXObjectCache.h" |
| 31 #include "core/dom/ExceptionCode.h" | 31 #include "core/dom/ExceptionCode.h" |
| 32 #include "core/dom/NodeTraversal.h" | 32 #include "core/dom/NodeTraversal.h" |
| 33 #include "core/events/Event.h" | 33 #include "core/events/Event.h" |
| 34 #include "core/frame/UseCounter.h" | 34 #include "core/frame/UseCounter.h" |
| 35 #include "core/html/HTMLFormControlElement.h" | 35 #include "core/html/HTMLFormControlElement.h" |
| 36 #include "core/frame/FrameView.h" | 36 #include "core/frame/FrameView.h" |
| 37 #include "core/layout/LayoutBlock.h" | 37 #include "core/layout/LayoutBlock.h" |
| 38 #include "core/layout/style/LayoutStyle.h" | 38 #include "core/layout/style/ComputedStyle.h" |
| 39 | 39 |
| 40 namespace blink { | 40 namespace blink { |
| 41 | 41 |
| 42 using namespace HTMLNames; | 42 using namespace HTMLNames; |
| 43 | 43 |
| 44 // This function chooses the focused element when showModal() is invoked, as des
cribed in the spec for showModal(). | 44 // This function chooses the focused element when showModal() is invoked, as des
cribed in the spec for showModal(). |
| 45 static void setFocusForModalDialog(HTMLDialogElement* dialog) | 45 static void setFocusForModalDialog(HTMLDialogElement* dialog) |
| 46 { | 46 { |
| 47 Element* focusableDescendant = 0; | 47 Element* focusableDescendant = 0; |
| 48 Node* next = 0; | 48 Node* next = 0; |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 { | 198 { |
| 199 if (event->type() == EventTypeNames::cancel) { | 199 if (event->type() == EventTypeNames::cancel) { |
| 200 closeDialog(); | 200 closeDialog(); |
| 201 event->setDefaultHandled(); | 201 event->setDefaultHandled(); |
| 202 return; | 202 return; |
| 203 } | 203 } |
| 204 HTMLElement::defaultEventHandler(event); | 204 HTMLElement::defaultEventHandler(event); |
| 205 } | 205 } |
| 206 | 206 |
| 207 } // namespace blink | 207 } // namespace blink |
| OLD | NEW |