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

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

Issue 1204453002: Devtools: Create layout editor experiment (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after
1217 if (searchMode != NotSearching) { 1217 if (searchMode != NotSearching) {
1218 m_inspectModeHighlightConfig = highlightConfigFromInspectorObject(errorS tring, highlightInspectorObject); 1218 m_inspectModeHighlightConfig = highlightConfigFromInspectorObject(errorS tring, highlightInspectorObject);
1219 if (!m_inspectModeHighlightConfig) 1219 if (!m_inspectModeHighlightConfig)
1220 return; 1220 return;
1221 } else { 1221 } else {
1222 m_hoveredNodeForInspectMode.clear(); 1222 m_hoveredNodeForInspectMode.clear();
1223 hideHighlight(errorString); 1223 hideHighlight(errorString);
1224 } 1224 }
1225 } 1225 }
1226 1226
1227 PassOwnPtr<InspectorHighlightConfig> InspectorDOMAgent::highlightConfigFromInspe ctorObject(ErrorString* errorString, JSONObject* highlightInspectorObject) 1227 PassOwnPtr<InspectorHighlightConfig> InspectorDOMAgent::highlightConfigFromInspe ctorObject(ErrorString* errorString, JSONObject* highlightInspectorObject)
dgozman 2015/06/23 14:00:30 I think we should move this to InspectorHighlight.
sergeyv 2015/06/23 16:36:52 Done.
1228 { 1228 {
1229 if (!highlightInspectorObject) { 1229 if (!highlightInspectorObject) {
1230 *errorString = "Internal error: highlight configuration parameter is mis sing"; 1230 *errorString = "Internal error: highlight configuration parameter is mis sing";
1231 return nullptr; 1231 return nullptr;
1232 } 1232 }
1233 1233
1234 OwnPtr<InspectorHighlightConfig> highlightConfig = adoptPtr(new InspectorHig hlightConfig()); 1234 OwnPtr<InspectorHighlightConfig> highlightConfig = adoptPtr(new InspectorHig hlightConfig());
1235 bool showInfo = false; // Default: false (do not show a tooltip). 1235 bool showInfo = false; // Default: false (do not show a tooltip).
1236 highlightInspectorObject->getBoolean("showInfo", &showInfo); 1236 highlightInspectorObject->getBoolean("showInfo", &showInfo);
1237 highlightConfig->showInfo = showInfo; 1237 highlightConfig->showInfo = showInfo;
1238 bool showRulers = false; // Default: false (do not show rulers). 1238 bool showRulers = false; // Default: false (do not show rulers).
1239 highlightInspectorObject->getBoolean("showRulers", &showRulers); 1239 highlightInspectorObject->getBoolean("showRulers", &showRulers);
1240 highlightConfig->showRulers = showRulers; 1240 highlightConfig->showRulers = showRulers;
1241 bool showExtensionLines = false; // Default: false (do not show extension li nes). 1241 bool showExtensionLines = false; // Default: false (do not show extension li nes).
1242 highlightInspectorObject->getBoolean("showExtensionLines", &showExtensionLin es); 1242 highlightInspectorObject->getBoolean("showExtensionLines", &showExtensionLin es);
1243 highlightConfig->showExtensionLines = showExtensionLines; 1243 highlightConfig->showExtensionLines = showExtensionLines;
1244 bool showWYSIWYGEditor = false;
1245 highlightInspectorObject->getBoolean("showWYSIWYGEditor", &showWYSIWYGEditor );
1246 highlightConfig->showWYSIWYGEditor = showWYSIWYGEditor;
1244 highlightConfig->content = parseConfigColor("contentColor", highlightInspect orObject); 1247 highlightConfig->content = parseConfigColor("contentColor", highlightInspect orObject);
1245 highlightConfig->contentOutline = parseConfigColor("contentOutlineColor", hi ghlightInspectorObject); 1248 highlightConfig->contentOutline = parseConfigColor("contentOutlineColor", hi ghlightInspectorObject);
1246 highlightConfig->padding = parseConfigColor("paddingColor", highlightInspect orObject); 1249 highlightConfig->padding = parseConfigColor("paddingColor", highlightInspect orObject);
1247 highlightConfig->border = parseConfigColor("borderColor", highlightInspector Object); 1250 highlightConfig->border = parseConfigColor("borderColor", highlightInspector Object);
1248 highlightConfig->margin = parseConfigColor("marginColor", highlightInspector Object); 1251 highlightConfig->margin = parseConfigColor("marginColor", highlightInspector Object);
1249 highlightConfig->eventTarget = parseConfigColor("eventTargetColor", highligh tInspectorObject); 1252 highlightConfig->eventTarget = parseConfigColor("eventTargetColor", highligh tInspectorObject);
1250 highlightConfig->shape = parseConfigColor("shapeColor", highlightInspectorOb ject); 1253 highlightConfig->shape = parseConfigColor("shapeColor", highlightInspectorOb ject);
1251 highlightConfig->shapeMargin = parseConfigColor("shapeMarginColor", highligh tInspectorObject); 1254 highlightConfig->shapeMargin = parseConfigColor("shapeMarginColor", highligh tInspectorObject);
1252 1255
1253 return highlightConfig.release(); 1256 return highlightConfig.release();
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after
2190 visitor->trace(m_searchResults); 2193 visitor->trace(m_searchResults);
2191 #endif 2194 #endif
2192 visitor->trace(m_hoveredNodeForInspectMode); 2195 visitor->trace(m_hoveredNodeForInspectMode);
2193 visitor->trace(m_history); 2196 visitor->trace(m_history);
2194 visitor->trace(m_domEditor); 2197 visitor->trace(m_domEditor);
2195 visitor->trace(m_listener); 2198 visitor->trace(m_listener);
2196 InspectorBaseAgent::trace(visitor); 2199 InspectorBaseAgent::trace(visitor);
2197 } 2200 }
2198 2201
2199 } // namespace blink 2202 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698