Summary: | When we set word-wrap: break-word and xml:space="preserve" to svg text element, the text is collapsed. | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Yuki Sekiguchi <yuki.sekiguchi> | ||||||||
Component: | SVG | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | eric, esprehn+autocc, leviw, ojan.autocc, pdr, schenney, webkit.review.bot, zimmermann | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Attachments: |
|
Description
Yuki Sekiguchi
2013-03-06 21:01:31 PST
Created attachment 191912 [details]
Patch
Comment on attachment 191912 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=191912&action=review Mostly fine. I have one nit with the code and a request for greater testing. > Source/WebCore/rendering/RenderBlockLineLayout.cpp:2841 > + breakWords = breakAll = false; I believe that WebKit style dictates that this be two lines, with one assignment on each line. > LayoutTests/svg/text/preserve-break-word-expected.html:6 > +<text x="100" y="100" style="word-wrap: break-word">abcdef</text> Can you remove the style on the <text>? As I understand your patch, the SVG should appear the same as something with no word-wrap defined. > LayoutTests/svg/text/preserve-break-word.html:6 > +<text x="100" y="100" style="word-wrap: break-word"><tspan xml:space="preserve">abc</tspan>def</text> Could you please provide 3 <text> nodes? One with word-wrap: break word, one with xml:space="preserve" and one with both (the line you have already is the one with both). Created attachment 192137 [details]
Patch
Hi Stephen, Thank you for reviewing. (In reply to comment #2) > > Source/WebCore/rendering/RenderBlockLineLayout.cpp:2841 > > + breakWords = breakAll = false; > > I believe that WebKit style dictates that this be two lines, with one assignment on each line. OK. I understand it. > > LayoutTests/svg/text/preserve-break-word-expected.html:6 > > +<text x="100" y="100" style="word-wrap: break-word">abcdef</text> > > Can you remove the style on the <text>? As I understand your patch, the SVG should appear the same as something with no word-wrap defined. Sorry. You are right. Fixed. > > LayoutTests/svg/text/preserve-break-word.html:6 > > +<text x="100" y="100" style="word-wrap: break-word"><tspan xml:space="preserve">abc</tspan>def</text> > > Could you please provide 3 <text> nodes? One with word-wrap: break word, one with xml:space="preserve" and one with both (the line you have already is the one with both). Added test case. Looks good. R=me. Comment on attachment 192137 [details] Patch Clearing flags on attachment: 192137 Committed r145215: <http://trac.webkit.org/changeset/145215> All reviewed patches have been landed. Closing bug. |