InspectorHighlight::InspectorHighlight(Node* node, const InspectorHighlightConfig& highlightConfig, bool appendElementInfo)
    : m_highlightPaths(JSONArray::create())
    , m_showRulers(highlightConfig.showRulers)
    , m_showExtensionLines(highlightConfig.showExtensionLines)
{
    appendPathsForShapeOutside(node, highlightConfig);
    appendNodeHighlight(node, highlightConfig);
    if (appendElementInfo && node->isElementNode())
        m_elementInfo = buildElementInfo(toElement(node));
}
Пример #2
0
InspectorHighlight::InspectorHighlight(Node* node, const InspectorHighlightConfig& highlightConfig, bool appendElementInfo)
    : m_highlightPaths(protocol::ListValue::create())
    , m_showRulers(highlightConfig.showRulers)
    , m_showExtensionLines(highlightConfig.showExtensionLines)
    , m_displayAsMaterial(highlightConfig.displayAsMaterial)
{
    appendPathsForShapeOutside(node, highlightConfig);
    appendNodeHighlight(node, highlightConfig);
    if (appendElementInfo && node->isElementNode())
        m_elementInfo = buildElementInfo(toElement(node));
}