OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. |
7 * All rights reserved. | 7 * All rights reserved. |
8 * Copyright (C) 2009 Google Inc. All rights reserved. | 8 * Copyright (C) 2009 Google Inc. All rights reserved. |
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. | 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. |
10 * (http://www.torchmobile.com/) | 10 * (http://www.torchmobile.com/) |
(...skipping 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1348 " \"%s\" ", ToLayoutText(this)->GetText().Ascii().data())); | 1348 " \"%s\" ", ToLayoutText(this)->GetText().Ascii().data())); |
1349 | 1349 |
1350 if (VirtualContinuation()) | 1350 if (VirtualContinuation()) |
1351 string_builder.Append( | 1351 string_builder.Append( |
1352 String::Format(" continuation=%p", VirtualContinuation())); | 1352 String::Format(" continuation=%p", VirtualContinuation())); |
1353 | 1353 |
1354 if (GetNode()) { | 1354 if (GetNode()) { |
1355 while (string_builder.length() < kShowTreeCharacterOffset) | 1355 while (string_builder.length() < kShowTreeCharacterOffset) |
1356 string_builder.Append(' '); | 1356 string_builder.Append(' '); |
1357 string_builder.Append('\t'); | 1357 string_builder.Append('\t'); |
1358 WTFLogAlways("%s%s", string_builder.ToString().Utf8().data(), | 1358 LOG(INFO) << "\n" |
fs
2017/06/14 20:14:19
Why an initial \n (WTFLogAlways always made sure t
tkent
2017/06/14 23:41:39
ShowLayoutObject() is one-line summary of this Lay
mrunal
2017/06/19 22:10:57
@fs, No idea, I was just trying to follow other pa
mrunal
2017/06/19 22:10:57
@tkent, so just overload operator<<() instead of S
tkent
2017/06/20 02:36:23
Yes, I meant it.
However, I realized it was unnece
| |
1359 GetNode()->ToString().Utf8().data()); | 1359 << string_builder.ToString().Utf8().data() |
fs
2017/06/14 20:14:19
Don't we have an operator<< that would work here?
mrunal
2017/06/19 22:10:57
Again, I was just trying to follow other patches w
tkent
2017/06/20 02:36:24
|<< string_builder.ToString()| and |<< string_buil
fs
2017/06/20 08:24:35
I don't particularly care either way, but I don't
| |
1360 << GetNode()->ToString().Utf8().data(); | |
1360 } else { | 1361 } else { |
1361 WTFLogAlways("%s", string_builder.ToString().Utf8().data()); | 1362 LOG(INFO) << "\n" << string_builder.ToString().Utf8().data(); |
mstensho (USE GERRIT)
2017/06/20 08:49:40
Changing from WTFLogAlways() to LOG() introduces a
| |
1362 } | 1363 } |
1363 } | 1364 } |
1364 | 1365 |
1365 void LayoutObject::ShowLayoutTreeAndMark(const LayoutObject* marked_object1, | 1366 void LayoutObject::ShowLayoutTreeAndMark(const LayoutObject* marked_object1, |
1366 const char* marked_label1, | 1367 const char* marked_label1, |
1367 const LayoutObject* marked_object2, | 1368 const LayoutObject* marked_object2, |
1368 const char* marked_label2, | 1369 const char* marked_label2, |
1369 unsigned depth) const { | 1370 unsigned depth) const { |
1370 StringBuilder string_builder; | 1371 StringBuilder string_builder; |
1371 if (marked_object1 == this && marked_label1) | 1372 if (marked_object1 == this && marked_label1) |
(...skipping 2243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3615 } | 3616 } |
3616 | 3617 |
3617 } // namespace blink | 3618 } // namespace blink |
3618 | 3619 |
3619 #ifndef NDEBUG | 3620 #ifndef NDEBUG |
3620 | 3621 |
3621 void showTree(const blink::LayoutObject* object) { | 3622 void showTree(const blink::LayoutObject* object) { |
3622 if (object) | 3623 if (object) |
3623 object->ShowTreeForThis(); | 3624 object->ShowTreeForThis(); |
3624 else | 3625 else |
3625 WTFLogAlways("%s", "Cannot showTree. Root is (nil)"); | 3626 LOG(INFO) << "\n Cannot showTree. Root is (nil)"; |
tkent
2017/06/14 23:41:39
The leading "\n" is unnecessary.
tkent
2017/06/14 23:41:40
The leading "\n" is unnecessary.
mrunal
2017/06/19 22:10:57
Acknowledged.
| |
3626 } | 3627 } |
3627 | 3628 |
3628 void showLineTree(const blink::LayoutObject* object) { | 3629 void showLineTree(const blink::LayoutObject* object) { |
3629 if (object) | 3630 if (object) |
3630 object->ShowLineTreeForThis(); | 3631 object->ShowLineTreeForThis(); |
3631 else | 3632 else |
3632 WTFLogAlways("%s", "Cannot showLineTree. Root is (nil)"); | 3633 LOG(INFO) << "\n Cannot showLineTree. Root is (nil)"; |
tkent
2017/06/14 23:41:39
The leading "\n" is unnecessary.
mrunal
2017/06/19 22:10:57
Acknowledged.
| |
3633 } | 3634 } |
3634 | 3635 |
3635 void showLayoutTree(const blink::LayoutObject* object1) { | 3636 void showLayoutTree(const blink::LayoutObject* object1) { |
3636 showLayoutTree(object1, 0); | 3637 showLayoutTree(object1, 0); |
3637 } | 3638 } |
3638 | 3639 |
3639 void showLayoutTree(const blink::LayoutObject* object1, | 3640 void showLayoutTree(const blink::LayoutObject* object1, |
3640 const blink::LayoutObject* object2) { | 3641 const blink::LayoutObject* object2) { |
3641 if (object1) { | 3642 if (object1) { |
3642 const blink::LayoutObject* root = object1; | 3643 const blink::LayoutObject* root = object1; |
3643 while (root->Parent()) | 3644 while (root->Parent()) |
3644 root = root->Parent(); | 3645 root = root->Parent(); |
3645 root->ShowLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3646 root->ShowLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3646 } else { | 3647 } else { |
3647 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); | 3648 LOG(INFO) << "\n Cannot showLayoutTree. Root is (nil)"; |
tkent
2017/06/14 23:41:39
The leading "\n" is unnecessary.
mrunal
2017/06/19 22:10:57
Acknowledged.
| |
3648 } | 3649 } |
3649 } | 3650 } |
3650 | 3651 |
3651 #endif | 3652 #endif |
OLD | NEW |