Bug 20442

Summary: REGRESSION (r29039): Scrollbar clipped passed visible region with fckeditor
Product: WebKit Reporter: Alexander Mohr <amohr>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: chrisb, ddkilzer, webkit
Priority: P1 Keywords: NeedsReduction, Regression
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: http://www.fckeditor.net/demo
Bug Depends on:    
Bug Blocks: 9915    
Attachments:
Description Flags
Outer Frame
none
Middle Frame
none
Inner Frame none

Alexander Mohr
Reported 2008-08-18 17:56:34 PDT
If you go to the editor area you'll first notice that the bottom line is clipped. Next, if you hit return a few times with the cursor in the editable area you'll note that the scrollbar pops up clipped. This worked correctly in Safari 3.0.4 and broke starting with Safari 3.1.
Attachments
Outer Frame (773 bytes, text/html)
2008-08-20 18:05 PDT, Alexander Mohr
no flags
Middle Frame (379 bytes, text/html)
2008-08-20 18:06 PDT, Alexander Mohr
no flags
Inner Frame (241 bytes, text/html)
2008-08-20 18:06 PDT, Alexander Mohr
no flags
Alexander Mohr
Comment 1 2008-08-18 20:53:31 PDT
I've narrowed it down to happening somewhere between builds 28899 and 29350, but I'm blocked for narrowing it down further due to bug# 16804 :(
David Kilzer (:ddkilzer)
Comment 2 2008-08-19 12:51:18 PDT
Confirmed. A reduction of the HTML involved would be very useful.
Alexander Mohr
Comment 3 2008-08-19 16:23:26 PDT
ok, after much build pain I found the change that causes this bug: 29039
David Kilzer (:ddkilzer)
Comment 4 2008-08-19 17:15:05 PDT
(In reply to comment #3) > ok, after much build pain I found the change that causes this bug: 29039 This was a fix for Bug 15359.
Alexander Mohr
Comment 5 2008-08-20 18:05:38 PDT
Created attachment 22913 [details] Outer Frame
Alexander Mohr
Comment 6 2008-08-20 18:06:12 PDT
Created attachment 22914 [details] Middle Frame
Alexander Mohr
Comment 7 2008-08-20 18:06:25 PDT
Created attachment 22915 [details] Inner Frame
Alexander Mohr
Comment 8 2008-08-20 18:08:30 PDT
Comment on attachment 22913 [details] Outer Frame ><HTML style="border: thin solid blue; margin: 5px;"><HEAD> > ><SCRIPT> > function setHeight(str) > { > var iframe = document.getElementById('FCKeditor1___Frame'); > var iframeDoc = iframe.contentDocument; > var iframeElement = iframeDoc.getElementById('foo'); > iframeElement.style.height=str; > } ></SCRIPT> ></HEAD><BODY> ><BUTTON onmousedown="javascript:setHeight('100%')" type="button">100% height</BUTTON> ><BUTTON onmousedown="javascript:setHeight('75px')" type="button">75 height</BUTTON> ><TABLE width="100%" style="margin: 0pt;"> ><TBODY> ><TR><TD> ><DIV> > <IFRAME scrolling="no" style="border: thin solid blue; margin: 5px; width: 100%; height: 200px;" src="attachment.cgi?id=22914" id="FCKeditor1___Frame"> >&lt;/div&gt; >&lt;/td&gt;&lt;/tr&gt; >&lt;/tbody&gt; >&lt;/table&gt; >&lt;/body&gt; >&lt;/html&gt;</IFRAME></DIV></TD></TR></TBODY></TABLE></BODY></HTML>
Alexander Mohr
Comment 9 2008-08-20 18:42:10 PDT
(In reply to comment #8) > (From update of attachment 22913 [details] [edit]) my inline html editing skills on this site seem to be lacking ;) In any case, I've attached a testcase which I believe reproduces the source of the problem. I've structure the tree test files to have a separate color for each file. Furthermore, if the document has an iframe it gets another border with the same color. You'll note when opening the outer html, that the inner html's document's height is more that what is needed for the document (instead, set to it's intrinsic height) when the owner iframe was set to 100% height. It goes like this: Outer HTML->IFrame (200px height)->TR/TD(74px)+TR/TD/IFrame (100% height) I believe the expectation is that the IFrame would get sized to the remainder (200-borders/margins-74px) and not the intrinsic height. If you compare the behavior with firefox it seems firefox does not set the inner html size to it's container's iframe size, instead it gets set to the content size.
webkit
Comment 10 2008-08-22 00:07:26 PDT
We have also noted this issue recently. The strange fact is that it happens only if the editor has a reduced size (default btw). For example, you will reproduce the problem here: http://www.fckeditor.net/nightly/fckeditor/_samples/html/sample02.html But it will work well in this other sample instead: http://www.fckeditor.net/nightly/fckeditor/_samples/html/sample01.html Looking at the DOM with the Web Inspector, the only differences between sample01 and sample02, are the "width" attribute and style values for the outer iframe that holds the editor. The first is set to 300/300px, while we have 200/200px at the other. All the rest, including the inner tables and iframes have the same sizes (mostly 100% height in the inner stuff). It sounds like WebKit is forcing the inner iframe having a minimum height of exactly 150px (the computed style for the inner iframe in the Web Inspector).
Note You need to log in before you can comment on or make changes to this bug.