rev 3295 - trunk/packages/kdelibs/debian/patches
Christopher Martin
chrsmrtn at costa.debian.org
Sat Mar 11 00:33:33 UTC 2006
Author: chrsmrtn
Date: 2006-03-11 00:33:31 +0000 (Sat, 11 Mar 2006)
New Revision: 3295
Added:
trunk/packages/kdelibs/debian/patches/01_kdelibs_branch_r517245.diff
Log:
New branch pull for kdelibs.
Added: trunk/packages/kdelibs/debian/patches/01_kdelibs_branch_r517245.diff
===================================================================
--- trunk/packages/kdelibs/debian/patches/01_kdelibs_branch_r517245.diff 2006-03-11 00:33:04 UTC (rev 3294)
+++ trunk/packages/kdelibs/debian/patches/01_kdelibs_branch_r517245.diff 2006-03-11 00:33:31 UTC (rev 3295)
@@ -0,0 +1,4462 @@
+#DPATCHLEVEL=0
+--- interfaces/kspeech/dcoptexttospeech.desktop (revision 515119)
++++ interfaces/kspeech/dcoptexttospeech.desktop (revision 517245)
+@@ -26,7 +26,7 @@
+ Comment[is]=Texti-í-tal þjónusta með DCOP viðmóti
+ Comment[it]=Servizio di pronuncia con un'interfaccia DCOP
+ Comment[ja]=DCOP インターフェースと動作するテキストの読み上げサービス
+-Comment[km]=សេវា អត្ថបទ-ទៅ-សំដី ដែលមានចំណុចប្រទាក់ DCOP
++Comment[km]=សេវា អត្ថបទ-ទៅ-សំដី ដែលមានចំណុចប្រទាក់ DCOP
+ Comment[lb]=Sproochausgab-Service mat engem DCOP-Interface
+ Comment[lt]=Teksto vertimo kalba tarnyba su DCOP sąsaja
+ Comment[ms]=Servis Teks-ke-Tutur dengan antara muka DCOP
+--- interfaces/ktexteditor/kcm_ktexteditor.desktop (revision 515119)
++++ interfaces/ktexteditor/kcm_ktexteditor.desktop (revision 517245)
+@@ -103,7 +103,7 @@
+ Comment[is]=Ívafni ritillinn færir forritum texta-skoðara og ritil. KDE forrit sem birta ritil til textavinnslu ættu að nota þessa þjónustu.
+ Comment[it]=Il servizio di editor di testi fornisce alle applicazioni un visualizzatore ed un editor di testi. Le applicazioni KDE che permettono l'elaborazione di testi dovrebbero usare questo servizio.
+ Comment[ja]=テキストビューアやテキスト編集の機能をアプリケーションに 提供するテキストエディタサービスです。テキスト編集の機能を持つ KDEアプリケーションはこれを使用するべきです。
+-Comment[km]=សេវាកម្មវិធីនិពន្ធអត្ថបទផ្តល់នូវសំណុំកម្មវិធីរួមមានកម្មវិធីមើលអត្ថបទ និង កម្មវិធីនិពន្ធអត្ថបទ ។ សំណុំកម្មវិធី KDE ដែលផ្តល់មធ្យោបាយនិពន្ធអត្ថបទ គួរប្រើសេវានេះ ។
++Comment[km]=សេវាកម្មវិធីនិពន្ធអត្ថបទផ្តល់នូវសំណុំកម្មវិធីរួមមានកម្មវិធីមើលអត្ថបទ និង កម្មវិធីនិពន្ធអត្ថបទ ។ សំណុំកម្មវិធី KDE ដែលផ្តល់មធ្យោបាយនិពន្ធអត្ថបទ គួរប្រើសេវានេះ ។
+ Comment[ko]=이 글월 편집기 서비스는 응용 프로그램이 글월을 보거나 고칠 수 있는 기능을 제공합니다. 글월을 고칠 수 있는 KDE 응용 프로그램은 이 서비스를 써야 합니다.
+ Comment[lb]=Den Texeditor-Service stellt Programmer en Textlieser an en Texteditor zur Verfügung.KDE-Programmer, déi Textmanipuléierungsfunktiounen ubidden, sollen dëse Service benotzen.
+ Comment[lt]=Teksto redaktoriaus tarnyba pateikia programoms teksto žiūriklį ir redaktorių. KDE programos, leidžiančios redaguoti tekstą, turėtų naudoti šią tarnybą.
+--- kate/plugins/isearch/ktexteditor_isearch.desktop (revision 515119)
++++ kate/plugins/isearch/ktexteditor_isearch.desktop (revision 517245)
+@@ -30,7 +30,7 @@
+ Name[is]=KTextEditor þrepaleitar-íforrit
+ Name[it]=Plugin ricerca incrementale di KTextEditor
+ Name[ja]=KTextEditor インクリメンタル検索プラグイン
+-Name[km]=កម្មវិធីជំនួយខាងក្នុង KTextEditor Incremental Search
++Name[km]=កម្មវិធីជំនួយខាងក្នុង KTextEditor Incremental Search
+ Name[lb]=Inkrementellen Sich-Plugin fir de KTextEditor
+ Name[lt]=KTextEditor augančios paieškos priedas
+ Name[lv]=KTextEditor "meklē kamēr raksti" spraudnis
+--- mimetypes/all.desktop (revision 515119)
++++ mimetypes/all.desktop (revision 517245)
+@@ -34,7 +34,7 @@
+ Comment[is]=Allar skrár og möppur
+ Comment[it]=Tutti i file e le cartelle
+ Comment[ja]=全てのファイルとディレクトリ
+-Comment[km]=ឯកសារ និង ថតទាំងអស់
++Comment[km]=ឯកសារ និង ថតទាំងអស់
+ Comment[ko]=모든 파일과 자료방
+ Comment[lb]=All Dateien an Dossieren
+ Comment[lt]=Visos bylos ir aplankai
+--- mimetypes/model/vrml.desktop (revision 515119)
++++ mimetypes/model/vrml.desktop (revision 517245)
+@@ -33,7 +33,7 @@
+ Comment[is]=VRML eining
+ Comment[it]=Modello VRML
+ Comment[ja]=VRML モジュール
+-Comment[km]=គំរូ VRML
++Comment[km]=ម៉ូដែល VRML
+ Comment[ko]=VRML 모델
+ Comment[lb]=VRML-Modell
+ Comment[lt]=VRML modelis
+--- mimetypes/image/x-raw.desktop (revision 515119)
++++ mimetypes/image/x-raw.desktop (revision 517245)
+@@ -9,8 +9,18 @@
+ Comment[da]=Ubehandlet kamerabillede
+ Comment[de]=Kamera-Bild im RAW-Format
+ Comment[el]=RAW εικόνα κάμερας
++Comment[es]=Imagen RAW de cámara
++Comment[et]=Kaamera toorpilt
++Comment[eu]=RAW kamara fitxategia
+ Comment[hu]=RAW-képfájl
+ Comment[is]=RAW ljósmynd
+-Comment[pt]=Ficheiro de Máquina Fotográfica RAW
+-Comment[pt_BR]=Ficheiro de Máquina Fotográfica RAW
++Comment[km]=រូបភាពកាមេរា RAW
++Comment[nds]=Kamerbild in RAW-Formaat
++Comment[nl]=RAW-camera-afbeelding
++Comment[pt]=Imagem RAW da Máquina Fotográfica
++Comment[pt_BR]=Imagem RAW da Máquina Fotográfica
++Comment[sr]=Сирова слика са камере
++Comment[sr at Latn]=Sirova slika sa kamere
+ Comment[sv]=Obehandlad kamerafil
++Comment[tg]=RAW Файли тасвирӣ
++Comment[uk]=Необроблене зображення з фотоапарату
+--- mimetypes/application/sieve.desktop (revision 515119)
++++ mimetypes/application/sieve.desktop (revision 517245)
+@@ -32,7 +32,7 @@
+ Comment[is]=SIEVE Póstsíu skrifta
+ Comment[it]=Script filtro di posta SIEVE
+ Comment[ja]=SIEVEメールフィルタスクリプト
+-Comment[km]=ស្គ្រីប SIEVE Mail Filter
++Comment[km]=ស្គ្រីប SIEVE Mail Filter
+ Comment[ko]=SIEVE 편지 거르개 스크립트
+ Comment[lb]=Skript fir den SIEVE-Mailfilter
+ Comment[lt]=SIEVE pašto filtro scenarijus
+--- mimetypes/application/x-trash.desktop (revision 515119)
++++ mimetypes/application/x-trash.desktop (revision 517245)
+@@ -35,7 +35,7 @@
+ Comment[is]=Öryggisafrit
+ Comment[it]=File di backup
+ Comment[ja]=バックアップファイル
+-Comment[km]=ឯកសារ Backup
++Comment[km]=ឯកសារ Backup
+ Comment[ko]=여벌 파일 (백업)
+ Comment[lb]=Sëcherungsdatei
+ Comment[lt]=Atsarginė bylos kopija
+--- mimetypes/application/x-mimearchive.desktop (revision 515119)
++++ mimetypes/application/x-mimearchive.desktop (revision 517245)
+@@ -23,7 +23,7 @@
+ Comment[hu]=MIME-webarchívum
+ Comment[is]=Mime innifalinn vef safnskrá
+ Comment[it]=Archivio Web incapsulato MIME
+-Comment[km]=ប័ណ្ណសារ Mime Encapsulated Web
++Comment[km]=ប័ណ្ណសារ Mime Encapsulated Web
+ Comment[lb]=Mime-gekapselt Webarchiv
+ Comment[lt]=Mime įsiūtas žiniatinklio archyvas
+ Comment[lv]=Mime iekapsulēts tīmekļa arhīvs
+--- mimetypes/application/x-desktop.desktop (revision 515119)
++++ mimetypes/application/x-desktop.desktop (revision 517245)
+@@ -31,7 +31,7 @@
+ Comment[is]=Stillingar skjáborðsins
+ Comment[it]=File di configurazione del desktop
+ Comment[ja]=デスクトップ設定ファイル
+-Comment[km]=ឯកសារ Desktop Config
++Comment[km]=ឯកសារ Desktop Config
+ Comment[ko]=일터 설정 파일
+ Comment[lb]=Desktop-Configuratiounsdatei
+ Comment[lt]=Darbastalio derinimo byla
+--- mimetypes/application/mbox.desktop (revision 515119)
++++ mimetypes/application/mbox.desktop (revision 517245)
+@@ -18,6 +18,7 @@
+ Comment[hu]=MBOX levélmappa
+ Comment[is]=MBOX póstmappa
+ Comment[it]=Cartella di posta MBOX
++Comment[km]=ថតសំបុត្រ MBOX
+ Comment[lb]=MBOX Mail-Dossier
+ Comment[nb]=Mbox e-postmappe
+ Comment[nds]=Mbox-Nettpostorner
+@@ -30,6 +31,7 @@
+ Comment[sr]=MBOX фасцикла поште
+ Comment[sr at Latn]=MBOX fascikla pošte
+ Comment[sv]=Mbox-brevkorg
++Comment[tg]=MBOX Феҳристи Почта
+ Comment[uk]=Поштова тека MBOX
+ Comment[zh_CN]=MBOX 邮件文件夹
+
+--- mimetypes/message/rfc822.desktop (revision 515119)
++++ mimetypes/message/rfc822.desktop (revision 517245)
+@@ -36,7 +36,7 @@
+ Comment[is]=Tölvupóstskeyti
+ Comment[it]=Messaggio di posta elettronica
+ Comment[ja]=Eメールメッセージ
+-Comment[km]=សារអ៊ីម៉ែល
++Comment[km]=សារអ៊ីមែល
+ Comment[ko]=편지 메세지
+ Comment[lb]=E-Mail-Message
+ Comment[lt]=E. pašto laiškas
+--- mimetypes/text/x-adasrc.desktop (revision 515119)
++++ mimetypes/text/x-adasrc.desktop (revision 517245)
+@@ -31,7 +31,7 @@
+ Comment[is]=Ada frumforrit
+ Comment[it]=File sorgente Ada
+ Comment[ja]=Ada ソースソース
+-Comment[km]=ឯកសារ Ada Source
++Comment[km]=ឯកសារ Ada Source
+ Comment[ko]=에이다(Ada) 밑그림 파일
+ Comment[lb]=Ada-Quellcodedatei
+ Comment[lt]=Ada išeities tekstų byla
+--- mimetypes/text/x-katefilelist.desktop (revision 515119)
++++ mimetypes/text/x-katefilelist.desktop (revision 517245)
+@@ -29,7 +29,7 @@
+ Comment[is]=Skráarlisti (Fyrir Kate skráarlista íforrit)
+ Comment[it]=Lista di file (per il plugin Caricamento lista file di Kate)
+ Comment[ja]=ファイルリスト(Kate ファイルリスト読み込みプラグイン)
+-Comment[km]=បញ្ជីឯកសារ (សម្រាប់ Kate File List Loader Plugin)
++Comment[km]=បញ្ជីឯកសារ (សម្រាប់ Kate File List Loader Plugin)
+ Comment[ko]=(카테용 파일 목록 부름이 플러그인에서 쓰는) 파일 목록
+ Comment[lb]=Dateilëscht (fir de Kate-Dateilëschtlueder-Plugin)
+ Comment[lt]=Bylų sąrašas (skirtas Kate bylų sąrašo pakrovėjo įskiepiui)
+--- mimetypes/text/x-csv.desktop (revision 515119)
++++ mimetypes/text/x-csv.desktop (revision 517245)
+@@ -35,7 +35,7 @@
+ Comment[is]=Dálkskipt textaskjal (CSV)
+ Comment[it]=File di testo con valori separati da virgole
+ Comment[ja]=値がコンマで区切られたテキストファイル (CSV)
+-Comment[km]=ឯកសារអត្ថបទដែលមានតម្លៃបំបែកដោយសញ្ញាក្បៀស
++Comment[km]=ឯកសារអត្ថបទដែលតម្លៃបំបែកដោយក្បៀស
+ Comment[ko]=쉼표로 값이 나눠져있는 글월 파일
+ Comment[lb]=Textdatei mat Werter, déi duerch Kommaë getrennt sinn
+ Comment[lt]=Teksto byla su kableliu atskirtomis reikšmėmis
+--- mimetypes/text/x-vcalendar.desktop (revision 515119)
++++ mimetypes/text/x-vcalendar.desktop (revision 517245)
+@@ -30,7 +30,7 @@
+ Comment[is]=vCalendar gagnaskrá
+ Comment[it]=File di interscambio vCalendar
+ Comment[ja]=vCalendar 交換ファイル
+-Comment[km]=ឯកសារ vCalendar Interchange
++Comment[km]=ឯកសារ vCalendar Interchange
+ Comment[lb]=vCalendar-Austauschdatei
+ Comment[lt]=vCalendar apsikeitimų byla
+ Comment[lv]=vCalendar apmaiņas fails
+--- kioslave/file/file.cc (revision 515119)
++++ kioslave/file/file.cc (revision 517245)
+@@ -360,6 +360,16 @@
+ return 0;
+ }
+
++static bool
++same_inode(const KDE_struct_stat &src, const KDE_struct_stat &dest)
++{
++ if (src.st_ino == dest.st_ino &&
++ src.st_dev == dest.st_dev)
++ return true;
++
++ return false;
++}
++
+ void FileProtocol::put( const KURL& url, int _mode, bool _overwrite, bool _resume )
+ {
+ QString dest_orig = url.path();
+@@ -616,6 +626,12 @@
+ return;
+ }
+
++ if ( same_inode( buff_dest, buff_src) )
++ {
++ error( KIO::ERR_IDENTICAL_FILES, dest.path() );
++ return;
++ }
++
+ if (!_overwrite)
+ {
+ error( KIO::ERR_FILE_ALREADY_EXIST, dest.path() );
+@@ -823,6 +839,12 @@
+ return;
+ }
+
++ if ( same_inode( buff_dest, buff_src) )
++ {
++ error( KIO::ERR_IDENTICAL_FILES, dest.path() );
++ return;
++ }
++
+ if (!_overwrite)
+ {
+ error( KIO::ERR_FILE_ALREADY_EXIST, dest.path() );
+--- kioslave/http/http.cc (revision 515119)
++++ kioslave/http/http.cc (revision 517245)
+@@ -646,6 +646,11 @@
+ if ( !checkRequestURL( url ) )
+ return;
+
++ if (!url.protocol().startsWith("webdav")) {
++ error(ERR_UNSUPPORTED_ACTION, url.prettyURL());
++ return;
++ }
++
+ davStatList( url, false );
+ }
+
+@@ -3330,12 +3335,9 @@
+ if (!compact.isEmpty())
+ setMetaData("PrivacyCompactPolicy", compact.join("\n"));
+ }
+-
+- // continue only if we know that we're HTTP/1.1
+- else if (httpRev == HTTP_11) {
+- // let them tell us if we should stay alive or not
+- if (strncasecmp(buf, "Connection:", 11) == 0)
+- {
++ // let them tell us if we should stay alive or not
++ else if (strncasecmp(buf, "Connection:", 11) == 0)
++ {
+ if (strncasecmp(trimLead(buf + 11), "Close", 5) == 0)
+ m_bKeepAlive = false;
+ else if (strncasecmp(trimLead(buf + 11), "Keep-Alive", 10)==0)
+@@ -3352,10 +3354,11 @@
+ canUpgrade = true;
+ }
+ }
+-
+- }
++ }
++ // continue only if we know that we're HTTP/1.1
++ else if ( httpRev == HTTP_11) {
+ // what kind of encoding do we have? transfer?
+- else if (strncasecmp(buf, "Transfer-Encoding:", 18) == 0) {
++ if (strncasecmp(buf, "Transfer-Encoding:", 18) == 0) {
+ // If multiple encodings have been applied to an entity, the
+ // transfer-codings MUST be listed in the order in which they
+ // were applied.
+--- kimgio/pgm.kimgio (revision 515119)
++++ kimgio/pgm.kimgio (revision 517245)
+@@ -33,7 +33,7 @@
+ Name[is]=Skráarsnið GIMP forritsins (PGI)
+ Name[it]=Immagine Portable Graymap
+ Name[ja]=ポータブルグレイマップ画像
+-Name[km]=រូបភាព Portable Graymap
++Name[km]=រូបភាព Portable Graymap
+ Name[lb]=Portéierbart Graymap-Bild
+ Name[lt]=Perkeliamas pilkų pustonių (greymap) paveiksliukas
+ Name[lv]=Portable Graymap attēls
+--- kio/kio/kdirlister_p.h (revision 515119)
++++ kio/kio/kdirlister_p.h (revision 517245)
+@@ -133,7 +133,8 @@
+ KDirListerCache( int maxCount = 10 );
+ ~KDirListerCache();
+
+- void listDir( KDirLister *lister, const KURL &_url, bool _keep, bool _reload );
++ bool listDir( KDirLister *lister, const KURL& _url, bool _keep, bool _reload );
++ bool validURL( const KDirLister *lister, const KURL& _url ) const;
+
+ // stop all running jobs for lister
+ void stop( KDirLister *lister );
+--- kio/kio/krun.h (revision 515119)
++++ kio/kio/krun.h (revision 517245)
+@@ -192,10 +192,23 @@
+ * @param _service the service to run
+ * @param _urls the list of URLs, can be empty (app launched
+ * without argument)
++ * @param window The top-level widget of the app that invoked this object.
+ * @param tempFiles if true and _urls are local files, they will be deleted
+ * when the application exits.
+ * @return the process id, or 0 on error
++ * @since 3.5.2
+ */
++ static pid_t run( const KService& _service, const KURL::List& _urls, QWidget* window, bool tempFiles = false );
++ /**
++ * Open a list of URLs with a certain service (application).
++ *
++ * @param _service the service to run
++ * @param _urls the list of URLs, can be empty (app launched
++ * without argument)
++ * @param tempFiles if true and _urls are local files, they will be deleted
++ * when the application exits.
++ * @return the process id, or 0 on error
++ */
+ // BIC merge second overload with first one, using tempFiles=false
+ static pid_t run( const KService& _service, const KURL::List& _urls, bool tempFiles );
+ static pid_t run( const KService& _service, const KURL::List& _urls );
+--- kio/kio/krun.cpp (revision 515119)
++++ kio/kio/krun.cpp (revision 517245)
+@@ -693,11 +693,16 @@
+
+ pid_t KRun::run( const KService& _service, const KURL::List& _urls, bool tempFiles )
+ {
++ return run( _service, _urls, 0, tempFiles );
++}
++
++pid_t KRun::run( const KService& _service, const KURL::List& _urls, QWidget* window, bool tempFiles )
++{
+ if (!_service.desktopEntryPath().isEmpty() &&
+ !KDesktopFile::isAuthorizedDesktopFile( _service.desktopEntryPath()))
+ {
+ kdWarning() << "No authorization to execute " << _service.desktopEntryPath() << endl;
+- KMessageBox::sorry(0, i18n("You are not authorized to execute this service."));
++ KMessageBox::sorry(window, i18n("You are not authorized to execute this service."));
+ return 0;
+ }
+
+@@ -735,7 +740,7 @@
+ if (i != 0)
+ {
+ kdDebug(7010) << error << endl;
+- KMessageBox::sorry( 0L, error );
++ KMessageBox::sorry( window, error );
+ return 0;
+ }
+
+--- kio/kio/kdirlister.cpp (revision 515119)
++++ kio/kio/kdirlister.cpp (revision 517245)
+@@ -33,6 +33,7 @@
+ #include <kglobal.h>
+ #include <kglobalsettings.h>
+ #include <kstaticdeleter.h>
++#include <kprotocolinfo.h>
+
+ #include "kdirlister_p.h"
+
+@@ -84,7 +85,7 @@
+
+ // setting _reload to true will emit the old files and
+ // call updateDirectory
+-void KDirListerCache::listDir( KDirLister* lister, const KURL& _u,
++bool KDirListerCache::listDir( KDirLister *lister, const KURL& _u,
+ bool _keep, bool _reload )
+ {
+ // like this we don't have to worry about trailing slashes any further
+@@ -93,6 +94,9 @@
+ _url.adjustPath(-1);
+ QString urlStr = _url.url();
+
++ if ( !lister->validURL( _url ) )
++ return false;
++
+ #ifdef DEBUG_CACHE
+ printDebug();
+ #endif
+@@ -265,8 +269,36 @@
+ // automatic updating of directories
+ if ( lister->d->autoUpdate )
+ itemU->incAutoUpdate();
++
++ return true;
+ }
+
++bool KDirListerCache::validURL( const KDirLister *lister, const KURL& url ) const
++{
++ if ( !url.isValid() )
++ {
++ if ( lister->d->autoErrorHandling )
++ {
++ QString tmp = i18n("Malformed URL\n%1").arg( url.prettyURL() );
++ KMessageBox::error( lister->d->errorParent, tmp );
++ }
++ return false;
++ }
++
++ if ( !KProtocolInfo::supportsListing( url ) )
++ {
++ if ( lister->d->autoErrorHandling )
++ {
++ // TODO: this message should be changed during next string unfreeze!
++ QString tmp = i18n("Malformed URL\n%1").arg( url.prettyURL() );
++ KMessageBox::error( lister->d->errorParent, tmp );
++ }
++ return false;
++ }
++
++ return true;
++}
++
+ void KDirListerCache::stop( KDirLister *lister )
+ {
+ #ifdef DEBUG_CACHE
+@@ -1043,6 +1075,12 @@
+ oldUrl.adjustPath(-1);
+ newUrl.adjustPath(-1);
+
++ if ( oldUrl == newUrl )
++ {
++ kdDebug(7004) << k_funcinfo << "New redirection url same as old, giving up." << endl;
++ return;
++ }
++
+ kdDebug(7004) << k_funcinfo << oldUrl.prettyURL() << " -> " << newUrl.prettyURL() << endl;
+
+ #ifdef DEBUG_CACHE
+@@ -1813,9 +1851,6 @@
+
+ bool KDirLister::openURL( const KURL& _url, bool _keep, bool _reload )
+ {
+- if ( !validURL( _url ) )
+- return false;
+-
+ kdDebug(7003) << k_funcinfo << _url.prettyURL()
+ << " keep=" << _keep << " reload=" << _reload << endl;
+
+@@ -1825,9 +1860,7 @@
+
+ d->changes = NONE;
+
+- s_pCache->listDir( this, _url, _keep, _reload );
+-
+- return true;
++ return s_pCache->listDir( this, _url, _keep, _reload );
+ }
+
+ void KDirLister::stop()
+@@ -2176,19 +2209,7 @@
+
+ bool KDirLister::validURL( const KURL& _url ) const
+ {
+- if ( !_url.isValid() )
+- {
+- if ( d->autoErrorHandling )
+- {
+- QString tmp = i18n("Malformed URL\n%1").arg( _url.prettyURL() );
+- KMessageBox::error( d->errorParent, tmp );
+- }
+- return false;
+- }
+-
+- // TODO: verify that this is really a directory?
+-
+- return true;
++ return s_pCache->validURL( this, _url );
+ }
+
+ void KDirLister::handleError( KIO::Job *job )
+--- kio/kfile/kpropsdlgplugin.desktop (revision 515119)
++++ kio/kfile/kpropsdlgplugin.desktop (revision 517245)
+@@ -34,7 +34,7 @@
+ Comment[is]=Íforrit fyrir stillingarforritið
+ Comment[it]=Plugin per la finestra delle proprietà
+ Comment[ja]=設定ダイアログプラグイン
+-Comment[km]=កម្មវិធីជំនួយខាងក្នុងសម្រាប់ប្រអប់ លក្ខណៈសម្បត្តិ
++Comment[km]=កម្មវិធីជំនួយខាងក្នុងសម្រាប់ប្រអប់ លក្ខណៈសម្បត្តិ
+ Comment[ko]=대화창 특성을 위한 플러그인
+ Comment[lb]=Plugin fir den Eegeschaften-Dialog
+ Comment[lt]=Priedas savybių dialogui
+--- kio/misc/kio_uiserver.desktop (revision 515119)
++++ kio/misc/kio_uiserver.desktop (revision 517245)
+@@ -44,7 +44,7 @@
+ Comment[is]=Þjónn sem sýnir framvindu ferla
+ Comment[it]=Server informazioni avanzamento di KDE
+ Comment[ja]=KDE進捗情報UIサーバ
+-Comment[km]=ម៉ាស៊ីនបម្រើ UI នៃព័ត៌មានវឌ្ឍនភាពរបស់ KDE
++Comment[km]=ម៉ាស៊ីនបម្រើ UI នៃព័ត៌មានវឌ្ឍនភាពរបស់ KDE
+ Comment[ko]=KDE에서 보다 발전된 정보 UI 서버
+ Comment[lb]=UI-Server vu KDE, dee Fortschrëttsinformatiounen uweist
+ Comment[lt]=KDE eigos informacijos UI serveris
+--- kio/kssl/ksslsettings.cc (revision 515119)
++++ kio/kssl/ksslsettings.cc (revision 517245)
+@@ -179,10 +179,11 @@
+ }
+
+ // Remove any ADH ciphers as per RFC2246
++ // Also remove NULL ciphers and 168bit ciphers
+ for (unsigned int i = 0; i < cipherSort.count(); i++) {
+ CipherNode *j = 0L;
+ while ((j = cipherSort.at(i)) != 0L) {
+- if (j->name.contains("ADH-")) {
++ if (j->name.contains("ADH-") || j->name.contains("NULL-") || j->name.contains("DES-CBC3-SHA") || j->name.contains("FZA")) {
+ cipherSort.remove(j);
+ } else {
+ break;
+--- kio/kssl/kopenssl.cc (revision 515119)
++++ kio/kssl/kopenssl.cc (revision 517245)
+@@ -576,21 +576,31 @@
+ if (_cryptoLib) {
+ if (x) ((int (*)())x)();
+ x = _cryptoLib->symbol("OpenSSL_add_all_algorithms");
++ if (!x)
++ x = _cryptoLib->symbol("OPENSSL_add_all_algorithms");
+ if (x) {
+ ((void (*)())x)();
+ } else {
+ x = _cryptoLib->symbol("OpenSSL_add_all_algorithms_conf");
++ if (!x)
++ x = _cryptoLib->symbol("OPENSSL_add_all_algorithms_conf");
+ if (x) {
+ ((void (*)())x)();
+ } else {
+ x = _cryptoLib->symbol("OpenSSL_add_all_algorithms_noconf");
++ if (!x)
++ x = _cryptoLib->symbol("OPENSSL_add_all_algorithms_noconf");
+ if (x)
+ ((void (*)())x)();
+ }
+ }
+ x = _cryptoLib->symbol("OpenSSL_add_all_ciphers");
++ if (!x)
++ x = _cryptoLib->symbol("OPENSSL_add_all_ciphers");
+ if (x) ((void (*)())x)();
+ x = _cryptoLib->symbol("OpenSSL_add_all_digests");
++ if (!x)
++ x = _cryptoLib->symbol("OPENSSL_add_all_digests");
+ if (x) ((void (*)())x)();
+ }
+ }
+--- kstyles/themes/light-v2.themerc (revision 515119)
++++ kstyles/themes/light-v2.themerc (revision 517245)
+@@ -98,7 +98,7 @@
+ Comment[is]=Önnur útgáfa af einföldum og snotrum stíl
+ Comment[it]=Seconda versione dello stile semplice ed elegante "Light".
+ Comment[ja]=シンプルでエレガントな'Light'ウィジェットスタイル第2版。
+-Comment[km]=ការកែប្រែលើកទី ២ របស់រចនាប័ទ្មវត្ថុមើលឃើញសាមញ្ញ និង ប្រណិត "ភ្លឺ" ។
++Comment[km]=ការកែប្រែលើកទី ២ របស់រចនាប័ទ្មវត្ថុមើលឃើញសាមញ្ញ និង ប្រណិត "ភ្លឺ" ។
+ Comment[ko]=뽐 내지 않고 멋진 '가벼운' 위젯 꼴, 두번째 판.
+ Comment[lb]=Zweet Versioun vum einfachen and eleganten 'liichte' Widget-Stil
+ Comment[lt]=Paprasto ir elegantiško „lengvo“ valdiklio stiliaus antras variantas.
+--- kstyles/themes/light-v3.themerc (revision 515119)
++++ kstyles/themes/light-v3.themerc (revision 517245)
+@@ -98,7 +98,7 @@
+ Comment[is]=Þriðja útgáfa af einföldum og snotrum stíl
+ Comment[it]=Terza versione dello stile semplice ed elegante "Light".
+ Comment[ja]=シンプルでエレガントな'Light'ウィジェットスタイル第3版。
+-Comment[km]=ការកែប្រែលើកទី ៣ របស់រចនាប័ទ្មវត្ថុមើលឃើញសាមញ្ញ និង ប្រណិត "ភ្លឺ" ។
++Comment[km]=ការកែប្រែលើកទី ៣ របស់រចនាប័ទ្មវត្ថុមើលឃើញសាមញ្ញ និង ប្រណិត "ភ្លឺ" ។
+ Comment[ko]=뽐 내지 않고 멋진 '가벼운' 위젯 꼴, 세번째 판.
+ Comment[lb]=Drëtt Versioun vum einfachen and eleganten 'liichte' Widget-Stil
+ Comment[lt]=Paprasto ir elegantiško „lengvo“ valdiklio stiliaus trečias variantas.
+--- kstyles/themes/qtplatinum.themerc (revision 515119)
++++ kstyles/themes/qtplatinum.themerc (revision 517245)
+@@ -53,7 +53,7 @@
+ Comment[is]=Innbyggði Platínum stíllinn (án þema)
+ Comment[it]=Stile Platino interno senza tema
+ Comment[ja]=Platinumスタイル
+-Comment[km]=រចនាប័ទ្ម Platinum ដែលគ្មានស្បែកជាប់
++Comment[km]=រចនាប័ទ្ម Platinum ដែលគ្មានស្បែកជាប់
+ Comment[ko]=플래티넘과 같은 꼴을 가진 붙박이 테마
+ Comment[lb]=Agebaute Platinum-Stil ouni Thema
+ Comment[lt]=Įtaisytas betemis Platinos stilius
+--- kstyles/themes/qtwindows.themerc (revision 515119)
++++ kstyles/themes/qtwindows.themerc (revision 517245)
+@@ -41,7 +41,7 @@
+ Comment[is]=Innbyggður stíll sem minnir á Windows 9x (án þema)
+ Comment[it]=Stile Windows 9x interno senza tema
+ Comment[ja]=Windows9xスタイル
+-Comment[km]=រចនាប័ទ្ម Windows 9x ដែលគ្មានស្បែក
++Comment[km]=រចនាប័ទ្ម Windows 9x ដែលគ្មានស្បែក
+ Comment[ko]=윈도우즈 9X와 비슷한 꼴을 가진 붙박이 테마
+ Comment[lb]=Agebaute Windows 9x-Stil ouni Thema
+ Comment[lt]=Įtaisytas betemis Windows 9x stilius
+--- kstyles/themes/mega.themerc (revision 515119)
++++ kstyles/themes/mega.themerc (revision 517245)
+@@ -24,7 +24,7 @@
+ Name[is]=MegaGradient fjöllitastíll
+ Name[it]=Mega sfumature con molti colori
+ Name[ja]=MegaGradient ハイカラースタイル
+-Name[km]=រចនាប័ទ្មពណ៌ខ្ពស់ MegaGradient
++Name[km]=រចនាប័ទ្មពណ៌ខ្ពស់ MegaGradient
+ Name[lb]=MegaGradient-Stil (vill Faarwen)
+ Name[lt]=MegaGradient aukštos spalvų gebos stilius
+ Name[lv]=MegaGradient daudzkrāsu stils
+--- kstyles/themes/qtmotifplus.themerc (revision 515119)
++++ kstyles/themes/qtmotifplus.themerc (revision 517245)
+@@ -46,7 +46,7 @@
+ Comment[is]=Innbyggður stíll, endurbætt Motif unhverfi
+ Comment[it]=Stile Motif interno avanzato
+ Comment[ja]=内蔵拡張Motifスタイル
+-Comment[km]=រចនាប័ទ្ម Motif ជាប់
++Comment[km]=រចនាប័ទ្ម Motif ជាប់
+ Comment[ko]=더 나은 모티프와 같은 꼴을 가진 붙박이 테마
+ Comment[lb]=Agebauten, erweiderte Motif-Stil
+ Comment[lt]=Įtaisytas išplėstas Motif stilius
+--- kabc/plugins/file/resourcefile.cpp (revision 515119)
++++ kabc/plugins/file/resourcefile.cpp (revision 517245)
+@@ -302,6 +302,10 @@
+ if (d->mIsSaving) {
+ abortAsyncSaving();
+ }
++ if ( d->mIsLoading ) {
++ kdWarning(5700) << "Aborted save() because we're still asyncLoad()ing!" << endl;
++ return false;
++ }
+
+ // create backup file
+ QString extension = "_" + QString::number( QDate::currentDate().dayOfWeek() );
+--- kdecore/eventsrc (revision 515119)
++++ kdecore/eventsrc (revision 517245)
+@@ -1072,7 +1072,7 @@
+ Name[is]=Aðvörun
+ Name[it]=Avvertimento
+ Name[ja]=警告
+-Name[km]=ការព្រមាន
++Name[km]=ព្រមាន
+ Name[ko]=경고
+ Name[lb]=Warnung
+ Name[lt]=Dėmesio
+--- kdecore/all_languages.desktop (revision 515119)
++++ kdecore/all_languages.desktop (revision 517245)
+@@ -1856,7 +1856,7 @@
+ Name[is]=Gríska
+ Name[it]=Greco
+ Name[ja]=ギリシャ語
+-Name[km]=ក្រិច
++Name[km]=ក្រិក
+ Name[ko]=그리스어
+ Name[lb]=Griichesch
+ Name[lt]=Graikų
+@@ -3399,7 +3399,7 @@
+ Name[hu]=Felső szorb
+ Name[it]=Alto sorabo
+ Name[ja]=ソルブ語
+-Name[km]=សូបៀន លើ
++Name[km]=សូបៀន លើ
+ Name[lb]=Uewersorbesch
+ Name[nb]=Øvresorbisk
+ Name[nds]=Böversorbsch
+@@ -7463,6 +7463,7 @@
+ Name[hu]=Lovári cigány
+ Name[is]=Rúmenía
+ Name[it]=Rom
++Name[km]=រូម៉ានី
+ Name[lb]=Romani
+ Name[nb]=Romani
+ Name[nds]=Roomsch
+@@ -7475,6 +7476,7 @@
+ Name[sr]=Ромски
+ Name[sr at Latn]=Romski
+ Name[sv]=Romanés
++Name[tg]=Романӣ
+ Name[uk]=Циганська
+ Name[zh_CN]=吉普赛语
+ [ru]
+@@ -8418,6 +8420,7 @@
+ Name[hu]=Szerb (latin betűs)
+ Name[is]=Serbnesk latína
+ Name[it]=Serbo latino
++Name[km]=សែប៊ី (ឡាតាំង)
+ Name[lb]=Latäinescht Serbesch
+ Name[nb]=Serbisk (latinsk)
+ Name[nds]=Serbsch (latiensch Schrift)
+@@ -8430,6 +8433,7 @@
+ Name[sr]=Српски латинични
+ Name[sr at Latn]=Srpski latinični
+ Name[sv]=Latinsk serbiska
++Name[tg]=Сербӣ (Лотинӣ)
+ Name[uk]=Сербська (латинь)
+ Name[zh_CN]=塞尔维亚语(拉丁)
+ [ss]
+@@ -10269,6 +10273,7 @@
+ Name[hu]=Kínai (hongkongi)
+ Name[is]=Kínverska (Hong Kong)
+ Name[it]=Cinese (Hong Kong)
++Name[km]=ចិន (ហុងកុង)
+ Name[lb]=Chinesesch (Hong Kong)
+ Name[nb]=Kinesisk (Hong kong)
+ Name[nds]=Chineesch (Hong Kong)
+@@ -10281,6 +10286,7 @@
+ Name[sr]=Кинески (Хонгконг)
+ Name[sr at Latn]=Kineski (Hongkong)
+ Name[sv]=Kinesiska (Hong Kong)
++Name[tg]=Хитоӣ (Гонконг)
+ Name[uk]=Китайська (Гонконг)
+ Name[zh_CN]=繁体中文(香港)
+ [zh_TW]
+--- kdecore/kconfigskeleton.cpp (revision 515119)
++++ kdecore/kconfigskeleton.cpp (revision 517245)
+@@ -991,6 +991,7 @@
+ mItems.append( item );
+ mItemDict.insert( item->name(), item );
+ item->readDefault( mConfig );
++ item->readConfig( mConfig );
+ }
+
+ KConfigSkeleton::ItemString *KConfigSkeleton::addItemString( const QString &name, QString &reference,
+--- khtml/khtmlview.cpp (revision 515119)
++++ khtml/khtmlview.cpp (revision 517245)
+@@ -149,7 +149,7 @@
+ };
+
+ KHTMLViewPrivate()
+- : underMouse( 0 ), underMouseNonShared( 0 )
++ : underMouse( 0 ), underMouseNonShared( 0 ), visibleWidgets( 107 )
+ {
+ #ifndef KHTML_NO_CARET
+ m_caretViewContext = 0;
+@@ -241,7 +241,6 @@
+ complete = false;
+ firstRelayout = true;
+ needsFullRepaint = true;
+- dirtyLayout = false;
+ layoutSchedulingEnabled = true;
+ painting = false;
+ updateRegion = QRegion();
+@@ -368,7 +367,6 @@
+ bool needsFullRepaint :1;
+ bool painting :1;
+ bool possibleTripleClick :1;
+- bool dirtyLayout :1;
+ bool m_dialogsAllowed :1;
+ QRegion updateRegion;
+ KHTMLToolTip *tooltip;
+@@ -655,15 +653,24 @@
+ QPoint pt = contentsToViewport(QPoint(ex, ey));
+ QRegion cr = QRect(pt.x(), pt.y(), ew, eh);
+
+- //kdDebug(6000) << "clip rect: " << QRect(pt.x(), pt.y(), ew, eh) << endl;
++ // kdDebug(6000) << "clip rect: " << QRect(pt.x(), pt.y(), ew, eh) << endl;
+ for (QPtrDictIterator<QWidget> it(d->visibleWidgets); it.current(); ++it) {
+ QWidget *w = it.current();
+ RenderWidget* rw = static_cast<RenderWidget*>( it.currentKey() );
+- if (strcmp(w->name(), "__khtml")) {
+- int x, y;
+- rw->absolutePosition(x, y);
+- contentsToViewport(x, y, x, y);
+- cr -= QRect(x, y, rw->width(), rw->height());
++ QRect g = w->geometry();
++ if ( (g.top() > pt.y()+eh) || (g.bottom() <= pt.y()) ||
++ (g.right() <= pt.x()) || (g.left() > pt.x()+ew) )
++ continue;
++ RenderLayer* rl = rw->enclosingStackingContext();
++ QRegion mask = rl ? rl->getMask() : QRegion();
++ if (!mask.isNull()) {
++ QPoint o(0,0);
++ o = contentsToViewport(o);
++ mask.translate(o.x(),o.y());
++ mask = mask.intersect( QRect(g.x(),g.y(),g.width(),g.height()) );
++ cr -= mask;
++ } else {
++ cr -= QRect(g.x(), g.y(), g.width(), g.height());
+ }
+ }
+
+@@ -3379,7 +3386,6 @@
+ return;
+ }
+ else if ( e->timerId() == d->layoutTimerId ) {
+- d->dirtyLayout = true;
+ layout();
+ if (d->firstRelayout) {
+ d->firstRelayout = false;
+@@ -3443,24 +3449,6 @@
+ if ( !updateRegion.isNull() )
+ repaintContents( updateRegion );
+
+- if (d->dirtyLayout && !d->visibleWidgets.isEmpty()) {
+- QWidget* w;
+- d->dirtyLayout = false;
+-
+- QRect visibleRect(contentsX(), contentsY(), visibleWidth(), visibleHeight());
+- QPtrList<RenderWidget> toRemove;
+- for (QPtrDictIterator<QWidget> it(d->visibleWidgets); it.current(); ++it) {
+- int xp = 0, yp = 0;
+- w = it.current();
+- RenderWidget* rw = static_cast<RenderWidget*>( it.currentKey() );
+- if (!rw->absolutePosition(xp, yp) ||
+- !visibleRect.intersects(QRect(xp, yp, w->width(), w->height())))
+- toRemove.append(rw);
+- }
+- for (RenderWidget* r = toRemove.first(); r; r = toRemove.next())
+- if ( (w = d->visibleWidgets.take(r) ) )
+- addChild(w, 0, -500000);
+- }
+ emit repaintAccessKeys();
+ if (d->emitCompletedAfterRepaint) {
+ bool full = d->emitCompletedAfterRepaint == KHTMLViewPrivate::CSFull;
+--- khtml/html/html_miscimpl.cpp (revision 515119)
++++ khtml/html/html_miscimpl.cpp (revision 517245)
+@@ -113,17 +113,10 @@
+ break;
+ case TABLE_ROWS:
+ case TSECTION_ROWS:
+- case TABLE_BODY_ROWS:
+ if(e->id() == ID_TR)
+ check = true;
+ else if(e->id() == ID_TABLE)
+ deep = false;
+- else if (type == TABLE_BODY_ROWS) {
+- //Avoid going inside the thead, tfoot.
+- const HTMLTableElementImpl* table = static_cast<const HTMLTableElementImpl*>(m_refNode);
+- if (e == table->tHead() || e == table->tFoot())
+- deep = false;
+- }
+ break;
+ case SELECT_OPTIONS:
+ if(e->id() == ID_OPTION)
+@@ -222,42 +215,36 @@
+ //For table.rows, we first need to check header, then bodies, then footer.
+ //we pack any extra headers/footer with bodies. This matches IE, and
+ //means doing the usual thing with length is right
+- //### fix constness throughout instead of loosing the const
+- HTMLTableElementImpl* table = const_cast<HTMLTableElementImpl*>(
+- static_cast<const HTMLTableElementImpl*>(m_refNode));
++ const HTMLTableElementImpl* table = static_cast<const HTMLTableElementImpl*>(m_refNode);
+
+- //Keep track of position for the namedItem code
+- unsigned long origIndex = index;
++ long sectionIndex;
++ HTMLTableSectionElementImpl* section;
+
+ NodeImpl* found = 0;
+- if (table->tHead()) {
+- HTMLCollectionImpl headerRows(table->tHead(), TSECTION_ROWS);
+- unsigned headerLength = headerRows.length();
+- if (index < headerLength)
+- found = headerRows.item(index);
+- else
+- index -= headerLength;
++ if (table->findRowSection(index, section, sectionIndex)) {
++ HTMLCollectionImpl rows(section, TSECTION_ROWS);
++ found = rows.item(sectionIndex);
+ }
+
+- if (!found) {
+- HTMLCollectionImpl bodyRows(table, TABLE_BODY_ROWS);
+- unsigned bodyLength = bodyRows.length();
+- if (index < bodyLength)
+- found = bodyRows.item(index);
+- else
+- index -= bodyLength;
+- }
+-
+- if (!found && table->tFoot()) {
+- HTMLCollectionImpl footerRows(table->tFoot(), TSECTION_ROWS);
+- found = footerRows.item(index);
+- }
+-
+ m_cache->current.node = found; //namedItem needs this.
+- m_cache->position = origIndex;
++ m_cache->position = index;
+ return found;
+ }
+
++unsigned long HTMLCollectionImpl::calcLength(NodeImpl *start) const
++{
++ if (type != TABLE_ROWS)
++ return NodeListImpl::calcLength(start);
++
++ unsigned length = 0;
++ const HTMLTableElementImpl* table = static_cast<const HTMLTableElementImpl*>(m_refNode);
++ for (NodeImpl* kid = table->firstChild(); kid; kid = kid->nextSibling()) {
++ HTMLCollectionImpl rows(kid, TSECTION_ROWS);
++ length += rows.length();
++ }
++ return length;
++}
++
+ NodeImpl *HTMLCollectionImpl::firstItem() const
+ {
+ return item(0);
+@@ -353,19 +340,14 @@
+ return 0;
+ }
+
+-unsigned long HTMLFormCollectionImpl::length() const
++unsigned long HTMLFormCollectionImpl::calcLength(NodeImpl *start) const
+ {
+- m_cache->updateNodeListInfo(m_refNode->getDocument());
+- if (!m_cache->hasLength)
+- {
+- m_cache->length = 0;
+- QPtrList<HTMLGenericFormElementImpl> l = static_cast<HTMLFormElementImpl*>( m_refNode )->formElements;
+- for ( unsigned i = 0; i < l.count(); i++ )
+- if ( l.at( i )->isEnumeratable() )
+- ++m_cache->length;
+- m_cache->hasLength = true;
+- }
+- return m_cache->length;
++ unsigned length = 0;
++ QPtrList<HTMLGenericFormElementImpl> l = static_cast<HTMLFormElementImpl*>( start )->formElements;
++ for ( unsigned i = 0; i < l.count(); i++ )
++ if ( l.at( i )->isEnumeratable() )
++ ++length;
++ return length;
+ }
+
+ NodeImpl *HTMLFormCollectionImpl::namedItem( const DOMString &name ) const
+--- khtml/html/html_formimpl.cpp (revision 515119)
++++ khtml/html/html_formimpl.cpp (revision 517245)
+@@ -886,11 +886,7 @@
+ {
+ if( p->id() == ID_FORM )
+ return static_cast<HTMLFormElementImpl *>(p);
+- NodeImpl *s = p->previousSibling();
+- if (!s)
+- p = p->parentNode();
+- else
+- p = s;
++ p = p->parentNode();
+ }
+ #ifdef FORMS_DEBUG
+ kdDebug( 6030 ) << "couldn't find form!" << endl;
+--- khtml/html/html_elementimpl.cpp (revision 515119)
++++ khtml/html/html_elementimpl.cpp (revision 517245)
+@@ -190,7 +190,6 @@
+ getDocument()->incDOMTreeVersion();
+ break;
+ case ATTR_STYLE:
+- setHasStyle();
+ if (m_styleDecls)
+ m_styleDecls->removeCSSHints();
+ else
+--- khtml/html/html_tableimpl.h (revision 515119)
++++ khtml/html/html_tableimpl.h (revision 517245)
+@@ -6,6 +6,7 @@
+ * (C) 1998 Waldo Bastian (bastian at kde.org)
+ * (C) 1999 Lars Knoll (knoll at kde.org)
+ * (C) 1999 Antti Koivisto (koivisto at kde.org)
++ * (C) 2006 Maksim Orlovich (maksim at kde.org)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+@@ -26,6 +27,7 @@
+ #ifndef HTML_TABLEIMPL_H
+ #define HTML_TABLEIMPL_H
+
++#include "misc/htmltags.h"
+ #include "html/html_elementimpl.h"
+
+ namespace DOM {
+@@ -45,6 +47,62 @@
+ class HTMLElement;
+ class HTMLCollection;
+
++// -------------------------------------------------------------------------
++
++/*
++This class helps memorize pointers to child objects that may be
++yanked around via the DOM. It always picks the first pointer of the
++given type.
++
++The pointer it stores can have 3 meanings:
++0 -- no child
++parent -- no idea about the state
++other -- pointer to the child
++*/
++template<typename ChildType, int ChildId> class ChildHolder
++{
++public:
++ ChildHolder():ptr(0) {}
++
++ ChildType* get(const ElementImpl* parent) const {
++ if (static_cast<const NodeImpl *>(ptr) == parent) {
++ //Do lookup.
++ ptr = 0;
++ for (NodeImpl* child = parent->firstChild(); child; child = child->nextSibling())
++ if (child->id() == ChildId) {
++ ptr = static_cast<ElementImpl*>(child);
++ break;
++ }
++ }
++ return reinterpret_cast<ChildType*>(ptr); //Really static_cast..
++ }
++
++ void childAdded(ElementImpl* parent, NodeImpl* child) {
++ if (ptr)
++ ptr = parent; //No clue now..
++ else
++ ptr = child;
++ }
++
++ void childAppended(NodeImpl* child) {
++ if (!ptr)
++ ptr = child;
++ }
++
++ void childRemoved(ElementImpl* parent, NodeImpl* child) {
++ if (child == ptr)
++ ptr = parent; //We removed what was pointing - no clue now..
++ //else things are unchanged.
++ }
++
++ void operator =(ChildType* child) {
++ ptr = child;
++ }
++private:
++ mutable NodeImpl* ptr;
++};
++
++// -------------------------------------------------------------------------
+ class HTMLTableElementImpl : public HTMLElementImpl
+ {
+ public:
+@@ -73,13 +131,13 @@
+
+ virtual Id id() const;
+
+- HTMLTableCaptionElementImpl *caption() const { return tCaption; }
++ HTMLTableCaptionElementImpl *caption() const { return tCaption.get(this); }
+ NodeImpl *setCaption( HTMLTableCaptionElementImpl * );
+
+- HTMLTableSectionElementImpl *tHead() const { return head; }
++ HTMLTableSectionElementImpl *tHead() const { return head.get(this); }
+ NodeImpl *setTHead( HTMLTableSectionElementImpl * );
+
+- HTMLTableSectionElementImpl *tFoot() const { return foot; }
++ HTMLTableSectionElementImpl *tFoot() const { return foot.get(this); }
+ NodeImpl *setTFoot( HTMLTableSectionElementImpl * );
+
+ NodeImpl *setTBody( HTMLTableSectionElementImpl * );
+@@ -95,19 +153,43 @@
+
+ // overrides
+ virtual NodeImpl *addChild(NodeImpl *child);
+- virtual NodeImpl *appendChild( NodeImpl *newChild, int &exceptioncode );
++ virtual NodeImpl *insertBefore ( NodeImpl *newChild, NodeImpl *refChild, int &exceptioncode );
++ virtual NodeImpl *replaceChild ( NodeImpl *newChild, NodeImpl *oldChild, int &exceptioncode );
++ virtual NodeImpl *removeChild ( NodeImpl *oldChild, int &exceptioncode );
++ virtual NodeImpl *appendChild ( NodeImpl *newChild, int &exceptioncode );
++
+ virtual void parseAttribute(AttributeImpl *attr);
+ virtual void attach();
+ virtual void close();
+
++ /* Tries to find the section containing row number outIndex.
++ Returns whether it succeeded or not. negative outIndex values
++ are interpreted as being infinite.
++
++ On success, outSection, outIndex points to section, and index in that
++ section.
++
++ On failure, outSection points to the last section of the table, and
++ index is the offset the row would have if there was an additional section.
++ */
++ bool findRowSection(long inIndex,
++ HTMLTableSectionElementImpl*& outSection,
++ long& outIndex) const;
+ protected:
++ //Actual implementations of keeping things in place.
++ void handleChildAdd ( NodeImpl *newChild );
++ void handleChildAppend( NodeImpl *newChild );
++ void handleChildRemove( NodeImpl *oldChild );
++
+ void updateFrame();
+
+- HTMLTableSectionElementImpl *head;
+- HTMLTableSectionElementImpl *foot;
+- HTMLTableSectionElementImpl *firstBody;
+- HTMLTableCaptionElementImpl *tCaption;
++ ChildHolder<HTMLTableSectionElementImpl, ID_THEAD> head;
++ ChildHolder<HTMLTableSectionElementImpl, ID_TFOOT> foot;
++ ChildHolder<HTMLTableSectionElementImpl, ID_TBODY> firstBody;
++ ChildHolder<HTMLTableCaptionElementImpl, ID_CAPTION> tCaption;
+
++ HTMLTableSectionElementImpl *tFirstBody() const { return firstBody.get(this); }
++
+ Frame frame : 4;
+ Rules rules : 4;
+
+--- khtml/html/htmltokenizer.h (revision 515119)
++++ khtml/html/htmltokenizer.h (revision 517245)
+@@ -339,7 +339,7 @@
+ // on an already loaded document
+ int m_autoCloseTimer;
+
+-#define CBUFLEN 20
++#define CBUFLEN 1024
+ char cBuffer[CBUFLEN+2];
+ unsigned int cBufferPos;
+
+--- khtml/html/html_miscimpl.h (revision 515119)
++++ khtml/html/html_miscimpl.h (revision 517245)
+@@ -59,7 +59,6 @@
+ DOC_ANCHORS, // all A elements with a value for name
+ // from HTMLTable, HTMLTableSection, HTMLTableRow
+ TABLE_ROWS, // all rows in this table
+- TABLE_BODY_ROWS, //all rows in the body and extra/illegal headers. Used to implement the above.
+ TABLE_TBODIES, // all TBODY elements in this table
+ TSECTION_ROWS, // all rows elements in this table section
+ TR_CELLS, // all CELLS in this row
+@@ -93,6 +92,8 @@
+ return type;
+ }
+ protected:
++ virtual unsigned long calcLength(NodeImpl *start) const;
++
+ // The collection list the following elements
+ int type:8;
+
+@@ -115,11 +116,12 @@
+ ~HTMLFormCollectionImpl() { }
+
+ virtual NodeImpl *item ( unsigned long index ) const;
+- virtual unsigned long length() const;
+
+ virtual NodeImpl *namedItem ( const DOMString &name ) const;
+ // In case of multiple items named the same way
+ virtual NodeImpl *nextNamedItem( const DOMString &name ) const;
++protected:
++ virtual unsigned long calcLength( NodeImpl *start ) const;
+
+ private:
+ mutable unsigned currentNamePos;
+--- khtml/html/htmlparser.cpp (revision 515119)
++++ khtml/html/htmlparser.cpp (revision 517245)
+@@ -1388,6 +1388,15 @@
+ blockElem->removeChild(currNode, exceptionCode);
+ newNode->appendChild(currNode, exceptionCode);
+ currNode = nextNode;
++
++ // TODO - To be replaced.
++ // Re-register form elements with currently active form, step 1 will have removed them
++ if (form)
++ {
++ HTMLGenericFormElementImpl *e = static_cast<HTMLGenericFormElementImpl *>(currNode);
++ if (e)
++ form->registerFormElement(e);
++ }
+ }
+
+ // Step 4: Place |newNode| under |blockElem|. |blockElem| is still out of the document, so no
+--- khtml/html/html_tableimpl.cpp (revision 515119)
++++ khtml/html/html_tableimpl.cpp (revision 517245)
+@@ -7,6 +7,7 @@
+ * (C) 1999-2003 Lars Knoll (knoll at kde.org)
+ * (C) 1999 Antti Koivisto (koivisto at kde.org)
+ * (C) 2003 Apple Computer, Inc.
++ * (C) 2006 Maksim Orlovich (maksim at kde.org)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+@@ -50,11 +51,6 @@
+ HTMLTableElementImpl::HTMLTableElementImpl(DocumentPtr *doc)
+ : HTMLElementImpl(doc)
+ {
+- tCaption = 0;
+- head = 0;
+- foot = 0;
+- firstBody = 0;
+-
+ rules = None;
+ frame = Void;
+
+@@ -84,8 +80,8 @@
+ {
+ int exceptioncode = 0;
+ NodeImpl* r;
+- if(tCaption) {
+- replaceChild ( c, tCaption, exceptioncode );
++ if(ElementImpl* cap = caption()) {
++ replaceChild ( c, cap, exceptioncode );
+ r = c;
+ }
+ else
+@@ -98,13 +94,13 @@
+ {
+ int exceptioncode = 0;
+ NodeImpl* r;
+- if(head) {
++ if( ElementImpl* head = tHead() ) {
+ replaceChild( s, head, exceptioncode );
+ r = s;
+ }
+- else if( foot )
++ else if(ElementImpl* foot = tFoot())
+ r = insertBefore( s, foot, exceptioncode );
+- else if( firstBody )
++ else if(ElementImpl* firstBody = tFirstBody())
+ r = insertBefore( s, firstBody, exceptioncode );
+ else
+ r = appendChild( s, exceptioncode );
+@@ -117,10 +113,10 @@
+ {
+ int exceptioncode = 0;
+ NodeImpl* r;
+- if(foot) {
++ if(ElementImpl* foot = tFoot()) {
+ replaceChild ( s, foot, exceptioncode );
+ r = s;
+- } else if( firstBody )
++ } else if(ElementImpl* firstBody = tFirstBody())
+ r = insertBefore( s, firstBody, exceptioncode );
+ else
+ r = appendChild( s, exceptioncode );
+@@ -133,7 +129,7 @@
+ int exceptioncode = 0;
+ NodeImpl* r;
+
+- if(firstBody) {
++ if(ElementImpl* firstBody = tFirstBody()) {
+ replaceChild ( s, firstBody, exceptioncode );
+ r = s;
+ } else
+@@ -145,183 +141,229 @@
+
+ HTMLElementImpl *HTMLTableElementImpl::createTHead( )
+ {
+- if(!head)
++ if(!tHead())
+ {
+ int exceptioncode = 0;
+- head = new HTMLTableSectionElementImpl(docPtr(), ID_THEAD, true /* implicit */);
+- if(foot)
++ ElementImpl* head = new HTMLTableSectionElementImpl(docPtr(), ID_THEAD, true /* implicit */);
++ if(ElementImpl* foot = tFoot())
+ insertBefore( head, foot, exceptioncode );
+- else if(firstBody)
++ else if(ElementImpl* firstBody = tFirstBody())
+ insertBefore( head, firstBody, exceptioncode);
+ else
+ appendChild(head, exceptioncode);
+ }
+- return head;
++ return tHead();
+ }
+
+ void HTMLTableElementImpl::deleteTHead( )
+ {
+- if(head) {
++ if(ElementImpl* head = tHead()) {
+ int exceptioncode = 0;
+- HTMLElementImpl::removeChild(head, exceptioncode);
++ removeChild(head, exceptioncode);
+ }
+- head = 0;
+ }
+
+ HTMLElementImpl *HTMLTableElementImpl::createTFoot( )
+ {
+- if(!foot)
++ if(!tFoot())
+ {
+ int exceptioncode = 0;
+- foot = new HTMLTableSectionElementImpl(docPtr(), ID_TFOOT, true /*implicit */);
+- if(firstBody)
++ ElementImpl* foot = new HTMLTableSectionElementImpl(docPtr(), ID_TFOOT, true /*implicit */);
++ if(ElementImpl* firstBody = tFirstBody())
+ insertBefore( foot, firstBody, exceptioncode );
+ else
+ appendChild(foot, exceptioncode);
+ }
+- return foot;
++ return tFoot();
+ }
+
+ void HTMLTableElementImpl::deleteTFoot( )
+ {
+- if(foot) {
++ if(ElementImpl* foot = tFoot()) {
+ int exceptioncode = 0;
+- HTMLElementImpl::removeChild(foot, exceptioncode);
++ removeChild(foot, exceptioncode);
+ }
+- foot = 0;
+ }
+
+ HTMLElementImpl *HTMLTableElementImpl::createCaption( )
+ {
+- if(!tCaption)
++ if(!caption())
+ {
+ int exceptioncode = 0;
+- tCaption = new HTMLTableCaptionElementImpl(docPtr());
++ ElementImpl* tCaption = new HTMLTableCaptionElementImpl(docPtr());
+ insertBefore( tCaption, firstChild(), exceptioncode );
+ }
+- return tCaption;
++ return caption();
+ }
+
+ void HTMLTableElementImpl::deleteCaption( )
+ {
+- if(tCaption) {
++ if(ElementImpl* tCaption = caption()) {
+ int exceptioncode = 0;
+- HTMLElementImpl::removeChild(tCaption, exceptioncode);
++ removeChild(tCaption, exceptioncode);
+ }
+- tCaption = 0;
+ }
+
+-HTMLElementImpl *HTMLTableElementImpl::insertRow( long index, int &exceptioncode )
++/**
++ Helper. This checks whether the section contains the desired index, and if so,
++ returns the section. Otherwise, it adjust the index, and returns 0.
++ indeces < 0 are considered to be infinite.
++
++ lastSection is adjusted to reflect the parameter passed in.
++*/
++static inline HTMLTableSectionElementImpl* processSection(HTMLTableSectionElementImpl* section,
++ HTMLTableSectionElementImpl* &lastSection, long& index)
+ {
+- // The DOM requires that we create a tbody if the table is empty
+- // (cf DOM2TS HTMLTableElement31 test)
+- // (note: this is different from "if the table has no sections", since we can have
+- // <TABLE><TR>)
+- if(!firstBody && !head && !foot && !hasChildNodes())
+- setTBody( new HTMLTableSectionElementImpl(docPtr(), ID_TBODY, true /* implicit */) );
++ lastSection = section;
++ if ( index < 0 ) //append/last mode
++ return 0;
++
++ long rows = section->numRows();
++ if ( index >= rows ) {
++ section = 0;
++ index -= rows;
++ }
++ return section;
++}
+
+- kdDebug(6030) << k_funcinfo << index << endl;
++
++bool HTMLTableElementImpl::findRowSection(long index,
++ HTMLTableSectionElementImpl*& outSection,
++ long& outIndex) const
++{
++ HTMLTableSectionElementImpl* foot = tFoot();
++ HTMLTableSectionElementImpl* head = tHead();
++
+ HTMLTableSectionElementImpl* section = 0L;
+ HTMLTableSectionElementImpl* lastSection = 0L;
+- NodeImpl *node = firstChild();
+- // The DOM requires that index=-1 means 'append after last'
+- bool append = (index == -1);
+- bool found = false;
+- for ( ; node && (index>=0 || append) ; node = node->nextSibling() )
+- {
+- // there could be 2 tfoot elements in the table. Only the first one is the "foot", that's why we have the more
+- // complicated if statement below.
+- if ( node != foot && (node->id() == ID_THEAD || node->id() == ID_TFOOT || node->id() == ID_TBODY) )
+- {
+- section = static_cast<HTMLTableSectionElementImpl *>(node);
+- lastSection = section;
+- //kdDebug(6030) << k_funcinfo << "section=" << section->tagName() << " rows:" << section->numRows() << endl;
+- if ( !append )
+- {
+- int rows = section->numRows();
+- if ( rows > index ) {
+- found = true;
++
++ if ( head )
++ section = processSection( head, lastSection, index );
++
++ if ( !section ) {
++ for ( NodeImpl *node = firstChild(); node; node = node->nextSibling() ) {
++ if ( ( node->id() == ID_THEAD || node->id() == ID_TFOOT || node->id() == ID_TBODY ) &&
++ node != foot && node != head ) {
++ section = processSection( static_cast<HTMLTableSectionElementImpl *>(node),
++ lastSection, index );
++ if ( section )
+ break;
+- } else
+- index -= rows;
+- //kdDebug(6030) << " index is now " << index << endl;
+ }
+ }
+ }
+- // insertRow(numRows) appends to TFOOT. insertRow(-1) appends to TBODY, hence the !append.
+- if ( !found && !append )
+- section = static_cast<HTMLTableSectionElementImpl *>(foot);
+
+- // If index has decreased to 0, it means "insert before first row in current section"
+- // or "append after last row" (if there's no current section anymore)
+- if ( !section && ( index == 0 || append ) )
+- {
+- section = lastSection;
+- index = section ? section->numRows() : 0;
+- }
+- if ( section && (index >= 0 || append) ) {
+- //kdDebug(6030) << "Inserting row into section " << section << "(" << section->tagName().string() << ") at index " << index << endl;
+- return section->insertRow( index, exceptioncode );
++ if ( !section && foot )
++ section = processSection( foot, lastSection, index );
++
++ outIndex = index;
++ if ( section ) {
++ outSection = section;
++ return true;
+ } else {
+- // No more sections => index is too big
+- exceptioncode = DOMException::INDEX_SIZE_ERR;
+- return 0L;
++ outSection = lastSection;
++ return false;
+ }
+ }
+
++HTMLElementImpl *HTMLTableElementImpl::insertRow( long index, int &exceptioncode )
++{
++ // The DOM requires that we create a tbody if the table is empty
++ // (cf DOM2TS HTMLTableElement31 test). This includes even the cases where
++ // there are <tr>'s immediately under the table, as they're essentially
++ // ignored by these functions.
++ HTMLTableSectionElementImpl* foot = tFoot();
++ HTMLTableSectionElementImpl* head = tHead();
++ if(!tFirstBody() && !foot && !head)
++ setTBody( new HTMLTableSectionElementImpl(docPtr(), ID_TBODY, true /* implicit */) );
++
++ //kdDebug(6030) << k_funcinfo << index << endl;
++
++ long sectionIndex;
++ HTMLTableSectionElementImpl* section;
++ if ( findRowSection( index, section, sectionIndex ) )
++ return section->insertRow( sectionIndex, exceptioncode );
++ else if ( index == -1 || sectionIndex == 0 )
++ return section->insertRow( section->numRows(), exceptioncode );
++
++ // The index is too big.
++ exceptioncode = DOMException::INDEX_SIZE_ERR;
++ return 0L;
++}
++
+ void HTMLTableElementImpl::deleteRow( long index, int &exceptioncode )
+ {
+- HTMLTableSectionElementImpl* section = 0L;
+- NodeImpl *node = firstChild();
+- bool lastRow = index == -1;
+- HTMLTableSectionElementImpl* lastSection = 0L;
+- bool found = false;
+- for ( ; node ; node = node->nextSibling() )
+- {
+- if ( node != foot && (node->id() == ID_THEAD || node->id() == ID_TFOOT || node->id() == ID_TBODY) )
+- {
+- section = static_cast<HTMLTableSectionElementImpl *>(node);
+- lastSection = section;
+- int rows = section->numRows();
+- if ( !lastRow )
+- {
+- if ( rows > index ) {
+- found = true;
+- break;
+- } else
+- index -= rows;
+- }
+- }
+- section = 0L;
+- }
+- if ( !found && foot )
+- section = static_cast<HTMLTableSectionElementImpl *>(foot);
+-
+- if ( lastRow )
+- lastSection->deleteRow( -1, exceptioncode );
+- else if ( section && index >= 0 && index < section->numRows() )
+- section->deleteRow( index, exceptioncode );
++ long sectionIndex;
++ HTMLTableSectionElementImpl* section;
++ if ( findRowSection( index, section, sectionIndex ) )
++ section->deleteRow( sectionIndex, exceptioncode );
++ else if ( section && index == -1 )
++ section->deleteRow( -1, exceptioncode );
+ else
+ exceptioncode = DOMException::INDEX_SIZE_ERR;
+ }
+
+ NodeImpl *HTMLTableElementImpl::appendChild(NodeImpl *child, int &exceptioncode)
+ {
+- // #105586, allow javascript to insert a TR inside a TABLE, creation section as needed
+- if(child->id() == ID_TR && !getDocument()->parsing()) {
+- // See insertRow
+- if (!firstBody && !head && !foot && !hasChildNodes()) {
+- setTBody( new HTMLTableSectionElementImpl(docPtr(), ID_TBODY, true /* implicit */) );
+- }
+- Q_ASSERT( firstBody );
+- if (firstBody) {
+- return firstBody->appendChild( child, exceptioncode );
+- }
++ NodeImpl* retval = HTMLElementImpl::appendChild( child, exceptioncode );
++ if(retval)
++ handleChildAppend( child );
++ return retval;
++}
++
++void HTMLTableElementImpl::handleChildAdd( NodeImpl *child )
++{
++ switch(child->id()) {
++ case ID_CAPTION:
++ tCaption.childAdded(this, child);
++ break;
++ case ID_THEAD:
++ head.childAdded(this, child);
++ break;
++ case ID_TFOOT:
++ foot.childAdded(this, child);
++ break;
++ case ID_TBODY:
++ firstBody.childAdded(this, child);
++ break;
+ }
++}
+
+- return HTMLElementImpl::appendChild( child, exceptioncode );
++void HTMLTableElementImpl::handleChildAppend( NodeImpl *child )
++{
++ switch(child->id()) {
++ case ID_CAPTION:
++ tCaption.childAppended(child);
++ break;
++ case ID_THEAD:
++ head.childAppended(child);
++ break;
++ case ID_TFOOT:
++ foot.childAppended(child);
++ break;
++ case ID_TBODY:
++ firstBody.childAppended(child);
++ break;
++ }
+ }
+
++void HTMLTableElementImpl::handleChildRemove( NodeImpl *child )
++{
++ switch(child->id()) {
++ case ID_CAPTION:
++ tCaption.childRemoved(this, child);
++ break;
++ case ID_THEAD:
++ head.childRemoved(this, child);
++ break;
++ case ID_TFOOT:
++ foot.childRemoved(this, child);
++ break;
++ case ID_TBODY:
++ firstBody.childRemoved(this, child);
++ break;
++ }
++}
++
+ NodeImpl *HTMLTableElementImpl::addChild(NodeImpl *child)
+ {
+ #ifdef DEBUG_LAYOUT
+@@ -329,32 +371,38 @@
+ #endif
+
+ NodeImpl *retval = HTMLElementImpl::addChild( child );
+- if ( retval ) {
+- switch(child->id()) {
+- case ID_CAPTION:
+- if ( !tCaption )
+- tCaption = static_cast<HTMLTableCaptionElementImpl *>(child);
+- break;
+- case ID_COL:
+- case ID_COLGROUP:
+- break;
+- case ID_THEAD:
+- if ( !head )
+- head = static_cast<HTMLTableSectionElementImpl *>(child);
+- break;
+- case ID_TFOOT:
+- if ( !foot )
+- foot = static_cast<HTMLTableSectionElementImpl *>(child);
+- break;
+- case ID_TBODY:
+- if ( !firstBody )
+- firstBody = static_cast<HTMLTableSectionElementImpl *>(child);
+- break;
+- }
+- }
++ if ( retval )
++ handleChildAppend( child );
++
+ return retval;
+ }
+
++NodeImpl *HTMLTableElementImpl::insertBefore ( NodeImpl *newChild, NodeImpl *refChild, int &exceptioncode )
++{
++ NodeImpl* retval = HTMLElementImpl::insertBefore( newChild, refChild, exceptioncode);
++ if (retval)
++ handleChildAdd( newChild );
++
++ return retval;
++}
++
++NodeImpl *HTMLTableElementImpl::replaceChild ( NodeImpl *newChild, NodeImpl *oldChild, int &exceptioncode )
++{
++ handleChildRemove( oldChild ); //Always safe.
++
++ NodeImpl* retval = HTMLElementImpl::replaceChild( newChild, oldChild, exceptioncode );
++ if (retval)
++ handleChildAdd( newChild );
++
++ return retval;
++}
++
++NodeImpl *HTMLTableElementImpl::removeChild ( NodeImpl *oldChild, int &exceptioncode )
++{
++ handleChildRemove( oldChild );
++ return HTMLElementImpl::removeChild( oldChild, exceptioncode);
++}
++
+ void HTMLTableElementImpl::parseAttribute(AttributeImpl *attr)
+ {
+ // ### to CSS!!
+@@ -514,6 +562,7 @@
+
+ void HTMLTableElementImpl::close()
+ {
++ ElementImpl* firstBody = tFirstBody();
+ if (firstBody && !firstBody->closed())
+ firstBody->close();
+ HTMLElementImpl::close();
+@@ -629,14 +678,13 @@
+ return _id;
+ }
+
+-
+ // these functions are rather slow, since we need to get the row at
+ // the index... but they aren't used during usual HTML parsing anyway
+ HTMLElementImpl *HTMLTableSectionElementImpl::insertRow( long index, int& exceptioncode )
+ {
+ HTMLTableRowElementImpl *r = 0L;
+- NodeListImpl *children = childNodes();
+- int numRows = children ? (int)children->length() : 0;
++ HTMLCollectionImpl rows(const_cast<HTMLTableSectionElementImpl*>(this), HTMLCollectionImpl::TSECTION_ROWS);
++ int numRows = rows.length();
+ //kdDebug(6030) << k_funcinfo << "index=" << index << " numRows=" << numRows << endl;
+ if ( index < -1 || index > numRows ) {
+ exceptioncode = DOMException::INDEX_SIZE_ERR; // per the DOM
+@@ -651,38 +699,29 @@
+ if(index < 1)
+ n = firstChild();
+ else
+- n = children->item(index);
++ n = rows.item(index);
+ insertBefore(r, n, exceptioncode );
+ }
+ }
+- delete children;
+ return r;
+ }
+
+ void HTMLTableSectionElementImpl::deleteRow( long index, int &exceptioncode )
+ {
+- NodeListImpl *children = childNodes();
+- int numRows = children ? (int)children->length() : 0;
++ HTMLCollectionImpl rows(const_cast<HTMLTableSectionElementImpl*>(this), HTMLCollectionImpl::TSECTION_ROWS);
++ int numRows = rows.length();
+ if ( index == -1 ) index = numRows - 1;
+ if( index >= 0 && index < numRows )
+- HTMLElementImpl::removeChild(children->item(index), exceptioncode);
++ HTMLElementImpl::removeChild(rows.item(index), exceptioncode);
+ else
+ exceptioncode = DOMException::INDEX_SIZE_ERR;
+- delete children;
+ }
+
+
+ int HTMLTableSectionElementImpl::numRows() const
+ {
+- int rows = 0;
+- const NodeImpl *n = firstChild();
+- while (n) {
+- if (n->id() == ID_TR)
+- rows++;
+- n = n->nextSibling();
+- }
+-
+- return rows;
++ HTMLCollectionImpl rows(const_cast<HTMLTableSectionElementImpl*>(this), HTMLCollectionImpl::TSECTION_ROWS);
++ return rows.length();
+ }
+
+ // -------------------------------------------------------------------------
+--- khtml/ecma/kjs_window.h (revision 515119)
++++ khtml/ecma/kjs_window.h (revision 517245)
+@@ -188,14 +188,31 @@
+ };
+
+ /**
++ * like QDateTime, but properly handles milliseconds
++ */
++ class DateTimeMS
++ {
++ QDate mDate;
++ QTime mTime;
++ public:
++ DateTimeMS addMSecs(int s) const;
++ bool operator >(const DateTimeMS &other) const;
++ bool operator >=(const DateTimeMS &other) const;
++
++ int msecsTo(const DateTimeMS &other) const;
++
++ static DateTimeMS now();
++ };
++
++ /**
+ * An action (either function or string) to be executed after a specified
+ * time interval, either once or repeatedly. Used for window.setTimeout()
+ * and window.setInterval()
+ */
+ class ScheduledAction {
+ public:
+- ScheduledAction(Object _func, List _args, QTime _nextTime, int _interval, bool _singleShot, int _timerId);
+- ScheduledAction(QString _code, QTime _nextTime, int _interval, bool _singleShot, int _timerId);
++ ScheduledAction(Object _func, List _args, DateTimeMS _nextTime, int _interval, bool _singleShot, int _timerId);
++ ScheduledAction(QString _code, DateTimeMS _nextTime, int _interval, bool _singleShot, int _timerId);
+ ~ScheduledAction();
+ bool execute(Window *window);
+ void mark();
+@@ -206,7 +223,7 @@
+ bool isFunction;
+ bool singleShot;
+
+- QTime nextTime;
++ DateTimeMS nextTime;
+ int interval;
+ bool executing;
+ int timerId;
+--- khtml/ecma/kjs_window.cpp (revision 515119)
++++ khtml/ecma/kjs_window.cpp (revision 517245)
+@@ -1868,7 +1868,7 @@
+ ////////////////////// ScheduledAction ////////////////////////
+
+ // KDE 4: Make those parameters const ... &
+-ScheduledAction::ScheduledAction(Object _func, List _args, QTime _nextTime, int _interval, bool _singleShot,
++ScheduledAction::ScheduledAction(Object _func, List _args, DateTimeMS _nextTime, int _interval, bool _singleShot,
+ int _timerId)
+ {
+ //kdDebug(6070) << "ScheduledAction::ScheduledAction(isFunction) " << this << endl;
+@@ -1883,7 +1883,7 @@
+ }
+
+ // KDE 4: Make it const QString &
+-ScheduledAction::ScheduledAction(QString _code, QTime _nextTime, int _interval, bool _singleShot, int _timerId)
++ScheduledAction::ScheduledAction(QString _code, DateTimeMS _nextTime, int _interval, bool _singleShot, int _timerId)
+ {
+ //kdDebug(6070) << "ScheduledAction::ScheduledAction(!isFunction) " << this << endl;
+ //func = 0;
+@@ -1983,7 +1983,8 @@
+ {
+ int id = ++lastTimerId;
+ if (t < 10) t = 10;
+- QTime nextTime = QTime::currentTime().addMSecs(-pausedTime).addMSecs(t);
++ DateTimeMS nextTime = DateTimeMS::now().addMSecs(-pausedTime + t);
++
+ ScheduledAction *action = new ScheduledAction(handler.qstring(),nextTime,t,singleShot,id);
+ scheduledActions.append(action);
+ setNextTimer();
+@@ -1997,7 +1998,8 @@
+ return 0;
+ int id = ++lastTimerId;
+ if (t < 10) t = 10;
+- QTime nextTime = QTime::currentTime().addMSecs(-pausedTime).addMSecs(t);
++
++ DateTimeMS nextTime = DateTimeMS::now().addMSecs(-pausedTime + t);
+ ScheduledAction *action = new ScheduledAction(objFunc,args,nextTime,t,singleShot,id);
+ scheduledActions.append(action);
+ setNextTimer();
+@@ -2039,9 +2041,10 @@
+
+ currentlyDispatching = true;
+
+- QTime currentActual = QTime::currentTime();
+- QTime currentAdjusted = currentActual.addMSecs(-pausedTime);
+
++ DateTimeMS currentActual = DateTimeMS::now();
++ DateTimeMS currentAdjusted = currentActual.addMSecs(-pausedTime);
++
+ // Work out which actions are to be executed. We take a separate copy of
+ // this list since the main one may be modified during action execution
+ QPtrList<ScheduledAction> toExecute;
+@@ -2077,7 +2080,7 @@
+ action->nextTime = action->nextTime.addMSecs(action->interval);
+ }
+
+- pausedTime += currentActual.msecsTo(QTime::currentTime());
++ pausedTime += currentActual.msecsTo(DateTimeMS::now());
+
+ currentlyDispatching = false;
+
+@@ -2085,6 +2088,64 @@
+ setNextTimer();
+ }
+
++DateTimeMS DateTimeMS::addMSecs(int s) const
++{
++ DateTimeMS c = *this;
++ c.mTime = mTime.addMSecs(s);
++ if (s > 0)
++ {
++ if (c.mTime < mTime)
++ c.mDate = mDate.addDays(1);
++ }
++ else
++ {
++ if (c.mTime > mTime)
++ c.mDate = mDate.addDays(-1);
++ }
++ return c;
++}
++
++bool DateTimeMS::operator >(const DateTimeMS &other) const
++{
++ if (mDate > other.mDate)
++ return true;
++
++ if (mDate < other.mDate)
++ return false;
++
++ return mTime > other.mTime;
++}
++
++bool DateTimeMS::operator >=(const DateTimeMS &other) const
++{
++ if (mDate > other.mDate)
++ return true;
++
++ if (mDate < other.mDate)
++ return false;
++
++ return mTime >= other.mTime;
++}
++
++int DateTimeMS::msecsTo(const DateTimeMS &other) const
++{
++ int d = mDate.daysTo(other.mDate);
++ int ms = mTime.msecsTo(other.mTime);
++ return d*24*60*60*1000 + ms;
++}
++
++
++DateTimeMS DateTimeMS::now()
++{
++ DateTimeMS t;
++ QTime before = QTime::currentTime();
++ t.mDate = QDate::currentDate();
++ t.mTime = QTime::currentTime();
++ if (t.mTime < before)
++ t.mDate = QDate::currentDate(); // prevent race condition in hacky way :)
++ return t;
++}
++
+ void WindowQObject::setNextTimer()
+ {
+ if (currentlyDispatching)
+@@ -2094,13 +2155,13 @@
+ return;
+
+ QPtrListIterator<ScheduledAction> it(scheduledActions);
+- QTime nextTime = it.current()->nextTime;
++ DateTimeMS nextTime = it.current()->nextTime;
+ for (++it; it.current(); ++it)
+ if (nextTime > it.current()->nextTime)
+ nextTime = it.current()->nextTime;
+
+- QTime nextTimeActual = nextTime.addMSecs(pausedTime);
+- int nextInterval = QTime::currentTime().msecsTo(nextTimeActual);
++ DateTimeMS nextTimeActual = nextTime.addMSecs(pausedTime);
++ int nextInterval = DateTimeMS::now().msecsTo(nextTimeActual);
+ if (nextInterval < 0)
+ nextInterval = 0;
+ startTimer(nextInterval);
+--- khtml/rendering/bidi.cpp (revision 515119)
++++ khtml/rendering/bidi.cpp (revision 517245)
+@@ -649,7 +649,7 @@
+ return box;
+ }
+
+-InlineFlowBox* RenderBlock::constructLine(const BidiIterator &start, const BidiIterator &end)
++InlineFlowBox* RenderBlock::constructLine(const BidiIterator &/*start*/, const BidiIterator &end)
+ {
+ if (!sFirstBidiRun)
+ return 0; // We had no runs. Don't make a root inline box at all. The line is empty.
+@@ -773,6 +773,8 @@
+ int rightPos = lineBox->placeBoxesHorizontally(x);
+ if (rightPos > m_overflowWidth)
+ m_overflowWidth = rightPos; // FIXME: Work for rtl overflow also.
++ if (x < 0)
++ m_negativeOverflowWidth = kMax(m_negativeOverflowWidth, -x);
+ }
+
+ void RenderBlock::computeVerticalPositionsForLine(InlineFlowBox* lineBox)
+@@ -855,7 +857,6 @@
+ #endif
+ }
+ if (doPageBreak) {
+- int oldYPos = lineBox->yPos();
+ int pTop = pageTopAfter(lineBox->yPos());
+
+ m_height = pTop;
+--- khtml/rendering/render_object.h (revision 515119)
++++ khtml/rendering/render_object.h (revision 517245)
+@@ -145,6 +145,7 @@
+
+ virtual RenderLayer* layer() const { return 0; }
+ RenderLayer* enclosingLayer() const;
++ RenderLayer* enclosingStackingContext() const;
+ void addLayers(RenderLayer* parentLayer, RenderObject* newObject);
+ void removeLayers(RenderLayer* parentLayer);
+ void moveLayers(RenderLayer* oldParent, RenderLayer* newParent);
+@@ -537,6 +538,11 @@
+ virtual int xPos() const { return 0; }
+ virtual int yPos() const { return 0; }
+
++ /** the position of the object from where it begins drawing, including
++ * its negative overflow
++ */
++ int effectiveXPos() const { return xPos() - (hasOverflowClip() ? 0 : negativeOverflowWidth()); }
++
+ /** Leftmost coordinate of this inline element relative to containing
+ * block. Always zero for non-inline elements.
+ */
+@@ -559,6 +565,8 @@
+ // of borderTop() + paddingTop() + 100px.
+ virtual int overflowHeight() const { return height(); }
+ virtual int overflowWidth() const { return width(); }
++ // how much goes over the left hand side (0 or a positive number)
++ virtual int negativeOverflowWidth() const { return 0; }
+
+ /**
+ * Returns the height that is effectively considered when contemplating the
+@@ -569,7 +577,7 @@
+ * Returns the width that is effectively considered when contemplating the
+ * object as a whole -- usually the overflow width, or the width if clipped.
+ */
+- int effectiveWidth() const { return hasOverflowClip() ? width() : overflowWidth(); }
++ int effectiveWidth() const { return hasOverflowClip() ? width() : overflowWidth() + negativeOverflowWidth(); }
+
+ // IE extensions, heavily used in ECMA
+ virtual short offsetWidth() const { return width(); }
+@@ -732,6 +740,8 @@
+ virtual long maxOffset() const { return 0; }
+
+ virtual void setPixmap(const QPixmap &, const QRect&, CachedImage *);
++
++ QRegion visibleFlowRegion(int x, int y) const;
+
+ protected:
+ virtual void selectionStartEnd(int& spos, int& epos);
+@@ -739,8 +749,8 @@
+ virtual QRect viewRect() const;
+ void remove();
+ void invalidateVerticalPositions();
++ void updateWidgetMasks();
+
+-
+ virtual void removeLeftoverAnonymousBoxes();
+
+ void arenaDelete(RenderArena *arena);
+--- khtml/rendering/render_canvas.h (revision 515119)
++++ khtml/rendering/render_canvas.h (revision 517245)
+@@ -126,6 +126,9 @@
+
+ void setMaximalOutlineSize(int o) { m_maximalOutlineSize = o; }
+ int maximalOutlineSize() const { return m_maximalOutlineSize; }
++
++ void setNeedsWidgetMasks( bool b=true) { m_needsWidgetMasks = b; }
++ bool needsWidgetMasks() const { return m_needsWidgetMasks; }
+
+ protected:
+
+@@ -155,6 +158,8 @@
+ bool m_staticMode;
+ // Canvas is paged
+ bool m_pagedMode;
++ // Canvas contains overlaid widgets
++ bool m_needsWidgetMasks;
+
+ short m_pageNr;
+
+--- khtml/rendering/render_layer.h (revision 515119)
++++ khtml/rendering/render_layer.h (revision 517245)
+@@ -217,6 +217,12 @@
+ QPtrVector<RenderLayer>* posZOrderList() const { return m_posZOrderList; }
+ QPtrVector<RenderLayer>* negZOrderList() const { return m_negZOrderList; }
+
++ void setHasOverlaidWidgets(bool b=true) { m_hasOverlaidWidgets = b; }
++ bool hasOverlaidWidgets() const { return m_hasOverlaidWidgets; }
++ QRegion getMask() const { return m_region; }
++ QRegion paintedRegion(RenderLayer* rootLayer);
++ void updateWidgetMasks(RenderLayer* rootLayer);
++
+ // Gets the nearest enclosing positioned ancestor layer (also includes
+ // the <html> layer and the root layer).
+ RenderLayer* enclosingPositionedAncestor() const;
+@@ -312,8 +318,12 @@
+ bool m_zOrderListsDirty;
+
+ bool m_markedForRepaint;
++
+ QRect m_visibleRect;
+
++ bool m_hasOverlaidWidgets;
++ QRegion m_region; // used by overlaid (non z-order aware) widgets
++
+ Marquee* m_marquee; // Used by layers with overflow:marquee
+ };
+
+--- khtml/rendering/render_frames.h (revision 515119)
++++ khtml/rendering/render_frames.h (revision 517245)
+@@ -128,6 +128,7 @@
+ RenderFrame( DOM::HTMLFrameElementImpl *frame );
+
+ virtual const char *renderName() const { return "RenderFrame"; }
++ virtual bool isFrame() const { return true; }
+
+ DOM::HTMLFrameElementImpl *element() const
+ { return static_cast<DOM::HTMLFrameElementImpl*>(RenderObject::element()); }
+--- khtml/rendering/render_replaced.h (revision 515119)
++++ khtml/rendering/render_replaced.h (revision 517245)
+@@ -91,6 +91,8 @@
+ virtual void paint( PaintInfo& i, int tx, int ty );
+ virtual bool isWidget() const { return true; };
+
++ virtual bool isFrame() const { return false; }
++
+ virtual void detach( );
+ virtual void layout( );
+
+@@ -102,6 +104,7 @@
+ void deref();
+
+ void cancelPendingResize();
++ bool needsMask() const { return m_needsMask; }
+
+ static void paintWidget(PaintInfo& pI, QWidget *widget, int tx, int ty);
+ virtual bool handleEvent(const DOM::EventImpl& ev);
+@@ -115,6 +118,7 @@
+
+ public slots:
+ void slotWidgetDestructed();
++ bool isKHTMLWidget() const { return m_isKHTMLWidget; }
+
+ protected:
+ virtual bool canHaveBorder() const { return false; }
+@@ -138,6 +142,8 @@
+
+ bool m_resizePending;
+ bool m_discardResizes;
++ bool m_isKHTMLWidget;
++ bool m_needsMask;
+
+ public:
+ class EventPropagator : public QWidget {
+--- khtml/rendering/render_table.h (revision 515119)
++++ khtml/rendering/render_table.h (revision 517245)
+@@ -52,25 +52,6 @@
+ class RenderTable : public RenderBlock
+ {
+ public:
+- enum Rules {
+- None = 0x00,
+- RGroups = 0x01,
+- CGroups = 0x02,
+- Groups = 0x03,
+- Rows = 0x05,
+- Cols = 0x0a,
+- All = 0x0f
+- };
+- enum Frame {
+- Void = 0x00,
+- Above = 0x01,
+- Below = 0x02,
+- Lhs = 0x04,
+- Rhs = 0x08,
+- Hsides = 0x03,
+- Vsides = 0x0c,
+- Box = 0x0f
+- };
+
+ RenderTable(DOM::NodeImpl* node);
+ ~RenderTable();
+@@ -87,8 +68,6 @@
+ int borderHSpacing() const { return hspacing; }
+ int borderVSpacing() const { return vspacing; }
+
+- Rules getRules() const { return rules; }
+-
+ bool collapseBorders() const { return style()->borderCollapse(); }
+ int borderLeft() const;
+ int borderRight() const;
+@@ -196,9 +175,6 @@
+
+ CollapsedBorderValue* m_currentBorder;
+
+- Frame frame : 4;
+- Rules rules : 4;
+-
+ bool has_col_elems : 1;
+ uint needSectionRecalc : 1;
+ uint padding : 22;
+@@ -426,9 +402,9 @@
+ { return m_percentageHeight; }
+ void setCellPercentageHeight(int h)
+ { m_percentageHeight = h; }
+- bool hasFlexedAnonymous() const
+- { return m_hasFlexedAnonymous; }
+- void setHasFlexedAnonymous(bool b=true)
++ bool hasFlexedAnonymous() const
++ { return m_hasFlexedAnonymous; }
++ void setHasFlexedAnonymous(bool b=true)
+ { m_hasFlexedAnonymous = b; }
+
+ protected:
+--- khtml/rendering/render_block.h (revision 515119)
++++ khtml/rendering/render_block.h (revision 517245)
+@@ -56,6 +56,7 @@
+ // it would have an overflow height of borderTop() + paddingTop() + 100px.
+ virtual int overflowHeight() const { return m_overflowHeight; }
+ virtual int overflowWidth() const { return m_overflowWidth; }
++ virtual int negativeOverflowWidth() const { return m_negativeOverflowWidth; }
+ virtual void setOverflowHeight(int h) { m_overflowHeight = h; }
+ virtual void setOverflowWidth(int w) { m_overflowWidth = w; }
+
+@@ -146,6 +147,8 @@
+ int lowestAbsolutePosition() const;
+ int leftmostAbsolutePosition() const;
+ int rightmostAbsolutePosition() const;
++
++ virtual bool absolutePosition(int &xPos, int &yPos, bool=false);
+
+ int rightOffset() const;
+ int rightRelOffset(int y, int fixedOffset, bool applyTextIndent=true, int *heightRemaining = 0, bool *canClearLine = 0) const;
+@@ -337,6 +340,7 @@
+ // XXX Generalize to work with top and left as well.
+ int m_overflowHeight;
+ int m_overflowWidth;
++ int m_negativeOverflowWidth;
+
+ private:
+ QPtrList<FloatingObject>* m_floatingObjects;
+--- khtml/rendering/render_object.cpp (revision 515119)
++++ khtml/rendering/render_object.cpp (revision 517245)
+@@ -5,6 +5,7 @@
+ * (C) 1999 Antti Koivisto (koivisto at kde.org)
+ * (C) 2000-2003 Dirk Mueller (mueller at kde.org)
+ * (C) 2002-2004 Apple Computer, Inc.
++ * (C) 2006 Germain Garand <germain at ebooksfrance.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+@@ -77,6 +78,8 @@
+ static void *baseOfRenderObjectBeingDeleted;
+ #endif
+
++//#define MASK_DEBUG
++
+ void* RenderObject::operator new(size_t sz, RenderArena* renderArena) throw()
+ {
+ return renderArena->allocate(sz);
+@@ -385,6 +388,14 @@
+ return 0;
+ }
+
++RenderLayer* RenderObject::enclosingStackingContext() const
++{
++ RenderLayer* l = enclosingLayer();
++ while (l && !l->isStackingContext())
++ l = l->parent();
++ return l;
++}
++
+ int RenderObject::offsetLeft() const
+ {
+ if ( isPositioned() )
+@@ -564,8 +575,12 @@
+ }
+ else if(m_style->position() == ABSOLUTE) {
+ while (o &&
+- ( o->style()->position() == STATIC || ( o->isInline() && !o->isReplaced() ) ) && !o->isCanvas())
++ ( o->style()->position() == STATIC || ( o->isInline() && !o->isReplaced() ) ) && !o->isCanvas()) {
++ // for relpos inlines, return the nearest block - it will host the positioned objects list
++ if (o->isInline() && !o->isReplaced() && o->style()->position() == RELATIVE)
++ return o->containingBlock();
+ o = o->parent();
++ }
+ } else {
+ while(o && ( ( o->isInline() && !o->isReplaced() ) || o->isTableRow() || o->isTableSection() ||
+ o->isTableCol() || o->isFrameSet() ) )
+@@ -1239,6 +1254,8 @@
+ m_relPositioned = false;
+ m_paintBackground = false;
+
++ // only honour z-index for non-static objects
++ // ### and objects with opacity
+ if ( style->position() == STATIC ) {
+ if ( isRoot() )
+ style->setZIndex( 0 );
+@@ -1276,9 +1293,16 @@
+ }
+ setNeedsLayoutAndMinMaxRecalc();
+ } else if (!isText() && d == RenderStyle::Visible) {
+- if (layer() && !isInlineFlow())
++ if (layer() && !isInlineFlow()) {
+ layer()->repaint();
+- else
++ if (canvas() && canvas()->needsWidgetMasks()) {
++ RenderLayer *p, *d = 0;
++ for (p=layer()->parent();p;p=p->parent())
++ if (p->hasOverlaidWidgets()) d=p;
++ if (d) // deepest
++ d->updateWidgetMasks( canvas()->layer() );
++ }
++ } else
+ repaint();
+ }
+ }
+@@ -1655,7 +1679,8 @@
+ (_y >= ty) && (_y < ty + height()) && (_x >= tx) && (_x < tx + width())) || isRoot() || isBody();
+ bool inOverflowRect = inside;
+ if ( !inOverflowRect ) {
+- QRect overflowRect( tx, ty, overflowWidth(), overflowHeight() );
++ int no = negativeOverflowWidth();
++ QRect overflowRect( tx-no, ty, overflowWidth()+no, overflowHeight() );
+ inOverflowRect = overflowRect.contains( _x, _y );
+ }
+
+@@ -2140,7 +2165,53 @@
+ counters->insert(counter, val);
+ }
+
++void RenderObject::updateWidgetMasks() {
++ for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) {
++ if ( curr->isWidget() && static_cast<RenderWidget*>(curr)->needsMask() ) {
++ QWidget* w = static_cast<RenderWidget*>(curr)->widget();
++ RenderLayer* l = curr->enclosingStackingContext();
++ QRegion r = l ? l->getMask() : QRegion();
++ int x,y;
++ if (!r.isNull() && curr->absolutePosition(x,y)) {
++ x+= curr->borderLeft()+curr->paddingLeft();
++ y+= curr->borderBottom()+curr->paddingBottom();
++ r = r.intersect(QRect(x,y,w->width(),w->height()));
++#ifdef MASK_DEBUG
++ QMemArray<QRect> ar = r.rects();
++ kdDebug(6040) << "|| Setting widget mask for " << curr->information() << endl;
++ for (int i = 0; i < ar.size() ; ++i) {
++ kdDebug(6040) << " " << ar[i] << endl;
++ }
++#endif
++ r.translate(-x,-y);
++ w->setMask(r);
++ } else {
++ w->clearMask();
++ }
++ }
++ else if (!curr->layer() || !curr->layer()->isStackingContext())
++ curr->updateWidgetMasks();
++
++ }
++}
+
++QRegion RenderObject::visibleFlowRegion(int x, int y) const
++{
++ QRegion r;
++ for (RenderObject* ro=firstChild();ro;ro=ro->nextSibling()) {
++ if( !ro->layer() && !ro->isInlineFlow() && ro->style()->visibility() == VISIBLE) {
++ const RenderStyle *s = ro->style();
++ if (ro->isRelPositioned())
++ static_cast<const RenderBox*>(ro)->relativePositionOffset(x,y);
++ if ( s->backgroundImage() || s->backgroundColor().isValid() || s->hasBorder() )
++ r += QRect(x + ro->effectiveXPos(),y + ro->yPos(), ro->effectiveWidth(), ro->effectiveHeight());
++ else
++ r += ro->visibleFlowRegion(x+ro->effectiveXPos(),y+ro->yPos());
++ }
++ }
++ return r;
++}
++
+ #undef RED_LUMINOSITY
+ #undef GREEN_LUMINOSITY
+ #undef BLUE_LUMINOSITY
+--- khtml/rendering/render_canvas.cpp (revision 515119)
++++ khtml/rendering/render_canvas.cpp (revision 517245)
+@@ -72,6 +72,8 @@
+ m_selectionEnd = 0;
+ m_selectionStartPos = -1;
+ m_selectionEndPos = -1;
++
++ m_needsWidgetMasks = false;
+
+ // Create a new root layer for our layer hierarchy.
+ m_layer = new (node->getDocument()->renderArena()) RenderLayer(this);
+@@ -165,6 +167,8 @@
+ kdDebug() << "RenderCanvas::layout time used=" << qt.elapsed() << endl;
+ qt.start();
+ #endif
++ int oldWidth = m_width;
++ int oldHeight = m_height;
+
+ if (m_pagedMode || !m_view) {
+ m_width = m_rootWidth;
+@@ -176,8 +180,10 @@
+ m_viewportHeight = m_height = m_view->visibleHeight();
+ }
+
+- RenderBlock::layout();
++ bool relayoutChildren = (oldWidth != m_width) || (oldHeight != m_height);
+
++ RenderBlock::layoutBlock( relayoutChildren );
++
+ int docW = docWidth();
+ int docH = docHeight();
+
+@@ -224,6 +230,9 @@
+
+ layer()->resize( kMax( docW,int( m_width ) ), kMax( docH,m_height ) );
+ layer()->updateLayerPositions( layer(), needsFullRepaint(), true );
++
++ if (!m_pagedMode && m_needsWidgetMasks)
++ layer()->updateWidgetMasks(layer());
+
+ scheduleDeferredRepaints();
+ setNeedsLayout(false);
+@@ -246,10 +255,9 @@
+ xPos = 0;
+ yPos = m_pageTop;
+ }
+- else
+- if ( f && m_view) {
+- xPos = m_view->contentsX();
+- yPos = m_view->contentsY();
++ else if ( f && m_view) {
++ xPos = m_view->contentsX();
++ yPos = m_view->contentsY();
+ }
+ else {
+ xPos = yPos = 0;
+@@ -369,10 +377,13 @@
+ if (enclosingParent) {
+ int ox, oy;
+ enclosingParent->absolutePosition(ox, oy);
+- rect.setX(ox);
++ int off = 0;
++ if (!enclosingParent->hasOverflowClip())
++ off = enclosingParent->negativeOverflowWidth();
++ rect.setX(ox - off);
+ rect.setY(oy);
+- rect.setWidth (enclosingParent->effectiveWidth());
+- rect.setHeight (enclosingParent->effectiveHeight());
++ rect.setWidth(enclosingParent->effectiveWidth());
++ rect.setHeight(enclosingParent->effectiveHeight());
+ }
+ return rect;
+ }
+--- khtml/rendering/render_layer.cpp (revision 515119)
++++ khtml/rendering/render_layer.cpp (revision 517245)
+@@ -1,5 +1,6 @@
+ /*
+ * Copyright (C) 2003 Apple Computer, Inc.
++ * Copyright (C) 2006 Germain Garand <germain at ebooksfrance.org>
+ *
+ * Portions are Copyright (C) 1998 Netscape Communications Corporation.
+ *
+@@ -96,6 +97,7 @@
+ m_negZOrderList( 0 ),
+ m_zOrderListsDirty( true ),
+ m_markedForRepaint( false ),
++m_hasOverlaidWidgets( false ),
+ m_marquee( 0 )
+ {
+ }
+@@ -114,6 +116,7 @@
+
+ void RenderLayer::updateLayerPosition()
+ {
++
+ // The canvas is sized to the docWidth/Height over in RenderCanvas::layout, so we
+ // don't need to ever update our layer position here.
+ if (renderer()->isCanvas())
+@@ -150,6 +153,43 @@
+ setPos(x,y);
+ }
+
++QRegion RenderLayer::paintedRegion(RenderLayer* rootLayer)
++{
++ updateZOrderLists();
++ QRegion r;
++ if (m_negZOrderList) {
++ uint count = m_negZOrderList->count();
++ for (uint i = 0; i < count; i++) {
++ RenderLayer* child = m_negZOrderList->at(i);
++ r += child->paintedRegion(rootLayer);
++ }
++ }
++ const RenderStyle *s= renderer()->style();
++ if (s->visibility() == VISIBLE) {
++ int x = 0; int y = 0;
++ convertToLayerCoords(rootLayer,x,y);
++ QRect cr(x,y,width(),height());
++ if ( s->backgroundImage() || s->backgroundColor().isValid() || s->hasBorder() ||
++ s->scrollsOverflow() || renderer()->isReplaced() ) {
++ r += cr;
++ } else {
++ int x = 0; int y = 0;
++ convertToLayerCoords(rootLayer,x,y);
++ QRect lr = renderer()->visibleFlowRegion(x, y).boundingRect();
++ r += renderer()->visibleFlowRegion(x, y);
++ }
++ }
++
++ if (m_posZOrderList) {
++ uint count = m_posZOrderList->count();
++ for (uint i = 0; i < count; i++) {
++ RenderLayer* child = m_posZOrderList->at(i);
++ r += child->paintedRegion(rootLayer);
++ }
++ }
++ return r;
++}
++
+ void RenderLayer::repaint( bool markForRepaint )
+ {
+ if (markForRepaint && m_markedForRepaint)
+@@ -194,21 +234,48 @@
+ QRect layerBounds, damageRect, fgrect;
+ calculateRects(rootLayer, renderer()->viewRect(), layerBounds, damageRect, fgrect);
+ QRect vr = damageRect.intersect( layerBounds );
+- if (vr != m_visibleRect && vr.isValid())
++ if (vr != m_visibleRect && vr.isValid()) {
+ renderer()->canvas()->repaintViewRectangle( vr.x(), vr.y(), vr.width(), vr.height() );
++ m_visibleRect = vr;
++ }
+ }
+ m_markedForRepaint = false;
+ #endif
+
+ for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
+ child->updateLayerPositions(rootLayer, doFullRepaint, checkForRepaint);
+-
++
+ // With all our children positioned, now update our marquee if we need to.
+ if (m_marquee)
+ m_marquee->updateMarqueePosition();
+ }
+
++void RenderLayer::updateWidgetMasks(RenderLayer* rootLayer)
++{
++ if (hasOverlaidWidgets() && !renderer()->canvas()->pagedMode()) {
++ updateZOrderLists();
++ uint count = m_posZOrderList ? m_posZOrderList->count() : 0;
++ bool needUpdate = (count || !m_region.isNull());
++ if (count) {
++ QScrollView* sv = m_object->element()->getDocument()->view();
++ m_region = QRect(0,0,sv->contentsWidth(),sv->contentsHeight());
+
++ for (uint i = 0; i < count; i++) {
++ RenderLayer* child = m_posZOrderList->at(i);
++ if (child->zIndex() == 0 && child->renderer()->style()->position() == STATIC)
++ continue; // we don't know the widget's exact stacking position within flow
++ m_region -= child->paintedRegion(rootLayer);
++ }
++ } else {
++ m_region = QRegion();
++ }
++ if (needUpdate)
++ renderer()->updateWidgetMasks();
++ }
++ for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
++ child->updateWidgetMasks(rootLayer);
++}
++
+ short RenderLayer::width() const
+ {
+ int w = m_object->width();
+--- khtml/rendering/render_replaced.cpp (revision 515119)
++++ khtml/rendering/render_replaced.cpp (revision 517245)
+@@ -23,6 +23,7 @@
+ *
+ */
+ #include "render_replaced.h"
++#include "render_layer.h"
+ #include "render_canvas.h"
+ #include "render_line.h"
+
+@@ -101,6 +102,8 @@
+ m_arena.reset(renderArena());
+ m_resizePending = false;
+ m_discardResizes = false;
++ m_isKHTMLWidget = false;
++ m_needsMask = false;
+
+ // this is no real reference counting, its just there
+ // to make sure that we're not deleted while we're recursed
+@@ -115,7 +118,8 @@
+
+ if ( m_widget ) {
+ if ( m_view ) {
+- m_view->setWidgetVisible(this, false);
++ if (!isKHTMLWidget())
++ m_view->setWidgetVisible(this, false);
+ m_view->removeChild( m_widget );
+ }
+
+@@ -154,7 +158,7 @@
+ w = kMin( w, 2000 );
+
+ if (m_widget->width() != w || m_widget->height() != h) {
+- m_resizePending = !strcmp(m_widget->name(), "__khtml");
++ m_resizePending = isKHTMLWidget();
+ ref();
+ element()->ref();
+ QApplication::postEvent( this, new QWidgetResizeEvent( w, h ) );
+@@ -209,7 +213,7 @@
+ connect( m_widget, SIGNAL( destroyed()), this, SLOT( slotWidgetDestructed()));
+ m_widget->installEventFilter(this);
+
+- if ( !strcmp(m_widget->name(), "__khtml") && !::qt_cast<QFrame*>(m_widget))
++ if ( (m_isKHTMLWidget = !strcmp(m_widget->name(), "__khtml")) && !::qt_cast<QFrame*>(m_widget))
+ m_widget->setBackgroundMode( QWidget::NoBackground );
+
+ if (m_widget->focusPolicy() > QWidget::StrongFocus)
+@@ -224,7 +228,8 @@
+ else
+ setPos(xPos(), -500000);
+ }
+- m_view->setWidgetVisible(this, false);
++ if (!isKHTMLWidget())
++ m_view->setWidgetVisible(this, false);
+ m_view->addChild( m_widget, 0, -500000);
+ if ( m_widget ) m_widget->hide();
+ m_resizePending = false;
+@@ -235,9 +240,26 @@
+ {
+ KHTMLAssert( needsLayout() );
+ KHTMLAssert( minMaxKnown() );
+- if ( m_widget )
++ if ( m_widget ) {
+ resizeWidget( m_width-borderLeft()-borderRight()-paddingLeft()-paddingRight(),
+ m_height-borderTop()-borderBottom()-paddingTop()-paddingBottom() );
++ if (!isKHTMLWidget() && !isFrame() && !m_needsMask) {
++ m_needsMask = true;
++ RenderLayer* rl = enclosingStackingContext();
++ RenderLayer* el = enclosingLayer();
++ while (rl && el && el != rl) {
++ if (el->renderer()->style()->position() != STATIC) {
++ m_needsMask = false;
++ break;
++ }
++ el = el->parent();
++ }
++ if (m_needsMask) {
++ rl->setHasOverlaidWidgets();
++ canvas()->setNeedsWidgetMasks();
++ }
++ }
++ }
+
+ setNeedsLayout(false);
+ }
+@@ -257,7 +279,7 @@
+ int lowlightVal = 100 + (2*contrast_+4)*10;
+
+ if (backgroundColor.isValid()) {
+- if (strcmp(widget()->name(), "__khtml"))
++ if (!isKHTMLWidget())
+ widget()->setEraseColor(backgroundColor );
+ for ( int i = 0; i < QPalette::NColorGroups; ++i ) {
+ pal.setColor( (QPalette::ColorGroup)i, QColorGroup::Background, backgroundColor );
+@@ -325,7 +347,7 @@
+
+ void RenderWidget::slotWidgetDestructed()
+ {
+- if (m_view)
++ if (m_view && !isKHTMLWidget())
+ m_view->setWidgetVisible(this, false);
+ m_widget = 0;
+ }
+@@ -337,7 +359,7 @@
+ {
+ m_widget->setFont(style()->font());
+ if (style()->visibility() != VISIBLE) {
+- if (m_view)
++ if (m_view && !isKHTMLWidget())
+ m_view->setWidgetVisible(this, false);
+ m_widget->hide();
+ }
+@@ -378,7 +400,7 @@
+ int xPos = _tx+borderLeft()+paddingLeft();
+ int yPos = _ty+borderTop()+paddingTop();
+
+- bool khtmlw = !strcmp(m_widget->name(), "__khtml");
++ bool khtmlw = isKHTMLWidget();
+ int childw = m_widget->width();
+ int childh = m_widget->height();
+ if ( (childw == 2000 || childh == 3072) && m_widget->inherits( "KHTMLView" ) ) {
+@@ -412,7 +434,8 @@
+ xPos = xNew;
+ yPos = yNew;
+ }
+- m_view->setWidgetVisible(this, true);
++ if (!khtmlw)
++ m_view->setWidgetVisible(this, true);
+ m_view->addChild(m_widget, xPos, yPos );
+ m_widget->show();
+ if (khtmlw)
+--- khtml/rendering/render_text.cpp (revision 515119)
++++ khtml/rendering/render_text.cpp (revision 517245)
+@@ -591,7 +591,7 @@
+ // and return pos, which is the position of the char in the run.
+
+ // FIXME: make this use binary search? Dirk says it won't work :-( (LS)
+-
++ (void)checkFirstLetter;
+ #if 0
+ if (checkFirstLetter && forcedMinOffset()) {
+ // kdDebug(6040) << "checkFirstLetter: forcedMinOffset: " << forcedMinOffset() << endl;
+@@ -641,7 +641,7 @@
+ return s;
+ }
+
+-bool RenderText::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty, HitTestAction /*hitTestAction*/, bool inBox)
++bool RenderText::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty, HitTestAction /*hitTestAction*/, bool /*inBox*/)
+ {
+ assert(parent());
+
+--- khtml/rendering/render_table.cpp (revision 515119)
++++ khtml/rendering/render_table.cpp (revision 517245)
+@@ -59,8 +59,6 @@
+ tableLayout = 0;
+ m_currentBorder = 0;
+
+- rules = None;
+- frame = Void;
+ has_col_elems = false;
+ hspacing = vspacing = 0;
+ padding = 0;
+@@ -1200,7 +1198,7 @@
+ int totalCols = row->size();
+ int totalRows = grid.size();
+ bool pagedMode = canvas()->pagedMode();
+-
++
+ grid[r].needFlex = false;
+
+ for ( int c = 0; c < totalCols; c++ ) {
+@@ -1228,7 +1226,7 @@
+ ch = cell->style()->height().width(0);
+ if ( cell->height() > ch)
+ ch = cell->height();
+-
++
+ if (!cell->style()->height().isVariable())
+ grid[r].needFlex = true;
+
+@@ -1458,7 +1456,7 @@
+
+ bool RenderTableSection::flexCellChildren(RenderObject* p) const
+ {
+- if (!p)
++ if (!p)
+ return false;
+ RenderObject* o = p->firstChild();
+ bool didFlex = false;
+@@ -1510,7 +1508,7 @@
+ bottom = kMax(bottom, bp);
+ }
+ }
+-
++
+ return bottom;
+ }
+
+@@ -1527,7 +1525,7 @@
+ right = kMax(right, rp);
+ }
+ }
+-
++
+ return right;
+ }
+
+@@ -1536,7 +1534,7 @@
+ int left = RenderContainer::leftmostPosition(includeOverflowInterior, includeSelf);
+ if (!includeOverflowInterior && hasOverflowClip())
+ return left;
+-
++
+ for (RenderObject *row = firstChild(); row; row = row->nextSibling()) {
+ for (RenderObject *cell = row->firstChild(); cell; cell = cell->nextSibling())
+ if (cell->isTableCell()) {
+@@ -1544,7 +1542,7 @@
+ left = kMin(left, lp);
+ }
+ }
+-
++
+ return left;
+ }
+
+@@ -1684,8 +1682,6 @@
+ for ( int r = 0; r < totalRows; r++ ) {
+ if (rowPos[r] >= pos) {
+ rowPos[r] += dy;
+- Row *row = grid[r].row;
+- int totalCols = row->size();
+ int rindx;
+ for ( int c = 0; c < nEffCols; c++ )
+ {
+--- khtml/rendering/render_box.cpp (revision 515119)
++++ khtml/rendering/render_box.cpp (revision 517245)
+@@ -165,18 +165,9 @@
+ m_layer = 0;
+ }
+
+- if (m_layer) {
+- // Make sure our z-index values are only applied if we're positioned or
+- // relpositioned.
+- if (!isPositioned() && !isRelPositioned()) {
+- // Set the auto z-index flag.
+- if (isRoot())
+- style()->setZIndex(0);
+- else
+- style()->setHasAutoZIndex();
+- }
++ if (m_layer)
+ m_layer->styleChanged();
+- }
++
+ // ### outlineSize() and outlineOffset() not merged yet
+ if (style()->outlineWidth() > 0 && style()->outlineWidth() > maximalOutlineSize(PaintActionOutline))
+ static_cast<RenderCanvas*>(document()->renderer())->setMaximalOutlineSize(style()->outlineWidth());
+@@ -692,15 +683,21 @@
+ int ow = style() ? style()->outlineWidth() /* style()->outlineSize() */ : 0;
+ if( isInline() && !isReplaced() )
+ {
+- RenderObject* p = parent();
+- Q_ASSERT(p);
+- while( p->isInline() && !p->isReplaced() )
+- p = p->parent();
+- p->repaintRectangle( -ow, -ow, p->effectiveWidth()+ow*2, p->effectiveHeight()+ow*2, immediate);
++ RenderObject* p = parent();
++ Q_ASSERT(p);
++ while( p->isInline() && !p->isReplaced() )
++ p = p->parent();
++ int off = 0;
++ if (!p->hasOverflowClip());
++ off = p->negativeOverflowWidth();
++ p->repaintRectangle( -ow - off, -ow, p->effectiveWidth()+ow*2, p->effectiveHeight()+ow*2, immediate);
+ }
+ else
+ {
+- repaintRectangle( -ow, -ow, effectiveWidth()+ow*2, effectiveHeight()+ow*2, immediate);
++ int off = 0;
++ if (!hasOverflowClip());
++ off = negativeOverflowWidth();
++ repaintRectangle( -ow - off, -ow, effectiveWidth()+ow*2, effectiveHeight()+ow*2, immediate);
+ }
+ }
+
+--- khtml/rendering/render_block.cpp (revision 515119)
++++ khtml/rendering/render_block.cpp (revision 517245)
+@@ -7,6 +7,7 @@
+ * (C) 2003 Apple Computer, Inc.
+ * (C) 2004 Germain Garand (germain at ebooksfrance.org)
+ * (C) 2005 Allan Sandfeld Jensen (kde at carewolf.com)
++ * (C) 2006 Charles Samuels (charles at kde.org)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+@@ -99,6 +100,7 @@
+ m_topMarginQuirk = m_bottomMarginQuirk = false;
+ m_overflowHeight = 0;
+ m_overflowWidth = 0;
++ m_negativeOverflowWidth = 0;
+ }
+
+ RenderBlock::~RenderBlock()
+@@ -456,7 +458,6 @@
+ }
+ }
+
+-
+ void RenderBlock::removeChild(RenderObject *oldChild)
+ {
+ // If this child is a block, and if our previous and next siblings are
+@@ -587,6 +588,16 @@
+
+ calcWidth();
+ m_overflowWidth = m_width;
++ m_negativeOverflowWidth = 0;
++ if (style()->direction() == LTR )
++ {
++ int cw=0;
++ if (style()->textIndent().isPercent())
++ cw = containingBlock()->contentWidth();
++ m_negativeOverflowWidth = -style()->textIndent().minWidth(cw);
++ if (m_negativeOverflowWidth < 0)
++ m_negativeOverflowWidth = 0;
++ }
+
+ if ( oldWidth != m_width )
+ relayoutChildren = true;
+@@ -1323,9 +1334,9 @@
+ int oldTopNegMargin = m_maxTopNegMargin;
+
+ // make sure we relayout children if we need it.
+- if (!isPositioned() && (relayoutChildren ||
+- (child->isReplaced() && (child->style()->width().isPercent() || child->style()->height().isPercent())) ||
+- (child->isRenderBlock() && child->style()->height().isPercent())))
++ if (!child->isPositioned() && (relayoutChildren ||
++ (child->isReplaced() && (child->style()->width().isPercent() || child->style()->height().isPercent())) ||
++ (child->isRenderBlock() && child->style()->height().isPercent())))
+ child->setChildNeedsLayout(true);
+
+ // Handle the four types of special elements first. These include positioned content, floating content, compacts and
+@@ -1406,7 +1417,7 @@
+ overflowDelta += child->overflowHeight();
+
+ // See if this child has made our overflow need to grow.
+- int rightChildPos = child->xPos() + kMax(child->effectiveWidth(), (int)child->width());
++ int rightChildPos = child->effectiveXPos() + kMax(child->effectiveWidth(), (int)child->width());
+ if (child->isRelPositioned() && (hasOverflowClip() || !isTableCell())) {
+ // CSS 2.1-9.4.3 - allow access to relatively positioned content
+ // ### left overflow support
+@@ -1420,6 +1431,8 @@
+
+ m_overflowHeight = kMax(m_height + overflowDelta, m_overflowHeight);
+ m_overflowWidth = kMax(rightChildPos, m_overflowWidth);
++
++ m_negativeOverflowWidth = kMax(m_negativeOverflowWidth, child->negativeOverflowWidth());
+
+ // Insert our compact into the block margin if we have one.
+ insertCompactIfNeeded(child, compactInfo);
+@@ -1440,6 +1453,7 @@
+
+ void RenderBlock::clearChildOfPageBreaks(RenderObject *child, PageBreakInfo &pageBreakInfo, MarginInfo &marginInfo)
+ {
++ (void)marginInfo;
+ int childTop = child->yPos();
+ int childBottom = child->yPos()+child->height();
+ #ifdef PAGE_DEBUG
+@@ -1539,11 +1553,14 @@
+ r->repaintDuringLayout();
+ r->setMarkedForRepaint(false);
+ }
+- if ( relayoutChildren || ((r->hasStaticY()||r->hasStaticX()) && r->parent() != this && r->parent()->isBlockFlow()) )
++ if ( relayoutChildren || r->style()->position() == FIXED ||
++ ((r->hasStaticY()||r->hasStaticX()) && r->parent() != this && r->parent()->isBlockFlow()) ) {
+ r->setChildNeedsLayout(true);
++ r->dirtyFormattingContext(false);
++ }
+ r->layoutIfNeeded();
+ if (adjOverflow && r->style()->position() == ABSOLUTE) {
+- if (r->xPos() + r->effectiveWidth() > m_overflowWidth)
++ if (r->effectiveXPos() + r->effectiveWidth() > m_overflowWidth)
+ m_overflowWidth = r->xPos() + r->effectiveWidth();
+ if (r->yPos() + r->effectiveHeight() > m_overflowHeight)
+ m_overflowHeight = r->yPos() + r->effectiveHeight();
+@@ -1604,8 +1621,6 @@
+ // 2. paint contents
+ int scrolledX = _tx;
+ int scrolledY = _ty;
+- int _y = pI.r.y();
+- int _h = pI.r.height();
+ if (style()->hidesOverflow() && m_layer)
+ m_layer->subtractScrollOffset(scrolledX, scrolledY);
+
+@@ -2169,6 +2184,11 @@
+ return left;
+ }
+
++bool RenderBlock::absolutePosition(int &xPos, int &yPos, bool f)
++{
++ return RenderFlow::absolutePosition(xPos, yPos, f);
++}
++
+ int
+ RenderBlock::leftBottom()
+ {
+--- khtml/ChangeLog (revision 515119)
++++ khtml/ChangeLog (revision 517245)
+@@ -1,3 +1,55 @@
++2006-03-07 Germain Garand <germain at ebooksfrance.org>
++
++ Scope: relayout/repaint/widget masks fixes. Refine stacking context exploration. Optimise.
++
++ * khtmlview.cpp (reset/timerEvent): remove obsolete code checking validity of visible widgets list.
++ (drawContents): use widget geometry rather than the RenderWidget's rect (fixes widget borders not being updated)
++ Check if widget is in the dirty rect before doing any work.
++
++ * rendering/render_block.cpp (layoutBlockChildren): I meant !child->isPositioned() here, not isPositioned(). No need to
++ dirty positioned children as this is handled by the containing block chain through layoutPositionedObjects
++ (layoutPositionedObjects): always relayout fixed objects.
++
++ * rendering/render_canvas.cpp (layout): check canvas dimensions and call layoutBlock directly with relayoutChildren boolean.
++
++ * rendering/render_layer.{h,cpp} (paintedRegion): constrain our shape to the visibleRect. Use convertToLayerCoords to get a correct
++ visibleFlowRegion (updateWidgetMasks): don't forget to update the mask if it reverts to none at all.
++
++ * rendering/render_object.{h,cpp} (containingBlock): for relpos inlines, return the nearest block (skipping to next containingBlock gives
++ stalled layout flags problems - #121653). (updateWidgetMasks): mask the content box, not the border box.
++ (enclosingStackingContext) new. Returns the layer defining current stacking context.
++
++ * rendering/render_replaced.{h,cpp} (isKHTMLWidget): new flag for KHTML-proxied widgets.
++ (detach/resizeWidget/setQWidget/layout/updateFromElement/slotWidgetDestructed/setStyle/paint): use the flag insead of strcmp's
++ Only allow !khtml widgets to register in the view (only those need masking).
++
++2006-03-05 Charles Samuels <charles at kde.org>
++ * link not accessable with negative text-indent (#96275)
++ * Wrong :hover effect with negative text-indent (#90510)
++ * text not selectable if it has a negative text-indent
++
++2006-03-05 Charles Samuels <charles at kde.org>
++ * javascript timeouts that cross a midnight boundary shall not occur early
++
++2006-03-03 Germain Garand <germain at ebooksfrance.org>
++
++ get iframes, objects and some other overlaid widgets to obey their stacking context (#31121)
++
++ * khtmlview.cpp: mask widgets more precisely (i.e. allow layers to paint over overlaid widgets,
++ when they ought to).
++
++ * rendering/render_canvas.{cpp,h}: update widget masks after pos child layout/positioning;
++ set a boolean m_needsWidgetMasks to optimise for common case (where we have no such widgets).
++
++ * rendering/render_layer.{cpp,h} (updateWidgetMasks/paintedRegion): build a rough mask for the positive Z order
++ childs. We'll apply that mask later to widgets that are under our aegis.
++
++ * rendering/render_object.{cpp,h} (visibleFlowRegion): helper for calculation of broad region we want to mask in flows.
++ (updateWidgetMasks): walk our children looking for widgets suitable to masking. Apply our enclosingLayer's mask,
++ transformis transformandi.
++
++ * rendering/render_replaced.cpp: overlaid widgets must advertise their existence to the enclosing layer.
++
+ 2006-03-01 Germain Garand <germain at ebooksfrance.org>
+
+ Improve selectorText
+--- khtml/misc/loader.cpp (revision 515119)
++++ khtml/misc/loader.cpp (revision 517245)
+@@ -253,7 +253,7 @@
+ QTextCodec* c = codecForBuffer( m_charset, buffer.buffer() );
+ QString data = c->toUnicode( buffer.buffer().data(), m_size );
+ // workaround Qt bugs
+- m_sheet = data[0] == QChar::byteOrderMark ? DOMString(data.mid( 1 ) ) : DOMString(data);
++ m_sheet = static_cast<QChar>(data[0]) == QChar::byteOrderMark ? DOMString(data.mid( 1 ) ) : DOMString(data);
+ m_loading = false;
+
+ checkNotify();
+@@ -322,7 +322,7 @@
+
+ QTextCodec* c = codecForBuffer( m_charset, buffer.buffer() );
+ QString data = c->toUnicode( buffer.buffer().data(), m_size );
+- m_script = data[0] == QChar::byteOrderMark ? DOMString(data.mid( 1 ) ) : DOMString(data);
++ m_script = static_cast<QChar>(data[0]) == QChar::byteOrderMark ? DOMString(data.mid( 1 ) ) : DOMString(data);
+ m_loading = false;
+ checkNotify();
+ }
+--- khtml/misc/shared.h (revision 515119)
++++ khtml/misc/shared.h (revision 517245)
+@@ -78,9 +78,9 @@
+
+ bool operator!() const { return m_ptr == 0; }
+
+- inline friend bool operator==(const SharedPtr &a, const SharedPtr &b) { return a.m_ptr == b.m_ptr; }
+- inline friend bool operator==(const SharedPtr &a, const T *b) { return a.m_ptr == b; }
+- inline friend bool operator==(const T *a, const SharedPtr &b) { return a == b.m_ptr; }
++ template <class C> friend bool operator==(const SharedPtr<C> &a, const SharedPtr<C> &b);
++ template <class C> friend bool operator==(const SharedPtr<C> &a, const C *b);
++ template <class C> friend bool operator==(const C *a, const SharedPtr<C> &b);
+
+ SharedPtr &operator=(const SharedPtr &);
+
+@@ -98,6 +98,10 @@
+ return *this;
+ }
+
++template <class T> inline bool operator==(const SharedPtr<T> &a, const SharedPtr<T> &b) { return a.m_ptr == b.m_ptr; }
++template <class T> inline bool operator==(const SharedPtr<T> &a, const T *b) { return a.m_ptr == b; }
++template <class T> inline bool operator==(const T *a, const SharedPtr<T> &b) { return a == b.m_ptr; }
++
+ template <class T> inline bool operator!=(const SharedPtr<T> &a, const SharedPtr<T> &b) { return !(a==b); }
+ template <class T> inline bool operator!=(const SharedPtr<T> &a, const T *b) { return !(a == b); }
+ template <class T> inline bool operator!=(const T *a, const SharedPtr<T> &b) { return !(a == b); }
+--- khtml/xml/dom_nodeimpl.cpp (revision 515119)
++++ khtml/xml/dom_nodeimpl.cpp (revision 517245)
+@@ -59,7 +59,6 @@
+ m_render(0),
+ m_tabIndex( 0 ),
+ m_hasId( false ),
+- m_hasStyle( false ),
+ m_attached(false),
+ m_closed(false),
+ m_changed( false ),
+@@ -69,7 +68,6 @@
+ m_specified( false ),
+ m_focused( false ),
+ m_active( false ),
+- m_styleElement( false ),
+ m_implicit( false ),
+ m_rendererNeedsClose( false ),
+ m_htmlCompat( false )
+@@ -1603,13 +1601,13 @@
+ {
+ m_cache->updateNodeListInfo(m_refNode->getDocument());
+ if (!m_cache->hasLength) {
+- m_cache->length = recursiveLength( m_refNode );
++ m_cache->length = calcLength( m_refNode );
+ m_cache->hasLength = true;
+ }
+ return m_cache->length;
+ }
+
+-unsigned long NodeListImpl::recursiveLength(NodeImpl *start) const
++unsigned long NodeListImpl::calcLength(NodeImpl *start) const
+ {
+ unsigned long len = 0;
+ for(NodeImpl *n = start->firstChild(); n != 0; n = n->nextSibling()) {
+@@ -1617,7 +1615,7 @@
+ if (nodeMatches(n, recurse))
+ len++;
+ if (recurse)
+- len+= recursiveLength(n);
++ len+= NodeListImpl::calcLength(n);
+ }
+
+ return len;
+--- khtml/xml/dom_nodeimpl.h (revision 515119)
++++ khtml/xml/dom_nodeimpl.h (revision 517245)
+@@ -219,7 +219,6 @@
+ virtual void sheetLoaded() {}
+
+ bool hasID() const { return m_hasId; }
+- bool hasStyle() const { return m_hasStyle; }
+ bool active() const { return m_active; }
+ bool focused() const { return m_focused; }
+ bool attached() const { return m_attached; }
+@@ -228,11 +227,9 @@
+ bool hasChangedChild() const { return m_hasChangedChild; }
+ bool hasAnchor() const { return m_hasAnchor; }
+ bool inDocument() const { return m_inDocument; }
+- bool styleElement() const { return m_styleElement; }
+ bool implicitNode() const { return m_implicit; }
+ bool htmlCompat() const { return m_htmlCompat; }
+ void setHasID(bool b=true) { m_hasId = b; }
+- void setHasStyle(bool b=true) { m_hasStyle = b; }
+ void setHasChangedChild( bool b = true ) { m_hasChangedChild = b; }
+ void setInDocument(bool b=true) { m_inDocument = b; }
+ void setHTMLCompat(bool b) { m_htmlCompat = b; }
+@@ -446,22 +443,22 @@
+ bool m_hasTabIndex : 1;
+
+ bool m_hasId : 1;
+- bool m_hasStyle : 1;
+ bool m_attached : 1;
+ bool m_closed : 1;
+ bool m_changed : 1;
+ bool m_hasChangedChild : 1;
+ bool m_inDocument : 1;
+ bool m_hasAnchor : 1;
+-
+ bool m_specified : 1; // used in AttrImpl. Accessor functions there
++
+ bool m_focused : 1;
+ bool m_active : 1;
+- bool m_styleElement : 1; // contains stylesheet text
+ bool m_implicit : 1; // implicitely generated by the parser
+ bool m_rendererNeedsClose : 1;
+ bool m_htmlCompat : 1; // true if element was created in HTML compat mode
+ bool m_unused : 1;
++ bool m_unused2 : 1;
++ bool m_unused3 : 1;
+ };
+
+ // this is the full Node Implementation with parents and children.
+@@ -590,8 +587,9 @@
+ // Other methods (not part of DOM)
+
+ protected:
++ virtual unsigned long calcLength(NodeImpl *start) const;
+ // helper functions for searching all ElementImpls in a tree
+- unsigned long recursiveLength(NodeImpl *start) const;
++
+ NodeImpl *recursiveItem ( NodeImpl* absStart, NodeImpl *start, unsigned long &offset ) const;
+ NodeImpl *recursiveItemBack( NodeImpl* absStart, NodeImpl *start, unsigned long &offset ) const;
+
+--- kjs/grammar.cpp (revision 515119)
++++ kjs/grammar.cpp (revision 517245)
+@@ -228,7 +228,9 @@
+
+ /* default values for bison */
+ #define YYDEBUG 0
+-#define YYMAXDEPTH 0
++#ifdef YYMAXDEPTH
++#undef YYMAXDEPTH
++#endif
+ #define YYERROR_VERBOSE
+ #define DBG(l, s, e) { l->setLoc(s.first_line, e.last_line, Parser::source); } // location
+
+@@ -259,7 +261,7 @@
+ #endif
+
+ #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+-#line 50 "grammar.y"
++#line 52 "grammar.y"
+ typedef union YYSTYPE {
+ int ival;
+ double dval;
+@@ -289,7 +291,7 @@
+ FinallyNode *fnode;
+ } YYSTYPE;
+ /* Line 196 of yacc.c. */
+-#line 293 "grammar.tab.c"
++#line 295 "grammar.tab.c"
+ # define yystype YYSTYPE /* obsolescent; will be withdrawn */
+ # define YYSTYPE_IS_DECLARED 1
+ # define YYSTYPE_IS_TRIVIAL 1
+@@ -313,7 +315,7 @@
+
+
+ /* Line 219 of yacc.c. */
+-#line 317 "grammar.tab.c"
++#line 319 "grammar.tab.c"
+
+ #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
+ # define YYSIZE_T __SIZE_TYPE__
+@@ -626,27 +628,27 @@
+ /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+ static const unsigned short int yyrline[] =
+ {
+- 0, 165, 165, 166, 167, 168, 169, 170, 173, 180,
+- 181, 182, 183, 184, 185, 186, 187, 191, 192, 193,
+- 197, 198, 203, 204, 208, 209, 213, 214, 219, 220,
+- 221, 225, 226, 227, 228, 229, 233, 234, 238, 239,
+- 240, 241, 245, 246, 250, 251, 255, 256, 260, 261,
+- 262, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+- 275, 276, 277, 281, 282, 283, 284, 288, 289, 290,
+- 294, 295, 296, 297, 301, 302, 304, 306, 308, 310,
+- 312, 317, 318, 319, 320, 321, 325, 326, 330, 331,
+- 335, 336, 340, 341, 346, 347, 352, 353, 358, 359,
+- 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+- 374, 375, 379, 380, 384, 385, 386, 387, 388, 389,
+- 390, 391, 392, 393, 394, 395, 396, 397, 398, 402,
+- 403, 407, 408, 412, 414, 424, 425, 430, 431, 435,
+- 437, 447, 448, 453, 454, 458, 462, 466, 468, 476,
+- 477, 482, 483, 484, 487, 490, 493, 496, 502, 503,
+- 507, 508, 512, 513, 520, 521, 525, 526, 534, 535,
+- 539, 540, 548, 553, 558, 559, 564, 565, 569, 570,
+- 574, 575, 579, 580, 584, 589, 590, 597, 598, 599,
+- 603, 608, 612, 614, 618, 619, 624, 625, 631, 632,
+- 636, 638, 643, 646, 651, 652, 656, 657
++ 0, 167, 167, 168, 169, 170, 171, 172, 175, 182,
++ 183, 184, 185, 186, 187, 188, 189, 193, 194, 195,
++ 199, 200, 205, 206, 210, 211, 215, 216, 221, 222,
++ 223, 227, 228, 229, 230, 231, 235, 236, 240, 241,
++ 242, 243, 247, 248, 252, 253, 257, 258, 262, 263,
++ 264, 268, 269, 270, 271, 272, 273, 274, 275, 276,
++ 277, 278, 279, 283, 284, 285, 286, 290, 291, 292,
++ 296, 297, 298, 299, 303, 304, 306, 308, 310, 312,
++ 314, 319, 320, 321, 322, 323, 327, 328, 332, 333,
++ 337, 338, 342, 343, 348, 349, 354, 355, 360, 361,
++ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
++ 376, 377, 381, 382, 386, 387, 388, 389, 390, 391,
++ 392, 393, 394, 395, 396, 397, 398, 399, 400, 404,
++ 405, 409, 410, 414, 416, 426, 427, 432, 433, 437,
++ 439, 449, 450, 455, 456, 460, 464, 468, 470, 478,
++ 479, 484, 485, 486, 489, 492, 495, 498, 504, 505,
++ 509, 510, 514, 515, 522, 523, 527, 528, 536, 537,
++ 541, 542, 550, 555, 560, 561, 566, 567, 571, 572,
++ 576, 577, 581, 582, 586, 591, 592, 599, 600, 601,
++ 605, 610, 614, 616, 620, 621, 626, 627, 633, 634,
++ 638, 640, 645, 648, 653, 654, 658, 659
+ };
+ #endif
+
+@@ -1893,482 +1895,482 @@
+ switch (yyn)
+ {
+ case 2:
+-#line 165 "grammar.y"
++#line 167 "grammar.y"
+ { (yyval.node) = new NullNode(); ;}
+ break;
+
+ case 3:
+-#line 166 "grammar.y"
++#line 168 "grammar.y"
+ { (yyval.node) = new BooleanNode(true); ;}
+ break;
+
+ case 4:
+-#line 167 "grammar.y"
++#line 169 "grammar.y"
+ { (yyval.node) = new BooleanNode(false); ;}
+ break;
+
+ case 5:
+-#line 168 "grammar.y"
++#line 170 "grammar.y"
+ { (yyval.node) = new NumberNode((yyvsp[0].dval)); ;}
+ break;
+
+ case 6:
+-#line 169 "grammar.y"
++#line 171 "grammar.y"
+ { (yyval.node) = new StringNode((yyvsp[0].ustr)); ;}
+ break;
+
+ case 7:
+-#line 170 "grammar.y"
++#line 172 "grammar.y"
+ { Lexer *l = Lexer::curr();
+ if (!l->scanRegExp()) YYABORT;
+ (yyval.node) = new RegExpNode(l->pattern,l->flags);;}
+ break;
+
+ case 8:
+-#line 174 "grammar.y"
++#line 176 "grammar.y"
+ { Lexer *l = Lexer::curr();
+ if (!l->scanRegExp()) YYABORT;
+ (yyval.node) = new RegExpNode(UString('=')+l->pattern,l->flags);;}
+ break;
+
+ case 9:
+-#line 180 "grammar.y"
++#line 182 "grammar.y"
+ { (yyval.node) = new ThisNode(); ;}
+ break;
+
+ case 10:
+-#line 181 "grammar.y"
++#line 183 "grammar.y"
+ { (yyval.node) = new ResolveNode(*(yyvsp[0].ident)); ;}
+ break;
+
+ case 13:
+-#line 184 "grammar.y"
++#line 186 "grammar.y"
+ { (yyval.node) = new GroupNode((yyvsp[-1].node)); ;}
+ break;
+
+ case 14:
+-#line 185 "grammar.y"
++#line 187 "grammar.y"
+ { (yyval.node) = new ObjectLiteralNode(); ;}
+ break;
+
+ case 15:
+-#line 186 "grammar.y"
++#line 188 "grammar.y"
+ { (yyval.node) = new ObjectLiteralNode((yyvsp[-1].plist)); ;}
+ break;
+
+ case 16:
+-#line 187 "grammar.y"
++#line 189 "grammar.y"
+ { (yyval.node) = new ObjectLiteralNode((yyvsp[-2].plist)); ;}
+ break;
+
+ case 17:
+-#line 191 "grammar.y"
++#line 193 "grammar.y"
+ { (yyval.node) = new ArrayNode((yyvsp[-1].ival)); ;}
+ break;
+
+ case 18:
+-#line 192 "grammar.y"
++#line 194 "grammar.y"
+ { (yyval.node) = new ArrayNode((yyvsp[-1].elm)); ;}
+ break;
+
+ case 19:
+-#line 193 "grammar.y"
++#line 195 "grammar.y"
+ { (yyval.node) = new ArrayNode((yyvsp[-1].ival), (yyvsp[-3].elm)); ;}
+ break;
+
+ case 20:
+-#line 197 "grammar.y"
++#line 199 "grammar.y"
+ { (yyval.elm) = new ElementNode((yyvsp[-1].ival), (yyvsp[0].node)); ;}
+ break;
+
+ case 21:
+-#line 199 "grammar.y"
++#line 201 "grammar.y"
+ { (yyval.elm) = new ElementNode((yyvsp[-3].elm), (yyvsp[-1].ival), (yyvsp[0].node)); ;}
+ break;
+
+ case 22:
+-#line 203 "grammar.y"
++#line 205 "grammar.y"
+ { (yyval.ival) = 0; ;}
+ break;
+
+ case 24:
+-#line 208 "grammar.y"
++#line 210 "grammar.y"
+ { (yyval.ival) = 1; ;}
+ break;
+
+ case 25:
+-#line 209 "grammar.y"
++#line 211 "grammar.y"
+ { (yyval.ival) = (yyvsp[-1].ival) + 1; ;}
+ break;
+
+ case 26:
+-#line 213 "grammar.y"
++#line 215 "grammar.y"
+ { (yyval.plist) = new PropertyValueNode((yyvsp[-2].pnode), (yyvsp[0].node)); ;}
+ break;
+
+ case 27:
+-#line 215 "grammar.y"
++#line 217 "grammar.y"
+ { (yyval.plist) = new PropertyValueNode((yyvsp[-2].pnode), (yyvsp[0].node), (yyvsp[-4].plist)); ;}
+ break;
+
+ case 28:
+-#line 219 "grammar.y"
++#line 221 "grammar.y"
+ { (yyval.pnode) = new PropertyNode(*(yyvsp[0].ident)); ;}
+ break;
+
+ case 29:
+-#line 220 "grammar.y"
++#line 222 "grammar.y"
+ { (yyval.pnode) = new PropertyNode(Identifier(*(yyvsp[0].ustr))); ;}
+ break;
+
+ case 30:
+-#line 221 "grammar.y"
++#line 223 "grammar.y"
+ { (yyval.pnode) = new PropertyNode((yyvsp[0].dval)); ;}
+ break;
+
+ case 33:
+-#line 227 "grammar.y"
++#line 229 "grammar.y"
+ { (yyval.node) = new AccessorNode1((yyvsp[-3].node), (yyvsp[-1].node)); ;}
+ break;
+
+ case 34:
+-#line 228 "grammar.y"
++#line 230 "grammar.y"
+ { (yyval.node) = new AccessorNode2((yyvsp[-2].node), *(yyvsp[0].ident)); ;}
+ break;
+
+ case 35:
+-#line 229 "grammar.y"
++#line 231 "grammar.y"
+ { (yyval.node) = new NewExprNode((yyvsp[-1].node), (yyvsp[0].args)); ;}
+ break;
+
+ case 37:
+-#line 234 "grammar.y"
++#line 236 "grammar.y"
+ { (yyval.node) = new NewExprNode((yyvsp[0].node)); ;}
+ break;
+
+ case 38:
+-#line 238 "grammar.y"
++#line 240 "grammar.y"
+ { (yyval.node) = new FunctionCallNode((yyvsp[-1].node), (yyvsp[0].args)); ;}
+ break;
+
+ case 39:
+-#line 239 "grammar.y"
++#line 241 "grammar.y"
+ { (yyval.node) = new FunctionCallNode((yyvsp[-1].node), (yyvsp[0].args)); ;}
+ break;
+
+ case 40:
+-#line 240 "grammar.y"
++#line 242 "grammar.y"
+ { (yyval.node) = new AccessorNode1((yyvsp[-3].node), (yyvsp[-1].node)); ;}
+ break;
+
+ case 41:
+-#line 241 "grammar.y"
++#line 243 "grammar.y"
+ { (yyval.node) = new AccessorNode2((yyvsp[-2].node), *(yyvsp[0].ident)); ;}
+ break;
+
+ case 42:
+-#line 245 "grammar.y"
++#line 247 "grammar.y"
+ { (yyval.args) = new ArgumentsNode(); ;}
+ break;
+
+ case 43:
+-#line 246 "grammar.y"
++#line 248 "grammar.y"
+ { (yyval.args) = new ArgumentsNode((yyvsp[-1].alist)); ;}
+ break;
+
+ case 44:
+-#line 250 "grammar.y"
++#line 252 "grammar.y"
+ { (yyval.alist) = new ArgumentListNode((yyvsp[0].node)); ;}
+ break;
+
+ case 45:
+-#line 251 "grammar.y"
++#line 253 "grammar.y"
+ { (yyval.alist) = new ArgumentListNode((yyvsp[-2].alist), (yyvsp[0].node)); ;}
+ break;
+
+ case 49:
+-#line 261 "grammar.y"
++#line 263 "grammar.y"
+ { (yyval.node) = new PostfixNode((yyvsp[-1].node), OpPlusPlus); ;}
+ break;
+
+ case 50:
+-#line 262 "grammar.y"
++#line 264 "grammar.y"
+ { (yyval.node) = new PostfixNode((yyvsp[-1].node), OpMinusMinus); ;}
+ break;
+
+ case 52:
+-#line 267 "grammar.y"
++#line 269 "grammar.y"
+ { (yyval.node) = new DeleteNode((yyvsp[0].node)); ;}
+ break;
+
+ case 53:
+-#line 268 "grammar.y"
++#line 270 "grammar.y"
+ { (yyval.node) = new VoidNode((yyvsp[0].node)); ;}
+ break;
+
+ case 54:
+-#line 269 "grammar.y"
++#line 271 "grammar.y"
+ { (yyval.node) = new TypeOfNode((yyvsp[0].node)); ;}
+ break;
+
+ case 55:
+-#line 270 "grammar.y"
++#line 272 "grammar.y"
+ { (yyval.node) = new PrefixNode(OpPlusPlus, (yyvsp[0].node)); ;}
+ break;
+
+ case 56:
+-#line 271 "grammar.y"
++#line 273 "grammar.y"
+ { (yyval.node) = new PrefixNode(OpPlusPlus, (yyvsp[0].node)); ;}
+ break;
+
+ case 57:
+-#line 272 "grammar.y"
++#line 274 "grammar.y"
+ { (yyval.node) = new PrefixNode(OpMinusMinus, (yyvsp[0].node)); ;}
+ break;
+
+ case 58:
+-#line 273 "grammar.y"
++#line 275 "grammar.y"
+ { (yyval.node) = new PrefixNode(OpMinusMinus, (yyvsp[0].node)); ;}
+ break;
+
+ case 59:
+-#line 274 "grammar.y"
++#line 276 "grammar.y"
+ { (yyval.node) = new UnaryPlusNode((yyvsp[0].node)); ;}
+ break;
+
+ case 60:
+-#line 275 "grammar.y"
++#line 277 "grammar.y"
+ { (yyval.node) = new NegateNode((yyvsp[0].node)); ;}
+ break;
+
+ case 61:
+-#line 276 "grammar.y"
++#line 278 "grammar.y"
+ { (yyval.node) = new BitwiseNotNode((yyvsp[0].node)); ;}
+ break;
+
+ case 62:
+-#line 277 "grammar.y"
++#line 279 "grammar.y"
+ { (yyval.node) = new LogicalNotNode((yyvsp[0].node)); ;}
+ break;
+
+ case 64:
+-#line 282 "grammar.y"
++#line 284 "grammar.y"
+ { (yyval.node) = new MultNode((yyvsp[-2].node), (yyvsp[0].node), '*'); ;}
+ break;
+
+ case 65:
+-#line 283 "grammar.y"
++#line 285 "grammar.y"
+ { (yyval.node) = new MultNode((yyvsp[-2].node), (yyvsp[0].node), '/'); ;}
+ break;
+
+ case 66:
+-#line 284 "grammar.y"
++#line 286 "grammar.y"
+ { (yyval.node) = new MultNode((yyvsp[-2].node),(yyvsp[0].node),'%'); ;}
+ break;
+
+ case 68:
+-#line 289 "grammar.y"
++#line 291 "grammar.y"
+ { (yyval.node) = AddNode::create((yyvsp[-2].node), (yyvsp[0].node), '+'); ;}
+ break;
+
+ case 69:
+-#line 290 "grammar.y"
++#line 292 "grammar.y"
+ { (yyval.node) = AddNode::create((yyvsp[-2].node), (yyvsp[0].node), '-'); ;}
+ break;
+
+ case 71:
+-#line 295 "grammar.y"
++#line 297 "grammar.y"
+ { (yyval.node) = new ShiftNode((yyvsp[-2].node), OpLShift, (yyvsp[0].node)); ;}
+ break;
+
+ case 72:
+-#line 296 "grammar.y"
++#line 298 "grammar.y"
+ { (yyval.node) = new ShiftNode((yyvsp[-2].node), OpRShift, (yyvsp[0].node)); ;}
+ break;
+
+ case 73:
+-#line 297 "grammar.y"
++#line 299 "grammar.y"
+ { (yyval.node) = new ShiftNode((yyvsp[-2].node), OpURShift, (yyvsp[0].node)); ;}
+ break;
+
+ case 75:
+-#line 303 "grammar.y"
++#line 305 "grammar.y"
+ { (yyval.node) = new RelationalNode((yyvsp[-2].node), OpLess, (yyvsp[0].node)); ;}
+ break;
+
+ case 76:
+-#line 305 "grammar.y"
++#line 307 "grammar.y"
+ { (yyval.node) = new RelationalNode((yyvsp[-2].node), OpGreater, (yyvsp[0].node)); ;}
+ break;
+
+ case 77:
+-#line 307 "grammar.y"
++#line 309 "grammar.y"
+ { (yyval.node) = new RelationalNode((yyvsp[-2].node), OpLessEq, (yyvsp[0].node)); ;}
+ break;
+
+ case 78:
+-#line 309 "grammar.y"
++#line 311 "grammar.y"
+ { (yyval.node) = new RelationalNode((yyvsp[-2].node), OpGreaterEq, (yyvsp[0].node)); ;}
+ break;
+
+ case 79:
+-#line 311 "grammar.y"
++#line 313 "grammar.y"
+ { (yyval.node) = new RelationalNode((yyvsp[-2].node), OpInstanceOf, (yyvsp[0].node)); ;}
+ break;
+
+ case 80:
+-#line 313 "grammar.y"
++#line 315 "grammar.y"
+ { (yyval.node) = new RelationalNode((yyvsp[-2].node), OpIn, (yyvsp[0].node)); ;}
+ break;
+
+ case 82:
+-#line 318 "grammar.y"
++#line 320 "grammar.y"
+ { (yyval.node) = new EqualNode((yyvsp[-2].node), OpEqEq, (yyvsp[0].node)); ;}
+ break;
+
+ case 83:
+-#line 319 "grammar.y"
++#line 321 "grammar.y"
+ { (yyval.node) = new EqualNode((yyvsp[-2].node), OpNotEq, (yyvsp[0].node)); ;}
+ break;
+
+ case 84:
+-#line 320 "grammar.y"
++#line 322 "grammar.y"
+ { (yyval.node) = new EqualNode((yyvsp[-2].node), OpStrEq, (yyvsp[0].node)); ;}
+ break;
+
+ case 85:
+-#line 321 "grammar.y"
++#line 323 "grammar.y"
+ { (yyval.node) = new EqualNode((yyvsp[-2].node), OpStrNEq, (yyvsp[0].node));;}
+ break;
+
+ case 87:
+-#line 326 "grammar.y"
++#line 328 "grammar.y"
+ { (yyval.node) = new BitOperNode((yyvsp[-2].node), OpBitAnd, (yyvsp[0].node)); ;}
+ break;
+
+ case 89:
+-#line 331 "grammar.y"
++#line 333 "grammar.y"
+ { (yyval.node) = new BitOperNode((yyvsp[-2].node), OpBitXOr, (yyvsp[0].node)); ;}
+ break;
+
+ case 91:
+-#line 336 "grammar.y"
++#line 338 "grammar.y"
+ { (yyval.node) = new BitOperNode((yyvsp[-2].node), OpBitOr, (yyvsp[0].node)); ;}
+ break;
+
+ case 93:
+-#line 342 "grammar.y"
++#line 344 "grammar.y"
+ { (yyval.node) = new BinaryLogicalNode((yyvsp[-2].node), OpAnd, (yyvsp[0].node)); ;}
+ break;
+
+ case 95:
+-#line 348 "grammar.y"
++#line 350 "grammar.y"
+ { (yyval.node) = new BinaryLogicalNode((yyvsp[-2].node), OpOr, (yyvsp[0].node)); ;}
+ break;
+
+ case 97:
+-#line 354 "grammar.y"
++#line 356 "grammar.y"
+ { (yyval.node) = new ConditionalNode((yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node)); ;}
+ break;
+
+ case 99:
+-#line 360 "grammar.y"
++#line 362 "grammar.y"
+ { (yyval.node) = new AssignNode((yyvsp[-2].node), (yyvsp[-1].op), (yyvsp[0].node));;}
+ break;
+
+ case 100:
+-#line 364 "grammar.y"
++#line 366 "grammar.y"
+ { (yyval.op) = OpEqual; ;}
+ break;
+
+ case 101:
+-#line 365 "grammar.y"
++#line 367 "grammar.y"
+ { (yyval.op) = OpPlusEq; ;}
+ break;
+
+ case 102:
+-#line 366 "grammar.y"
++#line 368 "grammar.y"
+ { (yyval.op) = OpMinusEq; ;}
+ break;
+
+ case 103:
+-#line 367 "grammar.y"
++#line 369 "grammar.y"
+ { (yyval.op) = OpMultEq; ;}
+ break;
+
+ case 104:
+-#line 368 "grammar.y"
++#line 370 "grammar.y"
+ { (yyval.op) = OpDivEq; ;}
+ break;
+
+ case 105:
+-#line 369 "grammar.y"
++#line 371 "grammar.y"
+ { (yyval.op) = OpLShift; ;}
+ break;
+
+ case 106:
+-#line 370 "grammar.y"
++#line 372 "grammar.y"
+ { (yyval.op) = OpRShift; ;}
+ break;
+
+ case 107:
+-#line 371 "grammar.y"
++#line 373 "grammar.y"
+ { (yyval.op) = OpURShift; ;}
+ break;
+
+ case 108:
+-#line 372 "grammar.y"
++#line 374 "grammar.y"
+ { (yyval.op) = OpAndEq; ;}
+ break;
+
+ case 109:
+-#line 373 "grammar.y"
++#line 375 "grammar.y"
+ { (yyval.op) = OpXOrEq; ;}
+ break;
+
+ case 110:
+-#line 374 "grammar.y"
++#line 376 "grammar.y"
+ { (yyval.op) = OpOrEq; ;}
+ break;
+
+ case 111:
+-#line 375 "grammar.y"
++#line 377 "grammar.y"
+ { (yyval.op) = OpModEq; ;}
+ break;
+
+ case 113:
+-#line 380 "grammar.y"
++#line 382 "grammar.y"
+ { (yyval.node) = new CommaNode((yyvsp[-2].node), (yyvsp[0].node)); ;}
+ break;
+
+ case 129:
+-#line 402 "grammar.y"
++#line 404 "grammar.y"
+ { (yyval.stat) = new BlockNode(0); DBG((yyval.stat), (yylsp[0]), (yylsp[0])); ;}
+ break;
+
+ case 130:
+-#line 403 "grammar.y"
++#line 405 "grammar.y"
+ { (yyval.stat) = new BlockNode((yyvsp[-1].srcs)); DBG((yyval.stat), (yylsp[0]), (yylsp[0])); ;}
+ break;
+
+ case 131:
+-#line 407 "grammar.y"
++#line 409 "grammar.y"
+ { (yyval.slist) = new StatListNode((yyvsp[0].stat)); ;}
+ break;
+
+ case 132:
+-#line 408 "grammar.y"
++#line 410 "grammar.y"
+ { (yyval.slist) = new StatListNode((yyvsp[-1].slist), (yyvsp[0].stat)); ;}
+ break;
+
+ case 133:
+-#line 412 "grammar.y"
++#line 414 "grammar.y"
+ { (yyval.stat) = new VarStatementNode((yyvsp[-1].vlist));
+ DBG((yyval.stat), (yylsp[-2]), (yylsp[0])); ;}
+ break;
+
+ case 134:
+-#line 414 "grammar.y"
++#line 416 "grammar.y"
+ { if (automatic()) {
+ (yyval.stat) = new VarStatementNode((yyvsp[-1].vlist));
+ DBG((yyval.stat), (yylsp[-2]), (yylsp[-1]));
+@@ -2379,33 +2381,33 @@
+ break;
+
+ case 135:
+-#line 424 "grammar.y"
++#line 426 "grammar.y"
+ { (yyval.vlist) = new VarDeclListNode((yyvsp[0].decl)); ;}
+ break;
+
+ case 136:
+-#line 426 "grammar.y"
++#line 428 "grammar.y"
+ { (yyval.vlist) = new VarDeclListNode((yyvsp[-2].vlist), (yyvsp[0].decl)); ;}
+ break;
+
+ case 137:
+-#line 430 "grammar.y"
++#line 432 "grammar.y"
+ { (yyval.decl) = new VarDeclNode(*(yyvsp[0].ident), 0, VarDeclNode::Variable); ;}
+ break;
+
+ case 138:
+-#line 431 "grammar.y"
++#line 433 "grammar.y"
+ { (yyval.decl) = new VarDeclNode(*(yyvsp[-1].ident), (yyvsp[0].init), VarDeclNode::Variable); ;}
+ break;
+
+ case 139:
+-#line 435 "grammar.y"
++#line 437 "grammar.y"
+ { (yyval.stat) = new VarStatementNode((yyvsp[-1].vlist));
+ DBG((yyval.stat), (yylsp[-2]), (yylsp[0])); ;}
+ break;
+
+ case 140:
+-#line 437 "grammar.y"
++#line 439 "grammar.y"
+ { if (automatic()) {
+ (yyval.stat) = new VarStatementNode((yyvsp[-1].vlist));
+ DBG((yyval.stat), (yylsp[-2]), (yylsp[-1]));
+@@ -2416,43 +2418,43 @@
+ break;
+
+ case 141:
+-#line 447 "grammar.y"
++#line 449 "grammar.y"
+ { (yyval.vlist) = new VarDeclListNode((yyvsp[0].decl)); ;}
+ break;
+
+ case 142:
+-#line 449 "grammar.y"
++#line 451 "grammar.y"
+ { (yyval.vlist) = new VarDeclListNode((yyvsp[-2].vlist), (yyvsp[0].decl)); ;}
+ break;
+
+ case 143:
+-#line 453 "grammar.y"
++#line 455 "grammar.y"
+ { (yyval.decl) = new VarDeclNode(*(yyvsp[0].ident), 0, VarDeclNode::Constant); ;}
+ break;
+
+ case 144:
+-#line 454 "grammar.y"
++#line 456 "grammar.y"
+ { (yyval.decl) = new VarDeclNode(*(yyvsp[-1].ident), (yyvsp[0].init), VarDeclNode::Constant); ;}
+ break;
+
+ case 145:
+-#line 458 "grammar.y"
++#line 460 "grammar.y"
+ { (yyval.init) = new AssignExprNode((yyvsp[0].node)); ;}
+ break;
+
+ case 146:
+-#line 462 "grammar.y"
++#line 464 "grammar.y"
+ { (yyval.stat) = new EmptyStatementNode(); DBG((yyval.stat), (yylsp[0]), (yylsp[0])); ;}
+ break;
+
+ case 147:
+-#line 466 "grammar.y"
++#line 468 "grammar.y"
+ { (yyval.stat) = new ExprStatementNode((yyvsp[-1].node));
+ DBG((yyval.stat), (yylsp[-1]), (yylsp[0])); ;}
+ break;
+
+ case 148:
+-#line 468 "grammar.y"
++#line 470 "grammar.y"
+ { if (automatic()) {
+ (yyval.stat) = new ExprStatementNode((yyvsp[-1].node));
+ DBG((yyval.stat), (yylsp[-1]), (yylsp[-1]));
+@@ -2461,67 +2463,67 @@
+ break;
+
+ case 149:
+-#line 476 "grammar.y"
++#line 478 "grammar.y"
+ { (yyval.stat) = new IfNode((yyvsp[-2].node),(yyvsp[0].stat),0);DBG((yyval.stat),(yylsp[-4]),(yylsp[-1])); ;}
+ break;
+
+ case 150:
+-#line 478 "grammar.y"
++#line 480 "grammar.y"
+ { (yyval.stat) = new IfNode((yyvsp[-4].node),(yyvsp[-2].stat),(yyvsp[0].stat));DBG((yyval.stat),(yylsp[-6]),(yylsp[-3])); ;}
+ break;
+
+ case 151:
+-#line 482 "grammar.y"
++#line 484 "grammar.y"
+ { (yyval.stat)=new DoWhileNode((yyvsp[-4].stat),(yyvsp[-1].node));DBG((yyval.stat),(yylsp[-5]),(yylsp[-3]));;}
+ break;
+
+ case 152:
+-#line 483 "grammar.y"
++#line 485 "grammar.y"
+ { (yyval.stat) = new WhileNode((yyvsp[-2].node),(yyvsp[0].stat));DBG((yyval.stat),(yylsp[-4]),(yylsp[-1])); ;}
+ break;
+
+ case 153:
+-#line 485 "grammar.y"
++#line 487 "grammar.y"
+ { (yyval.stat) = new ForNode((yyvsp[-6].node),(yyvsp[-4].node),(yyvsp[-2].node),(yyvsp[0].stat));
+ DBG((yyval.stat),(yylsp[-8]),(yylsp[-1])); ;}
+ break;
+
+ case 154:
+-#line 488 "grammar.y"
++#line 490 "grammar.y"
+ { (yyval.stat) = new ForNode((yyvsp[-6].vlist),(yyvsp[-4].node),(yyvsp[-2].node),(yyvsp[0].stat));
+ DBG((yyval.stat),(yylsp[-9]),(yylsp[-1])); ;}
+ break;
+
+ case 155:
+-#line 491 "grammar.y"
++#line 493 "grammar.y"
+ { (yyval.stat) = new ForInNode((yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].stat));
+ DBG((yyval.stat),(yylsp[-6]),(yylsp[-1])); ;}
+ break;
+
+ case 156:
+-#line 494 "grammar.y"
++#line 496 "grammar.y"
+ { (yyval.stat) = new ForInNode(*(yyvsp[-4].ident),0,(yyvsp[-2].node),(yyvsp[0].stat));
+ DBG((yyval.stat),(yylsp[-7]),(yylsp[-1])); ;}
+ break;
+
+ case 157:
+-#line 497 "grammar.y"
++#line 499 "grammar.y"
+ { (yyval.stat) = new ForInNode(*(yyvsp[-5].ident),(yyvsp[-4].init),(yyvsp[-2].node),(yyvsp[0].stat));
+ DBG((yyval.stat),(yylsp[-8]),(yylsp[-1])); ;}
+ break;
+
+ case 158:
+-#line 502 "grammar.y"
++#line 504 "grammar.y"
+ { (yyval.node) = 0; ;}
+ break;
+
+ case 160:
+-#line 507 "grammar.y"
++#line 509 "grammar.y"
+ { (yyval.stat) = new ContinueNode(); DBG((yyval.stat),(yylsp[-1]),(yylsp[0])); ;}
+ break;
+
+ case 161:
+-#line 508 "grammar.y"
++#line 510 "grammar.y"
+ { if (automatic()) {
+ (yyval.stat) = new ContinueNode(); DBG((yyval.stat),(yylsp[-1]),(yylsp[0]));
+ } else
+@@ -2529,12 +2531,12 @@
+ break;
+
+ case 162:
+-#line 512 "grammar.y"
++#line 514 "grammar.y"
+ { (yyval.stat) = new ContinueNode(*(yyvsp[-1].ident)); DBG((yyval.stat),(yylsp[-2]),(yylsp[0])); ;}
+ break;
+
+ case 163:
+-#line 513 "grammar.y"
++#line 515 "grammar.y"
+ { if (automatic()) {
+ (yyval.stat) = new ContinueNode(*(yyvsp[-1].ident));DBG((yyval.stat),(yylsp[-2]),(yylsp[-1]));
+ } else
+@@ -2542,12 +2544,12 @@
+ break;
+
+ case 164:
+-#line 520 "grammar.y"
++#line 522 "grammar.y"
+ { (yyval.stat) = new BreakNode();DBG((yyval.stat),(yylsp[-1]),(yylsp[0])); ;}
+ break;
+
+ case 165:
+-#line 521 "grammar.y"
++#line 523 "grammar.y"
+ { if (automatic()) {
+ (yyval.stat) = new BreakNode(); DBG((yyval.stat),(yylsp[-1]),(yylsp[-1]));
+ } else
+@@ -2555,12 +2557,12 @@
+ break;
+
+ case 166:
+-#line 525 "grammar.y"
++#line 527 "grammar.y"
+ { (yyval.stat) = new BreakNode(*(yyvsp[-1].ident)); DBG((yyval.stat),(yylsp[-2]),(yylsp[0])); ;}
+ break;
+
+ case 167:
+-#line 526 "grammar.y"
++#line 528 "grammar.y"
+ { if (automatic()) {
+ (yyval.stat) = new BreakNode(*(yyvsp[-1].ident)); DBG((yyval.stat),(yylsp[-2]),(yylsp[-1]));
+ } else
+@@ -2569,12 +2571,12 @@
+ break;
+
+ case 168:
+-#line 534 "grammar.y"
++#line 536 "grammar.y"
+ { (yyval.stat) = new ReturnNode(0); DBG((yyval.stat),(yylsp[-1]),(yylsp[0])); ;}
+ break;
+
+ case 169:
+-#line 535 "grammar.y"
++#line 537 "grammar.y"
+ { if (automatic()) {
+ (yyval.stat) = new ReturnNode(0); DBG((yyval.stat),(yylsp[-1]),(yylsp[-1]));
+ } else
+@@ -2582,12 +2584,12 @@
+ break;
+
+ case 170:
+-#line 539 "grammar.y"
++#line 541 "grammar.y"
+ { (yyval.stat) = new ReturnNode((yyvsp[-1].node)); DBG((yyval.stat),(yylsp[-2]),(yylsp[0])); ;}
+ break;
+
+ case 171:
+-#line 540 "grammar.y"
++#line 542 "grammar.y"
+ { if (automatic()) {
+ (yyval.stat) = new ReturnNode((yyvsp[-1].node)); DBG((yyval.stat),(yylsp[-2]),(yylsp[-2]));
+ }
+@@ -2596,75 +2598,75 @@
+ break;
+
+ case 172:
+-#line 548 "grammar.y"
++#line 550 "grammar.y"
+ { (yyval.stat) = new WithNode((yyvsp[-2].node),(yyvsp[0].stat));
+ DBG((yyval.stat), (yylsp[-4]), (yylsp[-1])); ;}
+ break;
+
+ case 173:
+-#line 553 "grammar.y"
++#line 555 "grammar.y"
+ { (yyval.stat) = new SwitchNode((yyvsp[-2].node), (yyvsp[0].cblk));
+ DBG((yyval.stat), (yylsp[-4]), (yylsp[-1])); ;}
+ break;
+
+ case 174:
+-#line 558 "grammar.y"
++#line 560 "grammar.y"
+ { (yyval.cblk) = new CaseBlockNode((yyvsp[-1].clist), 0, 0); ;}
+ break;
+
+ case 175:
+-#line 560 "grammar.y"
++#line 562 "grammar.y"
+ { (yyval.cblk) = new CaseBlockNode((yyvsp[-3].clist), (yyvsp[-2].ccl), (yyvsp[-1].clist)); ;}
+ break;
+
+ case 176:
+-#line 564 "grammar.y"
++#line 566 "grammar.y"
+ { (yyval.clist) = 0; ;}
+ break;
+
+ case 178:
+-#line 569 "grammar.y"
++#line 571 "grammar.y"
+ { (yyval.clist) = new ClauseListNode((yyvsp[0].ccl)); ;}
+ break;
+
+ case 179:
+-#line 570 "grammar.y"
++#line 572 "grammar.y"
+ { (yyval.clist) = new ClauseListNode((yyvsp[-1].clist), (yyvsp[0].ccl)); ;}
+ break;
+
+ case 180:
+-#line 574 "grammar.y"
++#line 576 "grammar.y"
+ { (yyval.ccl) = new CaseClauseNode((yyvsp[-1].node)); ;}
+ break;
+
+ case 181:
+-#line 575 "grammar.y"
++#line 577 "grammar.y"
+ { (yyval.ccl) = new CaseClauseNode((yyvsp[-2].node), (yyvsp[0].slist)); ;}
+ break;
+
+ case 182:
+-#line 579 "grammar.y"
++#line 581 "grammar.y"
+ { (yyval.ccl) = new CaseClauseNode(0); ;}
+ break;
+
+ case 183:
+-#line 580 "grammar.y"
++#line 582 "grammar.y"
+ { (yyval.ccl) = new CaseClauseNode(0, (yyvsp[0].slist)); ;}
+ break;
+
+ case 184:
+-#line 584 "grammar.y"
++#line 586 "grammar.y"
+ { (yyvsp[0].stat)->pushLabel(*(yyvsp[-2].ident));
+ (yyval.stat) = new LabelNode(*(yyvsp[-2].ident), (yyvsp[0].stat)); DBG((yyval.stat),(yylsp[-2]),(yylsp[-1])); ;}
+ break;
+
+ case 185:
+-#line 589 "grammar.y"
++#line 591 "grammar.y"
+ { (yyval.stat) = new ThrowNode((yyvsp[-1].node)); DBG((yyval.stat),(yylsp[-2]),(yylsp[0])); ;}
+ break;
+
+ case 186:
+-#line 590 "grammar.y"
++#line 592 "grammar.y"
+ { if (automatic()) {
+ (yyval.stat) = new ThrowNode((yyvsp[-1].node)); DBG((yyval.stat),(yylsp[-2]),(yylsp[-2]));
+ } else {
+@@ -2672,108 +2674,108 @@
+ break;
+
+ case 187:
+-#line 597 "grammar.y"
++#line 599 "grammar.y"
+ { (yyval.stat) = new TryNode((yyvsp[-1].stat), (yyvsp[0].cnode)); DBG((yyval.stat),(yylsp[-2]),(yylsp[-2])); ;}
+ break;
+
+ case 188:
+-#line 598 "grammar.y"
++#line 600 "grammar.y"
+ { (yyval.stat) = new TryNode((yyvsp[-1].stat), (yyvsp[0].fnode)); DBG((yyval.stat),(yylsp[-2]),(yylsp[-2])); ;}
+ break;
+
+ case 189:
+-#line 599 "grammar.y"
++#line 601 "grammar.y"
+ { (yyval.stat) = new TryNode((yyvsp[-2].stat), (yyvsp[-1].cnode), (yyvsp[0].fnode)); DBG((yyval.stat),(yylsp[-3]),(yylsp[-3])); ;}
+ break;
+
+ case 190:
+-#line 603 "grammar.y"
++#line 605 "grammar.y"
+ { CatchNode *c; (yyval.cnode) = c = new CatchNode(*(yyvsp[-2].ident), (yyvsp[0].stat));
+ DBG(c,(yylsp[-4]),(yylsp[-1])); ;}
+ break;
+
+ case 191:
+-#line 608 "grammar.y"
++#line 610 "grammar.y"
+ { FinallyNode *f; (yyval.fnode) = f = new FinallyNode((yyvsp[0].stat)); DBG(f,(yylsp[-1]),(yylsp[-1])); ;}
+ break;
+
+ case 193:
+-#line 614 "grammar.y"
++#line 616 "grammar.y"
+ { (yyval.func) = (yyvsp[0].func); ;}
+ break;
+
+ case 194:
+-#line 618 "grammar.y"
++#line 620 "grammar.y"
+ { (yyval.func) = new FuncDeclNode(*(yyvsp[-3].ident), (yyvsp[0].body)); DBG((yyval.func),(yylsp[-4]),(yylsp[-1])); ;}
+ break;
+
+ case 195:
+-#line 620 "grammar.y"
++#line 622 "grammar.y"
+ { (yyval.func) = new FuncDeclNode(*(yyvsp[-4].ident), (yyvsp[-2].param), (yyvsp[0].body)); DBG((yyval.func),(yylsp[-5]),(yylsp[-1])); ;}
+ break;
+
+ case 196:
+-#line 624 "grammar.y"
++#line 626 "grammar.y"
+ { (yyval.node) = new FuncExprNode((yyvsp[0].body)); ;}
+ break;
+
+ case 197:
+-#line 626 "grammar.y"
++#line 628 "grammar.y"
+ { (yyval.node) = new FuncExprNode((yyvsp[-2].param), (yyvsp[0].body)); ;}
+ break;
+
+ case 198:
+-#line 631 "grammar.y"
++#line 633 "grammar.y"
+ { (yyval.param) = new ParameterNode(*(yyvsp[0].ident)); ;}
+ break;
+
+ case 199:
+-#line 632 "grammar.y"
++#line 634 "grammar.y"
+ { (yyval.param) = new ParameterNode((yyvsp[-2].param), *(yyvsp[0].ident)); ;}
+ break;
+
+ case 200:
+-#line 636 "grammar.y"
++#line 638 "grammar.y"
+ { (yyval.body) = new FunctionBodyNode(0);
+ DBG((yyval.body), (yylsp[-1]), (yylsp[0]));;}
+ break;
+
+ case 201:
+-#line 638 "grammar.y"
++#line 640 "grammar.y"
+ { (yyval.body) = new FunctionBodyNode((yyvsp[-1].srcs));
+ DBG((yyval.body), (yylsp[-2]), (yylsp[0]));;}
+ break;
+
+ case 202:
+-#line 643 "grammar.y"
++#line 645 "grammar.y"
+ { (yyval.prog) = new FunctionBodyNode(0);
+ (yyval.prog)->setLoc(0, 0, Parser::source);
+ Parser::progNode = (yyval.prog); ;}
+ break;
+
+ case 203:
+-#line 646 "grammar.y"
++#line 648 "grammar.y"
+ { (yyval.prog) = new FunctionBodyNode((yyvsp[0].srcs));
+ Parser::progNode = (yyval.prog); ;}
+ break;
+
+ case 204:
+-#line 651 "grammar.y"
++#line 653 "grammar.y"
+ { (yyval.srcs) = new SourceElementsNode((yyvsp[0].stat)); ;}
+ break;
+
+ case 205:
+-#line 652 "grammar.y"
++#line 654 "grammar.y"
+ { (yyval.srcs) = new SourceElementsNode((yyvsp[-1].srcs), (yyvsp[0].stat)); ;}
+ break;
+
+ case 206:
+-#line 656 "grammar.y"
++#line 658 "grammar.y"
+ { (yyval.stat) = (yyvsp[0].stat); ;}
+ break;
+
+ case 207:
+-#line 657 "grammar.y"
++#line 659 "grammar.y"
+ { (yyval.stat) = (yyvsp[0].func); ;}
+ break;
+
+@@ -2782,7 +2784,7 @@
+ }
+
+ /* Line 1126 of yacc.c. */
+-#line 2786 "grammar.tab.c"
++#line 2788 "grammar.tab.c"
+
+ yyvsp -= yylen;
+ yyssp -= yylen;
+@@ -3057,7 +3059,7 @@
+ }
+
+
+-#line 660 "grammar.y"
++#line 662 "grammar.y"
+
+
+ int yyerror (const char * /* s */) /* Called by yyparse on error */
+--- kjs/grammar.h (revision 515119)
++++ kjs/grammar.h (revision 517245)
+@@ -155,7 +155,7 @@
+
+
+ #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+-#line 50 "grammar.y"
++#line 52 "grammar.y"
+ typedef union YYSTYPE {
+ int ival;
+ double dval;
+--- kjs/grammar.y (revision 515119)
++++ kjs/grammar.y (revision 517245)
+@@ -35,7 +35,9 @@
+
+ /* default values for bison */
+ #define YYDEBUG 0
+-#define YYMAXDEPTH 0
++#ifdef YYMAXDEPTH
++#undef YYMAXDEPTH
++#endif
+ #define YYERROR_VERBOSE
+ #define DBG(l, s, e) { l->setLoc(s.first_line, e.last_line, Parser::source); } // location
+
+--- kjs/keywords.table (revision 515119)
++++ kjs/keywords.table (revision 517245)
+@@ -32,35 +32,39 @@
+ typeof TYPEOF
+ with WITH
+ # reserved for future use
+-abstract RESERVED
+-boolean RESERVED
+-byte RESERVED
+-char RESERVED
+ class RESERVED
+ debugger RESERVED
+-double RESERVED
+ enum RESERVED
+ export RESERVED
+ extends RESERVED
+-final RESERVED
+-float RESERVED
+-goto RESERVED
+-implements RESERVED
+ import RESERVED
+-int RESERVED
+-interface RESERVED
+-long RESERVED
+-native RESERVED
+-package RESERVED
+-private RESERVED
+-protected RESERVED
+-public RESERVED
+-short RESERVED
+-static RESERVED
+ super RESERVED
+-synchronized RESERVED
+-throws RESERVED
+-transient RESERVED
+-volatile RESERVED
++# All of the following are reserved for future use as per
++# ECMA-262, but are permitted as identifiers by both of
++# the widespread browsers.
++#
++#abstract RESERVED
++#boolean RESERVED
++#byte RESERVED
++#char RESERVED
++#double RESERVED
++#final RESERVED
++#float RESERVED
++#goto RESERVED
++#implements RESERVED
++#int RESERVED
++#interface RESERVED
++#long RESERVED
++#native RESERVED
++#package RESERVED
++#private RESERVED
++#protected RESERVED
++#public RESERVED
++#short RESERVED
++#static RESERVED
++#synchronized RESERVED
++#throws RESERVED
++#transient RESERVED
++#volatile RESERVED
+ @end
+
+--- pics/hicolor/index.theme (revision 515119)
++++ pics/hicolor/index.theme (revision 517245)
+@@ -71,7 +71,7 @@
+ Comment[is]=Sjálfgefin táknmyndaþema
+ Comment[it]=Tema icone standard
+ Comment[ja]=フォールバックアイコンテーマ
+-Comment[km]=ស្បែករបស់រូបតំណាង Fallback
++Comment[km]=ស្បែករបស់រូបតំណាង Fallback
+ Comment[lb]=Ersatzsymbolthema
+ Comment[lt]=Fallback ženklelių tema
+ Comment[lv]=Noklusējuma ikonu tēma
+--- kdoctools/customization/de/user.entities (revision 515119)
++++ kdoctools/customization/de/user.entities (revision 517245)
+@@ -11,16 +11,17 @@
+ <!ENTITY cdrom '<hardware>CD-ROM-Laufwerk</hardware>'>
+ <!ENTITY Ctrl "<keycap>Strg</keycap>">
+ <!ENTITY dpi '<acronym>dpi</acronym>'>
+-<!ENTITY eg '<abbrev>z. B</abbrev>'>
++<!ENTITY eg '<abbrev>z. B.</abbrev>'>
+ <!ENTITY Enter "<keycap>Eingabe</keycap>">
+ <!ENTITY Esc "<keycap>Esc</keycap>">
+ <!ENTITY etc "<abbrev>usw.</abbrev>">
+ <!ENTITY FAQ '<acronym>FAQ</acronym>'>
+ <!ENTITY ie "<abbrev>d. h.</abbrev>">
+ <!ENTITY infocenter "<application>Infozentrum</application>">
+-<!ENTITY kcc "<application>KDE-Kontrollzentrum</application>" ><!-- kcc -->
++<!ENTITY kcc "<application>&kde;-Kontrollzentrum</application>" ><!-- kcc -->
+ <!ENTITY kcontrolcenter "<application>&kde;-Kontrollzentrum</application>">
+ <!ENTITY kde "K-Arbeitsumgebung" ><!-- kde -->
++<!ENTITY khelpcenter-de "<application>&kde;-Hilfezentrum</application>" >
+ <!ENTITY kicon "<guiicon>
+ <inlinemediaobject>
+ <objectinfo><title>K-Symbol von &kde;</title></objectinfo>
+--- kdoctools/customization/de/entities/install-compile.docbook (revision 515119)
++++ kdoctools/customization/de/entities/install-compile.docbook (revision 517245)
+@@ -2,8 +2,7 @@
+ installieren, schreiben Sie das Folgende in das Hauptverzeichnis in
+ der &kappname;-Distribution: </para>
+
+-<screen><prompt>%</prompt>
+- <userinput><command>./configure</command></userinput>
++<screen><prompt>%</prompt> <userinput><command>./configure</command></userinput>
+ <prompt>%</prompt> <userinput><command>make</command></userinput>
+ <prompt>%</prompt> <userinput><command>make</command> install</userinput>
+ </screen>
+--- kdoctools/customization/fr/user.entities (revision 515119)
++++ kdoctools/customization/fr/user.entities (revision 517245)
+@@ -160,6 +160,9 @@
+ <!ENTITY traducteurChristopheRolland '<othercredit role="translator"><firstname>Christophe</firstname><surname>Rolland</surname><affiliation><address><email>crolland at freesurf.fr</email></address></affiliation><contrib>Traduction française</contrib></othercredit>'>
+ <!ENTITY relecteurChristopheRolland '<othercredit role="relecteur"><firstname>Christophe</firstname><surname>Rolland</surname><affiliation><address><email>crolland at freesurf.fr</email></address></affiliation><contrib>Relecture de la documentation française</contrib></othercredit>'>
+
++<!ENTITY traducteurBriceRothschild '<othercredit role="translator"><firstname>Brice</firstname><surname>Rothschild</surname><affiliation><address><email>brice.rothschild at gmail.com</email></address> </affiliation><contrib>Traduction française</contrib></othercredit>'>
++<!ENTITY relecteurBriceRothschild '<othercredit role="reviewer"><firstname>Brice</firstname><surname>Rothschild</surname><affiliation><address><email>brice.rothschild at gmail.com</email></address> </affiliation><contrib>Relecture de la documentation française</contrib></othercredit>'>
++
+ <!ENTITY traducteurMickaelSibelle '<othercredit role="translator"><firstname>Mickaël</firstname><surname>Sibelle</surname><affiliation><address><email></email>kimael at gmail.com</address></affiliation><contrib>Traduction française</contrib></othercredit>'>
+ <!ENTITY relecteurMickaelSibelle '<othercredit role="reviewer"><firstname>Mickaël</firstname><surname>Sibelle</surname><affiliation><address><email>kimael at gmail.com</email></address></affiliation><contrib>Relecture de la documentation française</contrib></othercredit>'>
+
+@@ -231,6 +234,7 @@
+ <!ENTITY DamienRaudeMorvan 'Damien Raude-Morvan <email>drazzib at drazzib.com</email>'>
+ <!ENTITY SebastienRenard 'Sébastien Renard <email>Sebastien.Renard at digitalfox.homeip.net</email>'>
+ <!ENTITY ChristopheRolland 'Christophe Rolland <email>crolland at freesurf.fr</email>'>
++<!ENTITY BriceRothschild 'Brice Rothschild <email>brice.rothschild at gmail.com</email>'>
+ <!ENTITY MickaelSibelle 'Mickaël Sibelle <email>kimael at gmail.com</email>'>
+ <!ENTITY PenelopeSorveyron 'Pénélope Sorveyron <email>goneri at free.fr</email>'>
+ <!ENTITY NicolasTernissien 'Nicolas Ternissien <email>nicolast at libertysurf.fr</email>'>
+--- kdeprint/filters/poster.desktop (revision 515119)
++++ kdeprint/filters/poster.desktop (revision 517245)
+@@ -100,7 +100,7 @@
+ Description[is]=Forrit til að prenta stór veggspjöld á lítil blöð. Til að nota þessa skipun verður <b>poster</b>forritið að vera aðgengilegt á slóðinni <tt>path</tt> fumkóði að þessu forriti finnst á <a href="http://printing.kde.org/downloads">KDEPrint web site</a> <p><b><u>Aðvörun:</u></b> Forritið sem finnst á KDEPrint vefsíðunni er breytt útgáfa af upprunalegu útgáfunni sem finnst á öllum CTAN vefsvæðum, en upprunalegi pakkinn virkar <b>ekki</b> með KDE. Þú <b>verður</b> að nota pakkann sem er á:<a href="http://printing.kde.org/downloads">KDEPrint web site</a>.
+ Description[it]=Utilità per stampare poster grandi su più fogli piccoli. Per usare questo comando, l'eseguibile <b>poster</b> deve essere accessibile nel tuo <tt>PATH</tt>. È possibile trovare il codice sorgente di questa utilità sul <a href="http://printing.kde.org/downloads">sito Web di KDEPrint</a>. <p><b><u>ATTENZIONE:</u></b> il pacchetto presente sul sito Web di KDEPrint è una versione modificata dell'originale reperibile in un qualsiasi mirror CTAN, ma il pacchetto originale <b>non</b> funziona con KDE. <b>È necessario</b> usare il pacchetto del <a href="http://printing.kde.org/downloads">sito Web di KDEPrint</a>.
+ Description[ja]=複数の小さい用紙で大きなポスターを印刷するユーティリティです。このコマンドを使用するには <tt>PATH</tt>に<b>poster</b>実行可能ファイルが存在する必要があります。このユーティリティの ソースコードは <a href="http://printing.kde.org/downloads">KDEPrint web site</a>にあります。<p><b><u>警告:</u></b> KDEPrint web site にあるパッケージはオリジナルのCTAN アーカイブミラーにあるものの変更されたバージョンで、オリジナルの ものは KDEでは<b>動きません。</b><b>必ず</b> <a href="http://printing.kde.org/downloads">KDEPrint web site</a>にある パッケージを使用して下さい。
+-Description[km]=ឧបករណ៍បោះពុម្ពប័ណ្ណប្រកាសធំលើសន្លឹកក្រដាសតូចៗជាច្រើន ។ ដើម្បីប្រើពាក្យបញ្ជានេះ <b>poster</b> ដែលអាចប្រតិបត្តិបាន ត្រូវតែមាននៅក្នុង <tt>PATH</tt> របស់អ្នក ហើយថែមទាំងអាចចូលដំណើរការបាន ។កូដរបស់ឧបករណ៍នេះមាននៅលើ <a href="http://printing.kde.org/downloads">គេហទំព័រ KDEPrint</a> ។ <p><b><u>ការព្រមាន ៖</u></b> កញ្ចប់ដែលមាននៅលើគេហទំព័រ KDEPrint គឺជាកំណែកែប្រែមួយរបស់កំណែដើមដែលមាននៅលើកញ្ចក់ប័ណ្ណសាររបស់ CTAN ណាមួយ ប៉ុន្តែកញ្ចប់ដើម <b>មិន</b>ដំណើរការជាមួយ KDE នោះទេ ។ អ្នក <b>ត្រូវតែ</b> ប្រើកញ្ចប់ដែលមាននៅលើ <a href="http://printing.kde.org/downloads">គេហទំព័ររបស់ KDEPrint</a> ។
++Description[km]=ឧបករណ៍បោះពុម្ពប័ណ្ណប្រកាសធំលើសន្លឹកក្រដាសតូចៗជាច្រើន ។ ដើម្បីប្រើពាក្យបញ្ជានេះ <b>poster</b> ដែលអាចប្រតិបត្តិបាន ត្រូវតែមាននៅក្នុង <tt>PATH</tt> របស់អ្នក ហើយថែមទាំងអាចចូលដំណើរការបាន ។កូដរបស់ឧបករណ៍នេះមាននៅលើ <a href="http://printing.kde.org/downloads">គេហទំព័រ KDEPrint</a> ។ <p><b><u>ព្រមាន ៖</u></b> កញ្ចប់ដែលមាននៅលើគេហទំព័រ KDEPrint គឺជាកំណែកែប្រែមួយរបស់កំណែដើមដែលមាននៅលើកញ្ចក់ប័ណ្ណសាររបស់ CTAN ណាមួយ ប៉ុន្តែកញ្ចប់ដើម <b>មិន</b>ដំណើរការជាមួយ KDE នោះទេ ។ អ្នក <b>ត្រូវតែ</b> ប្រើកញ្ចប់ដែលមាននៅលើ <a href="http://printing.kde.org/downloads">គេហទំព័ររបស់ KDEPrint</a> ។
+ Description[ko]=큰 포스터를 작은 종이 여러장에 나눠 찍는데 쓰이는 도구입니다. 이 명령을 쓰려면 <tt>PATH</tt>에 <b>poster</b>를 실행할 수 있는 경로가 들어 있어야 합니다. 이 명령은 <a href="http://printing.kde.org/downloads">KDE 인쇄 웹 사이트</a>에서 찾을 수 있습니다. <p><b><u>경고:</u></b> KDE 인쇄 웹 사이트에 있는 꾸러미는 CTAN 저장고 미러에서 내려받은 본디 꾸러미를 고친 것입니다. 본디 꾸러미는 KDE에서 돌아가지 <b>않습니다</b>. 따라서 <b>꼭</b> <a href="http://printing.kde.org/downloads">KDE 인쇄 웹 사이트</a>에 있는 꾸러미를 쓰십시오.
+ Description[lb]=Hëllefsmëttel fir grouss Plakater op kleng Pabeiergréissten ze drécken. Fir dëse Kommando benotzen ze kënnen, muss den <b>poster</b> Programm an ärem <tt>PATH</tt> sinn. Den Quellcode vun dësem Hëllefsprogramm kann een op der <a href="http://printing.kde.org/downloads">KDEPrint-Websäit</a> fannen. <p><b><u>WARNUNG:</u></b>D'Distributioun, déi een op der KDEPrint-Websäit fënnt, ass eng modifizéiert Versioun vun der originaler, déi een op iergend engem CTAN-Archiv Mirror fanne kann. Déi original Distributioun funktionéiert <b>net</b> mat KDE. Dir <b>musst</b> dofir d'Distributioun vun der <a href="http://printing.kde.org/downloads"> KDEPrint web site</a> Websäit benotzen.
+ Description[lt]=Programėlė, skirta didelių afišų ant daugelio mažų popieriaus lapų spausdinimui. Norint naudoti šią komandą, <b>poster</b> vykdomoji byla turėtų būti Jūsų kelyje <tt>PATH</tt>. Šios programėlės išeities tekstas yra <a href="http://printing.kde.org/downloads">KDEPrint žiniatinklio srityje</a>. <p><b><u>PERSPĖJIMAS:</u></b> KDEPrint žiniatinklio srityje esantis paketas yra modifikuota originalaus paketo, randamo bet kuriame CTAN archyve, versija, tačiau originalus paketas <b>neveiks</b> su KDE. Jūs <b>turite</b> naudoti paketą iš <a href="http://printing.kde.org/downloads">KDEPrint žiniatinklio srities</a>.
+--- kdeprint/filters/ps2pdf.desktop (revision 515119)
++++ kdeprint/filters/ps2pdf.desktop (revision 517245)
+@@ -36,7 +36,7 @@
+ Comment[is]=Breytir Postscript skjölum í PDF-skjöl
+ Comment[it]=Convertitore da PostScript a PDF
+ Comment[ja]=PostScriptからPDFへの変換ツール
+-Comment[km]=កម្មវិធីបម្លែង PostScript ទៅ PDF
++Comment[km]=កម្មវិធីបម្លែង PostScript ទៅ PDF
+ Comment[ko]=포스트스크립트를 PDF 문서로 바꿔줍니다
+ Comment[lb]=PostScript zu PDF Konvertéierer
+ Comment[lt]=PostScript į PDF konverteris
+--- kdeprint/specials.desktop (revision 515119)
++++ kdeprint/specials.desktop (revision 517245)
+@@ -888,7 +888,7 @@
+ Name[is]=Senda PDF skrá í pósti
+ Name[it]=Spedisci file PDF
+ Name[ja]=PDFファイルをメール
+-Name[km]=ផ្ញើ Mail PDF
++Name[km]=ផ្ញើ Mail PDF
+ Name[lb]=PDF-Datei mailen
+ Name[lt]=Pašto PDF byla
+ Name[lv]=Sūtīt PDF failu
+--- kdeui/kfontdialog.cpp (revision 515119)
++++ kdeui/kfontdialog.cpp (revision 517245)
+@@ -292,6 +292,7 @@
+ sampleEdit = new QLineEdit( page, "sampleEdit");
+ QFont tmpFont( KGlobalSettings::generalFont().family(), 64, QFont::Black );
+ sampleEdit->setFont(tmpFont);
++ //i18n: This is a classical test phrase. (It contains all letters from A to Z.)
+ sampleEdit->setText(i18n("The Quick Brown Fox Jumps Over The Lazy Dog"));
+ sampleEdit->setMinimumHeight( sampleEdit->fontMetrics().lineSpacing() );
+ sampleEdit->setAlignment(Qt::AlignCenter);
+--- kdeui/kaboutapplication.cpp (revision 515119)
++++ kdeui/kaboutapplication.cpp (revision 517245)
+@@ -58,6 +58,8 @@
+ //
+ // Recovery
+ //
++
++ //i18n "??" is displayed as (pseudo-)version when no data is known about the application
+ setProduct( kapp ? kapp->caption() : QString::null, i18n("??"), QString::null, QString::null );
+ KAboutContainer *appPage = addContainerPage( i18n("&About"));
+
More information about the pkg-kde-commits
mailing list