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 26 matching lines...) Expand all Loading... |
37 | 37 |
38 HTMLSummaryElement* HTMLSummaryElement::create(Document& document) { | 38 HTMLSummaryElement* HTMLSummaryElement::create(Document& document) { |
39 HTMLSummaryElement* summary = new HTMLSummaryElement(document); | 39 HTMLSummaryElement* summary = new HTMLSummaryElement(document); |
40 summary->ensureUserAgentShadowRoot(); | 40 summary->ensureUserAgentShadowRoot(); |
41 return summary; | 41 return summary; |
42 } | 42 } |
43 | 43 |
44 HTMLSummaryElement::HTMLSummaryElement(Document& document) | 44 HTMLSummaryElement::HTMLSummaryElement(Document& document) |
45 : HTMLElement(summaryTag, document) {} | 45 : HTMLElement(summaryTag, document) {} |
46 | 46 |
47 LayoutObject* HTMLSummaryElement::createLayoutObject(const ComputedStyle&) { | 47 LayoutObject* HTMLSummaryElement::createLayoutObject( |
| 48 const ComputedStyle& style) { |
| 49 EDisplay display = style.display(); |
| 50 if (display == EDisplay::Flex || display == EDisplay::InlineFlex || |
| 51 display == EDisplay::Grid || display == EDisplay::InlineGrid) |
| 52 return LayoutObject::createObject(this, style); |
48 return new LayoutBlockFlow(this); | 53 return new LayoutBlockFlow(this); |
49 } | 54 } |
50 | 55 |
51 void HTMLSummaryElement::didAddUserAgentShadowRoot(ShadowRoot& root) { | 56 void HTMLSummaryElement::didAddUserAgentShadowRoot(ShadowRoot& root) { |
52 DetailsMarkerControl* markerControl = | 57 DetailsMarkerControl* markerControl = |
53 DetailsMarkerControl::create(document()); | 58 DetailsMarkerControl::create(document()); |
54 markerControl->setIdAttribute(ShadowElementNames::detailsMarker()); | 59 markerControl->setIdAttribute(ShadowElementNames::detailsMarker()); |
55 root.appendChild(markerControl); | 60 root.appendChild(markerControl); |
56 root.appendChild(HTMLContentElement::create(document())); | 61 root.appendChild(HTMLContentElement::create(document())); |
57 } | 62 } |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 } | 140 } |
136 | 141 |
137 bool HTMLSummaryElement::willRespondToMouseClickEvents() { | 142 bool HTMLSummaryElement::willRespondToMouseClickEvents() { |
138 if (isMainSummary() && layoutObject()) | 143 if (isMainSummary() && layoutObject()) |
139 return true; | 144 return true; |
140 | 145 |
141 return HTMLElement::willRespondToMouseClickEvents(); | 146 return HTMLElement::willRespondToMouseClickEvents(); |
142 } | 147 } |
143 | 148 |
144 } // namespace blink | 149 } // namespace blink |
OLD | NEW |