New issue
Advanced search Search tips

Issue 602606 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Compat

Blocking:
issue 366558



Sign in to add a comment

Aligning xml:space=default behavior (w/ that of "white-space: normal")

Project Member Reported by f...@opera.com, Apr 12 2016

Issue description

There's currently a slight difference between how newlines are handled for xml:space=default (treated as presentation attribute for 'white-space' w/ value 'nowrap') and "white-space: normal". The difference would seem to boil down to this sentence:

  "First, it will remove all newline characters."

(See LayoutSVGInlineText.cpp:applySVGWhitespaceRules for how this is applied.)

Simple example:

https://jsfiddle.net/asyrzuz2/

Blink/WebKit renders this is in one way - no space between 'Foo' and 'bar' - while all other browsers (IE11, Edge, Firefox/Gecko and Presto) render with a space between the two words.

Uncertain how big of a deal this will be to change in practice, but if doing it (which I think we should), then we should probably do it sooner rather than later (possibly as close after a branch as possible.)

With this "fixed" I think we should be closer to be able to use the common white-space handling. (The 'preserve' handling remains an issue - with some steps taken in spec already, see annotation in https://svgwg.org/svg2-draft/text.html#LegacyXMLSpace)

(Setting this as blocking issue 366558, although technically it doesn't need to.)
 
_ _"
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0c39a6f29e59594a7b9c412a8203af9fc43e4ecd

commit 0c39a6f29e59594a7b9c412a8203af9fc43e4ecd
Author: fs <fs@opera.com>
Date: Thu Apr 14 21:58:00 2016

Replace CR/NL by space - don't remove altogether when xml:space=default

This moves handling of xml:space=default closer to the more generic
white-space handling, by not removing CR and NL characters, but rather
just replacing them with a regular space.
This modifies behavior, but means aligning with non-WebKit browser
engines.
This also simplifies the code a bit - with promise of further
simplification (or rather assimilation.)

TEST=svg/custom/text-whitespace-handling.svg
BUG= 602606 , 366558

Review URL: https://codereview.chromium.org/1888823002

Cr-Commit-Position: refs/heads/master@{#387440}

[modify] https://crrev.com/0c39a6f29e59594a7b9c412a8203af9fc43e4ecd/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/0c39a6f29e59594a7b9c412a8203af9fc43e4ecd/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp

Project Member

Comment 3 by bugdroid1@chromium.org, Apr 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/66ea91f794344bb3cfa090d7316cb7482c5eb9d7

commit 66ea91f794344bb3cfa090d7316cb7482c5eb9d7
Author: Rebaseline Bot <blink-rebaseline-bot@chromium.org>
Date: Thu Apr 14 23:44:55 2016

Auto-rebaseline for r387440

https://chromium.googlesource.com/chromium/src/+/0c39a6f29

BUG= 602606 
TBR=fs@opera.com

Review URL: https://codereview.chromium.org/1893493002 .

Cr-Commit-Position: refs/heads/master@{#387477}

[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/android/svg/W3C-SVG-1.1/styling-css-02-b-expected.txt
[add] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/android/svg/custom/invalid-text-content-expected.txt
[add] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/android/svg/custom/text-whitespace-handling-expected.png
[add] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/android/svg/custom/text-whitespace-handling-expected.txt
[add] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/android/svg/text/text-selection-ws-01-t-expected.txt
[add] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/android/svg/text/textPathBoundsBug-expected.txt
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/styling-css-02-b-expected.txt
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/text-align-08-b-expected.txt
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/text-tselect-02-f-expected.txt
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/linux/svg/W3C-SVG-1.1/text-ws-01-t-expected.txt
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/linux/svg/custom/text-whitespace-handling-expected.png
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/linux/svg/custom/text-whitespace-handling-expected.txt
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/linux/svg/text/text-selection-tselect-02-f-expected.txt
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/linux/svg/text/text-selection-ws-01-t-expected.txt
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/mac-mac10.9/svg/W3C-SVG-1.1/text-align-08-b-expected.txt
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/styling-css-02-b-expected.txt
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-align-08-b-expected.txt
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-tselect-02-f-expected.txt
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-ws-01-t-expected.txt
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/mac/svg/custom/text-whitespace-handling-expected.png
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/mac/svg/custom/text-whitespace-handling-expected.txt
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/mac/svg/text/text-selection-tselect-02-f-expected.txt
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/mac/svg/text/text-selection-ws-01-t-expected.txt
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/mac/svg/text/textPathBoundsBug-expected.txt
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/styling-css-02-b-expected.txt
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/text-align-08-b-expected.txt
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/text-tselect-02-f-expected.txt
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/win/svg/W3C-SVG-1.1/text-ws-01-t-expected.txt
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/win/svg/custom/text-whitespace-handling-expected.png
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/win/svg/custom/text-whitespace-handling-expected.txt
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/win/svg/text/text-selection-tselect-02-f-expected.txt
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/win/svg/text/text-selection-ws-01-t-expected.txt
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/win/svg/text/textPathBoundsBug-expected.txt
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/platform/win7/svg/W3C-SVG-1.1/text-align-08-b-expected.txt
[modify] https://crrev.com/66ea91f794344bb3cfa090d7316cb7482c5eb9d7/third_party/WebKit/LayoutTests/svg/custom/invalid-text-content-expected.txt

Comment 4 by f...@opera.com, Apr 15 2016

Owner: f...@opera.com
Status: Fixed (was: Available)

Sign in to add a comment