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

Unified Diff: Source/core/inspector/InspectorOverlay.cpp

Issue 952273006: Make the constructor of a LayoutRect from an IntRect explicit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/inspector/InspectorOverlay.cpp
diff --git a/Source/core/inspector/InspectorOverlay.cpp b/Source/core/inspector/InspectorOverlay.cpp
index 43fc4e95df95a486e9dadcf1a001c2bca25c16f3..8afa70545726cc02db786f487463b6417a7eb55f 100644
--- a/Source/core/inspector/InspectorOverlay.cpp
+++ b/Source/core/inspector/InspectorOverlay.cpp
@@ -279,7 +279,7 @@ static bool buildNodeQuads(LayoutObject* renderer, FloatQuad* content, FloatQuad
LayoutInline* layoutInline = toLayoutInline(renderer);
// LayoutInline's bounding box includes paddings and borders, excludes margins.
- borderBox = layoutInline->linesBoundingBox();
+ borderBox = LayoutRect(layoutInline->linesBoundingBox());
paddingBox = LayoutRect(borderBox.x() + layoutInline->borderLeft(), borderBox.y() + layoutInline->borderTop(),
borderBox.width() - layoutInline->borderLeft() - layoutInline->borderRight(), borderBox.height() - layoutInline->borderTop() - layoutInline->borderBottom());
contentBox = LayoutRect(paddingBox.x() + layoutInline->paddingLeft(), paddingBox.y() + layoutInline->paddingTop(),
@@ -829,7 +829,7 @@ bool InspectorOverlay::getBoxModel(Node* node, RefPtr<TypeBuilder::DOM::BoxModel
if (!buildNodeQuads(node->renderer(), &content, &padding, &border, &margin))
return false;
- IntRect boundingBox = pixelSnappedIntRect(view->contentsToRootFrame(renderer->absoluteBoundingBoxRect()));
+ IntRect boundingBox = view->contentsToRootFrame(renderer->absoluteBoundingBoxRect());
chrishtr 2015/02/26 18:26:47 No need to pixel-snap an IntRect
LayoutBoxModelObject* modelObject = renderer->isBoxModelObject() ? toLayoutBoxModelObject(renderer) : nullptr;
model = TypeBuilder::DOM::BoxModel::create()

Powered by Google App Engine
This is Rietveld 408576698