Closed
Bug 243266
Opened 20 years ago
Closed 17 years ago
insertBefore of WBR does not cause reflow
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: taralx, Unassigned)
References
()
Details
(Keywords: testcase)
Attachments
(2 files, 1 obsolete file)
1.05 KB,
text/html
|
Details | |
2.54 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 The URL is a bookmarklet that breaks up long links and such to avoid over-stretching the page. It does so by adding WBR tags to the link text. However this does not trigger a reflow. Modifying the bookmarklet to add BR tags instead DOES trigger a reflow. If the WBR tags are present at initial render time, it renders correctly. Use Reproducible: Always Steps to Reproduce: 1. Go to http://www.yabbse.org/community/index.php?thread=27432 2. Execute bookmarklet. Actual Results: Nothing. Expected Results: Reflow should wrap the link text.
Created a testcase. After clicking the button, the third table should look like the second.
Comment 2•20 years ago
|
||
The previous testcase had two elements with id "big", so the <wbr> was being added in the wrong place. I also made the testcase work in IE (added a missing quote) and added a button that forces a relayuot.
Attachment #148315 -
Attachment is obsolete: true
Updated•20 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 3•19 years ago
|
||
This should work: javascript:(function(){var D=document; F(D.body); function F(n){var u,r,c,x; if(n.nodeType==3){ u=n.data.search(/\S{45}/); if(u>=0) { r=n.splitText(u+45); n.parentNode.insertBefore(D.createElement(%22WBR%22),r); } }else if(n.tagName!=%22STYLE%22 && n.tagName!=%22SCRIPT%22){for (c=0;x=n.childNodes[c];++c){F(x);}} } })(); document.body.parentNode.insertBefore(document.body, document.body); void 0; Credit to Jim Roberts a.k.a. _Jim_ from MozillaZine Forums.
Comment 4•17 years ago
|
||
Comment 5•17 years ago
|
||
The reflow branch landing fixed this. Test added to reftest suite.
Status: NEW → RESOLVED
Closed: 17 years ago
Depends on: reflow-refactor
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•