Bug 20442 - REGRESSION (r29039): Scrollbar clipped passed visible region with fckeditor
Summary: REGRESSION (r29039): Scrollbar clipped passed visible region with fckeditor
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P1 Normal
Assignee: Nobody
URL: http://www.fckeditor.net/demo
Keywords: NeedsReduction, Regression
Depends on:
Blocks: 9915
  Show dependency treegraph
Reported: 2008-08-18 17:56 PDT by Alexander Mohr
Modified: 2008-08-22 00:12 PDT (History)
3 users (show)

See Also:

Outer Frame (773 bytes, text/html)
2008-08-20 18:05 PDT, Alexander Mohr
no flags Details
Middle Frame (379 bytes, text/html)
2008-08-20 18:06 PDT, Alexander Mohr
no flags Details
Inner Frame (241 bytes, text/html)
2008-08-20 18:06 PDT, Alexander Mohr
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Mohr 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.
Comment 1 Alexander Mohr 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 :(
Comment 2 David Kilzer (:ddkilzer) 2008-08-19 12:51:18 PDT
Confirmed.  A reduction of the HTML involved would be very useful.
Comment 3 Alexander Mohr 2008-08-19 16:23:26 PDT
ok, after much build pain I found the change that causes this bug: 29039
Comment 4 David Kilzer (:ddkilzer) 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.
Comment 5 Alexander Mohr 2008-08-20 18:05:38 PDT
Created attachment 22913 [details]
Outer Frame
Comment 6 Alexander Mohr 2008-08-20 18:06:12 PDT
Created attachment 22914 [details]
Middle Frame
Comment 7 Alexander Mohr 2008-08-20 18:06:25 PDT
Created attachment 22915 [details]
Inner Frame
Comment 8 Alexander Mohr 2008-08-20 18:08:30 PDT
Comment on attachment 22913 [details]
Outer Frame

><HTML style="border: thin solid blue; margin: 5px;"><HEAD>
>	function setHeight(str)
>	{
>		var iframe = document.getElementById('FCKeditor1___Frame');
>		var iframeDoc = iframe.contentDocument;
>		var iframeElement = iframeDoc.getElementById('foo');
>		iframeElement.style.height=str;
>	}
><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;">
>    <IFRAME scrolling="no" style="border: thin solid blue; margin: 5px; width: 100%; height: 200px;" src="attachment.cgi?id=22914" id="FCKeditor1___Frame">
Comment 9 Alexander Mohr 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.
Comment 10 webkit 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:


But it will work well in this other sample instead:


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