2003-01-15 Darin Adler Reviewed by Ken. - fixed problem where Content-Type was coming in with suffixes like "charset" * kwq/WebCoreBridge.h: Add contentType and refresh parameters, and remove "headers" parameter, from openURL method. * kwq/WebCoreBridge.mm: (-[WebCoreBridge openURL:reload:contentType:refresh:lastModified:pageCache:]): Get the content type from a parameter, and the refresh header from a separate parameter rather than extracting both from a headers dictionary. 2003-01-14 Darin Adler Reviewed by Maciej. - fixed 3147036 -- words separated only by newlines are getting rammed together on XML page - fixed 3147032 -- preformatted text is missing much whitespace on XML page * khtml/xml/xml_tokenizer.cpp: (XMLHandler::characters): Don't try to strip whitespace at all, because it needs to be in the DOM. - add support for more MIME types * khtml/khtml_part.cpp: (KHTMLPart::begin): Add "application/xml" and "application/xhtml+xml". 2003-01-14 David Hyatt Make FOUC work with XML. Reviewed by darin. * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::attach): * khtml/xml/dom_xmlimpl.cpp: (ProcessingInstructionImpl::ProcessingInstructionImpl): (ProcessingInstructionImpl::checkStyleSheet): (ProcessingInstructionImpl::isLoading): (ProcessingInstructionImpl::sheetLoaded): (ProcessingInstructionImpl::setStyleSheet): * khtml/xml/dom_xmlimpl.h: 2003-01-14 Darin Adler Reviewed by Maciej. - first cut at XML parsing with expat * khtml/khtml_part.cpp: (KHTMLPart::begin): Remove APPLE_CHANGES and use the XML code for text/xml documents. * WebCore.pbproj/project.pbxproj: Added the ForwardingHeaders to the project. Added new QXml files, removed old ones. * kwq/KWQXml.h: Removed. * kwq/KWQXml.mm: Removed. * kwq/KWQXmlAttributes.h: Added. * kwq/KWQXmlAttributes.mm: Added. * kwq/KWQXmlDefaultHandler.h: Added. * kwq/KWQXmlDefaultHandler.mm: Added. * kwq/KWQXmlSimpleReader.h: Added. * kwq/KWQXmlSimpleReader.mm: Added. * kwq/KWQString.h: Add fromUtf8 functions. * kwq/KWQString.mm: (QString::fromUtf8): Added. Simple implementation just calls fromStringWithEncoding. We may need something more efficient later, at least for all-ASCII text. - other changes * khtml/khtml_part.h: Fix spelling of occurrence. * khtml/misc/decoder.cpp: (Decoder::decode): Turn on Japanese auto-detect. It doesn't seem to work yet, but this does no harm. 2003-01-13 Richard Williamson Fix for 3139120. This patch was contributed by Mitz Pettel. It correctly handles the visually ordered encodings. The patch also picks up changes from kde that accounts for european numbers correctly in bidiReorderLine(). Reviewed by Dave. * khtml/html/html_formimpl.cpp: (HTMLFormElementImpl::formData): * khtml/misc/decoder.cpp: (Decoder::setEncoding): * khtml/rendering/bidi.cpp: (RenderFlow::bidiReorderLine): * khtml/rendering/bidi.h: 2003-01-13 Darin Adler Reviewed by Ken. - fixed 3143781 -- submitting the same form twice doesn't work properly (example at directory.apple.com) * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::submitForm): Only run the "don't submit the same form twice" logic when the form is one that affects the frame that the form is in. 2003-01-12 Darin Adler * WebCorePrefix.h: Needed to touch this file since we now have plain C source (expat). * kwq/KWQKHTMLPart.cpp: Reformatted a bit. 2003-01-12 Darin Adler Reviewed by Maciej. - first step towards integrating expat for XML support: make it compile and link * kwq/KWQXml.mm: (QXmlSimpleReader::parse): Put in a placeholder that calls expat. Mainly just used to make sure we link. * WebCore.pbproj/project.pbxproj: Added expat files. * expat/COPYING: Added. * expat/Changes: Added. * expat/MANIFEST: Added. * expat/README: Added. * expat/expat_config.h: Added. * expat/lib/ascii.h: Added. * expat/lib/asciitab.h: Added. * expat/lib/expat.h: Added. * expat/lib/iasciitab.h: Added. * expat/lib/internal.h: Added. * expat/lib/latin1tab.h: Added. * expat/lib/nametab.h: Added. * expat/lib/utf8tab.h: Added. * expat/lib/xmlparse.c: Added. * expat/lib/xmlrole.c: Added. * expat/lib/xmlrole.h: Added. * expat/lib/xmltok.c: Added. * expat/lib/xmltok.h: Added. * expat/lib/xmltok_impl.c: Added. * expat/lib/xmltok_impl.h: Added. * expat/lib/xmltok_ns.c: Added. 2003-01-12 Darin Adler Reviewed by Dave. - minor cleanup of plug-in-related classes in ECMA directory * khtml/ecma/kjs_navigator.cpp: Remove unneeded PluginBase member functions ref() and deref(). Instead just make Plugin and MimeType both derive from PluginBase and remove APPLE_CHANGES. (Navigator::getValueProperty): Don't use "Konqueror" for the fallback. Just return Undefined() for that case since we will never reach it anyway. - simplify the logic in khtmlMoveMouseEvent so it's easier to decipher * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::khtmlMouseMoveEvent): By merging two identical if statements, the logic of this function becomes much clearer. 2003-01-12 Darin Adler Reviewed by Dave. - fixed a bunch of places where KHTML did !x == y instead of !(x == y) or x != y. * khtml/css/cssstyleselector.cpp: (CSSStyleSelector::applyRule): * khtml/html/htmlparser.cpp: (KHTMLParser::insertNode): * khtml/misc/loader.cpp: (Cache::requestImage), (Cache::requestStyleSheet): * khtml/rendering/render_flow.cpp: (RenderFlow::setStyle): Changed !x == y to x != y. In each case, there's a reason that this does not create any problem in practice, which is why we didn't rush to get this in for beta 1. 2003-01-11 Darin Adler Reviewed by John. - fixed 3144789 -- reproducible crash in KHTMLParser::freeBlock on a page at www.library.arizona.edu * khtml/html/htmlparser.cpp: (KHTMLParser::finished): Call freeBlock here rather than waiting until the parser is destroyed. This fixes the bug because when the parser is destroyed, the document is already destroyed, so we have a dangling current pointer to an already-destroyed node. - fixed 3142024 -- crash/hang/assert on java.sun.com in HTMLTokenizer The bug was caused by an erroneous clicked signal that was being emitted by QListBox at just the wrong time. * kwq/KWQListBox.h: Added _changingSelection boolean. * kwq/KWQListBox.mm: (QListBox::QListBox): Set _changingSelection to false. (QListBox::setSelected): Set _changingSelection to true. (-[KWQListBoxTableViewDelegate tableViewSelectionDidChange:]): Only emit the "clicked" signal if _changingSelection is false. * khtml/html/htmltokenizer.h: Add debug-only boolean inWrite. * khtml/html/htmltokenizer.cpp: (HTMLTokenizer::HTMLTokenizer): Set inWrite to false. (HTMLTokenizer::write): Set inWrite to true. (HTMLTokenizer::~HTMLTokenizer): Assert that inWrite is not true. 2003-01-11 Darin Adler Reviewed by Dave. - fixed 3136944 -- mouseover feedback over non-mapped part of image map claims link to current page * kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]): Change code so we won't call completeURL and complete a null ATTR_HREF (which is distinct from an empty ATTR_HREF). Did a similar cleanup on the image code. 2003-01-09 Darin Adler * WebCore.pbproj/project.pbxproj: Add the year 2003, remove CFBundleIconFile, bump marketing version to 0.8.1 and version to 52u to keep up with the branch, remove NSHumanReadableCopyright, remove NSPrincipalClass, remove SKIP_INSTALL that was in the Info plist instead of project settings. * English.lproj/InfoPlist.strings: Update to match above. 2003-01-09 Maciej Stachowiak Reviewed by Dave. - fixed Radar 3143013 - hang trying to load spiny.com/software * khtml/rendering/render_table.cpp: (RenderTable::layoutRows): Check for the render root as a loop termination condition, to avoid an infinite loop for an absolute but non-fixed table cell. 2003-01-09 David Hyatt The "flow-mode" quirk for lists is just that - a quirk, and should not be applied when in strict mode. Fixes diveintomark.org's navigation bar on the front page (issue #2 on his list). Reviewed by darin and maciej * khtml/css/html4.css: 2003-01-08 David Hyatt Finish the KONQBLOCK removal and make sure that table rows and cells encountered inside stray content cause the stray content to close so that the rows and cells can be part of the table. This fixes the versiontracker bug. #3142319. Reviewed by darin. * khtml/html/htmlparser.cpp: (KHTMLParser::reset): (isTableRelatedTag): (KHTMLParser::insertNode): (KHTMLParser::popOneBlock): * khtml/html/htmlparser.h: 2003-01-08 David Hyatt Revert the redundancy that dirk noticed. Fixing issue #3 on diveintomark.org's list, which actually involved merging calcAbsoluteVertical to KHTML's trunk and then fixing a math error in the bottom computation. Reviewed by NOBODY (OOPS!). * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::parseAttribute): * khtml/rendering/render_box.cpp: (RenderBox::calcAbsoluteVertical): 2003-01-08 Chris Blumenberg Fixed: 3111432 - Support OBJECT tags with type text/plain or text/html Reviewed by dave. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::createPart): call [_bridge frameRequiredForMIMEType:] to determine if we should create a plug-in view or iframe * kwq/WebCoreBridge.h: add frameRequiredForMIMEType: 2003-01-08 Trey Matteson 3136213 - Page loads stopped by backtracking don't finish when moving forward We need to remove the entry from the KHTML image cache when a load has an error, so it will be reloaded next time we try. Reviewed by Darin, * khtml/misc/loader.cpp: (Loader::slotFinished): Remove cache entry on job error. 2003-01-08 Darin Adler Reviewed by Dave. - fixed 96/72 dpi snafu; no need to do something different for AppKit, because it always uses pixel sizes, not font size * khtml/css/css_valueimpl.cpp: * khtml/css/css_valueimpl.h: * khtml/css/cssstyleselector.cpp: * kwq/KWQPaintDeviceMetrics.mm: Rolled out change from 2002-12-05 - a cut at implementing heretofore unimplemented QTextStream classes * kwq/KWQTextStream.h: * kwq/KWQTextStream.mm: First cut implementation. === Safari-49 === 2003-01-05 Maciej Stachowiak Reviewed by no one cause I'm just changing copyright strings. * WebCore.pbproj/project.pbxproj: Added non-Apple copyrights to copyright strings. * English.lproj/InfoPlist.strings: Likewise. 2003-01-05 Darin Adler * Resources/Info.plist: Fix "Apple Compupter" typo. 2003-01-04 Trey Matteson 3098388 - Pressing the back button goes back two levels at allmusic.com When processing an assignment to document.location, allow items to be added to history. This parallels the existing treatment of window.location.href. Reviewed by Richard, Darin * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocument::putValue): Pass false for lockHistory arg of scheduleRedirection() 2003-01-04 Richard Williamson I checked in kjs_window.cpp by accident. The only change was a logging printf. Back out that change. Reviewed by me. * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): 2003-01-03 Richard Williamson Fix for 3138425. Don't open a new window when document.open() is called with < 2 parameters. Reviewed by darin. * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocFunction::tryCall): * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): 2003-01-03 Richard Williamson Fixed 3138743, 3138678, and 3138854. Removed the RenderText widths cache, replaced it with a much simply monospace character cache. Should be much faster for covered cases too! Also fixed buffer overrun problem causing the crash in 3138854. Reviewed by darin. * khtml/rendering/font.cpp: (Font::isFixedPitch): * khtml/rendering/font.h: * khtml/rendering/render_text.cpp: (TextSlave::checkSelectionPoint): (RenderText::RenderText): (RenderText::setStyle): (RenderText::~RenderText): (RenderText::shouldUseMonospaceCache): (RenderText::cacheWidths): (RenderText::widthFromCache): (RenderText::trimmedMinMaxWidth): (RenderText::calcMinMaxWidth): (RenderText::setText): (RenderText::width): * khtml/rendering/render_text.h: * kwq/KWQFont.h: * kwq/KWQFont.mm: (QFont::isFixedPitch): * kwq/WebCoreTextRendererFactory.h: * kwq/WebCoreTextRendererFactory.m: (-[WebCoreTextRendererFactory isFontFixedPitch:]): 2003-01-03 John Sullivan - fixed 3138673 -- reproducible crash in JavaScript Reviewed by Darin, OK'ed by Don. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::setTitle): Check for nil view or nil part before dereferencing. 2003-01-03 David Hyatt Fix for percentage table heights. A check was missing to look for a fixed height on the containing block. Reviewed by darin * khtml/rendering/render_table.cpp: (RenderTable::layoutRows): === Alexander-48 === 2003-01-02 David Hyatt Fix for 3136473. s with no specified size should be 0x0. They should not be 300x200. Fixes thinker.org. Reviewed by john and darin. * khtml/rendering/render_frames.cpp: (RenderPart::intrinsicWidth): (RenderPart::intrinsicHeight): 2003-01-02 Darin Adler Reviewed by Maciej and Trey. - fixed 3138063 -- REGRESSION: JavaScript-submitted form activates input type=image (webmail.mac.com) JavaScript-submitted forms must not get a submit button activated as return-key-submitted ones do. * khtml/html/html_formimpl.h: Add boolean activateSubmitButton parameter to submit. * khtml/html/html_formimpl.cpp: (HTMLFormElementImpl::prepareSubmit): Pass true for activateSubmitButton. (HTMLFormElementImpl::submit): Only activate a button if activateSubmitButton is true. * khtml/dom/html_form.cpp: (HTMLFormElement::submit): Pass false for activateSubmitButton. 2003-01-02 David Hyatt Fix for the 3137790. This patch passes the mouse event x and y as distinct arguments to constructZTree, so that the damageRect can really reflect your clip rect. This allows me to prune out layers that are clipped so that if x,y aren't inside the clip rect, the layer doesn't get added to the list. This patch also makes the "clip" property apply to the element that specifies the clip instead of to the element's kids. This is ambiguous in the spec, but it turns out other browsers do it this way, so there really is an interpretation that must be followed. :) Reviewed by darin * khtml/rendering/render_layer.cpp: (RenderLayer::nodeAtPoint): (RenderLayer::constructZTree): * khtml/rendering/render_layer.h: 2003-01-02 David Hyatt Fix for bug #3137935. When a float causes a line to get moved down past the float, the line would incorrectly break rather than expanding to use the newly-available width. Reviewed by darin. * khtml/rendering/bidi.cpp: (RenderFlow::findNextLineBreak): 2003-01-02 Darin Adler Reviewed by John. - fixed 3131190 --