OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 | 189 |
190 void SetToolTip(LocalFrame& frame, | 190 void SetToolTip(LocalFrame& frame, |
191 const String& tooltip, | 191 const String& tooltip, |
192 TextDirection direction) override { | 192 TextDirection direction) override { |
193 DCHECK_EQ(&frame, overlay_->OverlayMainFrame()); | 193 DCHECK_EQ(&frame, overlay_->OverlayMainFrame()); |
194 client_->SetToolTip(*overlay_->frame_impl_->GetFrame(), tooltip, direction); | 194 client_->SetToolTip(*overlay_->frame_impl_->GetFrame(), tooltip, direction); |
195 } | 195 } |
196 | 196 |
197 void InvalidateRect(const IntRect&) override { overlay_->Invalidate(); } | 197 void InvalidateRect(const IntRect&) override { overlay_->Invalidate(); } |
198 | 198 |
199 void ScheduleAnimation(LocalFrame* frame) override { | 199 void ScheduleAnimation(const PlatformLocalFrame* frame) override { |
200 if (overlay_->in_layout_) | 200 if (overlay_->in_layout_) |
201 return; | 201 return; |
202 | 202 |
203 client_->ScheduleAnimation(frame); | 203 client_->ScheduleAnimation(frame); |
204 } | 204 } |
205 | 205 |
206 private: | 206 private: |
207 InspectorOverlayChromeClient(ChromeClient& client, | 207 InspectorOverlayChromeClient(ChromeClient& client, |
208 InspectorOverlayAgent& overlay) | 208 InspectorOverlayAgent& overlay) |
209 : client_(&client), overlay_(&overlay) {} | 209 : client_(&client), overlay_(&overlay) {} |
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
876 protocol::DictionaryValue::create(); | 876 protocol::DictionaryValue::create(); |
877 reset_data->setDouble( | 877 reset_data->setDouble( |
878 "deviceScaleFactor", | 878 "deviceScaleFactor", |
879 frame_impl_->GetFrame()->GetPage()->DeviceScaleFactorDeprecated()); | 879 frame_impl_->GetFrame()->GetPage()->DeviceScaleFactorDeprecated()); |
880 reset_data->setDouble( | 880 reset_data->setDouble( |
881 "pageScaleFactor", | 881 "pageScaleFactor", |
882 frame_impl_->GetFrame()->GetPage()->GetVisualViewport().Scale()); | 882 frame_impl_->GetFrame()->GetPage()->GetVisualViewport().Scale()); |
883 | 883 |
884 IntRect viewport_in_screen = | 884 IntRect viewport_in_screen = |
885 frame_impl_->GetFrame()->GetPage()->GetChromeClient().ViewportToScreen( | 885 frame_impl_->GetFrame()->GetPage()->GetChromeClient().ViewportToScreen( |
886 IntRect(IntPoint(), viewport_size), frame_impl_->GetFrame()->View()); | 886 IntRect(IntPoint(), viewport_size), frame_impl_->GetFrame()); |
887 reset_data->setObject("viewportSize", | 887 reset_data->setObject("viewportSize", |
888 BuildObjectForSize(viewport_in_screen.Size())); | 888 BuildObjectForSize(viewport_in_screen.Size())); |
889 | 889 |
890 // The zoom factor in the overlay frame already has been multiplied by the | 890 // The zoom factor in the overlay frame already has been multiplied by the |
891 // window to viewport scale (aka device scale factor), so cancel it. | 891 // window to viewport scale (aka device scale factor), so cancel it. |
892 reset_data->setDouble( | 892 reset_data->setDouble( |
893 "pageZoomFactor", | 893 "pageZoomFactor", |
894 frame_impl_->GetFrame()->PageZoomFactor() / WindowToViewportScale()); | 894 frame_impl_->GetFrame()->PageZoomFactor() / WindowToViewportScale()); |
895 | 895 |
896 reset_data->setInteger("scrollX", document_scroll_offset.X()); | 896 reset_data->setInteger("scrollX", document_scroll_offset.X()); |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1175 InspectorDOMAgent::ParseColor(config->getShapeColor(nullptr)); | 1175 InspectorDOMAgent::ParseColor(config->getShapeColor(nullptr)); |
1176 highlight_config->shape_margin = | 1176 highlight_config->shape_margin = |
1177 InspectorDOMAgent::ParseColor(config->getShapeMarginColor(nullptr)); | 1177 InspectorDOMAgent::ParseColor(config->getShapeMarginColor(nullptr)); |
1178 highlight_config->selector_list = config->getSelectorList(""); | 1178 highlight_config->selector_list = config->getSelectorList(""); |
1179 | 1179 |
1180 *out_config = std::move(highlight_config); | 1180 *out_config = std::move(highlight_config); |
1181 return Response::OK(); | 1181 return Response::OK(); |
1182 } | 1182 } |
1183 | 1183 |
1184 } // namespace blink | 1184 } // namespace blink |
OLD | NEW |