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

Issue 2894543002: No extra space emission in TextIterator::HandleTextNode (Closed)

Created:
3 years, 7 months ago by Xiaocheng
Modified:
3 years, 7 months ago
Reviewers:
xiaochengh, yosin_UTC9
CC:
blink-reviews, chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

No extra space emission in TextIterator::HandleTextNode Due to historical reasons, TextIterator emits an extra space before a text node with "white-space: pre" style if the last text node contains only collapsed whitespaces. This might be a workaround for some other buggy behavior, which no longer exists today. Hence, this patch removes the extra space emission. BUG=721957 Review-Url: https://codereview.chromium.org/2894543002 Cr-Commit-Position: refs/heads/master@{#473072} Committed: https://chromium.googlesource.com/chromium/src/+/9b781c354432f97658390c848359d2d70ceb1cb5

Patch Set 1 #

Patch Set 2 : Thu May 18 00:12:27 PDT 2017 #

Patch Set 3 : auto rebaselined #

Patch Set 4 : Manual rebaseline #

Patch Set 5 : Try again #

Patch Set 6 : Should have done rebaseline #

Unified diffs Side-by-side diffs Delta from patch set Stats (+155 lines, -186 lines) Patch
M third_party/WebKit/LayoutTests/accessibility/draw-focus-if-needed-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/accessibility/image-link-inline-cont-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/compositing/draws-content/canvas-background-layer-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/compositing/draws-content/webgl-background-layer-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
D third_party/WebKit/LayoutTests/compositing/geometry/composited-in-columns-expected.txt View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/compositing/layer-creation/rotate3d-overlap-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/compositing/webgl/webgl-copy-image-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/css3/flexbox/line-wrapping-expected.txt View 1 2 1 chunk +15 lines, -15 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/block/float/block-with-negative-margin-clears-float-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/block/float/floats-do-not-overhang-from-block-formatting-context-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/block/positioning/positioned-child-inside-relative-positioned-anonymous-block-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/flex-and-minmax-content-resolution-columns-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-container-ignore-first-letter-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-container-ignore-first-line-expected.txt View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-intrinsic-dimensions/css-tables-expected.txt View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-intrinsic-dimensions/fit-content-container-with-replaced-child-expected.txt View 1 2 1 chunk +8 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-blocks-expected.txt View 1 2 1 chunk +15 lines, -15 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-intrinsic-dimensions/tables-expected.txt View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/display-inline-block-scrollbar-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/positioned-overflow-scroll-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/deprecated-flexbox/intrinsic-min-width-applies-with-fixed-width-expected.txt View 1 2 1 chunk +5 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Element/scroll-width-hidden-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Element/scroll-width-visible-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/elementsFromPoint/elementsFromPoint-svg-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/insertedIntoDocument-no-crash-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/shadow/event-path-for-user-agent-shadow-tree-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/encoding/bracket-in-tag-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/content-changed-during-drop-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/keypress-removed-node-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/inline/inline-offsetLeft-continuation-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
D third_party/WebKit/LayoutTests/fast/inline/inline-with-empty-inline-children-expected.txt View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/multicol/break-before-first-line-in-first-child-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/multicol/nested-one-line-in-inner-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-div-in-anchor-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-fully-aligned-horizontally-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-fully-aligned-vertically-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-zero-margin-content-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/table/convert-inline-anonoymous-wrapper-to-block-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/table/fixed-table-layout/table-with-percent-width-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/table/row-in-inline-block-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/writing-mode/auto-sizing-orthogonal-flows-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/xpath/preceding-axis-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/xpath/union-context-node-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/hittesting/inner-border-radius-hittest-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-sync-no-progress-events-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getBoxModel-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-snapshot-with-active-dom-object-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-snapshot-with-detached-dom-tree-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/inspector-protocol/heap-profiler/heap-snapshot-with-event-listener-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/inspector/console/console-format-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/inspector/elements/shadow/inspect-deep-shadow-element-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/inspector/elements/styles-2/add-import-rule-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/inspector/elements/styles-3/style-rule-from-imported-stylesheet-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/inspector/elements/styles-4/svg-style-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/inspector/extensions/extensions-audits-content-script-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/inspector/extensions/extensions-audits-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/inspector/extensions/extensions-timeline-api-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
D third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/composited-in-columns-expected.txt View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
D third_party/WebKit/LayoutTests/platform/linux/css3/flexbox/line-wrapping-expected.txt View 1 2 3 1 chunk +15 lines, -15 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/images/color-profile-munsell-adobe-to-srgb-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/images/color-profile-munsell-srgb-to-srgb-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/color-profile-munsell-adobe-to-srgb-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/color-profile-munsell-srgb-to-srgb-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/compositing/geometry/composited-in-columns-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
D third_party/WebKit/LayoutTests/platform/win/css3/flexbox/line-wrapping-expected.txt View 1 2 3 1 chunk +15 lines, -15 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/images/color-profile-munsell-adobe-to-srgb-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/images/color-profile-munsell-srgb-to-srgb-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/compositing/geometry/composited-in-columns-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/virtual/gpu-rasterization/images/color-profile-munsell-adobe-to-srgb-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/printing/webgl-repeated-printing-expected.txt View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/printing/webgl-repeated-printing-preservedrawingbuffer-expected.txt View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/svg/custom/tabindex-order-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/svg/dom/svg-root-lengths-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/traversal/tree-walker-001-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/traversal/tree-walker-002-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/traversal/tree-walker-003-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/traversal/tree-walker-004-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/traversal/tree-walker-005-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
D third_party/WebKit/LayoutTests/virtual/without-smil/svg/animations/exposed/effect-expected.txt View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp View 1 2 chunks +0 lines, -31 lines 0 comments Download

Messages

Total messages: 28 (22 generated)
Xiaocheng
I don't think the extra space emission is necessary. I haven't found any case where ...
3 years, 7 months ago (2017-05-19 01:29:34 UTC) #16
yosin_UTC9
On 2017/05/19 at 01:29:34, xiaochengh wrote: > I don't think the extra space emission is ...
3 years, 7 months ago (2017-05-19 02:09:43 UTC) #19
yosin_UTC9
lgtm Good catch!
3 years, 7 months ago (2017-05-19 02:10:09 UTC) #20
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/2894543002/100001
3 years, 7 months ago (2017-05-19 03:49:46 UTC) #24
commit-bot: I haz the power
Committed patchset #6 (id:100001) as https://chromium.googlesource.com/chromium/src/+/9b781c354432f97658390c848359d2d70ceb1cb5
3 years, 7 months ago (2017-05-19 03:56:30 UTC) #27
Xiaocheng
3 years, 7 months ago (2017-05-22 22:04:51 UTC) #28
Message was sent while issue was closed.
A revert of this CL (patchset #6 id:100001) has been created in
https://codereview.chromium.org/2896033003/ by xiaochengh@chromium.org.

The reason for reverting is: Breaking this case:

<div class=container id=div4 style="width:30px">
foooooooooooooooo

<span style="white-space: pre">bar</span>
</div>.

Powered by Google App Engine
This is Rietveld 408576698