| Index: third_party/WebKit/Source/core/inspector/InspectorHighlight.cpp
|
| diff --git a/third_party/WebKit/Source/core/inspector/InspectorHighlight.cpp b/third_party/WebKit/Source/core/inspector/InspectorHighlight.cpp
|
| index 9728c45312e3bf847427b8199266bc1a6af47e76..09c2e5836bcb30d8d2d2abba45db0a6eeb168518 100644
|
| --- a/third_party/WebKit/Source/core/inspector/InspectorHighlight.cpp
|
| +++ b/third_party/WebKit/Source/core/inspector/InspectorHighlight.cpp
|
| @@ -12,7 +12,6 @@
|
| #include "core/layout/LayoutObject.h"
|
| #include "core/layout/shapes/ShapeOutsideInfo.h"
|
| #include "core/style/ComputedStyleConstants.h"
|
| -#include "platform/HostWindow.h"
|
| #include "platform/graphics/Path.h"
|
|
|
| namespace blink {
|
| @@ -28,11 +27,9 @@
|
|
|
| std::unique_ptr<protocol::ListValue> release() { return std::move(m_path); }
|
|
|
| - void appendPath(const Path& path, float scale)
|
| + void appendPath(const Path& path)
|
| {
|
| - Path transformPath(path);
|
| - transformPath.transform(AffineTransform().scale(scale));
|
| - transformPath.apply(this, &PathBuilder::appendPathElement);
|
| + path.apply(this, &PathBuilder::appendPathElement);
|
| }
|
|
|
| protected:
|
| @@ -93,10 +90,10 @@
|
| , m_layoutObject(layoutObject)
|
| , m_shapeOutsideInfo(shapeOutsideInfo) { }
|
|
|
| - static std::unique_ptr<protocol::ListValue> buildPath(FrameView& view, LayoutObject& layoutObject, const ShapeOutsideInfo& shapeOutsideInfo, const Path& path, float scale)
|
| + static std::unique_ptr<protocol::ListValue> buildPath(FrameView& view, LayoutObject& layoutObject, const ShapeOutsideInfo& shapeOutsideInfo, const Path& path)
|
| {
|
| ShapePathBuilder builder(view, layoutObject, shapeOutsideInfo);
|
| - builder.appendPath(path, scale);
|
| + builder.appendPath(path);
|
| return builder.release();
|
| }
|
|
|
| @@ -216,12 +213,11 @@
|
|
|
| } // namespace
|
|
|
| -InspectorHighlight::InspectorHighlight(float scale)
|
| +InspectorHighlight::InspectorHighlight()
|
| : m_highlightPaths(protocol::ListValue::create())
|
| , m_showRulers(false)
|
| , m_showExtensionLines(false)
|
| , m_displayAsMaterial(false)
|
| - , m_scale(scale)
|
| {
|
| }
|
|
|
| @@ -238,7 +234,6 @@
|
| , m_showRulers(highlightConfig.showRulers)
|
| , m_showExtensionLines(highlightConfig.showExtensionLines)
|
| , m_displayAsMaterial(highlightConfig.displayAsMaterial)
|
| - , m_scale(1.f / node->document().view()->getHostWindow()->windowToViewportScalar(1.f))
|
| {
|
| appendPathsForShapeOutside(node, highlightConfig);
|
| appendNodeHighlight(node, highlightConfig);
|
| @@ -254,7 +249,7 @@
|
| {
|
| Path path = quadToPath(quad);
|
| PathBuilder builder;
|
| - builder.appendPath(path, m_scale);
|
| + builder.appendPath(path);
|
| appendPath(builder.release(), fillColor, outlineColor, name);
|
| }
|
|
|
| @@ -293,9 +288,9 @@
|
| return;
|
| }
|
|
|
| - appendPath(ShapePathBuilder::buildPath(*node->document().view(), *node->layoutObject(), *shapeOutsideInfo, paths.shape, m_scale), config.shape, Color::transparent);
|
| + appendPath(ShapePathBuilder::buildPath(*node->document().view(), *node->layoutObject(), *shapeOutsideInfo, paths.shape), config.shape, Color::transparent);
|
| if (paths.marginShape.length())
|
| - appendPath(ShapePathBuilder::buildPath(*node->document().view(), *node->layoutObject(), *shapeOutsideInfo, paths.marginShape, m_scale), config.shapeMargin, Color::transparent);
|
| + appendPath(ShapePathBuilder::buildPath(*node->document().view(), *node->layoutObject(), *shapeOutsideInfo, paths.marginShape), config.shapeMargin, Color::transparent);
|
| }
|
|
|
| void InspectorHighlight::appendNodeHighlight(Node* node, const InspectorHighlightConfig& highlightConfig)
|
| @@ -367,8 +362,8 @@
|
| if (const ShapeOutsideInfo* shapeOutsideInfo = shapeOutsideInfoForNode(node, &paths, &boundsQuad)) {
|
| (*model)->setShapeOutside(protocol::DOM::ShapeOutsideInfo::create()
|
| .setBounds(buildArrayForQuad(boundsQuad))
|
| - .setShape(protocol::Array<protocol::Value>::parse(ShapePathBuilder::buildPath(*view, *layoutObject, *shapeOutsideInfo, paths.shape, 1.f).get(), &errors))
|
| - .setMarginShape(protocol::Array<protocol::Value>::parse(ShapePathBuilder::buildPath(*view, *layoutObject, *shapeOutsideInfo, paths.marginShape, 1.f).get(), &errors))
|
| + .setShape(protocol::Array<protocol::Value>::parse(ShapePathBuilder::buildPath(*view, *layoutObject, *shapeOutsideInfo, paths.shape).get(), &errors))
|
| + .setMarginShape(protocol::Array<protocol::Value>::parse(ShapePathBuilder::buildPath(*view, *layoutObject, *shapeOutsideInfo, paths.marginShape).get(), &errors))
|
| .build());
|
| }
|
|
|
|
|