| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 } | 82 } |
| 83 | 83 |
| 84 AXObject* ColorChooserPopupUIController::rootAXObject() { | 84 AXObject* ColorChooserPopupUIController::rootAXObject() { |
| 85 return m_popup ? m_popup->rootAXObject() : nullptr; | 85 return m_popup ? m_popup->rootAXObject() : nullptr; |
| 86 } | 86 } |
| 87 | 87 |
| 88 void ColorChooserPopupUIController::writeDocument(SharedBuffer* data) { | 88 void ColorChooserPopupUIController::writeDocument(SharedBuffer* data) { |
| 89 Vector<ColorSuggestion> suggestions = m_client->suggestions(); | 89 Vector<ColorSuggestion> suggestions = m_client->suggestions(); |
| 90 Vector<String> suggestionValues; | 90 Vector<String> suggestionValues; |
| 91 for (unsigned i = 0; i < suggestions.size(); i++) | 91 for (unsigned i = 0; i < suggestions.size(); i++) |
| 92 suggestionValues.append(suggestions[i].color.serialized()); | 92 suggestionValues.push_back(suggestions[i].color.serialized()); |
| 93 IntRect anchorRectInScreen = m_chromeClient->viewportToScreen( | 93 IntRect anchorRectInScreen = m_chromeClient->viewportToScreen( |
| 94 m_client->elementRectRelativeToViewport(), m_frame->view()); | 94 m_client->elementRectRelativeToViewport(), m_frame->view()); |
| 95 | 95 |
| 96 PagePopupClient::addString( | 96 PagePopupClient::addString( |
| 97 "<!DOCTYPE html><head><meta charset='UTF-8'><style>\n", data); | 97 "<!DOCTYPE html><head><meta charset='UTF-8'><style>\n", data); |
| 98 data->append(Platform::current()->loadResource("pickerCommon.css")); | 98 data->append(Platform::current()->loadResource("pickerCommon.css")); |
| 99 data->append(Platform::current()->loadResource("colorSuggestionPicker.css")); | 99 data->append(Platform::current()->loadResource("colorSuggestionPicker.css")); |
| 100 PagePopupClient::addString( | 100 PagePopupClient::addString( |
| 101 "</style></head><body><div id=main>Loading...</div><script>\n" | 101 "</style></head><body><div id=main>Loading...</div><script>\n" |
| 102 "window.dialogArguments = {\n", | 102 "window.dialogArguments = {\n", |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 m_popup = m_chromeClient->openPagePopup(this); | 153 m_popup = m_chromeClient->openPagePopup(this); |
| 154 } | 154 } |
| 155 | 155 |
| 156 void ColorChooserPopupUIController::closePopup() { | 156 void ColorChooserPopupUIController::closePopup() { |
| 157 if (!m_popup) | 157 if (!m_popup) |
| 158 return; | 158 return; |
| 159 m_chromeClient->closePagePopup(m_popup); | 159 m_chromeClient->closePagePopup(m_popup); |
| 160 } | 160 } |
| 161 | 161 |
| 162 } // namespace blink | 162 } // namespace blink |
| OLD | NEW |