Commit 23777af0 authored by Christian Biesinger's avatar Christian Biesinger Committed by Commit Bot

[layoutng] Add some more detail to DCHECK failures

To help with debugging

R=xiaochengh@chromium.org,ikilpatrick@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: Ie56254eef3aaa3d21e0f74d2323211197ecd127a
Reviewed-on: https://chromium-review.googlesource.com/1013616Reviewed-by: default avatarXiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551229}
parent a583f326
......@@ -332,7 +332,7 @@ NGCaretPosition ComputeNGCaretPosition(const LayoutBlockFlow& context,
unsigned offset,
TextAffinity affinity) {
const NGPaintFragment* root_fragment = context.PaintFragment();
DCHECK(root_fragment);
DCHECK(root_fragment) << "no paint fragment on layout object " << &context;
NGCaretPosition candidate;
for (const auto& child :
......
......@@ -136,7 +136,8 @@ class CORE_EXPORT NGPhysicalFragment
// Returns the offset relative to the parent fragment's content-box.
NGPhysicalOffset Offset() const {
DCHECK(is_placed_);
DCHECK(is_placed_) << "this=" << this << " for layout object "
<< layout_object_;
return offset_;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment