WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 271113
141120
Negative text-indent with Unicode characters result in positive width
https://bugs.webkit.org/show_bug.cgi?id=141120
Summary
Negative text-indent with Unicode characters result in positive width
Simon Fraser (smfr)
Reported
2015-01-31 10:37:17 PST
Reported against chrome here:
https://code.google.com/p/chromium/issues/detail?id=385904
Testcase
http://jsfiddle.net/boggydigital/WJxx8/
Attachments
Reduction
(137 bytes, text/html)
2015-01-31 17:31 PST
,
Myles C. Maxfield
no flags
Details
Better reduction
(327 bytes, text/html)
2015-01-31 19:24 PST
,
Myles C. Maxfield
no flags
Details
Prospective patch
(4.86 KB, patch)
2015-02-01 08:29 PST
,
Myles C. Maxfield
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews105 for mac-mavericks-wk2
(766.10 KB, application/zip)
2015-02-01 09:10 PST
,
Build Bot
no flags
Details
Archive of layout-test-results from ews101 for mac-mavericks
(622.65 KB, application/zip)
2015-02-01 09:15 PST
,
Build Bot
no flags
Details
Safari vs Other Browsers
(229.67 KB, image/png)
2023-10-26 16:20 PDT
,
Ahmad Saleem
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Myles C. Maxfield
Comment 1
2015-01-31 17:19:06 PST
<h1>公司信息</h1>test
Myles C. Maxfield
Comment 2
2015-01-31 17:26:04 PST
layer at (0,0) size 800x600 RenderView at (0,0) size 800x600 layer at (0,0) size 800x88 RenderBlock {HTML} at (0,0) size 800x88 RenderBody {BODY} at (8,8) size 784x18 RenderBlock (floating) {H1} at (0,21) size 176x38 RenderText {#text} at (-9999,0) size 423x37 text run at (-9999,0) width 423: "\x{C3}\x{A5}\x{E2}\x{20AC}\x{A6}\x{C2}\x{AC}\x{C3}\x{A5}\x{C2}\x{8F}\x{C2}\x{B8}\x{C3}\x{A4}\x{C2}\x{BF}\x{C2}\x{A1}\x{C3}\x{A6}\x{C2}\x{81}\x{C2}\x{AF}" RenderText {#text} at (175,0) size 24x18 text run at (175,0) width 24: "test"
Myles C. Maxfield
Comment 3
2015-01-31 17:31:11 PST
Created
attachment 245810
[details]
Reduction
Myles C. Maxfield
Comment 4
2015-01-31 17:32:00 PST
The "test" is getting moved over by the width of the text before it. However, the text before it is being drawn way offscreen.
Myles C. Maxfield
Comment 5
2015-01-31 18:14:13 PST
RenderBlockFlow::logicalLeftFloatOffsetForLine() is returning different answers.
Myles C. Maxfield
Comment 6
2015-01-31 18:47:27 PST
The difference between åaaaaaaaaaaaa and aaaaaaaaaaaaaa is that the first one is breakable. The minimum and maximum preferred logical widths are being updated accordingly.
Myles C. Maxfield
Comment 7
2015-01-31 19:24:05 PST
Created
attachment 245813
[details]
Better reduction
Myles C. Maxfield
Comment 8
2015-01-31 19:28:10 PST
The span's apparent width (meaning: not counting the text-indent) is coming from the minimum preferred width of the text inside the span. That minimum preferred width comes from the width of the longest word, which in this case, is fairly long. In particular, it is longer than the length of the entire text plus the (negative of the) text-indent. I believe this is working as intended. Hyatt: What do you think?
Myles C. Maxfield
Comment 9
2015-01-31 19:31:37 PST
Hrm, that doesn't explain why behavior is different if the entire float is non-breakable.
Myles C. Maxfield
Comment 10
2015-01-31 19:53:36 PST
RenderBlockFlow::computeInlinePreferredLogicalWidths() looks like it's the culprit: if (!addedTextIndent || hasRemainingNegativeTextIndent) {
Myles C. Maxfield
Comment 11
2015-01-31 20:00:55 PST
Just below that: if (!hasBreakableChar)
Myles C. Maxfield
Comment 12
2015-02-01 08:29:23 PST
Created
attachment 245827
[details]
Prospective patch I haven't read as much as I should of RenderText::trimmedPrefWidths() to really understand this patch, but I figured I would post it so others could take a look.
Build Bot
Comment 13
2015-02-01 09:10:22 PST
Comment on
attachment 245827
[details]
Prospective patch
Attachment 245827
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.appspot.com/results/5568271243804672
New failing tests: fast/text/floating-negative-text-indent-breakable.html
Build Bot
Comment 14
2015-02-01 09:10:27 PST
Created
attachment 245829
[details]
Archive of layout-test-results from ews105 for mac-mavericks-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5
Build Bot
Comment 15
2015-02-01 09:15:28 PST
Comment on
attachment 245827
[details]
Prospective patch
Attachment 245827
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/6742300285730816
New failing tests: fast/text/floating-negative-text-indent-breakable.html
Build Bot
Comment 16
2015-02-01 09:15:32 PST
Created
attachment 245830
[details]
Archive of layout-test-results from ews101 for mac-mavericks The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-mavericks Platform: Mac OS X 10.9.5
Ahmad Saleem
Comment 17
2023-10-26 16:20:06 PDT
Created
attachment 468363
[details]
Safari vs Other Browsers Using 'better reduction', this is still reproducible as can be seen from attached screenshot.
Ahmad Saleem
Comment 18
2024-03-16 22:27:51 PDT
@Alan - it seems to be fixed on WebKit ToT (
276246@main
) while reproducible on STP90. Recent Progressions with intrinsic width work?
zalan
Comment 19
2024-03-17 05:44:25 PDT
(In reply to Ahmad Saleem from
comment #18
)
> @Alan - it seems to be fixed on WebKit ToT (
276246@main
) while reproducible > on STP90. > > Recent Progressions with intrinsic width work?
Good catch! This is exactly what
276246@main
would address.
zalan
Comment 20
2024-03-17 05:47:26 PDT
forward duping to
bug 271113
*** This bug has been marked as a duplicate of
bug 271113
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug