ChangeLog-2005-08-23 56.9 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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
52
53
54
55
56
57
58
59
60
61
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
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.

150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
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
208
209
2002-12-12  Ken Kocienda  <kocienda@apple.com>

210
        Reviewed by Maciej and Darin
kocienda's avatar
kocienda committed
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236

	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
237
238
=== Alexander-36 ===

darin's avatar
darin committed
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
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
258
259
260
261
262
263
264
265
266
267
268
269
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
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
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
299
300
301
302
303
304
305
306
2002-12-12  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

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

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

darin's avatar
darin committed
307
308
309
310
311
312
313
314
315
316
317
318
319
320
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
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
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
364
365
366
367
368
369
370
371
372
373
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):

374
375
376
377
378
379
380
381
382
383
384
385
386
387
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
388
389
390
391
392
393
394
395
396
397
398
399
400
401
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
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
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
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
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.

483
484
485
486
2002-12-11  Darin Adler  <darin@apple.com>

        Rolled out changes I accidentally checked in last night.

sullivan's avatar
Tools:    
sullivan committed
487
488
489
490
491
492
493
494
495
496
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
497
498
499
500
501
502
503
504
505
506
507
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
508
509
510
511
512
513
514
515
516
517
518
519
520
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.

521
522
523
524
525
526
527
528
529
530
531
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
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
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
561
562
563
564
565
566
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
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
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.

585
586
587
588
589
590
591
592
593
594
595
2002-12-09  David Hyatt  <hyatt@apple.com>

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

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

darin's avatar
darin committed
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
2002-12-09  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

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

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

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

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

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

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

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

rjw's avatar
rjw committed
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
2002-12-09  Richard Williamson   <rjw@apple.com>

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

        Reviewed by kocienda.

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

710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
2002-12-08  Trey Matteson  <trey@apple.com>

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

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

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

        Reviewed by: Darin Adler

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

mjs's avatar
mjs committed
754
755
756
757
758
759
760
761
762
763
764
2002-12-09  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

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

mjs's avatar
mjs committed
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
2002-12-09  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

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

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

780
781
782
783
784
785
786
787
788
789
790
791
792
793
2002-12-08  David Hyatt  <hyatt@apple.com>

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

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

794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
2002-12-08  David Hyatt  <hyatt@apple.com>

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

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

mjs's avatar
mjs committed
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
2002-12-08  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Dave.

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

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

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

darin's avatar
darin committed
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
2002-12-08  Darin Adler  <darin@apple.com>

        Reviewed by Don and Dave.

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

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

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

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

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

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

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

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

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

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

	- fixed 3121527 -- crash in WebCoreBridge frameBorderStyle

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

	- other changes

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

874
875
876
877
878
879
880
881
882
883
884
885
2002-12-08  David Hyatt  <hyatt@apple.com>

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

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

886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
2002-12-07  David Hyatt  <hyatt@apple.com>

	This change fixes three bugs in list items.  

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

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

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

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

kocienda's avatar
Tests:    
kocienda committed
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
2002-12-07  Ken Kocienda  <kocienda@apple.com>

        Reviewed by: Maciej

        Fix for this bug:

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

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

934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
2002-12-06  David Hyatt  <hyatt@apple.com>

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

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

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

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

mjs's avatar
mjs committed
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
2002-12-06  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by: Darin

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

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

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

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

998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
2002-12-06  David Hyatt  <hyatt@apple.com>

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

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

darin's avatar
darin committed
1009
1010
1011
1012
1013
1014
1015
1016
1017
2002-12-06  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

	Update to latest character-sets document.

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

darin's avatar
darin committed
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
2002-12-06  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

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

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

mjs's avatar
mjs committed
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
2002-12-06  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by: Darin Adler

	- made framework embedding work correctly with buildit

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

darin's avatar
darin committed
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
2002-12-06  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

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

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

darin's avatar
darin committed
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
2002-12-05  Darin Adler  <darin@apple.com>

        Reviewed by Don.

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

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

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

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

1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
2002-12-05  David Hyatt  <hyatt@apple.com>

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

	Bug # is 3119830.
	
        Reviewed by: rjw

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

cblu's avatar
cblu committed
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
2002-12-05  Chris Blumenberg  <cblu@apple.com>

        Reviewed by: rjw

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

1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
2002-12-05  David Hyatt  <hyatt@apple.com>

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

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

1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
2002-12-05  Richard Williamson   <rjw@apple.com>

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

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

1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
2002-12-05  David Hyatt  <hyatt@apple.com>

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

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

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

1138
1139
1140
1141
	* khtml/rendering/render_flow.cpp:
	(RenderFlow::layoutBlockChildren):
	(RenderFlow::calcBlockMinMaxWidth):
	
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
2002-12-05  David Hyatt  <hyatt@apple.com>

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

	The bug is 3118643.
	
        Reviewed by: mjs

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

mjs's avatar
mjs committed
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
2002-12-04  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by: David Hyatt

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

mjs's avatar
mjs committed
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
2002-12-04  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by: David Hyatt

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

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

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

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

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

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

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

1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
2002-12-04  David Hyatt  <hyatt@apple.com>

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

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

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

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

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

darin's avatar
darin committed
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
2002-12-04  Darin Adler  <darin@apple.com>

        Reviewed by Trey and Maciej.

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

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

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

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

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

rjw's avatar
WebCore    
rjw committed
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
2002-12-04  Richard Williamson   <rjw@apple.com>

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

        Reviewed by: Darin

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

rjw's avatar
WebCore    
rjw committed
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
2002-12-04  Richard Williamson   <rjw@apple.com>

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

        Reviewed by: maciej

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

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