ChangeLog-2003-10-25 84.4 KB
Newer Older
sheridan's avatar
sheridan committed
1 2
=== Alexander-39 ===

3 4 5 6 7 8 9 10 11 12 13 14
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
15 16
=== Alexander-38 ===

darin's avatar
darin committed
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
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
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
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:

74 75 76 77 78 79 80 81 82 83 84 85
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):

86 87 88 89 90 91 92 93 94 95 96 97
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
98 99
=== Alexander-37 ===

mjs's avatar
mjs committed
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
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.

122 123 124 125 126 127 128 129 130 131 132 133 134
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):

135 136 137 138 139 140 141 142 143 144 145 146 147
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):

148 149 150 151 152 153 154 155 156 157 158
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):

159 160 161 162 163 164 165 166 167 168 169 170 171
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
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188
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:


189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204
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
205 206 207 208 209 210 211 212 213 214 215 216
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
217 218 219 220 221 222 223 224
=== 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
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
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
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
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.

266 267 268 269 270 271 272 273 274 275 276
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):

277 278 279 280 281 282 283 284 285 286 287 288 289 290 291
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
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308
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.

309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324
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
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
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.

353 354 355 356 357 358 359 360 361
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
362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390
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.

391 392 393 394 395 396 397 398 399 400
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 == ):

401 402 403 404 405 406 407 408 409
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
410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 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 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525
2002-12-14  Darin Adler  <darin@apple.com>

        Reviewed by Maciej and Dave.

	- optimizations that improve speed; total is 13.8% on cached cvs-base on my machine

        * khtml/css/css_valueimpl.h: Add isKonqBody() and genericFamilyType() to find out if
	a font is a standard one. This is much faster than doing string comparisons all the time.
        * khtml/css/css_valueimpl.cpp: (FontFamilyValueImpl::FontFamilyValueImpl):
	Check the font names against the standard ones on time when the FontFamilyValueImpl
	object is constructed rather than every time the stuff is matched.
        * khtml/css/cssparser.h: Add pseudoType() and extractPseudoType() to CSSSelector so we
	don't have to do string compares all the time.
        * khtml/css/cssparser.cpp:
        (StyleBaseImpl::parseValue): Use QConstString in a way that's effective (with an
	object that has a long enough lifetime), or don't use it at all.
        (StyleBaseImpl::parseContent): Ditto.
        (StyleBaseImpl::preprocess): Preprocess into a buffer, usually on the stack, rather than
	using QString += QChar over and over again.
        (CSSSelector::extractPseudoType): Convert the value string into a type, and get rid of it.
	Saves memory because the string goes away. And doing it once is much faster than string
	comparing each time.
        * khtml/css/cssstyleselector.cpp:
	(cleanPath): Restructure to save one find() in the common case.
	(checkPseudoState): Restructure to avoid some DOMString creation/destruction in the case
	where the tag is not an <A>. Also use QConstString correctly.
	(CSSStyleSelector::checkOneSelector): Use the new pseudoType() instead of string compares.
	(CSSStyleSelector::applyRule): Use isKonqBody() and genericFamilyType() instead of string
	comparisons.

        * khtml/dom/dom_string.h: Make the destructor non-virtual. This was a big win, and a mistake
	the way it was before. Also make the DOMString constructor with no parameters inline.
        * khtml/dom/dom_string.cpp:
        (DOMString::string): Don't use QConstString here, since it does no good.
        (DOM::operator==): Rewrite to do things faster and avoid calling strlen.

        * khtml/html/html_objectimpl.h: Don't use QConstString in places where it does harm and no good.
        * khtml/html/html_objectimpl.cpp: (HTMLEmbedElementImpl::parseAttribute): Use QConstString properly.

        * khtml/html/htmltokenizer.cpp:
        (tagMatch): Added.
        (HTMLTokenizer::parseSpecial): Change tokenizing so it doesn't construct temporary strings (with
	QConstString) just to compare small substrings.

        * khtml/khtml_part.cpp: (KHTMLPart::write): Don't use a decoder object when source is all ASCII.

        * kwq/KWQColor.mm:
        (hex2int): Don't bother with uppercase hex since we always lowercase anyway.
        (QColor::setNamedColor): Use a new gperf-based table instead of an NSDictionary to look up colors.
        * kwq/KWQColorData.c: Added this autogenerated file.
        * kwq/KWQColorData.gperf: Added. Source file with list of colors and color values.
        * kwq/Makefile.am: Build KWQColorData.c from KWQColorData.gperf.
        * WebCore.pbproj/project.pbxproj: Added KWQColorData.gperf.

        * khtml/misc/helper.cpp: (khtml::setNamedColor): Don't call setNamedColor again with the lowercased
	color name, since our QColor::setNamedColor already has to lowercase the name (because it has to check
	all names before checking any hex values).

        * khtml/rendering/font.h: Don't initialize the QFontMetrics since in every case we end up changing
	the font later anyway. Also remove unused field.
        * khtml/rendering/font.cpp: (Font::update): Use the new QFontMetrics::setFont for speed.

        * khtml/rendering/render_object.cpp: (RenderObject::enclosingLayer): Change it so it doesn't get
	the layer twice. This function showed up on the sample so we know it's hot.

        * khtml/xml/dom_stringimpl.cpp: (DOMStringImpl::containsOnlyWhitespace): Did a faster implementation
	that doesn't call QChar::direction() except for non-ASCII characters.

        * kwq/KWQFontMetrics.h: Add empty constructor for use in font.cpp. Add accessor and setter for the
	font too. Made baselineOffset() inline since it's trivial.
        * kwq/KWQFontMetrics.mm:
	(QFontMetricsPrivate::QFontMetricsPrivate): Don't make the renderer until we use it.
	(QFontMetricsPrivate::getRenderer): Make it here.
	(QFontMetricsPrivate::font): Added.
	(QFontMetricsPrivate::setFont): Added. Dumps the renderer if the font is different.
        (QFontMetrics::QFontMetrics): Added empty constructor.
        (QFontMetrics::setFont): Added.

        * kwq/KWQKURL.mm: (KURL::parse): Avoid function call overhead calling strncasecmp and strncmp.
	Also made the check for localhost case insensitive.

        * kwq/KWQString.h: Remove _isUnicodeInternal and _isAsciiInternal, since they are trivially
	computed, and it saves time to not have that extra field to manipulate. Removed private
	data() function since it's the same as *dataHandle and not really more clear. Made ascii()
	and unicode() simpler and inline. Also made latin1() and getCFString() inline. Renamed
	QStringData to KWQStringData.
        * kwq/KWQString.mm:
        (QStringData::QStringData): Remove initializers for the xxxInternal.
        (QStringData::initialize): Removed some unnecessary if statements, and made a slight improvement
	in the case of a 0-length string that comes with a pointer for Unicode (can't do it in the
        char * case because it's a feature that's used).
        (QString::makeSharedNull): No need to set _isUnicodeInternal.
        (QStringData::~QStringData): Use the new functions instead of the old bits.
        (QStringData::increaseAsciiSize): Grow faster when we get to larger sizes where the "good size"
	call doesn't have as much of an effect. Simplified by removing unneeded code.
        (QStringData::increaseUnicodeSize): Ditto.
        (QStringData::makeAscii): Update for removal of _isAsciiInternal.
        (QStringData::makeUnicode): Update for removal of _isUnicodeInternal.
        (QString::detachIfInternal): Add this new inline to speed things up for the common case where
	there's no detaching needed.
        (QString::at): Simplify, there were excess if branches here.
        (QString::toDouble): Use kjs_strtod and don't copy the string using QCString for additional speed.
        (QString::lower): Don't detach if the string is already all lowercase. Added a FIXME about the
	code that assumes all "ASCII" bytes are truly ASCII. This code blurs the distinction between Latin-1
	and ASCII in a way that will not work right for Latin-1 characters in an 8-byte character QString.
        (QString::detachInternal): Update for removal of _isUnicodeInternal.
        (QString::detach): Removed a special case for shared_null that was dead code since shared_null has
	the _isUnicodeValid flag set.
        (operator==): Rewrote the comparison with char * to avoid the costly call to strlen.

        * Makefile.am: Updated the rules here so the force clean timestamp works right.
        * force-clean-timestamp: Touched this since the header dependencies don't seem right
	for the DOMString constructor change, at least.
	* WebCore-tests.exp: Exported a symbol now needed by tests since QString does more inlining.
	* WebCore-combined.exp: Re-generated.

mjs's avatar
mjs committed
526 527 528 529 530 531 532 533 534 535 536 537
2002-12-14  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- slightly improved situation with 3124933 (abcnews.com leads to
	empty window with sheet complaining about javascript: URL); the
	popup window still comes up empty but it doesn't put up a sheet.
	
        * kwq/KWQKHTMLPartBrowserExtension.mm:
        (KHTMLPartBrowserExtension::openURLRequest): Handled "javascript:"
	URLs here.

538 539 540 541 542 543 544 545 546 547 548
2002-12-14  David Hyatt  <hyatt@apple.com>

	Fix insidemacgames.com.  Reinstate rules I removed
	and fix other rules to be !important so that the
	td[align=right] rules won't affect child tables
	with align=center.
	
        Reviewed by gramps

        * khtml/css/html4.css:

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
2002-12-14  David Hyatt  <hyatt@apple.com>

	Fix for 3016385, menus on webreference.com don't show up.
	
	Fixes to make webreference.com menus show up.  This involved
	fixing layers to not clip positioned objects when overflow:hidden
	is set, fixing the stupid clip/sync layout hack for livepage
	so that it doesn't break webreference, and implementing 
	navigator.productSub (right now the date is set to
	Christmas 2002).
	
        Reviewed by gramps/maciej.

        * khtml/ecma/kjs_navigator.cpp:
        (Navigator::getValueProperty):
        * khtml/ecma/kjs_navigator.h:
        * khtml/ecma/kjs_navigator.lut.h:
        * khtml/rendering/render_box.cpp:
        (RenderBox::getOverflowClipRect):
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::layout):
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::paint):
        (RenderLayer::nodeAtPoint):
        (RenderLayer::constructZTree):
        * khtml/rendering/render_layer.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::setLayouted):
        * khtml/rendering/render_object.h:

kocienda's avatar
kocienda committed
580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595
2002-12-14  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Maciej

	Fix for this bug:

	Radar 3128159 (Netscape non-standard DOM event attribute "which" unsupported)

        * khtml/dom/dom2_events.cpp:
        (UIEvent::which): Added which() definition.
        * khtml/dom/dom2_events.h: Added declarations for which() functions in UIEvent.
        * khtml/ecma/kjs_events.cpp: 
        (DOMUIEvent::getValueProperty): Added which property.
        * khtml/ecma/kjs_events.h: Ditto.
        * khtml/ecma/kjs_events.lut.h: File regenerated.

rjw's avatar
rjw committed
596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620
2002-12-13  Richard Williamson   <rjw@apple.com>
    
        Fixed 3127310 and 3127920.

        Implemented findWordBoundary.  We now correctly detect word boundaries.
        This function makes use of carbon unicode utilities.
        
        With help from hyatt, made selection correctly account for render 
        continuations.  This fixes many of the 'unable to select' issues.
        
        Reviewed by trey and hyatt.

        * khtml/khtml_events.cpp:
        (khtml::MouseEvent::offset):
        * khtml/khtml_part.cpp:
        (findWordBoundary):
        (KHTMLPart::khtmlMousePressEvent):
        (KHTMLPart::khtmlMouseMoveEvent):
        * khtml/rendering/render_object.cpp:
        (RenderObject::checkSelectionPoint):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_text.cpp:
        (RenderText::checkSelectionPoint):
        * khtml/rendering/render_text.h:

mjs's avatar
mjs committed
621 622 623 624
2002-12-13  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Don.

mjs's avatar
mjs committed
625 626 627 628 629 630 631 632 633 634
	- fixed build.
	
        * ForwardingHeaders/rendering/render_layer.h: Added.

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

        Reviewed by Don.

	- fixed 3114737 - DHTML image content mispositioned on lexus.com
	
mjs's avatar
mjs committed
635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652
        * khtml/dom/dom2_events.cpp:
        (UIEvent::layerX): Added to support nonstandard Mozilla
	event.layerX property.
	(UIEvent::layerY): Added to support nonstandard Mozilla
	event.layerY property.
        * khtml/dom/dom2_events.h:
        * khtml/ecma/kjs_events.cpp:
        (DOMUIEvent::getValueProperty): Implemented layerX and layerY
        * khtml/ecma/kjs_events.h:
        * khtml/ecma/kjs_events.lut.h:
        * khtml/xml/dom2_eventsimpl.cpp:
        (MouseEventImpl::MouseEventImpl): Added call to computeLayerPos.
        (MouseEventImpl::computeLayerPos): Compute layer position.
        (MouseEventImpl::layerX): Added.
        (MouseEventImpl::layerY): Added.
        (MouseEventImpl::initMouseEvent): Added call to computeLayerPos.
        * khtml/xml/dom2_eventsimpl.h:

653 654 655 656 657 658 659 660 661 662 663
2002-12-13  David Hyatt  <hyatt@apple.com>

	Fix for 314799, image at wired.com doesn't show up.  Block
	level replaced floating elements were being treated as though
	they didn't float.
	
        Reviewed by gramps

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

hyatt's avatar
hyatt committed
664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682
2002-12-13  David Hyatt  <hyatt@apple.com>

	Fix for 3098045.  

	Do not treat XHTML-style tags e.g., <br/> or <table/> as
	self-closing.  This is absolutely wrong, and it does not
	match the behavior of other browsers.  According to the HTML4
	spec for parsing, / is an erroneous character and should simply
	be dropped, so <table/> should be treated like <table>.

	Fixes for crashes on glazman's blog and on tantek's blog.  Both
	still mis-render, but at least they don't crash.
	
        Reviewed by gramps (and darin too)

        * khtml/html/htmltokenizer.cpp:
	* khtml/rendering/render_container.cpp:
	* khtml/rendering/render_style.cpp:
	
683 684
=== Alexander-37u1 ===

685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704
2002-12-13  David Hyatt  <hyatt@apple.com>

	Two fixes.  Bugs are 3121024, which had to do with handling
	escaped characters in the CSS content property, and 
	bug 3127375 (44854 in bugs.kde.org), which had to do with
	making sure table cells relayout properly when images load
	async.
	
        Reviewed by darin and john

        * khtml/css/cssparser.cpp:
        (StyleBaseImpl::parseContent):
        (StyleBaseImpl::isHexadecimal):
        * khtml/css/cssparser.h:
        * khtml/rendering/bidi.cpp:
        (RenderFlow::layoutInlineChildren):
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::layout):
        * khtml/rendering/render_flow.h:

darin's avatar
darin committed
705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720
2002-12-13  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

	- moved KWQFontFamily and KWQPageState to new homes

        * kwq/KWQFontFamily.h: Added.
        * kwq/KWQFontFamily.mm: Added.
        * kwq/KWQPageState.h: Added.
        * kwq/KWQPageState.mm: Added.
        * WebCore.pbproj/project.pbxproj: Added new source files.

        * kwq/KWQFont.h: Removed KWQFontFamily.
        * kwq/KWQFont.mm:  Removed KWQFontFamily.
        * kwq/WebCoreBridge.mm: Removed KWQPageState.

mjs's avatar
mjs committed
721 722 723 724 725 726 727 728 729 730 731 732 733 734 735
2002-12-13  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Ken.

	- fixed 3083814 - dhtml at www.bayarea.com doesn't hide on some mouse movements
	
        * khtml/ecma/kjs_events.h:
        * khtml/ecma/kjs_events.cpp:
        (DOMUIEvent::getValueProperty): Implemented pageX and pageY properties.
        * khtml/ecma/kjs_events.lut.h: Regenerated.
        * khtml/dom/dom2_events.h:
        * khtml/dom/dom2_events.cpp:
        (UIEvent::pageX): Get x coordinate if a mouse event.
        (UIEvent::pageY): Get y coordinate if a mouse event.

rjw's avatar
rjw committed
736 737 738 739 740 741 742 743 744 745
2002-12-13  Richard Williamson   <rjw@apple.com>

        Fixed 3127225.  Set WebCore object cache size when first bridge is created.

        Reviewed by gramps.

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

darin's avatar
darin committed
746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833
2002-12-13  Darin Adler  <darin@apple.com>

        Reviewed by John.

	Overall speedup on cvs-base is about 5%.

	- reduce QString use in the tokenizer and tighten up QString implementation for a speedup
	- fix up the QFontFamily implementation, using new QString features too, for a speedup

        * khtml/html/htmltokenizer.h: Take const QString & instead of QString to avoid an extra copy.
        * khtml/html/htmltokenizer.cpp:
        (HTMLTokenizer::begin): Use QString::null instead of "" for QString objects; faster.
        (HTMLTokenizer::scriptHandler): In APPLE_CHANGES, use new prepend that avoids the need to
	create a temporary QString. Use QString::null instead of QString() for a null string, and
	also made other small fixes to avoid temporary QStrings.
	(HTMLTokenizer::setSrc): Take const QString & instead of QString to avoid an extra copy.

        * kwq/KWQFont.h: Rename QFontFamily to KWQFontFamily. Make family() inline, add inline
	familyIsEmpty(). Change KWQFontFamily to store both the QString for the family and the
	NSString instead of only the NSString to avoid constant conversions back and forth.
	Remove type cases in CREATE_FAMILY_ARRAY that could result in copying the font object.
        * kwq/KWQFont.mm:
        (KWQFontFamily::KWQFontFamily): Fix bug where a copied family object would have a random
	ref count instead of a ref count of 0. Also update for NSString change.
        (KWQFontFamily::operator=): Use the ref before deref algorithm instead of the check for
	self-assignment.
        (KWQFontFamily::getNSFamily): Compute the NSString for the family name here. To avoid
	making an NSString every time, use a CFDictionary with QString as a key and NSString as
	a value instead of using an NSSet.
        (KWQFontFamily::setFamily): Invalidate the NSString family when the QString family is
	changed. Moved the code to make things unique to getNSFamily.
        (KWQFontFamily::operator==): Call getNSFamily rather than

        * kwq/KWQString.h: Added a prepend and insert overload that take a QChar pointer and length, for
	use in the tokenizer, and a hash function, for use in CFDictionary. Also added a global set of
	CFDictionaryKeyCallBacks.
        * kwq/KWQString.mm:
        (QString::prepend): New overload calls new insert overload.
        (QString::insert): Old insert slightly tightened by calling detach() only after the early exit
	and removing an extra detach from a function that already does forceUnicode. Added the new insert
	that takes a QChar * and a length.
        (operator==): Rewrite this so that it is efficient and doesn't involve creating a QString temporary
	or doing a function call.
        (QString::hash): Wrote this. Used the same hash algorithm I did in my recent KJS work.
        (retainQString): Added. For use in CFDictionaryKey callback.
        (releaseQString): Added. For use in CFDictionaryKey callback.
        (describeQString): Added. For use in CFDictionaryKey callback.
        (equalQString): Added. For use in CFDictionaryKey callback.
        (hashQString): Added. For use in CFDictionaryKey callback.

        * khtml/rendering/font.h: Change name to KWQFontFamily.
        * khtml/rendering/font.cpp: (Font::update): Call familyIsEmpty() instead of family().isEmpty()
	to avoid making and destroying a QString every time. Also put this batch of KWQFontFamily-specific
	changes inside #if APPLE_CHANGES. Much to my dismay, we have others elsewhere that aren't ifdef'd.

        * khtml/css/cssstyleselector.cpp: (CSSStyleSelector::applyRule): Change name to KWQFontFamily.
	Clearly this code needs some #if APPLE_CHANGES, and changing the class name helps make that clear.

	- change KHTMLSettings so using it doesn't require copying QStrings for a speedup

        * kwq/KWQKHTMLSettings.h: Made all the functions static members to avoid the unnecessary
	overhead of passing a this pointer. Added lots of setXXX functions for use by the WebCoreSettings
	code that gets called by WebKit when settings are changed. Return objects by reference because we
	can and it avoids copying QString objects.
        * kwq/KWQKHTMLSettings.mm: Changed all the functions in here to return the same global object
	each time, and made the set functions update those globals.
        * kwq/WebCoreSettings.mm: All the setters now call through to KHTMLSettings set functions.

        - fixed 3126513 -- crash in KWQKHTMLPart::clearTimers() deallocating KWQPageState
	- did some cleanup in the bridge and the part; part of the process of moving real work out of the bridge

        * kwq/KWQKHTMLPart.h: Rearrange things to be a little more logical. Mark isFrameSet() const.
	added an attributedString function here so it's not inside WebCoreBridge. Added an overload
	of clearTimers that takes a view parameter.
        * kwq/KWQKHTMLPart.cpp: (KWQKHTMLPart::isFrameSet): Mark this const.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::clearTimers): Add the overload that takes the view parameter.
        (KWQKHTMLPart::attributedString): Moved this code in here from the bridge.

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge selectedAttributedString]): Call the attributedString function in its new home in
	KWQKHTMLPart.
        (-[WebCoreBridge attributedStringFrom:startOffset:to:endOffset:]): Ditto.
        (-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:]):
	Take a const KURL & instead of a KURL to avoid unnecessary copying.
        (-[KWQPageState dealloc]): Call the new clearTimers that takes a view parameter. This should fix the
	crash in autorelease pool deallocation mentioned above.

834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862
2002-12-13  David Hyatt  <hyatt@apple.com>

	Fix for 3121865, content missing at disney.com.  Make
	sure blocks track width overflow as well as height
	overflow and ensure that a layer's dimensions expand
	to encompass both width and height overflow.

	Also fixes a bug with line breaking that allowed unbreakable
	words to actually be broken up when they were the only word
	on a line.  This is wrong and differs from all other
	browsers, so the patch in bidi.cpp fixes us to match
	other browsers.  (This was required to fix the above bug.)
	
        Reviewed by mjs.

        * khtml/rendering/bidi.cpp:
        (RenderFlow::findNextLineBreak):
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::RenderFlow):
        (RenderFlow::layout):
        (RenderFlow::layoutBlockChildren):
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::updateLayerPosition):
        * khtml/rendering/render_object.cpp:
        (RenderObject::nodeAtPoint):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_table.h:

rjw's avatar
WebKit:  
rjw committed
863 864 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
2002-12-12  Richard Williamson   <rjw@apple.com>

        Fixed 3116584.  Made letter-spacing, word-spacing, and text-decoration play
        well together.
        Reviewed by hyatt.

        Changes made with trey to enable to release of page cache from the
        "Empty Cache" menu item in Alex.
        Reviewed by trey.
        
        * khtml/rendering/font.cpp:
        (Font::drawLineForText):
        (Font::drawText):
        * khtml/rendering/font.h:
        * khtml/rendering/render_text.cpp:
        (TextSlave::paintDecoration):
        (RenderText::paintObject):
        * khtml/rendering/render_text.h:
        * kwq/KWQPainter.h:
        * kwq/KWQPainter.mm:
        (QPainter::drawLineForText):
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge dealloc]):
        (-[WebCoreBridge openURL:reload:headers:lastModified:pageCache:]):
        (-[KWQPageState invalidate]):
        (-[KWQPageState dealloc]):
        * kwq/WebCoreTextRenderer.h:

kocienda's avatar
kocienda committed
892 893
2002-12-12  Ken Kocienda  <kocienda@apple.com>

894
        Reviewed by Maciej and Darin
kocienda's avatar
kocienda committed
895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920

	Final fix for this bug:

	Radar 3062858 (REGRESSION: failed login at www.usaa.com doesn't return error text)

	We were down to a case where submitting the login form with the return key
	failed since we did not implement either non-standard keyCode (IE-style) or
	which (Netscape-style) UI event extension for getting the value of a key
	press. The form submission code depended on sensing the value of the
	key press by checking one of these properties.
	
	Since the "which" property also can be used for mouse events, and fixing
	this bug could be done by implementing either keyCode or which, I chose
	to implement keyCode only.

        * khtml/dom/dom2_events.cpp: Added keyCode function definition.
        * khtml/dom/dom2_events.h: Added keyCode function declaration.
        * khtml/ecma/kjs_events.cpp:
        (DOMUIEvent::getValueProperty): Added new KeyCode attribute.
        * khtml/ecma/kjs_events.h: New generated file.
        * khtml/ecma/kjs_events.lut.h: Ditto.
        * khtml/xml/dom2_eventsimpl.cpp: 
        (KeyEventImpl::KeyEventImpl): Fixed a bug in khtml that prevented the        
        m_keyVal field on KeyEventImpl from ever being set correctly. 
        I guess I am the first person ever to care about that value. :-)

sheridan's avatar
sheridan committed
921 922
=== Alexander-36 ===

darin's avatar
darin committed
923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941
2002-12-12  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

	- fixed 3126042 -- Failure to send onkeypress event on key down causes forms to submit incorrectly

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::keyEvent): Fixed the code to send the second event with repeat
	set equal to true. Before it was constructing the event but never sending it because result was true.
	Also fixed a problem where it was considering sending a second mouse up event. What we're doing here
	is a bit of a hack and probably should be fixed -- it seems that the behavior in dispatchKeyEvent where
	it sends only a down and not a press for the a non-autorepeat event is a KHTML bug that we should fix
	instead of work around eventually.
        
        - fix to something that made this harder to debug

        * khtml/xml/dom2_eventsimpl.cpp: (KeyEventImpl::KeyEventImpl): Logging the type was showing the wrong
	type, and I narrowed it down to this code here. Changing m_id after the fact doesn't change the type
	string, so you need to compute the correct ID and pass it to the constructor.

darin's avatar
darin committed
942 943 944 945 946 947 948 949 950 951 952 953
2002-12-12  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

	- fixed 3125886 -- Failure to set document onkeypress handler causes return key to submit forms incorrectly

	The handler was getting ignored because the property setting code never got to the DOMNode level.

        * khtml/ecma/kjs_dom.cpp: (DOMDocument::tryPut): Pass correct parent class, DOMNode, instead
	of DOMObject. By passing DOMObject, we skipped all the properties inherited from DOMNode,
	including onkeypress.

darin's avatar
darin committed
954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982
2002-12-12  Darin Adler  <darin@apple.com>

        Reviewed by Trey and Ken.

	- fixed 3125613 -- REGRESSION: resizing frames after clicking on scroll bar doesn't work right
        
        The problem was that the mouse dragged events were going to the scroll bar because the new click
        on the frame resizer didn't fall into the code path that sets _mouseDownView.

        * kwq/KWQKHTMLPart.h: Add override of khtmlMouseMoveEvent.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Don't set _mouseDownView. This is now handled
	at the higher level when the mouseDown comes in.
        (KWQKHTMLPart::khtmlMouseMoveEvent): Added. Pass along mouseDragged: events. I didn't have this
	before because I don't want or need to pass mouseMoved: events along, but the KHTML mouse move
	event corresponds to both AppKit mouseDragged and mouseMoved.
        (KWQKHTMLPart::khtmlMouseReleaseEvent): Don't clear _mouseDownView. This is now handled at the
	higher level when the mouseUp comes in.
        (KWQKHTMLPart::passSubframeEventToSubframe): Ditto.
        (KWQKHTMLPart::mouseDown): Set _mouseDownView to nil; it will be set by passWidgetMouseDownEventToWidget
	if we end up passing the event down. This is the change that actually fixes the bug mentioned above.
        (KWQKHTMLPart::mouseUp): Set _mouseDownView to nil after handling the mouseUp. It's OK if we don't
	clear this out in cases where we don't get a mouseUp event -- we'll get a mouseDown later -- but it's
	still probably a good idea to clear it when we know the mouse is no longer down.

	- used update-kwq-assert to update the code that's a shared copy of WebFoundation code

        * kwq/KWQAssertions.m: (vprintf_stderr_objc): Got the UTF-8 fix I did a while back.

mjs's avatar
mjs committed
983 984 985 986 987 988 989 990
2002-12-12  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

        * force-js-clean-timestamp: Update for JavaScriptCore changes.

2002-12-12  Darin Adler  <darin@apple.com>

darin's avatar
darin committed
991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004
2002-12-12  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- fixed 3125504 -- REGRESSION: Selection not working correctly for text area on http://glish.com/css/7.asp

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::khtmlMousePressEvent): Call makeFirstResponder here explicitly,
	since we are disabling the makeFirstResponder that normally happens during window event dispatching
	in WebKit.

        * kwq/KWQScrollView.h: Define getDocumentView().
        * kwq/KWQScrollView.mm: Use getDocumentView() everywhere.
        (QScrollView::getDocumentView): Define it here.

darin's avatar
darin committed
1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047
2002-12-12  Darin Adler  <darin@apple.com>

        Reviewed by Maciej and Richard.

	- fixed 3125497 -- REGRESSION: Infinite recursion with mouseUp: events

	The problem was that events could end up back at the same part due to the responder chain.

        * kwq/KWQKHTMLPart.h: Added mouseDown, mouseDragged, mouseUp, mouseMoved, buttonForCurrentEvent,
	and stateForCurrentEvent. Remove setCurrentEvent and currentEvent. Renamed handleMouseDownEventForWidget
	to passWidgetMouseDownEventToWidget. John and I had agreed to this name change before the last commit,
	but I forgot.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::KWQKHTMLPart): Initialize _sendingEventToSubview to false. No need to initialize
	_mouseDownWasInSubframe at all since it's only looked at when _mouseDownView is non-nil.
        (KWQKHTMLPart::keyEvent): Save and restore _currentEvent instead of setting to nil.
	Use stateForCurrentEvent instead of stateForEvent:.
        (KWQKHTMLPart::khtmlMousePressEvent): Name change.
        (KWQKHTMLPart::khtmlMouseDoubleClickEvent): Name change.
        (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Name change. Set _sendingEventToSubview when
        sending event to subview.
        (KWQKHTMLPart::khtmlMouseReleaseEvent): Name change. Set _sendingEventToSubview when sending
	event to subview.
        (KWQKHTMLPart::passSubframeEventToSubframe): Name change. Set _sendingEventToSubview when
	sending event to subview.
        (KWQKHTMLPart::buttonForCurrentEvent): Added. Similar to code I moved here from WebCoreBridge.
        (KWQKHTMLPart::stateForCurrentEvent): Added. Similar to code I moved here from WebCoreBridge.
        (KWQKHTMLPart::mouseDown): Added. Similar to code I moved here from WebCoreBridge, except returns
	and does nothing if _sendingEventToSubview is set.
        (KWQKHTMLPart::mouseDragged): Ditto.
        (KWQKHTMLPart::mouseUp): Ditto.
        (KWQKHTMLPart::mouseMoved): Added. Similar to code I moved here from WebCoreBridge.

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge mouseDown:]): Just call _part->mouseDown().
        (-[WebCoreBridge mouseDragged:]): Just call _part->mouseDragged().
        (-[WebCoreBridge mouseUp:]): Just call _part->mouseUp().
        (-[WebCoreBridge mouseMoved:]): Just call _part->mouseMoved().

        * kwq/WebCoreBridgePrivate.h: Removed.
        * WebCore.pbproj/project.pbxproj: Removed WebCoreBridgePrivate.h.

rjw's avatar
 
rjw committed
1048 1049 1050 1051 1052 1053 1054 1055 1056 1057
2002-12-12  Richard Williamson   <rjw@apple.com>

        Fixed 3125583.  Don't redraw view under resize bar
        on mouseup.
        
        Reviewed by gramps.

        * khtml/rendering/render_frames.cpp:
        (RenderFrameSet::userResize):

1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071
2002-12-11  David Hyatt  <hyatt@apple.com>

	Fix hang on monkeyvoodoo.net and on skramkoob.com.  The bugs
	are 3105714 and 3045965.  Also fix margin collapsing churn
	on thestar by not laying out a second time when collapsing
	margins make you move unless you contain floats.
	
        Reviewed by: gramps

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

rjw's avatar
 
rjw committed
1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085
2002-12-11  Richard Williamson   <rjw@apple.com>

        Fixed 3124121, 3124716 (and other dupes).  Regressions related to b/f crash.
        
        Reviewed by hyatt.

        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::openURLFromPageCache):
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge dealloc]):
        (-[WebCoreBridge openURL:reload:headers:lastModified:pageCache:]):

darin's avatar
darin committed
1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104
2002-12-11  Darin Adler  <darin@apple.com>

        Reviewed by Richard.

	- fixed 3124263 -- REGRESSION: Crash running development build of PLT

        * kwq/KWQWidget.mm:
        (QWidget::~QWidget): Don't worry about the outer view here, since we can never hit one of those.
	Just pass the view to KWQKHTMLPart::widgetWillReleaseView.
        (QWidget::getOuterView): Re-add the assertion I had removed.

	- fixed 3124837 -- Crash trying to handle weird javascript URL in page address field

        * kwq/KWQKURL.mm: (KURL::decode_string): Made this function return the URL still encoded
	rather than a null string (actually, crashing) when CFURLCreateStringByReplacingPercentEscapes
	rejects the passed-in string. Also updated the FIXME.
        (appendEscapingBadChars): Fixed problem with high-bit-set characters.
        * kwq/KWQString.mm: (QString::setBufferFromCFString): Made this tolerant of NULL.

darin's avatar
darin committed
1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 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 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166
2002-12-11  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed handling of mouse events so I could turn the mechanism on all the way
	- fixed anomalies in the red-painting-for-null-view-detection
	- fixed 3123105 -- REGRESSION: Crash in KHTMLView::unscheduleRelayout on exit
	- fixed 3124047 -- REGRESSION: crash in KWQKHTMLPart::handleMouseDownEventForWidget at nwa.com

        * kwq/KWQKHTMLPart.h: Add setCurrentEvent()/currentEvent()/_currentEvent back, because we can
	end up doing a lot of work and processing a lot of events before we get around to handling the
	current event, so [NSApp currentEvent] won't cut it. Also add clearTimers, passSubframeEventToSubframe,
	an overload for handleMouseDownEventForWidget, and _mouseDownWasInSubframe boolean.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::submitForm): Use _currentEvent.
        (KWQKHTMLPart::urlSelected): Use _currentEvent.
        (KWQKHTMLPart::paint): Fixed red-drawing-for-debug code by using KWQPainter instead of going
	directly to the AppKit level.
        (KWQKHTMLPart::keyEvent): Moved the check for null node up a bit, and set _currentEvent.
        (KWQKHTMLPart::handleMouseDownEventForWidget): Break into two pieces, so we can share the
	code with the new passSubframeEventToSubframe. Set _mouseDownWasInSubframe to false
	when setting _mouseDownView. Use getView() instead of getOuterView() since we really don't
	care about the WebView after all. Use _currentEvent. Add a check for nodes that lack a renderer
	to fix the crash at nwa.com above.
        (KWQKHTMLPart::khtmlMouseReleaseEvent): Use _currentEvent.
        (KWQKHTMLPart::clearTimers): Added. Checks for null view, which fixes the crash on exit above.
        (KWQKHTMLPart::passSubframeEventToSubframe): Added. Checks for the categories of events that we
	can pass to subframes, which are mouse down, up, and dragged events, and passes them along.
	This is the main fix that makes subframes work properly.

        * khtml/khtmlview.cpp:
        (KHTMLView::viewportMousePressEvent): Add call to the new passSubframeEventToSubframe.
        (KHTMLView::viewportMouseDoubleClickEvent): Ditto.
        (KHTMLView::viewportMouseMoveEvent): Ditto.
        (KHTMLView::viewportMouseReleaseEvent): Ditto.

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge saveDocumentToPageCache]): Call clearTimers on the part now, instead of the document.
        (-[WebCoreBridge mouseUp:]): Call setCurrentEvent.
        (-[WebCoreBridge mouseDown:]): Ditto.
        (-[WebCoreBridge mouseMoved:]): Ditto.
        (-[WebCoreBridge mouseDragged:]): Ditto.
        (-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:]): Call clearTimers on the
	part now, instead of the document.

	- other changes

        * khtml/ecma/kjs_window.lut.h: Let this be regenerated. I think I accidentally checked
	in an obsolete version of this earlier.

        * khtml/html/html_documentimpl.h: Remove clearTimers(). We don't need it here in APPLE_CHANGES.
        * khtml/html/html_documentimpl.cpp: Ditto.

        * khtml/khtmlpart_p.h: Removed unneeded APPLE_CHANGES. We don't use m_frameNameId any more, nor
	do we need m_savingPageState or m_restoringPageState.
        * khtml/khtml_part.cpp: (KHTMLPart::clear): Removed unneeded APPLE_CHANGES, now that we don't
	use m_frameNameId any more.
        
        * kwq/KWQWidget.mm: (KWQWidget::getOuterView): Tolerate nil for view here, so we can use this from
        the QWidget destructor.

1167 1168 1169 1170
2002-12-11  Darin Adler  <darin@apple.com>

        Rolled out changes I accidentally checked in last night.

sullivan's avatar
Tools:  
sullivan committed
1171 1172 1173 1174 1175 1176 1177 1178 1179 1180
2002-12-10  John Sullivan  <sullivan@apple.com>

	Fixed more "Alexander"s that were lurking in places I forgot 
	to look before.

        Reviewed by Darin

        * Makefile.am:
	"rm -rf $(SYMROOTS)/Safari.app/Frameworks/WebCore.framework"

mjs's avatar
mjs committed
1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191
2002-12-10  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Don.

	- really fixed 3123727 - SJ: Viewmaster arm sometimes doesn't animate on
	http://www.pixar.com/howwedoit/

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::KWQKHTMLPart): Call Cache::init before
	KHTMLPart::init so we have a loader to connect the signals to.

mjs's avatar
mjs committed
1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204
2002-12-10  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3123727 - SJ: Viewmaster arm sometimes doesn't animate on
	http://www.pixar.com/howwedoit/

        * khtml/khtml_part.cpp:
        (KHTMLPart::KHTMLPart): Don't call KHTMLPart::init at all...
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::KWQKHTMLPart): Call it here instead so that signal
	connections happen properly.

1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215
2002-12-10  David Hyatt  <hyatt@apple.com>

	Fix for 3116996.  My hack to make selects ignore fixed CSS
	widths that are smaller than their intrinsic width was not
	good.  Remove the hack.
	
        Reviewed by darin

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

darin's avatar
darin committed
1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244
2002-12-10  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3108912 -- onclick handlers not supported on form elements

	We now pass the events back to the NSView here in WebCore; they pass through all the
	machinery in the DOM before getting sent on.

        * kwq/KWQKHTMLPart.h: Add widgetWillReleaseView and handleMouseDownEventForWidget functions,
	overrides for khtmlMousePressEvent, khtmlMouseDoubleClickEvent, khtmlMouseReleaseEvent, and
	a new _mouseDownView field.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::KWQKHTMLPart): Initialize _mouseDownView to nil.
        (KWQKHTMLPart::khtmlMousePressEvent): Call handleMouseDownEventForWidget, but if it returns
	false call through to the base class function.
        (KWQKHTMLPart::khtmlMouseDoubleClickEvent): Ditto.
        (KWQKHTMLPart::handleMouseDownEventForWidget): Do a hit test to find out which view to send
	the mouse down event to, and then send it.
        (KWQKHTMLPart::khtmlMouseReleaseEvent): Send the mouse up event to the view we sent a mouse
	down event to, or call through to the base class otherwise.
        (KWQKHTMLPart::widgetWillReleaseView): Clear out the _mouseDownView field if the view is
	being released by the QWidget that owns it.

        * kwq/KWQWidget.mm:
        (QWidget::~QWidget): Call KWQKHTMLPart::widgetWillReleaseView.
        (QWidget::setView): Call KWQKHTMLPart::widgetWillReleaseView on the old view.

darin's avatar
Tools:  
darin committed
1245 1246 1247 1248 1249 1250
2002-12-09  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        * WebCore.pbproj/project.pbxproj: Bump versions to 0.8 and 35u.

mjs's avatar
mjs committed
1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268
2002-12-09  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Dave.

	- fixed 3117734 - fail at document.releaseEvents in js at rollingstone.com
	
        * khtml/ecma/kjs_html.cpp:
	(KJS::HTMLDocFunction::tryCall): Added no-op implementations of
	captureEvents and releaseEvents.
        (KJS::HTMLDocument::tryGet):
        * khtml/ecma/kjs_html.h:
        * khtml/ecma/kjs_window.cpp:
        (Window::get, WindowFunc::tryCall): Added no-op implementation of
	releaseEvents.
	* khtml/ecma/kjs_window.h:
        * khtml/ecma/kjs_html.lut.h: Regenerated.
        * khtml/ecma/kjs_window.lut.h: Regenerated.

1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279
2002-12-09  David Hyatt  <hyatt@apple.com>

	Fix for the CSS test suite link.  Need to make sure inlines
	that are obscured by blocks are properly considered to be
	above the block background.
	
        Reviewed by LUCKY WINNER

        * khtml/rendering/render_object.cpp:
        (RenderObject::nodeAtPoint):

darin's avatar
darin committed
1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355
2002-12-09  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

	- made KWQKHTMLPart a subclass of KHTMLPart so we can override virtual functions

        * khtml/khtml_part.h: Get rid of kwq pointer.
        * khtml/khtml_part.cpp:
        (KHTMLPart::init): No need to make a KWQKHTMLPart any more.
        (KHTMLPart::~KHTMLPart): No need to delete a KWQKHTMLPart any more.
        (KHTMLPart::closeURL): KWQKHTMLPart does saveDocumentState in an override now.
        (KHTMLPart::begin): KWQ() instead of ->kwq.
        (KHTMLPart::checkCompleted): KWQ() instead of ->kwq, and ifdef out some unneeded code.
        (KHTMLPart::urlSelected): KWQ() instead of ->kwq.
        (KHTMLPart::requestFrameName): KWQ() instead of ->kwq.
        (KHTMLPart::processObjectRequest): Just call openURL, since we are now KWQKHTMLPart.
        (KHTMLPart::submitForm): KWQ() instead of ->kwq.
        (KHTMLPart::popupMenu): Did a bit more ifdef'int out here.

        * kwq/KWQKHTMLPart.h: Include "khtml_part.h" and remove includes we don't need any more.
	Inherit from KHTMLPart instead of QObject. Remove KHTMLPart parameter from constructor.
	Override openURL and closeURL. Remove part and d pointers. Add KWQ() inline to avoid casting.
        * kwq/KWQKHTMLPart.mm:
        (KHTMLPart::completed): KWQ() instead of ->kwq.
        (KHTMLPart::openURL): Never reached now, since we override.
        (KHTMLPart::setStatusBarText): KWQ() instead of ->kwq.
        (KHTMLPart::started): KWQ() instead of ->kwq.
        (KWQKHTMLPart::KWQKHTMLPart): No need to deal with separate part.
        (KWQKHTMLPart::bridgeForFrameName): KWQ() instead of ->kwq.
        (KWQKHTMLPart::openURL): Add bool return value so we can override the existing openURL.
        (KWQKHTMLPart::slotData): Remove unneeded part->.
        (KWQKHTMLPart::setView): Remove unneeded part->.
        (KWQKHTMLPart::document): Remove unneeded part->.
        (KWQKHTMLPart::renderer): Remove unneeded part->.
        (KWQKHTMLPart::userAgent): Remove unneeded part->.
        (KWQKHTMLPart::nextKeyViewInFrame): KWQ() instead of ->kwq.
        (KWQKHTMLPart::nextKeyViewInFrameHierarchy): KWQ() instead of ->kwq.
        (KWQKHTMLPart::canCachePage): Remove unneeded part->.
        (KWQKHTMLPart::saveWindowProperties): Use this instead of part.
        (KWQKHTMLPart::saveLocationProperties): Use this instead of part.
        (KWQKHTMLPart::restoreWindowProperties): Use this instead of part.
        (KWQKHTMLPart::restoreLocationProperties): Use this instead of part.
        (KWQKHTMLPart::openURLFromPageCache): Remove unneeded part->.
        (KWQKHTMLPart::partForNode): KWQ() instead of ->kwq.
        (KWQKHTMLPart::updatePolicyBaseURL): Remove unneeded part->.
        (KWQKHTMLPart::setPolicyBaseURL): Remove unneeded part->.
        (KWQKHTMLPart::createDummyDocument): Use this instead of part.
        (KWQKHTMLPart::scrollToAnchor): Remove unneeded part->.
        (KWQKHTMLPart::closeURL): Added. Calls saveDocumentState().

        * kwq/WebCoreBridge.h: Use KWQKHTMLPart instead of KHTMLPart.
        * kwq/WebCoreBridge.mm: (-[WebCoreBridge init]): Make a KWQKHTMLPart.
	Use _part instead of _part->kwq in the rest of the file.

        * kwq/KWQSignal.mm: (KWQSignal::disconnect): Add the names of a few signals that are
	disconnected after the KWQKHTMLPart part of the KHTMLPart is destroyed, to avoid noise.

        * khtml/ecma/kjs_navigator.cpp: (Navigator::getValueProperty): KWQ() instead of ->kwq.
        * khtml/ecma/kjs_proxy.cpp: (KJSProxyImpl::initScript): KWQ() instead of ->kwq.
        * khtml/ecma/kjs_window.cpp:
        (Window::scheduleClose): KWQ() instead of ->kwq.
        (WindowFunc::tryCall): KWQ() instead of ->kwq.
        * khtml/xml/dom_docimpl.cpp: (DocumentImpl::setTitle): KWQ() instead of ->kwq.
        * kwq/KWQKHTMLPartBrowserExtension.mm:
        (KHTMLPartBrowserExtension::openURLRequest): KWQ() instead of ->kwq.
        (KHTMLPartBrowserExtension::createNewWindow): KWQ() instead of ->kwq.
        (KHTMLPartBrowserExtension::setIconURL): KWQ() instead of ->kwq.
        (KHTMLPartBrowserExtension::setTypedIconURL): KWQ() instead of ->kwq.
        * kwq/KWQKJavaAppletWidget.mm: (KJavaAppletWidget::showApplet): KWQ() instead of ->kwq.
        * kwq/KWQLoader.mm:
        (KWQServeRequest): Cast to KWQKHTMLPart instead of casting to KHTMLPart and doing ->kwq.
        (KWQCheckIfReloading): Ditto.
        (KWQCheckCacheObjectStatus): Ditto.

        * WebCore.pbproj/project.pbxproj: Let Electron punish the wicked.

rjw's avatar
rjw committed
1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393
2002-12-09  Richard Williamson   <rjw@apple.com>

        Many changes for b/f list.
        1.  Always attempt to cache snap back items.
        2.  Lazily release resources from page cache.  This garners gains on the PLT (and presumably iBench) tests, both for uncached.
        3.  Set the page cache size to 4 (+ snap back items).  After releasing resources we hover around 28MB footprint.  Closing windows releases all resources.
        4.  Turn on the back/forward cache by default.  The menu item still allows you to toggle b/f on and off.  Useful when conducting speed comparison in the PLT.
        5.  Addition of lazy update to PLT memory statistics to show footprint after lazy release of page cache resources.
        6.  Delayed to leak detector to account for lazy release of resources.
        7.  A change when saving a page to back/forward cache to clear and restore the documents root renderer.  Without this fix pages would appear to 'flicker' more when content arrived.
        8.  A change to ensure a layout when restoring a page from the b/f cache.  Without this fix scrollbars wouldn't appear correctly.
        9.  A change to ensure that khtmlview layout and paint timers are unscheduled when a page is placed in the b/f cache.
        10.  A fix to decouple of khtmlview from it's part when placed in the b/f cache.  This fixed a crash caused by inappropriate deference of the part when a page cache item was released.
        11.  A comment in KHTMLPageCache.h explaining the that our page cache is not the same as the khtml page cache.  (Their cache just cached the html source.)
        12.  Reapply styles when loading page from cache.  This ensures that visited link get the appropriate style.

        Reviewed by kocienda.

        * khtml/html/html_documentimpl.cpp:
        (HTMLDocumentImpl::clearTimers):
        * khtml/html/html_documentimpl.h:
        * khtml/khtmlview.cpp:
        (KHTMLView::clearPart):
        (KHTMLView::timerEvent):
        * khtml/khtmlview.h:
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::restoreRenderer):
        (DocumentImpl::detach):
        * khtml/xml/dom_docimpl.h:
        * kwq/KWQKHTMLPageCache.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge openURL:reload:headers:lastModified:pageCache:]):
        (-[WebCoreBridge saveDocumentToPageCache]):
        (-[KWQPageState initWithDocument:DOM::URL:windowProperties:KJS::locationProperties:KJS::]):
        (-[KWQPageState dealloc]):
        (-[KWQPageState KJS::]):
        (-[KWQPageState khtml::]):

1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437
2002-12-08  Trey Matteson  <trey@apple.com>

	Fixed 3115903 - exchangehomes.com sometimes has form state poorly restored

	KHTML is much smarter about restoring form state now, taking into account element names and
	types instead of blindly blasting data by simple element ordering.  We encode the name
	and type at the front of the "state" strings that previously just held the value of the
	element.	

	QString::endsWith() was just plain wrong.  Looks like it had some copied code, but was
	never really implemented.

        Reviewed by: Darin Adler

        * WebCore.pbproj/project.pbxproj:  PB is hellbent on adding "shouldUseHeadermap = 0;"
        * khtml/html/html_formimpl.cpp:
        (encodedElementName):  Utility func to encode an element name, escaping amp and lt
        (HTMLGenericFormElementImpl::state):  Build the prefix of an element's state string,
	e.g. ELEMENT_NAME&ELEMENT_TYPE&
        (HTMLGenericFormElementImpl::findMatchingState):  Find a matching piece of state out of
	the list of state strings that were previously saved.
        (HTMLFieldSetElementImpl::type):  Return our element type.
        (HTMLInputElementImpl::state):  Call super as part of building state string.
        (HTMLInputElementImpl::restoreState):  Use findMatchingState.
        (HTMLLegendElementImpl::type):  Return our element type.
        (HTMLSelectElementImpl::state):  Call super as part of building state string.
        (HTMLSelectElementImpl::restoreState):  Use findMatchingState.
        (HTMLKeygenElementImpl::type):  Return our element type.
        (HTMLOptGroupElementImpl::type):  Return our element type.
        (HTMLOptionElementImpl::type):  Return our element type.
        (HTMLTextAreaElementImpl::state):  Call super as part of building state string.
        (HTMLTextAreaElementImpl::restoreState):  Use findMatchingState.
        * khtml/html/html_formimpl.h:  type() is moved up to HTMLGenericFormElementImpl
        * khtml/html/htmlparser.cpp:
        (KHTMLParser::insertNode):  Pass list of states to restoreState.
        (KHTMLParser::popOneBlock):  Pass list of states to restoreState.
        * khtml/xml/dom_docimpl.h:  Add method to return the whole list of form states.
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::restoreState):    Nodes receive the whole list of form states to restore from,
	not just a single state that has already been chosen.
        * khtml/xml/dom_nodeimpl.h:
        * kwq/KWQString.mm:
        (QString::endsWith):  Walk the search string correctly.

mjs's avatar
mjs committed
1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448
2002-12-09  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3103954 - preferences not displayed properly at excite.com
	
        * khtml/html/html_formimpl.cpp:
        (HTMLInputElementImpl::value): If a radio or checkbox input has a
	value, return that rather than something based on the checked
	state. Only fall back on the checked state if there is no value.

mjs's avatar
mjs committed
1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463
2002-12-09  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3103036 - REGRESSION: scripts dropped from DOM tree;
	javascript text rendered to screen

	The problem here is that we don't allow SCRIPT inside MAP, so the
	script tag gets thrown away in the DOM and the text is added
	directly to the MAP. I can't see a good reason not to allow SCRIPT
	here, so I think the best thing to do is relax the DTD.
	
        * khtml/html/dtd.cpp:
        (DOM::checkChild): Relax the DTD to allow SCRIPT inside MAP.

1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477
2002-12-08  David Hyatt  <hyatt@apple.com>

	Fix for 3007276, styles do not cascade properly through
	tables.  The font was being reset to the default font
	(konq_default) when it needed to be reset to the body's font.
	I added a new font family value called konq_body and the 
	style system resolves that value to be the body's font family list.
	
        Reviewed by: gramps and mjs

        * khtml/css/cssstyleselector.cpp:
        * khtml/html/html_tableimpl.cpp:
        (HTMLTableElementImpl::attach):

1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496
2002-12-08  David Hyatt  <hyatt@apple.com>

	Fix for 3121814.  Forms inside table elements (tbody and table
	etc.) can be inline.  Just remove the assert and replace it
	with a bailout.
	
	Fix for 3036479.  Tables with specified heights but cells
	with no height (or no cells at all) were not honoring
	the specified height.
	
        Reviewed by: gramps

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

mjs's avatar
mjs committed
1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511
2002-12-08  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Dave.

	- fixed 2981252 - JavaScript inside <!-- --> comments inside <select> is not executed

	This problem is caused by the hack to turn all whitespace into
	spaces inside <select>, so that it's collapsed in the DOM. But
	this is especially bad for scripts inside select tags, so I
	changed the select special case to not apply inside scripts.

        * khtml/html/htmltokenizer.cpp:
        (HTMLTokenizer::addPending): 
        (HTMLTokenizer::write):

darin's avatar
darin committed
1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 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
2002-12-08  Darin Adler  <darin@apple.com>

        Reviewed by Don and Dave.

	- fixed 3115845 -- bad-pointer crash destroying DOM tree reproducible at a particular site

	All hail libgmalloc, without which this would just be another bug I can't reproduce!

	This memory trasher bug was caused bug calling setChildrenLoaded after casting a node to
	HTMLObjectElementImpl, when the node wasn't always an object element. It turns out that this
        fix was made obsolete a while back when I changed close on renderers to be delivered even for
        cases where the renderer is not created yet at close time.

        * khtml/html/htmlparser.cpp: (KHTMLParser::processCloseTag): Remove the special case for
	</object>. Now that this is fixed another way we don't need this at all.

        * khtml/html/html_objectimpl.h: Remove setChildrenLoaded and m_childrenLoaded.
        * khtml/html/html_objectimpl.cpp: (HTMLObjectElementImpl::HTMLObjectElementImpl):
	Remove code that sets m_childrenLoaded to false.
        (HTMLObjectElementImpl::attach): Remove code that looks at m_childrenLoaded, since we don't
	need it any more (and in fact there's no way to set it any more).

	- fixed 3120578 -- REGRESSION: going to about:blank creates null view

	If no tokens are ever sent to the parser, then we end up without a render tree.

        * khtml/html/htmlparser.h: Add finished() function.
        * khtml/html/htmlparser.cpp: (KHTMLParser::finished): Make an HTML element if the document is still
	empty at this point. This is identical to what KHTMLParser::insertNode does when you insert any kind
	of element other than an HTML element.

        * khtml/html/htmltokenizer.cpp: (HTMLTokenizer::end): Call finished() to let the parser know.

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::paint): Turn on the "paint red" feature in development builds.
	Null view problems are particularly hard to debug without something like this, and we don't care
	if development builds are ever-so-slightly slower. No change in deployment.

	- fixed 3121527 -- crash in WebCoreBridge frameBorderStyle

        * kwq/WebCoreBridge.mm: (-[WebCoreBridge frameBorderStyle]): Handle case where this is called and
	we don't have a KHTMLView yet.

	- other changes

        * WebCore.pbproj/project.pbxproj: Electron is doing his thing.

1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569
2002-12-08  David Hyatt  <hyatt@apple.com>

	Fix for image bullets.  They were neglecting to offset
	themselves by their own width, and were just relying on
	sheer luck (the default margin) to accommodate their
	size.  The bug is 3007040 (borkware.com).
	
        Reviewed by: gramps

        * khtml/rendering/render_list.cpp:
        (RenderListMarker::paintObject):

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
2002-12-07  David Hyatt  <hyatt@apple.com>

	This change fixes three bugs in list items.  

	(1) Stop implementing markers as floats.  This is simply
	wrong.  The bullet doesn't affect the height of the line
	box if it's a float, and it can also affect other
	list items that follow the bullet's enclosing list item
	(leading to odd staggered layout of lists).

	(2) Relax the DTD.  It was trying to obey strict HTML, which
	is hopeless in the case of lists.  Match the behavior of
	both Gecko and the IEs (mac and win32)  and allow non-list 
	content to be inserted between list items without being
	wrapped in its own list item.  Lists were making empty
	items for whitespace in between items, and this stops that
	and makes our lists behave much more like Gecko and the IEs.

	(3) The bullet's min and max width weren't getting set, which
	could lead to confused line width calculations when image
	bullets were used.
	
        Reviewed by: gramps

	* ChangeLog:
	* khtml/html/dtd.cpp:
        (DOM::checkChild):
        * khtml/rendering/bidi.cpp:
        (RenderFlow::findNextLineBreak):
        * khtml/rendering/render_list.cpp:
        (RenderListItem::setStyle):
        (RenderListMarker::calcMinMaxWidth):

kocienda's avatar
Tests:  
kocienda committed
1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617
2002-12-07  Ken Kocienda  <kocienda@apple.com>

        Reviewed by: Maciej

        Fix for this bug:

        Radar 3073988 (URLs with /../ are not resolved before being sent to the host)

        * kwq/KWQKURL.mm:
        (KURL::KURL):
        (copyPathRemovingDots): New function containing code that was pulled out of 
	the existing relative URL resolution code. 
        (KURL::parse): Call new copyPathRemovingDots function instead of doing same work
	inline.

1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648
2002-12-06  David Hyatt  <hyatt@apple.com>

	Sigh. I forgot to commit the first layer fix (that has already
	been reviewed), so now this is also including that.

	The first layer fix was to deal with the yale.edu crasher.
	It involved making sure that append/remove of render object
	trees drill down into those trees to remove/append corresponding
	layers (instead of just checking the root of the trees).

	The second fix involves making sure that cliprects are right
	for painting backgrounds and borders of clipped objects.
	Fixes benoit's bug.
	
        Reviewed by: mjs and darin (fix 1), mjs and gramps (fix 2)

        * khtml/rendering/render_container.cpp:
        (RenderContainer::removeChildNode):
        (RenderContainer::appendChildNode):
        (RenderContainer::insertChildNode):
        * khtml/rendering/render_container.h:
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::paint):
        (RenderLayer::constructZTree):
        * khtml/rendering/render_layer.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::appendLayers):
        (RenderObject::removeLayers):
        (RenderObject::enclosingLayer):
        * khtml/rendering/render_object.h:

mjs's avatar
mjs committed
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 1676 1677 1678 1679 1680 1681
2002-12-06  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by: Darin

	- fixed 3077227 - netflix "top 100" page JavaScript runs so
	slowly, it seems like a hang

	I fixed this by adding hash tables of image and form elements by
	name and id. This allows scans of the whole document to be avoided
	in many cases.

	This also results in a small speedup (~1%) on cvs-js-ibench.

        * khtml/dom/html_document.cpp:
        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLDocument::hasProperty):
        (KJS::HTMLDocument::tryGet):
        * khtml/html/html_documentimpl.cpp:
        (HTMLDocumentImpl::addNamedImageOrForm):
        (HTMLDocumentImpl::removeNamedImageOrForm):
        (HTMLDocumentImpl::haveNamedImageOrForm):
        * khtml/html/html_documentimpl.h:
        * khtml/html/html_formimpl.cpp:
        (HTMLFormElementImpl::attach):
        (HTMLFormElementImpl::detach):
        (HTMLFormElementImpl::parseAttribute):
        * khtml/html/html_formimpl.h:
        * khtml/html/html_imageimpl.cpp:
        (HTMLImageElementImpl::parseAttribute):
        (HTMLImageElementImpl::attach):
        (HTMLImageElementImpl::detach):
        * khtml/html/html_imageimpl.h:

1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692
2002-12-06  David Hyatt  <hyatt@apple.com>

	Hack to make i-bench paint every fourth page.  We can tune
	this # as needed. 
	
        Reviewed by: darin

        * khtml/html/html_documentimpl.cpp:
        (HTMLDocumentImpl::close):
        * khtml/rendering/render_flow.h:

darin's avatar
darin committed
1693 1694 1695 1696 1697 1698 1699 1700 1701
2002-12-06  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

	Update to latest character-sets document.

        * kwq/character-sets.txt: Got the newest one and merged in our change.
        * kwq/KWQCharsetData.c: Regenerated this. Added just one character set name.

darin's avatar
darin committed
1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712
2002-12-06  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        * khtml/ecma/kjs_events.h: Add listenerObjImp() method so we don't have to
	ref/unref for speed-critical uses.

        * khtml/ecma/kjs_window.cpp: (Window::getJSEventListener): Change this
	to work with ObjectImp so we don't ref/unref each listener. This should give
	us some extra speed.

mjs's avatar
mjs committed
1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724
2002-12-06  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by: Darin Adler

	- made framework embedding work correctly with buildit

        * WebCore.pbproj/project.pbxproj: Give framework a relative
	install path, don't install it the normal way, and copy it
	manually to /AppleInternal/Library/Frameworks if installing. Also
	look for other frameworks in
	${DSTROOT}/AppleInternal/Library/Frameworks.

darin's avatar
darin committed
1725 1726 1727 1728 1729 1730 1731 1732 1733 1734
2002-12-06  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

	- fixed 3111903 -- crash in DOM::HTMLDocumentImpl::close

        * khtml/html/html_documentimpl.cpp: (HTMLDocumentImpl::close):
	Check for the case where view() is 0 so we don't do a null-dereference.
	Also, remove some of the unneeded redundant isNull/isEmpty checking here.

darin's avatar
darin committed
1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749
2002-12-05  Darin Adler  <darin@apple.com>

        Reviewed by Don.

	- fixed 3116149 -- REGRESSION: assert on invalid encoding trying to show accuweather.com source

	The regression was caused when we updated the View Source window to try to get the encoding right.

        * kwq/WebCoreBridge.mm: (+[WebCoreBridge stringWithData:textEncoding:]):
	Make this function decode the string as Windows Latin-1 if the passed-in encoding is
	invalid or ISO Latin-1, since that's what we always want.

        * kwq/mac-encodings.txt: Add "8859_1" since we have now seen it "in the wild".
        * kwq/KWQCharsetData.c: Check in new version of generated file.

1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763
2002-12-05  David Hyatt  <hyatt@apple.com>

	Fix for javadoc page.  It specified an invalid unit, and our
	unit match was on a substring, so it allowed "pts" when it
	shouldn't.  This patch adds some code to help handle this
	error case.

	Bug # is 3119830.
	
        Reviewed by: rjw

        * khtml/css/cssparser.cpp:
        (StyleBaseImpl::parseUnit):

cblu's avatar
cblu committed
1764 1765 1766 1767 1768 1769 1770 1771 1772 1773
2002-12-05  Chris Blumenberg  <cblu@apple.com>

        Reviewed by: rjw

        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge selectedString]): renamed to reflect WebDocument API change
        (-[WebCoreBridge deselectAll]): added
        (-[WebCoreBridge elementAtPoint:]): call selectedString

1774 1775 1776 1777 1778 1779 1780 1781 1782 1783
2002-12-05  David Hyatt  <hyatt@apple.com>

	Fix relative positioned elements to add in the right offset
	when repainting themselves.
	
        Reviewed by: darin

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

1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803
2002-12-05  Richard Williamson   <rjw@apple.com>

        Fixed two issues relating to font sizes.  Fixes any page
        that specifies font size in device independent units, i.e.
        www.abcnews.com.
         
        1.  Change dpi to 72.  Mac OS X does appear to assume 72, not 96!
        2.  Don't appply DPI adjustments to font selections, instead
        normalize values to points.  OS X takes care of device scaling.
        
        Reviewed by: gramps

        * khtml/css/css_valueimpl.cpp:
        (CSSPrimitiveValueImpl::computeLengthFloat):
        (CSSPrimitiveValueImpl::computePointFloat):
        * khtml/css/css_valueimpl.h:
        * khtml/css/cssstyleselector.cpp:
        * kwq/KWQPaintDeviceMetrics.mm:
        (QPaintDeviceMetrics::logicalDpiY):

1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820
2002-12-05  David Hyatt  <hyatt@apple.com>

	Make sure that blocks with block children compute their
	minwidth and maxwidth correctly.  This fixes 4-5 bugs on my
	list, including the becblog.blogspot.com misrender and
	the wrapping list item on webstandards.org.

	The fix ensures that the margins of a child have been
	computed before they are asked for by the parent in
	calcBlockMinMaxWidth.

	Also fix a bug in collapsing margins that caused the height
	of positioned elements that contained only zero-height children
	to not compute their heights correctly.  We now pass tests 2
	and 3 on the collapsing margin tests with this fix.  
	
        Reviewed by: trey
sheridan's avatar
sheridan committed
1821

1822 1823 1824 1825
	* khtml/rendering/render_flow.cpp:
	(RenderFlow::layoutBlockChildren):
	(RenderFlow::calcBlockMinMaxWidth):
	
1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841
2002-12-05  David Hyatt  <hyatt@apple.com>

	Fix for wsj.com orange underline regression.  In quirks mode
	only, don't let anchors without hrefs go into :hover.  This
	matches MacIE's behavior.

	The bug is 3118643.
	
        Reviewed by: mjs

        * khtml/rendering/render_object.cpp:
        (RenderObject::setHoverAndActive):
        (RenderObject::nodeAtPoint):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_text.h:

mjs's avatar
mjs committed
1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853
2002-12-04  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by: David Hyatt

	- fixed 3118083 - WebCore includes config.h from Labyrinth top level
	
	* Makefile.am: Regenerate config.h from top-level version, but
	make sure not to alter date if it has not changed.
        * config.h: Added (autogenerated but checked in for benefit of B&I).
        * ForwardingHeaders/config.h: Include WebCore copy rather than
	Labyrinth copy.

mjs's avatar
mjs committed
1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887
2002-12-04  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by: David Hyatt

	- fixed 3049601 - support the equivalent of
	createcontextualfragment(NS6) or insertAdjacentHTML (IE)

	- fixed 3108065 - DHTML at expedia.com doesn't work-- lack of
	support for createContextualFragment

	- fixed 3114627 - DHTML menus used in Yahoo mail don't work-- lack
	of support for createContextualFragment

	- improvement towards 3052113 - "site menu" part of .mac home page
	editing doesn't work
	
        * khtml/ecma/kjs_range.h:
        * khtml/ecma/kjs_range.cpp:
        (DOMRangeProtoFunc::tryCall): Added suppor for
	createContextualFragment method.
        * khtml/ecma/kjs_range.lut.h: Regenerated.
        * khtml/dom/dom2_range.h:
        * khtml/dom/dom2_range.cpp:
        (Range::createContextualFragment): Implemented (calls impl).
        * khtml/html/html_elementimpl.h:
        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::createContextualFragment): Factored out of setInnerHTML.
	(HTMLElementImpl::setInnerHTML): Call createContextualFragment to
	make the fragment.
        * khtml/xml/dom2_rangeimpl.h:
        * khtml/xml/dom2_rangeimpl.cpp:
        (RangeImpl::createContextualFragment): Implemented (calls start
	container element).

1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899
2002-12-04  David Hyatt  <hyatt@apple.com>

	Fix assert on compuserve page.  <form> under <table> should not
	get a layout() call.
	
        Reviewed by: gramps

        * khtml/rendering/render_flow.cpp:
        (RenderFlow::layout):
        * khtml/rendering/render_table.cpp:
        (RenderTable::layout):

1900 1901 1902 1903 1904 1905 1906 1907 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 1938 1939 1940 1941 1942 1943 1944 1945
2002-12-04  David Hyatt  <hyatt@apple.com>

	Fix shroudedisles.com table misalignment by removing more\
	bogus rules from html4.css.

	Fix forums on macosx.com by implementing support for the align
	attribute on the <P> tag.

	Implement min-width and max-width for block level floating
	and normal flow elements.

	Fix event handling so that :hover notifications get through to
	objects inside floats.
	
        Reviewed by: rjw

        * khtml/css/html4.css:
        * khtml/html/html_blockimpl.cpp:
        (HTMLParagraphElementImpl::parseAttribute):
        * khtml/html/html_blockimpl.h:
        * khtml/rendering/render_box.cpp:
        (RenderBox::calcWidth):
        (RenderBox::calcWidthUsing):
        (RenderBox::calcHeight):
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::layoutBlockChildren):
        (RenderFlow::nodeAtPoint):
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_frames.cpp:
        (RenderFrameSet::nodeAtPoint):
        * khtml/rendering/render_frames.h:
        * khtml/rendering/render_image.cpp:
        (RenderImage::nodeAtPoint):
        * khtml/rendering/render_image.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::nodeAtPoint):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_root.cpp:
        (RenderRoot::calcHeight):
        * khtml/rendering/render_style.cpp:
        (StyleBoxData::StyleBoxData):
        * khtml/rendering/render_text.cpp:
        (RenderText::nodeAtPoint):
        * khtml/rendering/render_text.h:

darin's avatar
darin committed
1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981
2002-12-04  Darin Adler  <darin@apple.com>

        Reviewed by Trey and Maciej.

	- fixed 3117558 -- Assertion failure in KWQKHTMLPart::slotData after typing "amazon.com" twice
	- got rid of the per-part NSEvent in preparation for NSView mouse event handling going through WebCore

        * khtml/khtml_part.h: Added declaration for didOpenURL.
        * khtml/khtml_part.cpp: (KHTMLPart::openURL): Changed name to didOpenURL in the APPLE_CHANGES
	version because calls to openURL from within KHTML need to make the round trip to WebKit.
	Also disabled the "scroll to anchor" part.

        * kwq/KWQKHTMLPart.cpp: (KWQKHTMLPart::isFrameSet): Fix to return false when document is 0.

        * kwq/KWQKHTMLPart.h: Add scrollToAnchor, remove setCurrentEvent and _currentEvent
        * kwq/KWQKHTMLPart.mm:
        (KHTMLPart::openURL): Pass the openURL call to the KWQKHTMLPart.
        (KWQKHTMLPart::KWQKHTMLPart): Don't initialize _currentEvent.
        (KWQKHTMLPart::~KWQKHTMLPart): Don't release _currentEvent.
        (KWQKHTMLPart::submitForm): Pass [NSApp currentEvent] instead of _currentEvent.
        (KWQKHTMLPart::urlSelected): Pass [NSApp currentEvent] instead of _currentEvent.
        (KWQKHTMLPart::scrollToAnchor): Added. Contains the code from the anchor case inside
	KHTMLPart::openURL.

        * kwq/WebCoreBridge.h: Added scrollToAnchorWithURL:.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge openURL:reload:headers:lastModified:pageCache:]): Change around so that we
	don't do a bunch of irrelevant stuff in the page cache case. I think we might just want to
	make a separate method for the page cache case.
        (-[WebCoreBridge scrollToAnchorWithURL:]): Added.
        (-[WebCoreBridge mouseUp:]): Simplify check for nil view. Remove calls to setCurrentEvent.
        (-[WebCoreBridge mouseDown:]): Simplify check for nil view. Fix event type constants for
	right mouse button and other mouse button.
        (-[WebCoreBridge mouseMoved:]): Simplify check for nil view.
        (-[WebCoreBridge mouseDragged:]): Simplify check for nil view.

rjw's avatar
WebCore  
rjw committed
1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005
2002-12-04  Richard Williamson   <rjw@apple.com>

        Cache the NSFont in QFont after doing family based lookup.
        Use that cached font to find a text renderer.

        Reviewed by: Darin

        * kwq/KWQFont.h:
        * kwq/KWQFont.mm:
        (QFont::QFont):
        (QFont::~QFont):
        (QFont::setFamily):
        (QFont::setFirstFamily):
        (QFont::setPixelSize):
        (QFont::setWeight):
        (QFont::setItalic):
        (QFont::getNSFont):
        * kwq/KWQFontMetrics.mm:
        * kwq/KWQPainter.mm:
        (QPainter::_updateRenderer):
        * kwq/WebCoreTextRendererFactory.h:
        * kwq/WebCoreTextRendererFactory.m:
        (-[WebCoreTextRendererFactory rendererWithFont:]):

rjw's avatar
WebCore  
rjw committed
2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020
2002-12-04  Richard Williamson   <rjw@apple.com>

        Cache the last used text renderer to avoid expensive lookup
        when font hasn't changed.

        Reviewed by: maciej

        * khtml/rendering/render_flow.cpp:
        (RenderFlow::layout):
        * kwq/KWQPainter.h:
        * kwq/KWQPainter.mm:
        (QPainter::_updateRenderer):
        (QPainter::drawText):
        (QPainter::drawUnderlineForText):

2021
== Rolled over to ChangeLog-2002-12-03 ==