diff options
Diffstat (limited to 'tdehtml/rendering')
30 files changed, 191 insertions, 191 deletions
diff --git a/tdehtml/rendering/bidi.cpp b/tdehtml/rendering/bidi.cpp index a79ac9854..7916a9c4f 100644 --- a/tdehtml/rendering/bidi.cpp +++ b/tdehtml/rendering/bidi.cpp @@ -618,7 +618,7 @@ InlineFlowBox* RenderBlock::createLineBoxes(RenderObject* obj) { // See if we have an unconstructed line box for this object that is also // the last item on the line. - KHTMLAssert(obj->isInlineFlow() || obj == this); + TDEHTMLAssert(obj->isInlineFlow() || obj == this); RenderFlow* flow = static_cast<RenderFlow*>(obj); // Get the last box we made for this render object. @@ -633,7 +633,7 @@ InlineFlowBox* RenderBlock::createLineBoxes(RenderObject* obj) // We need to make a new box for this render object. Once // made, we need to place it at the end of the current line. InlineBox* newBox = obj->createInlineBox(false, obj == this); - KHTMLAssert(newBox->isInlineFlowBox()); + TDEHTMLAssert(newBox->isInlineFlowBox()); box = static_cast<InlineFlowBox*>(newBox); box->setFirstLineStyleBit(m_firstLine); @@ -673,7 +673,7 @@ InlineFlowBox* RenderBlock::constructLine(const BidiIterator &/*start*/, const B // We should have a root inline box. It should be unconstructed and // be the last continuation of our line list. - KHTMLAssert(lastLineBox() && !lastLineBox()->isConstructed()); + TDEHTMLAssert(lastLineBox() && !lastLineBox()->isConstructed()); // Set bits on our inline flow boxes that indicate which sides should // paint borders/margins/padding. This knowledge will ultimately be used when @@ -719,7 +719,7 @@ void RenderBlock::computeHorizontalPositionsForLine(InlineFlowBox* lineBox, Bidi int availableWidth = lineWidth(m_height); switch(style()->textAlign()) { case LEFT: - case KHTML_LEFT: + case TDEHTML_LEFT: numSpaces = 0; break; case JUSTIFY: @@ -732,12 +732,12 @@ void RenderBlock::computeHorizontalPositionsForLine(InlineFlowBox* lineBox, Bidi if (bidi.context->basicDir == TQChar::DirL) break; case RIGHT: - case KHTML_RIGHT: + case TDEHTML_RIGHT: x += availableWidth - totWidth; numSpaces = 0; break; case CENTER: - case KHTML_CENTER: + case TDEHTML_CENTER: int xd = (availableWidth - totWidth)/2; x += xd >0 ? xd : 0; numSpaces = 0; @@ -756,7 +756,7 @@ void RenderBlock::computeHorizontalPositionsForLine(InlineFlowBox* lineBox, Bidi spaces++; } - KHTMLAssert(spaces <= numSpaces); + TDEHTMLAssert(spaces <= numSpaces); // Only justify text with white-space: normal. if (r->obj->style()->whiteSpace() == NORMAL) { @@ -1986,7 +1986,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi } } } else - KHTMLAssert( false ); + TDEHTMLAssert( false ); InlineMinMaxIterator savedIt = lastIt; lastIt = it; diff --git a/tdehtml/rendering/font.cpp b/tdehtml/rendering/font.cpp index 3ace5ddd1..b7632fc8d 100644 --- a/tdehtml/rendering/font.cpp +++ b/tdehtml/rendering/font.cpp @@ -417,7 +417,7 @@ bool Font::isFontScalable(TQFontDatabase& db, const TQFont& font) void Font::update( TQPaintDeviceMetrics* devMetrics ) const { - f.setFamily( fontDef.family.isEmpty() ? KHTMLFactory::defaultHTMLSettings()->stdFontName() : fontDef.family ); + f.setFamily( fontDef.family.isEmpty() ? TDEHTMLFactory::defaultHTMLSettings()->stdFontName() : fontDef.family ); f.setItalic( fontDef.italic ); f.setWeight( fontDef.weight ); diff --git a/tdehtml/rendering/font.h b/tdehtml/rendering/font.h index 81110e0d0..e34f54207 100644 --- a/tdehtml/rendering/font.h +++ b/tdehtml/rendering/font.h @@ -22,8 +22,8 @@ * */ -#ifndef KHTMLFONT_H -#define KHTMLFONT_H +#ifndef TDEHTMLFONT_H +#define TDEHTMLFONT_H #include <tqfont.h> #include <tqfontmetrics.h> diff --git a/tdehtml/rendering/render_applet.cpp b/tdehtml/rendering/render_applet.cpp index 1b65ca8de..d14a93553 100644 --- a/tdehtml/rendering/render_applet.cpp +++ b/tdehtml/rendering/render_applet.cpp @@ -48,9 +48,9 @@ RenderApplet::RenderApplet(HTMLElementImpl *applet, const TQMap<TQString, TQStri setInline(true); KJavaAppletContext *context = 0; - KHTMLView *_view = applet->getDocument()->view(); + TDEHTMLView *_view = applet->getDocument()->view(); if ( _view ) { - KHTMLPart *part = _view->part(); + TDEHTMLPart *part = _view->part(); context = part->createJavaContext(); } @@ -89,8 +89,8 @@ void RenderApplet::layout() { //kdDebug(6100) << "RenderApplet::layout" << endl; - KHTMLAssert( needsLayout() ); - KHTMLAssert( minMaxKnown() ); + TDEHTMLAssert( needsLayout() ); + TDEHTMLAssert( minMaxKnown() ); calcWidth(); calcHeight(); diff --git a/tdehtml/rendering/render_applet.h b/tdehtml/rendering/render_applet.h index 24907edaa..62d023728 100644 --- a/tdehtml/rendering/render_applet.h +++ b/tdehtml/rendering/render_applet.h @@ -28,7 +28,7 @@ #include <tqwidget.h> #include <tqmap.h> -class KHTMLView; +class TDEHTMLView; namespace DOM { class HTMLElementImpl; diff --git a/tdehtml/rendering/render_arena.cpp b/tdehtml/rendering/render_arena.cpp index 14c55ef89..d3fe1676e 100644 --- a/tdehtml/rendering/render_arena.cpp +++ b/tdehtml/rendering/render_arena.cpp @@ -43,7 +43,7 @@ using namespace tdehtml; namespace tdehtml { //#ifdef NDEBUG -#define KHTML_USE_ARENA_ALLOCATOR +#define TDEHTML_USE_ARENA_ALLOCATOR //#endif typedef struct { @@ -78,7 +78,7 @@ RenderArena::~RenderArena() void* RenderArena::allocate(size_t size) { -#ifndef KHTML_USE_ARENA_ALLOCATOR +#ifndef TDEHTML_USE_ARENA_ALLOCATOR // Use standard malloc so that memory debugging tools work. void *block = ::malloc(sizeof(RenderArenaDebugHeader) + size); RenderArenaDebugHeader *header = (RenderArenaDebugHeader *)block; @@ -89,10 +89,10 @@ void* RenderArena::allocate(size_t size) void* result = 0; // Ensure we have correct alignment for pointers. Important for Tru64 - size = KHTML_ROUNDUP(size, sizeof(void*)); + size = TDEHTML_ROUNDUP(size, sizeof(void*)); // Check recyclers first - if (size < KHTML_MAX_RECYCLED_SIZE) { + if (size < TDEHTML_MAX_RECYCLED_SIZE) { const int index = size >> 2; result = m_recyclers[index]; @@ -117,7 +117,7 @@ void* RenderArena::allocate(size_t size) void RenderArena::free(size_t size, void* ptr) { -#ifndef KHTML_USE_ARENA_ALLOCATOR +#ifndef TDEHTML_USE_ARENA_ALLOCATOR // Use standard free so that memory debugging tools work. assert(this); RenderArenaDebugHeader *header = (RenderArenaDebugHeader *)ptr - 1; @@ -131,10 +131,10 @@ void RenderArena::free(size_t size, void* ptr) #endif // Ensure we have correct alignment for pointers. Important for Tru64 - size = KHTML_ROUNDUP(size, sizeof(void*)); + size = TDEHTML_ROUNDUP(size, sizeof(void*)); // See if it's a size that we recycle - if (size < KHTML_MAX_RECYCLED_SIZE) { + if (size < TDEHTML_MAX_RECYCLED_SIZE) { const int index = size >> 2; void* currentTop = m_recyclers[index]; m_recyclers[index] = ptr; diff --git a/tdehtml/rendering/render_arena.h b/tdehtml/rendering/render_arena.h index 1beab6fed..a0b00ab81 100644 --- a/tdehtml/rendering/render_arena.h +++ b/tdehtml/rendering/render_arena.h @@ -43,8 +43,8 @@ namespace tdehtml { -#define KHTML_MAX_RECYCLED_SIZE 400 -#define KHTML_ROUNDUP(x,y) ((((x)+((y)-1))/(y))*(y)) +#define TDEHTML_MAX_RECYCLED_SIZE 400 +#define TDEHTML_ROUNDUP(x,y) ((((x)+((y)-1))/(y))*(y)) class RenderArena: public Shared<RenderArena> { public: @@ -61,7 +61,7 @@ private: // The recycler array is sparse with the indices being multiples of 4, // i.e., 0, 4, 8, 12, 16, 20, ... - void* m_recyclers[KHTML_MAX_RECYCLED_SIZE >> 2]; + void* m_recyclers[TDEHTML_MAX_RECYCLED_SIZE >> 2]; }; diff --git a/tdehtml/rendering/render_block.cpp b/tdehtml/rendering/render_block.cpp index 3c6c79543..82d99cf41 100644 --- a/tdehtml/rendering/render_block.cpp +++ b/tdehtml/rendering/render_block.cpp @@ -1,5 +1,5 @@ /* - * This file is part of the render object implementation for KHTML. + * This file is part of the render object implementation for TDEHTML. * * Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org) * (C) 1999-2003 Antti Koivisto (koivisto@kde.org) @@ -279,7 +279,7 @@ void RenderBlock::addChildToFlow(RenderObject* newChild, RenderObject* beforeChi // needed in cases of things like anonymous tables. if (beforeChild && beforeChild->parent() != this) { - KHTMLAssert(beforeChild->parent()); + TDEHTMLAssert(beforeChild->parent()); // In the special case where we are prepending a block-level element before // something contained inside an anonymous block, we can just prepend it before @@ -317,8 +317,8 @@ void RenderBlock::addChildToFlow(RenderObject* newChild, RenderObject* beforeChi if (beforeChild && beforeChild->parent() != this) { beforeChild = beforeChild->parent(); - KHTMLAssert(beforeChild->isAnonymousBlock()); - KHTMLAssert(beforeChild->parent() == this); + TDEHTMLAssert(beforeChild->isAnonymousBlock()); + TDEHTMLAssert(beforeChild->parent() == this); } } else if (!m_childrenInline && !newChild->isFloatingOrPositioned()) @@ -421,8 +421,8 @@ void RenderBlock::makeChildrenNonInline(RenderObject *insertionPoint) // means that we cannot coalesce inlines before |insertionPoint| with inlines following // |insertionPoint|, because the new child is going to be inserted in between the inlines, // splitting them. - KHTMLAssert(isReplacedBlock() || !isInline()); - KHTMLAssert(!insertionPoint || insertionPoint->parent() == this); + TDEHTMLAssert(isReplacedBlock() || !isInline()); + TDEHTMLAssert(!insertionPoint || insertionPoint->parent() == this); m_childrenInline = false; @@ -454,8 +454,8 @@ void RenderBlock::makeChildrenNonInline(RenderObject *insertionPoint) void RenderBlock::makePageBreakAvoidBlocks() { - KHTMLAssert(!childrenInline()); - KHTMLAssert(canvas()->pagedMode()); + TDEHTMLAssert(!childrenInline()); + TDEHTMLAssert(canvas()->pagedMode()); RenderObject *breakAfter = firstChild(); RenderObject *breakBefore = breakAfter ? breakAfter->nextSibling() : 0; @@ -620,8 +620,8 @@ void RenderBlock::layoutBlock(bool relayoutChildren) // kdDebug( 6040 ) << renderName() << " " << this << "::layoutBlock() start" << endl; // TQTime t; // t.start(); - KHTMLAssert( needsLayout() ); - KHTMLAssert( minMaxKnown() ); + TDEHTMLAssert( needsLayout() ); + TDEHTMLAssert( minMaxKnown() ); if (canvas()->pagedMode()) relayoutChildren = true; @@ -737,7 +737,7 @@ void RenderBlock::layoutBlock(bool relayoutChildren) // Check for an overhanging float first. // FIXME: This needs to look at the last flow, not the last child. if (lastChild() && lastChild()->hasOverhangingFloats() && !lastChild()->hasOverflowClip()) { - KHTMLAssert(lastChild()->isRenderBlock()); + TDEHTMLAssert(lastChild()->isRenderBlock()); m_height = lastChild()->yPos() + static_cast<RenderBlock*>(lastChild())->floatBottom(); m_height += borderBottom() + paddingBottom(); } @@ -950,7 +950,7 @@ void RenderBlock::insertCompactIfNeeded(RenderObject* child, CompactInfo& compac int compactYPos = child->yPos() + child->borderTop() + child->paddingTop() - compactChild->paddingTop() - compactChild->borderTop(); int adj = 0; - KHTMLAssert(child->isRenderBlock()); + TDEHTMLAssert(child->isRenderBlock()); InlineRunBox *b = static_cast<RenderBlock*>(child)->firstLineBox(); InlineRunBox *c = static_cast<RenderBlock*>(compactChild)->firstLineBox(); if (b && c) { @@ -1162,8 +1162,8 @@ void RenderBlock::clearFloatsIfNeeded(RenderObject* child, MarginInfo& marginInf bool RenderBlock::canClear(RenderObject *child, PageBreakLevel level) { - KHTMLAssert(child->parent() && child->parent() == this); - KHTMLAssert(canvas()->pagedMode()); + TDEHTMLAssert(child->parent() && child->parent() == this); + TDEHTMLAssert(canvas()->pagedMode()); // Positioned elements cannot be moved. Only normal flow and floating. if (child->isPositioned() || child->isRelPositioned()) return false; @@ -1190,8 +1190,8 @@ bool RenderBlock::canClear(RenderObject *child, PageBreakLevel level) void RenderBlock::clearPageBreak(RenderObject* child, int pageBottom) { - KHTMLAssert(child->parent() && child->parent() == this); - KHTMLAssert(canvas()->pagedMode()); + TDEHTMLAssert(child->parent() && child->parent() == this); + TDEHTMLAssert(canvas()->pagedMode()); if (child->yPos() >= pageBottom) return; @@ -1257,7 +1257,7 @@ void RenderBlock::determineHorizontalPosition(RenderObject* child) // to shift over as necessary to dodge any floats that might get in the way. if (child->flowAroundFloats()) { int leftOff = leftOffset(m_height); - if (style()->textAlign() != KHTML_CENTER && !child->style()->marginLeft().isVariable()) { + if (style()->textAlign() != TDEHTML_CENTER && !child->style()->marginLeft().isVariable()) { if (child->marginLeft() < 0) leftOff += child->marginLeft(); chPos = kMax(chPos, leftOff); // Let the float sit in the child's margin if it can fit. @@ -1281,7 +1281,7 @@ void RenderBlock::determineHorizontalPosition(RenderObject* child) int chPos = xPos - (child->width() + child->marginRight()); if (child->flowAroundFloats()) { int rightOff = rightOffset(m_height); - if (style()->textAlign() != KHTML_CENTER && !child->style()->marginRight().isVariable()) { + if (style()->textAlign() != TDEHTML_CENTER && !child->style()->marginRight().isVariable()) { if (child->marginRight() < 0) rightOff -= child->marginRight(); chPos = kMin(chPos, rightOff - child->width()); // Let the float sit in the child's margin if it can fit. @@ -1789,7 +1789,7 @@ void RenderBlock::insertFloatingObject(RenderObject *o) else { // We should never get here, as insertFloatingObject() should only ever be called with floating // objects. - KHTMLAssert(false); + TDEHTMLAssert(false); newObj = 0; // keep gcc's uninitialized variable warnings happy } @@ -2568,7 +2568,7 @@ bool RenderBlock::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty, void RenderBlock::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); #ifdef DEBUG_LAYOUT kdDebug( 6040 ) << renderName() << "(RenderBlock)::calcMinMaxWidth() this=" << this << endl; diff --git a/tdehtml/rendering/render_block.h b/tdehtml/rendering/render_block.h index 84fd15a0b..36d3f6cc4 100644 --- a/tdehtml/rendering/render_block.h +++ b/tdehtml/rendering/render_block.h @@ -1,5 +1,5 @@ /* - * This file is part of the render object implementation for KHTML. + * This file is part of the render object implementation for TDEHTML. * * Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org) * (C) 1999-2003 Antti Koivisto (koivisto@kde.org) diff --git a/tdehtml/rendering/render_box.cpp b/tdehtml/rendering/render_box.cpp index 4cf7080c7..d138d3ee2 100644 --- a/tdehtml/rendering/render_box.cpp +++ b/tdehtml/rendering/render_box.cpp @@ -119,7 +119,7 @@ static inline bool overflowAppliesTo(RenderObject* o) // css 2.1-11.1.1 // 1) overflow only applies to non-replaced block-level elements, table cells, and inline-block elements if (o->isRenderBlock() || o->isTableRow() || o->isTableSection()) - // 2) overflow on root applies to the viewport (cf. KHTMLView::layout) + // 2) overflow on root applies to the viewport (cf. TDEHTMLView::layout) if (!o->isRoot()) // 3) overflow on body may apply to the viewport... if (!o->isBody() @@ -995,7 +995,7 @@ void RenderBox::calcHorizontalMargins(const Length& ml, const Length& mr, int cw { if ( (ml.isVariable() && mr.isVariable() && m_width<cw) || (!ml.isVariable() && !mr.isVariable() && - containingBlock()->style()->textAlign() == KHTML_CENTER) ) + containingBlock()->style()->textAlign() == TDEHTML_CENTER) ) { m_marginLeft = (cw - m_width)/2; if (m_marginLeft<0) m_marginLeft=0; @@ -1003,14 +1003,14 @@ void RenderBox::calcHorizontalMargins(const Length& ml, const Length& mr, int cw } else if ( (mr.isVariable() && m_width<cw) || (!ml.isVariable() && containingBlock()->style()->direction() == RTL && - containingBlock()->style()->textAlign() == KHTML_LEFT)) + containingBlock()->style()->textAlign() == TDEHTML_LEFT)) { m_marginLeft = ml.width(cw); m_marginRight = cw - m_width - m_marginLeft; } else if ( (ml.isVariable() && m_width<cw) || (!mr.isVariable() && containingBlock()->style()->direction() == LTR && - containingBlock()->style()->textAlign() == KHTML_RIGHT)) + containingBlock()->style()->textAlign() == TDEHTML_RIGHT)) { m_marginRight = mr.width(cw); m_marginLeft = cw - m_width - m_marginRight; @@ -2295,15 +2295,15 @@ void RenderBox::caretPos(int /*offset*/, int flags, int &_x, int &_y, int &width // ### regard direction switch (s->textAlign()) { case LEFT: - case KHTML_LEFT: + case TDEHTML_LEFT: case TAAUTO: // ### find out what this does case JUSTIFY: break; case CENTER: - case KHTML_CENTER: + case TDEHTML_CENTER: _x += contentWidth() / 2; break; - case KHTML_RIGHT: + case TDEHTML_RIGHT: case RIGHT: _x += contentWidth(); break; diff --git a/tdehtml/rendering/render_canvas.cpp b/tdehtml/rendering/render_canvas.cpp index 53dc32162..a3dc548b2 100644 --- a/tdehtml/rendering/render_canvas.cpp +++ b/tdehtml/rendering/render_canvas.cpp @@ -36,7 +36,7 @@ using namespace tdehtml; //#define BOX_DEBUG //#define SPEED_DEBUG -RenderCanvas::RenderCanvas(DOM::NodeImpl* node, KHTMLView *view) +RenderCanvas::RenderCanvas(DOM::NodeImpl* node, TDEHTMLView *view) : RenderBlock(node) { // init RenderObject attributes @@ -103,7 +103,7 @@ void RenderCanvas::calcHeight() void RenderCanvas::calcWidth() { - // the width gets set by KHTMLView::print when printing to a printer. + // the width gets set by TDEHTMLView::print when printing to a printer. if(m_pagedMode || !m_view) { m_width = m_rootWidth; @@ -125,7 +125,7 @@ void RenderCanvas::calcWidth() void RenderCanvas::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); RenderBlock::calcMinMaxWidth(); @@ -271,7 +271,7 @@ bool RenderCanvas::needsFullRepaint() const void RenderCanvas::repaintViewRectangle(int x, int y, int w, int h, bool asap) { - KHTMLAssert( view() ); + TDEHTMLAssert( view() ); view()->scheduleRepaint( x, y, w, h, asap ); } diff --git a/tdehtml/rendering/render_canvas.h b/tdehtml/rendering/render_canvas.h index 8495b87bc..6c05a4945 100644 --- a/tdehtml/rendering/render_canvas.h +++ b/tdehtml/rendering/render_canvas.h @@ -25,7 +25,7 @@ #include "render_block.h" -class KHTMLView; +class TDEHTMLView; class TQScrollView; namespace tdehtml { @@ -42,7 +42,7 @@ enum CanvasMode { class RenderCanvas : public RenderBlock { public: - RenderCanvas(DOM::NodeImpl* node, KHTMLView *view); + RenderCanvas(DOM::NodeImpl* node, TDEHTMLView *view); ~RenderCanvas(); virtual const char *renderName() const { return "RenderCanvas"; } @@ -59,7 +59,7 @@ public: int docHeight() const; int docWidth() const; - KHTMLView *view() const { return m_view; } + TDEHTMLView *view() const { return m_view; } virtual void repaint(Priority p=NormalPriority); virtual void repaintRectangle(int x, int y, int w, int h, Priority p=NormalPriority, bool f=false); @@ -145,7 +145,7 @@ protected: virtual TQRect viewRect() const; - KHTMLView *m_view; + TDEHTMLView *m_view; RenderObject* m_selectionStart; RenderObject* m_selectionEnd; diff --git a/tdehtml/rendering/render_container.cpp b/tdehtml/rendering/render_container.cpp index b91bc91df..bf0cd37ec 100644 --- a/tdehtml/rendering/render_container.cpp +++ b/tdehtml/rendering/render_container.cpp @@ -127,7 +127,7 @@ void RenderContainer::addChild(RenderObject *newChild, RenderObject *beforeChild break; case NONE: // RenderHtml and some others can have display:none - // KHTMLAssert(false); + // TDEHTMLAssert(false); break; } } @@ -167,7 +167,7 @@ void RenderContainer::addChild(RenderObject *newChild, RenderObject *beforeChild RenderObject* RenderContainer::removeChildNode(RenderObject* oldChild) { - KHTMLAssert(oldChild->parent() == this); + TDEHTMLAssert(oldChild->parent() == this); // So that we'll get the appropriate dirty bit set (either that a normal flow child got yanked or // that a positioned child got yanked). We also repaint, so that the area exposed when the child @@ -465,7 +465,7 @@ void RenderContainer::updateReplacedContent() void RenderContainer::appendChildNode(RenderObject* newChild) { - KHTMLAssert(newChild->parent() == 0); + TDEHTMLAssert(newChild->parent() == 0); newChild->setParent(this); RenderObject* lChild = lastChild(); @@ -499,10 +499,10 @@ void RenderContainer::insertChildNode(RenderObject* child, RenderObject* beforeC return; } - KHTMLAssert(!child->parent()); + TDEHTMLAssert(!child->parent()); while ( beforeChild->parent() != this && beforeChild->parent()->isAnonymousBlock() ) beforeChild = beforeChild->parent(); - KHTMLAssert(beforeChild->parent() == this); + TDEHTMLAssert(beforeChild->parent() == this); if(beforeChild == firstChild()) setFirstChild(child); @@ -526,8 +526,8 @@ void RenderContainer::insertChildNode(RenderObject* child, RenderObject* beforeC void RenderContainer::layout() { - KHTMLAssert( needsLayout() ); - KHTMLAssert( minMaxKnown() ); + TDEHTMLAssert( needsLayout() ); + TDEHTMLAssert( minMaxKnown() ); const bool pagedMode = canvas()->pagedMode(); RenderObject *child = firstChild(); while( child ) { diff --git a/tdehtml/rendering/render_flow.cpp b/tdehtml/rendering/render_flow.cpp index 71456d0a8..272ceb2db 100644 --- a/tdehtml/rendering/render_flow.cpp +++ b/tdehtml/rendering/render_flow.cpp @@ -289,7 +289,7 @@ void RenderFlow::repaint(Priority prior) for (RenderObject* inlineFlow = this; inlineFlow && inlineFlow->isInlineFlow() && inlineFlow != cb; inlineFlow = inlineFlow->parent()) { if (inlineFlow->style() && inlineFlow->style()->position() == RELATIVE && inlineFlow->layer()) { - KHTMLAssert(inlineFlow->isBox()); + TDEHTMLAssert(inlineFlow->isBox()); static_cast<RenderBox*>(inlineFlow)->relativePositionOffset(left, top); } } diff --git a/tdehtml/rendering/render_form.cpp b/tdehtml/rendering/render_form.cpp index 2872a0e6c..5c8249b6b 100644 --- a/tdehtml/rendering/render_form.cpp +++ b/tdehtml/rendering/render_form.cpp @@ -83,8 +83,8 @@ void RenderFormElement::updateFromElement() void RenderFormElement::layout() { - KHTMLAssert( needsLayout() ); - KHTMLAssert( minMaxKnown() ); + TDEHTMLAssert( needsLayout() ); + TDEHTMLAssert( minMaxKnown() ); // minimum height m_height = 0; @@ -103,13 +103,13 @@ TQ_Alignment RenderFormElement::textAlignment() const { switch (style()->textAlign()) { case LEFT: - case KHTML_LEFT: + case TDEHTML_LEFT: return Qt::AlignLeft; case RIGHT: - case KHTML_RIGHT: + case TDEHTML_RIGHT: return Qt::AlignRight; case CENTER: - case KHTML_CENTER: + case TDEHTML_CENTER: return Qt::AlignHCenter; case JUSTIFY: // Just fall into the auto code for justify. @@ -152,7 +152,7 @@ RenderCheckBox::RenderCheckBox(HTMLInputElementImpl *element) void RenderCheckBox::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); TQCheckBox *cb = static_cast<TQCheckBox *>( m_widget ); TQSize s( cb->style().pixelMetric( TQStyle::PM_IndicatorWidth ), @@ -204,7 +204,7 @@ void RenderRadioButton::updateFromElement() void RenderRadioButton::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); TQRadioButton *rb = static_cast<TQRadioButton *>( m_widget ); TQSize s( rb->style().pixelMetric( TQStyle::PM_ExclusiveIndicatorWidth ), @@ -251,7 +251,7 @@ TQString RenderSubmitButton::rawText() void RenderSubmitButton::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); TQString raw = rawText(); TQPushButton* pb = static_cast<TQPushButton*>(m_widget); @@ -307,7 +307,7 @@ RenderResetButton::RenderResetButton(HTMLInputElementImpl *element) // ------------------------------------------------------------------------------- -LineEditWidget::LineEditWidget(DOM::HTMLInputElementImpl* input, KHTMLView* view, TQWidget* parent) +LineEditWidget::LineEditWidget(DOM::HTMLInputElementImpl* input, TDEHTMLView* view, TQWidget* parent) : KLineEdit(parent, "__tdehtml"), m_input(input), m_view(view), m_spell(0) { setMouseTracking(true); @@ -532,7 +532,7 @@ void RenderLineEdit::handleFocusOut() void RenderLineEdit::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); const TQFontMetrics &fm = style()->fontMetrics(); TQSize s; @@ -797,7 +797,7 @@ RenderFileButton::RenderFileButton(HTMLInputElementImpl *element) void RenderFileButton::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); const TQFontMetrics &fm = style()->fontMetrics(); int size = element()->size(); @@ -1032,7 +1032,7 @@ void RenderSelect::updateFromElement() static_cast<KComboBox*>(m_widget)->insertItem(text, listIndex); } else - KHTMLAssert(false); + TDEHTMLAssert(false); m_selectionChanged = true; } @@ -1058,7 +1058,7 @@ void RenderSelect::updateFromElement() void RenderSelect::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); if (m_optionsChanged) updateFromElement(); @@ -1074,8 +1074,8 @@ void RenderSelect::calcMinMaxWidth() void RenderSelect::layout( ) { - KHTMLAssert(needsLayout()); - KHTMLAssert(minMaxKnown()); + TDEHTMLAssert(needsLayout()); + TDEHTMLAssert(minMaxKnown()); // ### maintain selection properly between type/size changes, and work // out how to handle multiselect->singleselect (probably just select @@ -1137,7 +1137,7 @@ void RenderSelect::slotSelected(int index) // emitted by the combobox only { if ( m_ignoreSelectEvents ) return; - KHTMLAssert( !m_useListBox ); + TDEHTMLAssert( !m_useListBox ); TQMemArray<HTMLGenericFormElementImpl*> listItems = element()->listItems(); if(index >= 0 && index < int(listItems.size())) @@ -1561,7 +1561,7 @@ void TextAreaWidget::slotFind() if ( m_findDlg ) { KWin::activateWindow( m_findDlg->winId() ); } else { - m_findDlg = new KFindDialog(false, this, "KHTML Text Area Find Dialog"); + m_findDlg = new KFindDialog(false, this, "TDEHTML Text Area Find Dialog"); connect( m_findDlg, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotDoFind()) ); } m_findDlg->show(); @@ -1576,7 +1576,7 @@ void TextAreaWidget::slotReplace() if ( m_repDlg ) { KWin::activateWindow( m_repDlg->winId() ); } else { - m_repDlg = new KReplaceDialog(this, "KHTMLText Area Replace Dialog", 0, + m_repDlg = new KReplaceDialog(this, "TDEHTMLText Area Replace Dialog", 0, TQStringList(), TQStringList(), false); connect( m_repDlg, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotDoReplace()) ); } @@ -1614,7 +1614,7 @@ RenderTextArea::RenderTextArea(HTMLTextAreaElementImpl *element) TextAreaWidget *edit = new TextAreaWidget(element->wrap(), view()); setQWidget(edit); - const KHTMLSettings *settings = view()->part()->settings(); + const TDEHTMLSettings *settings = view()->part()->settings(); edit->setCheckSpellingEnabled( settings->autoSpellCheck() ); edit->setTabChangesFocus( ! settings->allowTabulation() ); @@ -1645,7 +1645,7 @@ void RenderTextArea::handleFocusOut() void RenderTextArea::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); TextAreaWidget* w = static_cast<TextAreaWidget*>(m_widget); const TQFontMetrics &m = style()->fontMetrics(); @@ -1680,7 +1680,7 @@ void RenderTextArea::setStyle(RenderStyle* _style) void RenderTextArea::layout() { - KHTMLAssert( needsLayout() ); + TDEHTMLAssert( needsLayout() ); RenderFormElement::layout(); diff --git a/tdehtml/rendering/render_form.h b/tdehtml/rendering/render_form.h index d1611c1e0..d4508e6bc 100644 --- a/tdehtml/rendering/render_form.h +++ b/tdehtml/rendering/render_form.h @@ -45,7 +45,7 @@ class QListboxItem; #include <kcombobox.h> #include "dom/dom_misc.h" -class KHTMLPartBrowserExtension; +class TDEHTMLPartBrowserExtension; class KSpell; class KFindDialog; class KReplaceDialog; @@ -256,7 +256,7 @@ class LineEditWidget : public KLineEdit Q_OBJECT public: LineEditWidget(DOM::HTMLInputElementImpl* input, - KHTMLView* view, TQWidget* parent); + TDEHTMLView* view, TQWidget* parent); ~LineEditWidget(); void highLightWord( unsigned int length, unsigned int pos ); @@ -280,7 +280,7 @@ private: EditHistory }; DOM::HTMLInputElementImpl* m_input; - KHTMLView* m_view; + TDEHTMLView* m_view; KSpell *m_spell; KAction *m_spellAction; }; diff --git a/tdehtml/rendering/render_frames.cpp b/tdehtml/rendering/render_frames.cpp index 03d55fbfd..66e2fda75 100644 --- a/tdehtml/rendering/render_frames.cpp +++ b/tdehtml/rendering/render_frames.cpp @@ -101,11 +101,11 @@ bool RenderFrameSet::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _t void RenderFrameSet::layout( ) { - KHTMLAssert( needsLayout() ); - KHTMLAssert( minMaxKnown() ); + TDEHTMLAssert( needsLayout() ); + TDEHTMLAssert( minMaxKnown() ); if ( !parent()->isFrameSet() ) { - KHTMLView* view = canvas()->view(); + TDEHTMLView* view = canvas()->view(); m_width = view ? view->visibleWidth() : 0; m_height = view ? view->visibleHeight() : 0; } @@ -545,7 +545,7 @@ bool RenderFrameSet::userResize( MouseEventImpl *evt ) setNeedsLayout(true); } - KHTMLView *view = canvas()->view(); + TDEHTMLView *view = canvas()->view(); if ((m_resizing || evt->id() == EventImpl::MOUSEUP_EVENT) && view) { TQPainter paint( view ); paint.setPen( Qt::gray ); @@ -635,7 +635,7 @@ void RenderPart::setWidget( TQWidget *widget ) setQWidget( widget ); widget->setFocusPolicy(TQ_WheelFocus); - if(widget->inherits("KHTMLView")) + if(widget->inherits("TDEHTMLView")) connect( widget, TQT_SIGNAL( cleared() ), this, TQT_SLOT( slotViewCleared() ) ); setNeedsLayoutAndMinMaxRecalc(); @@ -683,11 +683,11 @@ void RenderFrame::slotViewCleared() view->setFrameStyle(TQFrame::NoFrame); view->setVScrollBarMode(element()->scrolling ); view->setHScrollBarMode(element()->scrolling ); - if(view->inherits("KHTMLView")) { + if(view->inherits("TDEHTMLView")) { #ifdef DEBUG_LAYOUT - kdDebug(6031) << "frame is a KHTMLview!" << endl; + kdDebug(6031) << "frame is a TDEHTMLview!" << endl; #endif - KHTMLView *htmlView = static_cast<KHTMLView *>(view); + TDEHTMLView *htmlView = static_cast<TDEHTMLView *>(view); if(element()->marginWidth != -1) htmlView->setMarginWidth(element()->marginWidth); if(element()->marginHeight != -1) htmlView->setMarginHeight(element()->marginHeight); } @@ -706,7 +706,7 @@ RenderPartObject::RenderPartObject( DOM::HTMLElementImpl* element ) void RenderPartObject::updateWidget() { TQString url; - KHTMLPart *part = m_view->part(); + TDEHTMLPart *part = m_view->part(); setNeedsLayoutAndMinMaxRecalc(); @@ -754,8 +754,8 @@ void RenderPartObject::updateWidget() } } } - params.append( TQString::fromLatin1("__KHTML__PLUGINEMBED=\"YES\"") ); - params.append( TQString::fromLatin1("__KHTML__PLUGINBASEURL=\"%1\"").arg(element()->getDocument()->baseURL().url())); + params.append( TQString::fromLatin1("__TDEHTML__PLUGINEMBED=\"YES\"") ); + params.append( TQString::fromLatin1("__TDEHTML__PLUGINBASEURL=\"%1\"").arg(element()->getDocument()->baseURL().url())); HTMLEmbedElementImpl *embed = 0; TQString classId; @@ -775,8 +775,8 @@ void RenderPartObject::updateWidget() } classId = objbase->classId; - params.append( TQString::fromLatin1("__KHTML__CLASSID=\"%1\"").arg( classId ) ); - params.append( TQString::fromLatin1("__KHTML__CODEBASE=\"%1\"").arg( objbase->getAttribute(ATTR_CODEBASE).string() ) ); + params.append( TQString::fromLatin1("__TDEHTML__CLASSID=\"%1\"").arg( classId ) ); + params.append( TQString::fromLatin1("__TDEHTML__CODEBASE=\"%1\"").arg( objbase->getAttribute(ATTR_CODEBASE).string() ) ); if (!objbase->getAttribute(ATTR_WIDTH).isEmpty()) params.append( TQString::fromLatin1("WIDTH=\"%1\"").arg( objbase->getAttribute(ATTR_WIDTH).string() ) ); else if (embed && !embed->getAttribute(ATTR_WIDTH).isEmpty()) { @@ -857,7 +857,7 @@ void RenderPartObject::close() bool RenderPartObject::partLoadingErrorNotify( tdehtml::ChildFrame *childFrame, const KURL& url, const TQString& serviceType ) { - KHTMLPart *part = static_cast<KHTMLView *>(m_view)->part(); + TDEHTMLPart *part = static_cast<TDEHTMLView *>(m_view)->part(); kdDebug(6031) << "RenderPartObject::partLoadingErrorNotify serviceType=" << serviceType << endl; // Check if we just tried with e.g. nsplugin // and fallback to the activexhandler if there is a classid @@ -925,7 +925,7 @@ void RenderPartObject::slotPartLoadingErrorNotify() // prepare for the local eventloop in KMessageBox ref(); - KHTMLPart *part = static_cast<KHTMLView *>(m_view)->part(); + TDEHTMLPart *part = static_cast<TDEHTMLView *>(m_view)->part(); KParts::BrowserExtension *ext = part->browserExtension(); if( embed && !embed->pluginPage.isEmpty() && ext ) { // Prepare the mimetype to show in the question (comment if available, name as fallback) @@ -976,8 +976,8 @@ void RenderPartObject::slotPartLoadingErrorNotify() void RenderPartObject::layout( ) { - KHTMLAssert( needsLayout() ); - KHTMLAssert( minMaxKnown() ); + TDEHTMLAssert( needsLayout() ); + TDEHTMLAssert( minMaxKnown() ); calcWidth(); calcHeight(); @@ -1009,11 +1009,11 @@ void RenderPartObject::slotViewCleared() view->setFrameStyle(frameStyle); view->setVScrollBarMode(scroll ); view->setHScrollBarMode(scroll ); - if(view->inherits("KHTMLView")) { + if(view->inherits("TDEHTMLView")) { #ifdef DEBUG_LAYOUT - kdDebug(6031) << "frame is a KHTMLview!" << endl; + kdDebug(6031) << "frame is a TDEHTMLview!" << endl; #endif - KHTMLView *htmlView = static_cast<KHTMLView *>(view); + TDEHTMLView *htmlView = static_cast<TDEHTMLView *>(view); htmlView->setIgnoreWheelEvents( element()->id() == ID_IFRAME ); if(marginw != -1) htmlView->setMarginWidth(marginw); if(marginh != -1) htmlView->setMarginHeight(marginh); diff --git a/tdehtml/rendering/render_frames.h b/tdehtml/rendering/render_frames.h index 79171c747..49d1e8dc1 100644 --- a/tdehtml/rendering/render_frames.h +++ b/tdehtml/rendering/render_frames.h @@ -26,7 +26,7 @@ #include "rendering/render_replaced.h" #include "xml/dom_nodeimpl.h" #include "html/html_baseimpl.h" -class KHTMLView; +class TDEHTMLView; namespace DOM { @@ -102,7 +102,7 @@ public: virtual void setWidget( TQWidget *widget ); /** - * Called by KHTMLPart to notify the frame object that loading the + * Called by TDEHTMLPart to notify the frame object that loading the * part was not successfuly. (called either asyncroniously after a * after the servicetype of the given url (the one passed with requestObject) * has been determined or syncroniously from within requestObject) diff --git a/tdehtml/rendering/render_generated.cpp b/tdehtml/rendering/render_generated.cpp index 2b793e504..d8e7a1be1 100644 --- a/tdehtml/rendering/render_generated.cpp +++ b/tdehtml/rendering/render_generated.cpp @@ -38,7 +38,7 @@ RenderCounterBase::RenderCounterBase(DOM::NodeImpl* node) void RenderCounterBase::layout() { - KHTMLAssert( needsLayout() ); + TDEHTMLAssert( needsLayout() ); if ( !minMaxKnown() ) calcMinMaxWidth(); @@ -48,7 +48,7 @@ void RenderCounterBase::layout() void RenderCounterBase::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); generateContent(); diff --git a/tdehtml/rendering/render_image.cpp b/tdehtml/rendering/render_image.cpp index d382c9bd1..97c2641ba 100644 --- a/tdehtml/rendering/render_image.cpp +++ b/tdehtml/rendering/render_image.cpp @@ -64,7 +64,7 @@ RenderImage::RenderImage(NodeImpl *_element) m_selectionState = SelectionNone; berrorPic = false; - const KHTMLSettings *settings = _element->getDocument()->view()->part()->settings(); + const TDEHTMLSettings *settings = _element->getDocument()->view()->part()->settings(); bUnfinishedImageFrame = settings->unfinishedImageFrame(); setIntrinsicWidth( 0 ); @@ -378,8 +378,8 @@ void RenderImage::paint(PaintInfo& paintInfo, int _tx, int _ty) void RenderImage::layout() { - KHTMLAssert( needsLayout()); - KHTMLAssert( minMaxKnown() ); + TDEHTMLAssert( needsLayout()); + TDEHTMLAssert( minMaxKnown() ); short oldwidth = m_width; int oldheight = m_height; diff --git a/tdehtml/rendering/render_inline.cpp b/tdehtml/rendering/render_inline.cpp index 96841eb43..aee43a817 100644 --- a/tdehtml/rendering/render_inline.cpp +++ b/tdehtml/rendering/render_inline.cpp @@ -1,5 +1,5 @@ /* - * This file is part of the render object implementation for KHTML. + * This file is part of the render object implementation for TDEHTML. * * Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org) * (C) 1999-2003 Antti Koivisto (koivisto@kde.org) @@ -760,7 +760,7 @@ void RenderInline::paintOutlinePath(TQPainter *p, int tx, int ty, const TQPoint void RenderInline::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); #ifdef DEBUG_LAYOUT kdDebug( 6040 ) << renderName() << "(RenderInline)::calcMinMaxWidth() this=" << this << endl; diff --git a/tdehtml/rendering/render_inline.h b/tdehtml/rendering/render_inline.h index 97392999e..ab854543d 100644 --- a/tdehtml/rendering/render_inline.h +++ b/tdehtml/rendering/render_inline.h @@ -1,5 +1,5 @@ /* - * This file is part of the render object implementation for KHTML. + * This file is part of the render object implementation for TDEHTML. * * Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org) * (C) 1999-2003 Antti Koivisto (koivisto@kde.org) diff --git a/tdehtml/rendering/render_list.cpp b/tdehtml/rendering/render_list.cpp index 08ee1a88b..5af983a72 100644 --- a/tdehtml/rendering/render_list.cpp +++ b/tdehtml/rendering/render_list.cpp @@ -180,8 +180,8 @@ short RenderListItem::marginRight() const void RenderListItem::layout( ) { - KHTMLAssert( needsLayout() ); - KHTMLAssert( minMaxKnown() ); + TDEHTMLAssert( needsLayout() ); + TDEHTMLAssert( minMaxKnown() ); updateMarkerLocation(); RenderBlock::layout(); @@ -369,7 +369,7 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int _tx, int _ty) void RenderListMarker::layout() { - KHTMLAssert( needsLayout() ); + TDEHTMLAssert( needsLayout() ); if ( !minMaxKnown() ) calcMinMaxWidth(); @@ -392,7 +392,7 @@ void RenderListMarker::setPixmap( const TQPixmap &p, const TQRect& r, CachedImag void RenderListMarker::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); m_markerWidth = m_width = 0; @@ -541,7 +541,7 @@ void RenderListMarker::calcMinMaxWidth() case LNONE: break; default: - KHTMLAssert(false); + TDEHTMLAssert(false); } m_markerWidth = fm.width(m_item) + fm.width(TQString::fromLatin1(". ")); } diff --git a/tdehtml/rendering/render_object.cpp b/tdehtml/rendering/render_object.cpp index a3eb1565e..1d16057a2 100644 --- a/tdehtml/rendering/render_object.cpp +++ b/tdehtml/rendering/render_object.cpp @@ -256,12 +256,12 @@ bool RenderObject::isHTMLMarquee() const void RenderObject::addChild(RenderObject* , RenderObject *) { - KHTMLAssert(0); + TDEHTMLAssert(0); } RenderObject* RenderObject::removeChildNode(RenderObject* ) { - KHTMLAssert(0); + TDEHTMLAssert(0); return 0; } @@ -273,12 +273,12 @@ void RenderObject::removeChild(RenderObject *o ) void RenderObject::appendChildNode(RenderObject*) { - KHTMLAssert(0); + TDEHTMLAssert(0); } void RenderObject::insertChildNode(RenderObject*, RenderObject*) { - KHTMLAssert(0); + TDEHTMLAssert(0); } RenderObject *RenderObject::nextRenderer() const @@ -1369,7 +1369,7 @@ bool RenderObject::attemptDirectLayerTranslation() // When the difference between two successive styles is only 'Position' // we may attempt to save a layout by directly updating the object position. - KHTMLAssert( m_style->position() != STATIC ); + TDEHTMLAssert( m_style->position() != STATIC ); if (!layer()) return false; setInline(m_style->isDisplayInlineType()); @@ -1444,7 +1444,7 @@ void RenderObject::setOverhangingContents(bool p) if (p) { m_overhangingContents = true; - KHTMLAssert( cb != this || isCanvas()); + TDEHTMLAssert( cb != this || isCanvas()); if (cb && cb != this) cb->setOverhangingContents(); } @@ -1464,7 +1464,7 @@ void RenderObject::setOverhangingContents(bool p) else { m_overhangingContents = false; - KHTMLAssert( cb != this ); + TDEHTMLAssert( cb != this ); if (cb && cb != this) cb->setOverhangingContents(false); } @@ -1935,7 +1935,7 @@ void RenderObject::invalidateVerticalPositions() void RenderObject::recalcMinMaxWidths() { - KHTMLAssert( m_recalcMinMax ); + TDEHTMLAssert( m_recalcMinMax ); #ifdef DEBUG_LAYOUT kdDebug( 6040 ) << renderName() << " recalcMinMaxWidths() this=" << this <<endl; @@ -1974,7 +1974,7 @@ void RenderObject::recalcMinMaxWidths() void RenderObject::scheduleRelayout(RenderObject *clippedObj) { if (!isCanvas()) return; - KHTMLView *view = static_cast<RenderCanvas *>(this)->view(); + TDEHTMLView *view = static_cast<RenderCanvas *>(this)->view(); if ( view ) view->scheduleRelayout(clippedObj); } @@ -1986,7 +1986,7 @@ void RenderObject::removeLeftoverAnonymousBoxes() InlineBox* RenderObject::createInlineBox(bool /*makePlaceHolderBox*/, bool /*isRootLineBox*/) { - KHTMLAssert(false); + TDEHTMLAssert(false); return 0; } diff --git a/tdehtml/rendering/render_object.h b/tdehtml/rendering/render_object.h index 9dd064932..8d066201c 100644 --- a/tdehtml/rendering/render_object.h +++ b/tdehtml/rendering/render_object.h @@ -43,17 +43,17 @@ class TQPainter; class TQTextStream; class CSSStyle; -class KHTMLView; +class TDEHTMLView; #ifndef NDEBUG -#define KHTMLAssert( x ) if( !(x) ) { \ +#define TDEHTMLAssert( x ) if( !(x) ) { \ const RenderObject *o = this; while( o->parent() ) o = o->parent(); \ o->printTree(); \ tqDebug(" this object = %p, %s", (void*) this, kdBacktrace().latin1() ); \ assert( x ); \ } #else -#define KHTMLAssert( x ) +#define TDEHTMLAssert( x ) #endif /* diff --git a/tdehtml/rendering/render_replaced.cpp b/tdehtml/rendering/render_replaced.cpp index 42fce027e..5a96d06f0 100644 --- a/tdehtml/rendering/render_replaced.cpp +++ b/tdehtml/rendering/render_replaced.cpp @@ -64,7 +64,7 @@ RenderReplaced::RenderReplaced(DOM::NodeImpl* node) void RenderReplaced::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown()); + TDEHTMLAssert( !minMaxKnown()); #ifdef DEBUG_LAYOUT kdDebug( 6040 ) << "RenderReplaced::calcMinMaxWidth() known=" << minMaxKnown() << endl; @@ -102,7 +102,7 @@ RenderWidget::RenderWidget(DOM::NodeImpl* node) m_arena.reset(renderArena()); m_resizePending = false; m_discardResizes = false; - m_isKHTMLWidget = false; + m_isTDEHTMLWidget = false; m_needsMask = false; // this is no real reference counting, its just there @@ -131,7 +131,7 @@ void RenderWidget::detach() RenderWidget::~RenderWidget() { - KHTMLAssert( refCount() <= 0 ); + TDEHTMLAssert( refCount() <= 0 ); if(m_widget) { m_widget->hide(); @@ -157,7 +157,7 @@ void RenderWidget::resizeWidget( int w, int h ) w = kMin( w, 2000 ); if (m_widget->width() != w || m_widget->height() != h) { - m_resizePending = isKHTMLWidget(); + m_resizePending = isTDEHTMLWidget(); ref(); element()->ref(); TQApplication::postEvent( this, new TQWidgetResizeEvent( w, h ) ); @@ -185,8 +185,8 @@ bool RenderWidget::event( TQEvent *e ) m_widget->resize( re->w, re->h ); repaint(); } - // eat all events - except if this is a frame (in which case KHTMLView handles it all) - if ( ::tqqt_cast<KHTMLView *>( m_widget ) ) + // eat all events - except if this is a frame (in which case TDEHTMLView handles it all) + if ( ::tqqt_cast<TDEHTMLView *>( m_widget ) ) return TQObject::event( e ); return true; } @@ -212,7 +212,7 @@ void RenderWidget::setQWidget(TQWidget *widget) connect( m_widget, TQT_SIGNAL( destroyed()), this, TQT_SLOT( slotWidgetDestructed())); m_widget->installEventFilter(this); - if ( (m_isKHTMLWidget = !strcmp(m_widget->name(), "__tdehtml")) && !::tqqt_cast<TQFrame*>(m_widget)) + if ( (m_isTDEHTMLWidget = !strcmp(m_widget->name(), "__tdehtml")) && !::tqqt_cast<TQFrame*>(m_widget)) m_widget->setBackgroundMode( TQWidget::NoBackground ); if (m_widget->focusPolicy() > TQ_StrongFocus) @@ -236,12 +236,12 @@ void RenderWidget::setQWidget(TQWidget *widget) void RenderWidget::layout( ) { - KHTMLAssert( needsLayout() ); - KHTMLAssert( minMaxKnown() ); + TDEHTMLAssert( needsLayout() ); + TDEHTMLAssert( minMaxKnown() ); if ( m_widget ) { resizeWidget( m_width-borderLeft()-borderRight()-paddingLeft()-paddingRight(), m_height-borderTop()-borderBottom()-paddingTop()-paddingBottom() ); - if (!isKHTMLWidget() && !isFrame() && !m_needsMask) { + if (!isTDEHTMLWidget() && !isFrame() && !m_needsMask) { m_needsMask = true; RenderLayer* rl = enclosingStackingContext(); RenderLayer* el = enclosingLayer(); @@ -277,7 +277,7 @@ void RenderWidget::updateFromElement() int lowlightVal = 100 + (2*contrast_+4)*10; if (backgroundColor.isValid()) { - if (!isKHTMLWidget()) + if (!isTDEHTMLWidget()) widget()->setEraseColor(backgroundColor ); for ( int i = 0; i < TQPalette::NColorGroups; ++i ) { pal.setColor( (TQPalette::ColorGroup)i, TQColorGroup::Background, backgroundColor ); @@ -398,11 +398,11 @@ void RenderWidget::paint(PaintInfo& paintInfo, int _tx, int _ty) int xPos = _tx+borderLeft()+paddingLeft(); int yPos = _ty+borderTop()+paddingTop(); - bool tdehtmlw = isKHTMLWidget(); + bool tdehtmlw = isTDEHTMLWidget(); int childw = m_widget->width(); int childh = m_widget->height(); - if ( (childw == 2000 || childh == 3072) && m_widget->inherits( "KHTMLView" ) ) { - KHTMLView *vw = static_cast<KHTMLView *>(m_widget); + if ( (childw == 2000 || childh == 3072) && m_widget->inherits( "TDEHTMLView" ) ) { + TDEHTMLView *vw = static_cast<TDEHTMLView *>(m_widget); int cy = m_view->contentsY(); int ch = m_view->visibleHeight(); @@ -612,8 +612,8 @@ void RenderWidget::paintWidget(PaintInfo& pI, TQWidget *widget, int tx, int ty) bool RenderWidget::eventFilter(TQObject* /*o*/, TQEvent* e) { - // no special event processing if this is a frame (in which case KHTMLView handles it all) - if ( ::tqqt_cast<KHTMLView *>( m_widget ) ) + // no special event processing if this is a frame (in which case TDEHTMLView handles it all) + if ( ::tqqt_cast<TDEHTMLView *>( m_widget ) ) return false; if ( !element() ) return true; @@ -655,14 +655,14 @@ bool RenderWidget::eventFilter(TQObject* /*o*/, TQEvent* e) //kdDebug(6000) << "RenderWidget::eventFilter captures FocusIn" << endl; element()->getDocument()->setFocusNode(element()); // if ( isEditable() ) { -// KHTMLPartBrowserExtension *ext = static_cast<KHTMLPartBrowserExtension *>( element()->view->part()->browserExtension() ); +// TDEHTMLPartBrowserExtension *ext = static_cast<TDEHTMLPartBrowserExtension *>( element()->view->part()->browserExtension() ); // if ( ext ) ext->editableWidgetFocused( m_widget ); // } break; case TQEvent::KeyPress: case TQEvent::KeyRelease: // TODO this seems wrong - Qt events are not correctly translated to DOM ones, - // like in KHTMLView::dispatchKeyEvent() + // like in TDEHTMLView::dispatchKeyEvent() if (element()->dispatchKeyEvent(TQT_TQKEYEVENT(e),false)) filtered = true; break; @@ -837,13 +837,13 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev) const KeyEventBaseImpl& domKeyEv = static_cast<const KeyEventBaseImpl &>(ev); if (domKeyEv.isSynthetic() && !acceptsSyntheticEvents()) break; - // See KHTMLView::dispatchKeyEvent: autorepeat is just keypress in the DOM + // See TDEHTMLView::dispatchKeyEvent: autorepeat is just keypress in the DOM // but it's keyrelease+keypress in Qt. So here we do the inverse mapping as - // the one done in KHTMLView: generate two events for one DOM auto-repeat keypress. + // the one done in TDEHTMLView: generate two events for one DOM auto-repeat keypress. // Similarly, DOM keypress events with non-autorepeat Qt event do nothing here, // because the matching Qt keypress event was already sent from DOM keydown event. - // Reverse drawing as the one in KHTMLView: + // Reverse drawing as the one in TDEHTMLView: // DOM: Down Press | Press | Up // Qt: (nothing) Press | Release(autorepeat) + Press(autorepeat) | Release // diff --git a/tdehtml/rendering/render_replaced.h b/tdehtml/rendering/render_replaced.h index c1369bfc0..3d8a68f9c 100644 --- a/tdehtml/rendering/render_replaced.h +++ b/tdehtml/rendering/render_replaced.h @@ -26,7 +26,7 @@ #include <tqobject.h> #include <tqscrollview.h> -class KHTMLView; +class TDEHTMLView; class TQWidget; namespace DOM @@ -100,7 +100,7 @@ public: virtual void updateFromElement(); TQWidget *widget() const { return m_widget; } - KHTMLView* view() const { return m_view; } + TDEHTMLView* view() const { return m_view; } void deref(); @@ -119,7 +119,7 @@ public: public slots: void slotWidgetDestructed(); - bool isKHTMLWidget() const { return m_isKHTMLWidget; } + bool isTDEHTMLWidget() const { return m_isTDEHTMLWidget; } protected: virtual bool canHaveBorder() const { return false; } @@ -134,7 +134,7 @@ protected: void resizeWidget( int w, int h ); TQWidget *m_widget; - KHTMLView* m_view; + TDEHTMLView* m_view; //Because we mess with normal detach due to ref/deref, //we need to keep track of the arena ourselves @@ -143,7 +143,7 @@ protected: bool m_resizePending; bool m_discardResizes; - bool m_isKHTMLWidget; + bool m_isTDEHTMLWidget; bool m_needsMask; public: diff --git a/tdehtml/rendering/render_style.h b/tdehtml/rendering/render_style.h index 6e1b9cbc8..28b6b999d 100644 --- a/tdehtml/rendering/render_style.h +++ b/tdehtml/rendering/render_style.h @@ -719,11 +719,11 @@ class StyleCSS3InheritedData : public Shared<StyleCSS3InheritedData> // enum EWhiteSpace { - NORMAL, PRE, NOWRAP, PRE_WRAP, PRE_LINE, KHTML_NOWRAP + NORMAL, PRE, NOWRAP, PRE_WRAP, PRE_LINE, TDEHTML_NOWRAP }; enum ETextAlign { - TAAUTO, LEFT, RIGHT, CENTER, JUSTIFY, KHTML_LEFT, KHTML_RIGHT, KHTML_CENTER + TAAUTO, LEFT, RIGHT, CENTER, JUSTIFY, TDEHTML_LEFT, TDEHTML_RIGHT, TDEHTML_CENTER }; enum ETextTransform { diff --git a/tdehtml/rendering/render_table.cpp b/tdehtml/rendering/render_table.cpp index ef7fe1031..8a75c73f2 100644 --- a/tdehtml/rendering/render_table.cpp +++ b/tdehtml/rendering/render_table.cpp @@ -265,9 +265,9 @@ void RenderTable::calcWidth() void RenderTable::layout() { - KHTMLAssert( needsLayout() ); - KHTMLAssert( minMaxKnown() ); - KHTMLAssert( !needSectionRecalc ); + TDEHTMLAssert( needsLayout() ); + TDEHTMLAssert( minMaxKnown() ); + TDEHTMLAssert( !needSectionRecalc ); if (posChildNeedsLayout() && !normalChildNeedsLayout() && !selfNeedsLayout()) { // All we have to is lay out our positioned objects. @@ -531,7 +531,7 @@ void RenderTable::paintBoxDecorations(PaintInfo &pI, int _tx, int _ty) void RenderTable::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); if ( needSectionRecalc ) recalcSections(); @@ -567,7 +567,7 @@ void RenderTable::splitColumn( int pos, int firstSpan ) columns.resize( oldSize + 1 ); int oldSpan = columns[pos].span; // tqDebug("splitColumn( %d,%d ), oldSize=%d, oldSpan=%d", pos, firstSpan, oldSize, oldSpan ); - KHTMLAssert( oldSpan > firstSpan ); + TDEHTMLAssert( oldSpan > firstSpan ); columns[pos].span = firstSpan; memmove( columns.data()+pos+1, columns.data()+pos, (oldSize-pos)*sizeof(ColumnStruct) ); columns[pos+1].span = oldSpan - firstSpan; @@ -1040,7 +1040,7 @@ void RenderTableSection::addChild(RenderObject *child, RenderObject *beforeChild cCol = 0; ensureRows( cRow+1 ); - KHTMLAssert( child->isTableRow() ); + TDEHTMLAssert( child->isTableRow() ); grid[cRow].rowRenderer = static_cast<RenderTableRow*>(child); if (!beforeChild) { @@ -2084,8 +2084,8 @@ void RenderTableRow::addChild(RenderObject *child, RenderObject *beforeChild) void RenderTableRow::layout() { - KHTMLAssert( needsLayout() ); - KHTMLAssert( minMaxKnown() ); + TDEHTMLAssert( needsLayout() ); + TDEHTMLAssert( minMaxKnown() ); RenderObject *child = firstChild(); const bool pagedMode = canvas()->pagedMode(); @@ -2176,7 +2176,7 @@ void RenderTableRow::paintRow( PaintInfo& pI, int tx, int ty, int w, int h ) void RenderTableRow::paint(PaintInfo& i, int tx, int ty) { - KHTMLAssert(layer()); + TDEHTMLAssert(layer()); if (!layer()) return; @@ -2260,7 +2260,7 @@ Length RenderTableCell::styleOrColWidth() void RenderTableCell::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); #ifdef DEBUG_LAYOUT kdDebug( 6040 ) << renderName() << "(TableCell)::calcMinMaxWidth() known=" << minMaxKnown() << endl; #endif @@ -2365,7 +2365,7 @@ void RenderTableCell::setStyle( RenderStyle *newStyle ) RenderBlock::setStyle( newStyle ); setShouldPaintBackgroundOrBorder(true); - if (newStyle->whiteSpace() == KHTML_NOWRAP) { + if (newStyle->whiteSpace() == TDEHTML_NOWRAP) { // Figure out if we are really nowrapping or if we should just // use normal instead. If the width of the cell is fixed, then // we don't actually use NOWRAP. diff --git a/tdehtml/rendering/render_text.cpp b/tdehtml/rendering/render_text.cpp index 9090e1631..d125b04c6 100644 --- a/tdehtml/rendering/render_text.cpp +++ b/tdehtml/rendering/render_text.cpp @@ -691,7 +691,7 @@ RenderText::RenderText(DOM::NodeImpl* node, DOMStringImpl *_str) m_maxWidth = -1; str = _str; if(str) str->ref(); - KHTMLAssert(!str || !str->l || str->s); + TDEHTMLAssert(!str || !str->l || str->s); m_selectionState = SelectionNone; m_hasReturn = true; @@ -723,7 +723,7 @@ void RenderText::setStyle(RenderStyle *_style) RenderText::~RenderText() { - KHTMLAssert(m_lines.count() == 0); + TDEHTMLAssert(m_lines.count() == 0); if(str) str->deref(); } @@ -745,7 +745,7 @@ void RenderText::deleteInlineBoxes(RenderArena* arena) } } - KHTMLAssert(m_lines.count() == 0); + TDEHTMLAssert(m_lines.count() == 0); } bool RenderText::isTextFragment() const @@ -1009,12 +1009,12 @@ bool RenderText::posOfChar(int chr, int &x, int &y) void RenderText::paint( PaintInfo& /*pI*/, int /*tx*/, int /*ty*/) { - KHTMLAssert( false ); + TDEHTMLAssert( false ); } void RenderText::calcMinMaxWidth() { - KHTMLAssert( !minMaxKnown() ); + TDEHTMLAssert( !minMaxKnown() ); // ### calc Min and Max width... m_minWidth = m_beginMinWidth = m_endMinWidth = 0; @@ -1213,8 +1213,8 @@ void RenderText::setText(DOMStringImpl *text, bool force) // ### what should happen if we change the text of a // RenderBR object ? - KHTMLAssert(!isBR() || (str->l == 1 && (*str->s) == '\n')); - KHTMLAssert(!str->l || str->s); + TDEHTMLAssert(!isBR() || (str->l == 1 && (*str->s) == '\n')); + TDEHTMLAssert(!str->l || str->s); setNeedsLayoutAndMinMaxRecalc(); #ifdef BIDI_DEBUG @@ -1251,7 +1251,7 @@ short RenderText::baselinePosition( bool firstLine ) const InlineBox* RenderText::createInlineBox(bool, bool isRootLineBox) { - KHTMLAssert( !isRootLineBox ); + TDEHTMLAssert( !isRootLineBox ); return new (renderArena()) InlineTextBox(this); } @@ -1260,7 +1260,7 @@ void RenderText::position(InlineBox* box, int from, int len, bool reverse) //kdDebug(6040) << "position: from="<<from<<" len="<<len<<endl; // ### should not be needed!!! // asserts sometimes with pre (that unibw-hamburg testcase). ### find out why - //KHTMLAssert(!(len == 0 || (str->l && len == 1 && *(str->s+from) == '\n') )); + //TDEHTMLAssert(!(len == 0 || (str->l && len == 1 && *(str->s+from) == '\n') )); // It is now needed. BRs need text boxes too otherwise caret navigation // gets stuck (LS) // if (len == 0 || (str->l && len == 1 && *(str->s+from) == '\n') ) return; @@ -1272,7 +1272,7 @@ void RenderText::position(InlineBox* box, int from, int len, bool reverse) TQConstString cstr(ch, len); #endif - KHTMLAssert(box->isInlineTextBox()); + TDEHTMLAssert(box->isInlineTextBox()); InlineTextBox *s = static_cast<InlineTextBox *>(box); s->m_start = from; s->m_len = len; |