Chromium Code Reviews| 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 12 matching lines...) Expand all Loading... | |
| 23 #include "bindings/core/v8/ExceptionStatePlaceholder.h" | 23 #include "bindings/core/v8/ExceptionStatePlaceholder.h" |
| 24 #include "core/HTMLNames.h" | 24 #include "core/HTMLNames.h" |
| 25 #include "core/dom/shadow/FlatTreeTraversal.h" | 25 #include "core/dom/shadow/FlatTreeTraversal.h" |
| 26 #include "core/dom/shadow/ShadowRoot.h" | 26 #include "core/dom/shadow/ShadowRoot.h" |
| 27 #include "core/events/KeyboardEvent.h" | 27 #include "core/events/KeyboardEvent.h" |
| 28 #include "core/html/HTMLContentElement.h" | 28 #include "core/html/HTMLContentElement.h" |
| 29 #include "core/html/HTMLDetailsElement.h" | 29 #include "core/html/HTMLDetailsElement.h" |
| 30 #include "core/html/shadow/DetailsMarkerControl.h" | 30 #include "core/html/shadow/DetailsMarkerControl.h" |
| 31 #include "core/html/shadow/ShadowElementNames.h" | 31 #include "core/html/shadow/ShadowElementNames.h" |
| 32 #include "core/layout/LayoutBlockFlow.h" | 32 #include "core/layout/LayoutBlockFlow.h" |
| 33 #include "core/layout/LayoutFlexibleBox.h" | |
| 33 | 34 |
| 34 namespace blink { | 35 namespace blink { |
| 35 | 36 |
| 36 using namespace HTMLNames; | 37 using namespace HTMLNames; |
| 37 | 38 |
| 38 HTMLSummaryElement* HTMLSummaryElement::create(Document& document) | 39 HTMLSummaryElement* HTMLSummaryElement::create(Document& document) |
| 39 { | 40 { |
| 40 HTMLSummaryElement* summary = new HTMLSummaryElement(document); | 41 HTMLSummaryElement* summary = new HTMLSummaryElement(document); |
| 41 summary->ensureUserAgentShadowRoot(); | 42 summary->ensureUserAgentShadowRoot(); |
| 42 return summary; | 43 return summary; |
| 43 } | 44 } |
| 44 | 45 |
| 45 HTMLSummaryElement::HTMLSummaryElement(Document& document) | 46 HTMLSummaryElement::HTMLSummaryElement(Document& document) |
| 46 : HTMLElement(summaryTag, document) | 47 : HTMLElement(summaryTag, document) |
| 47 { | 48 { |
| 48 } | 49 } |
| 49 | 50 |
| 50 LayoutObject* HTMLSummaryElement::createLayoutObject(const ComputedStyle&) | 51 LayoutObject* HTMLSummaryElement::createLayoutObject(const ComputedStyle& style) |
| 51 { | 52 { |
| 53 EDisplay display = style.display(); | |
| 54 if (display == FLEX || display == INLINE_FLEX || display == INLINE_GRID) | |
|
cbiesinger
2016/09/28 16:51:11
Please add GRID as well
| |
| 55 return LayoutObject::createObject(this, style); | |
| 52 return new LayoutBlockFlow(this); | 56 return new LayoutBlockFlow(this); |
| 53 } | 57 } |
| 54 | 58 |
| 55 void HTMLSummaryElement::didAddUserAgentShadowRoot(ShadowRoot& root) | 59 void HTMLSummaryElement::didAddUserAgentShadowRoot(ShadowRoot& root) |
| 56 { | 60 { |
| 57 DetailsMarkerControl* markerControl = DetailsMarkerControl::create(document( )); | 61 DetailsMarkerControl* markerControl = DetailsMarkerControl::create(document( )); |
| 58 markerControl->setIdAttribute(ShadowElementNames::detailsMarker()); | 62 markerControl->setIdAttribute(ShadowElementNames::detailsMarker()); |
| 59 root.appendChild(markerControl); | 63 root.appendChild(markerControl); |
| 60 root.appendChild(HTMLContentElement::create(document())); | 64 root.appendChild(HTMLContentElement::create(document())); |
| 61 } | 65 } |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 142 | 146 |
| 143 bool HTMLSummaryElement::willRespondToMouseClickEvents() | 147 bool HTMLSummaryElement::willRespondToMouseClickEvents() |
| 144 { | 148 { |
| 145 if (isMainSummary() && layoutObject()) | 149 if (isMainSummary() && layoutObject()) |
| 146 return true; | 150 return true; |
| 147 | 151 |
| 148 return HTMLElement::willRespondToMouseClickEvents(); | 152 return HTMLElement::willRespondToMouseClickEvents(); |
| 149 } | 153 } |
| 150 | 154 |
| 151 } // namespace blink | 155 } // namespace blink |
| OLD | NEW |