=== Safari-111 === 2003-10-24 Richard Williamson Fixed 3425358. Don't try to create page cache for pages that have a nil view(). Reviewed by Hyatt. * kwq/WebCoreBridge.mm: (-[WebCoreBridge saveDocumentToPageCache]): 2003-10-24 David Hyatt Fix for 3133375, the minwidth computation for pres is wrong. There were a couple of bugs here. One is that pres only should have a breakable character if they contain a newline. Otherwise they're treated essentially like nowrap. The other was that m_beginMinWidth and m_endMinWidth needed to be set to the maxwidth of the first line and the maxwidth of the last line respectively for pres instead of being only the first and last words. Reviewed by mjs * khtml/rendering/render_text.cpp: (RenderText::calcMinMaxWidth): 2003-10-24 David Hyatt Two fixes to the computation of min/max width for text runs. (1) Make sure that pre runs don't add in word-spacing to the last word on a line (e.g., when a newline explicitly breaks a pre). (2) Fix a bug where breakable characters weren't getting factored into minwidth properly. When a word got broken because of a breakable character, we were treating the breakable character like a space, and not including its width as part of the minimum width of the text run. Reviewed by john * khtml/rendering/render_text.cpp: (RenderText::calcMinMaxWidth): 2003-10-23 David Hyatt This patch fixes the pseudo-elements ::first-line and ::first-letter to inherit styles properly. More specifically it does the following: (1) Implements caching of pseudo-styles once computed off the style() which originated the pseudo-style. The old code did this, and this was a regression from my previous patch. (2) Fixes first-letter checking so that it happens at layout time rather than during render object construction time, since that makes first-letter more dynamic and causes it to be discovered in cases where it was being missed before. This fixes the front page of meyerweb.com. (3) Make first-letter inherit from first-line like it's supposed to, and also make first-line styles cross blocks and inherit properly from enclosing containers. (4) Make first-letter changes cause a detach/attach to fire just as when the display changes. I generalized the notion of needing to detach on a style change by making it a new kind of hint in dom_nodeimpl's style diff function. (5) Fixed isBlockFlow to return true for inline-blocks. Reviewed by john * khtml/rendering/render_block.cpp: (khtml::RenderBlock::addChildToFlow): (khtml::RenderBlock::layoutBlock): (khtml::RenderBlock::getFirstLineBox): (khtml::RenderBlock::firstLineBlock): (khtml::RenderBlock::updateFirstLetter): * khtml/rendering/render_block.h: (khtml::RenderBlock::isBlockFlow): * khtml/rendering/render_line.cpp: (InlineFlowBox::paintBackgroundAndBorder): * khtml/rendering/render_list.cpp: (RenderListItem::setStyle): * khtml/rendering/render_object.cpp: (RenderObject::RenderObject): (RenderObject::firstLineBlock): (RenderObject::updateFirstLetter): (RenderObject::dump): (RenderObject::setStyle): (RenderObject::recalcMinMaxWidths): (RenderObject::style): (RenderObject::getPseudoStyle): * khtml/rendering/render_object.h: (khtml::RenderObject::overhangingContents): * khtml/rendering/render_style.cpp: (pseudoBit): * khtml/rendering/render_style.h: (khtml::RenderStyle::): * khtml/rendering/render_table.cpp: (RenderTable::firstLineBlock): (RenderTable::updateFirstLetter): * khtml/rendering/render_table.h: * khtml/rendering/render_text.cpp: (RenderText::paintObject): (RenderText::htmlFont): * khtml/xml/dom_elementimpl.cpp: (ElementImpl::recalcStyle): * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::diff): * khtml/xml/dom_nodeimpl.h: (DOM::NodeImpl::): 2003-10-23 Ken Kocienda Reviewed by David Fix for these bugs: : Safari picks a different button in a form when you hit return if the first button has no name : investigate which button is activated when hitting return in form text input fields HTML spec says that buttons must have names to be considered successful. However, other browsers do not impose this constraint. Therefore, we behave differently, and can use different buttons than the author intended. * khtml/html/html_formimpl.cpp: (HTMLButtonElementImpl::isSuccessfulSubmitButton) (HTMLInputElementImpl::isSuccessfulSubmitButton) 2003-10-22 David Hyatt Fix for 3460726, the user agent string was returning nil. Fix for 3386544, empty documents did not get a layout, and so they looked white. Also fixed the positioning of widgets to account for border/padding in updateWidgetPositions. Fix for espn.com crasher, 3458143, caused by layout object not being properly cleared when layouts were unscheduled. Reviewed by darin * khtml/khtmlview.cpp: * khtml/rendering/render_canvas.cpp: (RenderCanvas::RenderCanvas): * khtml/rendering/render_replaced.cpp: (RenderWidget::updateWidgetPositions): * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::userAgent): 2003-10-22 Maciej Stachowiak Reviewed by - fixed 3460664 - Exception handlers not properly removed * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::mouseMoved): Don't return from exception block (KWQKHTMLPart::khtmlMouseReleaseEvent): Add exception blocking (whoops) 2003-10-22 John Sullivan - fixed 3460652 -- REGRESSION (100-110+): Can't tab out of a frameset page Reviewed by Darin (actually he made the change on my machine) * khtml/html/html_baseimpl.cpp: (HTMLFrameSetElementImpl::defaultEventHandler): only set defaultHandled for the one event that we actually handle (mouse event to resize frame borders); this was always being set, hence preventing key events from being used elsewhere. 2003-10-22 Richard Williamson Fixed 3454067. RenderText's repaint wasn't called because of recent changes to de-virtualize repaint. Modified getAbsoluteRepaintRect() to return containing block's getAbsoluteRepaintRect(). Also removed the long standing +1 from QFontMetrics::height(). Reviewed by Hyatt. * khtml/rendering/render_text.cpp: (RenderText::getAbsoluteRepaintRect): * khtml/rendering/render_text.h: * kwq/KWQFontMetrics.mm: (QFontMetrics::height): 2003-10-22 David Hyatt Fix visibility to be done when widgets are added or when styles are set rather than at paint time. Fixes the ads painting on top of content at tvguide.com. Reviewed by cblu * khtml/rendering/render_replaced.cpp: (RenderWidget::setQWidget): (RenderWidget::setStyle): (RenderWidget::paintObject): * kwq/KWQWidget.h: * kwq/KWQWidget.mm: (QWidget::QWidget): (QWidget::show): (QWidget::hide): 2003-10-21 Maciej Stachowiak Reviewed by Dave. Finished exception blocking changes, so now I can finally say: - fixed 3137084 - Many non-reproducible crashers in ContextImp::mark / ScopeChain::mark - fixed 3308848 - nil-deref in KHTMLView::topLevelWidget - fixed 3311511 - nil deref inside KJS::Screen - fixed 3397422 - 7B51: Safari crashed in KJS::ObjectImp::mark() - fixed 3408373 - Panther7B58 : Safari Crashed in KJS::ObjectImp::mark - fixed 3409307 - 7B55: safari crashed in KJS::Interpreter::globalExec() (idle, nothing particular going on) - fixed 3410160 - 7B60 Safari crashed in KHTMLPart::parentPart called from JS while in the background - fixed 3413224 - unrepro crash in KJS::Window::mark - fixed 3419940 - unrepro crash in KJS::Collector::allocate trying to access http://www.lindyinthepalms.com - fixed 3420123 - Panther7B66: Safari crashed while going to http://www.tangents.co.uk/index2.html - fixed 3423225 - Safari crash in vtable for KWQMapImpl (vtable for KWQMapImpl + 8). - fixed 3437190 - nil-deref on quit in calling marked() from ScopeChain::mark() * WebCore.pbproj/project.pbxproj: * kwq/KWQFontMetrics.mm: * kwq/KWQPainter.mm: (QPainter::drawPixmap): (QPainter::drawTiledPixmap): (QPainter::_updateRenderer): * kwq/WebCoreTextRenderer.h: 2003-10-21 David Hyatt http://placenamehere.com/safari/fixedbgtest.html is now fixed with a patch from the KHTML trunk. Fixed backgrounds repeated when they weren't supposed to. * khtml/rendering/render_box.cpp: (RenderBox::paintBackgroundExtended): 2003-10-21 David Hyatt Change pseudo-element style resolution to be lazy and to not occur until the style is actually asked for by the front end render objects. Also fix first-letter to inherit properly from first-line styles. Reviewed by mjs * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::initForStyleResolve): (khtml::CSSStyleSelector::styleForElement): (khtml::CSSStyleSelector::pseudoStyleForElement): (khtml::CSSStyleSelector::checkSelector): (khtml::CSSStyleSelector::checkOneSelector): * khtml/css/cssstyleselector.h: * khtml/rendering/render_block.cpp: (khtml::RenderBlock::addChildToFlow): * khtml/rendering/render_container.cpp: (RenderContainer::updatePseudoChild): * khtml/rendering/render_object.cpp: (RenderObject::setStyle): (RenderObject::createInlineBox): (RenderObject::style): (RenderObject::getPseudoStyle): * khtml/rendering/render_object.h: * khtml/rendering/render_style.cpp: (pseudoBit): (RenderStyle::hasPseudoStyle): (RenderStyle::setHasPseudoStyle): (RenderStyle::getPseudoStyle): (RenderStyle::addPseudoStyle): * khtml/rendering/render_style.h: (khtml::RenderStyle::NonInheritedFlags::operator==): (khtml::RenderStyle::setBitDefaults): * khtml/rendering/render_text.cpp: (InlineTextBox::paintSelection): (RenderText::paintObject): (RenderText::htmlFont): 2003-10-21 Maciej Stachowiak Reviewed by Dave. More exception blocking. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::~KWQKHTMLPart): (KWQKHTMLPart::generateFrameName): (KWQKHTMLPart::openURL): (KWQKHTMLPart::openURLRequest): (regExpForLabels): (KWQKHTMLPart::clearRecordedFormValues): (KWQKHTMLPart::recordFormValue): (KWQKHTMLPart::submitForm): (KHTMLPart::frameDetached): (KWQKHTMLPart::urlSelected): (KWQKHTMLPart::createPart): (KWQKHTMLPart::setTitle): (KWQKHTMLPart::setStatusBarText): (KWQKHTMLPart::scheduleClose): (KWQKHTMLPart::unfocusWindow): (KWQKHTMLPart::jumpToSelection): (KWQKHTMLPart::redirectionTimerStartedOrStopped): (KWQKHTMLPart::userAgent): (KWQKHTMLPart::mimeTypeForFileName): (KWQKHTMLPart::nextKeyView): (KWQKHTMLPart::currentEventIsMouseDownInWidget): (KWQKHTMLPart::openURLFromPageCache): (KWQKHTMLPart::saveDocumentState): (KWQKHTMLPart::restoreDocumentState): (KWQKHTMLPart::requestedURLString): (KWQKHTMLPart::incomingReferrer): (KWQKHTMLPart::runJavaScriptAlert): (KWQKHTMLPart::runJavaScriptConfirm): (KWQKHTMLPart::runJavaScriptPrompt): (KWQKHTMLPart::createEmptyDocument): (KWQKHTMLPart::keyEvent): (KWQKHTMLPart::khtmlMousePressEvent): (KWQKHTMLPart::passWidgetMouseDownEventToWidget): (KWQKHTMLPart::lastEventIsMouseUp): (findViewInSubviews): (KWQKHTMLPart::khtmlMouseMoveEvent): (KWQKHTMLPart::passSubframeEventToSubframe): (KWQKHTMLPart::buttonForCurrentEvent): (KWQKHTMLPart::stateForCurrentEvent): (KWQKHTMLPart::mouseDown): (KWQKHTMLPart::mouseDragged): (KWQKHTMLPart::mouseUp): (KWQKHTMLPart::sendFakeEventsAfterWidgetTracking): (KWQKHTMLPart::mouseMoved): (KWQKHTMLPart::sendContextMenuEvent): (fileWrapperForElement): (KWQKHTMLPart::attributedString): (KWQKHTMLPart::keyboardUIMode): 2003-10-21 Chris Blumenberg Fixed: : OBJECT tag with no or empty TYPE is mishandled Reviewed by rjw. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::createPart): call renamed frameRequiredForMIMEType:URL: * kwq/WebCoreBridge.h: renamed frameRequiredForMIMEType: to frameRequiredForMIMEType:URL: 2003-10-20 David Hyatt Fix generated content (before/after) so that it no longer has any restrictions on it. CSS2.1 lifted restrictions preventing the floating/positioning of generated content. Reviewed by rjw * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::adjustRenderStyle): * khtml/rendering/render_container.cpp: (RenderContainer::updatePseudoChild): 2003-10-20 Ken Kocienda Reviewed by David * khtml/dom/dom2_events.cpp: (UIEvent::keyCode): Change over to use ascii value for key code. (UIEvent::which): Ditto. (KeyboardEvent::KeyboardEvent): New key event class which tracks the DOM Level 3 spec more closely. (KeyboardEvent::operator = ): New function. (KeyboardEvent::~KeyboardEvent): New function. (KeyboardEvent::ctrlKey): New function. (KeyboardEvent::shiftKey): New function. (KeyboardEvent::altKey): New function. (KeyboardEvent::metaKey): New function. (KeyboardEvent::altGraphKey): New function. (KeyboardEvent::initKeyboardEvent): New function. * khtml/dom/dom2_events.h: Ditto. * khtml/html/html_formimpl.cpp: (HTMLGenericFormElementImpl::defaultEventHandler): Use key identifiers to test which key was pressed, instead of removed keyVal(). (HTMLInputElementImpl::defaultEventHandler): Ditto. (HTMLSelectElementImpl::defaultEventHandler): Ditto. * khtml/html/html_inlineimpl.cpp: (HTMLAnchorElementImpl::defaultEventHandler): Change casts to match new class name. Use key identifiers to test which key was pressed, instead of removed keyVal(). Use new modifier accessors. * khtml/xml/dom2_eventsimpl.cpp: (EventImpl::typeToId): Some reorganization of the constants in the switch statements. Name change for these to remove the KHTML_ prefix from the key up and key down events will happen soon. (EventImpl::idToType): Ditto. (KeyboardEventImpl::KeyboardEventImpl): New key event class which tracks the DOM Level 3 spec more closely. (KeyboardEventImpl::~KeyboardEventImpl): Ditto. (KeyboardEventImpl::initKeyboardEvent): Ditto. * khtml/xml/dom2_eventsimpl.h: (DOM::EventImpl::): Some reorganization of the constants in the switch statements. Name change for these to remove the KHTML_ prefix from the key up and key down events will happen soon. (DOM::KeyboardEventImpl::keyIdentifier): New function. (DOM::KeyboardEventImpl::keyLocation): New function. (DOM::KeyboardEventImpl::ctrlKey): New function. (DOM::KeyboardEventImpl::shiftKey): New function. (DOM::KeyboardEventImpl::altKey): New function. (DOM::KeyboardEventImpl::metaKey): New function. (DOM::KeyboardEventImpl::altGraphKey): New function. (DOM::KeyboardEventImpl::qKeyEvent): New function. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::createEvent): Now can create keyboard events. * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::dispatchKeyEvent): Class name changes. * kwq/KWQEvent.h: Added QString identifier member. * kwq/KWQEvent.mm: (hexDigit): Added helper. (identifierForKeyText): Added new function to map keys to DOM key identifiers as listed in the DOM spec. (QKeyEvent::identifier): Added accessor. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::stateForCurrentEvent): Added check to see if a key press is on one of the numeric keypad keys. * kwq/KWQLogging.h: Added log constant for DOM events. * kwq/KWQLogging.m: Ditto 2003-10-20 David Hyatt Make first-letter and before/after work with text transforms. Reviewed by mjs * khtml/rendering/render_block.cpp: (khtml::RenderBlock::addChildToFlow): * khtml/rendering/render_container.cpp: (RenderContainer::updatePseudoChild): * khtml/rendering/render_text.cpp: (RenderText::setStyle): (RenderText::isTextFragment): (RenderText::originalString): (RenderText::setText): (m_generatedContentStr): (m_start): (RenderTextFragment::~RenderTextFragment): (RenderTextFragment::isTextFragment): (RenderTextFragment::originalString): * khtml/rendering/render_text.h: (khtml::RenderTextFragment::start): (khtml::RenderTextFragment::end): (khtml::RenderTextFragment::contentString): * khtml/xml/dom_nodeimpl.h: (DOM::NodeImpl::setRenderer): 2003-10-19 David Hyatt Remove the "flow-around-floats" hack for lists. Other browsers don't do this. Reviewed by darin * khtml/css/quirks.css: 2003-10-19 David Hyatt Fix for a regression/crash on tivocommunity.com caused by faulty border-collapse code in the collapsedRightBorder case. I forgot to deal with colspans. Reviewed by darin * khtml/rendering/render_table.cpp: (RenderTable::cellRight): (RenderTableCell::collapsedRightBorder): 2003-10-19 David Hyatt Patch from KHTML trunk that makes textareas work properly even when they have no render objects. * khtml/html/html_formimpl.cpp: (HTMLTextAreaElementImpl::encoding): (HTMLTextAreaElementImpl::value): 2003-10-18 Darin Adler Reviewed by Maciej. - fixed 3454444 -- contents of mailto form shows up in Mail title instead of body (IE sends mail directly) * kwq/KWQKURL.mm: (KURL::parse): Changed non-hierarchical code to consider everything after a question mark as a query, just the way the hierarchical code does. This makes the code that constructs the mailto URL work properly. 2003-10-18 David Hyatt Fix the intrinsic minmax width computation for blocks and XUL boxes to actually check fixed min/max CSS widths. Reviewed by darin * khtml/rendering/render_block.cpp: (khtml::RenderBlock::calcMinMaxWidth): * khtml/rendering/render_flexbox.cpp: (khtml::RenderFlexibleBox::calcMinMaxWidth): 2003-10-18 David Hyatt Change the names of the border-spacing properties to border-horizontal-spacing and border-vertical-spacing. * khtml/css/cssparser.cpp: (CSSParser::parseValue): * khtml/css/cssproperties.c: (findProp): * khtml/css/cssproperties.h: * khtml/css/cssproperties.in: * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::applyRule): 2003-10-18 David Hyatt Fix for diveintomark className parsing bug. class="bigblue blue" would fail to match a rule with .blue. The bug was in the selector matching code for class attributes. Also fixing a minmax width bug for blocks on the mozilla.org Web site. XUL boxes had the same bug as well. Reviewed by darin * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): * khtml/rendering/render_block.cpp: (khtml::RenderBlock::calcMinMaxWidth): * khtml/rendering/render_flexbox.cpp: (khtml::RenderFlexibleBox::calcMinMaxWidth): 2003-10-18 David Hyatt Fix for 3443502, generated content sometimes doesn't generate. The bug is caused by an uninitialized variable. m_isContinuation needed to be set to false in the RenderInline constructor. * khtml/rendering/render_inline.cpp: (m_isContinuation): 2003-10-17 Darin Adler Reviewed by Maciej. - make text areas set the base writing direction based on the direction in the CSS style * kwq/KWQTextArea.h: Added setBaseWritingDirection method. * kwq/KWQTextArea.mm: (-[KWQTextArea _createTextView]): Use _KWQ_setTypingParagraphStyle. (-[KWQTextArea setWordWrap:]): Use _KWQ_setTypingParagraphStyle. (-[KWQTextArea setBaseWritingDirection:]): Added. New method that sets the base writing direction in both the style of the text and the typing attributes. (-[NSTextView _KWQ_typingParagraphStyle]): Added. Helper method to make setBaseWritingDirection: a little less gigantic. (-[NSTextView _KWQ_setTypingParagraphStyle:]): Ditto. (-[NSTextStorage _KWQ_setBaseWritingDirection:]): Ditto. * kwq/KWQTextEdit.mm: (QTextEdit::setAlignment): Set both alignment and base writing direction. 2003-10-17 David Hyatt Implement horizontal and vertical border-spacing. Allow them to be specified individually. Reviewed by mjs ------ Fix the calcWidth method of tables to account for horizontal margins properly. Reviewed by john ------ Implement border collapsing in tables. Reviewed by kocienda * khtml/css/cssparser.cpp: (CSSParser::parseValue): * khtml/css/cssproperties.c: (hash_prop): (findProp): * khtml/css/cssproperties.h: * khtml/css/cssproperties.in: * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::applyRule): * khtml/css/cssvalues.c: * khtml/css/cssvalues.h: * khtml/css/cssvalues.in: * khtml/rendering/bidi.cpp: (khtml::RenderBlock::layoutInlineChildren): * khtml/rendering/render_box.cpp: (RenderBox::paintBoxDecorations): * khtml/rendering/render_form.cpp: (RenderFieldset::paintBorderMinusLegend): * khtml/rendering/render_object.cpp: (RenderObject::paintBorder): (RenderObject::collectBorders): * khtml/rendering/render_object.h: * khtml/rendering/render_style.cpp: (StyleInheritedData::StyleInheritedData): (StyleInheritedData::operator==): (RenderStyle::diff): * khtml/rendering/render_style.h: (khtml::): (khtml::CollapsedBorderValue::precedence): (khtml::CollapsedBorderValue::width): (khtml::CollapsedBorderValue::style): (khtml::CollapsedBorderValue::exists): (khtml::CollapsedBorderValue::color): (khtml::CollapsedBorderValue::isTransparent): (khtml::CollapsedBorderValue::operator==): (khtml::RenderStyle::borderLeft): (khtml::RenderStyle::borderRight): (khtml::RenderStyle::borderTop): (khtml::RenderStyle::borderBottom): (khtml::RenderStyle::horizontalBorderSpacing): (khtml::RenderStyle::verticalBorderSpacing): (khtml::RenderStyle::setHorizontalBorderSpacing): (khtml::RenderStyle::setVerticalBorderSpacing): * khtml/rendering/render_table.cpp: (RenderTable::RenderTable): (RenderTable::setStyle): (RenderTable::calcWidth): (RenderTable::paint): (RenderTable::borderLeft): (RenderTable::borderRight): (RenderTable::borderTop): (RenderTable::borderBottom): (RenderTable::cellAbove): (RenderTable::cellBelow): (RenderTable::cellLeft): (RenderTable::cellRight): (RenderTableSection::setCellWidths): (RenderTableSection::calcRowHeight): (RenderTableSection::layoutRows): (compareBorders): (RenderTableCell::collapsedLeftBorder): (RenderTableCell::collapsedRightBorder): (RenderTableCell::collapsedTopBorder): (RenderTableCell::collapsedBottomBorder): (RenderTableCell::borderLeft): (RenderTableCell::borderRight): (RenderTableCell::borderTop): (RenderTableCell::borderBottom): (collapsedBorderStyle): (CollapsedBorder::CollapsedBorder): (CollapsedBorders:::count): (CollapsedBorders::addBorder): (CollapsedBorders::nextBorder): (addBorderStyle): (RenderTableCell::collectBorders): (RenderTableCell::paintCollapsedBorder): (RenderTableCell::paintObject): (RenderTableCell::paintBoxDecorations): * khtml/rendering/render_table.h: (khtml::RenderTable::hBorderSpacing): (khtml::RenderTable::vBorderSpacing): (khtml::RenderTable::bordersPaddingAndSpacing): (khtml::RenderTable::currentBorderStyle): * khtml/rendering/table_layout.cpp: (FixedTableLayout::layout): (AutoTableLayout::calcEffectiveWidth): (AutoTableLayout::layout): 2003-10-16 Maciej Stachowiak Reviewed by John. More exception blocking. * kwq/KWQFont.mm: (QFont::isFixedPitch): (QFont::getNSFont): * kwq/KWQKJobClasses.mm: (KIO::TransferJob::~TransferJob): * kwq/KWQLoader.mm: (KWQServeRequest): (KWQCheckIfReloading): (KWQCheckCacheObjectStatus): (KWQRetainResponse): (KWQReleaseResponse): (KWQResponseMIMEType): === Safari-110 === 2003-10-16 Darin Adler Reviewed by vicki. - fix buildit build failure * kwq/KWQScrollView.mm: (QScrollView::resizeContents): 2003-10-15 Darin Adler Reviewed by Ken. - change "volatile X * volatile" to "X * volatile" in cases where the pointer needs to be volatile but the object pointed to do does not * kwq/KWQKConfigBase.mm: (KConfig::readEntry): * kwq/KWQKCursor.mm: (+[NSCursor _WebCore_cursorWithName:hotSpot:]): * kwq/KWQKLocale.mm: (inputElementAltText): (resetButtonDefaultLabel): (searchableIndexIntroduction): (submitButtonDefaultLabel): (KLocale::language): * kwq/KWQLineEdit.mm: (QLineEdit::text): * kwq/KWQScrollView.mm: (QScrollView::setContentsPos): (QScrollView::addChild): (QScrollView::updateContents): (QScrollView::contentsToViewport): (QScrollView::viewportToContents): (QScrollView::getDocumentView): * kwq/KWQTextEdit.mm: (QTextEdit::text): (QTextEdit::textWithHardLineBreaks): * kwq/KWQWidget.mm: (QWidget::getOuterView): Removed the excess volatiles and excess casts that go with them. * kwq/KWQKCookieJar.mm: (KWQKCookieJar::cookie): Do the same, but also remove an unnecessary nil check that is the same as QString::fromNSString's default behavior. 2003-10-15 Maciej Stachowiak Reviewed by Dave. More objc-exception-blocking excitement. * kwq/KWQKConfigBase.mm: (KConfig::readEntry): (KConfig::readNumEntry): (RefreshPlugins): * kwq/KWQKCursor.mm: (+[NSCursor _WebCore_cursorWithName:hotSpot:]): * kwq/KWQKJavaAppletWidget.mm: (KJavaAppletWidget::showApplet): * kwq/KWQKLocale.mm: (inputElementAltText): (resetButtonDefaultLabel): (searchableIndexIntroduction): (submitButtonDefaultLabel): (KLocale::language): * kwq/KWQRegion.mm: (QRegion::QRegion): 2003-10-14 David Hyatt Fix an obvious little typo with smallCaps inheritance. Richard reviewed. Also merge in Dirk's patch to fix a crasher caused by an obvious deref mistake. Reviewed by rjw and nobody * khtml/css/cssstyleselector.cpp: (khtml::convertToLength): (khtml::CSSStyleSelector::applyRule): 2003-10-14 Ken Kocienda Reviewed by Hyatt * khtml/dom/dom_misc.h: Declared TristateFlag enum used to implement inheritance behavior for inheritable attributes like designMode. * khtml/dom/html_document.cpp: (HTMLDocument::designMode): Added getter. (HTMLDocument::setDesignMode): Added setter. * khtml/dom/html_document.h: Added declarations for designMode getter and setter. * khtml/dom/html_element.cpp: (HTMLElement::isContentEditable): Added convenience. (HTMLElement::contentEditable): Added getter. (HTMLElement::setContentEditable): Added setter. * khtml/dom/html_element.h: Added declarations for contentEditable accessors. * khtml/ecma/kjs_html.cpp: Added js support for contentEditable and designMode. (KJS::HTMLDocument::tryGet) (KJS::HTMLDocument::putValue) (KJS::HTMLElement::getValueProperty) (KJS::HTMLElement::putValue) * khtml/ecma/kjs_html.h: (KJS::HTMLDocument::): Added DesignMode to attribuute enum. (KJS::HTMLElement::): Added ContentEditable to attribute enum. * khtml/html/html_documentimpl.cpp: (HTMLDocumentImpl::designMode): Added getter. (HTMLDocumentImpl::setDesignMode): Added setter. * khtml/html/html_documentimpl.h: Declared designMode accessors. * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::HTMLElementImpl): (HTMLElementImpl::parseAttribute): Added support for contentEditable. (HTMLElementImpl::isContentEditable): Added. Implements inheritance feature for this attribute. (HTMLElementImpl::contentEditable): Getter for contentEditable attribute. (HTMLElementImpl::setContentEditable): Setter for contentEditable attribute. * khtml/html/html_elementimpl.h: * khtml/khtml_part.cpp: (KHTMLPart::setEditMode): Added. (KHTMLPart::editMode): Added. Implements inheritance behavior for attribute. (KHTMLPart::inEditMode): Helper that calls on editMode function. (KHTMLPart::parentPart): Made const. * khtml/khtml_part.h: Rolled in a couple of typo fixes. Added declarations for the changes made in the implementation file. * khtml/khtmlpart_p.h: (KHTMLPartPrivate::KHTMLPartPrivate): Declared editMode flag. Also added support for editMode flag in initializers and copy function. * khtml/misc/htmlattrs.in: Added contentEditable as an attribute name. 2003-10-13 David Hyatt Fix for a small-caps rendering error when used in conjunction with ::first-line. Always update the Font variable even when QFonts are the same, since small-caps is not stored in QFonts. Reviewed by rjw * khtml/rendering/render_text.cpp: (RenderText::paintObject): 2003-10-13 Richard Williamson (Home0 Updated layout tests actuals to reflect implementation of small-caps style. * layout-tests/css1/font_properties/font-expected.txt: * layout-tests/css1/font_properties/font_variant-expected.txt: * layout-tests/css1/pseudo/firstline-expected.txt: * layout-tests/css1/pseudo/multiple_pseudo_elements-expected.txt: 2003-10-13 Richard Williamson Added support for small-caps. Reviewed by John. * khtml/rendering/font.h: (khtml::Font::isSmallCaps): * khtml/rendering/render_text.cpp: (RenderText::shouldUseMonospaceCache): 2003-10-12 Darin Adler * layout-tests/fast/js/date-parse-test.html: Fixed a couple of silly mistakes. * kwq/character-sets.txt: New version of file from www.iana.org. No substantive change. Also, now that we don't use MIB numbers any more, I could leave out our one local change, the MIB number we added for ISO-10646-J-1. 2003-10-10 David Hyatt Beginning of work on border collapsing. This patch makes sure that cell spacing between cells is ignored and that padding on tables is ignored. This ensures that there is no space between cells or between the edges of cells and the border of the table itself. Reviewed by john * khtml/rendering/render_style.h: (khtml::RenderStyle::setBitDefaults): * khtml/rendering/render_table.cpp: (RenderTable::setStyle): (RenderTable::layout): * khtml/rendering/render_table.h: (khtml::RenderTable::collapseBorders): (khtml::RenderTable::bordersPaddingAndSpacing): 2003-10-10 David Hyatt Fix for table regression 3449444, as well as a patch to support padding on tables and to stop honoring borders on row groups (both of which are correct for the "separate" border model). * khtml/rendering/render_table.cpp: (RenderTable::layout): (RenderTableSection::calcRowHeight): (RenderTableSection::layoutRows): * khtml/rendering/render_table.h: (khtml::RenderTable::bordersPaddingAndSpacing): * khtml/rendering/table_layout.cpp: (FixedTableLayout::calcMinMaxWidth): (FixedTableLayout::layout): (AutoTableLayout::calcMinMaxWidth): (AutoTableLayout::layout): Reviewed by darin 2003-10-10 David Hyatt Patch to move the widgets during layout instead of at paint time. Reviewed by darin * khtml/khtmlview.cpp: * khtml/rendering/render_canvas.cpp: (RenderCanvas::repaintViewRectangle): * khtml/rendering/render_form.cpp: (RenderFormElement::baselinePosition): (RenderFormElement::layout): * khtml/rendering/render_object.cpp: (RenderObject::updateWidgetPositions): * khtml/rendering/render_object.h: * khtml/rendering/render_replaced.cpp: (RenderWidget::layout): (RenderWidget::updateWidgetPositions): * khtml/rendering/render_replaced.h: * kwq/KWQCheckBox.h: * kwq/KWQCheckBox.mm: (QCheckBox::baselinePosition): * kwq/KWQComboBox.h: * kwq/KWQComboBox.mm: (QComboBox::baselinePosition): * kwq/KWQFileButton.h: * kwq/KWQFileButton.mm: (KWQFileButton::baselinePosition): * kwq/KWQLineEdit.h: * kwq/KWQLineEdit.mm: (QLineEdit::baselinePosition): * kwq/KWQPushButton.h: * kwq/KWQPushButton.mm: (QPushButton::baselinePosition): * kwq/KWQRadioButton.h: * kwq/KWQRadioButton.mm: (QRadioButton::baselinePosition): * kwq/KWQWidget.h: * kwq/KWQWidget.mm: (QWidget::baselinePosition): (QWidget::setFrameGeometry): * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: 2003-10-10 David Hyatt Make sure the i-beam cursor is only forced if you have a selection. Reviewed by John * khtml/khtmlview.cpp 2003-10-10 Ken Kocienda Reviewed by John Fix for this bug: : Textarea form controls do not respect disabled attribute * khtml/rendering/render_form.cpp: (RenderTextArea::updateFromElement): Check for disabled attribute. * kwq/KWQTextArea.h: * kwq/KWQTextArea.mm: (-[KWQTextArea setEnabled:]): Added. (-[KWQTextArea isEnabled]): Added. (-[KWQTextArea drawRect:]): Draws a disabled-looking bezel when disabled. (-[KWQTextAreaTextView becomeFirstResponder]): Return NO if disabled. (-[KWQTextAreaTextView mouseDown:]): Block events if disabled. (-[KWQTextAreaTextView keyDown:]): Ditto. (-[KWQTextAreaTextView keyUp:]): Ditto. (-[KWQTextAreaTextView setEnabled:]): Added. Pass value through to editable attribute on text view. (-[KWQTextAreaTextView isEnabled]): Added. (-[KWQTextAreaTextView drawRect:]): Set the text color to a disabled color when disabled. * kwq/KWQTextEdit.h: * kwq/KWQTextEdit.mm: (QTextEdit::isDisabled): Added. (QTextEdit::setDisabled): Added. 2003-10-10 Maciej Stachowiak - fixed 3449405 - REGRESSION: reproducible crash changing focus w/ button on page, e.g. on www.aa.com More fallout from the exception blocking. * kwq/KWQButton.mm: (QButton::focusPolicy): Don't return from exception block (caught by Darin). 2003-10-09 Darin Adler Reviewed by Maciej. - fixed 3449280 -- REGRESSION: crash copying a selection that ends in a
* khtml/rendering/render_br.h: Add checkSelectionPointIgnoringContinuations. * khtml/rendering/render_br.cpp: (RenderBR::checkSelectionPointIgnoringContinuations): Override to never return an offset of 1. We can't use a character offset because the DOM doesn't know that we're implemented as a text object. So an offset of 1 turns into "after this element". 2003-10-09 Maciej Stachowiak - fixed crash I just added. * kwq/KWQWidget.mm: (QWidget::setCursor): Move BLOCK_NS_EXCEPTIONS macros so you don't `break' out of the blocking code. 2003-10-09 Maciej Stachowiak Reviewed by Ken. More Cocoa exception blocking work. * kwq/KWQFrame.mm: (QFrame::setFrameStyle): * kwq/KWQLineEdit.mm: (QLineEdit::QLineEdit): (QLineEdit::~QLineEdit): (QLineEdit::setEchoMode): (QLineEdit::setFont): (QLineEdit::setText): (QLineEdit::text): (QLineEdit::isReadOnly): (QLineEdit::setReadOnly): (QLineEdit::maxLength): (QLineEdit::selectAll): (QLineEdit::edited): (QLineEdit::setEdited): (QLineEdit::sizeForCharacterWidth): (QLineEdit::baselinePosition): (QLineEdit::setAlignment): * kwq/KWQListBox.mm: (QListBox::QListBox): (QListBox::~QListBox): (QListBox::count): (QListBox::clear): (QListBox::setSelectionMode): (QListBox::insertItem): (QListBox::insertGroupLabel): (QListBox::endBatchInsert): (QListBox::setSelected): (QListBox::isSelected): (QListBox::setEnabled): (QListBox::sizeForNumberOfLines): (QListBox::focusPolicy): * kwq/KWQPushButton.mm: (QPushButton::QPushButton): (QPushButton::sizeHint): (QPushButton::baselinePosition): (QPushButton::dimensions): * kwq/KWQRadioButton.mm: (QRadioButton::QRadioButton): (QRadioButton::setChecked): (QRadioButton::isChecked): (QRadioButton::dimensions): * kwq/KWQScrollBar.mm: (-[KWQScrollBar initWithQScrollBar:]): (:m_valueChanged): (QScrollBar::~QScrollBar): (QScrollBar::setValue): (QScrollBar::setKnobProportion): (QScrollBar::scrollbarHit): * kwq/KWQScrollView.mm: (QScrollView::visibleWidth): (QScrollView::visibleHeight): (QScrollView::contentsWidth): (QScrollView::contentsHeight): (QScrollView::contentsX): (QScrollView::contentsY): (QScrollView::setContentsPos): (QScrollView::setVScrollBarMode): (QScrollView::setHScrollBarMode): (QScrollView::setScrollBarsMode): (QScrollView::vScrollBarMode): (QScrollView::hScrollBarMode): (QScrollView::hasVerticalScrollBar): (QScrollView::hasHorizontalScrollBar): (QScrollView::suppressScrollBars): (QScrollView::addChild): (QScrollView::removeChild): (QScrollView::resizeContents): (QScrollView::updateContents): (QScrollView::contentsToViewport): (QScrollView::viewportToContents): (QScrollView::setStaticBackground): (QScrollView::ensureVisible): (QScrollView::getDocumentView): * kwq/KWQTextEdit.mm: (QTextEdit::QTextEdit): (QTextEdit::setText): (QTextEdit::text): (QTextEdit::textWithHardLineBreaks): (QTextEdit::getCursorPosition): (QTextEdit::setCursorPosition): (QTextEdit::wordWrap): (QTextEdit::setWordWrap): (QTextEdit::isReadOnly): (QTextEdit::setReadOnly): (QTextEdit::selectAll): (QTextEdit::setFont): (QTextEdit::setAlignment): (QTextEdit::sizeWithColumnsAndRows): * kwq/KWQWidget.mm: (QWidget::QWidget): (QWidget::~QWidget): (QWidget::setActiveWindow): (QWidget::setEnabled): (QWidget::isEnabled): (QWidget::frameGeometry): (QWidget::hasFocus): (QWidget::setFocus): (QWidget::focusPolicy): (QWidget::isVisible): (QWidget::setCursor): (QWidget::cursor): (QWidget::setFrameGeometry): (QWidget::mapFromGlobal): (QWidget::setView): (QWidget::getOuterView): (QWidget::lockDrawingFocus): (QWidget::unlockDrawingFocus): (QWidget::disableFlushDrawing): (QWidget::enableFlushDrawing): (QWidget::setDrawingAlpha): (QWidget::paint): (QWidget::sendConsumedMouseUp): 2003-10-09 David Hyatt Stop printing extra spaces before list items. Fixes ordered lists with list-style-position: inside. Reviewed by mjs * khtml/rendering/render_list.cpp: 2003-10-09 David Hyatt Make definition of kMin and kMax match the KHTML trunk. Someone still needs to eliminate uses of QMIN and QMAX from the code. * kwq/KWQDef.h: (kMin): (kMax): 2003-10-09 Chris Blumenberg Fixed: : should support navigator.plugins.refresh as a way to add a plugin without restarting Safari Reviewed by rjw. * khtml/ecma/kjs_navigator.cpp: (PluginBase::refresh): new (PluginsFunc::tryCall): call refresh * kwq/KWQKConfigBase.h: * kwq/KWQKConfigBase.mm: (RefreshPlugins): new * kwq/WebCoreViewFactory.h: === Safari-109 === 2003-10-08 David Hyatt Fix for 3436723, the shrink-to-fit algorithm for positioned elements did not match the algorithm specified in section 10.3.7 of the CSS2.1 specification. The min-width of the element was not being taken into account like it should have been. Reviewed by mjs * khtml/rendering/render_box.cpp: (RenderBox::calcAbsoluteHorizontal): 2003-10-08 David Hyatt Implement min/max width and min/max height support for replaced elements. Reviewed by ken * khtml/rendering/render_box.cpp: (RenderBox::calcReplacedWidth): (RenderBox::calcReplacedWidthUsing): (RenderBox::calcReplacedHeight): (RenderBox::calcReplacedHeightUsing): (RenderBox::availableHeight): (RenderBox::availableHeightUsing): * khtml/rendering/render_box.h: 2003-10-08 Maciej Stachowiak Fix development build. * kwq/KWQExceptions.h: Correct assertion args. 2003-10-08 Maciej Stachowiak Reviewed by Ken. Start on blocking Cocoa exceptions when calling ObjC from C++ to avoid unreproducible crashes when this happens. * kwq/KWQExceptions.h: Added. Helper macros for exception blocking. * WebCore.pbproj/project.pbxproj: Add new header In all these files, block exceptions when calling ObjC from C++, or explain why not. * kwq/KWQAccObjectCache.mm: * kwq/KWQApplication.mm: * kwq/KWQButton.mm: (QButton::QButton): (QButton::~QButton): (QButton::setText): (QButton::text): (QButton::clicked): (QButton::simulateClick): (QButton::setFont): (QButton::focusPolicy): * kwq/KWQCheckBox.mm: (QCheckBox::QCheckBox): (QCheckBox::setChecked): (QCheckBox::isChecked): (QCheckBox::dimensions): * kwq/KWQColor.mm: * kwq/KWQComboBox.mm: (QComboBox::QComboBox): (QComboBox::~QComboBox): (QComboBox::insertItem): (QComboBox::sizeHint): (QComboBox::setCurrentItem): (QComboBox::updateCurrentItem): (QComboBox::setFont): (QComboBox::dimensions): * kwq/KWQCursor.mm: * kwq/KWQFile.mm: * kwq/KWQFileButton.mm: (KWQFileButton::KWQFileButton): (KWQFileButton::~KWQFileButton): (KWQFileButton::setFilename): (KWQFileButton::sizeForCharacterWidth): (KWQFileButton::frameGeometry): (KWQFileButton::setFrameGeometry): (KWQFileButton::baselinePosition): (KWQFileButton::filenameChanged): * kwq/KWQKCookieJar.mm: (KWQKCookieJar::cookie): (KWQKCookieJar::setCookie): (KWQKCookieJar::cookieEnabled): * kwq/KWQKHTMLPartBrowserExtension.mm: (KHTMLPartBrowserExtension::createNewWindow): (KHTMLPartBrowserExtension::setIconURL): (KHTMLPartBrowserExtension::setTypedIconURL): * kwq/KWQKHistoryProvider.mm: (KParts::HistoryProvider::contains): * kwq/KWQKPartsBrowserInterface.mm: (KParts::BrowserInterface::callMethod): * kwq/KWQKStandardDirs.mm: * kwq/KWQKURL.mm: * kwq/KWQKWinModule.mm: (KWinModule::workArea): * kwq/KWQObject.mm: * kwq/KWQString.mm: (QString::getNSString): * kwq/KWQTimer.mm: * kwq/KWQWindowWidget.mm: 2003-10-07 David Hyatt Fix for link dragging regression in the titles of links. More accessibility improvements. Reviewed by darin * khtml/khtml_part.cpp: (KHTMLPart::text): * kwq/KWQAccObject.mm: (-[KWQAccObject role]): (-[KWQAccObject roleDescription]): (-[KWQAccObject helpText]): (-[KWQAccObject textUnderElement]): (-[KWQAccObject value]): (-[KWQAccObject title]): (-[KWQAccObject accessibilityIsIgnored]): (-[KWQAccObject accessibilityAttributeValue:]): * kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]): 2003-10-07 Ken Kocienda Reviewed by Darin Fix for these bugs: : REGRESSION: pop-up menu gets focus, but once it has focus doesn't work right : Select widgets that use list views do not take part in tab order : Text area form widgets do not accept DOM focus correctly : Using keyboard to work popup button select form widget causes a crash The intention of this patch is to add keyboard navigation support for HTML form select widgets. This includes the two visual representations for these widgets: popup buttons and lists. Many keyboard, focus, and tabbing fixes are included in this work, as indicated below. * khtml/html/html_formimpl.cpp: (HTMLSelectElementImpl::defaultEventHandler): Added. Submit form when return or enter key is pressed when focused on a select widget. * khtml/html/html_formimpl.h: Make HTMLSelectElementImpl a friend class of HTMLInputElementImpl. This is done so that an HTMLSelectElementImpl can call the private method which simulates a form submit. Also add declaration of defaultEventHandler function. * kwq/KWQButton.h: Clean up focusPolicy declaration. * kwq/KWQComboBox.h: Add focusPolicy declaration. * kwq/KWQComboBox.mm: (QComboBox::focusPolicy): Added. Widget will focus if full keyboard access is on. (-[KWQPopUpButtonCell trackMouse:inRect:ofView:untilMouseUp:]): Now calls sendFakeEventsAfterWidgetTracking instead of doFakeMouseUpAfterWidgetTracking now that name has changed. (-[KWQPopUpButton becomeFirstResponder]): Added. Needed for setting focus correctly. (-[KWQPopUpButton resignFirstResponder]): Ditto. (-[KWQPopUpButton nextKeyView]): Added. Makes tabbing work correctly for this widget. (-[KWQPopUpButton previousKeyView]): Ditto. (-[KWQPopUpButton nextValidKeyView]): Ditto. (-[KWQPopUpButton previousValidKeyView]): Ditto. * kwq/KWQKHTMLPart.h: Change name of doFakeMouseUpAfterWidgetTracking to sendFakeEventsAfterWidgetTracking now that it handles key events as well. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::sendFakeEventsAfterWidgetTracking): Name change as noted above. Also handles sending simulated key up events. * kwq/KWQLineEdit.h: (QLineEdit::checksDescendantsForFocus): Added. This is a big part of the fiz for . * kwq/KWQListBox.h: (QListBox::checksDescendantsForFocus): Ditto. Yes for this widget. * kwq/KWQListBox.mm: (QListBox::focusPolicy): Added. Widget will focus if full keyboard access is on. (-[KWQListBoxScrollView becomeFirstResponder]): Added. Needed for setting focus correctly. This sets the focus to its document view. (-[KWQTableView becomeFirstResponder]): Added. Needed for setting focus correctly. (-[KWQTableView resignFirstResponder]): Added. Needed for setting focus correctly. (-[KWQTableView nextKeyView]): Added. Makes tabbing work correctly for this widget. (-[KWQTableView previousKeyView]): Ditto. (-[KWQTableView nextValidKeyView]): Ditto. (-[KWQTableView previousValidKeyView]): Ditto. (-[KWQTableView _KWQ_setKeyboardFocusRingNeedsDisplay]): Added. * kwq/KWQTextArea.mm: (-[KWQTextAreaTextView becomeFirstResponder]): Other part of fix for . The recursion guards were bad and wrong. The checksDescendantsForFocus improvement prevents the erroneous recursion from happening. * kwq/KWQTextEdit.h: (QTextEdit::checksDescendantsForFocus): Added. Yes for this widget. * kwq/KWQWidget.h: (QWidget::checksDescendantsForFocus): Added. No by default. * kwq/KWQWidget.mm: (QWidget::hasFocus): Now uses checksDescendantsForFocus to perform proper checks for views that may have a subview which is first responder. 2003-10-07 David Hyatt Fix for 3363421, event handlers could be triggered for content outside an overflow:hidden area. The layer checks that test for intersection/point containment need to only include layers with overhanging floats if the element is overflow:visible. Fix for 3366801, assignment to scrollLeft/Top of an overflow:hidden layer makes the layer disappear. overflow:hidden blocks actually were never computing their scroll dimensions, and so had bogus answers for those values. Fix for 3366686, no reliable scrollHeight/Width reporting for overflow:hidden or overflow:visible elements. The former was caused by the same bug as 3366801. The latter was just me using the wrong method (clientWidth/Height instead of overflowWidth/Height). This patch also tightens the assignment to scrollLeft/Top to not do anything if you don't have an overflow value other than visible. Reviewed by darin * khtml/ecma/kjs_dom.cpp: (DOMNode::putValue): * khtml/rendering/render_block.cpp: (khtml::RenderBlock::layoutBlock): * khtml/rendering/render_flexbox.cpp: (khtml::RenderFlexibleBox::layoutBlock): * khtml/rendering/render_layer.cpp: (RenderLayer::RenderLayer): (RenderLayer::scrollToOffset): (RenderLayer::scrollWidth): (RenderLayer::scrollHeight): (RenderLayer::computeScrollDimensions): (RenderLayer::updateScrollInfoAfterLayout): (RenderLayer::intersectsDamageRect): (RenderLayer::containsPoint): * khtml/rendering/render_layer.h: * khtml/rendering/render_object.cpp: (RenderObject::scrollWidth): (RenderObject::scrollHeight): * khtml/rendering/render_object.h: 2003-10-07 Darin Adler Reviewed by Chris. - fixed some exceptions I was seeing with my recent text change * khtml/khtml_part.cpp: (KHTMLPart::text): Return an empty string for a null range rather than raising an exception. (KHTMLPart::selection): Return a null range rather than raising an exception if there is no selection. 2003-10-07 Darin Adler Reviewed by Dave. - removed code that mutates \n into a space so we can pass more W3C DOM Level 1 Core tests * khtml/rendering/bidi.cpp: (khtml::addRun): Treat \n as a space. (khtml::RenderBlock::computeHorizontalPositionsForLine): Treat \n as a space. (khtml::RenderBlock::findNextLineBreak): Treat \n outside
 as a space.
        Removed code that mutates the \n into a space.

        * khtml/rendering/render_text.cpp:
        (RenderText::trimmedMinMaxWidth): Treat \n outside 
 as a space.
        (RenderText::calcMinMaxWidth): Treat \n outside 
 as a space.
        Removed code that mutates the \n into a space.
        (RenderText::position): Detect a 
with isBR instead of assuming a 1-character string with a \n in it is a
. 2003-10-06 David Hyatt Several fixes preparing for the incremental repainting patch to be enabled. (1) Make layers update their positions after layout instead of during layout or during painting. (2) Fix a regression from the overflow:hidden body quirk landing. Make sure repaint() understands that quirk exists and avoids clipping when it shouldn't. (3) Fix a regression from the scrollbar improvements. The vertical scrollbar repainted on every layout. (4) Make sure outside list bullets are repainted when a list item needs to repaint. (5) A whole bunch of INCREMENTAL_REPAINTING code that isn't turned on yet. Reviewed by kocienda * khtml/khtmlview.cpp: (KHTMLViewPrivate::KHTMLViewPrivate): (KHTMLViewPrivate::reset): (KHTMLView::resetScrollBars): (KHTMLView::needsFullRepaint): * khtml/khtmlview.h: * khtml/rendering/bidi.cpp: (khtml::RenderBlock::layoutInlineChildren): * khtml/rendering/render_block.cpp: (khtml::RenderBlock::layoutBlock): (khtml::RenderBlock::layoutBlockChildren): (khtml::RenderBlock::getAbsoluteRepaintRectIncludingFloats): (khtml::RenderBlock::repaintFloatingDescendants): (khtml::RenderBlock::repaintObjectsBeforeLayout): * khtml/rendering/render_block.h: * khtml/rendering/render_box.cpp: (RenderBox::computeAbsoluteRepaintRect): (RenderBox::repaintDuringLayoutIfMoved): * khtml/rendering/render_box.h: * khtml/rendering/render_canvas.cpp: (RenderCanvas::layout): * khtml/rendering/render_canvas.h: (khtml::RenderCanvas::hasOverhangingFloats): * khtml/rendering/render_flexbox.cpp: (khtml::RenderFlexibleBox::layoutBlock): (khtml::RenderFlexibleBox::layoutHorizontalBox): (khtml::RenderFlexibleBox::layoutVerticalBox): (khtml::RenderFlexibleBox::placeChild): * khtml/rendering/render_flexbox.h: * khtml/rendering/render_flow.cpp: (RenderFlow::getAbsoluteRepaintRect): * khtml/rendering/render_image.cpp: (RenderImage::setPixmap): (RenderImage::layout): * khtml/rendering/render_layer.cpp: (RenderLayer::RenderLayer): (RenderLayer::computeRepaintRects): (RenderLayer::updateLayerPositions): (RenderLayer::updateLayerPosition): (RenderLayer::checkScrollbarsAfterLayout): (RenderLayer::paintLayer): (RenderLayer::calculateClipRects): (RenderLayer::calculateRects): * khtml/rendering/render_layer.h: (khtml::RenderLayer::relativePositionOffset): * khtml/rendering/render_list.cpp: (RenderListItem::getAbsoluteRepaintRect): * khtml/rendering/render_list.h: (khtml::RenderListMarker::listImage): * khtml/rendering/render_object.cpp: (RenderObject::repaint): (RenderObject::repaintRectangle): (RenderObject::repaintAfterLayoutIfNeeded): (RenderObject::repaintDuringLayoutIfMoved): (RenderObject::repaintFloatingDescendants): (RenderObject::checkForRepaintDuringLayout): (RenderObject::repaintObjectsBeforeLayout): (RenderObject::getAbsoluteRepaintRectIncludingFloats): (RenderObject::container): * khtml/rendering/render_object.h: * khtml/rendering/render_table.cpp: (RenderTable::layout): * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::passWidgetMouseDownEventToWidget): 2003-10-06 Darin Adler Reviewed by Ken. - preparation for the upcoming whitespace patch; refactored some of the code that extracts text * khtml/khtml_part.h: Added text() member function. * khtml/khtml_part.cpp: (KHTMLPart::text): Added. Refactored from selectedText; takes a DOM::Range as a parameter. Also added code to change newlines to spaces when extracting text from the DOM. (KHTMLPart::selectedText): Now calls text(). (KHTMLPart::selection): Removed stray declaration. * kwq/KWQAccObject.mm: (-[KWQAccObject value]): Changed to call KHTMLPart::text. * kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]): Changed to call KHTMLPart::text instead of doing it ourselves. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::attributedString): Added code to change change '\n' newlines to spaces when extracting text from the DOM. 2003-10-05 Maciej Stachowiak Reviewed by Ken. - fixed 3444255 - REGRESSION: www.aa.com crashes (innerHTML) * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::createContextualFragment): Keep the fragment ref'd since the tokenizer will ref and deref it. Then turn TreeShared's evil against itself to get the fragment back in the floating 0-ref state. * khtml/html/html_elementimpl.h: Remove stray whitespace. * khtml/html/htmlparser.cpp: (KHTMLParser::KHTMLParser): Initialize current to 0 in the other constructor too. 2003-10-06 Darin Adler * khtml/ecma/kjs_css.lut.h: * khtml/ecma/kjs_dom.lut.h: * khtml/ecma/kjs_events.lut.h: * khtml/ecma/kjs_html.lut.h: * khtml/ecma/kjs_navigator.lut.h: * khtml/ecma/kjs_range.lut.h: * khtml/ecma/kjs_traversal.lut.h: * khtml/ecma/kjs_views.lut.h: * khtml/ecma/kjs_window.lut.h: Regenerated, without stray semicolon. 2003-10-03 Darin Adler - updated layout tests for recent WebTextRenderer changes * layout-tests/apple-only/base/www.cnn.com/index-expected.txt: * layout-tests/apple-only/base/www.sun.com/index-expected.txt: * layout-tests/css1/font_properties/font_weight-expected.txt: 2003-10-03 Chris Blumenberg Removed eastCursor.tiff because it was added by mistake. * Resources/eastCursor.tiff: Removed. * WebCore.pbproj/project.pbxproj: 2003-10-03 Maciej Stachowiak Reviewed by Richard. - fixed 3398420 - crash when creating a new document.body object in Also included David Faure's improvement to throw an exception. * khtml/html/html_documentimpl.cpp: (HTMLDocumentImpl::setBody): Don't remove the body when null is passed in, as this means type error at the higher level, so throw an exception. * khtml/html/htmlparser.cpp: (KHTMLParser::KHTMLParser): Initialize current to 0. (KHTMLParser::setCurrent): Ref new current and deref old; we need to keep it ref'd because script execution could drop the current node on the floor. (KHTMLParser::reset): Use setCurrent. (KHTMLParser::insertNode): Likewise. (KHTMLParser::reopenResidualStyleTags): Likewise. (KHTMLParser::popOneBlock): Likewise. (KHTMLParser::finished): Likewise. * khtml/html/htmlparser.h: Prototype setCurrent. 2003-10-03 Chris Blumenberg Ran compress-tiffs on new cursor images. * Resources/eastCursor.tiff: * Resources/eastResizeCursor.tiff: * Resources/helpCursor.tiff: * Resources/moveCursor.tiff: * Resources/northEastResizeCursor.tiff: * Resources/northResizeCursor.tiff: * Resources/northWestResizeCursor.tiff: * Resources/southEastResizeCursor.tiff: * Resources/southResizeCursor.tiff: * Resources/southWestResizeCursor.tiff: * Resources/waitCursor.tiff: * Resources/westResizeCursor.tiff: 2003-10-03 Ken Kocienda Reviewed by Darin, with much help from Maciej and Hyatt Fix for these bugs: : Form buttons do not respond to key events when focused : Form buttons do not scroll to view when focused * khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::simulateMouseClickForEvent): Added helper to simulate mouse clicks in elements. Used to trigger button actions in response to keyboard events. (HTMLInputElementImpl::defaultEventHandler): Improved handler to process key press events for radio, checkbox, image, reset, and submit buttons. * khtml/html/html_formimpl.h: Added simulateMouseClickForEvent function. * khtml/xml/dom2_eventsimpl.h: (DOM::EventImpl::isKeyboardEvent): Added type check virtual function. (DOM::KeyEventImpl::isKeyboardEvent): Ditto. * kwq/KWQButton.h: * kwq/KWQButton.mm: (-[KWQButton simulateClick]): New method. This makes AppKit do a button click programatically for button types. For , we just simulate a the click in the DOM since there is no real "clickable" AppKit widget. (-[KWQButton becomeFirstResponder]): Fixes the button scroll to visible when focused issue. (-[KWQButton resignFirstResponder]): Correctly give up focus when user clicks into the page body when a button has the focus. (QButton::simulateClick): QWidget bridge to the KWQButton simulateClick method. 2003-10-03 David Hyatt Removing redundant layouts and adding a few !needsLayout and !normalChildNeedsLayout checks to prevent extra layouts. Also, fixing the recalcStyle changed() bottleneck to go through view's layout and to not do a full repaint. The layout method will then do the right thing (full repaint without INCREMENTAL_REPAINTING turned on, the precise repainting needed otherwise). Reviewed by darin * khtml/html/html_tableimpl.cpp: (HTMLTableElementImpl::parseAttribute): * khtml/rendering/render_block.cpp: * khtml/rendering/render_container.cpp: (RenderContainer::appendChildNode): (RenderContainer::insertChildNode): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::recalcStyle): 2003-10-02 David Hyatt Remove the speed hit from using the UC break locators by not using them when checking if the current character is   and by also using a global text break locator object. Reviewed by rjw * khtml/rendering/break_lines.cpp: === Safari-108 === 2003-10-02 Maciej Stachowiak Reviewed by Darin. - fixed 3398622 - Crash when JavaScript changes display style This was a problem with one of the many global variables in bidi.cpp, last, having a stale value from the last layout that pointed to a dead node. I fixed this by refactoring the code to put most of the global variables in a struct allocated on the stack, and pass around a reference to the struct. Seems much cleaner (if somewhat wordier) this way. There are still more global variables to kill here. * khtml/rendering/bidi.cpp: (khtml::BidiIterator::BidiIterator): (khtml::BidiStatus::BidiStatus): (khtml::BidiInfo::BidiInfo): (khtml::Bidinext): (khtml::first): (khtml::BidiIterator::increment): (khtml::checkMidpoints): (khtml::appendRunsForObject): (khtml::appendRun): (khtml::embed): (khtml::RenderBlock::computeHorizontalPositionsForLine): (khtml::RenderBlock::bidiReorderLine): (khtml::buildCompactRuns): (khtml::RenderBlock::layoutInlineChildren): (khtml::RenderBlock::findNextLineBreak): * khtml/rendering/bidi.h: * khtml/rendering/render_block.h: 2003-10-02 David Hyatt Work on exposing elements to the Acc API. This patch gets us to the point where text under the mouse is voiced. Reviewed by darin * kwq/KWQAccObject.h: * kwq/KWQAccObject.mm: (-[KWQAccObject initWithRenderer:]): (-[KWQAccObject parentObject]): (-[KWQAccObject parentObjectUnignored]): (-[KWQAccObject addChildrenToArray:]): (-[KWQAccObject role]): (-[KWQAccObject roleDescription]): (-[KWQAccObject value]): (-[KWQAccObject title]): (-[KWQAccObject position]): (-[KWQAccObject size]): (-[KWQAccObject accessibilityIsIgnored]): (-[KWQAccObject accessibilityAttributeNames]): (-[KWQAccObject accessibilityActionNames]): (-[KWQAccObject accessibilityIsAttributeSettable:]): (-[KWQAccObject accessibilityAttributeValue:]): (-[KWQAccObject accessibilityHitTest:]): * kwq/KWQAccObjectCache.mm: (KWQAccObjectCache::accObject): (KWQAccObjectCache::setAccObject): (KWQAccObjectCache::removeAccObject): * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge accessibilityTree]): 2003-10-02 Darin Adler Reviewed by Ken. * kwq/KWQRenderTreeDebug.cpp: (quoteAndEscapeNonPrintables): Since our text rendering renders non-breaking spaces the same as spaces, dump them as spaces. Do the same with newlines since I am about to change our text rendering to do the same with newlines. * layout-tests: Updated test results. 2003-10-01 David Hyatt Avoid doing extra work when tearing down the document by checking to see if we're in the destruction of the document. Reviewed by darin * khtml/rendering/render_block.cpp: * khtml/rendering/render_container.cpp: (RenderContainer::removeChildNode): 2003-10-01 Richard Williamson Fixed 3438441. Pass extra info up to WebKit about load type, specifically is a load is triggered by JS running in an onLoad handler. Reviewed by Ken. * khtml/ecma/kjs_binding.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::openURL): (KWQKHTMLPart::openURLRequest): (KWQKHTMLPart::submitForm): (KWQKHTMLPart::urlSelected): * kwq/KWQKHTMLPartBrowserExtension.mm: (KHTMLPartBrowserExtension::createNewWindow): * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge saveDocumentToPageCache]): Nothing changed. Tweaked spacing. 2003-10-01 Chris Blumenberg : CSS cursors are not implemented Reviewed by Dave. * Resources/eastCursor.tiff: Added. * Resources/eastResizeCursor.tiff: Added. * Resources/helpCursor.tiff: Added. * Resources/moveCursor.tiff: Added. * Resources/northEastResizeCursor.tiff: Added. * Resources/northResizeCursor.tiff: Added. * Resources/northWestResizeCursor.tiff: Added. * Resources/southEastResizeCursor.tiff: Added. * Resources/southResizeCursor.tiff: Added. * Resources/southWestResizeCursor.tiff: Added. * Resources/waitCursor.tiff: Added. * Resources/westResizeCursor.tiff: Added. * WebCore.pbproj/project.pbxproj: * khtml/css/cssparser.cpp: special-case the hand cursor to mean pointer (CSSParser::parseValue): * khtml/css/cssvalues.c: generated changes (hash_val): (findValue): * khtml/css/cssvalues.h: generated changes * khtml/css/cssvalues.in: removed the progress cursor from the list because it was messing up the mapping * khtml/khtmlview.cpp: call new cursor methods * kwq/KWQKCursor.h: * kwq/KWQKCursor.mm: (+[NSCursor _WebCore_cursorWithName:hotSpot:]): new, loads and caches cursors (KCursor::crossCursor): get the AppKit cross hair cursor (KCursor::handCursor): call _WebCore_cursorWithName:hotSpot: (KCursor::sizeAllCursor): ditto (KCursor::waitCursor): ditto (KCursor::whatsThisCursor): ditto (KCursor::eastResizeCursor): new, call _WebCore_cursorWithName:hotSpot: (KCursor::northResizeCursor): ditto (KCursor::northEastResizeCursor): ditto (KCursor::northWestResizeCursor): ditto (KCursor::southResizeCursor): ditto (KCursor::southEastResizeCursor): ditto (KCursor::southWestResizeCursor): ditto (KCursor::westResizeCursor): ditto 2003-10-01 David Hyatt Clean up our detach model so that you can always get to a document, even for anonymous content. Also stubbing out and adding the accessibility objects. Reviewed by darin, mjs, john * ChangeLog: * WebCore.pbproj/project.pbxproj: * khtml/rendering/render_block.cpp: * khtml/rendering/render_box.cpp: (RenderBox::detach): * khtml/rendering/render_box.h: * khtml/rendering/render_canvas.cpp: (RenderCanvas::RenderCanvas): * khtml/rendering/render_container.cpp: (RenderContainer::detach): (RenderContainer::addChild): (RenderContainer::updatePseudoChild): (RenderContainer::insertChildNode): (RenderContainer::removeLeftoverAnonymousBoxes): * khtml/rendering/render_container.h: * khtml/rendering/render_flow.cpp: (RenderFlow::createAnonymousFlow): (RenderFlow::deleteLineBoxes): (RenderFlow::detach): * khtml/rendering/render_flow.h: * khtml/rendering/render_form.cpp: (RenderTextArea::detach): * khtml/rendering/render_form.h: * khtml/rendering/render_image.cpp: (RenderImage::RenderImage): (RenderImage::detach): * khtml/rendering/render_image.h: * khtml/rendering/render_inline.cpp: (RenderInline::addChildToFlow): (RenderInline::splitFlow): (RenderInline::renderName): * khtml/rendering/render_list.cpp: (RenderListItem::setStyle): (RenderListItem::detach): (RenderListItem::updateMarkerLocation): (RenderListMarker::RenderListMarker): * khtml/rendering/render_list.h: * khtml/rendering/render_object.cpp: (RenderObject::RenderObject): (RenderObject::information): (RenderObject::dump): (RenderObject::createAnonymousBlock): (RenderObject::remove): (RenderObject::detach): * khtml/rendering/render_object.h: * khtml/rendering/render_replaced.cpp: (RenderWidget::detach): * khtml/rendering/render_replaced.h: * khtml/rendering/render_table.cpp: (RenderTable::addChild): (RenderTableSection::detach): (RenderTableSection::addChild): (RenderTableRow::detach): (RenderTableRow::addChild): (RenderTableCell::detach): * khtml/rendering/render_table.h: * khtml/rendering/render_text.cpp: (RenderText::detach): (RenderText::deleteRuns): * khtml/rendering/render_text.h: * khtml/xml/dom_docimpl.cpp: (DocumentImpl::DocumentImpl): (DocumentImpl::~DocumentImpl): (DocumentImpl::detach): (DocumentImpl::getOrCreateAccObjectCache): * khtml/xml/dom_docimpl.h: * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::detach): * kwq/KWQAccObject.h: Added. * kwq/KWQAccObject.mm: Added. (-[KWQAccObject x]): (-[KWQAccObject y]): (-[KWQAccObject width]): (-[KWQAccObject height]): (-[KWQAccObject detached]): (-[KWQAccObject detach]): (-[KWQAccObject data]): (-[KWQAccObject setData:]): (-[KWQAccObject firstChild]): (-[KWQAccObject lastChild]): (-[KWQAccObject previousSibling]): (-[KWQAccObject nextSibling]): (-[KWQAccObject parentObject]): * kwq/KWQAccObjectCache.h: Added. * kwq/KWQAccObjectCache.mm: Added. (KWQAccObjectCache::KWQAccObjectCache): (KWQAccObjectCache::~KWQAccObjectCache): (KWQAccObjectCache::accObject): (KWQAccObjectCache::setAccObject): (KWQAccObjectCache::removeAccObject): (KWQAccObjectCache::detach): * layout-tests/css1/pseudo/firstletter-expected.txt: * layout-tests/css1/pseudo/multiple_pseudo_elements-expected.txt: * layout-tests/fast/css-generated-content/002-expected.txt: * layout-tests/fast/css-generated-content/004-expected.txt: * layout-tests/fast/css-generated-content/005-expected.txt: * layout-tests/fast/css-generated-content/006-expected.txt: * layout-tests/fast/selectors/039-expected.txt: * layout-tests/fast/selectors/039b-expected.txt: * layout-tests/fast/selectors/041-expected.txt: * layout-tests/fast/selectors/042-expected.txt: * layout-tests/fast/selectors/166a-expected.txt: * layout-tests/fast/selectors/168-expected.txt: * layout-tests/fast/selectors/168a-expected.txt: * layout-tests/fast/selectors/169-expected.txt: * layout-tests/fast/selectors/169a-expected.txt: * layout-tests/fast/text/firstline/002-expected.txt: * layout-tests/fast/text/firstline/003-expected.txt: 2003-10-01 David Hyatt Fix for 3163840, the images are mispositioned on the DHTML menus at the top of www.aa.com (and in many other places). We needed to support returning the right value from hasProperty and tryGet for 'cssFloat'. This patch also adds support for getting/setting our custom CSS properties (-khtml-*) and just factors the code a bit better for all the special values. Reviewed by darin * khtml/ecma/kjs_css.cpp: (cssPropertyName): (DOMCSSStyleDeclaration::hasProperty): (DOMCSSStyleDeclaration::tryGet): (DOMCSSStyleDeclaration::tryPut): 2003-10-01 Darin Adler Reviewed by Dave. - fixed 3437309 -- REGRESSION (100-107): Javascript menu doesn't work at www.aa.com * khtml/xml/dom_elementimpl.cpp: (ElementImpl::removeAttribute): Restored the old behavior for removeAttribute and removeAttributeNS; these don't give NOT_FOUND_ERR. But keep the NOT_FOUND_ERR for removeAttributeNode and removedNamedItem. 2003-10-01 Ken Kocienda Reviewed by me * kwq/KWQWidget.mm: (QWidget::focusPolicy): Improved comment. 2003-10-01 Ken Kocienda Reviewed by Maciej Fix for these bugs: : WebCore form button widgets do not accept focus : WebCore form button widgets do not take part in tabbing order * kwq/KWQButton.h: Add focusPolicy function declaration. * kwq/KWQButton.mm: (-[KWQButton nextKeyView]): Add tabbing support for buttons. (-[KWQButton previousKeyView]): Ditto (-[KWQButton nextValidKeyView]): Ditto (-[KWQButton previousValidKeyView]): Ditto (QButton::focusPolicy): Add focusPolicy implementation. This calls through to the recently-added accessor for full keyboard access to help in the determination for focus policy. For now, full keyboard access must be turned on for buttons to receive focus. * kwq/KWQTextEdit.h: Remove focusPolicy specialization from this class. The implementation in QWidget now serves this class well. * kwq/KWQTextEdit.mm: Ditto * kwq/KWQWidget.h: Added isEnabled function. Small, unrelated cleanup to move the no-implementation setFocusPolicy() and setFocusProxy() functions fully into the header file. * kwq/KWQWidget.mm: (QWidget::isEnabled): Added. Calls through to the Cocoa view to retrieve this information. (QWidget::focusPolicy): Much improved focus policy function is now more general in stipulating the conditions for focus policy, and will work for more widgets. 2003-10-01 David Hyatt Fix for 3440804, broken scrollbars in downloads window. Make Auto be the default value in the enum, so that all scrollviews will be automatically initialized to be auto. Reviewed by cblu * kwq/KWQScrollView.h: * kwq/WebCoreFrameView.h: 2003-09-30 Ken Kocienda Reviewed by me * WebCore.pbproj/project.pbxproj: Made WebCoreKeyboardAccess.h a private header. 2003-09-30 Ken Kocienda Reviewed by Maciej Fix for this bug: : WebKit needs to retrieve full keyboard access preference * WebCore.pbproj/project.pbxproj: * kwq/KWQKHTMLPart.h: Declare keyboardUIMode accessor. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::keyboardUIMode): Implement keyboardUIMode accessor (calls through the bridge). * kwq/WebCoreBridge.h: Declare the bridge accessor. * kwq/WebCoreKeyboardAccess.h: Added. Header defines keyboard UI mode constants. 2003-09-30 Maciej Stachowiak Reviewed by Ken. - fixed 3375281 - Keyboard event handlers not fired if focus not in form field - fixed 3242927 - KeyPressed Event in Javascript don't work - fixed 3375353 - keyboard event.target not updated when blurring from form items - fixed 3183754 - returning false from key press handlers does not prevent typing or form submission * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::dispatchKeyEvent): Force false when defaultHandled instead of based on a weird rule appropriate for KDE but not for us. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::keyEvent): If there's no focus node, give the event to the body element instead of giving up. Also, reverse expectedsense of return value dispatchKeyEvent, since it returns true if it *didn't* swallow the event. And finally, let the key press event as well as the key down event for the initial NSKeyDown block default handling. * kwq/KWQListBox.mm: (-[KWQTableView keyDown:]): Respect return value from interceptKeyEvent: (-[KWQTableView keyUp:]): ditto * kwq/KWQTextArea.mm: (-[KWQTextAreaTextView keyDown:]): ditto (-[KWQTextAreaTextView keyUp:]): ditto * kwq/KWQTextField.mm: (-[KWQTextField textView:shouldHandleEvent:]): ditto 2003-09-30 David Hyatt Improvements to layout transitions and scrollbar appearance/disappearance. Also implementing a fix for 3264346, overflow applied to body should apply to the document's scrollers. Reviewed by darin * khtml/html/html_baseimpl.cpp: (HTMLFrameElementImpl::parseAttribute): * khtml/khtmlview.cpp: (KHTMLView::KHTMLView): (KHTMLView::~KHTMLView): (KHTMLView::resetScrollBars): (KHTMLView::clear): (KHTMLView::initScrollBars): (KHTMLView::applyBodyScrollQuirk): (KHTMLView::inLayout): * khtml/khtmlview.h: * khtml/rendering/render_block.cpp: * khtml/rendering/render_block.h: * khtml/rendering/render_canvas.cpp: (RenderCanvas::layout): * khtml/rendering/render_form.cpp: (TextAreaWidget::TextAreaWidget): * khtml/rendering/render_frames.cpp: (RenderFrame::slotViewCleared): (RenderPartObject::slotViewCleared): * khtml/rendering/render_list.cpp: (RenderListMarker::calcMinMaxWidth): * khtml/rendering/render_object.cpp: (RenderObject::repaint): (RenderObject::repaintRectangle): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::setInPageCache): * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::createPart): * kwq/KWQRenderTreeDebug.cpp: (write): (externalRepresentation): * kwq/KWQScrollView.h: * kwq/KWQScrollView.mm: (QScrollView::setVScrollBarMode): (QScrollView::setHScrollBarMode): (QScrollView::setScrollBarsMode): (QScrollView::vScrollBarMode): (QScrollView::hScrollBarMode): (QScrollView::hasVerticalScrollBar): (QScrollView::hasHorizontalScrollBar): (QScrollView::suppressScrollBars): * kwq/WebCoreBridge.mm: (-[WebCoreBridge installInFrame:]): * kwq/WebCoreFrameView.h: 2003-09-30 David Hyatt Fix for 3437260, nil deref of the render style because it hasn't been set yet. Fallout from my incremental repainting landing. Reviewed by darin * khtml/rendering/render_replaced.cpp: (RenderWidget::setQWidget): 2003-09-29 David Hyatt Fix for 3438479, tables expand on every layout when a cell has percentage height children. Reviewed by darin * khtml/rendering/render_table.cpp: (RenderTableSection::calcRowHeight): (RenderTableRow::layout): 2003-09-29 Chris Blumenberg Fixed: : nil-deref in khtml::RenderWidget::eventFilter with onchange handler Reviewed by darin. * kwq/KWQTextField.mm: (-[KWQTextField controlTextDidEndEditing:]): call setHasFocus:NO last so we have the widget that lets us get to the bridge and lets us call controlTextDidEndEditing 2003-09-29 David Hyatt Fix for 3425053, text past the bottom of a positioned table doesn't repaint. 3426847 is the same bug. Both are fixed by ensuring that calcHeight doesn't actually do anything other than margin computation and position determination for positioned elements. In reality, for weird edge cases like implying the height via explicit top and bottom properties, we'll still be wrong. Reviewed by darin * ChangeLog: * khtml/rendering/render_table.cpp: (RenderTable::layout): 2003-09-29 David Hyatt Make sure that timeouts updateRendering after they execute the scheduled timer action. Also fixing 3429455, maxwidth of pres miscomputed when two blank lines occur at the end of a pre text run. Reviewed by darin, mjs (setTimeout fix), darin (pre fix) * khtml/ecma/kjs_window.cpp: (ScheduledAction::execute): * khtml/rendering/render_text.cpp: (RenderText::trimmedMinMaxWidth): (RenderText::calcMinMaxWidth): 2003-09-29 Darin Adler Reviewed by John. - fixed 3437292 -- Safari uses wrong characters for ∧ and ∨ entities * khtml/html/kentities.gperf: Corrected values for ∧ and ∨ entities. Checked all the rest against a list on the W3C site, and those are the only two that were wrong. * khtml/html/kentities.c: Regnenerated. 2003-09-26 Ken Kocienda Reviewed by John Fix for this bug: : REGRESSION: tabbing to textareas causes infinite recursion Add recursion guards to the becomeFirstResponder method, otherwise calling eventFilter with a FocusIn event will cause the infinite recursion described in the bug. * kwq/KWQTextArea.mm: (-[KWQTextAreaTextView becomeFirstResponder]): 2003-09-25 Maciej Stachowiak Reviewed by John. * khtml/ecma/kjs_window.cpp: (Window::installTimeout): Variant that takes a function and args. (WindowFunc::tryCall): If the argument is a function, call the function variant of installTimeout instead of pointlessly passing the string. Also, correctly implement the code to pass extra args along. * khtml/ecma/kjs_window.h: 2003-09-25 Maciej Stachowiak Roll out build system change since it did not actually work. :-( * WebCore.pbproj/project.pbxproj: 2003-09-25 David Hyatt Landing the new repainting code. This code eliminates many redundant layouts, makes layout scheduling work properly when called from WebKit, cleans up relpositioned inlines that act as containing blocks for absolute positioned children, and eliminates the repaint timer. Reviewed by kocienda * khtml/html/html_documentimpl.cpp: (HTMLDocumentImpl::close): * khtml/khtmlview.cpp: (KHTMLView::KHTMLView): * khtml/khtmlview.h: * khtml/rendering/render_block.cpp: * khtml/rendering/render_block.h: * khtml/rendering/render_box.cpp: (RenderBox::setStyle): (RenderBox::setPixmap): (RenderBox::getAbsoluteRepaintRect): (RenderBox::computeAbsoluteRepaintRect): (RenderBox::repaintIfMoved): (RenderBox::calcAbsoluteHorizontal): (RenderBox::calcAbsoluteVertical): * khtml/rendering/render_box.h: * khtml/rendering/render_canvas.cpp: (RenderCanvas::layout): (RenderCanvas::repaintViewRectangle): (RenderCanvas::getAbsoluteRepaintRect): (RenderCanvas::computeAbsoluteRepaintRect): * khtml/rendering/render_canvas.h: * khtml/rendering/render_container.cpp: (RenderContainer::addChild): (RenderContainer::removeChildNode): (RenderContainer::removeChild): (RenderContainer::appendChildNode): (RenderContainer::insertChildNode): * khtml/rendering/render_flexbox.cpp: * khtml/rendering/render_flow.cpp: (RenderFlow::getAbsoluteRepaintRect): * khtml/rendering/render_flow.h: * khtml/rendering/render_image.cpp: (RenderImage::setPixmap): (RenderImage::layout): * khtml/rendering/render_inline.cpp: (RenderInline::addChildToFlow): * khtml/rendering/render_layer.cpp: (RenderLayer::convertToLayerCoords): * khtml/rendering/render_list.cpp: (RenderListMarker::setPixmap): * khtml/rendering/render_object.cpp: (RenderObject::RenderObject): (RenderObject::setNeedsLayout): (RenderObject::setChildNeedsLayout): (RenderObject::markContainingBlocksForLayout): (RenderObject::containingBlock): (RenderObject::repaint): (RenderObject::repaintRectangle): (RenderObject::repaintAfterLayoutIfNeeded): (RenderObject::repaintIfMoved): (RenderObject::repaintPositionedAndFloatingDescendants): (RenderObject::getAbsoluteRepaintRect): (RenderObject::getAbsoluteRepaintRectIncludingDescendants): (RenderObject::computeAbsoluteRepaintRect): (RenderObject::setStyle): (RenderObject::container): (RenderObject::detach): (RenderObject::scheduleRelayout): * khtml/rendering/render_object.h: * khtml/rendering/render_style.cpp: (RenderStyle::diff): * khtml/rendering/render_table.cpp: (RenderTable::layout): (RenderTableRow::getAbsoluteRepaintRect): (RenderTableCell::computeAbsoluteRepaintRect): * khtml/rendering/render_table.h: * khtml/xml/dom_nodeimpl.cpp: (NodeBaseImpl::insertBefore): (NodeBaseImpl::replaceChild): (NodeBaseImpl::appendChild): * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::clearTimers): * kwq/KWQRenderTreeDebug.cpp: (write): (externalRepresentation): * kwq/KWQRenderTreeDebug.h: 2003-09-25 Maciej Stachowiak Reviewed by Darin. * WebCore.pbproj/project.pbxproj: Don't hack install name. Instead of embedding into Safari, embed into WebKit as sub-umbrella. === Safari-107 === 2003-09-25 Darin Adler - rolled out change to fix 3390850 because it caused a performance regression * khtml/misc/decoder.cpp: (Decoder::decode): Rolled out change. 2003-09-25 Ken Kocienda Reviewed by Dave Name change: TextRun is now InlineTextBox. Some related names have been changed as well. There should be no change in behavior as a result of this patch. * khtml/khtml_part.cpp: (KHTMLPart::selectedText): (firstRunAt): (lastRunAt): (startAndEndLineNodesIncludingNode): * khtml/rendering/bidi.cpp: * khtml/rendering/render_flow.cpp: (RenderFlow::paintLineBoxDecorations): * khtml/rendering/render_line.cpp: (InlineFlowBox::placeBoxesHorizontally): (InlineFlowBox::placeBoxesVertically): * khtml/rendering/render_line.h: * khtml/rendering/render_text.cpp: (InlineTextBox::detach): (throw): (InlineTextBox::operator delete): (InlineTextBox::paintSelection): (InlineTextBox::paintDecoration): (InlineTextBox::checkSelectionPoint): (InlineTextBoxArray::InlineTextBoxArray): (InlineTextBoxArray::compareItems): (InlineTextBoxArray::findFirstMatching): (RenderText::deleteRuns): (RenderText::findNextInlineTextBox): (RenderText::nodeAtPoint): (RenderText::checkSelectionPointIgnoringContinuations): (RenderText::cursorPos): (RenderText::posOfChar): (RenderText::paintObject): (RenderText::createInlineBox): (RenderText::position): (RenderText::width): * khtml/rendering/render_text.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::attributedString): * kwq/KWQRenderTreeDebug.cpp: (writeTextRun): (write): 2003-09-25 Darin Adler Added a new layout test. * layout-tests/fast/forms/form-element-geometry-expected.txt: Added. * layout-tests/fast/forms/form-element-geometry.html: Added. 2003-09-24 Darin Adler * layout-tests/fast/table/003-expected.txt: Updated for textarea width change. 2003-09-24 David Hyatt Fix for 3429646, should show up as two images. Reviewed by darin * khtml/html/htmlparser.cpp: (KHTMLParser::handleResidualStyleCloseTagAcrossBlocks): * khtml/html/htmltokenizer.cpp: (HTMLTokenizer::parseTag): 2003-09-24 Darin Adler Reviewed by Dave. - fixed a recent regression, and ... - fixed 3386544 -- ARCH: s don't support transclusion like