Closed Bug 91491 Opened 23 years ago Closed 21 years ago

layout does not refresh correctly after table caption insert

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla1.3beta

People

(Reporter: sujay, Assigned: karnaze)

References

Details

(Whiteboard: PATCH)

Attachments

(1 file, 1 obsolete file)

using 7/18 branch build on windows

1) launch netscape
2) launch composer
3) insert default table 2 x 2
4) bring up table props
5) select Caption = Above Table
6) click ok on table props panel
7) now start typing in the first cell of the table

see the first row get glitched up.
layout does not refresh correctly after inserting caption element
and typing in table
Depends on: 98535
In Windows NT after you select Table caption as 'Above table', the actual table
disappears. If you click on preview table it will also show you a blank screen,
but in the HTML tab it has values as listed:



<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#cc33cc" bgcolor="#ffffff" link="#0000ff" alink="#000088"
vlink="#ff0000">
<table cellpadding="2" cellspacing="2" border="1" width="50%">
  <caption><br>
  </caption><tbody>
    <tr>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
    </tr>
    <tr>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
    </tr>
    <tr>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
    </tr>
    <tr>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
    </tr>
    <tr>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
    </tr>
    <tr>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
    </tr>
    <tr>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
    </tr>
    <tr>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
    </tr>
    <tr>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
    </tr>
    <tr>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
      <td valign="Top"><br>
      </td>
    </tr>
  </tbody>
</table>
<br>
</body>
</html>


As you can see there is something on the document, but it does not show up on
the editor or on the preview page. If you choose 'edit/select all' on the page
first, then do table properties and change the caption to above table it makes
the actual table disappear in editor and preview.

Build ID
20010924
I think various control does not get redraw.
I have seem area got clear in
1. News Group Subscription
2. Add row or page up/down in mail composer
3. Mail Subject List
4. Mail Body...
various places..since around build at end of September.
Target Milestone: --- → mozilla1.0.1
This seems pretty easy for users to stumble across.  If this isn't going to get 
fixed for mozilla 1.0, should we disable the caption insertion?  Would this hide 
the problem?

Syd--what do you think?  Should this be EDITORBASE?
Just wanted to note that I saw this problem on OpenVMS, on 20011205 build.
The table disappears, but there is code if I click on the HTML tab.
Moving Mozilla 1.01 bugs to 'future' milestone with priority P1

I will be pulling bugs from 'future' milestones when scheduling later work.
Priority: -- → P1
Target Milestone: mozilla1.0.1 → Future
removing myself from the cc list
Editor throws assertions like:

An error occurred updating the cmd_ul command:
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [n
sICommandParams.getBooleanValue]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  lo
cation: "JS frame :: chrome://editor/content/ComposerCommands.js :: goUpdateComm
andState :: line 410"  data: no]
###!!! ASSERTION: Parser and editor disagree on blockness: caption: '*aIsBlock',
 file c:/moz_sour/mozilla/mozilla/editor/libeditor/html/nsHTMLEditor.cpp, line 5
75

Reassigning to cmanske, I dont believe that is layout bug but a editor issue.
Furthermore it is very unlikely that Marc will fix this bug.
Assignee: attinasi → cmanske
Bernd Mielke--I'm not sure when your build is from (referring to assertions in
comment 7).  Regardless, the assertions are unrelated to this particular bug. 
Those should be covered in other bugs.  

This isn't really an editor issue but a layout issue; the table doesn't render
correctly after being modified.  Unless you have a JS example that shows that it
works in the browser, I think this bug should stay on Layout's plate.

--> Layout
Assignee: cmanske → attinasi
Component: Editor: Core → Layout
Keywords: nsbeta1
QA Contact: sujay → petersen
QA Contact: petersen → praveenqa
nsbeta1-.
Keywords: nsbeta1nsbeta1-
The only glitch I'm seeing when typing into the 1st cell is that the border
between it and the adjacent cell on the same row is not fully drawn. Are there
other problems?
Assignee: attinasi → karnaze
Status: NEW → ASSIGNED
Priority: P1 → P3
Target Milestone: Future → mozilla1.3beta
Whiteboard: PATCH
Reminder to check to see if the patch fixes bug 57513.
Blocks: 57513
Comment on attachment 104690 [details] [diff] [review]
patch to fix the bug (painting problem)

r=bernd
Attachment #104690 - Flags: review+
Comment on attachment 104690 [details] [diff] [review]
patch to fix the bug (painting problem)

karnaze and I talked offline regarding the fact that this could've been fixed
by simply passing in a rect with it's (x,y) value set to (0,0) which was the
same size as mRect to this invalidate call in ReflowTable():

-  if (!mRect.IsEmpty()) {
-    Invalidate(aPresContext, mRect);
-  }


My concern with the proposed patch was whether or not moving the invalidate
from ReflowTable() to Reflow() could possibly miss damaging something since
ReflowTable() could be called twice with Reflow(). Also, what happens if the
table shrinks? What invalidates the old areas the table used to occupy?
Attachment #104690 - Attachment is obsolete: true
Attachment #106723 - Flags: superreview?(kin)
Attachment #106723 - Flags: review+
I carried over bernd's r= from the previous patch.
Comment on attachment 106723 [details] [diff] [review]
revised patch addressing kin's comments

sr=kin@netscape.com
Attachment #106723 - Flags: superreview?(kin) → superreview+
checked into trunk.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
*** Bug 181612 has been marked as a duplicate of this bug. ***
*** Bug 148608 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.