2004-02-09  David Faure  <faure@kde.org>

	* ecma/kjs_events.h (clear): set listener object to Null(), not to an invalid Object(),
	which will crash when the listener is stored in another frame (#61467). Maybe it would be better
	to really remove the event listener in this case, but this is hard to do efficiently.

	* ecma/kjs_html.cpp (getValueProperty): s/getString/String/ for meta attributes,
        fixes http://www.accorhotels.com/fr/fidelisation/travelplus/tp_pros_adh_form.shtml

2004-02-07  Harri Porten  <porten@kde.org>

	* rendering/render_layer.cpp (sortByZOrder): compile fix for non-gcc
	compilers

2004-01-29  David Faure  <faure@kde.org>

	* ecma/kjs_window.cpp (get): update frame sizes before returning value for
	innerWidth/innerHeight, in case the window was just resized (#73528, regtest ecma/window.js)

2004-01-22  David Faure  <faure@kde.org>

	* xml/dom_nodeimpl.cpp (setNodeValue): Don't throw NO_MODIFICATION_ALLOWED_ERR from
	there, DOMTS-Core-Level1's hc_nodevalue03 says createEntityReference().setNodeValue()
	should simply do nothing.

	* dom/dom_element.cpp (removeAttributeNode): Fixed logic for NOT_FOUND_ERR.
	(setAttributeNode): removed tests for WRONG_DOCUMENT_ERR and 
	INUSE_ATTRIBUTE_ERR, the latter being incorrect and both being already
	done by setNamedItem

	* xml/dom_elementimpl.cpp (setNamedItem): if attribute exists already,
	return it, to fix DOMTS-Core-level1 test hc_elementreplaceattributewithself

2004-01-22  Leo Savernik <l.savernik@aon.at>

	* khtml_part.cpp (checkCompleted): do not explicitly set focus to
	the document if m_focusNodeNumber is not set (fixes dict.leo.org)

2004-01-21  Stephan Kulow  <coolo@kde.org>

	* html/html_formimpl.h: handle malformed forms different than
	wellformed

2004-01-21  Germain Garand  <germain@ebooksfrance.org>

        * rendering/render_block.cpp (layoutBlockChildren): use maxTopMargin
        again, for correct margin-top determination (#67527)

2004-01-20  Dirk Mueller  <mueller@kde.org>

	* css/cssstyleselector.cpp (applyRule): Implement handling of 
	empty-cells.

	 * css/cssstyleselector.cpp (applyRule): remove superfluous setZIndex(0)
	after setHasAutoZIndex, which breaks auto. 

2004-01-19  Dirk Mueller  <mueller@kde.org>

       * rendering/render_object.cpp (getVerticalPosition): improve
       logic (#65121).

2004-01-19  Stephan Kulow  <coolo@kde.org>

	* rendering/render_style.h: providing an initial property
	function for every css property and using it in macros 
	from cssselector.cpp to unify the handling of short hand
	properties (based on safari patch)

       * css/cssstyleselector.cpp (parseValue): unify handling
       of inherited css properties (based on safari patch)

2004-01-18  Dirk Mueller  <mueller@kde.org>

	* khtmlpart_p.h (class KHTMLPartPrivate): experimental:
	copy encoding information from parent frame. helps on
	http://www.pfl.ru/ when manually setting the correct encoding.

	* rendering/render_container.cpp (addChild): make sure
	that a RenderTableCol object is correctly nested inside
	a table (#59766).

	* xml/dom_elementimpl.cpp (recalcStyle): fix tree corruption 
	when recalcStyle() happens to be invoked in the wrong moment.

	* html/html_baseimpl.cpp (setLocation): fix KURL() casting issue.

2004-01-16  Dirk Mueller  <mueller@kde.org>

	* rendering/render_image.cpp: remove some asserts that
	noone needs anyway (#72739).

2004-01-16  Stephan Kulow  <coolo@kde.org>

	* html/htmltokenizer.cpp: fixing <pre> parsing (#58584)

2004-01-15  Dirk Mueller  <mueller@kde.org>

	* misc/loader.cpp (ref): ok, there are cases where an image
	gets refed twice from the same client. *sigh*.

2004-01-15  Lars Knoll <knoll@kde.org>

	* rendering/render_table.cpp: set overflowWidth to width 
	when layouting (#72420)
	* xml/dom2_eventsimpl.cpp rendering/render_block.cpp
	nodeAtPoint() should always use contents coordinates.

2004-01-14  Dirk Mueller  <mueller@kde.org>

	* misc/loader.cpp: Fix uncachable image leak (#72197).

2004-01-13  Dirk Mueller  <mueller@kde.org>

	* css/css_ruleimpl.cpp (CSSMediaRuleImpl): set parent to 0
	to avoid leak (#70731).

2004-01-13  Germain Garand  <germain@ebooksfrance.org>

        * rendering/render_canvas.cpp (layout):
        force scrollbar visibility status while layouting
        to avoid endless cycles (#69613)

2004-01-13  Dirk Mueller  <mueller@kde.org>

	* ecma/kjs_events.cpp (JSEventListener): store them in a dictionary,
	not a linked list.

	* css/parser.y: fix rect() parsing problem (#72458).

2004-01-12  Dirk Mueller  <mueller@kde.org>

	* rendering/render_block.cpp (left/rightRelOffset): recursion protection
	(#70608).

	* rendering/render_image.cpp (updateFromElement): add tracking of
	an oldimage, to avoid a "shoot out" effect on hovering expired images.

2004-01-11  Germain Garand  <germain@ebooksfrance.org>

        * rendering/render_text.cpp (paintBoxDecorations):
        make background images on inlines obbey the full CSS
        spec (#59600)

        * rendering/render_text.h (paintBoxDecorations): changed prototype

        * rendering/render_line.cpp (paintDecorations): disable for now.

2004-01-11  Dirk Mueller  <mueller@kde.org>

	* html/htmlparser.cpp (insertNode): fix <p><dl> handling (#68167).

	* css/css_base.cpp (extractPseudoType): make it case-insensitive (#72159).

2004-01-11  Germain Garand  <germain@ebooksfrance.org>

        border/padding/margin issues on inlines (#68394)

        * rendering/bidi.cpp (computeVerticalPositionsForLine):
        add the correct width offset for text objects

        * rendering/render_line.cpp (paintBackgroundAndBorder):
        guard against invalid width values

        * rendering/render_text.cpp (paintDecoration):
        revert revision 1.224, avoid resurecting #50683
        by matching the conditionals of RenderText::position
        (RenderText::nodeAtPoint): revert part of r1.234, 
        avoid #69345 by commenting incompatible merge.
        (RenderText::width): add padding/border/margin

2004-01-10  Dirk Mueller  <mueller@kde.org>

	* css/html4.css: fix default font/fontsize of input,select and textarea
	(#67851).

	* misc/loader_jpeg.cpp (decode): try hard not to shoot
	down the machine with large images 
	(try http://www.parisc-linux.org/~willy/kde/graph.jpg)

	* rendering/render_image.cpp (layout): ugh, major stupidity. don't rescale large
	images if nobody explicitely asked for it. makes loading of very large images 
	quite a bit faster.

	* rendering/render_image.cpp/.h: Reduce X-server pressure with large images (#39693).

	* misc/loader_jpeg.cpp: Upon suggestion from Maksim, implement decoding of
	nonprogressive jpegs in non-buffered-image mode. This massively reduces memory
	footprint and slightly improves performance. 

2004-01-09  Dirk Mueller  <mueller@kde.org>

	* rendering/render_replaced.cpp (eventFilter): readd the wheel event handling
	which allows scrolling of the page again. Thanks a lot for just removing it. (#45180)
	

2004-01-02  Dirk Mueller  <mueller@kde.org>

	* html/htmltokenizer.cpp (notifyFinished): fix null pointer dereference
	in rare cases.

	* css/cssstyleselector.cpp (reparseConfiguration): implement.

	* khtml_part.cpp (reparseConfiguration): call CSSStyleSelector::reparseConfiguration
	instead of ::clear(). much less crashy. (#68141)

2003-12-27  Simon Perreault  <nomis80@nomis80.org>

	* khtml_part.cpp: Remove unused zoom actions. Assign CTRL + Key_Plus to
	zooming in and CTRL + Key_Minus to zooming out.

2003-12-27  Luis Pedro Coelho <luis@luispedro.org>

        * misc/loader.cpp : Discard items from cache if they have the wrong type (#68181)

2003-12-20  Koos Vriezen  <koos.vriezen@xs4all.nl>

        * html_objectimpl.cpp (attach): Check KImageIO::typeForMime first if RenderImage
        supports the image format

2003-12-11  Stephan Kulow  <coolo@kde.org>

	* rendering/render_image.cpp (updateFromElement): set the alt text before doing anything
	else, because it might trigger a setting of the error pixmap and then we don't know the
	alt text to draw and get wrong sizes

2003-12-10  Germain Garand  <germain@ebooksfrance.org>

        * rendering/render_replaced.cpp (updateFromElement): don't use setEraseColor for __khtml
        widgets as it changes the background mode and induces flicker (#69130)
        (copyWidget): retrieve background color from the widget's palette.

2003-12-10  Dirk Mueller  <mueller@kde.org>

	* rendering/render_list.cpp: fix toLetter, based on Safari patch.

2003-12-09  Dirk Mueller  <mueller@kde.org>

	* html/html_formimpl.cpp (submit): don't ask over and over again the same question.

2003-12-08  Zack Rusin  <zack@kde.org>

	* khtmlview.*, html/html_formimpl.cpp (submit):  Fixing 67179 -
	Possibility to avoid saving form data for certain sites.

2003-12-05  David Faure  <faure@kde.org>

	Clean up "default handling" of events. Fixes recent regressions like
	"arrow keys in lineedit make the scrollview scroll".
	* xml/dom_nodeimpl.*: Removed bool return value from most dispatch*Event methods,
	documented the two that still return a bool. The meat of the change is
	that dispatchKeyEvent returns defaultHandled || defaultPrevented.
	* dom/dom_node.cpp (dispatchEvent): Return !defaultPrevented as mandated by
	the DOM, now that NodeImpl doesn't do it anymore.
	* rendering/render_replaced.cpp (eventFilter): Adapted to new logic
	* khtmlview.cpp (dispatchKeyEventHelper): Adapted to new logic

2003-12-05  Stephan Kulow  <coolo@kde.org>

	* css/cssparser.cpp (parseValue): Do not accept negative values for padding (#59557)

2003-12-05  Lubos Lunak  <l.lunak@kde.org>

	* khtmlview.cpp, xml/dom2_eventsimpl.*, xml/dom_nodeimpl.*, rendering/render_replaced.cpp :
            fix mapping between Qt and DOM key events

2003-12-05  Germain Garand  <germain@ebooksfrance.org>

        * rendering/render_object.cpp (nodeAtPoint): don't offset
        relatively positioned objects coordinates. They already are (#68716/#60453)

        * rendering/render_text.cpp (nodeAtPoint): no need to include borders and padding
        in the matching region anymore (#69345)

2003-12-05  Germain Garand  <germain@ebooksfrance.org>

        * rendering/render_box.cpp (paintRootBoxDecorations): use the full canvas's height
        when painting the root's background (#55065)

2003-12-03  Stephan Kulow  <coolo@kde.org>

	* css/html4.css: define default text-alignments for input fields to avoid
	problems with inherited attributes

2003-12-02  Stephan Kulow  <coolo@kde.org>

	* html/htmltokenizer.cpp: do not discard any line feed from parsing textareas

2003-11-29  Dirk Mueller  <mueller@kde.org>

	* css/cssstyleselector.cpp: add indigo/crimson colorhandling as it is not in X11's rgb
	names list.

	* misc/loader.cpp (CachedCSSStyleSheet/CachedScript::data): add some utf8/utf16 encoding
	handling. Workaround Qt bugs (#69115). Initial investigation and patch by Harri.

2003-11-29  Stephan Kulow  <coolo@kde.org>

	* html/html_elementimpl.cpp (addHTMLAlignment): readding floating for input type="image"

	* rendering/render_form.cpp (setStyle): respect text-align style on input elements
	(#65610)

	* html/html_formimpl.cpp (HTMLInputElementImpl): don't make input elements
	floating, but only care for the text alignment

2003-11-28  Harri Porten  <porten@kde.org>

	* css/css_valueimpl.cpp (setProperty): remove superfluous
	removeProperty() call. It will be done later in CSSParser. After
	after the value has been recognized as valid.

2003-11-28  Germain Garand  <germain@ebooksfrance.org>

        * html/html_headimpl.cpp (class HTMLLinkElementImpl): grant to alternate sheets
        enabled via script the same status as preferred sheets. Restore proper tracking
        of pending stylesheets.(#67453/#68504)

        * html/html_headimpl.h (HTMLLinkElementImpl::setDisabled)

        * xml/dom_docimpl.cpp (recalcStyleSelector): don't remove sheets linked from
        DOM-disabled link elements from the list of available alternate stylesheets.
        Re-enabling them manually is a valid option.

2003-11-26  Lubos Lunak  <l.lunak@kde.org>

	* khtmlview.cpp, xml/dom2_eventsimpl.cpp : generate correctly keydown,keypress and keyup events

2003-11-26  Dirk Mueller  <mueller@kde.org>

	* html/htmlparser.cpp (parseToken): ignore flat on <select>. maybe
	we should only do this in compat mode though (#69017).

2003-11-25  Dirk Mueller  <mueller@kde.org>

	* html/html_formimpl.cpp (defaultEventHandler): ignore stale keyup events
	on space too.

	* css/html4.css: Set quirky margins on elements that need it (#66490).

2003-11-25  Stephan Kulow  <coolo@kde.org>

	* rendering/render_container.cpp (updatePseudoChild): fix handling of
	images in :content (#67373)
	
	* html/html_baseimpl.cpp (parseAttribute): fix parsing of body attributes (safari merge)

	* rendering/render_box.cpp (calcAbsoluteVertical): basically reverting commit 1.218
	for height calculation. It broke floating images (#67839)

2003-11-25  David Faure  <faure@kde.org>

	* ecma/kjs_window.cpp: Implement hasProperty and get for frames by number in Window,
	to fix window[0] and parent[1] etc. (#56983)

2003-11-25  Germain Garand  <germain@ebooksfrance.org>

        * khtml_part.cpp (checkCompleted): prepend "Automatic Detection" entry to 
        "Use Stylesheet" menu.
        (slotUseStylesheet): set m_sheetUsed to null string if autodetect is on.
        Fixes #54335.

        * xml/dom_docimpl.cpp (recalcStyleSelector): if the previous sheet is sticky but
        still missing when we've already got <body>, choose the document's best 
        candidate until parsing ends. Avoids ending with no decision (#63348).

2003-11-24  Dirk Mueller  <mueller@kde.org>

	* html/html_formimpl.cpp (defaultEventHandler): ignore stale keyup events.
	Only react when we saw a matching keydown before. 

2003-11-24  David Faure  <faure@kde.org>

	* html/htmlparser.cpp (popInlineBlocks): Fixed infinite loop due to 
	popOneBlock returning immediately if blockStack==0. #68034.

	* rendering/bidi.cpp: Fixed infinite loop with <nobr> due to findNextLineBreak
	going back (wrong variable used). #66867, #68598, #59230 and their duplicates.

2003-11-24  Stephan Kulow  <coolo@kde.org>

	* css/cssparser.cpp (parseFontFamily): handle invalid font families like
	font-family: ms sans serif, utopia
	* css/css_valueimpl.cpp (FontFamilyValueImpl): merging safari code to handle
	invalid font families. Replacing buggy font maching by substring search by
	simply ripping out "MS" and searching for similiar fonts

2003-11-24  David Faure  <faure@kde.org>

	* html/htmlparser.cpp (getElement, processCloseTag): Allow only one
	non-empty <title> tag, discard any following <title> tag. This matches
	both IE and Mozilla. Testcases khtmltests/regression/tests/ecma/title*
	
	* html/html_headimpl.cpp (childrenChanged): Set title immediately, like
	other browsers do.

2003-11-23  Germain Garand <germain@ebooksfrance.org>

        * html/html_imageimpl.cpp (attach): don't create a renderer if our parent doesn't
        allow childs. e.g: a RenderPartObject (#66793)

2003-11-23  Stephan Kulow  <coolo@kde.org>

	* css/cssstyleselector.cpp (applyRule): fixing my fix for #60556, which 
	introduced quite some regressions (thanks to Paul Sprakes for working
	that out with me)

2003-11-22  Stephan Kulow  <coolo@kde.org>

	* rendering/render_line.cpp (paintDecorations): avoid underlining elements that
	have no dimension in itself (#68728)

2003-11-22  Koos Vriezen  <koos.vriezen@xs4all.nl>

        * html_miscimpl.cpp (HTMLCollectionImpl): Make
        window.xxx == document.xxx for APPLET/OBJECT/EMBED elements, using
        ID or NAME attributes, behave alike

2003-11-22  Germain Garand  <germain@ebooksfrance.org>

        * dom/css_value.cpp (getPropertyPriority): const version was declared
        but not implemented

        * rendering/font.cpp (drawText): do not use DirWS to count spaces
        when justifying, it won't count &nbsp;'s (#65903)

        * rendering/render_text.cpp (class InlineTextBox): ditto.

2003-11-19  Dirk Mueller  <mueller@kde.org>

	* html/html_baseimpl.cpp (attach): respect display: NONE on <frame>, since
	it is used to indicate the FOUC prevention code path now. 

	* css/cssparser.cpp (parseColor): remove use of invalidColor. use a boolean
	return instead. invalidColor was confusing as it was actually a valid color. 
	Also add rgba() parsing. 

	* css/cssstyleselector.cpp (adjustRenderStyle): add check to avoid that
	<FRAME> gets a display != BLOCK assigned (#63640). 

2003-11-18  Harri Porten  <porten@kde.org>

	* ecma/kjs_html.cpp: limit collection length to >= 0 (Maciej)

2003-11-18  David Faure  <faure@kde.org>

	* css/css_valueimpl.* (cssText): cssText implementation from Maciej Stachowiak.

2003-11-17  David Faure  <faure@kde.org>

	* khtml_part.cpp (processObjectRequest):
	Stop the spinning wheel on <frame src="">.
	Testcase: webcore's fast/frames/empty-frame-src.html

2003-11-17  Stephan Kulow  <coolo@kde.org>

	* rendering/render_*.cpp: changing the output of dump to
	get a more comprehensive renderer tree output - as inspired
	by Safari's kwqDebugTree. This allows for a change in 
	test_regression to check layouts

2003-11-15  Zack Rusin  <zack@kde.org>

	* rendering/render_box.cpp (calcHeight): correctly compute the
	height for relatively positioned object with percentage based
	dimensions - pretty much a merge from safari (#53902) 

2003-11-14  Germain Garand  <germain@ebooksfrance.org>
        
        fix "overflow: scroll" layout/painting issues

        * rendering/render_box.cpp (getOverflowClipRect): substract
        scrollbars width/height if any. Merged from WebCore.

        * rendering/render_layer.cpp (horizontalScrollbarHeight,
        verticalScrollbarWidth): use pixelMetric instead of width()/height().

2003-11-13  Zack Rusin  <zack@kde.org>

	* rendering/render_box.cpp (calcAbsoluteVertical): fix the
	computation  of the height for the percentage positioned elements
	contained in the root

2003-11-11  Dirk Mueller  <mueller@kde.org>

	* rendering/render_style.h (StyleBoxData>): fix SunProCC 
	compatibility problem.

	* xml/dom_elementimpl.cpp (attach): don't attach a renderobject
	to a parent that does not support childs (childAllowed()).
	* html/html_objectimpl.cpp (attach): check for childAllowed().
	* xml/dom_textimpl.cpp (attach): check for childAllowed().

	* misc/loader.cpp (CachedCSSStyleSheet): add "*/*;q=0.1" to the
	accept header (#67803).

2003-11-10  David Faure  <faure@kde.org>

	* khtml_part.cpp: Ask the user "open or save?" before embedding a 
	non-usual mimetype into a frame (e.g. ZIP files or PS files).
	(html and images are the 'usual' exceptions)
	Includes a dontshowagain checkbox, so this shouldn't be too annoying.

2003-11-07  Stephan Kulow  <coolo@kde.org>

	* css/cssparser.cpp (parseValue): set the background-* properties
	to their initial value before expanding (#64743)

2003-11-07  Dirk Mueller  <mueller@kde.org>

	* css/css_valueimpl.cpp (cssText): wrap uri's into url(). 
	Stephan Kulow noted that other browsers do that.

	* rendering/render_list.h (class RenderListItem): another 
	SunCC incompatibility fixed. Only applies to HEAD (*phew*).

2003-11-05  Germain Garand  <germain@ebooksfrance.org>

        Refinement of namespace handling for Attributes,
        following David's patch of 2003-10-25. 

        * xml/dom_elementimpl.cpp: get rid of the m_localName string member
        for Attributes.
        (AttrImpl::cloneNode): fix wrong argument order in ctor call

        * xml/dom_docimpl.cpp (getId/getName): fix problems introduced by the
        switch to an Id of zero for both global and XHTML Namespace. Zero is
        also what a failed QDict lookup returns...

2003-11-05  Dirk Mueller  <mueller@kde.org>

	* html/htmltokenizer.cpp (parseEntity): fix annoying entity parsing problem
	that caused stale ';''s popping up everywhere. 

2003-11-04  Leo Savernik <l.savernik@aon.at>

	* khtml_part.{cpp,h} (selection): Added new overloaded function to
	return selection boundaries.

2003-11-04  Dirk Mueller  <mueller@kde.org>

	* html/html_baseimpl.cpp (attach): fix assertion failure thanks
	to the FOUC patch.

2003-11-04  David Faure  <faure@kde.org>

	* html/html_documentimpl.cpp (close): Ensure setTitle is called
	at least once, with an empty string if there's no title tag.

	* xml/dom_docimpl.cpp (setTitle): Skip equality test if passing an
	empty title, since m_title is initially empty.

2003-11-03  Dirk Mueller  <mueller@kde.org>

	* misc/loader.cpp (buildAcceptHeader): add */* to Accept-Header
	for image requests with low priority to fix www.tweakers.net (#53515).

	* css/parser.y: lowercase the media we get via CSS stylesheets. 
	Its true that the media is case insensitive in CSS, but it is
	case sensitive in HTML, and as we don't want to do the code twice
	we cheat a little here. 

	Also change media parsing logic for @import to handle
	http://www.hixie.ch/tests/evil/css/import/extra/importexoticmedia.html
	correctly (idea by Stephan Kulow). 

	* html/html_formimpl.cpp (defaultEventHandler): react on space too
	(#64200).

	* dom/html_base.cpp (src): return the completeURL.

	* html/html_formimpl.cpp: remove the addCSSProperty calls and put
	them in the default stylesheet. the original reasons for them in that
	place is no longer valid since we implemented the CSS 2.1 selector rules.
	

2003-11-02  Dirk Mueller  <mueller@kde.org>

	* rendering/render_form.cpp (setStyle): check for direction (#57626)
	on RenderLineEdit and RenderTextArea.

	* khtmlview.cpp (viewportWheelEvent): toggle Font zooming orientation (#61862).

	* rendering/render_box.cpp (paintBackgroundExtended): implement. needed
	for inline elements background drawing somewhen. 

	* rendering/render_object.cpp (nodeAtPoint): merge from Safari. Still
	does not work, but at least its the same now. 
	(lineHeight): handle replaced elements here. They don't necessarily
	inherit RenderReplaced anymore. 
	(baselinePosition): handle replaced elements.

	* rendering/render_replaced.cpp: remove baselinePosition/lineHeight. its in
	RenderObject now.

	* rendering/render_block.cpp (isSelfCollapsingBlock): collapse away trailing whitespace
	at the end of the block.
	(setStyle): set "isReplaced" for display: inline-block.
	(addChildToFlow): Make sure we don't append things after :after generated content.
	(calcInlineMinMaxWidth): respect text-indent (taken from WebCore 106).

2003-11-02  Stephan Kulow  <coolo@kde.org>

	* rendering/render_form.cpp (updateFromElement): invalidate the size hint
	of comboboxes as they are cached in QComboBox (#64229)

2003-11-01  Dirk Mueller  <mueller@kde.org>

	* css/cssstyleselector.cpp (applyRule): handle clear: none (#57676)

2003-10-31  David Faure  <faure@kde.org>

	* html/html_inlineimpl.cpp (defaultEventHandler): Another wrong use of detail()
	instead of the new isDoubleClick(), which made it impossible to click on the
	same link twice without moving the mouse (#58241).

2003-10-30  Dirk Mueller  <mueller@kde.org>

	* xml/dom_docimpl.cpp (open): do a full detach()/attach(),
	otherwise we're corrupting the rendertree (#66590). 

2003-10-29  Stephan Kulow  <coolo@kde.org>

	* html/htmltokenizer.cpp (processListing): fixing textarea regression

2003-10-29  David Faure  <faure@kde.org>

	* ecma/kjs_dom.cpp: Patch from Darin Adler to implement Node.item.

2003-10-29  Leo Savernik <l.savernik@aon.at>

	* khtml_part.cpp (khtmlMousePressEvent): Fixed occasional selection
	of image on which a drag had been initiated.

2003-10-29  David Faure  <faure@kde.org>

	* ecma/kjs_window.cpp (Window::openWindow): patch from Maciej to allow
	floats in window.open properties (e.g. small window at saabusa.com)

2003-10-28  David Faure  <faure@kde.org>

	* khtmlview.cpp (viewportMouseDoubleClickEvent): Set bool in MouseEventImpl
	when handling a double click. The DOM API only has "number of clicks at the
	same place" notion, but not whether they happened quick or over a long time.
	Added support for small mouse movement when double-clicking, like in mousePressEvent.

	* xml/dom2_eventsimpl.*: Added m_isDoubleClick bool for the reason above.

	* xml/dom_nodeimpl.cpp (handleLocalEvents): Use new MouseEventImpl::isDoubleClick()
	to differenciate between click and dblclick. Lars used the QMouseEvent type,
	but when the event comes from JS - initMouseEvent+dispatchEvent, there's
	no QMouseEvent - which broke test_regression.

2003-10-28  Stephan Kulow  <coolo@kde.org>

       * khtml_part.cpp (reparseConfiguration): clear the style selector

2003-10-28  Leo Savernik  <l.savernik@aon.at>

	* rendering/render_replaced.cpp (checkSelectionPoint):
	Readded RenderReplaced::checkSelectionPoint to fix disrupted selection
	of sole inline images within block elements (<p><img ...></p>).
	Also fixes caret placement issues.

2003-10-28  David Faure  <faure@kde.org>

	* ecma/kjs_window.cpp (goURL): Compare the URLs without the ref, fixes
	wrong reload when opening a tree-like structure (#54358).

	* ecma/kjs_html.cpp (getValueProperty): (#54929)
	Fixes for HTMLAnchorElement properties, return empty strings instead
	of null, and let "text" return plain text instead of HTML.

	* html/html_elementimpl.cpp (innerText): Fix for empty elements.

2003-10-27  David Faure  <faure@kde.org>

	* khtmlview.cpp (dispatchKeyEvent): Generate keypress, keydown and keyup
	events for the document if no node has the focus. Factorized code in
	a new method, dispatchKeyEvent. Cleaned up old unused variables d->lastKeyNode
	and d->lastKeyPress. #42918 and #43072, google keys.

	* xml/dom_elementimpl.h (checkQualifiedName): Added bool nameCanBeEmpty,
	and fixed again: DOM3 now says a null qualifiedName is allowed in createDocument.
	* xml/dom_docimpl.cpp (createDocument): Pass nameCanBeEmpty=true, to
	allow the commonly found implementation.createDocument("","",null); (#61650)

	* html/html_elementimpl.cpp (HTMLElementImpl): Fixed wrong m_htmlCompat
	value when parsing HTML in HTML-compat mode, get it from the doc's setting.
	* xml/dom_docimpl.cpp (createElementNS): Always set m_htmlCompat, now that
	the HTMLElementImpl constructor sets it too.

	* xml/dom_nodeimpl.cpp (handleLocalEvents): fixed crash when a mouse event
	is dispatched via the DOM API, with initMouseEvent, dispatchEvent.

2003-10-26  David Faure  <faure@kde.org>

	* xml/dom_docimpl.cpp (getId): added bool lookupHTML, set to true in most
	places, to fix e.g. css selector broken by my previous change, and set
	to false from createElementNS to still skip the lookup for HTML tags.

2003-10-25  Dirk Mueller  <mueller@kde.org>

	* rendering/render_form.h (class RenderFileButton): use KURLRequester
	instead of just doing the stuff on our own in a worse way (#62328).
	Also provides completion, yay! :)

	right now <input type=file> has severe rendering errors which I blame
	on the widget painting code from Lars. 

2003-10-25  David Faure  <faure@kde.org>

	Make use of the ID scheme much more for elements, getting rid of 
	m_localName and m_tagName strings in XMLElementImpl.
	
	* misc/maketags: switched to lowercase; uppercase is the html-compat case only.
	* html/html_elementimpl.cpp(tagName,localName): lookup name from id, with proper
	handling of m_htmlCompat vs xhtml difference.
	* html/html_elementimpl.h: removed m_xhtml bool, becomes bitfield in NodeImpl instead,
	since XML elements can be in "HTML compat" mode too (uppercased).
	* xml/dom_docimpl.cpp (DocumentImpl): XML namespace is id 0 again
	* xml/dom_docimpl.cpp (createElementNS): check for exceptions when
	setting the prefix; set HTML compat mode in the element if necessary.
	Only look for the ID if it's an XML element - if not, createHTMLElement did it.
	* xml/dom_docimpl.cpp (getId): Do not apply the html-compat case hacks
	when looking up elements. This is done by createElement[NS] now. Left
	the code for the attribute lookup only.
	* xml/dom_elementimpl.cpp (XMLElementImpl::XMLElementImpl): ctor only needs id and prefix.
	Removed m_tagName and m_localName member vars in all methods, used id lookups instead.
	* xml/dom_elementimpl.cpp (cloneNode): fixed namespace being lost. Factorized
	common code with HTMLElementImpl in finishCloneNode.
	* xml/dom_nodeimpl.*: added m_htmlCompat bool in bitfield. Only makes 
	sense for elements currently, but would take more memory in ElementImpl.

	* xml/dom_docimpl.cpp (DOMImplementationImpl::createDocument):
	DOM3 now says a null qualifiedName is allowed in createDocument.

2003-10-24  Dirk Mueller  <mueller@kde.org>

	* css/html4.css (marquee): don't set display: none, it might
	contain useful text (its used on ebay.com for every second article).

	* html/html_formimpl.cpp/h: revert this commit:
  	     * remove lot's of addCSSProperty calls and moved the
               definitions to the default style sheet. This made
               it possible to remove quite some code in html_formimpl.cpp

	* rendering/render_form.cpp (updateFromElement): Fix coolo's commit (#61347)

2003-10-24  Germain Garand  <germain@ebooksfrance.org>
	* General scope of the change:
	  - bring back the NodeImpl_NSMask bits in id() for Attributes and XMLElements
	    => the cssselector need that to support CSS namespaces in an efficient way.
	    => fixes CSS selection for XML documents
	  - change Nodeimpl::Id registration mechanism: 
	    We tried to solve the DOM1/DOM2 NS methods compatibility problems
	    by registering the qualifiedName. However, this is doomed to  fail in other
	    places that relies on Ids because prefixes aren't  encoded in  the Ids and 
	    are irrelevant for NS nodes identification.
	    Instead, use registered aliases (see DocumentImpl::getId) to solve  
	    compatibility issues while maintaining a sound Id system.

        * css/cssstyleselector.cpp: change getId calls

        * css/parser.y: ditto

        * dom/dom_doc.cpp: change getId/implementation method calls
        (DOM::Document::createElement): check DOM exceptions
        (DOM::Document::createElementNS): ditto
        (DOM::Document::createAttribute): ditto
        (DOM::Document::createAttributeNS): ditto
        (DOM::Document::createDocumentFragment): ditto

        * dom/dom_element.cpp: change getId/implementation method calls

        * dom/dom_node.cpp: ditto

        * html/html_documentimpl.cpp:
        (HTMLDocumentImpl::createElement): check DOM exceptions

        * html/html_documentimpl.h: ditto 

        * html/html_elementimpl.cpp: use m_xhtml bool flag to distinguish HTML/XHTML elements

        * html/html_elementimpl.h:
        (DOM::HTMLElementImpl::HTMLElementImpl): init m_xhtml
        (DOM::HTMLElementImpl::setXHtmlElement): set/retrieve m_xhtml (non-virtual)
        (DOM::HTMLElementImpl::isXHtmlElement): ditto

        * html/htmlparser.cpp: change getValue/setValue syntax

        * html/htmltokenizer.h: change getId calls

        * rendering/render_frames.cpp: ditto

        * xml/dom_docimpl.cpp: IdNameMapping is now a struct holding QDicts. getId dynamically choses
            the struct to be used based on it's first argument (ElementId, AttributeId, NamespaceId)
        (DOMImplementationImpl::createDocument): factor qualifiedName checking code
        (DocumentImpl::createAttribute): New. Mirrors DOM.
        (DocumentImpl::createAttributeNS): ditto
        (DocumentImpl::createElementNS): check exceptions in qualifiedName

        * xml/dom_docimpl.h: IdNameMapping change

        * xml/dom_elementimpl.h:
        * xml/dom_elementimpl.cpp: 
        (AttrImpl::AttrImpl): no more m_namespaceURI, now dynamically retrieved with getName(NamespaceId...)
        (AttrImpl::nodeName): now built from prefix + localName
        (ElementImpl::setAttributeNS): check exceptions on qualifiedName
        (XMLElementImpl::XMLElementImpl): no more m_namespaceURI, now dynamically retrieved with getName(NamespaceId...)
             restore m_id (as in 3_1_BRANCH) for correct CSS selection on XML Elements

        * xml/dom_elementimpl.h:
        (DOM::checkQualifiedName): inline DOM helper, factoring qualifiedName exception checkings
        (DOM::splitPrefixLocalName): inline DOM helper, avoids scanning qualifiedName multiple times

        * xml/dom_nodeimpl.h:
        (DOM::NodeImpl::): enum IdType for (ElementId, AttributeId, NamespaceId)

        * xml/xml_tokenizer.cpp:
        (XMLHandler::startElement): use the qualifiedName instead of the localName
            in order to know the prefix if any.

2003-10-24  Stephan Kulow  <coolo@kde.org>

	* rendering/render_form.cpp (updateFromElement): support disabled attribute
	select option (#61347)

2003-10-24  Lars Knoll <knoll@kde.org>
	* Make the <button> element work correctly
	* remove lot's of addCSSProperty calls and moved the
	definitions to the default style sheet. This made
	it possible to remove quite some code in html_formimpl.cpp

2003-10-24  Lars Knoll <knoll@kde.org>
	* A few more small fixes to Html event handlers. We can unfortunately not 
	easily get the events for <select> and <textarea> correct, as they use
	either modality or QScrollView (but doesn't work in 3.1.x neither).	

2003-10-24  Lars Knoll <knoll@kde.org>
	* Hopefully fixed most repainting problems.

2003-10-24  Lars Knoll <knoll@kde.org>
	* Fix most of the form related regressions introduced by my
	changes earlier on. onfoo event handlers are now fired in a
	way that is mostly compatible to IE for <input type=xxx>.
	Other form elements might still need some work.

2003-10-23  Lars Knoll <knoll@kde.org>
	* Fix nodeAtPoint for elements that have no child (makes links on images
	work again)
	* Fix null pointer dereferencing in RenderLayer::updateHoverActiveState

2003-10-23  Stephan Kulow  <coolo@kde.org>

	* html/htmltokenizer.cpp (processListing): do not discard all white space
	   in textareas (#62076)

	* css/cssstyleselector.cpp (applyRule): if the first font isn't found,
		continue looking (#60556)

2003-10-22  Dirk Mueller  <mueller@kde.org>

	* rendering/render_box.cpp (calcAbsoluteHorizontal): fixed containing block
	height calculation for position:fixed.
	(paintBackground): fix negative backgroundx/y positioning. fix 
	background-attachment: fixed (http://placenamehere.com/safari/fixedbgtest.html)
	avoid division by zero. fix table background positioning (#49336).
	http://c133.org/testcase1.html, http://c133.org/testcase2.html,
	http://c133.org/testcase3.html

	* misc/loader.cpp (pixmap_size/valid_rect): return useful values for the error image
	to avoid that its shown as null pixmap (#42233).

2003-10-21  Dirk Mueller  <mueller@kde.org>

	* rendering/render_list.cpp (calcListValue): skip anonymous block while searching
	for the <ol> block. Thanks to the Maksim regression testengine.

	* rendering/render_object.cpp (setOverhangingContents): refine assert to avoid
	crash on bananalotto.com. Adjust to changed containingBlock() behavior.

	* html/html_listimpl.cpp (attach): fix thinko. Revert Safari merge which
	broke <ul><p><li>. Thanks to Maksim for noticing.
	
	* rendering/render_list.cpp (calcListValue): handle <ul><p><li> again.

	* rendering/render_box.cpp (repaint): revert commit which introduced another
	4 bytes overhead. No need to waste memory here. 

	* rendering/render_object.cpp (setStyle): schedule repaint on old object
	when the new outline is going to be thinner.

	* rendering/render_form.cpp (RenderCustomButton): Remove.

	* rendering/render_replaced.cpp (RenderReplaced::checkSelectionPoint): Remove.
	RenderObject/RenderBox'es implementation *must* work. No need to add useless code.

	* rendering/render_replaced.cpp (RenderReplacedBlock): Remove.

	* html/html_formimpl.cpp (HTMLButtonElement::attach): Remove.

	* rendering/render_box.cpp (calcWidth): implement CSS min-width/max-width 
	support (#12994).

	* rendering/render_block.cpp (renderName): don't crash when style() is 0L.

	* rendering/render_object.h (class RenderObject): remove isRunIn() / isCompact().
	We can use style()->display() here, and it is inconsistent with the other is*
	members which usually do not access style() (that can be 0L).

	* rendering/render_object.cpp (createObject): create RenderBlock for INLINE_BLOCK.

	* css/html4.css (BUTTON/LEGEND): set display: inline-block.

	* css/cssstyleselector.cpp (styleForElement): handle COMPACT/RUN_IN/INLINE_BLOCK
	(applyRule): handle INLINE_BLOCK.

	* css/makeprop: don't export getPropertyName. declare it.

	* xml/dom_nodeimpl.cpp (replaceChild/appendChild/removeChild): 
	Reverting patch which invalidated layout on child when it was attached.

2003-10-20  Lars Knoll <knoll@kde.org>

	* fix most issues with the layering code by 
	merging and adapting safaris implementation
	* fix a bug in RenderBox::calcAbsoluteVertical(), that probably
	has destroyed a lot of layouts.
	* don't add the scroll offset in RenderBox::paintBoxDecorations()

2003-10-20  Dirk Mueller  <mueller@kde.org>

	* css/html4.css (UL,MENU,DIR,OL): don't set flow-around-floats (#53429).

2003-10-20  David Faure  <faure@kde.org>

	* xml/dom_docimpl.cpp (defaultEventHandler): set current target to 0 for window events.
	* ecma/kjs_events.cpp (handleEvent): Window events like window.onload window.onresize etc.
	must have 'this' set to the window (not to the document).

2003-10-20  Dirk Mueller  <mueller@kde.org>

	* rendering/render_form.cpp (layout): set IE-CSS-extension style palette
	on <textarea> scrollbars (#56532).

	* rendering/render_layer.cpp (showScrollbar): set IE-CSS-extension styled
	palette on the overflow=scroll/auto scrollbars.
	
	* rendering/render_frames.cpp (close): reorder. updateWidget() might
	delete this.

	* html/html_formimpl.cpp (value): return the DOM "defaultValue" when we have
	no renderer.
	(encoding): submit textarea even if display=none (#49829)

	* ecma/kjs_dom.cpp (getValueProperty): add bindings to clientWidth/Height,
	scrollWidth/height,offsetTop/left,offsetWidth/Height,offsetParent.
	(getValueProperty): don't map body to canvas (#59676).

	* split up borderSpacing into a horizontal and vertical border spacing so that
	tables can have assymmetric spacing.

	* html/htmlparser.cpp (insertNode): don't set css list position on stray <li>
	elements. its an inherited attribute, and might mess up rendering of nested
	<ul>/<ol> constructs.

	* rendering/render_list.cpp: ListItems are no longer floats.

2003-10-19  Dirk Mueller  <mueller@kde.org>

	* html/html_headimpl.cpp (childrenChanged): make sure that we respect the media
	attribute of <style> (#47786).

2003-10-19  Harri Porten  <porten@kde.org>

	* html/html_documentimpl.cpp (setCookie): use latin1 encoding to
	have a 1:1 translation of the lowest Unicode row.

2003-10-19  Dirk Mueller  <mueller@kde.org>

	* html/htmltokenizer.cpp (parseEntity): when entity is terminated and result
	is not-ascii, require ending ';'. khtmltests/html/parser/obscure_entity_tokenizing.html

2003-10-18  Dirk Mueller  <mueller@kde.org>

	* css/cssstyleselector.cpp (checkOneSelector): fix selector list matching
	when substrings match in a word. we have to test if we matched a complete word,
	otherwise its not a match.

	* html/htmltokenizer.cpp (parseEntity): don't do the magic-unterminated-entities-IE-hack
	when inside a tag. fixes <a href="/foo.html&section=2">

	* html/htmlparser.cpp (insertNode): fix typo (#66200).

	* rendering/render_table.cpp (seekCell): make static. check for out of bounds.
	* rendering/render_table.cpp (RenderTableSection::checkSelectionPoint): fix
	brain damage (#66198).

2003-10-14  David Faure  <faure@kde.org>

	* misc/htmltags.in, html/htmlparser.cpp, html/dtd.cpp: added very basic
	support for <ilayer>, much like <layer>, as a generic block element.
	Fixes sites looking for such elements by ID, like www.sp ort1.de's diashow.

2003-10-14  Wilco Greven <greven@kde.org>
	* ecma/kjs_window.cpp (tryCall): Scroll should do the same as
	ScrollTo, not ScrollBy. #63301

2003-10-14  David Faure  <faure@kde.org>

	* xml/dom_nodeimpl.cpp (handleLocalEvents): Fixed infinite loop in
	NodeImpl::handleLocalEvents due to braindead QPtrList behavior. #61623.

2003-10-10  Harri Porten  <porten@kde.org>

	* ecma/kjs_html.cpp: title and alt attributes should never be null

	* ecma/kjs_html.cpp (toString): make use of alt attribute if set

2003-10-09  Dirk Mueller  <mueller@kde.org>

	* ecma/kjs_dom.cpp (putValueProperty): don't scroll layer when there is is nothing
	to scroll. (David Hyatt)

	* rendering/render_object.cpp (scrollHeight): return overflowHeight() not contentHeight()
	by default. (David Hyatt)
	
	* rendering/render_object.cpp (scrollWidth): return overflowWidth() not contentWidth()
	by default. (David Hyatt)

	* html/htmltokenizer.cpp (parseEntity): Improve tokenizing of unterminated
	entities.

2003-10-09  Leo Savernik  <l.savernik@aon.at>

	* rendering/render_object.{cpp,h} (getTextDecorationColors),
	rendering/render_text.{cpp,h} (InlineTextBox::paintDecoration, RenderText::paintObject),
	rendering/render_style.{cpp,h},
	css/cssstyleselector.cpp (styleForElement):
	fixed text-decoration issues by merging RenderObject::getTextDecorationColor
	from Safari, changed CSSStyleSelector appropriately

	* rendering/render_text.{cpp,h} (InlineTextBox::paintDecoration),
	rendering/font.{cpp,h} (drawText, drawDecoration):
	fixed drawing of text decoration within selected text

	* rendering/render_text.cpp (paintObject),
	rendering/font.{cpp,h} (drawText):
	 fixed overspilling of selection with unusual line-height configurations

2003-10-07 Germain Garand <germain@ebooksfrance.org>

	* khtmlview.cpp (viewportMouseReleaseEvent/viewportMouseMoveEvent): forward
	meaningful peripheral mouse events to focused widget to restore correct
	mouse handling in proxied widgets. #65216 (selection part)

	* rendering/render_replaced.cpp (handleEvent):
	map MOUSEOUT/MOUSEOVER DOM events to Enter/Leave events. Honours stacking
	while mouse buttons are pressed.

	* html/html_formimpl.cpp (defaultEventHandler): forward MOUSEOUT/MOUSEOVER
	to handleEvent

2003-10-06  Daniel Molkentin  <molkentin@kde.org>

	* ecma/kjs_window.cpp: added window.open targets _self and replace

2003-10-06  David Faure  <faure@kde.org>

	* ecma/kjs_html.cpp: Fixed crash due to onload=null in the onload event
	handler (#57195).

2003-10-06  Dirk Mueller  <mueller@kde.org>

	* khtml_part.cpp (jScript): remove broken #ifdef'ery.
	(popupMenu): add a QGuardedPtr to detect the case when we're destructed
	before the popup menu is closed. avoid accessing any "this" then.
	#43389

	* khtmlview.cpp (viewportMousePressEvent): reorder afaik unrelated code
	to make the one call entering a local event loop the last, so that we can
	cleanly exit when it the view is already deleted.

	* khtml_ext.cpp (KHTMLPopupGUIClient): pass QObject parent

2003-10-05  Dirk Mueller  <mueller@kde.org>

	* ecma/kjs_css.cpp (tryPut): Fix CSSValue refcounting error causing major
	memory leak.

	* dom/css_value.cpp/h (class CSSStyleDeclaration): make accessors const. Add
	binary compatibility wrappers.

2003-10-04 Germain Garand <germain@ebooksfrance.org>

	* rendering/render_replaced.cpp (baselinePosition): use setPos to adjust
	layer position if needed. Fix relatively positioned widgets not being painted.

2003-10-04  Dirk Mueller  <mueller@kde.org>

	* html/htmlparser.h (class KHTMLParser): keep "current" NodeImpl referenced
	to avoid ugly crashes when DHTML deletes the node while we're still parsing.
	#57020, testcase alja.html

	
2003-10-04  Dirk Mueller  <mueller@kde.org>
	
	* khtml_settings.cc (init): change default for JS debugger to off.

	* html/html_elementimpl.cpp (createContextualFragment): Fix memory
	leaks. Adjust code style. Adjust return to avoid dangling return leaks.

	* xml/dom2_rangeimpl.cpp (createContextualFragment): adjust return type.

	* html/html_elementimpl.h (class HTMLElementImpl): adjust return type.

	* dom/dom2_range.cpp (createContextualFragment): Adjust to DocumentFragment 
	return type.

	
