Changeset 142987 in webkit
- Timestamp:
- Feb 15, 2013 5:36:51 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r142977 r142987 1 2013-02-15 Keishi Hattori <keishi@webkit.org> 2 3 Add setValue and closePopup methods to PagePopupController 4 https://bugs.webkit.org/show_bug.cgi?id=109897 5 6 Reviewed by Kent Tamura. 7 8 * ManualTests/forms/calendar-picker.html: Added mock setValue and closePopup implementation. 9 * ManualTests/forms/color-suggestion-picker.html: Ditto. 10 1 11 2013-02-15 Allan Sandfeld Jensen <allan.jensen@digia.com> 2 12 -
trunk/ManualTests/forms/calendar-picker.html
r140778 r142987 295 295 window.document.getElementById('date').value = stringValue; 296 296 }, 297 setValue: function(value) { 298 window.log('value="' + value + '"'); 299 window.document.getElementById('date').value = value; 300 }, 301 closePopup: function() { 302 }, 297 303 localizeNumberString: function(numString) { 298 304 if (typeof numString == "number") -
trunk/ManualTests/forms/color-suggestion-picker.html
r125641 r142987 57 57 if (numValue === 0) 58 58 window.document.getElementById('color').value = stringValue; 59 } 59 }, 60 setValue: function(value) { 61 window.log('value="' + value + '"'); 62 window.document.getElementById('color').value = value; 63 }, 64 closePopup: function() { 65 }, 60 66 } 61 67 -
trunk/Source/WebCore/ChangeLog
r142984 r142987 1 2013-02-15 Keishi Hattori <keishi@webkit.org> 2 3 Add setValue and closePopup methods to PagePopupController 4 https://bugs.webkit.org/show_bug.cgi?id=109897 5 6 Reviewed by Kent Tamura. 7 8 The new calendar picker (Bug 109439) needs to set a value without 9 closing the popup. We can't do that with the existing 10 setValueAndClosePopup. 11 12 No new tests. Existing calendar picker and color suggestion picker tests 13 that closing and setting values work properly. 14 15 * Resources/pagepopups/pickerCommon.js: 16 (Picker.prototype.submitValue): Stop using setValueAndClosePopup. 17 (Picker.prototype.handleCancel): Ditto. 18 * page/PagePopupClient.h: 19 (PagePopupClient): 20 * page/PagePopupController.cpp: 21 (WebCore::PagePopupController::setValue): Sets value to element without closing popup. 22 (WebCore): 23 (WebCore::PagePopupController::closePopup): Just closes popup. 24 * page/PagePopupController.h: 25 (PagePopupController): 26 * page/PagePopupController.idl: 27 1 28 2013-02-15 Mihnea Ovidenie <mihnea@adobe.com> 2 29 -
trunk/Source/WebCore/Resources/pagepopups/pickerCommon.js
r139055 r142987 243 243 */ 244 244 Picker.prototype.submitValue = function(value) { 245 window.pagePopupController.setValueAndClosePopup(Picker.Actions.SetValue, value); 245 window.pagePopupController.setValue(value); 246 window.pagePopupController.closePopup(); 246 247 } 247 248 248 249 Picker.prototype.handleCancel = function() { 249 window.pagePopupController. setValueAndClosePopup(Picker.Actions.Cancel, "");250 window.pagePopupController.closePopup(); 250 251 } 251 252 -
trunk/Source/WebCore/page/PagePopupClient.h
r132774 r142987 61 61 virtual void setValueAndClosePopup(int numValue, const String& stringValue) = 0; 62 62 63 // This is called by the content HTML of a PagePopup. 64 virtual void setValue(const String&) = 0; 65 66 // This is called by the content HTML of a PagePopup. 67 virtual void closePopup() = 0; 68 63 69 // This is called whenever a PagePopup was closed. 64 70 virtual void didClosePopup() = 0; -
trunk/Source/WebCore/page/PagePopupController.cpp
r137281 r142987 56 56 } 57 57 58 void PagePopupController::setValue(const String& value) 59 { 60 if (m_popupClient) 61 m_popupClient->setValue(value); 62 } 63 64 void PagePopupController::closePopup() 65 { 66 if (m_popupClient) 67 m_popupClient->closePopup(); 68 } 69 58 70 String PagePopupController::localizeNumberString(const String& numberString) 59 71 { -
trunk/Source/WebCore/page/PagePopupController.h
r137281 r142987 45 45 static PassRefPtr<PagePopupController> create(PagePopupClient*); 46 46 void setValueAndClosePopup(int numValue, const String& stringValue); 47 void setValue(const String&); 48 void closePopup(); 47 49 String localizeNumberString(const String&); 48 50 #if ENABLE(CALENDAR_PICKER) -
trunk/Source/WebCore/page/PagePopupController.idl
r141034 r142987 34 34 ] interface PagePopupController { 35 35 void setValueAndClosePopup(in long numberValue, in DOMString stringValue); 36 void setValue(DOMString value); 37 void closePopup(); 36 38 DOMString localizeNumberString(in DOMString numberString); 37 39 [Conditional=CALENDAR_PICKER] DOMString formatMonth(in long year, in long zeroBaseMonth); -
trunk/Source/WebKit/blackberry/ChangeLog
r142977 r142987 1 2013-02-15 Keishi Hattori <keishi@webkit.org> 2 3 Add setValue and closePopup methods to PagePopupController 4 https://bugs.webkit.org/show_bug.cgi?id=109897 5 6 Reviewed by Kent Tamura. 7 8 * WebCoreSupport/ColorPickerClient.cpp: 9 (WebCore::ColorPickerClient::setValue): Added empty implementation. 10 (WebCore): 11 * WebCoreSupport/ColorPickerClient.h: 12 (ColorPickerClient): 13 * WebCoreSupport/DatePickerClient.cpp: 14 (WebCore::DatePickerClient::setValue): Ditto. 15 (WebCore): 16 * WebCoreSupport/DatePickerClient.h: 17 (DatePickerClient): 18 * WebCoreSupport/SelectPopupClient.cpp: 19 (WebCore::SelectPopupClient::setValue): Ditto. 20 (WebCore): 21 * WebCoreSupport/SelectPopupClient.h: 22 (SelectPopupClient): 23 1 24 2013-02-15 Allan Sandfeld Jensen <allan.jensen@digia.com> 2 25 -
trunk/Source/WebKit/blackberry/WebCoreSupport/ColorPickerClient.cpp
r131316 r142987 25 25 #include "DocumentWriter.h" 26 26 #include "HTMLInputElement.h" 27 #include "NotImplemented.h" 27 28 #include "Page.h" 28 29 #include "PagePopup.h" … … 99 100 } 100 101 102 void ColorPickerClient::setValue(const String&) 103 { 104 notImplemented(); 105 } 106 101 107 void ColorPickerClient::didClosePopup() 102 108 { -
trunk/Source/WebKit/blackberry/WebCoreSupport/ColorPickerClient.h
r133102 r142987 47 47 virtual Localizer& localizer(); 48 48 void setValueAndClosePopup(int, const String&); 49 void setValue(const String&); 50 void closePopup(); 49 51 void didClosePopup(); 50 52 51 53 private: 52 void closePopup();53 54 54 String m_source; 55 55 BlackBerry::WebKit::WebPagePrivate* m_webPage; -
trunk/Source/WebKit/blackberry/WebCoreSupport/DatePickerClient.cpp
r133952 r142987 26 26 #include "Frame.h" 27 27 #include "HTMLInputElement.h" 28 #include "NotImplemented.h" 28 29 #include "Page.h" 29 30 #include "PagePopup.h" … … 138 139 } 139 140 141 void DatePickerClient::setValue(int, const String& value) 142 { 143 notImplemented(); 144 } 145 140 146 void DatePickerClient::didClosePopup() 141 147 { -
trunk/Source/WebKit/blackberry/WebCoreSupport/DatePickerClient.h
r133102 r142987 49 49 virtual Localizer& localizer(); 50 50 void setValueAndClosePopup(int, const String&); 51 void setValue(const String&); 51 52 void didClosePopup(); 52 53 void closePopup(); -
trunk/Source/WebKit/blackberry/WebCoreSupport/SelectPopupClient.cpp
r133999 r142987 27 27 #include "HTMLOptionElement.h" 28 28 #include "HTMLSelectElement.h" 29 #include "NotImplemented.h" 29 30 #include "Page.h" 30 31 #include "PagePopup.h" … … 196 197 } 197 198 199 void SelectPopupClient::setValue(const String&) 200 { 201 notImplemented(); 202 } 203 198 204 void SelectPopupClient::didClosePopup() 199 205 { -
trunk/Source/WebKit/blackberry/WebCoreSupport/SelectPopupClient.h
r133102 r142987 56 56 virtual Localizer& localizer(); 57 57 virtual void setValueAndClosePopup(int, const String&); 58 virtual void setValue(const String&); 59 virtual void closePopup(); 58 60 virtual void didClosePopup(); 59 void closePopup();60 61 61 62 bool m_multiple; -
trunk/Source/WebKit/chromium/ChangeLog
r142977 r142987 1 2013-02-15 Keishi Hattori <keishi@webkit.org> 2 3 Add setValue and closePopup methods to PagePopupController 4 https://bugs.webkit.org/show_bug.cgi?id=109897 5 6 Reviewed by Kent Tamura. 7 8 * src/ColorChooserPopupUIController.cpp: 9 (WebKit::ColorChooserPopupUIController::setValue): 10 (WebKit): 11 * src/ColorChooserPopupUIController.h: 12 (ColorChooserPopupUIController): 13 * src/DateTimeChooserImpl.cpp: 14 (WebKit::DateTimeChooserImpl::setValueAndClosePopup): Use setValue and closePopup. 15 (WebKit): 16 (WebKit::DateTimeChooserImpl::setValue): 17 (WebKit::DateTimeChooserImpl::closePopup): 18 * src/DateTimeChooserImpl.h: 19 (DateTimeChooserImpl): 20 1 21 2013-02-15 Allan Sandfeld Jensen <allan.jensen@digia.com> 2 22 -
trunk/Source/WebKit/chromium/src/ColorChooserPopupUIController.cpp
r139055 r142987 123 123 } 124 124 125 void ColorChooserPopupUIController::setValue(const String& value) 126 { 127 ASSERT(m_client); 128 m_client->didChooseColor(Color(value)); 129 } 130 125 131 void ColorChooserPopupUIController::didClosePopup() 126 132 { -
trunk/Source/WebKit/chromium/src/ColorChooserPopupUIController.h
r135197 r142987 55 55 virtual WebCore::Locale& locale() OVERRIDE; 56 56 virtual void setValueAndClosePopup(int, const String&) OVERRIDE; 57 virtual void setValue(const String&) OVERRIDE; 58 virtual void closePopup() OVERRIDE; 57 59 virtual void didClosePopup() OVERRIDE; 58 60 59 61 private: 60 62 void openPopup(); 61 void closePopup();62 63 63 64 ChromeClientImpl* m_chromeClient; -
trunk/Source/WebKit/chromium/src/DateTimeChooserImpl.cpp
r140778 r142987 170 170 RefPtr<DateTimeChooserImpl> protector(this); 171 171 if (numValue >= 0) 172 m_client->didChooseValue(stringValue); 172 setValue(stringValue); 173 endChooser(); 174 } 175 176 void DateTimeChooserImpl::setValue(const String& value) 177 { 178 m_client->didChooseValue(value); 179 } 180 181 void DateTimeChooserImpl::closePopup() 182 { 173 183 endChooser(); 174 184 } -
trunk/Source/WebKit/chromium/src/DateTimeChooserImpl.h
r133284 r142987 60 60 virtual WebCore::Locale& locale() OVERRIDE; 61 61 virtual void setValueAndClosePopup(int, const String&) OVERRIDE; 62 virtual void setValue(const String&) OVERRIDE; 63 virtual void closePopup() OVERRIDE; 62 64 virtual void didClosePopup() OVERRIDE; 63 65
Note: See TracChangeset
for help on using the changeset viewer.