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 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 return; | 503 return; |
504 | 504 |
505 if (!page_overlay_) { | 505 if (!page_overlay_) { |
506 page_overlay_ = PageOverlay::Create( | 506 page_overlay_ = PageOverlay::Create( |
507 frame_impl_, WTF::WrapUnique(new InspectorPageOverlayDelegate(*this))); | 507 frame_impl_, WTF::WrapUnique(new InspectorPageOverlayDelegate(*this))); |
508 } | 508 } |
509 | 509 |
510 page_overlay_->Update(); | 510 page_overlay_->Update(); |
511 } | 511 } |
512 | 512 |
| 513 void InspectorOverlayAgent::PaintOverlay() { |
| 514 UpdateAllLifecyclePhases(); |
| 515 // TODO(chrishtr): integrate paint into the overlay's lifecycle. |
| 516 if (page_overlay_ && page_overlay_->GetGraphicsLayer()) |
| 517 page_overlay_->GetGraphicsLayer()->Paint(nullptr); |
| 518 } |
| 519 |
| 520 void InspectorOverlayAgent::LayoutOverlay() { |
| 521 if (page_overlay_) |
| 522 page_overlay_->Update(); |
| 523 } |
| 524 |
513 void InspectorOverlayAgent::UpdateAllLifecyclePhases() { | 525 void InspectorOverlayAgent::UpdateAllLifecyclePhases() { |
514 if (IsEmpty()) | 526 if (IsEmpty()) |
515 return; | 527 return; |
516 | 528 |
517 AutoReset<bool> scoped(&in_layout_, true); | 529 AutoReset<bool> scoped(&in_layout_, true); |
518 if (needs_update_) { | 530 if (needs_update_) { |
519 needs_update_ = false; | 531 needs_update_ = false; |
520 RebuildOverlayPage(); | 532 RebuildOverlayPage(); |
521 } | 533 } |
522 OverlayMainFrame()->View()->UpdateAllLifecyclePhases(); | 534 OverlayMainFrame()->View()->UpdateAllLifecyclePhases(); |
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1163 InspectorDOMAgent::ParseColor(config->getShapeColor(nullptr)); | 1175 InspectorDOMAgent::ParseColor(config->getShapeColor(nullptr)); |
1164 highlight_config->shape_margin = | 1176 highlight_config->shape_margin = |
1165 InspectorDOMAgent::ParseColor(config->getShapeMarginColor(nullptr)); | 1177 InspectorDOMAgent::ParseColor(config->getShapeMarginColor(nullptr)); |
1166 highlight_config->selector_list = config->getSelectorList(""); | 1178 highlight_config->selector_list = config->getSelectorList(""); |
1167 | 1179 |
1168 *out_config = std::move(highlight_config); | 1180 *out_config = std::move(highlight_config); |
1169 return Response::OK(); | 1181 return Response::OK(); |
1170 } | 1182 } |
1171 | 1183 |
1172 } // namespace blink | 1184 } // namespace blink |
OLD | NEW |