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

        Reviewed by Dave.

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

12
13
14
15
16
17
18
19
20
21
22
23
2003-01-09  David Hyatt  <hyatt@apple.com>

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

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

        * khtml/css/html4.css:

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
2003-01-08  David Hyatt  <hyatt@apple.com>

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

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

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

41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
2003-01-08  David Hyatt  <hyatt@apple.com>

	Revert the redundancy that dirk noticed.

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

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

cblu's avatar
cblu committed
56
57
58
59
60
61
62
63
64
65
2003-01-08  Chris Blumenberg  <cblu@apple.com>

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

        Reviewed by dave.

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

66
67
68
69
70
71
72
73
74
75
76
77
2003-01-08  Trey Matteson  <trey@apple.com>

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

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

        Reviewed by Darin,

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

darin's avatar
darin committed
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
2003-01-08  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

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

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

	- a cut at implementing heretofore unimplemented QTextStream classes

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

sheridan's avatar
sheridan committed
97
98
=== Safari-49 ===

mjs's avatar
mjs committed
99
100
101
102
103
104
105
106
2003-01-05  Maciej Stachowiak  <mjs@apple.com>

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

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

darin's avatar
darin committed
107
108
109
110
2003-01-05  Darin Adler  <darin@apple.com>

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

111
112
113
114
115
116
117
118
119
120
121
122
2003-01-04  Trey Matteson  <trey@apple.com>

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

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

        Reviewed by Richard, Darin

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

123
124
125
126
127
128
129
130
131
132
2003-01-04  Richard Williamson   <rjw@apple.com>

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

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

133
134
135
136
137
138
139
140
141
142
143
144
2003-01-03  Richard Williamson   <rjw@apple.com>

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

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

rjw's avatar
rjw committed
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
2003-01-03  Richard Williamson   <rjw@apple.com>

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

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

177
178
179
180
181
182
183
184
185
186
2003-01-03  John Sullivan  <sullivan@apple.com>
	
	- fixed 3138673 -- reproducible crash in JavaScript

        Reviewed by Darin, OK'ed by Don.

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

187
188
189
190
191
192
193
194
195
196
2003-01-03  David Hyatt  <hyatt@apple.com>

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

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

kocienda's avatar
kocienda committed
197
198
=== Alexander-48 ===

199
200
201
202
203
204
205
206
207
208
209
2003-01-02  David Hyatt  <hyatt@apple.com>

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

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

darin's avatar
darin committed
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
2003-01-02  Darin Adler  <darin@apple.com>

        Reviewed by Maciej and Trey.

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

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

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

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

225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
2003-01-02  David Hyatt  <hyatt@apple.com>

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

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

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

243
244
245
246
247
248
249
250
251
252
253
2003-01-02  David Hyatt  <hyatt@apple.com>

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

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

darin's avatar
darin committed
254
255
256
257
258
259
260
261
262
2003-01-02  Darin Adler  <darin@apple.com>

        Reviewed by John.

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

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

mjs's avatar
mjs committed
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
2002-12-31  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

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

darin's avatar
darin committed
285
286
287
288
289
290
291
292
293
2003-01-01  Darin Adler  <darin@apple.com>

        Reviewed by Don.

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

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

294
295
296
297
298
299
300
301
302
303
304
305
306
307
2003-01-01  David Hyatt  <hyatt@apple.com>

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

	Fixes 3131480.
	
        Reviewed by gramps

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

kocienda's avatar
kocienda committed
308
309
=== Alexander-47 ===

darin's avatar
darin committed
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
2002-12-30  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

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

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

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

333
334
335
336
337
338
339
340
341
342
343
2002-12-30  David Hyatt  <hyatt@apple.com>

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

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

darin's avatar
darin committed
344
345
346
347
348
349
350
351
352
353
354
355
356
2002-12-30  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

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

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

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

kocienda's avatar
Tests:    
kocienda committed
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
2002-12-30  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Darin and Gramps

	Fix for this bug:

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

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

        * kwq/KWQKURL.mm:
        (copyPathRemovingDots)

darin's avatar
darin committed
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
2002-12-29  Darin Adler  <darin@apple.com>

        Reviewed by Don.

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

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

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

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

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

darin's avatar
darin committed
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
2002-12-29  Darin Adler  <darin@apple.com>

        Reviewed by Don.

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

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

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

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

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

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

darin's avatar
darin committed
427
428
429
430
431
432
433
434
2002-12-29  Darin Adler  <darin@apple.com>

        Reviewed by Don.

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

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

darin's avatar
darin committed
435
436
437
438
439
440
441
442
443
444
445
446
2002-12-29  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

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

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

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

darin's avatar
darin committed
447
448
449
450
451
452
453
454
455
456
457
458
2002-12-29  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

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

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

kocienda's avatar
kocienda committed
459
460
=== Alexander-46 ===

kocienda's avatar
kocienda committed
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
2002-12-28  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Gramps and Richard.

	Fix for this bug:

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

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

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

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

darin's avatar
darin committed
484
485
486
487
488
489
490
491
492
493
2002-12-26  Darin Adler  <darin@apple.com>

        Reviewed by Don.

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

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

darin's avatar
darin committed
494
495
496
497
498
499
500
2002-12-26  Darin Adler  <darin@apple.com>

        Reviewed by Don.

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

501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
2002-12-24  Richard Williamson   <rjw@apple.com>

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

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

darin's avatar
darin committed
516
517
518
519
520
521
522
523
524
2002-12-24  Darin Adler  <darin@apple.com>

        Reviewed by Don.

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

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

darin's avatar
darin committed
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
2002-12-24  Darin Adler  <darin@apple.com>

        Reviewed by Richard and Don.

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

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

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

kocienda's avatar
kocienda committed
540
541
=== Alexander-45 ===

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

darin's avatar
darin committed
544
        Reviewed by John.
darin's avatar
darin committed
545
546
547
548
549
550
551
552
553
554

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

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

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

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

darin's avatar
darin committed
557
        Reviewed by Don.
darin's avatar
darin committed
558
559
560
561
562
563

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

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

sheridan's avatar
alex-44    
sheridan committed
564
565
=== Alexander-44 ===

darin's avatar
darin committed
566
567
568
569
570
571
572
573
574
575
2002-12-20  Darin Adler  <darin@apple.com>

        Reviewed by Trey and Don.

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

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

576
577
578
579
580
581
582
583
584
585
586
587
2002-12-20  David Hyatt  <hyatt@apple.com>

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

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

588
589
590
591
592
593
594
595
596
597
598
599
600
2002-12-20  David Hyatt  <hyatt@apple.com>

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

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

darin's avatar
darin committed
601
602
603
604
605
606
607
608
609
2002-12-20  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

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

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

610
611
612
613
614
615
616
617
618
619
620
621
2002-12-20  David Hyatt  <hyatt@apple.com>

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

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

622
623
624
625
626
627
628
629
630
631
632
2002-12-20  Richard Williamson   <rjw@apple.com>

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

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

633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
2002-12-19  David Hyatt  <hyatt@apple.com>

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

	The bug # is 3129534.
	
        Reviewed by rjw

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

darin's avatar
darin committed
657
658
659
660
661
662
663
664
665
666
667
668
669
2002-12-20  Darin Adler  <darin@apple.com>

        Reviewed by John.

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

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

sheridan's avatar
sheridan committed
670
671
=== Alexander-43 ===

darin's avatar
darin committed
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
2002-12-20  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- fixed 3132382 -- crash in khtml::CachedImage

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

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

kocienda's avatar
kocienda committed
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
2002-12-20  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Darin

	Fix for this bug:

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

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

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

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

rjw's avatar
rjw committed
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
2002-12-20  Richard Williamson   <rjw@apple.com>

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

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

trey's avatar
trey committed
742
743
744
745
746
747
748
749
750
2002-12-20  Trey Matteson  <trey@apple.com>

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

        Reviewed by Darin

        * WebCore.pbproj/project.pbxproj:

darin's avatar
darin committed
751
752
753
754
755
756
757
758
759
760
2002-12-20  Darin Adler  <darin@apple.com>

        Reviewed by John.

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

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

darin's avatar
darin committed
761
762
763
764
765
766
767
768
769
770
2002-12-20  Darin Adler  <darin@apple.com>

        Reviewed by John.

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

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

darin's avatar
darin committed
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
2002-12-20  Darin Adler  <darin@apple.com>

        Reviewed by Richard and John.

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

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

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

	- fixed more leaks

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

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

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

darin's avatar
darin committed
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
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
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
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
2002-12-20  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

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

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

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

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

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

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

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

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

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

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

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

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

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

	- other changes

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

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

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

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

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

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

sheridan's avatar
sheridan committed
914
915
=== Alexander-42 ===

916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
2002-12-19  David Hyatt  <hyatt@apple.com>

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

	<table style="display: inline">

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

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

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

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

darin's avatar
darin committed
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
2002-12-19  Darin Adler  <darin@apple.com>

        Reviewed by John.

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

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

sheridan's avatar
sheridan committed
974
975
=== Alexander-41 ===

976
977
978
979
980
981
982
983
984
985
2002-12-18  Richard Williamson   <rjw@apple.com>

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

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

986
987
988
989
990
991
992
993
994
995
996
997
2002-12-18  Chris Blumenberg  <cblu@apple.com>

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

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

        Reviewed by darin.

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

sheridan's avatar
sheridan committed
998
999
=== Alexander-40 ===

trey's avatar
trey committed
1000
2002-12-18  Trey Matteson  <trey@apple.com>
For faster browsing, not all history is shown. View entire blame