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

Side by Side Diff: Source/core/inspector/InspectorHighlight.cpp

Issue 1311783003: Devtools[LayoutEditor]: Rework layout-editor workflow (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@resize
Patch Set: Rebase on dgozman changes Created 5 years, 3 months 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/inspector/InspectorHighlight.h" 6 #include "core/inspector/InspectorHighlight.h"
7 7
8 #include "core/dom/ClientRect.h" 8 #include "core/dom/ClientRect.h"
9 #include "core/dom/PseudoElement.h" 9 #include "core/dom/PseudoElement.h"
10 #include "core/frame/FrameView.h" 10 #include "core/frame/FrameView.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 , m_showRulers(false) 218 , m_showRulers(false)
219 , m_showExtensionLines(false) 219 , m_showExtensionLines(false)
220 , m_displayAsMaterial(false) 220 , m_displayAsMaterial(false)
221 { 221 {
222 } 222 }
223 223
224 InspectorHighlightConfig::InspectorHighlightConfig() 224 InspectorHighlightConfig::InspectorHighlightConfig()
225 : showInfo(false) 225 : showInfo(false)
226 , showRulers(false) 226 , showRulers(false)
227 , showExtensionLines(false) 227 , showExtensionLines(false)
228 , showLayoutEditor(false)
229 , displayAsMaterial(false) 228 , displayAsMaterial(false)
230 { 229 {
231 } 230 }
232 231
232 InspectorHighlightConfig::InspectorHighlightConfig(const InspectorHighlightConfi g& config)
dgozman 2015/08/28 23:44:10 I think you can just use operator=.
sergeyv 2015/09/02 00:40:58 Done.
233 : content(config.content)
234 , contentOutline(config.contentOutline)
235 , padding(config.padding)
236 , border(config.border)
237 , margin(config.margin)
238 , eventTarget(config.eventTarget)
239 , shape(config.shape)
240 , shapeMargin(config.shapeMargin)
241 , showInfo(config.showInfo)
242 , showRulers(config.showRulers)
243 , showExtensionLines(config.showExtensionLines)
244 , displayAsMaterial(config.displayAsMaterial)
245 {
246 }
247
233 InspectorHighlight::InspectorHighlight(Node* node, const InspectorHighlightConfi g& highlightConfig, bool appendElementInfo) 248 InspectorHighlight::InspectorHighlight(Node* node, const InspectorHighlightConfi g& highlightConfig, bool appendElementInfo)
234 : m_highlightPaths(JSONArray::create()) 249 : m_highlightPaths(JSONArray::create())
235 , m_showRulers(highlightConfig.showRulers) 250 , m_showRulers(highlightConfig.showRulers)
236 , m_showExtensionLines(highlightConfig.showExtensionLines) 251 , m_showExtensionLines(highlightConfig.showExtensionLines)
237 , m_displayAsMaterial(highlightConfig.displayAsMaterial) 252 , m_displayAsMaterial(highlightConfig.displayAsMaterial)
238 { 253 {
239 appendPathsForShapeOutside(node, highlightConfig); 254 appendPathsForShapeOutside(node, highlightConfig);
240 appendNodeHighlight(node, highlightConfig); 255 appendNodeHighlight(node, highlightConfig);
241 if (appendElementInfo && node->isElementNode()) 256 if (appendElementInfo && node->isElementNode())
242 m_elementInfo = buildElementInfo(toElement(node)); 257 m_elementInfo = buildElementInfo(toElement(node));
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 config.contentOutline = Color(128, 0, 0, 0); 455 config.contentOutline = Color(128, 0, 0, 0);
441 config.padding = Color(0, 255, 0, 0); 456 config.padding = Color(0, 255, 0, 0);
442 config.border = Color(0, 0, 255, 0); 457 config.border = Color(0, 0, 255, 0);
443 config.margin = Color(255, 255, 255, 0); 458 config.margin = Color(255, 255, 255, 0);
444 config.eventTarget = Color(128, 128, 128, 0); 459 config.eventTarget = Color(128, 128, 128, 0);
445 config.shape = Color(0, 0, 0, 0); 460 config.shape = Color(0, 0, 0, 0);
446 config.shapeMargin = Color(128, 128, 128, 0); 461 config.shapeMargin = Color(128, 128, 128, 0);
447 config.showInfo = true; 462 config.showInfo = true;
448 config.showRulers = true; 463 config.showRulers = true;
449 config.showExtensionLines = true; 464 config.showExtensionLines = true;
450 config.showLayoutEditor = false;
451 config.displayAsMaterial = false; 465 config.displayAsMaterial = false;
452 return config; 466 return config;
453 } 467 }
454 468
455 } // namespace blink 469 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698