| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "web/PopupMenuImpl.h" | 6 #include "web/PopupMenuImpl.h" |
| 7 | 7 |
| 8 #include "core/HTMLNames.h" | 8 #include "core/HTMLNames.h" |
| 9 #include "core/css/CSSFontSelector.h" | 9 #include "core/css/CSSFontSelector.h" |
| 10 #include "core/dom/StyleEngine.h" | 10 #include "core/dom/StyleEngine.h" |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 addProperty("title", element.title(), data); | 201 addProperty("title", element.title(), data); |
| 202 addProperty("ariaLabel", element.fastGetAttribute(HTMLNames::aria_labelAttr)
, data); | 202 addProperty("ariaLabel", element.fastGetAttribute(HTMLNames::aria_labelAttr)
, data); |
| 203 addProperty("disabled", element.isDisabledFormControl(), data); | 203 addProperty("disabled", element.isDisabledFormControl(), data); |
| 204 addElementStyle(element, data); | 204 addElementStyle(element, data); |
| 205 PagePopupClient::addString("},\n", data); | 205 PagePopupClient::addString("},\n", data); |
| 206 } | 206 } |
| 207 | 207 |
| 208 void PopupMenuImpl::didWriteDocument(Document& document) | 208 void PopupMenuImpl::didWriteDocument(Document& document) |
| 209 { | 209 { |
| 210 Document& ownerDocument = ownerElement().document(); | 210 Document& ownerDocument = ownerElement().document(); |
| 211 document.styleEngine()->setFontSelector(PopupMenuCSSFontSelector::create(&do
cument, ownerDocument.styleEngine()->fontSelector())); | 211 document.styleEngine().setFontSelector(PopupMenuCSSFontSelector::create(&doc
ument, ownerDocument.styleEngine().fontSelector())); |
| 212 } | 212 } |
| 213 | 213 |
| 214 void PopupMenuImpl::setValueAndClosePopup(int numValue, const String& stringValu
e) | 214 void PopupMenuImpl::setValueAndClosePopup(int numValue, const String& stringValu
e) |
| 215 { | 215 { |
| 216 ASSERT(m_popup); | 216 ASSERT(m_popup); |
| 217 ASSERT(m_client); | 217 ASSERT(m_client); |
| 218 bool success; | 218 bool success; |
| 219 int listIndex = stringValue.toInt(&success); | 219 int listIndex = stringValue.toInt(&success); |
| 220 ASSERT(success); | 220 ASSERT(success); |
| 221 m_client->selectionChanged(listIndex); | 221 m_client->selectionChanged(listIndex); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 #if ENABLE(OILPAN) | 303 #if ENABLE(OILPAN) |
| 304 // Cannot be done during finalization, so instead done when the | 304 // Cannot be done during finalization, so instead done when the |
| 305 // render object is destroyed and disconnected. | 305 // render object is destroyed and disconnected. |
| 306 // | 306 // |
| 307 // FIXME: do this always, regardless of ENABLE(OILPAN). | 307 // FIXME: do this always, regardless of ENABLE(OILPAN). |
| 308 dispose(); | 308 dispose(); |
| 309 #endif | 309 #endif |
| 310 } | 310 } |
| 311 | 311 |
| 312 } // namespace blink | 312 } // namespace blink |
| OLD | NEW |