Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(12)

Issue 1179133002: Refactoring: Remove the first parameter |result| from StyledMarkupAccumulator::appendStartMarkup (Closed)

Created:
4 years, 10 months ago by hajimehoshi
Modified:
4 years, 10 months ago
Reviewers:
tkent, yosin_UTC9
CC:
blink-reviews, blink-reviews-style_chromium.org
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Refactoring: Remove the first parameter |result| from StyledMarkupAccumulator::appendStartMarkup StyledMarkupAccumulator::appendStartMarkup's first parameter |result| is |m_result| in most cases. This CL removes this to improve code readability. The case when the parameter is NOT |m_result| is at StyledMarkupSerializer::wrapWithNode. In this case, |node| must be a Document or a DocumentFragment. This CL extracts the code in MarkupFormatter for this case at the caller. BUG=499681 TEST=n/a; no behavior change Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=197026

Patch Set 1 #

Patch Set 2 : Remove unneeded code #

Patch Set 3 : Bug fix: miss to call pushMarkup #

Total comments: 6

Patch Set 4 : yosin's review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -6 lines) Patch
M Source/core/editing/StyledMarkupAccumulator.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/editing/StyledMarkupAccumulator.cpp View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M Source/core/editing/StyledMarkupSerializer.cpp View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
hajimehoshi
PTAL
4 years, 10 months ago (2015-06-12 07:42:47 UTC) #2
yosin_UTC9
https://codereview.chromium.org/1179133002/diff/40001/Source/core/editing/StyledMarkupAccumulator.cpp File Source/core/editing/StyledMarkupAccumulator.cpp (right): https://codereview.chromium.org/1179133002/diff/40001/Source/core/editing/StyledMarkupAccumulator.cpp#newcode83 Source/core/editing/StyledMarkupAccumulator.cpp:83: appendElementWithInlineStyle(m_result, element, style); Since |appendElement()| checks |element.isHTMLElement() && shouldAnnotate()) ...
4 years, 10 months ago (2015-06-12 07:58:04 UTC) #3
hajimehoshi
Thanks! PTAL https://codereview.chromium.org/1179133002/diff/40001/Source/core/editing/StyledMarkupSerializer.cpp File Source/core/editing/StyledMarkupSerializer.cpp (right): https://codereview.chromium.org/1179133002/diff/40001/Source/core/editing/StyledMarkupSerializer.cpp#newcode318 Source/core/editing/StyledMarkupSerializer.cpp:318: if (!node.isElementNode()) { On 2015/06/12 07:58:04, Yosi_UTC9 ...
4 years, 10 months ago (2015-06-12 08:14:14 UTC) #4
yosin_UTC9
lgtm
4 years, 10 months ago (2015-06-12 08:37:51 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1179133002/60001
4 years, 10 months ago (2015-06-12 08:38:19 UTC) #7
commit-bot: I haz the power
4 years, 10 months ago (2015-06-12 09:58:02 UTC) #8
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=197026

Powered by Google App Engine
This is Rietveld 408576698