ChangeLog-2003-10-25 141 KB
Newer Older
darin's avatar
darin committed
1
2
3
4
5
6
7
8
9
2003-01-17  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- updated copyright to include expat copyrights

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

mjs's avatar
mjs committed
10
11
12
13
14
15
16
17
18
19
20
21
2003-01-16  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Dave.

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

22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
2003-01-16  Richard Williamson   <rjw@apple.com>

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

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

mjs's avatar
mjs committed
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
2003-01-16  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

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

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

darin's avatar
darin committed
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
2003-01-16  Darin Adler  <darin@apple.com>

        Reviewed by John.

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

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

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

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

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

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

sheridan's avatar
sheridan committed
80
81
=== Safari-52 ===

82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
2003-01-15  Trey Matteson  <trey@apple.com>

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

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

        Reviewed by Darin.

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

darin's avatar
darin committed
114
115
116
117
118
119
120
121
122
123
124
125
126
2003-01-15  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

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

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

darin's avatar
darin committed
127
128
129
130
131
132
133
134
135
136
137
138
139
140
2003-01-14  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

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

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

	- add support for more MIME types

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

hyatt's avatar
hyatt committed
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
2003-01-14  David Hyatt  <hyatt@apple.com>

	Make FOUC work with XML.
	
        Reviewed by darin.

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

darin's avatar
darin committed
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
2003-01-14  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- first cut at XML parsing with expat

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

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

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

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

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

	- other changes

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

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

191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
2003-01-13  Richard Williamson   <rjw@apple.com>

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

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

darin's avatar
darin committed
207
208
209
210
211
212
213
214
215
216
2003-01-13  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

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

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

217
218
219
220
221
2003-01-12  Darin Adler  <darin@apple.com>

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

darin's avatar
darin committed
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
2003-01-12  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

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

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

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

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

darin's avatar
darin committed
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
2003-01-12  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

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

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

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

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

darin's avatar
darin committed
272
273
274
275
276
277
278
279
280
281
282
283
284
2003-01-12  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

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

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

darin's avatar
darin committed
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
2003-01-11  Darin Adler  <darin@apple.com>

        Reviewed by John.

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

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

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

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

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

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

darin's avatar
darin committed
312
313
314
315
316
317
318
319
320
321
322
2003-01-11  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

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

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

darin's avatar
darin committed
323
324
325
326
327
328
329
330
331
2003-01-09  Darin Adler  <darin@apple.com>

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

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

mjs's avatar
mjs committed
332
333
334
335
336
337
338
339
340
341
342
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.

343
344
345
346
347
348
349
350
351
352
353
354
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:

355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
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:

372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
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
387
388
389
390
391
392
393
394
395
396
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:

397
398
399
400
401
402
403
404
405
406
407
408
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
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
2003-01-08  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

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

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

	- a cut at implementing heretofore unimplemented QTextStream classes

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

mjs's avatar
mjs committed
428
429
430
431
432
433
434
435
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
436
437
438
439
2003-01-05  Darin Adler  <darin@apple.com>

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

440
441
442
443
444
445
446
447
448
449
450
451
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()

452
453
454
455
456
457
458
459
460
461
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):

462
463
464
465
466
467
468
469
470
471
472
473
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
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
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:]):

506
507
508
509
510
511
512
513
514
515
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.

516
517
518
519
520
521
522
523
524
525
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
526
527
=== Alexander-48 ===

528
529
530
531
532
533
534
535
536
537
538
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
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
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.

554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
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:

572
573
574
575
576
577
578
579
580
581
582
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
583
584
585
586
587
588
589
590
591
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
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
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
614
615
616
617
618
619
620
621
622
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.

623
624
625
626
627
628
629
630
631
632
633
634
635
636
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
637
638
=== Alexander-47 ===

darin's avatar
darin committed
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
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.

662
663
664
665
666
667
668
669
670
671
672
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
673
674
675
676
677
678
679
680
681
682
683
684
685
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
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
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
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
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
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
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
756
757
758
759
760
761
762
763
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
764
765
766
767
768
769
770
771
772
773
774
775
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
776
777
778
779
780
781
782
783
784
785
786
787
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
788
789
=== Alexander-46 ===

kocienda's avatar
kocienda committed
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
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
813
814
815
816
817
818
819
820
821
822
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
823
824
825
826
827
828
829
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.

830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
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
845
846
847
848
849
850
851
852
853
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
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
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
869
870
=== Alexander-45 ===

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

darin's avatar
darin committed
873
        Reviewed by John.
darin's avatar
darin committed
874
875
876
877
878
879
880
881
882
883

	- 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
884
885
2002-12-22  Darin Adler  <darin@apple.com>

darin's avatar
darin committed
886
        Reviewed by Don.
darin's avatar
darin committed
887
888
889
890
891
892

	- 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
893
894
=== Alexander-44 ===

darin's avatar
darin committed
895
896
897
898
899
900
901
902
903
904
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.

905
906
907
908
909
910
911
912
913
914
915
916
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):

917
918
919
920
921
922
923
924
925
926
927
928
929
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
930
931
932
933
934
935
936
937
938
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.

939
940
941
942
943
944
945
946
947
948
949
950
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):

951
952
953
954
955
956
957
958
959
960
961
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):

962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
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
986
987
988
989
990
991
992
993
994
995
996
997
998
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
999
1000
=== Alexander-43 ===

darin's avatar
darin committed
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
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
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
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
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
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
1071
1072
1073
1074
1075
1076
1077
1078
1079
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
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
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
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
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
1100
1101
1102
1103
1104
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
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
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
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
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
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
1243
1244
=== Alexander-42 ===

1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
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
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
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
1303
1304
=== Alexander-41 ===

1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
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]):

1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
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
1327
1328
=== Alexander-40 ===

trey's avatar
trey committed
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
2002-12-18  Trey Matteson  <trey@apple.com>

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

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

        Reviewed by Darin

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

mjs's avatar
Tools:    
mjs committed
1342
1343
1344
1345
1346
1347
1348
1349
2002-12-18  Maciej Stachowiak  <mjs@apple.com>

	Reviewed by John.

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

mjs's avatar
mjs committed
1350
1351
1352
1353
1354
1355
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
2002-12-18  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Trey and Darin.

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

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

cblu's avatar
cblu committed
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
2002-12-18  Chris Blumenberg  <cblu@apple.com>

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

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

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

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

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

        Reviewed by trey.

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

trey's avatar
trey committed
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
2002-12-18  Trey Matteson  <trey@apple.com>

	3105755 - can't log in to amex

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

        Reviewed by Darin.

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

gramps's avatar
gramps committed
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
2002-12-17  Don Melton  <gramps@apple.com>

        Reviewed by Joyce Chow.

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

	Changed copyright and licensing.

1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
2002-12-17  David Hyatt  <hyatt@apple.com>

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

	Bug #3131287.
	
        Reviewed by gramps

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

darin's avatar
darin committed
1454
1455
1456
1457
1458
1459
1460
1461
2002-12-17  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

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

mjs's avatar
mjs committed
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
2002-12-17  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by John.

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

sheridan's avatar
sheridan committed
1474
1475
=== Alexander-39 ===

1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
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
1488
1489
=== Alexander-38 ===

darin's avatar
darin committed
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
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
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
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:

1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
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):

1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
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
1571
1572
=== Alexander-37 ===

mjs's avatar
mjs committed
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
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.

1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
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):

1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
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):

1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
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):

1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
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
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
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:


1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
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
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
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
1690
1691
1692
1693
1694
1695
1696
1697
=== 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
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
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
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
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.

1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
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):

1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
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
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
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.

1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
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
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
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.

1826
1827
1828
1829
1830
1831
1832
1833
1834
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
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
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.

1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
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 == ):

1874
1875
1876
1877
1878
1879
1880
1881
1882
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
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
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
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
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
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
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
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.

2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
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:

2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
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
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
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
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
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
2094
2095
2096
2097
2002-12-13  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Don.

mjs's avatar
mjs committed
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
	- 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
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
        * 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:

2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
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
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
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:
	
2156
2157
=== Alexander-37u1 ===

2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
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
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
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
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
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
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
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
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
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.

2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
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
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
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
2365
2366
2002-12-12  Ken Kocienda  <kocienda@apple.com>

2367
        Reviewed by Maciej and Darin
kocienda's avatar
kocienda committed
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393

	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
2394
2395
=== Alexander-36 ===

darin's avatar
darin committed
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
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
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
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
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
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
2456
2457
2458
2459
2460
2461
2002-12-12  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

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

darin's avatar
darin committed
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
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
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
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
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
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):

2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
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
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
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
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
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
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
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.

2638
2639
2640
2641
2002-12-11  Darin Adler  <darin@apple.com>

        Rolled out changes I accidentally checked in last night.

sullivan's avatar
Tools:    
sullivan committed
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
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
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
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
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
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.

2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
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
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
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
2716
2717
2718
2719
2720
2721
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
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
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.

2740
2741
2742
2743
2744
2745
2746
2747
2748
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.
	
        * khtml/rendering/render_object.cpp:
        (RenderObject::nodeAtPoint):

darin's avatar
darin committed
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817