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

Issue 2293703002: Refactor Node::showTree*() functions. (Closed)

Created:
4 years, 3 months ago by tkent
Modified:
4 years, 3 months ago
Reviewers:
yosin_UTC9
CC:
blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-layout_chromium.org, chromium-reviews, dglazkov+blink, krit, eae+blinkwatch, f(malita), fs, gyuyoung2, jchaffraix+rendering, kouhei+svg_chromium.org, leviw+renderwatch, pdr+svgwatchlist_chromium.org, pdr+renderingwatchlist_chromium.org, rwlbuis, Stephen Chennney, sof, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor Node::showTree*() functions. Update them so that they return strings instead of calling Node::showNode(), which uses WTFLogAlways(). - Rename showTreeForThis() to toTreeStringForThis() - Rename showTreeForThisInFlatTree() to toFlatTreeStringForThis() - Rename showTreeAndMark() to toMarkedTreeString(). - Rename showTreeAndMarkInFlatTree() to toMarkedFlatTreeString() - Rename traverseTreeAndMark() to appendMarkedTree() - Rename traverseTreeAndMarkInFlatTree() to appendMarkedFlatTree() - Add Node::toString() to help these functions. We'd like to return a string rather than taking a std::ostream argument because they are used with LOG macros. For example, VLOG(1) << node.toMarkedTreeString().utf8().data() << "..."; If we took a std::ostream argument, the code would be: std::stringstream buffer; node.printMarkedTreeTo(buffer); VLOG(1) << buffer.str() << "..."; The former is simpler. This CL doesn't affect production. BUG=638849 Committed: https://crrev.com/5186386bfed2c08c2253c65652f385859ed3af57 Cr-Commit-Position: refs/heads/master@{#415154}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -35 lines) Patch
M third_party/WebKit/Source/core/dom/Node.h View 1 chunk +5 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Node.cpp View 8 chunks +39 lines, -25 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Range.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/Position.cpp View 2 chunks +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/VisibleSelection.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutObject.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/svg/SVGResources.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 16 (11 generated)
tkent
yosin@, would you review this please? I think the next CL actually removes WTFLogAlways() usage ...
4 years, 3 months ago (2016-08-30 03:55:32 UTC) #9
yosin_UTC9
lgtm
4 years, 3 months ago (2016-08-30 04:55:02 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2293703002/20001
4 years, 3 months ago (2016-08-30 05:00:40 UTC) #13
commit-bot: I haz the power
Committed patchset #1 (id:20001)
4 years, 3 months ago (2016-08-30 05:26:33 UTC) #14
commit-bot: I haz the power
4 years, 3 months ago (2016-08-30 05:29:01 UTC) #16
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/5186386bfed2c08c2253c65652f385859ed3af57
Cr-Commit-Position: refs/heads/master@{#415154}

Powered by Google App Engine
This is Rietveld 408576698