2002-12-03 David Hyatt Fix for 3078227, hanging in table code. Make sure
s don't get wrapped in anonymous rows and cells. Reviewed by: rjw * khtml/rendering/render_table.cpp: (RenderTable::addChild): (RenderTableSection::addChild): (RenderTableRow::addChild): 2002-12-03 David Hyatt Backing out a file that I did not intend to check in. * khtml/misc/loader.cpp: 2002-12-03 Richard Williamson D'oh. Fixed last minute change that broke the build. * kwq/KWQFont.mm: (QFont::getNSFont): 2002-12-03 David Hyatt Remove the moveWidgetsAside function. This fixes all the form controls on livepage.apple.com that were getting hosed by the scrolling marquee. Reviewed by: darin * khtml/html/html_tableimpl.cpp: (HTMLTableRowElementImpl::addChild): * khtml/misc/loader.cpp: * khtml/rendering/render_root.cpp: (RenderRoot::layout): * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::KWQKHTMLPart): (KWQKHTMLPart::paint): 2002-12-03 Richard Williamson Fixed 3019986. Use an array of font families instead of a single font family to support CSS family lists. r=hyatt * kwq/KWQFont.h: * kwq/KWQFont.mm: (QFont::getNSFont): * kwq/KWQFontMetrics.mm: (QFontMetrics::width): (QFontMetrics::floatWidth): (QFontMetrics::floatCharacterWidths): * kwq/KWQPainter.mm: (QPainter::drawText): (QPainter::drawUnderlineForText): * kwq/WebCoreTextRenderer.h: * kwq/WebCoreTextRendererFactory.h: * kwq/WebCoreTextRendererFactory.m: (-[WebCoreTextRendererFactory rendererWithFamilies:traits:size:]): (-[WebCoreTextRendererFactory fontWithFamilies:traits:size:]): 2002-12-03 David Hyatt Fix for 3112599, aol.com shopping page doesn't work. Apply the same form demotion trick to that I did already for and . r=gramps * khtml/html/dtd.cpp: (DOM::checkChild): * khtml/html/html_tableimpl.cpp: (HTMLTableRowElementImpl::addChild): * khtml/html/html_tableimpl.h: 2002-12-03 David Hyatt Fix link feedback regression on aintitcool.com. Observe the wacky feedback we give now (yes, it matches MacIE and Gecko). Gotta love this malformed page.

...

r=mjs * khtml/rendering/render_object.cpp: (RenderObject::nodeAtPoint): 2002-12-03 David Hyatt Eliminate the KONQBLOCK hack. Fixes ipodhacks.com (a mislayout caused by malformed html...

...) r=mjs * khtml/css/html4.css: * khtml/html/dtd.cpp: (DOM::checkChild): * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::isInline): * khtml/html/htmlparser.cpp: (KHTMLParser::reset): (KHTMLParser::insertNode): * khtml/html/htmlparser.h: * khtml/misc/htmltags.c: (hash_tag): (findTag): * khtml/misc/htmltags.h: * khtml/misc/htmltags.in: * khtml/rendering/render_flow.cpp: (RenderFlow::layoutBlockChildren): 2002-12-02 David Hyatt Fix for 3032557, wsj.com DHTML elements in the wrong position. This patch adds support for img.x and img.y (a Mozilla extension from NS4 days), which is used by the site to position the menus. r=kocienda on the patch. * khtml/dom/html_image.cpp: (HTMLImageElement::x): (HTMLImageElement::y): * khtml/dom/html_image.h: * khtml/ecma/kjs_html.cpp: (KJS::HTMLElement::getValueProperty): * khtml/ecma/kjs_html.h: * khtml/ecma/kjs_html.lut.h: 2002-12-02 David Hyatt Undo my changes to margin collapsing for blocks inside inlines. Although they may be correct in a strict mode, they don't work with the real-world Web. For now, I'm just backing out the code. The CSS WG hasn't decided how this should work yet anyway, so I'll just let the quirk behavior be our behavior in both modes. This fixes aintitcool.com. * khtml/rendering/render_flow.cpp: (RenderFlow::layoutBlockChildren): 2002-12-01 David Hyatt Convert the WebCore cache from LRU to size-adjusted and popularity-aware LRU (LRU-SP). With the improved cache, the size restriction on images can be relaxed back to 40K (from 16K) while retaining the same score on cvs-base. This should result in better real-world performance. * khtml/misc/loader.cpp: (CachedObject::ref): (CachedObject::setSize): (m_tail): (LRUList::~LRUList): (Cache::flush): (FastLog2): (Cache::getLRUListFor): (Cache::removeFromLRUList): (Cache::insertInLRUList): (Cache::adjustSize): * khtml/misc/loader.h: 2002-11-29 Don Melton * khtml/css/html4.css: Finally tweak headline font sizes and margins to match Gecko and CSS standard: - increase H1 font-size from 1.7em to 2em - increase H2 font-size from 1.4em to 1.5em - make H2 top and bottom margin match (bottom was strangely .87em) - increase H4 margin from 1.0em to 1.33em 2002-11-27 David Hyatt Fix DHTML on phoenix.com. Add support for window.addEventListener and window.removeEventListener. * khtml/ecma/kjs_window.cpp: (Window::get): (WindowFunc::tryCall): * khtml/ecma/kjs_window.h: * khtml/ecma/kjs_window.lut.h: 2002-11-27 Maciej Stachowiak - avoid doing any work when setting the document's link colors if there is no change. This avoids superfluous style updates and results in a 20% improvment on the JavaScript iBench. * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocument::putValue): 2002-11-27 David Hyatt Fix
and
to just behave like
rather than
. Matches behavior in other browsers. * khtml/html/html_inlineimpl.cpp: (HTMLBRElementImpl::parseAttribute): 2002-11-27 David Hyatt Numerous overflow: hidden improvements to fix espn.com. First stop absolute positioned overflow hidden elements from growing to accommodate their overflow. (Actually absolute positioned elements should never grow to do this, but fixing it for non-overflow hidden elements is hard, so later.) Second fix the render layer code to not allow background/borders of the object with overflow: hidden from being clipped. This involves an extra paint step where the object paints its background and borders prior to establishing the clip rect for the children. (This will also be necessary for overflow:auto and overflow:scroll). * ChangeLog: * khtml/rendering/render_box.cpp: (RenderBox::getClipRect): (RenderBox::calcAbsoluteVertical): * khtml/rendering/render_layer.cpp: (RenderLayer::paint): * khtml/rendering/render_object.h: 2002-11-27 David Hyatt * khtml/rendering/render_box.cpp: (RenderBox::getClipRect): (RenderBox::calcAbsoluteVertical): * khtml/rendering/render_layer.cpp: (RenderLayer::paint): 2002-11-27 David Hyatt Fix for 3105502. drop-downs wrapping to next line. * khtml/css/html4.css: 2002-11-26 David Hyatt Smarter block inside inline handling. Eliminate whitespace that is in between blocks inside inilnes. * khtml/xml/dom_textimpl.cpp: (TextImpl::attach): 2002-11-26 David Hyatt Don't let blocks inside inlines collapse with their surroundings ever. * khtml/rendering/render_flow.cpp: (RenderFlow::layoutBlockChildren): 2002-11-26 David Hyatt Fix a collapsing margin regression on aintitcool caused by my support of blocks inside inlines. A block could be wrapped by an inline, e.g.,

foo

, and in this case, you do not apply the collapsing margin quirk. The margin stays. * khtml/rendering/render_flow.cpp: (RenderFlow::layoutBlockChildren): 2002-11-26 David Hyatt Fix the font family stuff to be refcounted, so copying fonts stays cheap. Re-enabling it. Patch the render_arena code with some debugging info to help detect when memory gets trashed. Fix the background painting code to deal with negative x and y bakcground positions. Fixes the brain on brainjar.com. * khtml/css/cssstyleselector.cpp: * khtml/rendering/render_arena.cpp: (RenderArena::free): * khtml/rendering/render_box.cpp: (RenderBox::paintBackground): * kwq/KWQFont.h: * kwq/KWQFont.mm: (QFontFamily::QFontFamily): (QFontFamily::operator=): === Alexander-34 === 2002-11-26 David Hyatt Backing out support for multiple font families for now. The support is still there in QFont. I've just stopped the style selector from walking the entire value list (it will only put the first family into the font). The original change caused a 5% perf regression. I'm going to see what kinds of tricks I can pull to get some of this back before re-enabling the feature. * khtml/css/cssstyleselector.cpp: 2002-11-26 David Hyatt Fix render object removal to remerge adjacent anonymous inline boxes when an intervening block box gets removed. * khtml/rendering/render_flow.cpp: (RenderFlow::removeChild): * khtml/rendering/render_flow.h: 2002-11-25 Richard Williamson Cleanup up leaking objects in page cache. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::openURLFromPageCache): * kwq/WebCoreBridge.mm: (-[KWQPageState initWithDocument:DOM::URL:windowProperties:KJS::locationProperties:KJS::]): (-[KWQPageState dealloc]): 2002-11-25 Richard Williamson Added check for non-nil doc. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::setView): 2002-11-25 David Hyatt Fix for the DHTML on hrweb. With these changes it works except for some odd vertical spacing issues. * khtml/rendering/render_flow.cpp: (RenderFlow::addChildToFlow): (RenderFlow::makeChildrenNonInline): 2002-11-25 Richard Williamson Tweaked some debugging info. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::~DocumentImpl): (DocumentImpl::detach): 2002-11-25 Chris Blumenberg Use ^= to refer to OBJECTs with TYPEs that start with "image/". This is better than hard-coding image mime types. * khtml/css/html4.css: 2002-11-25 Chris Blumenberg Fixed: 2987001 - spurious mime-type errors from images KHTML didn't seem to have any clean support for OBJECT tags that are images. Added support for that. * khtml/css/html4.css: OBJECTs that are images should be rendered inline * khtml/html/html_objectimpl.cpp: (HTMLObjectElementImpl::attach): if the type is an image, create a render image * khtml/rendering/render_image.cpp: (RenderImage::updateFromElement): if the element is an object, use DATA for the URL * kwq/KWQDOMNode.cpp: (isImage): if it is an OBJECT element, check the type * kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]): if the element is an object, use DATA for the URL 2002-11-25 David Hyatt Fix this even further. JUst drop support for arbitrary property lookup by name on the document. Mac IE and Gecko only do this for img and form, and this makes things a lot faster. * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocument::hasProperty): (KJS::HTMLDocument::tryGet): 2002-11-25 David Hyatt Rewrite the img/form document property lookup strategy. This should be faster and actually work (gasp!). Fixes the dhtml on hrweb to at least show up. * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocument::tryGet): * khtml/html/html_miscimpl.cpp: (HTMLCollectionImpl::nextItem): 2002-11-25 David Hyatt Add support to QFont for multiple families. NOw all that's left is getting the multiple families out of the font and down into WebKit. * khtml/css/cssstyleselector.cpp: * khtml/rendering/font.cpp: (Font::update): * khtml/rendering/font.h: * khtml/xml/dom_docimpl.cpp: (DocumentImpl::recalcStyle): * kwq/KWQFont.h: * kwq/KWQFont.mm: (QFontFamily::QFontFamily): (QFontFamily::operator=): (QFontFamily::family): (QFontFamily::setFamily): (QFontFamily::operator==): (QFont::QFont): (QFont::family): (QFont::setFamily): (QFont::getNSFontWithFamily): 2002-11-25 Richard Williamson Changes for back/forward. Currently disabled. * ForwardingHeaders/kjs/property_map.h: Added. * khtml/ecma/kjs_window.cpp: (Window::hasTimeouts): (WindowQObject::hasTimeouts): * khtml/ecma/kjs_window.h: * khtml/khtmlpart_p.h: * khtml/xml/dom_docimpl.cpp: (DocumentImpl::DocumentImpl): (DocumentImpl::detach): (DocumentImpl::inPageCache): (DocumentImpl::setInPageCache): * khtml/xml/dom_docimpl.h: * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::setView): (KWQKHTMLPart::userAgent): (KWQKHTMLPart::nextKeyViewForWidget): (KWQKHTMLPart::canCachePage): (KWQKHTMLPart::saveWindowProperties): (KWQKHTMLPart::saveLocationProperties): (KWQKHTMLPart::restoreWindowProperties): (KWQKHTMLPart::restoreLocationProperties): (KWQKHTMLPart::openURLFromPageCache): * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge openURL:reload:headers:lastModified:pageCache:]): (-[WebCoreBridge saveDocumentToPageCache]): (-[WebCoreBridge canCachePage]): (attributedString): (-[KWQPageState initWithDocument:DOM::URL:windowProperties:KJS::locationProperties:KJS::]): (-[KWQPageState dealloc]): (-[KWQPageState DOM::]): (-[KWQPageState URL]): (-[KWQPageState KJS::]): 2002-11-25 David Hyatt Fix for 3025963. Ensure that KJS looks for the form on the element itself when pushing it onto the scope chain, since the may not be an ancestor of the element. * khtml/ecma/kjs_html.cpp: (getForm): (KJS::HTMLElement::pushEventHandlerScope): * khtml/html/html_elementimpl.h: 2002-11-25 David Hyatt Fix for 3020493, another fun little margin collapsing quirk that I missed. (

). The

has to pick up the quirk from the

so that the margins of the

still get collapsed away. * khtml/rendering/render_flow.cpp: (RenderFlow::layoutBlockChildren): 2002-11-25 David Hyatt Don't add in the halfleading for align=texttop. That's incorrect. * khtml/rendering/render_object.cpp: (RenderObject::getVerticalPosition): 2002-11-24 Maciej Stachowiak Fixed support for onLoad handlers on images - this is in APPLE_CHANGES because khtml used a different mechanism. Also implemented onError on images. As a result: - fixed 3084916 - blank page at aol - fixed 3093162 - golfswitch doesn't work * khtml/html/html_imageimpl.cpp: (HTMLImageElementImpl::parseAttribute): Remove "implement this" comment from onError attribute. * khtml/misc/loader.h: * khtml/misc/loader.cpp: (CachedImage::CachedImage): Initialize m_loading to true. (CachedImage::ref): Send notifyFinished to the new client if the image is not loading. (CachedImage::data): If at eof, set m_loading to false and notify. (CachedImage::error): Set m_loading to false and notify. (CachedImage::checkNotify): New method to notify all clients of changes. * khtml/rendering/render_image.cpp: (RenderImage::notifyFinished): Deliver the appropriate choice of LOAD_EVENT or ERROR_EVENT. 2002-11-24 David Hyatt This landing adds support for blocks inside inlines. It gets rid of the old broken way KHTML used to handle this and implements a brand new mechanism. With this change, I have decreased the tag priority of and to match other inlines (, , etc.), and I now allow all the inlines to contain blocks for relaxed parsing. Now if you open an or a and just leave it open across blocks, this will work. I also fixed a bad DHTML bug caused by the WebCoreBridge forceLayout method. The basic pattern is that someone does a tiny repaint of just a sliver of the window, then someone schedules a layout (which means they want a full repaint), but then drawRect comes along and calls forceLayout which unschedules the layout, thus preventing the full repaint from occurring. Any basic DHTML that used append/remove child was broken because of this pattern. For now I have just removed the unscheduleLayout call at the end of forceLayout. * khtml/html/dtd.cpp: (DOM::checkChild): * khtml/html/htmlparser.cpp: (KHTMLParser::popInlineBlocks): * khtml/rendering/render_container.cpp: (RenderContainer::removeChild): (RenderContainer::removeLeftoverAnonymousBoxes): * khtml/rendering/render_flow.cpp: (RenderFlow::setStyle): (RenderFlow::layoutBlockChildren): (RenderFlow::continuationBefore): (cloneInline): (RenderFlow::splitInlines): (RenderFlow::splitFlow): (RenderFlow::addChildWithContinuation): (RenderFlow::addChild): (RenderFlow::addChildToFlow): * khtml/rendering/render_flow.h: * khtml/rendering/render_object.cpp: (RenderObject::mouseInside): * khtml/rendering/render_object.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::forceLayout): * kwq/WebCoreBridge.mm: (-[WebCoreBridge copyRenderNode:copier:]): 2002-11-24 Chris Blumenberg Added element keys for the image ALT and link TITLE attributes. This will eventually be used to fix other bugs. Also made WebKit and WebCore use the same element keys to simplify the conversion of the element dictionary. * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]): 2002-11-24 Darin Adler * force-js-clean-timestamp: Touch for ScopeChain change. 2002-11-24 Maciej Stachowiak - fixed 3067939 - no support for window.document.lastModified * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge openURL:reload:headers:lastModified:]): Set "modified" metadata based on passed in last mdified date. 2002-11-24 Maciej Stachowiak - fixed 3081946 - bookmarklet reports the wrong "windowfull" size This isn't really beta 1 material but the fix was so tirivial I couldn't resist. * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocument::tryGet): Use contentWidth and contentHeight for document.width and document.height instead of visibleWidth for both. 2002-11-22 Darin Adler * khtml/ecma/kjs_window.cpp: Remove _COLLECTOR hack. * kwq/WebCoreJavaScript.h: * kwq/WebCoreJavaScript.mm: (+[WebCoreJavaScript rootObjectClasses]): Update for name change -- root object classes, not all live object classes. * force-js-clean-timestamp: Make sure we don't have more build problems. 2002-11-22 David Hyatt Fix for 3107658, text doubling problem caused by layers being constructed for

s. Just disallow positioning of . * khtml/rendering/render_box.cpp: (RenderBox::setStyle): * khtml/rendering/render_flow.cpp: (RenderFlow::setStyle): 2002-11-22 David Hyatt Oops. I meant to do that for and not to set to -konq-center when align="center" is specified, the style rules are no longer necessary in html4.css (and are in fact harmful). * khtml/css/html4.css: 2002-11-17 David Hyatt Fix for 3038168. Duh. Remember to be case-insensitive when checking the type of the