From 10308be19ef7fa44699562cc75946e7ea1fdf6b9 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 7 Jan 2011 03:45:53 +0000 Subject: Revert automated changes Sorry guys, they are just not ready for prime time Work will continue as always git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1212479 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- khtml/rendering/bidi.cpp | 94 ++++++------ khtml/rendering/bidi.h | 2 +- khtml/rendering/break_lines.h | 10 +- khtml/rendering/counter_tree.h | 2 +- khtml/rendering/enumerate.cpp | 2 +- khtml/rendering/font.cpp | 6 +- khtml/rendering/render_applet.cpp | 22 +-- khtml/rendering/render_applet.h | 2 +- khtml/rendering/render_arena.cpp | 12 +- khtml/rendering/render_arena.h | 2 +- khtml/rendering/render_block.cpp | 136 ++++++++--------- khtml/rendering/render_block.h | 28 ++-- khtml/rendering/render_body.cpp | 8 +- khtml/rendering/render_body.h | 4 +- khtml/rendering/render_box.cpp | 68 ++++----- khtml/rendering/render_box.h | 6 +- khtml/rendering/render_canvas.cpp | 46 +++--- khtml/rendering/render_canvas.h | 12 +- khtml/rendering/render_container.cpp | 16 +- khtml/rendering/render_container.h | 4 +- khtml/rendering/render_flow.cpp | 12 +- khtml/rendering/render_flow.h | 8 +- khtml/rendering/render_form.cpp | 242 +++++++++++++++--------------- khtml/rendering/render_form.h | 24 +-- khtml/rendering/render_frames.cpp | 64 ++++---- khtml/rendering/render_frames.h | 8 +- khtml/rendering/render_generated.cpp | 6 +- khtml/rendering/render_generated.h | 2 +- khtml/rendering/render_image.cpp | 18 +-- khtml/rendering/render_image.h | 2 +- khtml/rendering/render_inline.cpp | 4 +- khtml/rendering/render_inline.h | 2 +- khtml/rendering/render_layer.cpp | 52 +++---- khtml/rendering/render_layer.h | 14 +- khtml/rendering/render_line.cpp | 18 +-- khtml/rendering/render_line.h | 2 +- khtml/rendering/render_list.cpp | 20 +-- khtml/rendering/render_list.h | 8 +- khtml/rendering/render_object.cpp | 110 +++++++------- khtml/rendering/render_object.h | 62 ++++---- khtml/rendering/render_replaced.cpp | 22 +-- khtml/rendering/render_replaced.h | 8 +- khtml/rendering/render_style.cpp | 22 +-- khtml/rendering/render_style.h | 26 ++-- khtml/rendering/render_table.cpp | 96 ++++++------ khtml/rendering/render_table.h | 12 +- khtml/rendering/render_text.cpp | 54 +++---- khtml/rendering/render_text.h | 12 +- khtml/rendering/table_layout.cpp | 282 +++++++++++++++++------------------ khtml/rendering/table_layout.h | 8 +- khtml/rendering/table_layout.txt | 24 +-- 51 files changed, 863 insertions(+), 863 deletions(-) (limited to 'khtml/rendering') diff --git a/khtml/rendering/bidi.cpp b/khtml/rendering/bidi.cpp index 515c9bfbb..bd010047a 100644 --- a/khtml/rendering/bidi.cpp +++ b/khtml/rendering/bidi.cpp @@ -61,8 +61,8 @@ struct BidiIterator }; -struct BiditqStatus { - BiditqStatus() : eor(TQChar::DirON), lastStrong(TQChar::DirON), last(TQChar::DirON) {} +struct BidiStatus { + BidiStatus() : eor(TQChar::DirON), lastStrong(TQChar::DirON), last(TQChar::DirON) {} TQChar::Direction eor; TQChar::Direction lastStrong; @@ -77,7 +77,7 @@ struct BidiState { BidiIterator last; BidiIterator current; BidiContext *context; - BiditqStatus status; + BidiStatus status; }; // Used to track a list of chained bidi runs. @@ -156,7 +156,7 @@ void BidiRun::operator delete(void* ptr, size_t sz) { assert(inBidiRunDetach); - // Stash size where detach can tqfind it. + // Stash size where detach can find it. *(size_t*)ptr = sz; } @@ -181,7 +181,7 @@ static void deleteBidiRuns(RenderArena* arena) /* a small helper class used internally to resolve Bidi embedding levels. Each line of text caches the embedding level at the start of the line for faster - retqlayouting + relayouting */ BidiContext::BidiContext(unsigned char l, TQChar::Direction e, BidiContext *p, bool o) : level(l) , override(o), dir(e) @@ -242,7 +242,7 @@ static inline RenderObject *Bidinext(RenderObject *par, RenderObject *current, B if (!oldEndOfInline && !current->isFloating() && !current->isReplaced() && !current->isPositioned()) { next = current->firstChild(); if ( next && adjustEmbedding ) { - EUnicodeBidi ub = next->style()->tqunicodeBidi(); + EUnicodeBidi ub = next->style()->unicodeBidi(); if ( ub != UBNormal && !emptyRun ) { EDirection dir = next->style()->direction(); TQChar::Direction d = ( ub == Embed ? ( dir == RTL ? TQChar::DirRLE : TQChar::DirLRE ) @@ -261,7 +261,7 @@ static inline RenderObject *Bidinext(RenderObject *par, RenderObject *current, B while (current && current != par) { next = current->nextSibling(); if (next) break; - if ( adjustEmbedding && current->style()->tqunicodeBidi() != UBNormal && !emptyRun ) { + if ( adjustEmbedding && current->style()->unicodeBidi() != UBNormal && !emptyRun ) { embed( TQChar::DirPDF, bidi ); } current = current->parent(); @@ -454,7 +454,7 @@ static void checkMidpoints(BidiIterator& lBreak, BidiState &bidi) // Don't shave a character off the endpoint if it was from a soft hyphen. RenderText* textObj = static_cast(endpoint.obj); if (endpoint.pos+1 < textObj->length() && - textObj->text()[endpoint.pos+1].tqunicode() == SOFT_HYPHEN) + textObj->text()[endpoint.pos+1].unicode() == SOFT_HYPHEN) return; } endpoint.pos--; @@ -795,7 +795,7 @@ void RenderBlock::computeVerticalPositionsForLine(InlineFlowBox* lineBox) bool beforeContent = true; - // Now make sure we place tqreplaced render objects correctly. + // Now make sure we place replaced render objects correctly. for (BidiRun* r = sFirstBidiRun; r; r = r->nextRun) { // For positioned placeholders, cache the static Y position an object with non-inline display would have. @@ -806,7 +806,7 @@ void RenderBlock::computeVerticalPositionsForLine(InlineFlowBox* lineBox) else if (beforeContent) beforeContent = false; - // Position is used to properly position both tqreplaced elements and + // Position is used to properly position both replaced elements and // to update the static normal flow x/y of positioned elements. r->obj->position(r->box, r->start, r->stop - r->start, r->level%2); } @@ -1241,7 +1241,7 @@ void RenderBlock::bidiReorderLine(const BidiIterator &start, const BidiIterator } // this causes the operator ++ to open and close embedding levels as needed - // for the CSS tqunicode-bidi property + // for the CSS unicode-bidi property adjustEmbedding = true; bidi.current.increment( bidi ); adjustEmbedding = false; @@ -1264,7 +1264,7 @@ void RenderBlock::bidiReorderLine(const BidiIterator &start, const BidiIterator // reorder line according to run structure... - // first tqfind highest and lowest levels + // first find highest and lowest levels uchar levelLow = 128; uchar levelHigh = 0; BidiRun *r = sFirstBidiRun; @@ -1323,17 +1323,17 @@ void RenderBlock::bidiReorderLine(const BidiIterator &start, const BidiIterator #endif } -void RenderBlock::tqlayoutInlineChildren(bool retqlayoutChildren, int breakBeforeLine) +void RenderBlock::layoutInlineChildren(bool relayoutChildren, int breakBeforeLine) { BidiState bidi; m_overflowHeight = 0; - tqinvalidateVerticalPositions(); + invalidateVerticalPositions(); #ifdef DEBUG_LAYOUT TQTime qt; qt.start(); - kdDebug( 6040 ) << renderName() << " tqlayoutInlineChildren( " << this <<" )" << endl; + kdDebug( 6040 ) << renderName() << " layoutInlineChildren( " << this <<" )" << endl; #endif #if BIDI_DEBUG > 1 || defined( DEBUG_LINEBREAKS ) kdDebug(6041) << " ------- bidi start " << this << " -------" << endl; @@ -1356,11 +1356,11 @@ void RenderBlock::tqlayoutInlineChildren(bool retqlayoutChildren, int breakBefor deleteEllipsisLineBoxes(); if (firstChild()) { - // tqlayout tqreplaced elements + // layout replaced elements RenderObject *o = first( this, bidi, false ); while ( o ) { if (o->markedForRepaint()) { - o->tqrepaintDuringLayout(); + o->repaintDuringLayout(); o->setMarkedForRepaint(false); } if (o->isReplaced() || o->isFloating() || o->isPositioned()) { @@ -1368,13 +1368,13 @@ void RenderBlock::tqlayoutInlineChildren(bool retqlayoutChildren, int breakBefor if (o->isBox()) static_cast(o)->RenderBox::deleteInlineBoxes(); - //kdDebug(6041) << "tqlayouting tqreplaced or floating child" << endl; - if (retqlayoutChildren || o->style()->width().isPercent() || o->style()->height().isPercent()) + //kdDebug(6041) << "layouting replaced or floating child" << endl; + if (relayoutChildren || o->style()->width().isPercent() || o->style()->height().isPercent()) o->setChildNeedsLayout(true, false); if (o->isPositioned()) o->containingBlock()->insertPositionedObject(o); else - o->tqlayoutIfNeeded(); + o->layoutIfNeeded(); } else { o->deleteInlineBoxes(); @@ -1437,7 +1437,7 @@ void RenderBlock::tqlayoutInlineChildren(bool retqlayoutChildren, int breakBefor pagebreakHint = true; } redo_linebreak: - end = tqfindNextLineBreak(start, bidi); + end = findNextLineBreak(start, bidi); if( start.atEnd() ) break; if (!isLineEmpty) { bidiReorderLine(start, end, bidi); @@ -1496,13 +1496,13 @@ redo_linebreak: sNumMidpoints = 0; sCurrMidpoint = 0; - // If we violate widows page-breaking rules, we set a hint and retqlayout. + // If we violate widows page-breaking rules, we set a hint and relayout. // Note that the widows rule might still be violated afterwards if the lines have become wider - if (canvas()->pagedMode() && tqcontainsPageBreak() && breakBeforeLine == 0) + if (canvas()->pagedMode() && containsPageBreak() && breakBeforeLine == 0) { int orphans = 0; int widows = 0; - // tqfind breaking line + // find breaking line InlineRunBox* lineBox = firstLineBox(); while (lineBox) { if (lineBox->isInlineFlowBox()) { @@ -1527,15 +1527,15 @@ redo_linebreak: int newOrphans = orphans - (style()->widows() - widows); if (newOrphans < style()->orphans()) { if (parent()->canClear(this,PageBreakHarder)) { - // Retqlayout to remove incorrect page-break + // Relayout to remove incorrect page-break setNeedsPageClear(true); setContainsPageBreak(false); - tqlayoutInlineChildren(retqlayoutChildren, -1); + layoutInlineChildren(relayoutChildren, -1); return; } } else { // Set hint and try again - tqlayoutInlineChildren(retqlayoutChildren, newOrphans+1); + layoutInlineChildren(relayoutChildren, newOrphans+1); return; } } @@ -1564,7 +1564,7 @@ redo_linebreak: #if BIDI_DEBUG > 1 kdDebug(6041) << " ------- bidi end " << this << " -------" << endl; #endif - //kdDebug() << "RenderBlock::tqlayoutInlineChildren time used " << qt.elapsed() << endl; + //kdDebug() << "RenderBlock::layoutInlineChildren time used " << qt.elapsed() << endl; //kdDebug(6040) << "height = " << m_height <isInlineFlow() || (!start.obj->style()->preserveWS() && !start.obj->isBR() && #ifndef QT_NO_UNICODETABLES - ( (start.current().tqunicode() == (ushort)0x0020) || // ASCII space - (start.current().tqunicode() == (ushort)0x0009) || // ASCII tab - (start.current().tqunicode() == (ushort)0x000A) || // ASCII line feed - (start.current().tqunicode() == (ushort)0x000C) || // ASCII form feed - (start.current().tqunicode() == (ushort)0x200B) || // Zero-width space + ( (start.current().unicode() == (ushort)0x0020) || // ASCII space + (start.current().unicode() == (ushort)0x0009) || // ASCII tab + (start.current().unicode() == (ushort)0x000A) || // ASCII line feed + (start.current().unicode() == (ushort)0x000C) || // ASCII form feed + (start.current().unicode() == (ushort)0x200B) || // Zero-width space start.obj->isFloatingOrPositioned() ) #else ( start.current() == ' ' || start.current() == '\n' || start.obj->isFloatingOrPositioned() ) @@ -1710,7 +1710,7 @@ BidiIterator RenderBlock::tqfindNextLineBreak(BidiIterator &start, BidiState &bi // only check the clear status for non-empty lines. EClear clear = o->style()->clear(); if(clear != CNONE) - m_cleartqStatus = (EClear) (m_cleartqStatus | clear); + m_clearStatus = (EClear) (m_clearStatus | clear); } } goto end; @@ -1771,7 +1771,7 @@ BidiIterator RenderBlock::tqfindNextLineBreak(BidiIterator &start, BidiState &bi if (lastIt.current->isHTMLMarquee() && lastIt.current->layer() && lastIt.current->layer()->marquee()) lastWS = lastIt.current->layer()->marquee()->whiteSpace(); - // Break on tqreplaced elements if either has normal white-space. + // Break on replaced elements if either has normal white-space. if (currWS == NORMAL || lastWS == NORMAL) { w += tmpW; tmpW = 0; @@ -1824,7 +1824,7 @@ BidiIterator RenderBlock::tqfindNextLineBreak(BidiIterator &start, BidiState &bi isLineEmpty = false; // Check for soft hyphens. Go ahead and ignore them. - if (c.tqunicode() == SOFT_HYPHEN && pos > 0) { + if (c.unicode() == SOFT_HYPHEN && pos > 0) { nextIsSoftBreakable = true; if (!ignoringSpaces) { // Ignore soft hyphens @@ -1877,7 +1877,7 @@ BidiIterator RenderBlock::tqfindNextLineBreak(BidiIterator &start, BidiState &bi tmpW += t->width(lastSpace, pos - lastSpace, f); #ifdef APPLE_CHANGES applyWordSpacing = (wordSpacing && currentCharacterIsSpace && !previousCharacterIsSpace && - !t->tqcontainsOnlyWhitespace(pos+1, strlen-(pos+1))); + !t->containsOnlyWhitespace(pos+1, strlen-(pos+1))); #endif #ifdef DEBUG_LINEBREAKS kdDebug(6041) << "found space at " << pos << " in string '" << TQString( str, strlen ).latin1() << "' adding " << tmpW << " new width = " << w << endl; @@ -1886,7 +1886,7 @@ BidiIterator RenderBlock::tqfindNextLineBreak(BidiIterator &start, BidiState &bi int fb = nearestFloatBottom(m_height); int newLineWidth = lineWidth(fb); // See if |tmpW| will fit on the new line. As long as it does not, - // keep adjusting our float bottom until we tqfind some room. + // keep adjusting our float bottom until we find some room. int lastFloatBottom = m_height; while (lastFloatBottom < fb && tmpW > newLineWidth) { lastFloatBottom = fb; @@ -1898,7 +1898,7 @@ BidiIterator RenderBlock::tqfindNextLineBreak(BidiIterator &start, BidiState &bi m_height = fb; width = newLineWidth; #ifdef DEBUG_LINEBREAKS - kdDebug() << "RenderBlock::tqfindNextLineBreak new position at " << m_height << " newWidth " << width << endl; + kdDebug() << "RenderBlock::findNextLineBreak new position at " << m_height << " newWidth " << width << endl; #endif } } @@ -1911,7 +1911,7 @@ BidiIterator RenderBlock::tqfindNextLineBreak(BidiIterator &start, BidiState &bi lBreak.endOfInline = false; } goto end; - } else if ( (pos > 1 && str[pos-1].tqunicode() == SOFT_HYPHEN) ) + } else if ( (pos > 1 && str[pos-1].unicode() == SOFT_HYPHEN) ) // Subtract the width of the soft hyphen out since we fit on a line. tmpW -= t->width(pos-1, 1, f); } @@ -1971,7 +1971,7 @@ BidiIterator RenderBlock::tqfindNextLineBreak(BidiIterator &start, BidiState &bi } if (!ignoringSpaces) { - // We didn't tqfind any space that would be beyond the line |width|. + // We didn't find any space that would be beyond the line |width|. // Lets add to |tmpW| the remaining width since the last space we found. // Before we test this new |tmpW| however, we will have to look ahead to check // if the next object/position can serve as a line breaking opportunity. @@ -2056,7 +2056,7 @@ BidiIterator RenderBlock::tqfindNextLineBreak(BidiIterator &start, BidiState &bi int fb = nearestFloatBottom(m_height); int newLineWidth = lineWidth(fb); // See if |tmpW| will fit on the new line. As long as it does not, - // keep adjusting our float bottom until we tqfind some room. + // keep adjusting our float bottom until we find some room. int lastFloatBottom = m_height; while (lastFloatBottom < fb && tmpW > newLineWidth) { lastFloatBottom = fb; @@ -2067,7 +2067,7 @@ BidiIterator RenderBlock::tqfindNextLineBreak(BidiIterator &start, BidiState &bi m_height = fb; width = newLineWidth; #ifdef DEBUG_LINEBREAKS - kdDebug() << "RenderBlock::tqfindNextLineBreak new position at " << m_height << " newWidth " << width << endl; + kdDebug() << "RenderBlock::findNextLineBreak new position at " << m_height << " newWidth " << width << endl; #endif } @@ -2189,7 +2189,7 @@ BidiIterator RenderBlock::tqfindNextLineBreak(BidiIterator &start, BidiState &bi // For soft hyphens on line breaks, we have to chop out the midpoints that made us // ignore the hyphen so that it will render at the end of the line. TQChar c = static_cast(lBreak.obj)->text()[lBreak.pos-1]; - if (c.tqunicode() == SOFT_HYPHEN) + if (c.unicode() == SOFT_HYPHEN) chopMidpointsAt(lBreak.obj, lBreak.pos-2); } @@ -2233,7 +2233,7 @@ void RenderBlock::checkLinesForTextOverflow() if ((ltr && lineBoxEdge > blockEdge) || (!ltr && lineBoxEdge < blockEdge)) { // This line spills out of our box in the appropriate direction. Now we need to see if the line // can be truncated. In order for truncation to be possible, the line must have sufficient space to - // accommodate our truncation string, and no tqreplaced elements (images, tables) can overlap the ellipsis + // accommodate our truncation string, and no replaced elements (images, tables) can overlap the ellipsis // space. int width = curr == firstRootBox() ? firstLineEllipsisWidth : ellipsisWidth; if (curr->canAccommodateEllipsis(ltr, blockEdge, lineBoxEdge, width)) diff --git a/khtml/rendering/bidi.h b/khtml/rendering/bidi.h index 2ae5599a1..c8776ce19 100644 --- a/khtml/rendering/bidi.h +++ b/khtml/rendering/bidi.h @@ -107,7 +107,7 @@ public: /* InlineMinMaxIterator is a class that will iterate over all render objects that contribute to inline min/max width calculations. Note the following about the way it walks: (1) Positioned content is skipped (since it does not contribute to min/max width of a block) - (2) We do not drill into the children of floats or tqreplaced elements, since you can't break + (2) We do not drill into the children of floats or replaced elements, since you can't break in the middle of such an element. (3) Inline flows (e.g., , , ) are walked twice, since each side can have distinct borders/margin/padding that contribute to the min/max width. diff --git a/khtml/rendering/break_lines.h b/khtml/rendering/break_lines.h index 928b75e18..5176e5fb0 100644 --- a/khtml/rendering/break_lines.h +++ b/khtml/rendering/break_lines.h @@ -6,13 +6,13 @@ namespace khtml { /* - array of tqunicode codes where breaking shouldn't occur. + array of unicode codes where breaking shouldn't occur. (in sorted order because of using with binary search) these are currently for Japanese, though simply adding Korean, Chinese ones should work as well */ /* - dontbreakbefore[] tqcontains characters not covered by TQChar::Punctuation_Close that shouldn't be broken before. + dontbreakbefore[] contains characters not covered by TQChar::Punctuation_Close that shouldn't be broken before. chars included in TQChar::Punctuation_Close are listed below.(look at UAX #14) - 3001 ideographic comma - 3002 ideographic full stop @@ -122,7 +122,7 @@ namespace khtml { inline bool isBreakable( const TQChar *str, const int pos, int len ) { const TQChar *c = str+pos; - unsigned short ch = c->tqunicode(); + unsigned short ch = c->unicode(); if ( ch > 0xff ) { // not latin1, need to do more sophisticated checks for asian fonts unsigned char row = c->row(); @@ -147,8 +147,8 @@ namespace khtml { return false; // do binary search in dontbreak[] - return break_bsearch(dontbreakbefore, c->tqunicode()) && - break_bsearch(dontbreakafter, (str+(pos-1))->tqunicode()); + return break_bsearch(dontbreakbefore, c->unicode()) && + break_bsearch(dontbreakafter, (str+(pos-1))->unicode()); } else // no asian font return c->isSpace(); } else { diff --git a/khtml/rendering/counter_tree.h b/khtml/rendering/counter_tree.h index ca630ea19..55b924b80 100644 --- a/khtml/rendering/counter_tree.h +++ b/khtml/rendering/counter_tree.h @@ -29,7 +29,7 @@ namespace khtml { class CounterReset; -// This file implements a counter-tree that is used for tqfinding all parents in counters() lookup, +// This file implements a counter-tree that is used for finding all parents in counters() lookup, // and for propagating count-changes when nodes are added or removed. // Please note that only counter-reset and root can be parents here, and that render-tree parents // are just counter-tree siblings diff --git a/khtml/rendering/enumerate.cpp b/khtml/rendering/enumerate.cpp index 57445c12b..9cfe149ad 100644 --- a/khtml/rendering/enumerate.cpp +++ b/khtml/rendering/enumerate.cpp @@ -138,7 +138,7 @@ TQString toHebrew( int number ) { TQString letter; if (number < 1) return TQString::number(number); if (number>999) { - letter = toHebrew(number/1000) + TQString::tqfromLatin1("'"); + letter = toHebrew(number/1000) + TQString::fromLatin1("'"); number = number%1000; } diff --git a/khtml/rendering/font.cpp b/khtml/rendering/font.cpp index 18e0e57f0..a33f0e082 100644 --- a/khtml/rendering/font.cpp +++ b/khtml/rendering/font.cpp @@ -170,7 +170,7 @@ void Font::drawText( TQPainter *p, int x, int y, TQChar *str, int slen, int pos, // and stored. In the second, the actual characters are drawn. // For each letter in the text box, save the width of the character. - // When word-wise, only the first letter tqcontains the width, but of the + // When word-wise, only the first letter contains the width, but of the // whole word. short* const widthList = (short *)alloca(to*sizeof(short)); @@ -293,7 +293,7 @@ int Font::width( TQChar *chs, int, int pos, int len, int start, int end, int toA const TQString qstr = cstr.string(); if ( scFont ) { const TQString upper = qstr.upper(); - const TQChar *uc = qstr.tqunicode(); + const TQChar *uc = qstr.unicode(); const TQFontMetrics sc_fm( *scFont ); for ( int i = 0; i < len; ++i ) { if ( (uc+i)->category() == TQChar::Letter_Lowercase ) @@ -431,7 +431,7 @@ void Font::update( TQPaintDeviceMetrics* devMetrics ) const if( !isFontScalable(db, f) ) { const TQValueList& pointSizes = (*scalSizesCache)[ScalKey(f)]; - // lets see if we tqfind a nice looking font, which is not too far away + // lets see if we find a nice looking font, which is not too far away // from the requested one. // kdDebug(6080) << "khtml::setFontSize family = " << f.family() << " size requested=" << size << endl; diff --git a/khtml/rendering/render_applet.cpp b/khtml/rendering/render_applet.cpp index ad0d787df..fce22f7c8 100644 --- a/khtml/rendering/render_applet.cpp +++ b/khtml/rendering/render_applet.cpp @@ -70,7 +70,7 @@ short RenderApplet::intrinsicWidth() const int rval = 300; if( m_widget ) - rval = ((KJavaAppletWidget*)(m_widget))->tqsizeHint().width(); + rval = ((KJavaAppletWidget*)(m_widget))->sizeHint().width(); return rval > 10 ? rval : 50; } @@ -80,14 +80,14 @@ int RenderApplet::intrinsicHeight() const int rval = 150; if( m_widget ) - rval = m_widget->tqsizeHint().height(); + rval = m_widget->sizeHint().height(); return rval > 10 ? rval : 50; } -void RenderApplet::tqlayout() +void RenderApplet::layout() { - //kdDebug(6100) << "RenderApplet::tqlayout" << endl; + //kdDebug(6100) << "RenderApplet::layout" << endl; KHTMLAssert( needsLayout() ); KHTMLAssert( minMaxKnown() ); @@ -123,22 +123,22 @@ void RenderApplet::processArguments(const TQMap &args) KJavaApplet* applet = w ? w->applet() : 0; if ( applet ) { - applet->setBaseURL( args[TQString::tqfromLatin1("baseURL") ] ); - applet->setAppletClass( args[TQString::tqfromLatin1("code") ] ); + applet->setBaseURL( args[TQString::fromLatin1("baseURL") ] ); + applet->setAppletClass( args[TQString::fromLatin1("code") ] ); - TQString str = args[TQString::tqfromLatin1("codeBase") ]; + TQString str = args[TQString::fromLatin1("codeBase") ]; if( !str.isEmpty() ) applet->setCodeBase( str ); - str = args[TQString::tqfromLatin1("name") ]; + str = args[TQString::fromLatin1("name") ]; if( !str.isNull() ) applet->setAppletName( str ); else - applet->setAppletName( args[TQString::tqfromLatin1("code") ] ); + applet->setAppletName( args[TQString::fromLatin1("code") ] ); - str = args[TQString::tqfromLatin1("archive") ]; + str = args[TQString::fromLatin1("archive") ]; if( !str.isEmpty() ) - applet->setArchives( args[TQString::tqfromLatin1("archive") ] ); + applet->setArchives( args[TQString::fromLatin1("archive") ] ); } } diff --git a/khtml/rendering/render_applet.h b/khtml/rendering/render_applet.h index 1ec9c5b7e..184697a7c 100644 --- a/khtml/rendering/render_applet.h +++ b/khtml/rendering/render_applet.h @@ -44,7 +44,7 @@ public: virtual const char *renderName() const { return "RenderApplet"; } - virtual void tqlayout(); + virtual void layout(); virtual short intrinsicWidth() const; virtual int intrinsicHeight() const; virtual bool isApplet() const { return true; } diff --git a/khtml/rendering/render_arena.cpp b/khtml/rendering/render_arena.cpp index 448e9b7e9..99fbf4f4d 100644 --- a/khtml/rendering/render_arena.cpp +++ b/khtml/rendering/render_arena.cpp @@ -27,7 +27,7 @@ * version of this file only under the terms of one of those two * licenses (the MPL or the GPL) and not to allow others to use your * version of this file under the LGPL, indicate your decision by - * deletingthe provisions above and tqreplace them with the notice and + * deletingthe provisions above and replace them with the notice and * other provisions required by the MPL or the GPL, as the case may be. * If you do not delete the provisions above, a recipient may use your * version of this file under any of the LGPL, the MPL or the GPL. @@ -52,7 +52,7 @@ typedef struct { } RenderArenaDebugHeader; #ifdef VALGRIND_SUPPORT -Arena* tqfindContainingArena(ArenaPool* pool, void* ptr) { +Arena* findContainingArena(ArenaPool* pool, void* ptr) { uword ptrBits = reinterpret_cast(ptr); for (Arena* a = &pool->first; a; a = a->next) if (ptrBits >= a->base && ptrBits < a->limit) @@ -88,7 +88,7 @@ void* RenderArena::allocate(size_t size) #else void* result = 0; - // Ensure we have correct tqalignment for pointers. Important for Tru64 + // Ensure we have correct alignment for pointers. Important for Tru64 size = KHTML_ROUNDUP(size, sizeof(void*)); // Check recyclers first @@ -98,7 +98,7 @@ void* RenderArena::allocate(size_t size) result = m_recyclers[index]; if (result) { #ifdef VALGRIND_SUPPORT - VALGRIND_MEMPOOL_ALLOC(tqfindContainingArena(&m_pool, result)->base, result, size); + VALGRIND_MEMPOOL_ALLOC(findContainingArena(&m_pool, result)->base, result, size); #endif // Need to move to the next object void* next = *((void**)result); @@ -127,10 +127,10 @@ void RenderArena::free(size_t size, void* ptr) #else #ifdef VALGRIND_SUPPORT - VALGRIND_MEMPOOL_FREE(tqfindContainingArena(&m_pool, ptr)->base, ptr); + VALGRIND_MEMPOOL_FREE(findContainingArena(&m_pool, ptr)->base, ptr); #endif - // Ensure we have correct tqalignment for pointers. Important for Tru64 + // Ensure we have correct alignment for pointers. Important for Tru64 size = KHTML_ROUNDUP(size, sizeof(void*)); // See if it's a size that we recycle diff --git a/khtml/rendering/render_arena.h b/khtml/rendering/render_arena.h index 1bb37c11d..786cd208a 100644 --- a/khtml/rendering/render_arena.h +++ b/khtml/rendering/render_arena.h @@ -27,7 +27,7 @@ * version of this file only under the terms of one of those two * licenses (the MPL or the GPL) and not to allow others to use your * version of this file under the LGPL, indicate your decision by - * deletingthe provisions above and tqreplace them with the notice and + * deletingthe provisions above and replace them with the notice and * other provisions required by the MPL or the GPL, as the case may be. * If you do not delete the provisions above, a recipient may use your * version of this file under any of the LGPL, the MPL or the GPL. diff --git a/khtml/rendering/render_block.cpp b/khtml/rendering/render_block.cpp index 0ea4144f1..ccbb6fad0 100644 --- a/khtml/rendering/render_block.cpp +++ b/khtml/rendering/render_block.cpp @@ -94,7 +94,7 @@ RenderBlock::RenderBlock(DOM::NodeImpl* node) m_positionedObjects = 0; m_firstLine = false; m_avoidPageBreak = false; - m_cleartqStatus = CNONE; + m_clearStatus = CNONE; m_maxTopPosMargin = m_maxTopNegMargin = m_maxBottomPosMargin = m_maxBottomNegMargin = 0; m_topMarginQuirk = m_bottomMarginQuirk = false; m_overflowHeight = m_overflowWidth = 0; @@ -223,7 +223,7 @@ void RenderBlock::updateFirstLetter() // punctuation and white-space if(oldText->l >= 1) { oldText->ref(); - // begin: we need skip leading whitespace so that RenderBlock::tqfindNextLineBreak + // begin: we need skip leading whitespace so that RenderBlock::findNextLineBreak // won't think we're continuing from a previous run unsigned int begin = 0; // the position that first-letter begins unsigned int length = 0; // the position that "the rest" begins @@ -274,7 +274,7 @@ void RenderBlock::addChildToFlow(RenderObject* newChild, RenderObject* beforeChi bool madeBoxesNonInline = false; // If the requested beforeChild is not one of our children, then this is most likely because - // there is an anonymous block box within this object that tqcontains the beforeChild. So + // there is an anonymous block box within this object that contains the beforeChild. So // just insert the child into the anonymous block box instead of here. This may also be // needed in cases of things like anonymous tables. if (beforeChild && beforeChild->parent() != this) { @@ -289,7 +289,7 @@ void RenderBlock::addChildToFlow(RenderObject* newChild, RenderObject* beforeChi beforeChild->parent()->firstChild() == beforeChild) return addChildToFlow(newChild, beforeChild->parent()); - // Otherwise tqfind our kid inside which the beforeChild is, and delegate to it. + // Otherwise find our kid inside which the beforeChild is, and delegate to it. // This may be many levels deep due to anonymous tables, table sections, etc. RenderObject* responsible = beforeChild->parent(); while (responsible->parent() != this) @@ -298,7 +298,7 @@ void RenderBlock::addChildToFlow(RenderObject* newChild, RenderObject* beforeChi return responsible->addChild(newChild,beforeChild); } - // prevent elements that haven't received a tqlayout yet from getting painted by pushing + // prevent elements that haven't received a layout yet from getting painted by pushing // them far above the top of the page if (!newChild->isInline()) newChild->setPos(newChild->xPos(), -500000); @@ -376,7 +376,7 @@ static void getInlineRun(RenderObject* start, RenderObject* stop, RenderObject*& inlineRunStart, RenderObject*& inlineRunEnd) { - // Beginning at |start| we tqfind the largest contiguous run of inlines that + // Beginning at |start| we find the largest contiguous run of inlines that // we can. We denote the run with start and end points, |inlineRunStart| // and |inlineRunEnd|. Note that these two values may be the same if // we encounter only one inline. @@ -565,7 +565,7 @@ void RenderBlock::removeChild(RenderObject *oldChild) bool RenderBlock::isSelfCollapsingBlock() const { // We are not self-collapsing if we - // (a) have a non-zero height according to tqlayout (an optimization to avoid wasting time) + // (a) have a non-zero height according to layout (an optimization to avoid wasting time) // (b) are a table, // (c) have border/padding, // (d) have a min-height @@ -604,30 +604,30 @@ bool RenderBlock::isSelfCollapsingBlock() const return false; } -void RenderBlock::tqlayout() +void RenderBlock::layout() { - // Table cells call tqlayoutBlock directly, so don't add any logic here. Put code into - // tqlayoutBlock(). - tqlayoutBlock(false); + // Table cells call layoutBlock directly, so don't add any logic here. Put code into + // layoutBlock(). + layoutBlock(false); } -void RenderBlock::tqlayoutBlock(bool retqlayoutChildren) +void RenderBlock::layoutBlock(bool relayoutChildren) { if (isInline() && !isReplacedBlock()) { setNeedsLayout(false); return; } - // kdDebug( 6040 ) << renderName() << " " << this << "::tqlayoutBlock() start" << endl; + // kdDebug( 6040 ) << renderName() << " " << this << "::layoutBlock() start" << endl; // TQTime t; // t.start(); KHTMLAssert( needsLayout() ); KHTMLAssert( minMaxKnown() ); - if (canvas()->pagedMode()) retqlayoutChildren = true; + if (canvas()->pagedMode()) relayoutChildren = true; - if (!retqlayoutChildren && posChildNeedsLayout() && !normalChildNeedsLayout() && !selfNeedsLayout()) { + if (!relayoutChildren && posChildNeedsLayout() && !normalChildNeedsLayout() && !selfNeedsLayout()) { // All we have to is lay out our positioned objects. - tqlayoutPositionedObjects(retqlayoutChildren); + layoutPositionedObjects(relayoutChildren); if (hasOverflowClip()) m_layer->checkScrollbarsAfterLayout(); setNeedsLayout(false); @@ -635,7 +635,7 @@ void RenderBlock::tqlayoutBlock(bool retqlayoutChildren) } if (markedForRepaint()) { - tqrepaintDuringLayout(); + repaintDuringLayout(); setMarkedForRepaint(false); } @@ -653,14 +653,14 @@ void RenderBlock::tqlayoutBlock(bool retqlayoutChildren) } if ( oldWidth != m_width ) - retqlayoutChildren = true; + relayoutChildren = true; // kdDebug( 6040 ) << floatingObjects << "," << oldWidth << "," // << m_width << ","<< needsLayout() << "," << isAnonymousBox() << "," // << overhangingContents() << "," << isPositioned() << endl; #ifdef DEBUG_LAYOUT - kdDebug( 6040 ) << renderName() << "(RenderBlock) " << this << " ::tqlayout() width=" << m_width << ", needsLayout=" << needsLayout() << endl; + kdDebug( 6040 ) << renderName() << "(RenderBlock) " << this << " ::layout() width=" << m_width << ", needsLayout=" << needsLayout() << endl; if(containingBlock() == static_cast(this)) kdDebug( 6040 ) << renderName() << ": containingBlock == this" << endl; #endif @@ -670,14 +670,14 @@ void RenderBlock::tqlayoutBlock(bool retqlayoutChildren) int previousHeight = m_height; m_height = 0; m_overflowHeight = 0; - m_cleartqStatus = CNONE; + m_clearStatus = CNONE; // We use four values, maxTopPos, maxPosNeg, maxBottomPos, and maxBottomNeg, to track // our current maximal positive and negative margins. These values are used when we // are collapsed with adjacent blocks, so for example, if you have block A and B // collapsing together, then you'd take the maximal positive margin from both A and B // and subtract it from the maximal negative margin from both A and B to get the - // true collapsed margin. This algorithm is recursive, so when we finish tqlayout() + // true collapsed margin. This algorithm is recursive, so when we finish layout() // our block knows its current maximal positive/negative values. // // Start out by setting our margin values to our current margins. Table cells have @@ -705,9 +705,9 @@ void RenderBlock::tqlayoutBlock(bool retqlayoutChildren) setContainsPageBreak(false); if (childrenInline()) - tqlayoutInlineChildren( retqlayoutChildren ); + layoutInlineChildren( relayoutChildren ); else - tqlayoutBlockChildren( retqlayoutChildren ); + layoutBlockChildren( relayoutChildren ); // Expand our intrinsic height to encompass floats. int toAdd = borderBottom() + paddingBottom(); @@ -729,7 +729,7 @@ void RenderBlock::tqlayoutBlock(bool retqlayoutChildren) m_overflowHeight = m_height; } if (previousHeight != m_height) - retqlayoutChildren = true; + relayoutChildren = true; if (isTableCell()) { // Table cells need to grow to accommodate both overhanging floats and @@ -764,7 +764,7 @@ void RenderBlock::tqlayoutBlock(bool retqlayoutChildren) kdDebug( 6040 ) << renderName() << " crosses to page " << xpage << endl; #endif } - if (needsPageBreak && !tqcontainsPageBreak()) { + if (needsPageBreak && !containsPageBreak()) { setNeedsPageClear(true); #ifdef PAGE_DEBUG kdDebug( 6040 ) << renderName() << " marked for page-clear" << endl; @@ -772,7 +772,7 @@ void RenderBlock::tqlayoutBlock(bool retqlayoutChildren) } } - tqlayoutPositionedObjects( retqlayoutChildren ); + layoutPositionedObjects( relayoutChildren ); // Always ensure our overflow width/height are at least as large as our width/height. m_overflowWidth = kMax(m_overflowWidth, (int)m_width); @@ -881,7 +881,7 @@ static inline bool isAnonymousWhitespace( RenderObject* o ) { return false; RenderObject *fc = o->firstChild(); return fc && fc == o->lastChild() && fc->isText() && static_cast(fc)->stringLength() == 1 && - static_cast(fc)->text()[0].tqunicode() == ' '; + static_cast(fc)->text()[0].unicode() == ' '; } RenderObject* RenderBlock::handleCompactChild(RenderObject* child, CompactInfo& compactInfo, const MarginInfo& marginInfo, bool& handled) @@ -908,7 +908,7 @@ RenderObject* RenderBlock::handleCompactChild(RenderObject* child, CompactInfo& // The compact will fit in the margin. handled = true; compactInfo.set(child, curr); - child->tqlayoutIfNeeded(); + child->layoutIfNeeded(); int off = marginInfo.margin(); m_height += off + curr->marginTop() < child->marginTop() ? child->marginTop() - curr->marginTop() -off: 0; @@ -967,7 +967,7 @@ void RenderBlock::insertCompactIfNeeded(RenderObject* child, CompactInfo& compac Length newLineHeight( kMax(compactChild->lineHeight(true)+adj, (int)child->lineHeight(true)), khtml::Fixed); child->style()->setLineHeight( newLineHeight ); child->setNeedsLayout( true, false ); - child->tqlayout(); + child->layout(); compactChild->setPos(compactXPos, compactYPos); // Set the x position. compactInfo.clear(); @@ -1110,7 +1110,7 @@ void RenderBlock::collapseMargins(RenderObject* child, MarginInfo& marginInfo, i child->markAllDescendantsWithFloatsForLayout(); // Our guess was wrong. Make the child lay itself out again. - child->tqlayoutIfNeeded(); + child->layoutIfNeeded(); } } @@ -1146,7 +1146,7 @@ void RenderBlock::clearFloatsIfNeeded(RenderObject* child, MarginInfo& marginInf } // If our value of clear caused us to be repositioned vertically to be - // underneath a float, we might have to do another tqlayout to take into account + // underneath a float, we might have to do another layout to take into account // the extra space we now have available. if (!selfCollapsing && !child->style()->width().isFixed() && child->usesLineWidth()) // The child's width is a percentage of the line width. @@ -1156,7 +1156,7 @@ void RenderBlock::clearFloatsIfNeeded(RenderObject* child, MarginInfo& marginInf child->setChildNeedsLayout(true); if (!child->flowAroundFloats() && child->hasFloats()) child->markAllDescendantsWithFloatsForLayout(); - child->tqlayoutIfNeeded(); + child->layoutIfNeeded(); } } @@ -1215,7 +1215,7 @@ void RenderBlock::clearPageBreak(RenderObject* child, int pageBottom) // Increase our height by the amount we had to clear. m_height += heightIncrease; - // We might have to do another tqlayout to take into account + // We might have to do another layout to take into account // the extra space we now have available. if (!child->style()->width().isFixed() && child->usesLineWidth()) // The child's width is a percentage of the line width. @@ -1225,9 +1225,9 @@ void RenderBlock::clearPageBreak(RenderObject* child, int pageBottom) child->setChildNeedsLayout(true); if (!child->flowAroundFloats() && child->hasFloats()) child->markAllDescendantsWithFloatsForLayout(); - if (child->tqcontainsPageBreak()) + if (child->containsPageBreak()) child->setNeedsLayout(true); - child->tqlayoutIfNeeded(); + child->layoutIfNeeded(); child->setAfterPageBreak(true); } @@ -1235,7 +1235,7 @@ void RenderBlock::clearPageBreak(RenderObject* child, int pageBottom) int RenderBlock::estimateVerticalPosition(RenderObject* child, const MarginInfo& marginInfo) { // FIXME: We need to eliminate the estimation of vertical position, because - // when it's wrong we sometimes trigger a pathological retqlayout if there are + // when it's wrong we sometimes trigger a pathological relayout if there are // intruding floats. int yPosEstimate = m_height; if (!marginInfo.canCollapseWithTop()) { @@ -1344,10 +1344,10 @@ void RenderBlock::handleBottomOfBlock(int top, int bottom, MarginInfo& marginInf setCollapsedBottomMargin(marginInfo); } -void RenderBlock::tqlayoutBlockChildren( bool retqlayoutChildren ) +void RenderBlock::layoutBlockChildren( bool relayoutChildren ) { #ifdef DEBUG_LAYOUT - kdDebug( 6040 ) << renderName() << " tqlayoutBlockChildren( " << this <<" ), retqlayoutChildren="<< retqlayoutChildren << endl; + kdDebug( 6040 ) << renderName() << " layoutBlockChildren( " << this <<" ), relayoutChildren="<< relayoutChildren << endl; #endif int top = borderTop() + paddingTop(); @@ -1362,9 +1362,9 @@ void RenderBlock::tqlayoutBlockChildren( bool retqlayoutChildren ) MarginInfo marginInfo(this, top, bottom); CompactInfo compactInfo; - // Fieldsets need to tqfind their legend and position it inside the border of the object. - // The legend then gets skipped during normal tqlayout. - RenderObject* legend = tqlayoutLegend(retqlayoutChildren); + // Fieldsets need to find their legend and position it inside the border of the object. + // The legend then gets skipped during normal layout. + RenderObject* legend = layoutLegend(relayoutChildren); PageBreakInfo pageBreakInfo(pageTopAfter(0)); @@ -1379,8 +1379,8 @@ void RenderBlock::tqlayoutBlockChildren( bool retqlayoutChildren ) int oldTopPosMargin = m_maxTopPosMargin; int oldTopNegMargin = m_maxTopNegMargin; - // make sure we retqlayout children if we need it. - if (!child->isPositioned() && (retqlayoutChildren || + // make sure we relayout children if we need it. + if (!child->isPositioned() && (relayoutChildren || (child->isReplaced() && (child->style()->width().isPercent() || child->style()->height().isPercent())) || (child->isRenderBlock() && child->style()->height().isPercent()) || (child->isBody() && child->style()->htmlHacks()))) @@ -1407,11 +1407,11 @@ void RenderBlock::tqlayoutBlockChildren( bool retqlayoutChildren ) // Try to guess our correct y position. In most cases this guess will // be correct. Only if we're wrong (when we compute the real y position) - // will we have to potentially retqlayout. + // will we have to potentially relayout. int yPosEstimate = estimateVerticalPosition(child, marginInfo); // If an element might be affected by the presence of floats, then always mark it for - // tqlayout. + // layout. if ( !child->flowAroundFloats() || child->usesLineWidth() ) { int fb = floatBottom(); if (fb > m_height || fb > yPosEstimate) @@ -1420,7 +1420,7 @@ void RenderBlock::tqlayoutBlockChildren( bool retqlayoutChildren ) // Go ahead and position the child as though it didn't collapse with the top. child->setPos(child->xPos(), yPosEstimate); - child->tqlayoutIfNeeded(); + child->layoutIfNeeded(); // Now determine the correct ypos based on examination of collapsing margin // values. @@ -1501,9 +1501,9 @@ void RenderBlock::clearChildOfPageBreaks(RenderObject *child, PageBreakInfo &pag int xpage = crossesPageBreak(childTop, childBottom); if (xpage || forcePageBreak) { - if (!forcePageBreak && child->tqcontainsPageBreak() && !child->needsPageClear()) { + if (!forcePageBreak && child->containsPageBreak() && !child->needsPageClear()) { #ifdef PAGE_DEBUG - kdDebug(6040) << renderName() << " Child tqcontains page-break to page " << xpage << endl; + kdDebug(6040) << renderName() << " Child contains page-break to page " << xpage << endl; #endif // ### Actually this assumes floating children are breaking/clearing // nicely as well. @@ -1572,24 +1572,24 @@ void RenderBlock::clearChildOfPageBreaks(RenderObject *child, PageBreakInfo &pag pageBreakInfo.setForcePageBreak(true); } -void RenderBlock::tqlayoutPositionedObjects(bool retqlayoutChildren) +void RenderBlock::layoutPositionedObjects(bool relayoutChildren) { if (m_positionedObjects) { - //kdDebug( 6040 ) << renderName() << " " << this << "::tqlayoutPositionedObjects() start" << endl; + //kdDebug( 6040 ) << renderName() << " " << this << "::layoutPositionedObjects() start" << endl; RenderObject* r; TQPtrListIterator it(*m_positionedObjects); for ( ; (r = it.current()); ++it ) { //kdDebug(6040) << " have a positioned object" << endl; if (r->markedForRepaint()) { - r->tqrepaintDuringLayout(); + r->repaintDuringLayout(); r->setMarkedForRepaint(false); } - if ( retqlayoutChildren || r->style()->position() == FIXED || + if ( relayoutChildren || r->style()->position() == FIXED || ((r->hasStaticY()||r->hasStaticX()) && r->parent() != this && r->parent()->isBlockFlow()) ) { r->setChildNeedsLayout(true); r->dirtyFormattingContext(false); } - r->tqlayoutIfNeeded(); + r->layoutIfNeeded(); } } } @@ -1775,7 +1775,7 @@ void RenderBlock::insertFloatingObject(RenderObject *o) FloatingObject *newObj; if (o->isFloating()) { // floating object - o->tqlayoutIfNeeded(); + o->layoutIfNeeded(); if(o->style()->floating() & FLEFT) newObj = new FloatingObject(FloatingObject::FloatLeft); @@ -1894,7 +1894,7 @@ void RenderBlock::positionNewFloats() if (ftQuirk && (rightRelOffset(y,ro, false)-fx < f->width)) { o->setPos( o->xPos(), y + o->marginTop() ); o->setChildNeedsLayout(true, false); - o->tqlayoutIfNeeded(); + o->layoutIfNeeded(); _height = o->height() + o->marginTop() + o->marginBottom(); f->width = o->width() + o->marginLeft() + o->marginRight(); } @@ -1918,7 +1918,7 @@ void RenderBlock::positionNewFloats() if (ftQuirk && (fx - leftRelOffset(y,lo, false) < f->width)) { o->setPos( o->xPos(), y + o->marginTop() ); o->setChildNeedsLayout(true, false); - o->tqlayoutIfNeeded(); + o->layoutIfNeeded(); _height = o->height() + o->marginTop() + o->marginBottom(); f->width = o->width() + o->marginLeft() + o->marginRight(); } @@ -1950,7 +1950,7 @@ void RenderBlock::newLine() positionNewFloats(); // set y position int newY = 0; - switch(m_cleartqStatus) + switch(m_clearStatus) { case CLEFT: newY = leftBottom(); @@ -1968,7 +1968,7 @@ void RenderBlock::newLine() // kdDebug( 6040 ) << "adjusting y position" << endl; m_height = newY; } - m_cleartqStatus = CNONE; + m_clearStatus = CNONE; } int @@ -2315,7 +2315,7 @@ RenderBlock::clearFloats() RenderObject *prev = previousSibling(); - // tqfind the element to copy the floats from + // find the element to copy the floats from // pass non-flows // pass fAF's bool parentHasFloats = false; @@ -2438,7 +2438,7 @@ void RenderBlock::addOverHangingFloats( RenderBlock *flow, int xoff, int offset, } } -bool RenderBlock::tqcontainsFloat(RenderObject* o) const +bool RenderBlock::containsFloat(RenderObject* o) const { if (m_floatingObjects) { TQPtrListIterator it(*m_floatingObjects); @@ -2463,7 +2463,7 @@ void RenderBlock::markAllDescendantsWithFloatsForLayout(RenderObject* floatToRem if (!childrenInline()) { for (RenderObject* child = firstChild(); child; child = child->nextSibling()) { if (isBlockFlow() && !child->isFloatingOrPositioned() && - ((floatToRemove ? child->tqcontainsFloat(floatToRemove) : child->hasFloats()) || child->usesLineWidth())) + ((floatToRemove ? child->containsFloat(floatToRemove) : child->hasFloats()) || child->usesLineWidth())) child->markAllDescendantsWithFloatsForLayout(floatToRemove); } } @@ -2518,7 +2518,7 @@ bool RenderBlock::isPointInScrollbar(int _x, int _y, int _tx, int _ty) _ty + borderTop() - borderTopExtra(), m_layer->verticalScrollbarWidth(), height() + borderTopExtra() + borderBottomExtra()-borderTop()-borderBottom()); - if (vertRect.tqcontains(_x, _y)) { + if (vertRect.contains(_x, _y)) { #ifdef APPLE_CHANGES RenderLayer::gScrollBar = m_layer->verticalScrollbar(); #endif @@ -2531,7 +2531,7 @@ bool RenderBlock::isPointInScrollbar(int _x, int _y, int _tx, int _ty) _ty + height() + borderTop() + borderBottomExtra() - borderBottom() - m_layer->horizontalScrollbarHeight(), width()-borderLeft()-borderRight(), m_layer->horizontalScrollbarHeight()); - if (horizRect.tqcontains(_x, _y)) { + if (horizRect.contains(_x, _y)) { #ifdef APPLE_CHANGES RenderLayer::gScrollBar = m_layer->horizontalScrollbar(); #endif @@ -2705,7 +2705,7 @@ void RenderBlock::calcInlineMinMaxWidth() // and are included in the iteration solely so that their margins can // be added in. // - // (2) An inline non-text non-flow object, e.g., an inline tqreplaced element. + // (2) An inline non-text non-flow object, e.g., an inline replaced element. // These objects can always be on a line by themselves, so in this situation // we need to go ahead and break the current line, and then add in our own // margins and min/max width on its own line, and then terminate the line. @@ -2735,7 +2735,7 @@ void RenderBlock::calcInlineMinMaxWidth() short childMax = 0; if (!child->isText()) { - // Case (1) and (2). Inline tqreplaced and inline flow elements. + // Case (1) and (2). Inline replaced and inline flow elements. if (child->isInlineFlow()) { // Add in padding/border/margin from the appropriate side of // the element. @@ -2747,7 +2747,7 @@ void RenderBlock::calcInlineMinMaxWidth() inlineMax += childMax; } else { - // Inline tqreplaced elements add in their margins to their min/max values. + // Inline replaced elements add in their margins to their min/max values. int margins = 0; LengthType type = cstyle->marginLeft().type(); if ( type != Variable ) @@ -2763,7 +2763,7 @@ void RenderBlock::calcInlineMinMaxWidth() if (!child->isRenderInline() && !child->isText()) { bool qBreak = isTcQuirk && !child->isFloatingOrPositioned(); - // Case (2). Inline tqreplaced elements and floats. + // Case (2). Inline replaced elements and floats. // Go ahead and terminate the current line as far as // minwidth is concerned. childMin += child->minWidth(); @@ -3143,7 +3143,7 @@ void RenderBlock::dump(TQTextStream &stream, const TQString &ind) const stream << ")"; } - // ### EClear m_cleartqStatus + // ### EClear m_clearStatus } #endif diff --git a/khtml/rendering/render_block.h b/khtml/rendering/render_block.h index df8d16fe0..2b0e49398 100644 --- a/khtml/rendering/render_block.h +++ b/khtml/rendering/render_block.h @@ -98,21 +98,21 @@ public: virtual void attach(); void updateFirstLetter(); - virtual void tqlayout(); - void tqlayoutBlock( bool retqlayoutChildren ); - void tqlayoutBlockChildren( bool retqlayoutChildren ); - void tqlayoutInlineChildren( bool retqlayoutChildren, int breakBeforeLine = 0); + virtual void layout(); + void layoutBlock( bool relayoutChildren ); + void layoutBlockChildren( bool relayoutChildren ); + void layoutInlineChildren( bool relayoutChildren, int breakBeforeLine = 0); - void tqlayoutPositionedObjects( bool retqlayoutChildren ); + void layoutPositionedObjects( bool relayoutChildren ); void insertPositionedObject(RenderObject *o); void removePositionedObject(RenderObject *o); // Called to lay out the legend for a fieldset. - virtual RenderObject* tqlayoutLegend(bool /*retqlayoutChildren*/) { return 0; }; + virtual RenderObject* layoutLegend(bool /*relayoutChildren*/) { return 0; }; // the implementation of the following functions is in bidi.cpp void bidiReorderLine(const BidiIterator &start, const BidiIterator &end, BidiState &bidi ); - BidiIterator tqfindNextLineBreak(BidiIterator &start, BidiState &info ); + BidiIterator findNextLineBreak(BidiIterator &start, BidiState &info ); InlineFlowBox* constructLine(const BidiIterator& start, const BidiIterator& end); InlineFlowBox* createLineBoxes(RenderObject* obj); void computeHorizontalPositionsForLine(InlineFlowBox* lineBox, BidiState &bidi); @@ -136,11 +136,11 @@ public: int getClearDelta(RenderObject *child); virtual void markAllDescendantsWithFloatsForLayout(RenderObject* floatToRemove = 0); - // FIXME: tqcontainsFloats() should not return true if the floating objects list - // is empty. However, tqlayoutInlineChildren() relies on the current behavior. + // FIXME: containsFloats() should not return true if the floating objects list + // is empty. However, layoutInlineChildren() relies on the current behavior. // http://bugzilla.opendarwin.org/show_bug.cgi?id=7395#c3 virtual bool hasFloats() const { return m_floatingObjects!=0; } - virtual bool tqcontainsFloat(RenderObject* o) const; + virtual bool containsFloat(RenderObject* o) const; virtual bool hasOverhangingFloats() const { return floatBottom() > m_height; } void addOverHangingFloats( RenderBlock *block, int xoffset, int yoffset, bool child ); @@ -222,7 +222,7 @@ protected: bool crossedLayer : 1; // lock noPaint flag }; - // The following helper functions and structs are used by tqlayoutBlockChildren. + // The following helper functions and structs are used by layoutBlockChildren. class CompactInfo { // A compact child that needs to be collapsed into the margin of the following block. RenderObject* m_compact; @@ -342,7 +342,7 @@ protected: void handleBottomOfBlock(int top, int bottom, MarginInfo& marginInfo); void setCollapsedBottomMargin(const MarginInfo& marginInfo); void clearChildOfPageBreaks(RenderObject* child, PageBreakInfo &pageBreakInfo, MarginInfo &marginInfo); - // End helper functions and structs used by tqlayoutBlockChildren. + // End helper functions and structs used by layoutBlockChildren. protected: // How much content overflows out of our block vertically or horizontally (all we support @@ -359,8 +359,8 @@ private: TQPtrList* m_positionedObjects; bool m_childrenInline : 1; - bool m_firstLine : 1; // used in inline tqlayouting - EClear m_cleartqStatus : 2; // used during layuting of paragraphs + bool m_firstLine : 1; // used in inline layouting + EClear m_clearStatus : 2; // used during layuting of paragraphs bool m_avoidPageBreak : 1; // anonymous avoid page-break block bool m_topMarginQuirk : 1; bool m_bottomMarginQuirk : 1; diff --git a/khtml/rendering/render_body.cpp b/khtml/rendering/render_body.cpp index 14256d91b..930ec358c 100644 --- a/khtml/rendering/render_body.cpp +++ b/khtml/rendering/render_body.cpp @@ -81,20 +81,20 @@ void RenderBody::paintBoxDecorations(PaintInfo& paintInfo, int _tx, int _ty) } -void RenderBody::tqrepaint(Priority p) +void RenderBody::repaint(Priority p) { RenderObject *cb = containingBlock(); if(cb) - cb->tqrepaint(p); + cb->repaint(p); } -void RenderBody::tqlayout() +void RenderBody::layout() { // in quirk mode, we'll need to have our margins determined // for percentage height calculations if (style()->htmlHacks()) calcHeight(); - RenderBlock::tqlayout(); + RenderBlock::layout(); if (!scrollbarsStyled) { diff --git a/khtml/rendering/render_body.h b/khtml/rendering/render_body.h index d508b8f5e..7951f73e1 100644 --- a/khtml/rendering/render_body.h +++ b/khtml/rendering/render_body.h @@ -40,9 +40,9 @@ public: virtual bool isBody() const { return true; } virtual const char *renderName() const { return "RenderBody"; } - virtual void tqrepaint(Priority p=NormalPriority); + virtual void repaint(Priority p=NormalPriority); - virtual void tqlayout(); + virtual void layout(); virtual void setStyle(RenderStyle* style); virtual int availableHeight() const; diff --git a/khtml/rendering/render_box.cpp b/khtml/rendering/render_box.cpp index 4ec95bf9c..e6742d54e 100644 --- a/khtml/rendering/render_box.cpp +++ b/khtml/rendering/render_box.cpp @@ -117,9 +117,9 @@ void RenderBox::restructureParentFlow() { static inline bool overflowAppliesTo(RenderObject* o) { // css 2.1-11.1.1 - // 1) overflow only applies to non-tqreplaced block-level elements, table cells, and inline-block elements + // 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::tqlayout) + // 2) overflow on root applies to the viewport (cf. KHTMLView::layout) if (!o->isRoot()) // 3) overflow on body may apply to the viewport... if (!o->isBody() @@ -490,7 +490,7 @@ void RenderBox::paintBackgroundExtended(TQPainter *p, const TQColor &c, const Ba TQColor bgColor = c; // Paint the color first underneath all images. - if (!bgLayer->next() && bgColor.isValid() && tqAlpha(bgColor.rgb()) > 0) + if (!bgLayer->next() && bgColor.isValid() && qAlpha(bgColor.rgb()) > 0) p->fillRect(_tx, clipy, w, cliph, bgColor); // no progressive loading of the background image @@ -622,7 +622,7 @@ void RenderBox::paintBackgroundExtended(TQPainter *p, const TQColor &c, const Ba sy+=b.y()-cy; cx=b.x();cy=b.y();cw=b.width();ch=b.height(); } - // restrict painting to tqrepaint-clip + // restrict painting to repaint-clip if (cy < clipy) { ch -= (clipy - cy); sy += (clipy - cy); @@ -795,7 +795,7 @@ void RenderBox::position(InlineBox* box, int /*from*/, int /*len*/, bool /*rever setPos( box->xPos(), box->yPos() ); } -void RenderBox::tqrepaint(Priority prior) +void RenderBox::repaint(Priority prior) { int ow = style() ? style()->outlineSize() : 0; if( isInline() && !isReplaced() ) @@ -806,17 +806,17 @@ void RenderBox::tqrepaint(Priority prior) p = p->parent(); int xoff = p->hasOverflowClip() ? 0 : p->overflowLeft(); int yoff = p->hasOverflowClip() ? 0 : p->overflowTop(); - p->tqrepaintRectangle( -ow + xoff, -ow + yoff, p->effectiveWidth()+ow*2, p->effectiveHeight()+ow*2, prior); + p->repaintRectangle( -ow + xoff, -ow + yoff, p->effectiveWidth()+ow*2, p->effectiveHeight()+ow*2, prior); } else { int xoff = hasOverflowClip() ? 0 : overflowLeft(); int yoff = hasOverflowClip() ? 0 : overflowTop(); - tqrepaintRectangle( -ow + xoff, -ow + yoff, effectiveWidth()+ow*2, effectiveHeight()+ow*2, prior); + repaintRectangle( -ow + xoff, -ow + yoff, effectiveWidth()+ow*2, effectiveHeight()+ow*2, prior); } } -void RenderBox::tqrepaintRectangle(int x, int y, int w, int h, Priority p, bool f) +void RenderBox::repaintRectangle(int x, int y, int w, int h, Priority p, bool f) { x += m_x; y += m_y; @@ -830,7 +830,7 @@ void RenderBox::tqrepaintRectangle(int x, int y, int w, int h, Priority p, bool if (style()->position() == FIXED) f=true; - // kdDebug( 6040 ) << "RenderBox(" <layer()) { @@ -839,7 +839,7 @@ void RenderBox::tqrepaintRectangle(int x, int y, int w, int h, Priority p, bool if (style()->position() == ABSOLUTE) o->layer()->checkInlineRelOffset(this,x,y); } - o->tqrepaintRectangle(x, y, w, h, p, f); + o->repaintRectangle(x, y, w, h, p, f); } } @@ -1364,8 +1364,8 @@ void RenderBox::calcAbsoluteHorizontal() // percentage issues. // The following is based off of the W3C Working Draft from April 11, 2006 of - // CSS 2.1: Section 10.3.7 "Absolutely positioned, non-tqreplaced elements" - // + // CSS 2.1: Section 10.3.7 "Absolutely positioned, non-replaced elements" + // // (block-style-comments in this function and in calcAbsoluteHorizontalValues() // correspond to text from the spec) @@ -1415,14 +1415,14 @@ void RenderBox::calcAbsoluteHorizontal() // Calculate the static distance if needed. if (left.isVariable() && right.isVariable()) { if (containerDirection == LTR) { - // 'm_staticX' should already have been set through tqlayout of the parent. + // 'm_staticX' should already have been set through layout of the parent. int staticPosition = m_staticX - containerBlock->borderLeft(); for (RenderObject* po = parent(); po && po != containerBlock; po = po->parent()) staticPosition += po->xPos(); left = Length(staticPosition, Fixed); } else { RenderObject* po = parent(); - // 'm_staticX' should already have been set through tqlayout of the parent. + // 'm_staticX' should already have been set through layout of the parent. int staticPosition = m_staticX + containerWidth + containerBlock->borderRight() - po->width(); for (; po && po != containerBlock; po = po->parent()) staticPosition -= po->xPos(); @@ -1575,7 +1575,7 @@ void RenderBox::calcAbsoluteHorizontalValues(Length width, const RenderObject* c * for 'right' * * Calculation of the shrink-to-fit width is similar to calculating the - * width of a table cell using the automatic table tqlayout algorithm. + * width of a table cell using the automatic table layout algorithm. * Roughly: calculate the preferred width by formatting the content * without breaking lines other than where explicit line breaks occur, * and also calculate the preferred minimum width, e.g., by trying all @@ -1596,7 +1596,7 @@ void RenderBox::calcAbsoluteHorizontalValues(Length width, const RenderObject* c const int availableSpace = containerWidth - (marginLeftValue + marginRightValue + bordersPlusPadding); - // FIXME: Is there a faster way to tqfind the correct case? + // FIXME: Is there a faster way to find the correct case? // Use rule/case that applies. if (leftIsAuto && widthIsAuto && !rightIsAuto) { // RULE 1: (use shrink-to-fit for width, and solve of left) @@ -1645,8 +1645,8 @@ void RenderBox::calcAbsoluteVertical() } // The following is based off of the W3C Working Draft from April 11, 2006 of - // CSS 2.1: Section 10.6.4 "Absolutely positioned, non-tqreplaced elements" - // + // CSS 2.1: Section 10.6.4 "Absolutely positioned, non-replaced elements" + // // (block-style-comments in this function and in calcAbsoluteVerticalValues() // correspond to text from the spec) @@ -1680,7 +1680,7 @@ void RenderBox::calcAbsoluteVertical() // Calculate the static distance if needed. if (top.isVariable() && bottom.isVariable()) { - // m_staticY should already have been set through tqlayout of the parent() + // m_staticY should already have been set through layout of the parent() int staticTop = m_staticY - containerBlock->borderTop(); for (RenderObject* po = parent(); po && po != containerBlock; po = po->parent()) { staticTop += po->yPos(); @@ -1876,8 +1876,8 @@ void RenderBox::calcAbsoluteVerticalValues(Length height, const RenderObject* co void RenderBox::calcAbsoluteHorizontalReplaced() { // The following is based off of the W3C Working Draft from April 11, 2006 of - // CSS 2.1: Section 10.3.8 "Absolutly positioned, tqreplaced elements" - // + // CSS 2.1: Section 10.3.8 "Absolutly positioned, replaced elements" + // // (block-style-comments in this function correspond to text from the spec and // the numbers correspond to numbers in spec) @@ -1900,12 +1900,12 @@ void RenderBox::calcAbsoluteHorizontalReplaced() /*-----------------------------------------------------------------------*\ - * 1. The used value of 'width' is determined as for inline tqreplaced + * 1. The used value of 'width' is determined as for inline replaced * elements. \*-----------------------------------------------------------------------*/ // NOTE: This value of width is FINAL in that the min/max width calculations // are dealt with in calcReplacedWidth(). This means that the steps to produce - // correct max/min in the non-tqreplaced version, are not necessary. + // correct max/min in the non-replaced version, are not necessary. m_width = calcReplacedWidth() + borderLeft() + borderRight() + paddingLeft() + paddingRight(); const int availableSpace = containerWidth - m_width; @@ -1917,14 +1917,14 @@ void RenderBox::calcAbsoluteHorizontalReplaced() if (left.isVariable() && right.isVariable()) { // see FIXME 1 if (containerDirection == LTR) { - // 'm_staticX' should already have been set through tqlayout of the parent. + // 'm_staticX' should already have been set through layout of the parent. int staticPosition = m_staticX - containerBlock->borderLeft(); for (RenderObject* po = parent(); po && po != containerBlock; po = po->parent()) staticPosition += po->xPos(); left.setValue(Fixed, staticPosition); } else { RenderObject* po = parent(); - // 'm_staticX' should already have been set through tqlayout of the parent. + // 'm_staticX' should already have been set through layout of the parent. int staticPosition = m_staticX + containerWidth + containerBlock->borderRight() - po->width(); for (; po && po != containerBlock; po = po->parent()) staticPosition -= po->xPos(); @@ -1933,7 +1933,7 @@ void RenderBox::calcAbsoluteHorizontalReplaced() } /*-----------------------------------------------------------------------*\ - * 3. If 'left' or 'right' are 'auto', tqreplace any 'auto' on 'margin-left' + * 3. If 'left' or 'right' are 'auto', replace any 'auto' on 'margin-left' * or 'margin-right' with '0'. \*-----------------------------------------------------------------------*/ if (left.isVariable() || right.isVariable()) { @@ -2040,8 +2040,8 @@ void RenderBox::calcAbsoluteHorizontalReplaced() void RenderBox::calcAbsoluteVerticalReplaced() { // The following is based off of the W3C Working Draft from April 11, 2006 of - // CSS 2.1: Section 10.6.5 "Absolutly positioned, tqreplaced elements" - // + // CSS 2.1: Section 10.6.5 "Absolutly positioned, replaced elements" + // // (block-style-comments in this function correspond to text from the spec and // the numbers correspond to numbers in spec) @@ -2057,21 +2057,21 @@ void RenderBox::calcAbsoluteVerticalReplaced() /*-----------------------------------------------------------------------*\ - * 1. The used value of 'height' is determined as for inline tqreplaced + * 1. The used value of 'height' is determined as for inline replaced * elements. \*-----------------------------------------------------------------------*/ // NOTE: This value of height is FINAL in that the min/max height calculations // are dealt with in calcReplacedHeight(). This means that the steps to produce - // correct max/min in the non-tqreplaced version, are not necessary. + // correct max/min in the non-replaced version, are not necessary. m_height = calcReplacedHeight() + borderTop() + borderBottom() + paddingTop() + paddingBottom(); const int availableSpace = containerHeight - m_height; /*-----------------------------------------------------------------------*\ - * 2. If both 'top' and 'bottom' have the value 'auto', tqreplace 'top' + * 2. If both 'top' and 'bottom' have the value 'auto', replace 'top' * with the element's static position. \*-----------------------------------------------------------------------*/ if (top.isVariable() && bottom.isVariable()) { - // m_staticY should already have been set through tqlayout of the parent(). + // m_staticY should already have been set through layout of the parent(). int staticTop = m_staticY - containerBlock->borderTop(); for (RenderObject* po = parent(); po && po != containerBlock; po = po->parent()) { staticTop += po->yPos(); @@ -2080,7 +2080,7 @@ void RenderBox::calcAbsoluteVerticalReplaced() } /*-----------------------------------------------------------------------*\ - * 3. If 'bottom' is 'auto', tqreplace any 'auto' on 'margin-top' or + * 3. If 'bottom' is 'auto', replace any 'auto' on 'margin-top' or * 'margin-bottom' with '0'. \*-----------------------------------------------------------------------*/ // FIXME: The spec. says that this step should only be taken when bottom is @@ -2296,7 +2296,7 @@ void RenderBox::caretPos(int /*offset*/, int flags, int &_x, int &_y, int &width switch (s->textAlign()) { case LEFT: case KHTML_LEFT: - case TAAUTO: // ### tqfind out what this does + case TAAUTO: // ### find out what this does case JUSTIFY: break; case CENTER: diff --git a/khtml/rendering/render_box.h b/khtml/rendering/render_box.h index dcc38ba7d..c0c618d5c 100644 --- a/khtml/rendering/render_box.h +++ b/khtml/rendering/render_box.h @@ -87,9 +87,9 @@ public: virtual int rightmostPosition(bool includeOverflowInterior=true, bool includeSelf=true) const; virtual int leftmostPosition(bool includeOverflowInterior=true, bool includeSelf=true) const; - virtual void tqrepaint(Priority p=NormalPriority); + virtual void repaint(Priority p=NormalPriority); - virtual void tqrepaintRectangle(int x, int y, int w, int h, Priority p=NormalPriority, bool f=false); + virtual void repaintRectangle(int x, int y, int w, int h, Priority p=NormalPriority, bool f=false); virtual short containingBlockWidth() const; void relativePositionOffset(int &tx, int &ty) const; @@ -202,7 +202,7 @@ protected: /* A box used to represent this object on a line * when its inner content isn't contextually relevant - * (e.g tqreplaced or positioned elements) + * (e.g replaced or positioned elements) */ InlineBox *m_placeHolderBox; }; diff --git a/khtml/rendering/render_canvas.cpp b/khtml/rendering/render_canvas.cpp index 02eaa1599..e8540eba6 100644 --- a/khtml/rendering/render_canvas.cpp +++ b/khtml/rendering/render_canvas.cpp @@ -136,7 +136,7 @@ void RenderCanvas::calcMinMaxWidth() //#define SPEED_DEBUG -void RenderCanvas::tqlayout() +void RenderCanvas::layout() { if (m_pagedMode) { m_minWidth = m_width; @@ -178,12 +178,12 @@ void RenderCanvas::tqlayout() qt.start(); #endif - bool retqlayoutChildren = (oldWidth != m_width) || (oldHeight != m_height); + bool relayoutChildren = (oldWidth != m_width) || (oldHeight != m_height); - RenderBlock::tqlayoutBlock( retqlayoutChildren ); + RenderBlock::layoutBlock( relayoutChildren ); #ifdef SPEED_DEBUG - kdDebug() << "RenderCanvas::tqlayout time used=" << qt.elapsed() << endl; + kdDebug() << "RenderCanvas::layout time used=" << qt.elapsed() << endl; qt.start(); #endif @@ -217,11 +217,11 @@ void RenderCanvas::updateDocumentSize() // if we are about to show a scrollbar, and the document is sized to the viewport w or h, // then reserve the scrollbar space so that it doesn't trigger the _other_ scrollbar - if (!vss && m_width - m_view->verticalScrollBar()->tqsizeHint().width() == s.width() && + if (!vss && m_width - m_view->verticalScrollBar()->sizeHint().width() == s.width() && m_cachedDocWidth <= m_width) hDocW = kMin( m_cachedDocWidth, s.width() ); - if (!hss && m_height - m_view->horizontalScrollBar()->tqsizeHint().height() == s.height() && + if (!hss && m_height - m_view->horizontalScrollBar()->sizeHint().height() == s.height() && m_cachedDocHeight <= m_height) hDocH = kMin( m_cachedDocHeight, s.height() ); @@ -269,7 +269,7 @@ bool RenderCanvas::needsFullRepaint() const return m_needsFullRepaint || m_pagedMode; } -void RenderCanvas::tqrepaintViewRectangle(int x, int y, int w, int h, bool asap) +void RenderCanvas::repaintViewRectangle(int x, int y, int w, int h, bool asap) { KHTMLAssert( view() ); view()->scheduleRepaint( x, y, w, h, asap ); @@ -332,7 +332,7 @@ void RenderCanvas::paintBoxDecorations(PaintInfo& paintInfo, int /*_tx*/, int /* paintInfo.p->fillRect(paintInfo.r, view()->palette().active().color(TQColorGroup::Base)); } -void RenderCanvas::tqrepaintRectangle(int x, int y, int w, int h, Priority p, bool f) +void RenderCanvas::repaintRectangle(int x, int y, int w, int h, Priority p, bool f) { if (m_staticMode) return; // kdDebug( 6040 ) << "updating views contents (" << x << "/" << y << ") (" << w << "/" << h << ")" << endl; @@ -353,7 +353,7 @@ void RenderCanvas::tqrepaintRectangle(int x, int y, int w, int h, Priority p, bo if (p == RealtimePriority) // ### KWQ's updateContents has an additional parameter "now". // It's not clear what the difference between updateContents(...,true) - // and tqrepaintContents(...) is. As Qt doesn't have this, I'm leaving it out. (LS) + // and repaintContents(...) is. As Qt doesn't have this, I'm leaving it out. (LS) m_view->updateContents(ur/*, true*/); else if (p == HighPriority) m_view->scheduleRepaint(x, y, w, h, true /*asap*/); @@ -372,23 +372,23 @@ void RenderCanvas::scheduleDeferredRepaints() if (!needsFullRepaint()) { TQValueList::const_iterator it; for ( it = m_dirtyChildren.begin(); it != m_dirtyChildren.end(); ++it ) - (*it)->tqrepaint(); + (*it)->repaint(); } - //kdDebug(6040) << "scheduled deferred tqrepaints: " << m_dirtyChildren.count() << " needed full tqrepaint: " << needsFullRepaint() << endl; + //kdDebug(6040) << "scheduled deferred repaints: " << m_dirtyChildren.count() << " needed full repaint: " << needsFullRepaint() << endl; m_dirtyChildren.clear(); } -void RenderCanvas::tqrepaint(Priority p) +void RenderCanvas::repaint(Priority p) { if (m_view && !m_staticMode) { if (p == RealtimePriority) { //m_view->resizeContents(docWidth(), docHeight()); m_view->unscheduleRepaint(); if (needsLayout()) { - m_view->scheduleRetqlayout(); + m_view->scheduleRelayout(); return; } - // ### same as in tqrepaintRectangle + // ### same as in repaintRectangle m_view->updateContents(m_view->contentsX(), m_view->contentsY(), m_view->visibleWidth(), m_view->visibleHeight()/*, true*/); } @@ -454,7 +454,7 @@ TQRect RenderCanvas::selectionRect() const void RenderCanvas::setSelection(RenderObject *s, int sp, RenderObject *e, int ep) { // Check we got valid renderobjects. www.msnbc.com and clicking - // around, to tqfind the case where this happened. + // around, to find the case where this happened. if ( !s || !e ) { kdWarning(6040) << "RenderCanvas::setSelection() called with start=" << s << " end=" << e << endl; @@ -492,7 +492,7 @@ void RenderCanvas::setSelection(RenderObject *s, int sp, RenderObject *e, int ep no = no->nextSibling(); } } - if (os->selectionState() == SelectionInside && !oldSelectedInside.tqcontainsRef(os)) + if (os->selectionState() == SelectionInside && !oldSelectedInside.containsRef(os)) oldSelectedInside.append(os); os = no; @@ -550,7 +550,7 @@ void RenderCanvas::setSelection(RenderObject *s, int sp, RenderObject *e, int ep if (no) no = no->nextSibling(); } - if (o->selectionState() == SelectionInside && !newSelectedInside.tqcontainsRef(o)) + if (o->selectionState() == SelectionInside && !newSelectedInside.containsRef(o)) newSelectedInside.append(o); o=no; @@ -567,7 +567,7 @@ void RenderCanvas::setSelection(RenderObject *s, int sp, RenderObject *e, int ep TQRect updateRect; - // Don't use tqrepaint() because it will cause all rects to + // Don't use repaint() because it will cause all rects to // be united (see khtmlview::scheduleRepaint()). Instead // just draw damage rects for objects that have a change // in selection state. @@ -581,7 +581,7 @@ void RenderCanvas::setSelection(RenderObject *s, int sp, RenderObject *e, int ep TQPtrListIterator oldIterator(oldSelectedInside); bool firstRect = true; for (; oldIterator.current(); ++oldIterator){ - if (!newSelectedInside.tqcontainsRef(oldIterator.current())){ + if (!newSelectedInside.containsRef(oldIterator.current())){ if (firstRect){ updateRect = enclosingPositionedRect(oldIterator.current()); firstRect = false; @@ -601,7 +601,7 @@ void RenderCanvas::setSelection(RenderObject *s, int sp, RenderObject *e, int ep TQPtrListIterator newIterator(newSelectedInside); firstRect = true; for (; newIterator.current(); ++newIterator){ - if (!oldSelectedInside.tqcontainsRef(newIterator.current())){ + if (!oldSelectedInside.containsRef(newIterator.current())){ if (firstRect){ updateRect = enclosingPositionedRect(newIterator.current()); firstRect = false; @@ -651,9 +651,9 @@ void RenderCanvas::clearSelection(bool doRepaint) { if (o->selectionState()!=SelectionNone) if (doRepaint) - o->tqrepaint(); + o->repaint(); o->setSelectionState(SelectionNone); - o->tqrepaint(); + o->repaint(); RenderObject* no; if ( !(no = o->firstChild()) ) if ( !(no = o->nextSibling()) ) @@ -669,7 +669,7 @@ void RenderCanvas::clearSelection(bool doRepaint) if (m_selectionEnd) { m_selectionEnd->setSelectionState(SelectionNone); if (doRepaint) - m_selectionEnd->tqrepaint(); + m_selectionEnd->repaint(); } // set selection start & end to 0 diff --git a/khtml/rendering/render_canvas.h b/khtml/rendering/render_canvas.h index 741e56f4e..17f279d7b 100644 --- a/khtml/rendering/render_canvas.h +++ b/khtml/rendering/render_canvas.h @@ -50,7 +50,7 @@ public: virtual bool isCanvas() const { return true; } virtual void setStyle(RenderStyle *style); - virtual void tqlayout(); + virtual void layout(); virtual void calcWidth(); virtual void calcHeight(); virtual void calcMinMaxWidth(); @@ -61,9 +61,9 @@ public: KHTMLView *view() const { return m_view; } - virtual void tqrepaint(Priority p=NormalPriority); - virtual void tqrepaintRectangle(int x, int y, int w, int h, Priority p=NormalPriority, bool f=false); - void tqrepaintViewRectangle(int x, int y, int w, int h, bool asap=false); + virtual void repaint(Priority p=NormalPriority); + virtual void repaintRectangle(int x, int y, int w, int h, Priority p=NormalPriority, bool f=false); + void repaintViewRectangle(int x, int y, int w, int h, bool asap=false); bool needsFullRepaint() const; void deferredRepaint( RenderObject* o ); void scheduleDeferredRepaints(); @@ -137,7 +137,7 @@ protected: void updateDocumentSize(); // internal setters for cached values of document width/height - // Setting to -1/-1 tqinvalidates the cache. + // Setting to -1/-1 invalidates the cache. void setCachedDocWidth(int w ) { m_cachedDocWidth = w; } void setCachedDocHeight(int h) { m_cachedDocHeight = h; } @@ -170,7 +170,7 @@ protected: bool m_staticMode; // Canvas is paged bool m_pagedMode; - // Canvas tqcontains overlaid widgets + // Canvas contains overlaid widgets bool m_needsWidgetMasks; short m_pageNr; diff --git a/khtml/rendering/render_container.cpp b/khtml/rendering/render_container.cpp index df7bfab79..69f987477 100644 --- a/khtml/rendering/render_container.cpp +++ b/khtml/rendering/render_container.cpp @@ -144,7 +144,7 @@ void RenderContainer::addChild(RenderObject *newChild, RenderObject *beforeChild newStyle->inheritFrom(style()); newStyle->setDisplay( TABLE ); newStyle->setFlowAroundFloats( true ); - table->setParent( this ); // so it tqfinds the arena + table->setParent( this ); // so it finds the arena table->setStyle(newStyle); table->setParent( 0 ); addChild(table, beforeChild); @@ -170,15 +170,15 @@ RenderObject* RenderContainer::removeChildNode(RenderObject* oldChild) KHTMLAssert(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 tqrepaint, so that the area exposed when the child - // disappears gets tqrepainted properly. + // that a positioned child got yanked). We also repaint, so that the area exposed when the child + // disappears gets repainted properly. if ( document()->renderer() ) { oldChild->setNeedsLayoutAndMinMaxRecalc(); - oldChild->tqrepaint(); + oldChild->repaint(); // Keep our layer hierarchy updated. oldChild->removeLayers(enclosingLayer()); - // remove the child from any special tqlayout lists + // remove the child from any special layout lists oldChild->removeFromObjectLists(); // if oldChild is the start or end of the selection, then clear @@ -524,7 +524,7 @@ void RenderContainer::insertChildNode(RenderObject* child, RenderObject* beforeC } -void RenderContainer::tqlayout() +void RenderContainer::layout() { KHTMLAssert( needsLayout() ); KHTMLAssert( minMaxKnown() ); @@ -532,8 +532,8 @@ void RenderContainer::tqlayout() RenderObject *child = firstChild(); while( child ) { if (pagedMode) child->setNeedsLayout(true); - child->tqlayoutIfNeeded(); - if (child->tqcontainsPageBreak()) setContainsPageBreak(true); + child->layoutIfNeeded(); + if (child->containsPageBreak()) setContainsPageBreak(true); if (child->needsPageClear()) setNeedsPageClear(true); child = child->nextSibling(); } diff --git a/khtml/rendering/render_container.h b/khtml/rendering/render_container.h index fb80bfc55..4cf386140 100644 --- a/khtml/rendering/render_container.h +++ b/khtml/rendering/render_container.h @@ -42,7 +42,7 @@ public: RenderObject *lastChild() const { return m_last; } virtual bool childAllowed() const { - // Prevent normal children when we are tqreplaced by generated content + // Prevent normal children when we are replaced by generated content if (style()) return style()->useNormalContent(); return true; } @@ -53,7 +53,7 @@ public: virtual void appendChildNode(RenderObject* child); virtual void insertChildNode(RenderObject* child, RenderObject* before); - virtual void tqlayout(); + virtual void layout(); virtual void calcMinMaxWidth() { setMinMaxKnown( true ); } virtual void removeLeftoverAnonymousBoxes(); diff --git a/khtml/rendering/render_flow.cpp b/khtml/rendering/render_flow.cpp index 3bd21fe6f..ae579bd46 100644 --- a/khtml/rendering/render_flow.cpp +++ b/khtml/rendering/render_flow.cpp @@ -267,12 +267,12 @@ bool RenderFlow::hitTestLines(NodeInfo& i, int x, int y, int tx, int ty, HitTest } -void RenderFlow::tqrepaint(Priority prior) +void RenderFlow::repaint(Priority prior) { if (isInlineFlow()) { // Find our leftmost position. int left = 0; - // root inline box not reliably availabe during retqlayout + // root inline box not reliably availabe during relayout int top = firstLineBox() ? ( needsLayout() ? firstLineBox()->xPos() : firstLineBox()->root()->topOverflow() ) : 0; @@ -280,7 +280,7 @@ void RenderFlow::tqrepaint(Priority prior) if (curr == firstLineBox() || curr->xPos() < left) left = curr->xPos(); - // Now tqinvalidate a rectangle. + // Now invalidate a rectangle. int ow = style() ? style()->outlineSize() : 0; // We need to add in the relative position offsets of any inlines (including us) up to our @@ -295,18 +295,18 @@ void RenderFlow::tqrepaint(Priority prior) } RootInlineBox *lastRoot = lastLineBox() && !needsLayout() ? lastLineBox()->root() : 0; - containingBlock()->tqrepaintRectangle(-ow+left, -ow+top, + containingBlock()->repaintRectangle(-ow+left, -ow+top, width()+ow*2, (lastRoot ? lastRoot->bottomOverflow() - top : height())+ow*2, prior); } else { if (firstLineBox() && firstLineBox()->topOverflow() < 0) { int ow = style() ? style()->outlineSize() : 0; - tqrepaintRectangle(-ow, -ow+firstLineBox()->topOverflow(), + repaintRectangle(-ow, -ow+firstLineBox()->topOverflow(), effectiveWidth()+ow*2, effectiveHeight()+ow*2, prior); } else - return RenderBox::tqrepaint(prior); + return RenderBox::repaint(prior); } } diff --git a/khtml/rendering/render_flow.h b/khtml/rendering/render_flow.h index 85321cd5d..1e23822bb 100644 --- a/khtml/rendering/render_flow.h +++ b/khtml/rendering/render_flow.h @@ -32,12 +32,12 @@ namespace khtml { /** - * all tqgeometry managing stuff is only in the block elements. + * all geometry managing stuff is only in the block elements. * - * Inline elements don't tqlayout themselves, but the whole paragraph + * Inline elements don't layout themselves, but the whole paragraph * gets flowed by the surrounding block element. This is, because * one needs to know the whole paragraph to calculate bidirectional - * behaviour of text, so putting the tqlayouting routines in the inline + * behaviour of text, so putting the layouting routines in the inline * elements is impossible. */ class RenderFlow : public RenderBox @@ -69,7 +69,7 @@ public: void paintLines(PaintInfo& i, int _tx, int _ty); bool hitTestLines(NodeInfo& i, int x, int y, int tx, int ty, HitTestAction hitTestAction); - virtual void tqrepaint(Priority p=NormalPriority); + virtual void repaint(Priority p=NormalPriority); virtual int highestPosition(bool includeOverflowInterior=true, bool includeSelf=true) const; virtual int lowestPosition(bool includeOverflowInterior=true, bool includeSelf=true) const; diff --git a/khtml/rendering/render_form.cpp b/khtml/rendering/render_form.cpp index ca556ecb5..58a9a8d33 100644 --- a/khtml/rendering/render_form.cpp +++ b/khtml/rendering/render_form.cpp @@ -81,7 +81,7 @@ void RenderFormElement::updateFromElement() RenderWidget::updateFromElement(); } -void RenderFormElement::tqlayout() +void RenderFormElement::layout() { KHTMLAssert( needsLayout() ); KHTMLAssert( minMaxKnown() ); @@ -155,8 +155,8 @@ void RenderCheckBox::calcMinMaxWidth() KHTMLAssert( !minMaxKnown() ); TQCheckBox *cb = static_cast( m_widget ); - TQSize s( cb->style().tqpixelMetric( TQStyle::PM_IndicatorWidth ), - cb->style().tqpixelMetric( TQStyle::PM_IndicatorHeight ) ); + TQSize s( cb->style().pixelMetric( TQStyle::PM_IndicatorWidth ), + cb->style().pixelMetric( TQStyle::PM_IndicatorHeight ) ); setIntrinsicWidth( s.width() ); setIntrinsicHeight( s.height() ); @@ -207,8 +207,8 @@ void RenderRadioButton::calcMinMaxWidth() KHTMLAssert( !minMaxKnown() ); TQRadioButton *rb = static_cast( m_widget ); - TQSize s( rb->style().tqpixelMetric( TQStyle::PM_ExclusiveIndicatorWidth ), - rb->style().tqpixelMetric( TQStyle::PM_ExclusiveIndicatorHeight ) ); + TQSize s( rb->style().pixelMetric( TQStyle::PM_ExclusiveIndicatorWidth ), + rb->style().pixelMetric( TQStyle::PM_ExclusiveIndicatorHeight ) ); setIntrinsicWidth( s.width() ); setIntrinsicHeight( s.height() ); @@ -260,17 +260,17 @@ void RenderSubmitButton::calcMinMaxWidth() bool empty = raw.isEmpty(); if ( empty ) - raw = TQString::tqfromLatin1("X"); + raw = TQString::fromLatin1("X"); TQFontMetrics fm = pb->fontMetrics(); TQSize ts = fm.size( ShowPrefix, raw); TQSize s(pb->style().sizeFromContents( TQStyle::CT_PushButton, pb, ts ) .expandedTo(TQApplication::globalStrut())); - int margin = pb->style().tqpixelMetric( TQStyle::PM_ButtonMargin, pb) + - pb->style().tqpixelMetric( TQStyle::PM_DefaultFrameWidth, pb ) * 2; + int margin = pb->style().pixelMetric( TQStyle::PM_ButtonMargin, pb) + + pb->style().pixelMetric( TQStyle::PM_DefaultFrameWidth, pb ) * 2; int w = ts.width() + margin; int h = s.height(); if (pb->isDefault() || pb->autoDefault()) { - int dbw = pb->style().tqpixelMetric( TQStyle::PM_ButtonDefaultIndicator, pb ) * 2; + int dbw = pb->style().pixelMetric( TQStyle::PM_ButtonDefaultIndicator, pb ) * 2; w += dbw; } @@ -491,7 +491,7 @@ void RenderLineEdit::setStyle(RenderStyle* _style) { RenderFormElement::setStyle( _style ); - widget()->tqsetAlignment(textAlignment()); + widget()->setAlignment(textAlignment()); } void RenderLineEdit::highLightWord( unsigned int length, unsigned int pos ) @@ -642,13 +642,13 @@ RenderFieldset::RenderFieldset(HTMLGenericFormElementImpl *element) { } -RenderObject* RenderFieldset::tqlayoutLegend(bool retqlayoutChildren) +RenderObject* RenderFieldset::layoutLegend(bool relayoutChildren) { - RenderObject* legend = tqfindLegend(); + RenderObject* legend = findLegend(); if (legend) { - if (retqlayoutChildren) + if (relayoutChildren) legend->setNeedsLayout(true); - legend->tqlayoutIfNeeded(); + legend->layoutIfNeeded(); int xPos = borderLeft() + paddingLeft() + legend->marginLeft(); if (style()->direction() == RTL) @@ -661,7 +661,7 @@ RenderObject* RenderFieldset::tqlayoutLegend(bool retqlayoutChildren) return legend; } -RenderObject* RenderFieldset::tqfindLegend() +RenderObject* RenderFieldset::findLegend() { for (RenderObject* legend = firstChild(); legend; legend = legend->nextSibling()) { if (!legend->isFloatingOrPositioned() && legend->element() && @@ -675,7 +675,7 @@ void RenderFieldset::paintBoxDecorations(PaintInfo& pI, int _tx, int _ty) { //kdDebug( 6040 ) << renderName() << "::paintDecorations()" << endl; - RenderObject* legend = tqfindLegend(); + RenderObject* legend = findLegend(); if (!legend) return RenderBlock::paintBoxDecorations(pI, _tx, _ty); @@ -768,8 +768,8 @@ void RenderFieldset::setStyle(RenderStyle* _style) RenderBlock::setStyle(_style); // WinIE renders fieldsets with display:inline like they're inline-blocks. For us, - // an inline-block is just a block element with tqreplaced set to true and inline set - // to true. Ensure that if we ended up being inline that we set our tqreplaced flag + // an inline-block is just a block element with replaced set to true and inline set + // to true. Ensure that if we ended up being inline that we set our replaced flag // so that we're treated like an inline-block. if (isInline()) setReplaced(true); @@ -809,7 +809,7 @@ void RenderFileButton::calcMinMaxWidth() edit, TQSize(w + 2 + 2*edit->frameWidth(), kMax(h, 14) + 2 + 2*edit->frameWidth())) .expandedTo(TQApplication::globalStrut()); - TQSize bs = static_cast( m_widget )->tqminimumSizeHint() - edit->tqminimumSizeHint(); + TQSize bs = static_cast( m_widget )->minimumSizeHint() - edit->minimumSizeHint(); setIntrinsicWidth( s.width() + bs.width() ); setIntrinsicHeight( kMax(s.height(), bs.height()) ); @@ -1018,7 +1018,7 @@ void RenderSelect::updateFromElement() DOMString label = optElem->getAttribute(ATTR_LABEL); if (!label.isEmpty()) text = label.string(); - text = TQString::tqfromLatin1(" ")+text; + text = TQString::fromLatin1(" ")+text; } if(m_useListBox) { @@ -1065,14 +1065,14 @@ void RenderSelect::calcMinMaxWidth() // ### ugly HACK FIXME!!! setMinMaxKnown(); - tqlayoutIfNeeded(); + layoutIfNeeded(); setNeedsLayoutAndMinMaxRecalc(); // ### end FIXME RenderFormElement::calcMinMaxWidth(); } -void RenderSelect::tqlayout( ) +void RenderSelect::layout( ) { KHTMLAssert(needsLayout()); KHTMLAssert(minMaxKnown()); @@ -1107,21 +1107,21 @@ void RenderSelect::tqlayout( ) if(size < 1) size = kMin(static_cast(m_widget)->count(), 10u); - width += 2*w->frameWidth() + w->verticalScrollBar()->tqsizeHint().width(); + width += 2*w->frameWidth() + w->verticalScrollBar()->sizeHint().width(); height = size*height + 2*w->frameWidth(); setIntrinsicWidth( width ); setIntrinsicHeight( height ); } else { - TQSize s(m_widget->tqsizeHint()); + TQSize s(m_widget->sizeHint()); setIntrinsicWidth( s.width() ); setIntrinsicHeight( s.height() ); } /// uuh, ignore the following line.. setNeedsLayout(true); - RenderFormElement::tqlayout(); + RenderFormElement::layout(); // and now disable the widget in case there is no