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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutView.cpp

Issue 2280153002: Refactoring out the code in LayoutTreeAsText::writeLayoutObject. (Closed)
Patch Set: Codereview update Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutView.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutView.cpp b/third_party/WebKit/Source/core/layout/LayoutView.cpp
index 551f8655f41e1eba24f7d16e2adea5d399990d5a..bb9eb0ea9d9fd927f44b756ad3b2879672bcff85 100644
--- a/third_party/WebKit/Source/core/layout/LayoutView.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutView.cpp
@@ -998,4 +998,17 @@ ScrollResult LayoutView::scroll(ScrollGranularity granularity, const FloatSize&
return frameView()->getScrollableArea()->userScroll(granularity, delta);
}
+LayoutRect LayoutView::debugRect() const
+{
+ LayoutRect rect;
+ LayoutBlock* block = containingBlock();
+ if (block)
+ block->adjustChildDebugRect(rect);
skobes 2016/09/12 17:09:35 At this point, the rect is empty. Should this be
lunalu1 2016/09/12 17:48:48 I did this part according to the following code in
skobes 2016/09/12 17:54:05 I see. I guess the order doesn't matter since adj
lunalu1 2016/09/12 18:26:48 Done.
+
+ rect.setWidth(LayoutUnit(viewWidth(IncludeScrollbars)));
+ rect.setHeight(LayoutUnit(viewHeight(IncludeScrollbars)));
+
+ return rect;
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698