Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#10370 closed defect (fixed)

wxHTML redering bug with nested tables

Reported by: belgabor Owned by:
Priority: normal Milestone: 2.8.11
Component: wxHtml Version: oldstable-latest
Keywords: wxHtml, table Cc: laurent.humbertclaude@…
Blocked By: Blocking:
Patch: yes

Description

After tables nested within a table cell, wxHTML renders content after the outer table within the last table cell.
(Easier seen than described, see attached somewhat minimal example)

Checked on current 2.8 branch and older (mid Dec) trunk.

Attachments (2)

nested_table_render_bug.html download (271 bytes) - added by belgabor 12 years ago.
Minimal example html
nestedTable.patch download (882 bytes) - added by chowette 11 years ago.
fix for trunk; should be backportable to 2.8.x

Download all attachments as: .zip

Change History (9)

Changed 12 years ago by belgabor

Minimal example html

comment:1 Changed 12 years ago by belgabor

I forgot to say, the issue can be seen with the html test sample.

comment:2 Changed 11 years ago by chowette

  • Milestone set to 2.8.9

I still see this in both trunk and lastest 2.8
The html sample trigger the bug, open the table test page.

comment:3 Changed 11 years ago by chowette

  • Cc laurent.humbertclaude@… added
  • Milestone changed from 2.8.9 to 2.8.11
  • Status changed from new to confirmed

Changed 11 years ago by chowette

fix for trunk; should be backportable to 2.8.x

comment:4 Changed 11 years ago by chowette

  • Patch set

The bug was introduced by r56589.

There is only one tag handler of each type, so m_enclosingContainer is overwritten by nested table. This lead to the restoration of the wrong container. the fix simply use a stack allocated variable to handle push/pop needed by nesting.

The attached patch is made against trunk, but should by applied to 2.8.x also.

comment:5 Changed 11 years ago by VS

  • Resolution set to fixed
  • Status changed from confirmed to closed

(In [59687]) wxHTML tables handler didn't properly restore m_enclosingContainer state (fixes #10370)

comment:6 Changed 11 years ago by VS

(In [59688]) wxHTML tables handler didn't properly restore m_enclosingContainer state (fixes #10370)

comment:7 Changed 11 years ago by vaclavslavik

Fixed a bit differently, thanks for identifying the bug!

Note: See TracTickets for help on using tickets.