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 if (style.display() == FLEX) | |
|
cbiesinger
2016/09/28 11:16:09
Could you also add GRID and the inline variants he
| |
| 54 return LayoutObject::createObject(this, style); | |
| 52 return new LayoutBlockFlow(this); | 55 return new LayoutBlockFlow(this); |
| 53 } | 56 } |
| 54 | 57 |
| 55 void HTMLSummaryElement::didAddUserAgentShadowRoot(ShadowRoot& root) | 58 void HTMLSummaryElement::didAddUserAgentShadowRoot(ShadowRoot& root) |
| 56 { | 59 { |
| 57 DetailsMarkerControl* markerControl = DetailsMarkerControl::create(document( )); | 60 DetailsMarkerControl* markerControl = DetailsMarkerControl::create(document( )); |
| 58 markerControl->setIdAttribute(ShadowElementNames::detailsMarker()); | 61 markerControl->setIdAttribute(ShadowElementNames::detailsMarker()); |
| 59 root.appendChild(markerControl); | 62 root.appendChild(markerControl); |
| 60 root.appendChild(HTMLContentElement::create(document())); | 63 root.appendChild(HTMLContentElement::create(document())); |
| 61 } | 64 } |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 142 | 145 |
| 143 bool HTMLSummaryElement::willRespondToMouseClickEvents() | 146 bool HTMLSummaryElement::willRespondToMouseClickEvents() |
| 144 { | 147 { |
| 145 if (isMainSummary() && layoutObject()) | 148 if (isMainSummary() && layoutObject()) |
| 146 return true; | 149 return true; |
| 147 | 150 |
| 148 return HTMLElement::willRespondToMouseClickEvents(); | 151 return HTMLElement::willRespondToMouseClickEvents(); |
| 149 } | 152 } |
| 150 | 153 |
| 151 } // namespace blink | 154 } // namespace blink |
| OLD | NEW |