| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies) | 2 * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies) |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 return true; | 91 return true; |
| 92 Element* host = element->ownerShadowHost(); | 92 Element* host = element->ownerShadowHost(); |
| 93 return host && host->isFormControlElement(); | 93 return host && host->isFormControlElement(); |
| 94 } | 94 } |
| 95 | 95 |
| 96 bool HTMLSummaryElement::supportsFocus() const { | 96 bool HTMLSummaryElement::supportsFocus() const { |
| 97 return isMainSummary(); | 97 return isMainSummary(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 void HTMLSummaryElement::defaultEventHandler(Event* event) { | 100 void HTMLSummaryElement::defaultEventHandler(Event* event) { |
| 101 if (isMainSummary() && layoutObject()) { | 101 if (isMainSummary()) { |
| 102 if (event->type() == EventTypeNames::DOMActivate && | 102 if (event->type() == EventTypeNames::DOMActivate && |
| 103 !isClickableControl(event->target()->toNode())) { | 103 !isClickableControl(event->target()->toNode())) { |
| 104 if (HTMLDetailsElement* details = detailsElement()) | 104 if (HTMLDetailsElement* details = detailsElement()) |
| 105 details->toggleOpen(); | 105 details->toggleOpen(); |
| 106 event->setDefaultHandled(); | 106 event->setDefaultHandled(); |
| 107 return; | 107 return; |
| 108 } | 108 } |
| 109 | 109 |
| 110 if (event->isKeyboardEvent()) { | 110 if (event->isKeyboardEvent()) { |
| 111 if (event->type() == EventTypeNames::keydown && | 111 if (event->type() == EventTypeNames::keydown && |
| (...skipping 21 matching lines...) Expand all Loading... |
| 133 event->setDefaultHandled(); | 133 event->setDefaultHandled(); |
| 134 return; | 134 return; |
| 135 } | 135 } |
| 136 } | 136 } |
| 137 } | 137 } |
| 138 | 138 |
| 139 HTMLElement::defaultEventHandler(event); | 139 HTMLElement::defaultEventHandler(event); |
| 140 } | 140 } |
| 141 | 141 |
| 142 bool HTMLSummaryElement::willRespondToMouseClickEvents() { | 142 bool HTMLSummaryElement::willRespondToMouseClickEvents() { |
| 143 if (isMainSummary() && layoutObject()) | 143 return isMainSummary() || HTMLElement::willRespondToMouseClickEvents(); |
| 144 return true; | |
| 145 | |
| 146 return HTMLElement::willRespondToMouseClickEvents(); | |
| 147 } | 144 } |
| 148 | 145 |
| 149 } // namespace blink | 146 } // namespace blink |
| OLD | NEW |