Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Side by Side Diff: third_party/WebKit/Source/web/ColorChooserPopupUIController.cpp

Issue 1454613002: Page popups should respect zoom factor of the anchor element. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add 1.25 zoom tests Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 IntRect anchorRectInScreen = m_chromeClient->viewportToScreen(m_client->elem entRectRelativeToViewport()); 105 IntRect anchorRectInScreen = m_chromeClient->viewportToScreen(m_client->elem entRectRelativeToViewport());
106 106
107 PagePopupClient::addString("<!DOCTYPE html><head><meta charset='UTF-8'><styl e>\n", data); 107 PagePopupClient::addString("<!DOCTYPE html><head><meta charset='UTF-8'><styl e>\n", data);
108 data->append(Platform::current()->loadResource("pickerCommon.css")); 108 data->append(Platform::current()->loadResource("pickerCommon.css"));
109 data->append(Platform::current()->loadResource("colorSuggestionPicker.css")) ; 109 data->append(Platform::current()->loadResource("colorSuggestionPicker.css")) ;
110 PagePopupClient::addString("</style></head><body><div id=main>Loading...</di v><script>\n" 110 PagePopupClient::addString("</style></head><body><div id=main>Loading...</di v><script>\n"
111 "window.dialogArguments = {\n", data); 111 "window.dialogArguments = {\n", data);
112 PagePopupClient::addProperty("values", suggestionValues, data); 112 PagePopupClient::addProperty("values", suggestionValues, data);
113 PagePopupClient::addProperty("otherColorLabel", locale().queryString(WebLoca lizedString::OtherColorLabel), data); 113 PagePopupClient::addProperty("otherColorLabel", locale().queryString(WebLoca lizedString::OtherColorLabel), data);
114 addProperty("anchorRectInScreen", anchorRectInScreen, data); 114 addProperty("anchorRectInScreen", anchorRectInScreen, data);
115 addProperty("zoomFactor", zoomFactor(), data);
115 PagePopupClient::addString("};\n", data); 116 PagePopupClient::addString("};\n", data);
116 data->append(Platform::current()->loadResource("pickerCommon.js")); 117 data->append(Platform::current()->loadResource("pickerCommon.js"));
117 data->append(Platform::current()->loadResource("colorSuggestionPicker.js")); 118 data->append(Platform::current()->loadResource("colorSuggestionPicker.js"));
118 PagePopupClient::addString("</script></body>\n", data); 119 PagePopupClient::addString("</script></body>\n", data);
119 } 120 }
120 121
121 Locale& ColorChooserPopupUIController::locale() 122 Locale& ColorChooserPopupUIController::locale()
122 { 123 {
123 return m_locale; 124 return m_locale;
124 } 125 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } 164 }
164 165
165 void ColorChooserPopupUIController::closePopup() 166 void ColorChooserPopupUIController::closePopup()
166 { 167 {
167 if (!m_popup) 168 if (!m_popup)
168 return; 169 return;
169 m_chromeClient->closePagePopup(m_popup); 170 m_chromeClient->closePagePopup(m_popup);
170 } 171 }
171 172
172 } // namespace blink 173 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/page/PagePopupClient.cpp ('k') | third_party/WebKit/Source/web/DateTimeChooserImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698