Summary: | [test case] border collapse doesn't work in table (regression) | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Stephan Kulow <coolo> |
Component: | khtml renderer | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | pavel.simerda |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | tables/bug43854-2.html |
Description
Stephan Kulow
2005-06-24 11:32:53 UTC
Created attachment 11567 [details] tables/bug43854-2.html *** Bug 115356 has been marked as a duplicate of this bug. *** SVN commit 595538 by carewolf: Table-sections do not have their own border in collapsed-border model. BUG: 108047 CCBUG: 115356 M +5 -0 render_table.h --- branches/KDE/3.5/kdelibs/khtml/rendering/render_table.h #595537:595538 @@ -248,6 +248,11 @@ virtual int leftmostPosition(bool includeOverflowInterior, bool includeSelf) const; virtual int highestPosition(bool includeOverflowInterior, bool includeSelf) const; + int borderLeft() const { return table()->collapseBorders() ? 0 : RenderBox::borderLeft(); } + int borderRight() const { return table()->collapseBorders() ? 0 : RenderBox::borderRight(); } + int borderTop() const { return table()->collapseBorders() ? 0 : RenderBox::borderTop(); } + int borderBottom() const { return table()->collapseBorders() ? 0 : RenderBox::borderBottom(); } + virtual void paint( PaintInfo& i, int tx, int ty); int numRows() const { return grid.size(); } Actually my patch only fixed bug 115356 which turns out to be a different bug. This bug still applies and the test-case still has larger than 1px borders for some reason. SVN commit 600141 by carewolf: Make sure we call determineParseType when CDATA fields like STYLE contains unclosed comments. BUG: 108047 M +22 -16 khtml_part.cpp --- branches/KDE/3.5/kdelibs/khtml/khtml_part.cpp #600140:600141 @@ -1878,7 +1878,7 @@ d->m_openableSuppressedPopups = 0; for ( QValueListIterator<QGuardedPtr<KHTMLPart> > i = d->m_suppressedPopupOriginParts.begin(); i != d->m_suppressedPopupOriginParts.end(); ++i ) { - + if (KHTMLPart* part = *i) { KJS::Window *w = KJS::Window::retrieveWindow( part ); if (w) @@ -1991,26 +1991,32 @@ void KHTMLPart::write( const QString &str ) { - if ( str.isNull() ) - return; + if ( str.isNull() ) + return; - if(d->m_bFirstData) { - // determine the parse mode - d->m_doc->setParseMode( DocumentImpl::Strict ); - d->m_bFirstData = false; - } - khtml::Tokenizer* t = d->m_doc->tokenizer(); - if(t) - t->write( str, true ); + if(d->m_bFirstData) { + // determine the parse mode + d->m_doc->setParseMode( DocumentImpl::Strict ); + d->m_bFirstData = false; + } + khtml::Tokenizer* t = d->m_doc->tokenizer(); + if(t) + t->write( str, true ); } void KHTMLPart::end() { - // make sure nothing's left in there... - if(d->m_decoder) - write(d->m_decoder->flush()); - if (d->m_doc) + if (d->m_doc) { + if (d->m_decoder) { + QString decoded = d->m_decoder->flush(); + if (d->m_bFirstData) { + d->m_bFirstData = false; + d->m_doc->determineParseMode(decoded); + } + write(decoded); + } d->m_doc->finishParsing(); + } } bool KHTMLPart::doOpenStream( const QString& mimeType ) @@ -4316,7 +4322,7 @@ { if ( processObjectRequest(*it, KURL("about:blank"), QString("text/html") ) ) { KHTMLPart* p = static_cast<KHTMLPart*>(static_cast<KParts::ReadOnlyPart *>((*it)->m_part)); - + // See if we want to replace content with javascript: output.. QVariant res = p->executeScript( DOM::Node(), KURL::decode_string( url.right( url.length() - 11) ) ); if ( res.type() == QVariant::String ) { |