ChangeLog-2003-10-25 156 KB
Newer Older
mjs's avatar
mjs committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
2003-01-21  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Ken.

	- fixed 3151982 - missing content at debka.com after iframe is written using document.write
	- fixed 3000234 - javascript problem writing iframe at cycleworld.com

        * khtml/html/htmltokenizer.cpp:
        (HTMLTokenizer::scriptHandler): If we come out of the script with
	the parser in skip mode, don't throw away the whole rest of the
	document - instead, parse it as usual. The parser's skip mode will
	take care of skipping stuff as needed and will detect close tags
	for special tags like <iframe>.

15 16 17 18 19 20 21 22 23 24 25 26
2003-01-20  David Hyatt  <hyatt@apple.com>

	Fix :hover performance regression on wsj.com.  Moving my
	<a name="foo"> quirk down into the :hover rule  matching code,
	so that we'll know never to apply :hover to anchorless <a>s.
	
        Reviewed by gramps

        * khtml/css/cssstyleselector.cpp:
        * khtml/rendering/render_object.cpp:
        (RenderObject::setHoverAndActive):

mjs's avatar
mjs committed
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
2003-01-20  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Trey.

	- fixed 3132120 - onchange handler not firing on mac.com webmail

        * khtml/rendering/render_form.h:
        * khtml/rendering/render_replaced.cpp:
        (RenderWidget::handleFocusOut): Moved empty virtual method here from render_form.
        (RenderWidget::eventFilter): Uncomment call to handleFocusOut - we
	need it to send onChange properly.
	* khtml/rendering/render_replaced.h:
        * kwq/KWQObject.h: Add empty eventFilter virtual method.
        * kwq/KWQComboBox.h: Remove no longer needed empty eventFilter.
        * kwq/KWQEvent.h: Implement a bit more of QFocusEvent.
        * kwq/KWQTextArea.mm:
        (-[KWQTextArea _createTextView]): Tell the text view its widget.
        (-[KWQTextAreaTextView setWidget:]): New method to set widget.
        (-[KWQTextAreaTextView becomeFirstResponder]): In addition to the usual stuff,
	call the widget's event filter with a focus in event.
        (-[KWQTextAreaTextView resignFirstResponder]): In addition to the usual stuff,
	call the widget's event filter with a focus out event.
        * kwq/KWQTextField.mm:
        (-[KWQTextField becomeFirstResponder]): Cleaned up a bit.
        (-[KWQTextField fieldWillBecomeFirstResponder]): Call the widget's event filter with a focus in event.
        (-[KWQTextField fieldWillResignFirstResponder]): Call the widget's event filter with a focus out event.
        * kwq/KWQView.mm:

55 56 57 58 59 60 61 62 63 64 65
2003-01-20  David Hyatt  <hyatt@apple.com>

	Fix for 3147213.  <nobr> is treated like other inlines now,
	so it can contain blocks.  <wbr> is also fixed.  This fixes
	tvguide.com.
	
        Reviewed by john

        * khtml/html/dtd.cpp:
        (DOM::checkChild):

66 67 68 69 70 71 72 73 74 75 76 77 78
2003-01-20  David Hyatt  <hyatt@apple.com>

	Gah. Fix positioned objects and floating objects so that they
	don't append themselves to the list of runs in normal flow.
	An astoundingly basic bug. :(
	
        Reviewed by john

        * khtml/rendering/bidi.cpp:
        (appendRunsForObject):
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::addChildToFlow):

79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
2003-01-19  David Hyatt  <hyatt@apple.com>

	Fixes for 3150561 (blog articles vanish on stylesheet switch) and
        and 3150560 (crash changing fixed positioned element to normal
        positioning dynamically).

        This change makes layers able to deal with dynamic changes in
        position that cause you to have to either remove a layer from
        the hierarchy while preserving the children or to insert a
        layer into the hierarchy in between a parent and its descendants.

	This patch also rewrites :hover/:active so that they can actually
	be used in selectors other than the rightmost selector (e.g., so you
	can write a rule like "li:hover > a").  

	Also, layers will now properly clear out their hover/active state
	when the mouse is no longer inside them.

	With these fixes, Eric Meyer's "Pure CSS Menus" work (perfectly)
	and the repainting problems on sites like brainjar.com and
	diveintomark.org and wired.com are fixed.
	
        Reviewed by mjs and john.

        * khtml/css/css_stylesheetimpl.h:
        * khtml/css/cssparser.cpp:
        (StyleBaseImpl::parseSelector):
        * khtml/css/cssparser.h:
        * khtml/css/cssstyleselector.cpp:
        * khtml/css/cssstyleselector.h:
        * khtml/dom/html_head.cpp:
        (HTMLLinkElement::setDisabled):
        * khtml/rendering/render_box.cpp:
        (RenderBox::setStyle):
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_container.cpp:
        (RenderContainer::appendChildNode):
        (RenderContainer::insertChildNode):
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::setStyle):
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::addChild):
        (RenderLayer::removeOnlyThisLayer):
        (RenderLayer::insertOnlyThisLayer):
        (RenderLayer::clearOtherLayersHoverActiveState):
        (RenderLayer::clearHoverAndActiveState):
        (RenderLayer::nodeAtPoint):
        (RenderLayer::constructZTree):
        * khtml/rendering/render_layer.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::addLayers):
        (RenderObject::moveLayers):
        (RenderObject::findNextLayer):
        (RenderObject::setStyle):
        (RenderObject::setHoverAndActive):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_style.cpp:
        (RenderStyle::diff):
        * khtml/rendering/render_style.h:
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::DocumentImpl):
        * khtml/xml/dom_docimpl.h:
        * khtml/xml/dom_elementimpl.cpp:
        (ElementImpl::recalcStyle):
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeBaseImpl::setActive):

mjs's avatar
mjs committed
147 148 149 150 151 152 153 154 155 156 157 158
2003-01-17  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by John.

	- fixed 3149511 - Blogger.com window closes after update is posted
	
        * khtml/ecma/kjs_window.cpp:
        (WindowFunc::tryCall): For now, don't allow closing the window at
	all if it wasn't opened by JavaScript, since we don't support the
	history object and so can't tell if the window has only one
	history item.

darin's avatar
darin committed
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174
2003-01-17  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- fixed the crashing so the layout tests work

        * khtml/rendering/render_layer.h: Add a node pointer result.
        * khtml/rendering/render_layer.cpp: (RenderLayer::elementList):
	Return the node pointer so we can destroy it when done with it.

        * khtml/rendering/render_object.h: Make renderArena() const.
        * khtml/rendering/render_object.cpp: (RenderObject::renderArena): Make it const.

        * kwq/KWQRenderTreeDebug.cpp: (writeLayers): Free the Z layer list when done.
	Without this things just crashed.

175 176 177 178 179 180 181 182 183 184 185
2003-01-17  Richard Williamson   <rjw@apple.com>

        Fixed 3126141. Allow pages with plugins to be cached.  This is safe
        because plugins are cleanly started/stopped when their containing views are
        added/removed from the view hierarchy.
        
        Reviewed by trey.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::canCachePage):

186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359
2003-01-17  David Hyatt  <hyatt@apple.com>

	The new table code from Lars.  Also includes bug fixes for
	percentage height children in table cells, for positioning
	of tables, and for width distribution of percentage width
	cells.
	
        Reviewed by darin

        * ForwardingHeaders/rendering/table_layout.h: Added.
        * WebCore.pbproj/project.pbxproj:
        * khtml/css/cssparser.cpp:
        (StyleBaseImpl::parseValue):
        * khtml/css/cssstyleselector.cpp:
        * khtml/css/cssvalues.c:
        (findValue):
        * khtml/css/cssvalues.h:
        * khtml/css/cssvalues.in:
        * khtml/css/html4.css:
        * khtml/dom/html_table.cpp:
        (HTMLTableElement::insertRow):
        (HTMLTableElement::deleteRow):
        (HTMLTableRowElement::insertCell):
        (HTMLTableRowElement::deleteCell):
        (HTMLTableSectionElement::insertRow):
        (HTMLTableSectionElement::deleteRow):
        * khtml/html/html_tableimpl.cpp:
        (HTMLTableElementImpl::HTMLTableElementImpl):
        (HTMLTableElementImpl::setTFoot):
        (HTMLTableElementImpl::setTBody):
        (HTMLTableElementImpl::createTHead):
        (HTMLTableElementImpl::createTFoot):
        (HTMLTableElementImpl::insertRow):
        (HTMLTableElementImpl::deleteRow):
        (HTMLTableElementImpl::addChild):
        (HTMLTableElementImpl::parseAttribute):
        (HTMLTableElementImpl::attach):
        (HTMLTablePartElementImpl::parseAttribute):
        (HTMLTableSectionElementImpl::HTMLTableSectionElementImpl):
        (HTMLTableSectionElementImpl::~HTMLTableSectionElementImpl):
        (HTMLTableSectionElementImpl::insertRow):
        (HTMLTableSectionElementImpl::deleteRow):
        (HTMLTableSectionElementImpl::numRows):
        (HTMLTableRowElementImpl::rowIndex):
        (HTMLTableRowElementImpl::insertCell):
        (HTMLTableRowElementImpl::deleteCell):
        (HTMLTableCellElementImpl::HTMLTableCellElementImpl):
        (HTMLTableCellElementImpl::parseAttribute):
        (HTMLTableCellElementImpl::attach):
        (HTMLTableColElementImpl::HTMLTableColElementImpl):
        (HTMLTableColElementImpl::parseAttribute):
        * khtml/html/html_tableimpl.h:
        * khtml/html/htmlparser.cpp:
        (KHTMLParser::insertNode):
        (KHTMLParser::getElement):
        * khtml/rendering/bidi.cpp:
        (RenderFlow::layoutInlineChildren):
        * khtml/rendering/render_body.cpp:
        (RenderBody::availableHeight):
        * khtml/rendering/render_body.h:
        * khtml/rendering/render_box.cpp:
        (RenderBox::contentWidth):
        (RenderBox::contentHeight):
        (RenderBox::calcReplacedWidth):
        (RenderBox::calcReplacedHeight):
        (RenderBox::availableHeight):
        (RenderBox::calcAbsoluteVertical):
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::layoutBlockChildren):
        (RenderFlow::leftOffset):
        (RenderFlow::rightOffset):
        (RenderFlow::addOverHangingFloats):
        (RenderFlow::calcBlockMinMaxWidth):
        (RenderFlow::calcMinMaxWidth):
        * khtml/rendering/render_form.cpp:
        * khtml/rendering/render_form.h:
        * khtml/rendering/render_frames.cpp:
        * khtml/rendering/render_frames.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::createObject):
        (RenderObject::paddingTop):
        (RenderObject::paddingBottom):
        (RenderObject::paddingLeft):
        (RenderObject::paddingRight):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_replaced.cpp:
        (RenderReplaced::calcMinMaxWidth):
        * khtml/rendering/render_root.cpp:
        (RenderRoot::RenderRoot):
        (RenderRoot::layout):
        (RenderRoot::paintObject):
        * khtml/rendering/render_root.h:
        * khtml/rendering/render_style.cpp:
        (StyleSurroundData::StyleSurroundData):
        * khtml/rendering/render_style.h:
        * khtml/rendering/render_table.cpp:
        (RenderTable::RenderTable):
        (RenderTable::~RenderTable):
        (RenderTable::setStyle):
        (RenderTable::position):
        (RenderTable::addChild):
        (RenderTable::calcWidth):
        (RenderTable::layout):
        (RenderTable::setCellWidths):
        (RenderTable::paint):
        (RenderTable::calcMinMaxWidth):
        (RenderTable::splitColumn):
        (RenderTable::appendColumn):
        (RenderTable::colElement):
        (RenderTable::recalcSections):
        (RenderTable::removeChildNode):
        (RenderTable::dump):
        (RenderTableSection::RenderTableSection):
        (RenderTableSection::~RenderTableSection):
        (RenderTableSection::detach):
        (RenderTableSection::setStyle):
        (RenderTableSection::addChild):
        (RenderTableSection::ensureRows):
        (RenderTableSection::addCell):
        (RenderTableSection::setCellWidths):
        (RenderTableSection::calcRowHeight):
        (RenderTableSection::layoutRows):
        (RenderTableSection::paint):
        (RenderTableSection::recalcCells):
        (RenderTableSection::clearGrid):
        (RenderTableSection::removeChildNode):
        (RenderTableSection::dump):
        (RenderTableRow::RenderTableRow):
        (RenderTableRow::detach):
        (RenderTableRow::setStyle):
        (RenderTableRow::addChild):
        (RenderTableRow::removeChildNode):
        (RenderTableRow::dump):
        (RenderTableRow::layout):
        (RenderTableCell::RenderTableCell):
        (RenderTableCell::detach):
        (RenderTableCell::updateFromElement):
        (RenderTableCell::getCellPercentageHeight):
        (RenderTableCell::setCellPercentageHeight):
        (RenderTableCell::calcMinMaxWidth):
        (RenderTableCell::baselinePosition):
        (RenderTableCell::setStyle):
        (RenderTableCell::paint):
        (RenderTableCell::paintBoxDecorations):
        (RenderTableCell::dump):
        (RenderTableCol::RenderTableCol):
        (RenderTableCol::updateFromElement):
        (RenderTableCol::addChild):
        (RenderTableCol::dump):
        * khtml/rendering/render_table.h:
        * khtml/rendering/table_layout.cpp: Added.
        (FixedTableLayout::FixedTableLayout):
        (FixedTableLayout::~FixedTableLayout):
        (FixedTableLayout::calcWidthArray):
        (FixedTableLayout::calcMinMaxWidth):
        (FixedTableLayout::layout):
        (AutoTableLayout::AutoTableLayout):
        (AutoTableLayout::~AutoTableLayout):
        (AutoTableLayout::recalcColumn):
        (AutoTableLayout::fullRecalc):
        (AutoTableLayout::calcMinMaxWidth):
        (AutoTableLayout::calcEffectiveWidth):
        (AutoTableLayout::insertSpanCell):
        (AutoTableLayout::layout):
        (AutoTableLayout::calcPercentages):
        * khtml/rendering/table_layout.h: Added.
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::createHTMLElement):
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::NodeImpl):
        (NodeImpl::dump):
        * khtml/xml/dom_nodeimpl.h:

darin's avatar
darin committed
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379
2003-01-17  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- clean room rewrite of QCString::operator<<.

        * kwq/KWQCString.mm: (operator<<): Rewrote it.

	- update format of render tree dumping for real use

        * khtml/rendering/render_layer.h: Added elementList().
        * khtml/rendering/render_layer.cpp: (RenderLayer::elementList): Added.

        * kwq/KWQRenderTreeDebug.cpp:
        (operator<<): Added an overload for writing out QRect.
        (writeIndent): Added.
        (write): Use the overload for QRect, also reorganize to dump layers.
        (writeLayers): Use this to dump the layers.
        (externalRepresentation): Call writeLayers instead of write.

darin's avatar
darin committed
380 381 382 383 384 385 386 387 388 389 390 391
2003-01-17  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

	- removed unused KWQDrawUtil code

        * ForwardingHeaders/qdrawutil.h: Emptied this file out.

        * kwq/KWQDrawUtil.h: Removed.
        * kwq/KWQDrawUtil.mm: Removed.
        * WebCore.pbproj/project.pbxproj: Removed KWQDrawUtil.

darin's avatar
darin committed
392 393 394 395 396 397 398 399 400
2003-01-17  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- updated copyright to include expat copyrights

        * WebCore.pbproj/project.pbxproj: Added expat copyrights on the end.
	Got text of copyrights from Acknowledgments.rtf in WebBrowser.

mjs's avatar
mjs committed
401 402 403 404 405 406 407 408 409 410 411 412
2003-01-16  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Dave.

	- fixed 3148141 - crash in KJS::WindowFunc::tryCall leaving certain site
	
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::setView): If setting the view to nil and we have a
	document, detach the document. This means that we are removing a
	frame from the tree, so we want to run it's onUnload handler now,
	rather than later when things are no longer fully hooked up.

413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430
2003-01-16  Richard Williamson   <rjw@apple.com>

        Fixed 3148932.  Account for zero width characters
        in <pre> fixed-width optimization.
        
        Reviewed by hyatt.

        * khtml/rendering/render_text.cpp:
        (RenderText::widthFromCache):
        
        Reviewed by Richard (written by Mike S.)  'Clean' implementations of these
        functions that were too similar to the Qt implementations.
        
        * kwq/KWQString.mm:
        (QString::left):
        (QString::right):
        (QString::mid):

mjs's avatar
mjs committed
431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446
2003-01-16  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3144771 - Crash in KJS::WindowFunc::tryCall leaving www.smogcheck.org

	I fixed this by making sure we couldn't send the unload event twice, which was
	happening before in certain circumstances.
	
        * khtml/khtml_part.cpp:
        (KHTMLPart::closeURL): When emitting load event, note that unload
	event has not yet been sent.
        (KHTMLPart::checkEmitLoadEvent): Note when unload event has been
	sent to avoid sending it twice.
        * khtml/khtmlpart_p.h:

darin's avatar
darin committed
447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470
2003-01-16  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- added an API for dumping the external representation of the render tree for testing

        * kwq/KWQRenderTreeDebug.h: Added.
        * kwq/KWQRenderTreeDebug.cpp: Added.

        * kwq/KWQTextStream.h: Added more overloads for operator<<.
        * kwq/KWQTextStream.mm: (QTextStream::operator<<): Implemented them.

        * kwq/WebCoreBridge.h: Added renderTreeAsExternalRepresentation.
        * kwq/WebCoreBridge.mm: (-[WebCoreBridge renderTreeAsExternalRepresentation]): Added.

	- removed remnants of an earlier more-naive cut at this same sort of thing
	- removed ForwardingHeaders from the project since that doesn't really help Project Builder

        * kwq/WebCoreTestController.h: Removed.
        * kwq/WebCoreTestController.m: Removed.
        * WebCore.exp: Removed WebCoreTestController.
        * WebCore-combined.exp: Re-generated.
        * WebCore.pbproj/project.pbxproj: Removed WebCoreTestController and ForwardingHeaders.

sheridan's avatar
sheridan committed
471 472
=== Safari-52 ===

473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504
2003-01-15  Trey Matteson  <trey@apple.com>

	3144458 - user's credentials are present in a form that is revisited via b/f or history

	We now never save/restore password fields.  Also if the page has a form with a password
	field that would be submitted securely, we do not save anything on that page.

        Reviewed by Darin.

        * force-clean-timestamp:  PB isn't smart enough to know what to rebuild.
        * khtml/html/html_formimpl.cpp:
        (HTMLFormElementImpl::formWouldHaveSecureSubmission):  Utility function.
        (HTMLFormElementImpl::attach):  Tell doc if we've added a secure form.
        (HTMLFormElementImpl::parseAttribute):  Tell doc if form became secure.
        (HTMLInputElementImpl::state):  Assert that we never save password fields.
        (HTMLInputElementImpl::restoreState):  Assert that we never restore password fields.
        (HTMLInputElementImpl::attach):  Tell doc if we've added a password field.
        * khtml/html/html_formimpl.h:
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::DocumentImpl):  Init count of secure forms, password fields.
        (DocumentImpl::passwordFieldAdded):
        (DocumentImpl::passwordFieldRemoved):
        (DocumentImpl::hasPasswordField):  New methods to count password fields.
        (DocumentImpl::secureFormAdded):
        (DocumentImpl::secureFormRemoved):
        (DocumentImpl::hasSecureForm):  New methods to count secure forms.
        * khtml/xml/dom_docimpl.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::canCachePage):   Never let pages with password fields in the page cache.
        (KWQKHTMLPart::saveDocumentState):  Do not save form state if page has a form with
	a password field that would be submitted securely

darin's avatar
darin committed
505 506 507 508 509 510 511 512 513 514 515 516 517
2003-01-15  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

	- fixed problem where Content-Type was coming in with suffixes like "charset"

        * kwq/WebCoreBridge.h: Add contentType and refresh parameters, and remove "headers"
	parameter, from openURL method.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge openURL:reload:contentType:refresh:lastModified:pageCache:]): Get the
	content type from a parameter, and the refresh header from a separate parameter rather
	than extracting both from a headers dictionary.

darin's avatar
darin committed
518 519 520 521 522 523 524 525 526 527 528 529 530 531
2003-01-14  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- fixed 3147036 -- words separated only by newlines are getting rammed together on XML page
	- fixed 3147032 -- preformatted text is missing much whitespace on XML page

        * khtml/xml/xml_tokenizer.cpp: (XMLHandler::characters): Don't try to strip whitespace at all,
	because it needs to be in the DOM.

	- add support for more MIME types

        * khtml/khtml_part.cpp: (KHTMLPart::begin): Add "application/xml" and "application/xhtml+xml".

hyatt's avatar
hyatt committed
532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547
2003-01-14  David Hyatt  <hyatt@apple.com>

	Make FOUC work with XML.
	
        Reviewed by darin.

        * khtml/html/html_baseimpl.cpp:
        (HTMLBodyElementImpl::attach):
        * khtml/xml/dom_xmlimpl.cpp:
        (ProcessingInstructionImpl::ProcessingInstructionImpl):
        (ProcessingInstructionImpl::checkStyleSheet):
        (ProcessingInstructionImpl::isLoading):
        (ProcessingInstructionImpl::sheetLoaded):
        (ProcessingInstructionImpl::setStyleSheet):
        * khtml/xml/dom_xmlimpl.h:

darin's avatar
darin committed
548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581
2003-01-14  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- first cut at XML parsing with expat

        * khtml/khtml_part.cpp: (KHTMLPart::begin): Remove APPLE_CHANGES and use the XML
	code for text/xml documents.

        * WebCore.pbproj/project.pbxproj: Added the ForwardingHeaders to the project.
	Added new QXml files, removed old ones.

        * kwq/KWQXml.h: Removed.
        * kwq/KWQXml.mm: Removed.

        * kwq/KWQXmlAttributes.h: Added.
        * kwq/KWQXmlAttributes.mm: Added.
        * kwq/KWQXmlDefaultHandler.h: Added.
        * kwq/KWQXmlDefaultHandler.mm: Added.
        * kwq/KWQXmlSimpleReader.h: Added.
        * kwq/KWQXmlSimpleReader.mm: Added.

        * kwq/KWQString.h: Add fromUtf8 functions.
        * kwq/KWQString.mm: (QString::fromUtf8): Added. Simple implementation just
	calls fromStringWithEncoding. We may need something more efficient later,
	at least for all-ASCII text.

	- other changes

        * khtml/khtml_part.h: Fix spelling of occurrence.

        * khtml/misc/decoder.cpp: (Decoder::decode): Turn on Japanese auto-detect.
	It doesn't seem to work yet, but this does no harm.

582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597
2003-01-13  Richard Williamson   <rjw@apple.com>

        Fix for 3139120.  This patch was contributed by Mitz Pettel.  It correctly
        handles the visually ordered encodings.  The patch also picks up changes
        from kde that accounts for european numbers correctly in bidiReorderLine().
        
        Reviewed by Dave.

        * khtml/html/html_formimpl.cpp:
        (HTMLFormElementImpl::formData):
        * khtml/misc/decoder.cpp:
        (Decoder::setEncoding):
        * khtml/rendering/bidi.cpp:
        (RenderFlow::bidiReorderLine):
        * khtml/rendering/bidi.h:

darin's avatar
darin committed
598 599 600 601 602 603 604 605 606 607
2003-01-13  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

	- fixed 3143781 -- submitting the same form twice doesn't work properly
	(example at directory.apple.com)

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::submitForm): Only run the "don't submit the same
	form twice" logic when the form is one that affects the frame that the form is in.

608 609 610 611 612
2003-01-12  Darin Adler  <darin@apple.com>

        * WebCorePrefix.h: Needed to touch this file since we now have plain C source (expat).
        * kwq/KWQKHTMLPart.cpp: Reformatted a bit.

darin's avatar
darin committed
613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645
2003-01-12  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- first step towards integrating expat for XML support: make it compile and link

        * kwq/KWQXml.mm: (QXmlSimpleReader::parse): Put in a placeholder that calls expat.
	Mainly just used to make sure we link.

        * WebCore.pbproj/project.pbxproj: Added expat files.

        * expat/COPYING: Added.
        * expat/Changes: Added.
        * expat/MANIFEST: Added.
        * expat/README: Added.
        * expat/expat_config.h: Added.
        * expat/lib/ascii.h: Added.
        * expat/lib/asciitab.h: Added.
        * expat/lib/expat.h: Added.
        * expat/lib/iasciitab.h: Added.
        * expat/lib/internal.h: Added.
        * expat/lib/latin1tab.h: Added.
        * expat/lib/nametab.h: Added.
        * expat/lib/utf8tab.h: Added.
        * expat/lib/xmlparse.c: Added.
        * expat/lib/xmlrole.c: Added.
        * expat/lib/xmlrole.h: Added.
        * expat/lib/xmltok.c: Added.
        * expat/lib/xmltok.h: Added.
        * expat/lib/xmltok_impl.c: Added.
        * expat/lib/xmltok_impl.h: Added.
        * expat/lib/xmltok_ns.c: Added.

darin's avatar
darin committed
646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662
2003-01-12  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- minor cleanup of plug-in-related classes in ECMA directory

        * khtml/ecma/kjs_navigator.cpp: Remove unneeded PluginBase member functions
	ref() and deref(). Instead just make Plugin and MimeType both derive from
	PluginBase and remove APPLE_CHANGES.
        (Navigator::getValueProperty): Don't use "Konqueror" for the fallback.
	Just return Undefined() for that case since we will never reach it anyway.

	- simplify the logic in khtmlMoveMouseEvent so it's easier to decipher

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::khtmlMouseMoveEvent): By merging two
	identical if statements, the logic of this function becomes much clearer.

darin's avatar
darin committed
663 664 665 666 667 668 669 670 671 672 673 674 675
2003-01-12  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- fixed a bunch of places where KHTML did !x == y instead of !(x == y) or x != y.

        * khtml/css/cssstyleselector.cpp: (CSSStyleSelector::applyRule):
        * khtml/html/htmlparser.cpp: (KHTMLParser::insertNode):
        * khtml/misc/loader.cpp: (Cache::requestImage), (Cache::requestStyleSheet):
        * khtml/rendering/render_flow.cpp: (RenderFlow::setStyle):
	Changed !x == y to x != y. In each case, there's a reason that this does not create
	any problem in practice, which is why we didn't rush to get this in for beta 1.

darin's avatar
darin committed
676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702
2003-01-11  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3144789 -- reproducible crash in KHTMLParser::freeBlock on a page at www.library.arizona.edu

        * khtml/html/htmlparser.cpp: (KHTMLParser::finished): Call freeBlock here rather than
	waiting until the parser is destroyed. This fixes the bug because when the parser is
        destroyed, the document is already destroyed, so we have a dangling current pointer to an
	already-destroyed node.

	- fixed 3142024 -- crash/hang/assert on java.sun.com in HTMLTokenizer

	The bug was caused by an erroneous clicked signal that was being emitted by
	QListBox at just the wrong time.

        * kwq/KWQListBox.h: Added _changingSelection boolean.
        * kwq/KWQListBox.mm: (QListBox::QListBox): Set _changingSelection to false.
        (QListBox::setSelected): Set _changingSelection to true.
        (-[KWQListBoxTableViewDelegate tableViewSelectionDidChange:]): Only emit the "clicked"
	signal if _changingSelection is false.

        * khtml/html/htmltokenizer.h: Add debug-only boolean inWrite.
        * khtml/html/htmltokenizer.cpp: (HTMLTokenizer::HTMLTokenizer): Set inWrite to false.
	(HTMLTokenizer::write): Set inWrite to true.
	(HTMLTokenizer::~HTMLTokenizer): Assert that inWrite is not true.

darin's avatar
darin committed
703 704 705 706 707 708 709 710 711 712 713
2003-01-11  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- fixed 3136944 -- mouseover feedback over non-mapped part of image map claims
	link to current page

        * kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]):
	Change code so we won't call completeURL and complete a null ATTR_HREF (which is distinct
	from an empty ATTR_HREF). Did a similar cleanup on the image code.

darin's avatar
darin committed
714 715 716 717 718 719 720 721 722
2003-01-09  Darin Adler  <darin@apple.com>

        * WebCore.pbproj/project.pbxproj: Add the year 2003, remove CFBundleIconFile,
	bump marketing version to 0.8.1 and version to 52u to keep up with the branch,
	remove NSHumanReadableCopyright, remove NSPrincipalClass, remove SKIP_INSTALL
	that was in the Info plist instead of project settings.

        * English.lproj/InfoPlist.strings: Update to match above.

mjs's avatar
mjs committed
723 724 725 726 727 728 729 730 731 732 733
2003-01-09  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Dave.

	- fixed Radar 3143013 - hang trying to load spiny.com/software
	
        * khtml/rendering/render_table.cpp:
        (RenderTable::layoutRows): Check for the render root as a loop
	termination condition, to avoid an infinite loop for an absolute
	but non-fixed table cell.

734 735 736 737 738 739 740 741 742 743 744 745
2003-01-09  David Hyatt  <hyatt@apple.com>

	The "flow-mode" quirk for lists is just that - a quirk, and should
	not be applied when in strict mode.

	Fixes diveintomark.org's navigation bar on the front page (issue #2
	on his list).
	
        Reviewed by darin and maciej

        * khtml/css/html4.css:

746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762
2003-01-08  David Hyatt  <hyatt@apple.com>

	Finish the KONQBLOCK removal and make sure that table rows and
	cells encountered inside stray content cause the stray content to
	close so that the rows and cells can be part of the table.

	This fixes the versiontracker bug.  #3142319.
	
        Reviewed by darin.

        * khtml/html/htmlparser.cpp:
        (KHTMLParser::reset):
        (isTableRelatedTag):
        (KHTMLParser::insertNode):
        (KHTMLParser::popOneBlock):
        * khtml/html/htmlparser.h:

763 764 765 766 767 768 769 770 771 772 773 774 775 776 777
2003-01-08  David Hyatt  <hyatt@apple.com>

	Revert the redundancy that dirk noticed.

	Fixing issue #3 on diveintomark.org's list, which actually involved
	merging calcAbsoluteVertical to KHTML's trunk and then fixing
	a math error in the bottom computation.
	
        Reviewed by NOBODY (OOPS!).

        * khtml/html/html_baseimpl.cpp:
        (HTMLBodyElementImpl::parseAttribute):
        * khtml/rendering/render_box.cpp:
        (RenderBox::calcAbsoluteVertical):

cblu's avatar
cblu committed
778 779 780 781 782 783 784 785 786 787
2003-01-08  Chris Blumenberg  <cblu@apple.com>

	Fixed: 3111432 - Support OBJECT tags with type text/plain or text/html

        Reviewed by dave.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::createPart): call [_bridge frameRequiredForMIMEType:] to determine if we should create a plug-in view or iframe 
        * kwq/WebCoreBridge.h: add frameRequiredForMIMEType:

788 789 790 791 792 793 794 795 796 797 798 799
2003-01-08  Trey Matteson  <trey@apple.com>

	3136213 - Page loads stopped by backtracking don't finish when moving forward

	We need to remove the entry from the KHTML image cache when a load
	has an error, so it will be reloaded next time we try.	

        Reviewed by Darin,

        * khtml/misc/loader.cpp:
        (Loader::slotFinished):  Remove cache entry on job error.

darin's avatar
darin committed
800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818
2003-01-08  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- fixed 96/72 dpi snafu; no need to do something different for AppKit,
          because it always uses pixel sizes, not font size

        * khtml/css/css_valueimpl.cpp:
        * khtml/css/css_valueimpl.h:
        * khtml/css/cssstyleselector.cpp:
        * kwq/KWQPaintDeviceMetrics.mm:
	Rolled out change from 2002-12-05

	- a cut at implementing heretofore unimplemented QTextStream classes

        * kwq/KWQTextStream.h:
        * kwq/KWQTextStream.mm:
	First cut implementation.

mjs's avatar
mjs committed
819 820 821 822 823 824 825 826
2003-01-05  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by no one cause I'm just changing copyright strings.

        * WebCore.pbproj/project.pbxproj: Added non-Apple copyrights to
	copyright strings.
        * English.lproj/InfoPlist.strings: Likewise.

darin's avatar
darin committed
827 828 829 830
2003-01-05  Darin Adler  <darin@apple.com>

        * Resources/Info.plist: Fix "Apple Compupter" typo.

831 832 833 834 835 836 837 838 839 840 841 842
2003-01-04  Trey Matteson  <trey@apple.com>

	3098388 - Pressing the back button goes back two levels at allmusic.com	

	When processing an assignment to document.location, allow items to be added
	to history.  This parallels the existing treatment of window.location.href.

        Reviewed by Richard, Darin

        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLDocument::putValue):  Pass false for lockHistory arg of scheduleRedirection()

843 844 845 846 847 848 849 850 851 852
2003-01-04  Richard Williamson   <rjw@apple.com>

        I checked in kjs_window.cpp by accident.  The only change
        was a logging printf.  Back out that change.
        
        Reviewed by me.

        * khtml/ecma/kjs_window.cpp:
        (WindowFunc::tryCall):

853 854 855 856 857 858 859 860 861 862 863 864
2003-01-03  Richard Williamson   <rjw@apple.com>

        Fix for 3138425. Don't open a new window when document.open() is called
        with < 2 parameters.
        
        Reviewed by darin.

        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLDocFunction::tryCall):
        * khtml/ecma/kjs_window.cpp:
        (WindowFunc::tryCall):

rjw's avatar
rjw committed
865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896
2003-01-03  Richard Williamson   <rjw@apple.com>

        Fixed 3138743, 3138678, and 3138854.  Removed the RenderText
        widths cache, replaced it with a much simply monospace character
        cache.  Should be much faster for covered cases too!  Also fixed
        buffer overrun problem causing the crash in 3138854.
        
        Reviewed by darin.

        * khtml/rendering/font.cpp:
        (Font::isFixedPitch):
        * khtml/rendering/font.h:
        * khtml/rendering/render_text.cpp:
        (TextSlave::checkSelectionPoint):
        (RenderText::RenderText):
        (RenderText::setStyle):
        (RenderText::~RenderText):
        (RenderText::shouldUseMonospaceCache):
        (RenderText::cacheWidths):
        (RenderText::widthFromCache):
        (RenderText::trimmedMinMaxWidth):
        (RenderText::calcMinMaxWidth):
        (RenderText::setText):
        (RenderText::width):
        * khtml/rendering/render_text.h:
        * kwq/KWQFont.h:
        * kwq/KWQFont.mm:
        (QFont::isFixedPitch):
        * kwq/WebCoreTextRendererFactory.h:
        * kwq/WebCoreTextRendererFactory.m:
        (-[WebCoreTextRendererFactory isFontFixedPitch:]):

897 898 899 900 901 902 903 904 905 906
2003-01-03  John Sullivan  <sullivan@apple.com>
	
	- fixed 3138673 -- reproducible crash in JavaScript

        Reviewed by Darin, OK'ed by Don.

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::setTitle):
	Check for nil view or nil part before dereferencing.

907 908 909 910 911 912 913 914 915 916
2003-01-03  David Hyatt  <hyatt@apple.com>

	Fix for percentage table heights.  A check was missing to
	look for a fixed height on the containing block.
	
        Reviewed by darin

        * khtml/rendering/render_table.cpp:
        (RenderTable::layoutRows):

kocienda's avatar
kocienda committed
917 918
=== Alexander-48 ===

919 920 921 922 923 924 925 926 927 928 929
2003-01-02  David Hyatt  <hyatt@apple.com>

	Fix for 3136473.  <object>s with no specified size should be
	0x0.  They should not be 300x200.  Fixes thinker.org.
	
        Reviewed by john and darin.

        * khtml/rendering/render_frames.cpp:
        (RenderPart::intrinsicWidth):
        (RenderPart::intrinsicHeight):

darin's avatar
darin committed
930 931 932 933 934 935 936 937 938 939 940 941 942 943 944
2003-01-02  Darin Adler  <darin@apple.com>

        Reviewed by Maciej and Trey.

	- fixed 3138063 -- REGRESSION: JavaScript-submitted form activates input type=image (webmail.mac.com)

	JavaScript-submitted forms must not get a submit button activated as return-key-submitted ones do.

        * khtml/html/html_formimpl.h: Add boolean activateSubmitButton parameter to submit.
        * khtml/html/html_formimpl.cpp:
        (HTMLFormElementImpl::prepareSubmit): Pass true for activateSubmitButton.
        (HTMLFormElementImpl::submit): Only activate a button if activateSubmitButton is true.

        * khtml/dom/html_form.cpp: (HTMLFormElement::submit): Pass false for activateSubmitButton.

945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962
2003-01-02  David Hyatt  <hyatt@apple.com>

	Fix for the 3137790.   This patch passes the mouse event x and y as 
	distinct arguments to constructZTree, so that the damageRect can 
	really reflect your clip rect.  
	This allows me to prune out layers that are clipped so
	that if x,y aren't inside the clip rect, the layer doesn't get added to
	the list.

	This patch also makes the "clip" property apply to the element that specifies the clip instead of to the element's kids.  This is ambiguous in the spec, but it turns out other browsers do it this way, so there really is an interpretation that must be followed. :)
        
	Reviewed by darin

        * khtml/rendering/render_layer.cpp:
        (RenderLayer::nodeAtPoint):
        (RenderLayer::constructZTree):
        * khtml/rendering/render_layer.h:

963 964 965 966 967 968 969 970 971 972 973
2003-01-02  David Hyatt  <hyatt@apple.com>

	Fix for bug #3137935.  When a float causes a line to get
	moved down past the float, the line would incorrectly break
	rather than expanding to use the newly-available width.
	
        Reviewed by darin.

        * khtml/rendering/bidi.cpp:
        (RenderFlow::findNextLineBreak):

darin's avatar
darin committed
974 975 976 977 978 979 980 981 982
2003-01-02  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3131190 -- <textarea wrap="hard"> eats text on blur

        * kwq/KWQTextArea.mm: (-[KWQTextArea paragraphs]): Add missing parentheses so we don't
	always return 0 or 1 for the number of paragraphs.

mjs's avatar
mjs committed
983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004
2002-12-31  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3130831 - HOMEPAGE: JavaScript that tries to intercept onmousedown fails, image gets dragged instead
	- fixed 3125554 - while dragging to select text in a nested frame, you can start dragging a link or image
	
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
	(KWQKHTMLPart::KWQKHTMLPart): Initialize new mouseDownMayStartDrag
	and mouseDownMayStartSelect methods.
        (KWQKHTMLPart::khtmlMousePressEvent): Make sure a mouse down
	won't be used to start a drag or selection if the default action
	is prevented on the mouse down event.
	(KWQKHTMLPart::mouseDown): Since the default action wasn't
	prevented, decide if this might be the start of a drag or
	selection.
        (KWQKHTMLPart::khtmlMouseMoveEvent): On a drag or selection, call
	back to the bridge to handle selection or autoscrolling
	appropriately.
	* kwq/WebCoreBridge.h: Prototype new methods.

darin's avatar
darin committed
1005 1006 1007 1008 1009 1010 1011 1012 1013
2003-01-01  Darin Adler  <darin@apple.com>

        Reviewed by Don.

	- fixed 3137566 -- non-reproducible nil-dereference in KHTMLView::clearPart
	deallocating KWQPageState

        * kwq/KWQPageState.mm: (-[KWQPageState dealloc]): Add nil check.

1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027
2003-01-01  David Hyatt  <hyatt@apple.com>

	Fix tables so that malformations inside them are properly pulled
	out of the table without being flattened. 

	Fixes 3131480.
	
        Reviewed by gramps

        * khtml/html/dtd.cpp:
        (DOM::checkChild):
        * khtml/html/htmlparser.cpp:
        (KHTMLParser::insertNode):

kocienda's avatar
kocienda committed
1028 1029
=== Alexander-47 ===

darin's avatar
darin committed
1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052
2002-12-30  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

	- fixed 3132141 -- enter key does not work with input type=image

	Made the logic handle image and submit type inputs in the same way.

        * khtml/html/html_formimpl.h: Remove unused m_clicked flags.
        * khtml/html/html_formimpl.cpp:
        (HTMLButtonElementImpl::HTMLButtonElementImpl): Remove code to set the m_clicked flag.
	The only place this flag was looked at is better handled by the m_activeSubmit flag.
        (HTMLButtonElementImpl::defaultEventHandler): Remove more m_clicked flag code.
        (HTMLInputElementImpl::HTMLInputElementImpl): Remove more m_clicked flag code.
        (HTMLInputElementImpl::isSuccessfulSubmitButton): An image is also a successful submit
	button, and unlike a submit element, it doesn't require a name because it will just submit
        x and y with no name in that case. I suppose we could rename this function, but I think it's
        still a pretty clear name even if not 100% accurate.
        (HTMLInputElementImpl::encoding): Remove use of m_clicked and use m_activeSubmit instead.
	This was the only place using m_clicked at all. Also remove bogus check for a -1 coordinate.
	The coordinate defaults to 0, not -1, and it was never happening.
        (HTMLInputElementImpl::defaultEventHandler): Remove more m_clicked flag code.

1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063
2002-12-30  David Hyatt  <hyatt@apple.com>

	Fix for 3129016, make sure that zero-height tables and lists
	will be skipped in a search for floats that occur before
	them.  Makes usatoday work.
	
        Reviewed by gramps

        * khtml/rendering/render_flow.cpp:
        (RenderFlow::clearFloats):

darin's avatar
darin committed
1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076
2002-12-30  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- fixed 3135642 -- ad frames are missing at channels.netscape.com

        * khtml/rendering/render_frames.cpp: (RenderPartObject::updateWidget): Updated to use the
	same rule as Mozilla: Empty URL for an iframe means "about:blank".

        * khtml/ecma/kjs_window.cpp: (Window::isSafeScript): Loosen things so that it's safe for
	a frame to manipulate an empty child frame, as well as an empty opened window. Also remove
	the useless check for an empty document -- it never happens in practice.

kocienda's avatar
Tests:  
kocienda committed
1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092
2002-12-30  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Darin and Gramps

	Fix for this bug:

	Radar 3136795 (type URL with ../ in it, get assertion)

	The code to remove relative portions from URLs was eating leading slashes on
	URL paths. This caused absolute paths with relative portions to get mangled,
	resulting in a URL that the engine could not use. Now, leading slashes are no
	longer removed from URL paths, resulting in usuable URLs.

        * kwq/KWQKURL.mm:
        (copyPathRemovingDots)

darin's avatar
darin committed
1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117
2002-12-29  Darin Adler  <darin@apple.com>

        Reviewed by Don.

	- fixed 3103287 -- body of page not rendered (page uses JavaScript trick to be both a frameset and a frame)

	Our self-reference protection prevented this page from working.
	To fix the bug, I did three things:

   	    1) fixed the hole in the WebCore self-reference protection, so we could remove the WebKit one
               (the hole was that it didn't ignore #xxx suffixes)
 	    2) moved the self-reference protection into a single function so it wasn't copied and pasted all over
	    3) allowed one level of self-reference; still enough to prevent infinite recursion

	Then I tested with the site from bug 3103287 and the one from bug 3083732 to make sure that was still OK.

        * khtml/html/html_baseimpl.h: Added isURLAllowed().
        * khtml/html/html_baseimpl.cpp:
        (HTMLFrameElementImpl::isURLAllowed): Added. Does the self-reference check and the "local only" check.
	This logic was repeated in three different places before. Note that since we don't use the "local only"
        feature, it's not too risky to slightly change how it works.
        (HTMLFrameElementImpl::updateForNewURL): Use isURLAllowed.
        (HTMLFrameElementImpl::attach): Ditto.
        (HTMLIFrameElementImpl::attach): Ditto.

darin's avatar
darin committed
1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146
2002-12-29  Darin Adler  <darin@apple.com>

        Reviewed by Don.

	- fixed 3130566 -- REGRESSION: list item numbers are overlapping the text of the list items

	Moved the hack that handles list items that are not in lists out of the parser and into
	the DOM and Render tree code itself. This fixes the issue where the parser doesn't know which
	will be the parent node of the list item, and other problems with the old hack.

        * khtml/html/html_listimpl.cpp: (HTMLLIElementImpl::attach): Find the parent list (OL or UL).
	If there is no parent list, set a "not in list" flag on the render object so it knows to render
	"inside" no matter what the style says. Also use this parent and a safer check to make the
	start attribute work even when there is an intervening DOM element in the hierarchy.

        * khtml/html/htmlparser.cpp: (KHTMLParser::getElement): Remove the code that tries to set
	the style of an LI based on the current node at the time it's parsed, because the current node
	is now often not the OL or the UL due to our DTD fix to allow other nodes in lists.

        * khtml/rendering/render_list.h: Add isInside() to RenderListMarker, setNotInList(), notInList(),
	and _notInList to RenderListItem.

        * khtml/rendering/render_list.cpp:
        (RenderListItem::RenderListItem): Initialize _notInList to false.
        (RenderListMarker::paintObject): Use isInside() instead of checking listStylePosition().
        (RenderListMarker::calcMinMaxWidth): Ditto.
        (RenderListMarker::baselinePosition): Ditto.
        (RenderListMarker::isInside): Return true if we are not in a list, or if "inside" style is requested.

darin's avatar
darin committed
1147 1148 1149 1150 1151 1152 1153 1154
2002-12-29  Darin Adler  <darin@apple.com>

        Reviewed by Don.

	- fixed 3134346 -- country menu at www.apple.com does not work when you go back to that page

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::openURLFromPageCache): Add call to checkCompleted().

darin's avatar
darin committed
1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166
2002-12-29  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- fixed 3136391 -- PianoNanny.com screens turn to garbage when resized

	Turns out browsers pass open calls to the window object if they show up at the document
	with parameters. We now emulate that too.

        * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocFunction::tryCall): If we get an open call with
	parameters, pass it on to the window.

darin's avatar
darin committed
1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178
2002-12-29  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

	- fixed 3134560 -- Lord of the Rings desktops don't load

        * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Removed the APPLE_CHANGES here.
	The comment claims that we don't need the code because "JavaScript will do the work
	below on demand", but that's not true for setting the base URL. Also, the comment
	claims that this "adds an extra entry to the back/forward list", but testing does not
	bear that out.

kocienda's avatar
kocienda committed
1179 1180
=== Alexander-46 ===

kocienda's avatar
kocienda committed
1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203
2002-12-28  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Gramps and Richard.

	Fix for this bug:

	Radar 3112233 (400 response when attaching files at mail.yahoo.com)

	KHTML multipart form code called into KMimeType class to determine
	the mime type for file attachments, however, our implementation of
	KMimeType has only stubs which call ERROR.

	I added some code into KWQKHTMLPart and WebCoreBridge so that the
	code in html_formimpl can call through to the WebFoundation mime
	file map we maintain.

        * khtml/html/html_formimpl.cpp:
        (HTMLFormElementImpl::formData)
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::mimeTypeForFileName)
        * kwq/WebCoreBridge.h:

darin's avatar
darin committed
1204 1205 1206 1207 1208 1209 1210 1211 1212 1213
2002-12-26  Darin Adler  <darin@apple.com>

        Reviewed by Don.

	- fixed 3136262 -- Shockwave Flash at movies.yahoo.com does not work

        * khtml/rendering/render_frames.cpp: (RenderPartObject::updateWidget):
	Moved the class ID special case MIME types out of the if statement so they can be shared
	in the case where we have an embed tag but no MIME type.

darin's avatar
darin committed
1214 1215 1216 1217 1218 1219 1220
2002-12-26  Darin Adler  <darin@apple.com>

        Reviewed by Don.

        * kwq/KWQAssertions.h: Fixed CRASH macro to use 0xbbadbeef instead of 0xbadbeef
	to reduce the chance that the address will be valid once we have allocated a lot of memory.

1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235
2002-12-24  Richard Williamson   <rjw@apple.com>

        Fix for 3134543 (and widely reported dupes).  Don't use render_text
        widths cache except for whitespace == PRE.  The problem was that additional
        spaces in the RenderText's string were being inappropiately measured.
        An alternate, more complex and risky, fix would account for the whitespace
        properties during scanning of the RenderText width buffer.  Considering 
        the scenario for which this optimization was added (3133261), this
        simpler fix is adequate.
        
        Reviewed by Darin and Don.

        * khtml/rendering/render_text.cpp:
        (RenderText::computeWidths):

darin's avatar
darin committed
1236 1237 1238 1239 1240 1241 1242 1243 1244
2002-12-24  Darin Adler  <darin@apple.com>

        Reviewed by Don.

	- fixed 3135010 -- nil-dereference in KHTMLPart::xmlDocImpl() at channels.netscape.com

        * khtml/html/html_baseimpl.cpp: (HTMLFrameElementImpl::contentDocument):
        Add missing nil check. Also added lots of FIXME comments about problems I observed here.

darin's avatar
darin committed
1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259
2002-12-24  Darin Adler  <darin@apple.com>

        Reviewed by Richard and Don.

	- fixed 3133207 -- crash in HTMLFrameElementImpl updateForNewURL at home.real.com

	My previous attempt to fix this dealt with the case where a RenderFrame object was
	not yet created, but not with the case where a RenderFrame object was created without
	a corresponding part. Somehow I overlooked this last time when I was doing testing.
	Testing this time confirms this takes care of the remaining problem at movies.real.com.

        * khtml/html/html_baseimpl.cpp: (HTMLFrameElementImpl::updateForNewURL):
	Use the same kind of requestFrame call here as in attach when there's a RenderFrame,
	but no corresponding part. Maybe we can fix this an even more elegant way later.

kocienda's avatar
kocienda committed
1260 1261
=== Alexander-45 ===

darin's avatar
darin committed
1262 1263
2002-12-23  Darin Adler  <darin@apple.com>

darin's avatar
darin committed
1264
        Reviewed by John.
darin's avatar
darin committed
1265 1266 1267 1268 1269 1270 1271 1272 1273 1274

	- fixed 3134558 -- REGRESSION: Lord of the Rings site problems

	This regression was caused when we fixed the abcnews.com problem (3124933).

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::createEmptyDocument):
	Despite its name, this function was never intended to overwrite an existing document with
	an empty document. When we changed it do do the creation in a better way, we lost the
	check that prevents it from doing anything at all if we already have a document.

darin's avatar
darin committed
1275 1276
2002-12-22  Darin Adler  <darin@apple.com>

darin's avatar
darin committed
1277
        Reviewed by Don.
darin's avatar
darin committed
1278 1279 1280 1281 1282 1283

	- fixed 3134383 -- crash in KWQKHTMLPart::canCachePage at www.apple.com

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::canCachePage):
	Check for nil in the result of Window::retrieveWindow.

sheridan's avatar
alex-44  
sheridan committed
1284 1285
=== Alexander-44 ===

darin's avatar
darin committed
1286 1287 1288 1289 1290 1291 1292 1293 1294 1295
2002-12-20  Darin Adler  <darin@apple.com>

        Reviewed by Trey and Don.

	- fixed 3132160 -- meta refresh does not work if there's a space after the refresh interval value

        * khtml/xml/dom_docimpl.cpp: (DocumentImpl::processHttpEquiv):
	Added a call to stripWhiteSpace here. The other places that processes delays for
	meta refresh already had the stripWhiteSpace call, but this was missing it.

1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307
2002-12-20  David Hyatt  <hyatt@apple.com>

	Fix for 3134163, a regression from the reduction of
	styleForElement calls.  Make sure image buttons
	get the width attribute and add it to style info
	before styleForElement gets called.
	
        Reviewed by rjw

        * khtml/html/html_formimpl.cpp:
        (HTMLInputElementImpl::attach):

1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320
2002-12-20  David Hyatt  <hyatt@apple.com>

	Fix for 3134133. Back out the render_text code I gave to rjw
	to check in.  It wasn't filling in a value for hasBreak, so it
	became random whether or not you'd break or not.
	
        Reviewed by rjw

        * khtml/rendering/render_text.cpp:
        (RenderText::trimmedMinMaxWidth):
        (RenderText::calcMinMaxWidth):
        * khtml/rendering/render_text.h:

darin's avatar
darin committed
1321 1322 1323 1324 1325 1326 1327 1328 1329
2002-12-20  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

	- fixed 3133801 -- REGRESSION: Japanese page comes up hash

        * khtml/khtml_part.cpp: (KHTMLPart::write): Roll back to original KHTML code here,
	removing the "all ASCII" optimization.

1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341
2002-12-20  David Hyatt  <hyatt@apple.com>

	Fix for 3133081, slashdot messed up when changing font sizes.
	setStyle in RenderFlow was messed up for continuations.  A
	block in the middle of a continuation incorrectly propagated
	its style to the following inlines.
	
        Reviewed by darin

        * khtml/rendering/render_flow.cpp:
        (RenderFlow::setStyle):

1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352
2002-12-20  Richard Williamson   <rjw@apple.com>

        Fix for 3133601.  Play the same trick we do in
        KHTMLPartBrowserExtension::openURLRequest to create an empty
        document if necessary.
        
        Reviewed by darin.

        * khtml/ecma/kjs_window.cpp:
        (Window::get):

1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376
2002-12-19  David Hyatt  <hyatt@apple.com>

	Remove the clip hack from setLayout and make it
	asynchronous instead.  This fixes the crasher
	on autosite.com, which had a sync layout occur
	while in the middle of making a block box's
	children get wrapped in anonymous boxes.  It
	was only half done when the layout got
	triggered, which is what caused the assert to fire.

	The bug # is 3129534.
	
        Reviewed by rjw

        * khtml/khtmlview.cpp:
        (KHTMLView::KHTMLView):
        (KHTMLView::timerEvent):
        (KHTMLView::scheduleRelayout):
        * khtml/khtmlview.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::setLayouted):
        (RenderObject::scheduleRelayout):
        * khtml/rendering/render_object.h:

darin's avatar
darin committed
1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389
2002-12-20  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3129387 -- Stopped responding to controls while filling out form (exception in KWQTextArea)

        * kwq/KWQTextArea.mm:
        (-[KWQTextArea getCursorPositionAsIndex:inParagraph:]): Fix code that was returning the wrong
	paragraph number along with the index within the paragraph. Also made it return a paragraph one
	past the end with an index of 0 for cases where you are at the end of the text.
        (-[KWQTextArea setCursorPositionToIndex:inParagraph:]): Range check the passed-in index. This
	would also have prevented the exception.

sheridan's avatar
sheridan committed
1390 1391
=== Alexander-43 ===

darin's avatar
darin committed
1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413
2002-12-20  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3132382 -- crash in khtml::CachedImage

	The source of this bug was my long-ago fix to bug 3079499.
	I changed the code to copy the clients list. But this doesn't work if
	one of the clients is removed while iterating because it's deleted.
	So I made a new class, CachedObjectClientWalker, that does the iterating safely.
	Now both this new bug and the original are fixed.

        * khtml/misc/loader.cpp:
        (CachedCSSStyleSheet::checkNotify): Use CachedObjectClientWalker to walk the list.
        (CachedScript::checkNotify): Ditto.
        (CachedImage::do_notify): Ditto.
        (CachedImage::movieStatus): Ditto.
        (CachedImage::checkNotify): Ditto.
        (CachedObjectClientWalker::next): Walk the list using a list iterator, which is
	safe against the current item being removed. But go that safety one better by making
	sure you don't miss the item after one that's removed.

kocienda's avatar
kocienda committed
1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436
2002-12-20  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Darin

	Fix for this bug:

	Radar 3132171 (trying to login at mypage.apple.com gives "Already Connected" message)

	The issue is that we submit the login form more than once when the user hits
	the return key to submit rather than clicking the submit button. We are also
	susceptible to double form submissions from buggy scripts that ask to submit
	more than one form.

	The fix is to prevent the KWQKHTMLPart from submitting more than one form by
	setting and checking a flag.

        * kwq/KWQKHTMLPart.h: Add a form submit flag.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::submitForm): Check form submit flag. Return if a form
	has already been submitted.
        (KWQKHTMLPart::setView): Reset form flag. This is done since the part 
	may have been retrieved for reuse from the bac/forward cache.

rjw's avatar
rjw committed
1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461
2002-12-20  Richard Williamson   <rjw@apple.com>

        Fixed 3133261.  This fix really has two parts.  This first part
        fixes the stupid stack allocated buffer that caused the crash.
        The second part makes any RenderText with a large string perform
        much faster.  The page mentioned in the bug used to load and draw
        in about 15 minutes.  Now it loads in about 10 seconds and draws in about
        2 seconds.  The performance optimization caches a widths array
        for the string in the RenderText, and only updates that array if
        the font or text for the RenderText change.  
        
        Reviewed by john.

        * khtml/rendering/render_text.cpp:
        (RenderText::RenderText):
        (RenderText::setStyle):
        (RenderText::~RenderText):
        (RenderText::computeWidths):
        (RenderText::widthFromBuffer):
        (RenderText::trimmedMinMaxWidth):
        (RenderText::calcMinMaxWidth):
        (RenderText::setText):
        (RenderText::width):
        * khtml/rendering/render_text.h:

trey's avatar
trey committed
1462 1463 1464 1465 1466 1467 1468 1469 1470
2002-12-20  Trey Matteson  <trey@apple.com>

	We now build with symbols the B&I.  Deployment builds are without symbols,
	so it is easy to generate a non-huge app as a one-off.

        Reviewed by Darin

        * WebCore.pbproj/project.pbxproj:

darin's avatar
darin committed
1471 1472 1473 1474 1475 1476 1477 1478 1479 1480
2002-12-20  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3129824 -- crash in QWidget::getView in KWQKHTMLPart::passSubframeEventToSubframe

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::passWidgetMouseDownEventToWidget):
	Check for a nil QWidget in a RenderWidget, and ERROR and return true in that case.
	We don't want to return false because otherwise the KHTML code will try to draw a frame splitter.

darin's avatar
darin committed
1481 1482 1483 1484 1485 1486 1487 1488 1489 1490
2002-12-20  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3131449 -- crash in DOMNamedNodesCollection::tryGet opening a new window from JavaScript

        * khtml/ecma/kjs_dom.cpp: (DOMNamedNodesCollection::tryGet):
	Add range checking. If the index is out of range fall back to the parent tryGet,
	which will eventually just return Undefined().

darin's avatar
darin committed
1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529
2002-12-20  Darin Adler  <darin@apple.com>

        Reviewed by Richard and John.

	- fixed 3133207 -- crash in HTMLFrameElementImpl updateForNewURL at home.real.com

	This refines Maciej's fix for 3052113, 3075392, and 3125412.

        * khtml/html/html_baseimpl.h: Remove detach() and parentWidget from HTMLFrameElementImpl.
        * khtml/html/html_baseimpl.cpp:
        (HTMLFrameElementImpl::HTMLFrameElementImpl): Take out initialization of unused parentWidget.
        (HTMLFrameElementImpl::updateForNewURL): Add case for when we are attached by did not allocate
	a render object. In that case we just detach so we can attach again. Also fix the self-reference
	check which was in there but not working.
        (HTMLFrameElementImpl::detach): Remove method since all it did was set unused parentWidget. 
        (HTMLIFrameElementImpl::attach): Remove unused depth computation.

	- fixed more leaks

        * khtml/rendering/render_replaced.h: Made the deref method inherited from khtml::Shared
	private by using private inheritance. Changed the name of arenaDeref to deref, but it still
	takes an arena parameter. Now incorrect deref's are compile-time errors instead of potential leaks.
        * khtml/rendering/render_replaced.cpp:
        (RenderWidget::detach): Rename arenaDeref to deref.
        (RenderWidget::resizeWidget): Ditto.
        (RenderWidget::eventFilter): Ditto.
        (RenderWidget::deref): Ditto.

        * khtml/rendering/render_form.cpp: (RenderFormElement::slotClicked):
	Pass the arena when deref'ing the RenderFormElement.
        * kwq/WebCoreBridge.h: Add a field for the arena for the RenderPart.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge dealloc]): Pass the arena when deref'ing the RenderPart.
        (-[WebCoreBridge setRenderPart:]): Pass the arena when deref'ing the RenderPart. Store the arena
	of the new part when storing the part pointer.

        * khtml/xml/dom_docimpl.cpp: (DocumentImpl::~DocumentImpl): Assert that the render object is
	not nil, in an attempt to catch a leak I observed yesterday.

darin's avatar
darin committed
1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633
2002-12-20  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- fixed 3129129 -- leak of 820 RenderStyle objects each time we run cvs-base

	The RenderStyle objects were the tip of an iceberg.
        
        I fixed a lot of leaks, but there are still some remaining.

	Note that these changes will make Development builds slower because they disable
	the arena allocator in favor of assertions that check we are using it correctly.
	But the changes make Deployment builds slightly faster.

        * khtml/html/html_baseimpl.cpp: (HTMLFrameSetElementImpl::attach):
	Fix a leak in the !isStyleAvailable() case by ref'ing and deref'ing the style.

        * khtml/html/html_formimpl.cpp:
        (HTMLFormElementImpl::attach): Fix a leak by getting the style from the render
	object instead of calling styleForElement again, which makes a new one.
        (HTMLFormElementImpl::parseAttribute): Ditto.
        (HTMLInputElementImpl::attach): Fix a leak by using the style in the local
	variable rather than calling styleForElement again.

        * khtml/html/html_imageimpl.cpp:
        (HTMLImageElementImpl::parseAttribute): Fix a leak by getting the style from the render
	object instead of calling styleForElement again, which makes a new one.
        (HTMLImageElementImpl::attach): Fix a leak by using the style in the local
	variable rather than calling styleForElement again.

        * khtml/html/html_inlineimpl.cpp: (HTMLBRElementImpl::attach):
	Fix a leak in the display() == NONE case by ref'ing and deref'ing the style.

        * khtml/html/html_objectimpl.cpp: (HTMLObjectElementImpl::attach): Fix a leak by using
	the style in the local variable rather than calling styleForElement again.

        * khtml/rendering/bidi.cpp:
        (BidiIterator::detach): Added debugging code to detect if someone does a delete directly,
	which will not deallocate the object because it won't run the correct arena code.
        (BidiIterator::operator delete): Ditto.
        (appendRunsForObject): Fix a leak by detaching bidi iterators when they are removed from
	the list. The list can't delete them because it doesn't have the arena pointer.
        (deleteMidpoints): Fix a leak by not removing the items from the list until done iterating.
	The old code would fail to delete half the items.

        * khtml/rendering/render_container.cpp:
        (RenderContainer::detach): Detach the continuation here. Before we removed it but did not
	detach it, which led to a leak.
        (RenderContainer::removeChild): Do not remove the continuation here. If we do, then we can't
	detach successfully. No one depends on this removing the continuation.
        (RenderContainer::removeLeftoverAnonymousBoxes): Detach the child, don't just delete it.
	This fixes a leak.

        * khtml/rendering/render_flow.cpp: (RenderFlow::removeChild): Detach the child, don't just
	delete it. This fixes a leak.

        * khtml/rendering/render_object.h: Added arenaDelete.
        * khtml/rendering/render_object.cpp:
        (RenderObject::operator delete): Added debugging code to detect if someone does a delete directly,
	which will not deallocate the object because it won't run the correct arena code.
        (RenderObject::detach): Ditto.
        (RenderObject::arenaDelete): Put the low-level delete here, so that subclasses (RenderWidget)
	can call it.

        * khtml/rendering/render_replaced.h: Add arenaDeref and make deref private so derived classes
	won't use it by accident.
        * khtml/rendering/render_replaced.cpp:
        (RenderWidget::detach): Use the new arenaDeref instead of deref, since we need to pass the
	arena pointer in to delete.
        (RenderWidget::resizeWidget): Ditto. Store the arena before calling back, since we can't get it
	once it's detached from its parent.
        (RenderWidget::eventFilter): Ditto.
        (RenderWidget::arenaDeref): Added. Calls RenderObject's arenaDelete.

	- other changes

        * khtml/rendering/render_arena.cpp:
        (RenderArena::allocate): Added debugging code that stores a signature, arena pointer, and size,
	and uses malloc rather than the arena.
        (RenderArena::free): Check the signature, arena pointer, and size, and use free.

        * khtml/rendering/render_layer.cpp:
        (RenderLayer::operator delete): Added debugging code to detect if someone does a delete directly,
	which will not deallocate the object because it won't run the correct arena code.
        (RenderLayer::detach): Ditto.
        (RenderLayer::RenderLayerElement::operator delete): Ditto.
        (RenderLayer::RenderLayerElement::detach): Ditto.
        (RenderLayer::RenderZTreeNode::operator delete): Ditto.
        (RenderLayer::RenderZTreeNode::detach): Ditto.

        * khtml/rendering/render_text.cpp:
        (TextSlave::detach): Added debugging code to detect if someone does a delete directly,
	which will not deallocate the object because it won't run the correct arena code.
        (TextSlave::operator delete): Ditto.

        * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::createContextualFragment):
	Save one new/delete by using a stack-based HTMLTokenizer and add FIXMEs about
	some possible leaks I spotted here.

        * khtml/rendering/render_list.cpp: (RenderListItem::setStyle): Took out APPLE_CHANGES from around
	a generally useful bug fix.

        * WebCore.pbproj/project.pbxproj: Let Electron be Electron. 

sheridan's avatar
sheridan committed
1634 1635
=== Alexander-42 ===

1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675
2002-12-19  David Hyatt  <hyatt@apple.com>

	Fix for 3129393, crasher on sundancecatalog.com.  There
	are two elements to this fix.  The basic problem was that
	sundancecatalog was saying:

	<table style="display: inline">

	In WinIE, this turns into an inline-table and not an inline.
	In Gecko this does not happen.  Like Gecko, we treated this
	as an inline, so we triggered a problem in my inline splitting
	code.  

	The first fix was to bulletproof my inline splitting code to
	ensure all new render objects are fully connected before children
	are added, so that you can get to renderArenas at all times.

	The second fix implements the WinIE quirk and turns the table
	into an inline-table so that you avoid a complete garbage
	render tree.
	
        Reviewed by trey

        * khtml/css/html4.css:
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::layout):
        (RenderFlow::splitFlow):
        (RenderFlow::addChildToFlow):
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_list.cpp:
        (RenderListMarker::lineHeight):
        * khtml/rendering/render_list.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::createObject):
        * khtml/rendering/render_table.cpp:
        (RenderTable::lineHeight):
        (RenderTable::baselinePosition):
        (RenderTable::setStyle):
        * khtml/rendering/render_table.h:

darin's avatar
darin committed
1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693
2002-12-19  Darin Adler  <darin@apple.com>

        Reviewed by John.

	A number of non-reproducible bugs look like they may be due to bad
	event objects. I was assuming that callers retained the events until
	the functions handling them returned, but that assumption may be wrong.
	So I'm retaining/releasing the current event. This is correct in any case.
	I'm also adding a new assertion, but since assertions are in Development
	builds only that is very low risk.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::keyEvent): Add retain/release and a new assertion.
        (KWQKHTMLPart::mouseDown): Ditto.
        (KWQKHTMLPart::mouseDragged): Ditto.
        (KWQKHTMLPart::mouseUp): Ditto.
        (KWQKHTMLPart::mouseMoved): Ditto.

sheridan's avatar
sheridan committed
1694 1695
=== Alexander-41 ===

1696 1697 1698 1699 1700 1701 1702 1703 1704 1705
2002-12-18  Richard Williamson   <rjw@apple.com>

        Added an ASSERT to ensure that 3127329 isn't still happening.
        This bug should have been fixed be earlier changes.
        
        Reviewed by darin.

        * kwq/KWQPageState.mm:
        (-[KWQPageState dealloc]):

1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717
2002-12-18  Chris Blumenberg  <cblu@apple.com>

	Fixed: 3131267 - REGRESSION: Java 1.4.1 Applets Restarted When Window is Resized
	Fixed: 3131244 - REGRESSION: Java 1.4.1 Multiple Copies of Applet Started When Window is Resized

	Dave recently patched khtml with a fix for media content inside of table cells. The patch causes the java widget to get the layout call more than once. Calling layout more than once is perfectly allowed, but the java widget wasn't prepared for that and would create a new java view for each layout. We now only create a java view when the java view hasn't already been created.

        Reviewed by darin.

        * kwq/KWQKJavaAppletWidget.mm:
        (KJavaAppletWidget::showApplet): If the view of the widget is still a KWQView, we haven't replaced it with the Java view. This stops multiple view from being created.

sheridan's avatar
sheridan committed
1718 1719
=== Alexander-40 ===

trey's avatar
trey committed
1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732
2002-12-18  Trey Matteson  <trey@apple.com>

	3098388 - Pressing the back button goes back two levels at allmusic.com

	In support of the fix for this bug, WebCore passes khtml's lockHistory setting
	up through the bridge.

        Reviewed by Darin

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::redirectionTimerStartedOrStopped):  Pass it along.
        * kwq/WebCoreBridge.h:

mjs's avatar
Tools:  
mjs committed
1733 1734 1735 1736 1737 1738 1739 1740
2002-12-18  Maciej Stachowiak  <mjs@apple.com>

	Reviewed by John.

	- fixed 3131171 - Change Alex versions to satisfy both marketing and B&I requirements
	
        * English.lproj/InfoPlist.strings:

mjs's avatar
mjs committed
1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777
2002-12-18  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Trey and Darin.

	- fixed 3124933 - abcnews.com leads to empty window with sheet complaining about javascript: URL
	- fixed 3091248 - picture does not show up in window from epinions
	

        * khtml/ecma/kjs_window.cpp:
        (Window::get): Put back document-creating code that was in #if
	!APPLE_CHANGES.
	(Window::isSafeScript): Extend access to a window that was opened
	to no URL or to about:blank by the active window.
        (shouldLoadAsEmptyDocument): Helper for the above.
        (WindowFunc::tryCall): Update APPLE_CHANGES comments - now it's
	clear we don't need to create a document in a fresh window
	(accessing document will take care of that), and that it will be
	counter-productive, possibly adding a useless entry to the
	back/forward list.
        * khtml/khtml_part.cpp:
        (KHTMLPart::begin): If we're not loading a URL, make a dummy
	document (the call will check if we have a dummy document
	already).
        * kwq/KWQKHTMLPart.mm:
	(KWQKHTMLPart::createEmptyDocument): Isntead of setting up a
	half-assed document, ask bridge to synchronously load a fully
	assed (but empty) document. Renamed from createDummyDocument.
        * kwq/KWQKHTMLPartBrowserExtension.mm:
        (KHTMLPartBrowserExtension::openURLRequest): Decode script. Also,
	check if return value is a string - if so, write it into the
	document. Maybe we want this to be more general.
        * kwq/KWQKURL.mm:
        (KURL::KURL): Changed to successfully resolve absolute URLs
	against an empty base URL.
        * kwq/WebCoreBridge.h: prototyped new
	loadEmptyDocumentSynchronously method.

cblu's avatar
cblu committed
1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795
2002-12-18  Chris Blumenberg  <cblu@apple.com>

	Fixed: 3052731 - qt file complains about lack of active-x handler
	Fixed: 3025872 - Black square where lion should be on mgm.com

	3052731: The page has a syntax error. Notice the missing ">"? He treat this as an OBJECT without an EMBED. khtml actually has a fallback for this. They check the classid and map a mime type to it. They currently map for  realaudio and flash, but not quicktime. I added a quicktime mapping as well as a mapping for shockwave.

	3025872: khtml was unable to parse the EMBED tag within the OBJECT tag (similar to 3052731). When this happens, it looks at the classid and maps it to a mime type. This part was successful because it has a classid->mime type mapping for flash. The strange thing was that it was setting the main URL of the plug-in to "dummy". The code has this comment:

	url = "dummy"; // Not needed, but KHTMLPart aborts the request if empty

	It does this even if the url is valid. It even handles the invalid url case before even calling the part. The fix is to disable this line of code.

        Reviewed by trey.

        * khtml/rendering/render_frames.cpp:
        (RenderPartObject::updateWidget):

trey's avatar
trey committed
1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819
2002-12-18  Trey Matteson  <trey@apple.com>

	3105755 - can't log in to amex

	The problem was on c/r khtml would not pick a submit button to add to the
	form state that is sent.  We now "activate" the first submit button that meets the
	criteria for being a "successful" form element, if no button was already
	activated by being clicked on.

        Reviewed by Darin.

        * khtml/html/html_formimpl.cpp:
        (HTMLFormElementImpl::submit):  Pick a submit button to use, if none was already
	chosen by virtue of being clicked.
        (HTMLButtonElementImpl::isSuccessfulSubmitButton):  New getter to support
	submit button selection.
        (HTMLButtonElementImpl::isActivatedSubmit):  New getter on existing prop.
        (HTMLButtonElementImpl::setActivatedSubmit):  New setter on existing prop.
        (HTMLInputElementImpl::isSuccessfulSubmitButton):  New getter to support
	submit button selection.
        (HTMLInputElementImpl::isActivatedSubmit):  New getter on existing prop.
        (HTMLInputElementImpl::setActivatedSubmit):  New setter on existing prop.
        * khtml/html/html_formimpl.h:  Add new methods to common superclass.

gramps's avatar
gramps committed
1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832
2002-12-17  Don Melton  <gramps@apple.com>

        Reviewed by Joyce Chow.

        * khtml/misc/arena.cpp:
        * khtml/misc/arena.h:
        * khtml/rendering/render_arena.cpp:
        * khtml/rendering/render_arena.h:
        * khtml/rendering/render_layer.cpp:
        * khtml/rendering/render_layer.h:

	Changed copyright and licensing.

1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844
2002-12-17  David Hyatt  <hyatt@apple.com>

	NOWRAP was completely broken.  This fixes the problem
	and makes porsche.com look ok again.

	Bug #3131287.
	
        Reviewed by gramps

        * khtml/rendering/bidi.cpp:
        (RenderFlow::findNextLineBreak):

darin's avatar
darin committed
1845 1846 1847 1848 1849 1850 1851 1852
2002-12-17  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

        * WebCore.pbproj/project.pbxproj: Remove signature.
        * kwq/KWQColor.mm: Turn off inlining so we can build even on the
	compiler that warns about static data in inline functions.

mjs's avatar
mjs committed
1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864
2002-12-17  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by John.

	- fixed 3120729 - HOMEPAGE: Can't set a DIV innerHTML property
	with html content starting with <html><head><head/><body>
	
        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::createContextualFragment): Pop <html> and
	<body>, and remove <head> to allow a full HTML document to be made
	and inserted as a contextual fragment.

sheridan's avatar
sheridan committed
1865 1866
=== Alexander-39 ===

1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878
2002-12-17  David Hyatt  <hyatt@apple.com>

	Make sure that anonymous block construction works properly
	when you try to insert a block in between two inlines that
	have already been wrapped in an anonymous block.
	
        Reviewed by mjs

        * khtml/rendering/render_flow.cpp:
        (RenderFlow::addChildToFlow):
        (RenderFlow::makeChildrenNonInline):

sheridan's avatar
Alex-38  
sheridan committed
1879 1880
=== Alexander-38 ===

darin's avatar
darin committed
1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907
2002-12-16  Darin Adler  <darin@apple.com>

        Reviewed by Don and Maciej.

	- fixed 3129115 -- need Apple copyright added to open source documents

	* tons of files: Added copyright message to files we modified and
	standardized format of copyrights too.

	- fixed 3129235 -- assert in LRUList visiting apple.com if "Display images" preference is off

        * khtml/misc/loader.cpp:
        (Cache::getLRUListFor): Use the first list for 0-sized objects.
        (Cache::removeFromLRUList): Allow 0-sized objects.

	- other changes

        * khtml/rendering/render_style.h: Remove bogus unused private constructor.

        * kwq/KWQFont.h: Added copy constructor and assignment operator.
        * kwq/KWQFont.mm:
        (QFont::QFont): Copy constructor now retains the NSFont. The old version didn't which could
	cause retain/release problems.
        (QFont::operator=): Retain the new NSFont and release the old one.

        * WebCore.pbproj/project.pbxproj: Set MACOSX_DEPLOYMENT_TARGET to 10.2.

mjs's avatar
mjs committed
1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937
2002-12-16  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3125283 - HOMEPAGE: in onload of an IMG, the width and height are equal to zero

	There were two problems here. First, the calls to get image width
	and height didn't force a layout in all the cases where it was
	required. Second, layout wouldn't lay out images at all until
	parsing was done, due to a hack to block inline layout until that
	point. I'm not sure if this will have other bad consquences, but
	nearly every page I tried, including Hebrew and Japanese pages as
	well as every page on the base PLT laid out properly.

        * khtml/html/html_imageimpl.cpp:
        (HTMLImageElementImpl::width): Force a layout if not laid out.
        (HTMLImageElementImpl::height): Likewise.
        * khtml/html/htmlparser.cpp:
	(KHTMLParser::insertNode): Remove setBlockBidi hack - this was
	preventing images from getting laid out until the document was
	totally done parsing.
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::RenderFlow): More setBLockBidi removal.
        (RenderFlow::layout): Likewise.
        (RenderFlow::close): Likewise.
        (RenderFlow::addChildToFlow): Likewise.
        (RenderFlow::printTree): Likewise.
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_object.h:

1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949
2002-12-16  David Hyatt  <hyatt@apple.com>

	When a clear occurs (thus causing a block to move underneath
	a float), make sure the block gets a fresh layout, so that it
	can readjust its contents now that they don't have to flow
	around the float.
	
        Reviewed by darin

        * khtml/rendering/render_flow.cpp:
        (RenderFlow::layoutBlockChildren):

1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961
2002-12-16  Richard Williamson   <rjw@apple.com>

        Fixed 3128477.  Check KJS::Window before saving js objects.

        Reviewed by darin.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::saveWindowProperties):
        (KWQKHTMLPart::saveLocationProperties):
        (KWQKHTMLPart::restoreWindowProperties):
        (KWQKHTMLPart::restoreLocationProperties):

sheridan's avatar
sheridan committed
1962 1963
=== Alexander-37 ===

mjs's avatar
mjs committed
1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985
2002-12-16  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3125412 - HOMEPAGE: 2nd load of html in the same div fails.
	- fixed 3052113 - HOMEPAGE: "site menu" part of .mac home page editing doesn't work
	- fixed 3075392 - HOMEPAGE: "pages" section of mac.com homepage editing is missing

        * khtml/html/html_baseimpl.h:
        * khtml/html/html_baseimpl.cpp:
        (HTMLFrameElementImpl::updateForNewURL): Function that loads new URL,
	to be called if src attribute is set explicitly and the element is already
	attached.
        (HTMLFrameElementImpl::parseAttribute): Call updateForNewURL when src
	attrinute is set.
        (HTMLFrameElementImpl::contentDocument): Don't involve render widget
	in getting the content document.
        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::createContextualFragment): Allow contextual
	fragments to be created (and therefore innerHTML to be set on) TR
	and HTML elements.

1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998
2002-12-16  David Hyatt  <hyatt@apple.com>

	Use the layer's bounds as the damage rect not the object's.
	The layer knows about the overflow out of the object.  The
	object does not.  Duh.

	Fixes disney.com bustage.
	
        Reviewed by sullivan

        * khtml/rendering/render_layer.cpp:
        (RenderLayer::constructZTree):

1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
2002-12-16  David Hyatt  <hyatt@apple.com>

	Code needs to go in calcMinMaxWidth instead, so parents computing
	their own minmax widths will get the correct value during the ifrst
	pass.  With this change weather.com is actually fixed.
	
        Reviewed by mjs

        * khtml/rendering/render_box.cpp:
        (RenderBox::calcWidth):
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::calcMinMaxWidth):

2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022
2002-12-16  David Hyatt  <hyatt@apple.com>

	Fix for 3128843, horked layout on weather.com.  Ensure that
	overflow: hidden elements bounds-check their minwidth and maxwidth
	values to ensure that you don't grow the clipped element.
	
        Reviewed by mjs

        * khtml/rendering/render_box.cpp:
        (RenderBox::calcWidth):

2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035
2002-12-16  Trey Matteson  <trey@apple.com>

	3129175 - we're doing needless GETs when using b/f cache

	Turns out that an empty UserStyle was causing WebCore to reload the base URL
	of the page, since it tried to load the style "".

        Reviewed by Darin

        * khtml/khtml_part.cpp:
        (KHTMLPart::reparseConfiguration):  Of the UserStyle is empty, set it to an
	empty string instead of an empty URL.

mjs's avatar
mjs committed
2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052
2002-12-16  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3129008 - REGRESSION: Successive hot/cached runs of cvs-base PLT are slightly slower

	This was due to me reintroducing a leak of the document. Now fixed.
	
        * khtml/ecma/kjs_dom.cpp:
        (DOMDocument::~DOMDocument): forget self from cached DOM object table.
        (KJS::getDOMDocumentNode): Instead of storing the document in the
	marked per-document table, store it in the unmarked table, and as
	a property on the Window object.
        (KJS::getDOMNode): use getDocumentNode when appropriate.
        * khtml/ecma/kjs_dom.h:


2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068
2002-12-15  David Hyatt  <hyatt@apple.com>

	Fix for 3128728.  Ensure that list markers get placed into an
	existing line box if possible.  This patch also fixes RTL bullets
	and line height calculations involving image bullets that are the
	biggest thing on the line.  List markers also correctly move
	to avoid floats.

        Reviewed by mjs

        * khtml/rendering/render_list.cpp:
        (RenderListItem::setStyle):
        (getLineBoxParent):
        (RenderListItem::layout):
        (RenderListMarker::calcMinMaxWidth):

darin's avatar
darin committed
2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080
2002-12-16  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- fixed 3128766 -- macconnection.com tries to add properties to the navigator DOM object, which fails

        * khtml/ecma/kjs_window.cpp: (Window::get): Set up properties named navigator and clientInformation
	the first time either is queried. These will hold a persistent shared object rather than making one
	every time it's asked for.

        * WebCore.pbproj/project.pbxproj: Let Electron undo Maciej's evil.

mjs's avatar
Tools:  
mjs committed
2081 2082 2083 2084 2085 2086 2087 2088
=== WebKit-37u2 ===

2002-12-15  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

        * WebCore.pbproj/project.pbxproj: Updated source version to 37u2.

darin's avatar
darin committed
2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103
2002-12-15  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

	- fixed regression where clicked-on buttons were getting keyboard focus

        * kwq/KWQKHTMLPart.mm:
	(KWQKHTMLPart::khtmlMousePressEvent): Check clickCount here the way NSWindow does.
	See below for rationale.
	(KWQKHTMLPart::passWidgetMouseDownEventToWidget): I didn't read the code in
	[NSWindow sendEvent:] that I was stealing carefully enough. The old needsPanelToBecomeKey
	flag is used to decide whether something should really get first responder, and I need to
	do check that too. And while I was in here, did the same clickCount check that NSWindow
	does for good measure.

mjs's avatar
mjs committed
2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129
2002-12-15  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3128383 - DOM nodes should always use the same JS object
	
        * khtml/ecma/kjs_binding.h:
        * khtml/ecma/kjs_binding.cpp:
        (ScriptInterpreter::ScriptInterpreter): Set auto-delete to true on
	document dictionary.
        (ScriptInterpreter::getDOMObjectForDocument): New function - gets
	DOM object from per-document dictionary.
        (ScriptInterpreter::putDOMObjectForDocument): New function - put
	DOM object into per-document dictionary.
        (ScriptInterpreter::deleteDOMObjectsForDocument): Clear all
	objects from specific per-document dictionary.
        (ScriptInterpreter::mark): Mark per-document objects.
	(ScriptInterpreter::forgetDOMObjectsForDocument): Clear objects
	for this document from all interpreters.
        * khtml/ecma/kjs_dom.h:
        * khtml/ecma/kjs_dom.cpp:
        (KJS::getDOMNode): Use per-document rather than general DOM object
	dictionary.
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::~DocumentImpl): Call forgetDOMObjectsForDocument.

2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140
2002-12-15  David Hyatt  <hyatt@apple.com>

	Fix for 3057974 and 3128713.  I needed to make frames check to
	see if their parentNode had a renderer to complete the FOUC
	fix.  Completing the FOUC fix finally solves 3057974.
	
        Reviewed by darin

        * khtml/html/html_baseimpl.cpp:
        (HTMLFrameElementImpl::attach):

2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155
2002-12-15  David Hyatt  <hyatt@apple.com>

	Fix for 3109226, epinions page is mostly blank.  Add a hack
	to disallow > but only inside attribute values for which there
	is no corresponding attribute name.

	Also fix attribute values with no name so that the value is
	used as the name so that e.g., <option "selected"> works.
	
        Reviewed by darin

        * khtml/html/htmltokenizer.cpp:
        (HTMLTokenizer::HTMLTokenizer):
        * khtml/html/htmltokenizer.h:

darin's avatar
darin committed
2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172
2002-12-15  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- fixed 3127900 -- REGRESSION: text fields select all their text when clicked on with the mouse

        * kwq/KWQKHTMLPart.h: Add _firstResponderAtMouseDownTime.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::khtmlMousePressEvent): Don't call makeFirstResponder: if it's already set.
        (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Using _firstResponderAtMouseDownTime, catch the
	case where an NSTextField's editor was just created and became first responder. In those cases,
	pass the mouseDown: to the text field, not the newly created editor. Even though it shouldn't make
	a difference it does. Also don't makeFirstResponder: if it's already set.
        (KWQKHTMLPart::mouseDown): Set _firstResponderAtMouseDownTime.

        * kwq/KWQWidget.mm: (QWidget::setFocus): Don't call makeFirstResponder: if it's already set.

2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188
2002-12-15  David Hyatt  <hyatt@apple.com>

	Make sure framesets don't get built twice when FOUC delays
	their loading.
	
        Reviewed by gramps

        * khtml/css/cssstyleselector.cpp:
        * khtml/css/cssstyleselector.h:
        * khtml/html/html_baseimpl.cpp:
        (HTMLFrameSetElementImpl::attach):
        * khtml/rendering/render_style.cpp:
        (RenderStyle::operator==):
        (RenderStyle::isStyleAvailable):
        * khtml/rendering/render_style.h:

darin's avatar
darin committed
2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216
2002-12-15  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- fixed ==/= typo in QFontMetrics that caused a part of my recent speedup to not take effect
	- fixed 3128582 -- REGRESSION: Crash on planetquake.com

        * kwq/KWQFontMetrics.mm:
	(QFontMetricsPrivate::setFont): Fix a horrifying "== instead of =" mistake.
        (QFontMetrics::ascent): Give an ERROR message, don't crash, when this is called on a
	font metrics object that hasn't been updated to work for a particular font.
        (QFontMetrics::descent): Ditto.
        (QFontMetrics::lineSpacing): Ditto.
        (QFontMetrics::xHeight): Ditto.
        (QFontMetrics::width): Ditto.
        (QFontMetrics::floatWidth): Ditto.
        (QFontMetrics::floatCharacterWidths): Ditto.

        * khtml/html/html_inlineimpl.cpp: (HTMLBRElementImpl::attach):
	Eliminated what was causing us to hit the above. BR elements need to respect display() == NONE.

	- fixed the fix for operator==; needs to work even if the pseudo type was
	  extracted already for one of the two, and not the other

        * khtml/css/cssparser.cpp:
        (CSSSelector::extractPseudoType): Only do work when the selector is Pseudo.
        (CSSSelector::operator==): Call pseudoType() instead of going right at _pseudoType.

2217 2218 2219 2220 2221 2222 2223 2224 2225
2002-12-15  David Hyatt  <hyatt@apple.com>

	Fix for 3128402, missing content on voodooextreme.  Don't allow
	object/embed inside the head.
	
        Reviewed by cblu

        * khtml/html/dtd.cpp:

darin's avatar
darin committed
2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254
2002-12-15  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

	- fixed 3127898 -- Crash going to altavista.com after visiting sony.com

        * khtml/ecma/kjs_window.cpp: (Window::get): Change lots of properties to return "undefined"
	rather than crashing when the view is NULL. I'm not sure that undefined is the perfect thing
	to return in this case, but it's better than crashing the program. We can refine later as needed.

	- fixed 3127157 -- REGRESSION: applet does not become first responder when clicked-on
	- fixed 3127934 -- Crash in KWQKHTMLPart::widgetWillReleaseView scrolling around

        * kwq/KWQKHTMLPart.h: Get rid of widgetWillReleaseView(). Add mouseDownViewIfStillGood().
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Call makeFirstResponder: in the same way that
	the NSWindow does before delivering a mouseDown: message. This oversight caused the applet problem.
        (findViewInSubviews): Added.
        (KWQKHTMLPart::mouseDownViewIfStillGood): Added. Gets _mouseDownView, but then checks that it's
	still a subview before returning it. A little inefficient, but the only way to do it given that
	there's no general way to find out that an NSView is being removed from your view hierarchy or deallocated.
	This fixes the crash in widgetWillReleaseView.
        (KWQKHTMLPart::khtmlMouseMoveEvent): Use mouseDownViewIfStillGood() instead of _mouseDownView directly.
        (KWQKHTMLPart::khtmlMouseReleaseEvent): Ditto.
        (KWQKHTMLPart::passSubframeEventToSubframe): Ditto.
        * kwq/KWQWidget.mm:
        (QWidget::~QWidget): Remove call to widgetWillReleaseView().
        (QWidget::setView): Ditto.

2255 2256 2257 2258 2259 2260 2261 2262 2263 2264
2002-12-15  David Hyatt  <hyatt@apple.com>

	operator== on CSSSelectors needed to be updated to compare
	_pseudoTypes.  A nice subtle bug from the mega-patch. 
	
        Reviewed by mjs

        * khtml/css/cssparser.cpp:
        (CSSSelector::operator == ):

2265 2266 2267 2268 2269 2270 2271 2272 2273
2002-12-15  David Hyatt  <hyatt@apple.com>

	Fix for 3128429, sans-serif font got broken.  Just a typo
	from darin's mega-patch.  
	
        Reviewed by mjs

        * khtml/css/cssstyleselector.cpp:

darin's avatar
darin committed
2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348