Summary: | dir=auto causes spaces to not get collapsed | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Derk-Jan Hartman <hartman.wiki> | ||||||||||
Component: | Layout and Rendering | Assignee: | Myles C. Maxfield <mmaxfield> | ||||||||||
Status: | RESOLVED DUPLICATE | ||||||||||||
Severity: | Normal | CC: | aharon, he7d3r, mmaxfield, rniwa, webkit-bug-importer | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | Mac (Intel) | ||||||||||||
OS: | OS X 10.9 | ||||||||||||
URL: | https://en.wikipedia.org/w/index.php?title=Wikipedia_talk%3ARequests_for_adminship&action=history&offset=20131111000000&tagfilter= | ||||||||||||
Attachments: |
|
Description
Derk-Jan Hartman
2013-11-11 06:46:25 PST
Created attachment 216565 [details]
small test case
Oh and using: Version 7.0 (9537.71) Created attachment 216566 [details]
Screenshot
This appears to be the same as https://code.google.com/p/chromium/issues/detail?id=323270, which has been fixed there. Can someone import the fix if this really is already fixed in chromium ? Please also see https://code.google.com/p/chromium/issues/detail?id=330974 (now fixed there). Still not fixed in Safari 7.0.2 Mac: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.74.9 (KHTML, like Gecko) Version/7.0.2 Safari/537.74.9 Is this a duplicate of bug 109624? Can someone please import the fix? Still a problem in Safari 9 Seed 1.. So sad.... Created attachment 255958 [details]
Reduction
Created attachment 255959 [details]
Reduction
Not related to simple line layout The layout box for the "a b" is getting the correct width, but the bidi run still includes the entire "a b" string, causing our paint code to naively draw in the collapsed spaces We mark <span dir="auto"> as an isolate Looks like our midpoint logic in RenderBlockFlow::appendRunsForObject() is failing, possibly due to the isolate. (Midpoints are how we perform space collapsing) Wow, yeah, our midpoint handling is completely busted with regard to isolate. In particular, RenderBlockFlow::appendRunsForObject() assumes that we are iterating in the order of midpoints (aka in logical order, because the midpoints are inserted by our line breaking logic, which is (correctly) insensitive to bidi). However, constructBidiRunsForSegment() in RenderBlockLineLayout.cpp doesn't iterate in logical order, which is acceptable because of the definition of "isolate" (namely, that isolated elements can be processed out-of-band because they don't require any context) Overall: our line breaking logic builds up a data structure of midpoints in logical order, and when we process a run of text inside constructBidiRunsForSegment(), we keep a cursor into that data structure and expect it to progress at the same rate that our bidi text processing progresses. However, our bidi text processing doesn't operate in logical order, so when the processing consults the data structure, it's looking in the wrong place inside it. Fixing this is no simple matter. After talking with Zalan, we came up with a pretty simple solution for this. The bidi processing is organized into passes; we can just reset the midpoint cursor for each pass. *** This bug has been marked as a duplicate of bug 109624 *** This was marked as a duplicate, but this problem as presented in the reducde testcase still exists in both Version 9.0.3 (11601.4.4) and in nightly builds. My apologies, Spotlight failed me in opening WebKit (picked the website, instead of the app) and I hadn't notice therefore I was not testing with the nightly. Retested, and it is fixed in the nightlies afterall (but not in 9.0.x). *** This bug has been marked as a duplicate of bug 109624 *** |