| 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 17 matching lines...) Expand all Loading... |
| 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 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 using namespace HTMLNames; | 36 using namespace HTMLNames; |
| 37 | 37 |
| 38 PassRefPtrWillBeRawPtr<HTMLSummaryElement> HTMLSummaryElement::create(Document&
document) | 38 RawPtr<HTMLSummaryElement> HTMLSummaryElement::create(Document& document) |
| 39 { | 39 { |
| 40 RefPtrWillBeRawPtr<HTMLSummaryElement> summary = adoptRefWillBeNoop(new HTML
SummaryElement(document)); | 40 RawPtr<HTMLSummaryElement> summary = new HTMLSummaryElement(document); |
| 41 summary->ensureUserAgentShadowRoot(); | 41 summary->ensureUserAgentShadowRoot(); |
| 42 return summary.release(); | 42 return summary.release(); |
| 43 } | 43 } |
| 44 | 44 |
| 45 HTMLSummaryElement::HTMLSummaryElement(Document& document) | 45 HTMLSummaryElement::HTMLSummaryElement(Document& document) |
| 46 : HTMLElement(summaryTag, document) | 46 : HTMLElement(summaryTag, document) |
| 47 { | 47 { |
| 48 } | 48 } |
| 49 | 49 |
| 50 LayoutObject* HTMLSummaryElement::createLayoutObject(const ComputedStyle&) | 50 LayoutObject* HTMLSummaryElement::createLayoutObject(const ComputedStyle&) |
| 51 { | 51 { |
| 52 return new LayoutBlockFlow(this); | 52 return new LayoutBlockFlow(this); |
| 53 } | 53 } |
| 54 | 54 |
| 55 void HTMLSummaryElement::didAddUserAgentShadowRoot(ShadowRoot& root) | 55 void HTMLSummaryElement::didAddUserAgentShadowRoot(ShadowRoot& root) |
| 56 { | 56 { |
| 57 RefPtrWillBeRawPtr<DetailsMarkerControl> markerControl = DetailsMarkerContro
l::create(document()); | 57 RawPtr<DetailsMarkerControl> markerControl = DetailsMarkerControl::create(do
cument()); |
| 58 markerControl->setIdAttribute(ShadowElementNames::detailsMarker()); | 58 markerControl->setIdAttribute(ShadowElementNames::detailsMarker()); |
| 59 root.appendChild(markerControl); | 59 root.appendChild(markerControl); |
| 60 root.appendChild(HTMLContentElement::create(document())); | 60 root.appendChild(HTMLContentElement::create(document())); |
| 61 } | 61 } |
| 62 | 62 |
| 63 HTMLDetailsElement* HTMLSummaryElement::detailsElement() const | 63 HTMLDetailsElement* HTMLSummaryElement::detailsElement() const |
| 64 { | 64 { |
| 65 Node* parent = parentNode(); | 65 Node* parent = parentNode(); |
| 66 if (isHTMLDetailsElement(parent)) | 66 if (isHTMLDetailsElement(parent)) |
| 67 return toHTMLDetailsElement(parent); | 67 return toHTMLDetailsElement(parent); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 | 142 |
| 143 bool HTMLSummaryElement::willRespondToMouseClickEvents() | 143 bool HTMLSummaryElement::willRespondToMouseClickEvents() |
| 144 { | 144 { |
| 145 if (isMainSummary() && layoutObject()) | 145 if (isMainSummary() && layoutObject()) |
| 146 return true; | 146 return true; |
| 147 | 147 |
| 148 return HTMLElement::willRespondToMouseClickEvents(); | 148 return HTMLElement::willRespondToMouseClickEvents(); |
| 149 } | 149 } |
| 150 | 150 |
| 151 } // namespace blink | 151 } // namespace blink |
| OLD | NEW |