33a5a412d5a80097ef1dabca58178d5dd9ab6e34
[WebKit-https.git] / WebCore / ChangeLog
1 2006-07-14  Alexey Proskuryakov  <ap@nypop.com>
2
3         Reviewed by Darin.
4
5         Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=4195
6         REGRESSION: KOI8-U encoding no longer supported.
7
8         Tests:
9         * http/tests/misc/BOM-override.pl
10         * http/tests/misc/BOM-override-script.html
11         * fast/encoding/charset-koi8-u.html
12         * fast/encoding/charset-x-nextstep.html
13
14         Restored a TEC code path for encodings that are not supported by ICU (but which currently
15         passes all layout tests even by itself with ICU disabled). A lot of refactoring is 
16         still needed - most importantly, round-tripping encoding names via CFStringEncoding 
17         makes little sense now.
18
19         * WebCore.exp:
20         * bridge/mac/WebCoreTextDecoder.h: Removed.
21         * bridge/mac/WebCoreTextDecoder.mm: Removed.
22         WebCoreTextDecoder was not used anywhere since WebTextView was moved into WebCore.
23
24         * loader/Decoder.cpp:
25         (Decoder::Decoder):
26         (Decoder::setEncodingName):
27         (Decoder::decode):
28         Use StreamingTextDecoder::create().
29
30         * platform/StreamingTextDecoder.cpp:
31         (WebCore::StreamingTextDecoder::create):
32         (WebCore::StreamingTextDecoder::~StreamingTextDecoder):
33         * platform/StreamingTextDecoder.h:
34         StreamingTextDecoder is just an abstract interface to implementations now.
35
36         * platform/StreamingTextDecoderICU.cpp: Added.
37         (WebCore::StreamingTextDecoderICU::StreamingTextDecoderICU):
38         (WebCore::StreamingTextDecoderICU::~StreamingTextDecoderICU):
39         (WebCore::StreamingTextDecoderICU::releaseICUConverter):
40         (WebCore::StreamingTextDecoderICU::textEncodingSupported):
41         (WebCore::StreamingTextDecoderICU::convertUTF16):
42         (WebCore::StreamingTextDecoderICU::convertIfASCII):
43         (WebCore::StreamingTextDecoderICU::createICUConverter):
44         (WebCore::StreamingTextDecoderICU::appendOmittingBOM):
45         (WebCore::StreamingTextDecoderICU::convertUsingICU):
46         (WebCore::StreamingTextDecoderICU::convert):
47         (WebCore::StreamingTextDecoderICU::toUnicode):
48         (WebCore::StreamingTextDecoderICU::fromUnicode):
49         * platform/StreamingTextDecoderICU.h: Added.
50         Renamed from StreamingTextDecoder; added a way to tell whether the encoding is actually
51         supported by the decoder; minor cleanup.
52
53         * platform/TextEncoding.cpp:
54         (WebCore::TextEncoding::effectiveEncoding): Moved from StreamingTextDecoder.
55         (WebCore::TextEncoding::toUnicode): Use StreamingTextDecoder::create().
56         (WebCore::TextEncoding::fromUnicode): Moved to StreamingTextDecoderICU.
57         
58         * platform/TextEncoding.h: Changed __APPLE__ to PLATFORM(MAC); added effectiveEncoding().
59
60         * platform/mac/StreamingTextDecoderMac.cpp: Added.
61         (WebCore::StreamingTextDecoderMac::StreamingTextDecoderMac):
62         (WebCore::StreamingTextDecoderMac::~StreamingTextDecoderMac):
63         (WebCore::StreamingTextDecoderMac::releaseTECConverter):
64         (WebCore::StreamingTextDecoderMac::textEncodingSupported):
65         (WebCore::StreamingTextDecoderMac::convertUTF16):
66         (WebCore::StreamingTextDecoderMac::convertIfASCII):
67         (WebCore::StreamingTextDecoderMac::createTECConverter):
68         (WebCore::StreamingTextDecoderMac::appendOmittingBOM):
69         (WebCore::StreamingTextDecoderMac::convertOneChunkUsingTEC):
70         (WebCore::StreamingTextDecoderMac::convertUsingTEC):
71         (WebCore::StreamingTextDecoderMac::convert):
72         (WebCore::StreamingTextDecoderMac::toUnicode):
73         (WebCore::StreamingTextDecoderMac::fromUnicode):
74         * platform/mac/StreamingTextDecoderMac.h: Added.
75         (WebCore::StreamingTextDecoderMac::convert):
76         This is a TEC+CFString code path for decoding, basically restored from a year-old revision.
77
78         * platform/mac/TextEncodingMac.cpp: Removed. Code moved to StreamingTextDecoderMac.
79
80         * WebCore.xcodeproj/project.pbxproj:
81
82 === Safari-521.17 ===
83
84 2006-07-14  Timothy Hatcher  <timothy@apple.com>
85
86         <rdar://problem/4623957> SWB: gcc-5412 (new?) objc warning causes WebCore project failure
87
88         Made a DOMNode category in DOMEvents.h that lets DOMNode conform to the
89         DOMEventTarget protocol that works with GCC 5412.
90
91         Removed forward declarations of WebCoreWidgetHolder and imported WebCoreWidgetHolder.h.
92
93         Removed all <Cocoa/Cocoa.h> and <Foundation/Foundation.h> imports in other headers,
94         we import <Cocoa/Cocoa.h> in the prefix header for ObjC.
95
96         * WebCore.xcodeproj/project.pbxproj:
97         * bindings/objc/DOMCore.h:
98         * bindings/objc/DOMEvents.h:
99         * bridge/mac/FormDataMac.h:
100         * bridge/mac/WebCoreAXObject.h:
101         * bridge/mac/WebCoreCache.h:
102         * bridge/mac/WebCoreEncodings.h:
103         * bridge/mac/WebCoreFrameBridge.h:
104         * bridge/mac/WebCoreFrameNamespaces.h:
105         * bridge/mac/WebCoreJavaScript.h:
106         * bridge/mac/WebCorePageBridge.h:
107         * bridge/mac/WebCorePageState.h:
108         * bridge/mac/WebCoreResourceLoader.h:
109         * bridge/mac/WebCoreScriptDebugger.h:
110         * bridge/mac/WebCoreSettings.h:
111         * bridge/mac/WebCoreStringTruncator.h:
112         * bridge/mac/WebCoreStringTruncator.mm:
113         * bridge/mac/WebCoreTextDecoder.h:
114         * bridge/mac/WebDashboardRegion.h:
115         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
116         * platform/mac/CookieJar.mm:
117         * platform/mac/DeprecatedStringMac.mm:
118         * platform/mac/FontDataMac.mm:
119         * platform/mac/FoundationExtras.h:
120         * platform/mac/TextBoundaries.mm:
121         * platform/mac/WebCoreHistory.h:
122         * platform/mac/WebCoreHistory.m:
123         * platform/mac/WebCoreKeyGenerator.h:
124         * platform/mac/WebCoreTextArea.h:
125         * platform/mac/WebCoreTextField.h:
126         * platform/mac/WebCoreTextRenderer.h:
127         * platform/mac/WebCoreView.h:
128         * platform/mac/WebCoreWidgetHolder.h:
129
130 2006-07-14  Geoffrey Garen  <ggaren@apple.com>
131
132         Reviewed by Maciej.
133
134         - Updated ScriptInterpreter to work with Interpreter ref-counting in 
135         JavaScriptCore.
136
137         (KJS::ScriptInterpreter::~ScriptInterpreter): Now protected to catch
138         manual delete.
139
140 2006-07-14  Anders Carlsson  <acarlsson@apple.com>
141
142         Reviewed by Adele and Justin.
143
144         http://bugzilla.opendarwin.org/show_bug.cgi?id=9658
145         <rdar://problem/4613948>
146         REGRESSION: Check Spelling does not work in textarea elements
147         
148         * bridge/mac/FrameMac.mm:
149         (WebCore::FrameMac::advanceToNextMisspelling):
150         Don't use setStartBefore or setEndAfter on the search range because for shadow trees, there
151         is no notion of before and after. Instead, use setStart and setEnd and pass in the start and end
152         indices respectively.
153         
154         * dom/Range.cpp:
155         (WebCore::Range::checkNodeBA):
156         Allow range operations on shadow trees.
157
158         * manual-tests/form-element-spelling.html: Added.
159
160 2006-07-14  Beth Dakin  <bdakin@apple.com>
161
162         Reviewed by Hyatt.
163
164         Fix for <rdar://problem/4621660> REGRESSION: Safari crashing in 
165         WebCore::FrameView::updateOverflowStatus
166
167         m_viewportRenderer is never initialized for framesets, and it 
168         shouldn't be. So we just need to nil-check for it in 
169         updateOverflowStatus() and return early.
170
171         * page/FrameView.cpp:
172         (WebCore::FrameView::updateOverflowStatus): Nil check.
173
174 2006-07-14  Adele Peterson  <adele@apple.com>
175
176         RS by Darin.
177
178         Backing out fix for <rdar://problem/4604703> 
179         REGRESSION (NativeTextField): Focus is not removed from password field after I ctrl-click into a different field
180
181         Darin had a better fix in WebKit for this.
182
183         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::sendContextMenuEvent):
184
185 2006-07-14  Adele Peterson  <adele@apple.com>
186
187         Reviewed by Darin.
188
189         - Fix for <rdar://problem/4614054> REGRESSION: Safari submits forms when the Return key is hit to complete inline inputs
190
191         * page/Frame.h: (WebCore::Frame::inputManagerHasMarkedText): Added.
192         * bridge/mac/FrameMac.h: ditto.
193         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::inputManagerHasMarkedText): Added. Asks the input manager if there's marked text.
194         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler): For text fields, don't submit the form on Enter
195         if the input manager says there's marked text.  I added this code for all text field paths.  For widgets, WebCoreTextField.mm
196         has code to deal with this case.  But as we convert search, password, and isindex, they will need to do this check too.
197
198 2006-07-14  Mitz Pettel  <opendarwin.org@mitzpettel.com>
199
200         Reviewed by Darin.
201
202         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9907
203           REGRESSION (r15418): editing/pasteboard/paste-table-001 fails in pixel  mode
204
205         * rendering/RenderText.cpp:
206         (WebCore::RenderText::caretRect): Fixed the calculation of the max/min allowed caret
207         position.
208
209 2006-07-14  Mitz Pettel  <opendarwin.org@mitzpettel.com>
210
211         Reviewed by Darin.
212
213         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9905
214           REGRESSION (r15404-r15415): Repro crash when pressing delete in an empty editable div
215
216         Test: editing/deleting/delete-at-start-or-end.html
217
218         * editing/TypingCommand.cpp:
219         (WebCore::TypingCommand::deleteKeyPressed): Added null check.
220         (WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.
221
222 2006-07-14  David Kilzer  <ddkilzer@kilzer.net>
223
224         Reviewed by Geoffrey.
225
226         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9903
227           Simplify logic in JSHTMLOptionsCollection::setLength() by using no-arg getNumber()
228
229         No test cases since there is no change in functionality.
230
231         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
232         (WebCore::JSHTMLOptionsCollection::setLength):  Simplified logic by using the
233         no-argument getNumber() method.
234
235 2006-07-14  Geoffrey Garen  <ggaren@apple.com>
236
237         Reviewed by Adele.
238
239         - Build fix: don't need BLOCK_OBJC_EXCEPTIONS because we already have
240         one surrounding this function, and the nested one makes the compiler
241         think our local variable is volatile (seems like a compiler bug to me).
242         
243         * bridge/mac/FrameMac.mm:
244         (WebCore::FrameMac::sendContextMenuEvent):
245
246 2006-07-14  Timothy Hatcher  <timothy@apple.com>
247
248         Reviewed by Maciej.
249
250         Make JavaScriptCore a public framework. Adjusted the paths.
251
252         * WebCore.xcodeproj/project.pbxproj:
253
254 2006-07-14  Maciej Stachowiak  <mjs@apple.com>
255
256         Reviewed by Hyatt.
257
258         - fixed <rdar://problem/4567031> REGRESSION: Crash at WebCore::RenderBlock::createLineBoxes (seems to be a security hole?)
259         
260         I also fixed all the similar crash / assertion failure cases I could think of.
261
262         * dom/Node.cpp:
263         (WebCore::Node::nextRendererWithSameParent): Helper function for some of the above.
264         * dom/Node.h:
265         * rendering/RenderTable.cpp:
266         (WebCore::RenderTable::addChild): Don't allow inserting forms when not in
267         an HTML document, since we don't need that quirk and because parsing won't
268         do certain render tree fixups. Also watch out for case when inserting before
269         the renderer of a misnested child.
270         * rendering/RenderTableRow.cpp:
271         (WebCore::RenderTableRow::addChild): ditto
272         * rendering/RenderTableSection.cpp:
273         (WebCore::RenderTableSection::addChild): ditto
274
275 2006-07-13  Adele Peterson  <adele@apple.com>
276
277         Reviewed by Maciej.
278
279         - Fix for <rdar://problem/4604703> 
280         REGRESSION (NativeTextField): Focus is not removed from password field after I ctrl-click into a different field
281
282         Test:
283         * manual-tests/password-ctrl-click-lose-focus.html: Added.
284
285         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::sendContextMenuEvent):
286         If we're about to set a selection in the current view, make sure its the first responder.
287         In this case, this will cause the password field to resign first responder at the right time.
288
289 2006-07-13  Mitz Pettel  <opendarwin.org@mitzpettel.com>
290
291         Reviewed by Hyatt.
292
293         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9670
294           REGRESSION: RTL white-space:pre-wrap text is offset to the right
295
296         Test: fast/text/international/rtl-white-space-pre-wrap.html
297
298         * rendering/RenderText.cpp:
299         (WebCore::RenderText::caretRect): Fixed LTR case and added the RTL case
300         of clipping the caret position to the text box when the caret is after
301         the trailing space of an autowrapped line.
302         * rendering/bidi.cpp:
303         (WebCore::RenderBlock::computeHorizontalPositionsForLine): Changed to truncate-
304         to-fit the logically last text box if it contains the trailing spaces of an
305         autowrapped line. 
306         (WebCore::RenderBlock::bidiReorderLine): Remember the logically last text run.
307         In the case of autowrapped text with white space that overflows beyond the line,
308         the last text run is the one containing the overflowing white space.
309         (WebCore::RenderBlock::findNextLineBreak): Split overflowing white space on a
310         line that autowraps only after white space into a separate text run.
311
312 2006-07-13  David Harrison  <harrison@apple.com>
313
314         Reviewed by Dave Hyatt.
315
316         <rdar://problem/4624203> -webkit-highlight should be behind images
317
318         * rendering/RenderImage.cpp:
319         (WebCore::RenderImage::paint):
320         * rendering/RenderListMarker.cpp:
321         (WebCore::RenderListMarker::paint):
322         * rendering/RenderWidget.cpp:
323         (WebCore::RenderWidget::paint):
324         Call custom highlighter before painting the image, marker, or widget.
325
326 2006-07-13  David Harrison  <harrison@apple.com>
327
328         Reviewed by Justin and Levi.
329
330         <rdar://problem/4620743> REGRESSION: Option-Delete doesn't delete words during typing
331
332         * Tests:
333         editing/deleting/delete-by-word-001.html
334         editing/deleting/delete-by-word-002.html
335
336         * editing/TypingCommand.cpp:
337         (WebCore::TypingCommand::deleteKeyPressed):
338         (WebCore::TypingCommand::forwardDeleteKeyPressed):
339         (WebCore::TypingCommand::doApply):
340         * editing/TypingCommand.h:
341         Delete and forward delete to use specified granularity.
342         Undo of delete and forward delete to select what had been deleted (non-char granularity only).
343         
344         * page/Frame.cpp:
345         (WebCore::Frame::setSelection):
346         Close typing and end style even if selection is not changing.
347         * page/Frame.h:
348         Remove unused setSelection parameter keepTypingStyle.
349
350 2006-07-12  Levi Weintraub  <lweintraub@apple.com>
351
352         Reviewed by justin
353
354         <rdar://problem/4622763> Deleting from beginning of paragraph following a table deletes rather than selects the table
355
356         * editing/DeleteSelectionCommand.cpp:
357         (WebCore::DeleteSelectionCommand::initializeStartEnd): Added selection expansion for HRs.
358         (WebCore::DeleteSelectionCommand::initializePositionData): Now uses enclosingBlockFlowOrTableElement
359         instead of enclosingBlockFlowElement.
360         (WebCore::DeleteSelectionCommand::removeNode): Use to identify that we need a placeholder
361         when the start or end block is removed.
362         (WebCore::DeleteSelectionCommand::handleGeneralDelete): Added check for canHaveChildrenForEditing
363         to keep things like HRs from being given children.
364         (WebCore::DeleteSelectionCommand::doApply): Switched to use member variable for needPlaceholder.
365         * editing/DeleteSelectionCommand.h: Made needPlaceholder a member variable.
366         * editing/TypingCommand.cpp:
367         (WebCore::TypingCommand::deleteKeyPressed): Fixed selection bug for tables and open typing commands.
368         (WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.
369         * editing/htmlediting.cpp:
370         (WebCore::editingIgnoresContent): Added check for HRs, since it's not considered a widget.
371         * editing/visible_units.cpp:
372         (WebCore::startOfParagraph): Fix for HRs and tables.
373         (WebCore::endOfParagraph): Ditto.
374
375 2006-07-13  Alexey Proskuryakov  <ap@nypop.com>
376
377         Reviewed by Darin.
378
379         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9880
380           Memory leaks running DOM-Hanoi
381
382         No change in behavior, thus no test included.
383
384         * bridge/mac/FrameMac.mm:
385         (WebCore::FrameMac::setStatusBarText): Use a local autorelease pool to release the temporaries - 
386         the test runs non-stop, and the enclosing pool doesn't get a chance to be drained.
387
388 2006-07-12  Mitz Pettel  <opendarwin.org@mitzpettel.com>
389
390         Reviewed by Adele.
391
392         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9862
393           REGRESSION: GMail: Crash in RenderView::repaintViewRectangle when spoofing as FF
394         - see also <rdar://problem/4622407>
395
396         Test: fast/frames/repaint-display-none-crash.html
397
398         * rendering/RenderView.cpp:
399         (WebCore::RenderView::repaintViewRectangle): Added null checking of the owner element's
400         renderer, which can be null if the iframe is set to display:none.
401
402 2006-07-12  Justin Garcia  <justin.garcia@apple.com>
403
404         Reviewed by levi
405         
406         <rdar://problem/4509393>
407         selected DOM range starts with <object>, 0 offset but selection should include the <object>
408
409         * editing/ReplaceSelectionCommand.cpp:
410         (WebCore::ReplaceSelectionCommand::shouldMergeStart): 
411         Don't pull content out of a table cell.
412         * editing/htmlediting.cpp:
413         (WebCore::editingIgnoresContent): Added <select> nodes.
414         (WebCore::rangeCompliantEquivalent): Convert [node, 0] positions to positionBeforeNode(node)
415         for more types of nodes.
416         * rendering/RenderContainer.cpp:
417         (WebCore::RenderContainer::positionForCoordinates): 
418         Fix a crasher when right clicking on an anonymous table.
419
420 2006-07-12  John Sullivan  <sullivan@apple.com>
421
422         Reviewed by Brady Eidson
423         
424         - fixed <rdar://problem/4611164> REGRESSION: Crash occurs when undoing a series of 
425         misspelled words (WebCore::RenderObject::repaint(bool)
426
427         * dom/Document.cpp:
428         (WebCore::Document::removeMarkers):
429         put (it - markers.begin()) in a local variable before altering markers, in every case where this was
430         happening. One of the cases like this was fixed a while back, but other cases were
431         either missed at that time or crept in since. 
432
433 2006-07-13  Anders Carlsson  <acarlsson@apple.com>
434
435         Reviewed by Justin.
436
437         http://bugzilla.opendarwin.org/show_bug.cgi?id=9663
438         REGRESSION (r14948-r14956): Selection in text field remains highlighted when the text field loses focus
439         
440         * dom/Document.cpp:
441         (WebCore::Document::updateSelection):
442         Don't return early if the selection is empty.
443
444 2006-07-12  Anders Carlsson  <acarlsson@apple.com>
445
446         Reviewed by Adele.
447
448         <rdar://problem/4614656> REGRESSION: onpaste() handlers don't run for textarea elements
449         
450         * bridge/mac/FrameMac.mm:
451         (WebCore::FrameMac::dispatchCPPEvent):
452         If the element is a shadow node, dispatch the event to its real parent.
453
454         * manual-tests/textarea-onpaste.html: Added.
455
456 2006-07-12  Beth Dakin  <bdakin@apple.com>
457
458         Reviewed by Anders.
459
460         Fix for layout test regressions after my check-in last night. Just 
461         a silly mistake where I should have asked if we were NOT printing 
462         instead of if we were in the listbox code.
463
464         * WebCore.xcodeproj/project.pbxproj: Project file wars. Back to 
465         XCode 2.3
466         * platform/mac/ListBoxMac.mm:
467         (itemTextRenderer): Inverted check.
468         (groupLabelTextRenderer): Inverted check.
469
470 2006-07-12  Darin Adler  <darin@apple.com>
471
472         Reviewed by Maciej.
473
474         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9806
475           <rdar://problem/4622622>
476           REGRESSION: Large rowspan causes WebKit to call abort()
477
478         Test: fast/table/large-rowspan-crash.html
479
480         * rendering/RenderTableSection.cpp:
481         (WebCore::RenderTableSection::ensureRows):
482         Use sizeof(RowStruct) instead of sizeof(int).
483         Clearly we'll need something better to solve this completely.
484         I expect another smaller, but still huge, value will still cause a problem.
485
486 2006-07-12  Anders Carlsson  <acarlsson@apple.com>
487
488         Reviewed by Maciej.
489
490         <rdar://problem/4586665> REGRESSION: autorestore.apple.com: Crashes Safari in WebCore::Widget::client() const
491
492         * bridge/mac/FrameMac.h:
493         Add focusCallResultedInViewBeingCreated argument. 
494         
495         * bridge/mac/FrameMac.mm:
496         (WebCore::FrameMac::nextKeyViewInFrame):
497         If the call to focus() caused the node to get a native widget, set focusCallResultedInViewBeingCreated to true.
498         
499         (WebCore::FrameMac::nextKeyViewInFrameHierarchy):
500         Don't reset the focus node if focusCallResultedInViewBeingCreated is true. Also, add magic to prevent setting
501         a text field as the first responder if its field editor already is the current first responder.
502         
503         * page/FrameView.cpp:
504         (WebCore::FrameView::handleMousePressEvent):
505         In some cases, get the event target node again after dispatching the mouse event.
506
507 2006-07-12  Beth Dakin  <bdakin@apple.com>
508
509         Reviewed by Adele.
510
511         Fix for <rdar://problem/4615765> Input[type='search' fields 
512         initially render too large in Widgets
513
514         Fundamentally, the problem here is that we were miscalculating 
515         things because [NSGraphicsContext currentContextDrawingToScreen] 
516         was evaluating to false when widgets first load. We only ever used 
517         this check, however, to determine if we were printing or not, so it 
518         should not have evaluated to false for loading in Dashbaord. 
519         Instead, if we query the RenderView about whether or not we are 
520         printing, we will get the right answer.
521
522         No test case added since this appears only to affect Dashboard.
523
524         * bridge/mac/WebCoreFrameBridge.mm:
525         (-[WebCoreFrameBridge drawRect:]): Ask the RenderView if we are 
526         printing instead. This is not part of the actual bug fix, but it 
527         seems wise to get rid of all calls to [NSGraphicsContext 
528         currentContextDrawingToScreen] when we are just trying to determine 
529         if we are printing or not.
530         * platform/mac/ListBoxMac.mm:
531         (itemTextRenderer):This function now takes a boolean, isPrinting.
532         (groupLabelTextRenderer): Same as above.
533         (ListBox::sizeForNumberOfLines): Ask the RenderView if we are 
534         printing.
535         (-[WebCoreTableView drawRow:clipRect:]): Same as above.
536         * platform/mac/PopUpButtonMac.mm:
537         (PopUpButton::sizeHint): Same as above.
538         * platform/mac/TextFieldMac.mm:
539         (-[NSSearchFieldCell _addStringToRecentSearches:]):
540         * rendering/RenderLineEdit.cpp: Same as above.
541
542 2006-07-12  Adele Peterson  <adele@apple.com>
543
544         Reviewed by Maciej.
545
546         Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=9813
547         OPTION text can paint over select element's scrollbar
548
549         Test: fast/forms/option-text-clip.html
550
551         * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::paintObject):
552         When calculating the clip to apply to the button text, also consider padding.
553         In the future, we may have separate renderers for the text part, and the arrow part
554         of the control, and then the separation should be natural.  For now, we use padding.
555
556 2006-07-11  David Kilzer  <ddkilzer@kilzer.net>
557
558         Windows build fix.  Reviewed by NOBODY.
559
560         * WebCore.vcproj/WebCore/WebCore.vcproj:  Added JSHTMLOptionsCollection.cpp/h
561         and JSHTMLOptionsCollectionCuston.cpp.  VC++ Express realphabetized the file list.
562
563 2006-07-11  Darin Adler  <darin@apple.com>
564
565         Reviewed by Adele.
566
567         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9809
568           <rdar://problem/4619515>
569           focus ring fails to appear on select element after choosing item from popup
570
571         - includes http://bugzilla.opendarwin.org/show_bug.cgi?id=9853
572           improvements to select element, including some storage leak fixes
573
574         * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::index): Use a const
575         reference for the list items, so we don't have to copy a vector.
576         * html/HTMLSelectElement.cpp:
577         (WebCore::HTMLSelectElement::selectedIndex): Ditto.
578         (WebCore::HTMLSelectElement::setSelectedIndex): Ditto.
579         (WebCore::HTMLSelectElement::length): Ditto.
580         (WebCore::HTMLSelectElement::remove): Ditto.
581         (WebCore::HTMLSelectElement::value): Ditto.
582         (WebCore::HTMLSelectElement::setValue): Ditto.
583         (WebCore::HTMLSelectElement::stateValue): Ditto.
584         (WebCore::HTMLSelectElement::restoreState): Ditto.
585         (WebCore::HTMLSelectElement::appendFormData): Ditto.
586         (WebCore::HTMLSelectElement::optionToListIndex): Ditto.
587         (WebCore::HTMLSelectElement::listToOptionIndex): Ditto.
588         (WebCore::HTMLSelectElement::recalcListItems): Made const, with the appropriate
589         fields mutable.
590         (WebCore::HTMLSelectElement::reset): Use a const reference for
591         the list items, so we don't have to copy the vector. Remove the call to
592         setSelectionChanged for the RenderMenuList case.
593         (WebCore::HTMLSelectElement::notifyOptionSelected): Ditto, on both counts.
594         (WebCore::HTMLSelectElement::defaultEventHandler): Call focus() before showing
595         the pop-up.
596         * html/HTMLSelectElement.h: The RenderMenuList class is no longer a friend.
597         Changed the listItems function to return a const reference to the vector so
598         it no longer copies the vector. Removed the const_cast to the call to
599         recalcListItems and changed it to a const member function. Made m_recalcListItems
600         mutable.
601         * rendering/DeprecatedRenderSelect.cpp:
602         (WebCore::DeprecatedRenderSelect::updateFromElement): Removed an unnecessary call
603         to recalcListItems, which is called automatically. Use a const reference for the
604         list items so we don't have to copy a vector.
605         (WebCore::DeprecatedRenderSelect::layout): Ditto.
606         (WebCore::DeprecatedRenderSelect::selectionChanged): Ditto.
607         (WebCore::DeprecatedRenderSelect::updateSelection): Ditto.
608         * rendering/RenderMenuList.cpp:
609         (WebCore::RenderMenuList::RenderMenuList): Updated for renamed data members.
610         (WebCore::RenderMenuList::createInnerBlock): Ditto.
611         (WebCore::RenderMenuList::addChild): Ditto.
612         (WebCore::RenderMenuList::removeChild): Ditto.
613         (WebCore::RenderMenuList::setStyle): Ditto. Also removed code to set the style
614         on the pop-up menu, because it's created with the correct style and destroyed
615         before it a style change could occur.
616         (WebCore::RenderMenuList::updateFromElement): Rearranged code to compute the
617         maximum width in a simpler fashion, and to not bother trying to maintain
618         the "selected" flags on the elements, since the HTMLSelectElement class
619         takes care of that. Store the width as an int. Call setText to set the text
620         based on the selected element's option text.
621         (WebCore::RenderMenuList::paintObject): Don't check m_inner when setting
622         up the clip -- always set up the clip.
623         (WebCore::RenderMenuList::calcMinMaxWidth): Use m_optionsWidth directly
624         instead of calling ceilf on m_longestWidth.
625         (WebCore::RenderMenuList::showPopup): Don't use m_popupMenu to store the
626         menu -- instead keep the pointer in a local variable. Get the selected
627         index from the HTMLSelectElement.
628         (WebCore::RenderMenuList::valueChanged): Call HTMLSelectElement::setSelectedIndex
629         to do most of the work.
630         * rendering/RenderMenuList.h: Renamed m_inner to m_innerBlock. Removed
631         m_popupMenu, m_size, m_selectionChanged, and m_selectedIndex. Renamed
632         m_longestWidth to m_optionsWidth and changed it to be an int. Removed
633         unneeded override of removeLeftoverAnonymousBoxes function. Removed
634         unneeded selectionChanged, setSelectionChanged, updateSelection, and
635         hasPopupMenu functions. Removed extra includes.
636         * rendering/RenderPopupMenu.cpp: (WebCore::RenderPopupMenu::populate):
637         Change to iterate the list items instead of iterating all children
638         of the select node.
639         * rendering/RenderPopupMenu.h: Renamed getRenderMenuList to menuList.
640         * rendering/RenderPopupMenuMac.mm:
641         (WebCore::RenderPopupMenuMac::populate): Moved code to clear and create
642         the pop-up here from the caller. Removed an extra retain that would cause
643         the NSPopUpButtonCell to leak.
644         (WebCore::RenderPopupMenuMac::showPopup): Removed unnecessary code to
645         create the pop-up, which is now in populate, and also the call to the
646         clear function, for the same reason. Reorganized code to make it a bit
647         more readable. Removed an unnecessary if to check if frame is nil.
648         Used a RefPtr to make sure we don't make a call on a frame after it's
649         deleted. As part of the reorganization fixed a problem where we'd retain
650         the event and then return early without releasing it in one case.
651         (WebCore::RenderPopupMenuMac::addSeparator): Tweaked a little.
652         (WebCore::RenderPopupMenuMac::addGroupLabel): Grouped all the code to
653         manage the NSMenu at the bottom of the function.
654         (WebCore::RenderPopupMenuMac::addOption): Ditto.
655
656 2006-07-11  Justin Garcia  <justin.garcia@apple.com>
657
658         Reviewed by levi
659         
660         <rdar://problem/4620686>
661         REGRESSION: Mispelling markers are still displayed when using the delete key to place caret into a misspelled word
662
663         * bridge/mac/FrameMac.mm:
664         (WebCore::FrameMac::respondToChangedSelection): Remove markers from newAdjacentWords 
665         even if oldAdjacentWords is equal to newAdjacentWords.  This happens during a deletion.
666         
667
668 2006-07-11  Tim Omernick  <timo@apple.com>
669
670         Reviewed by NOBODY (build fix)
671
672         * bindings/objc/DOMPrivate.h:
673         Don't @class NPObject; that breaks files that actually #import <JavaScriptCore/npruntime.h>, since the NPObject
674         there is of a different type.
675         Also clarified a highly misleading comment from my last commit.  I meant to clarify the comment
676         before landing.
677
678 2006-07-12  Anders Carlsson  <acarlsson@apple.com>
679
680         Reviewed by Geoff.
681
682         http://bugzilla.opendarwin.org/show_bug.cgi?id=9635
683         REGRESSION: Crash when adding to cart at <http://www.yemeksepeti.com/>
684         
685         * html/HTMLTokenizer.cpp:
686         (WebCore::HTMLTokenizer::scriptHandler):
687         Don't load external scripts if the parser is stopped.
688         
689         * manual-tests/open-close-tokenizer-crash.html: Added.
690         * manual-tests/resources/empty-file.js: Added.
691         * manual-tests/resources/open-close-tokenizer-crash.html: Added.
692         Add manual test.
693
694 2006-07-11  John Sullivan  <sullivan@apple.com>
695
696         Reviewed by Kevin, Timo O, Brady, Darin, and Hyatt (whee!)
697
698         - added support for creating a selection image with white text
699
700         * rendering/RenderObject.h:
701         (WebCore::):
702         add PaintRestriction enum
703         (WebCore::RenderObject::PaintInfo::PaintInfo):
704         add forceWhiteText boolean to PaintInfo struct
705
706         * page/FramePrivate.h:
707         (WebCore::FramePrivate::FramePrivate):
708         replaced m_selectionOnly bool with m_paintRestriction, which also handles forcing the
709         text to white
710
711         * page/Frame.cpp:
712         (WebCore::Frame::paint):
713         updated to use & pass m_paintRestriction where it used to use & pass just m_selectionOnly
714
715         * bridge/mac/FrameMac.h:
716         * bridge/mac/FrameMac.mm:
717         (WebCore::FrameMac::selectionImage):
718         now takes forceWhiteText parameter, stored in FramePrivate as part of PaintRestriction
719
720         * bridge/mac/WebCoreFrameBridge.h:
721         * bridge/mac/WebCoreFrameBridge.mm:
722         (-[WebCoreFrameBridge selectionImageForcingWhiteText:]):
723         renamed from selectionImage, now takes forceWhiteText parameter, which is passed
724         down into Frame
725
726         * rendering/RenderLayer.h:
727         * rendering/RenderLayer.cpp:
728         (WebCore::RenderLayer::paint):
729         use a PaintRestriction value where we used to use a selectionOnly bool
730         (WebCore::RenderLayer::paintLayer):
731         ditto; also stores forceWhiteText in PaintInfo struct
732
733         * kcanvas/KCanvasResources.cpp:
734         (WebCore::KCanvasMarker::draw):
735         updated for changed signature of PaintInfo constructor
736
737         * ksvg2/svg/SVGMaskElement.cpp:
738         (WebCore::SVGMaskElement::drawMaskerContent):
739         ditto
740
741         * ksvg2/svg/SVGPatternElement.cpp:
742         (WebCore::SVGPatternElement::drawPatternContentIntoTile):
743         ditto
744
745         * rendering/InlineTextBox.cpp:
746         (WebCore::InlineTextBox::paint):
747         paint with white text color if forceWhiteText is set in PaintInfo struct
748
749 2006-07-11  Tim Omernick  <timo@apple.com>
750
751         Reviewed by Anders.
752
753         <http://bugzilla.opendarwin.org/show_bug.cgi?id=9843>:
754         Give Netscape plug-ins access to their own DOM element
755
756         * html/HTMLPlugInElement.h:
757         Just import JSC headers on Mac.  The NPObject and Bindings::Instance stuff is only used on Mac anyway.
758         Changed __APPLE__ to PLATFORM(MAC).
759         Added m_NPObject ivar.
760         * html/HTMLPlugInElement.cpp:
761         (WebCore::HTMLPlugInElement::HTMLPlugInElement):
762         Initialize the NPObject.
763         (WebCore::HTMLPlugInElement::~HTMLPlugInElement):
764         Release the NPObject when the element is destroyed.
765         (WebCore::HTMLPlugInElement::createNPObject):
766         Creates an NPObject for the element.
767         (WebCore::HTMLPlugInElement::getNPObject):
768         Returns the NPObject for the element, creating and caching it if necessary.
769
770         * html/HTMLAppletElement.h:
771         Changed __APPLE__ to PLATFORM(MAC).
772         * html/HTMLAppletElement.cpp:
773         ditto
774         * html/HTMLEmbedElement.h:
775         ditto
776         * html/HTMLEmbedElement.cpp:
777         ditto
778         * html/HTMLObjectElement.h:
779         ditto
780         * html/HTMLObjectElement.cpp:
781         ditto
782
783         * bindings/objc/DOMPrivate.h:
784         Added -[DOMElement _NPObject].
785
786         * bindings/objc/DOM.mm:
787         (-[DOMElement _NPObject]):
788         Returns the NPObject for the element.  Since this is only needed by the Netscape plug-in API, you can only get 
789         the NPObject for applet, embed, and object elements.
790         
791 2006-07-11  Adele Peterson  <adele@apple.com>
792
793         Reviewed by Hyatt.
794
795         - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9861
796         REGRESSION: Can't dynamically change list box to popup
797         
798         and updated fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9859
799         REGRESSION: Can't dynamically change popup to list box
800
801         The original fix for 9859 was in the renderer, and I think we can catch the change
802         earlier in the element to detach and reattach.
803
804         I also did some cleanup to remove the PopupButton code path from DeprecatedRenderSelect
805
806         Test: fast/forms/select-change-listbox-to-popup.html
807
808         * html/HTMLSelectElement.cpp:
809         (WebCore::HTMLSelectElement::parseMappedAttribute): If the new attribute value is going to require us to change from listbox to popup or vice versa,
810         and we're already attached, then detach and reattach to create the correct renderer.  If we're not attached, then we'll create the correct renderer
811         when we attach.
812         (WebCore::HTMLSelectElement::recalcStyle): Updated shouldUseMenuList since it no longer takes a RenderStyle.
813         (WebCore::HTMLSelectElement::isKeyboardFocusable): ditto.
814         (WebCore::HTMLSelectElement::isMouseFocusable): ditto.
815         (WebCore::HTMLSelectElement::createRenderer): ditto.
816         (WebCore::HTMLSelectElement::setRecalcListItems): ditto.
817         (WebCore::HTMLSelectElement::reset): ditto.
818         (WebCore::HTMLSelectElement::notifyOptionSelected): ditto.
819         (WebCore::HTMLSelectElement::defaultEventHandler): ditto.
820
821         * html/HTMLSelectElement.h: (WebCore::HTMLSelectElement::shouldUseMenuList):
822         This method no longer takes a RenderStyle.  That was leftover from when we used to use the appearance
823         to determine whether or not to use the new menu list implementation.
824
825         * rendering/DeprecatedRenderSelect.h: Removed PopupButton code path.
826         * rendering/DeprecatedRenderSelect.cpp:
827         (WebCore::DeprecatedRenderSelect::DeprecatedRenderSelect):
828         (WebCore::DeprecatedRenderSelect::setWidgetWritingDirection):
829         (WebCore::DeprecatedRenderSelect::updateFromElement):
830         (WebCore::DeprecatedRenderSelect::baselinePosition):
831         (WebCore::DeprecatedRenderSelect::layout):
832         (WebCore::DeprecatedRenderSelect::updateSelection):
833
834         * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateFromElement):
835         Backed out previous fix since this is now done in HTMLSelectElement.
836
837 2006-07-11  Adele Peterson  <adele@apple.com>
838
839         Reviewed by Hyatt.
840
841         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9859
842         REGRESSION: Can't dynamically change popup to list box
843
844         Test: fast/forms/select-change-popup-to-listbox.html
845
846         * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateFromElement):
847         If the select element has the multiple property set, or has a size > 1, then it
848         really should be a list box, so we detach and attach the element so it creates the
849         correct type of renderer.
850
851 2006-07-11  John Sullivan  <sullivan@apple.com>
852
853         Reviewed by Beth Dakin and Tim Omernick
854
855         - fixed <rdar://problem/4622794> HiDPI: dragging the selection in Safari can show pixel cracks 
856         at non-integral scale factors
857
858         * bridge/mac/FrameMac.mm:
859         (WebCore::FrameMac::imageFromRect):
860         round image rect in window coordinate space
861
862 2006-07-10  Darin Adler  <darin@apple.com>
863
864         Reviewed by Geoff.
865
866         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9811
867           rdar://problem/4619572
868           OPTION text contained in OPTGROUP appears at the wrong size
869
870         * dom/Node.h:
871         * dom/Node.cpp: (WebCore::Node::renderStyle): Made a const member function.
872         The derived classes were overriding with const member functions, and I could
873         change either this or the derived -- decided to do this.
874
875 2006-07-10  Darin Adler  <darin@apple.com>
876
877         Reviewed by Geoff.
878
879         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9810
880           rdar://problem/4619534
881           OPTGROUP label text is using the default font instead of Lucida Grande
882
883         * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::setFontFromControlSize):
884         Code wants the family name, but was calling fontName, which is not the same thing.
885         Also removed the unneeded conversion to DeprecatedString.
886
887 === Safari-521.16 ===
888
889 2006-07-10  David Kilzer  <ddkilzer@kilzer.net>
890
891         Reviewed by Darin.
892
893         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9179
894           Implement select.options.add() method
895
896         Tests:
897         - fast/dom/select-selectedIndex-multiple.html
898         - fast/dom/select-selectedIndex.html
899         - fast/js/select-options-add.html
900
901         * DerivedSources.make: Added JSHTMLOptionsCollection.h.
902         * ForwardingHeaders/kjs/operations.h: Added.
903         * WebCore.xcodeproj/project.pbxproj: Added new source files.
904         * bindings/js/JSHTMLOptionsCollectionCustom.cpp: Added.
905         (WebCore::JSHTMLOptionsCollection::length):
906         (WebCore::JSHTMLOptionsCollection::setLength):
907         (WebCore::JSHTMLOptionsCollection::indexSetter):
908         * bindings/js/kjs_html.cpp: Removed JSHTMLOptionsCollection implementation.
909         Renamed classes and methods for consistency.
910         (KJS::JSHTMLElement::selectGetter):
911         (KJS::JSHTMLElement::put):
912         (KJS::JSHTMLElement::selectSetter):
913         (KJS::JSHTMLCollection::JSHTMLCollection):
914         (KJS::JSHTMLCollectionProtoFunc::callAsFunction):
915         (KJS::getHTMLOptionsCollection):
916         * bindings/js/kjs_html.h: Ditto.
917         * bindings/scripts/CodeGeneratorJS.pm: Added support for HasCustomIndexSetter class attribute.
918         Added support for Optional parameter attribute, which makes generated code assume overloaded
919         implementation methods are available for a JavaScript function with optional arguments.  Changed
920         local 'impl' variables to 'imp' so that impl() methods could be called without class designation.
921         * html/HTMLOptionElement.idl: Added GenerateNativeConverter attribute.
922         * html/HTMLOptionsCollection.cpp: Added methods used by generated JSHTMLOptionsCollection class.
923         (WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
924         (WebCore::HTMLOptionsCollection::add):
925         (WebCore::HTMLOptionsCollection::selectedIndex):
926         (WebCore::HTMLOptionsCollection::setSelectedIndex):
927         (WebCore::HTMLOptionsCollection::setLength):
928         * html/HTMLOptionsCollection.h: Ditto.
929         * html/HTMLOptionsCollection.idl: Added.
930
931 2006-07-10  David Harrison  <harrison@apple.com>
932
933         Reviewed by Dave Hyatt.
934
935         <rdar://problem/4602408> -webkit-highlight needs to support images and elements other than text
936
937         * rendering/RenderBox.cpp:
938         (WebCore::RenderBox::paintCustomHighlight):
939         * rendering/RenderBox.h:
940         Utility for subclasses.
941         
942         * rendering/RenderImage.cpp:
943         (WebCore::RenderImage::paint):
944         Custom highlight in front of images.
945         
946         * rendering/RenderListMarker.cpp:
947         (WebCore::RenderListMarker::paint):
948         Custom highlight in front of list markers.
949
950         * rendering/RenderWidget.cpp:
951         (WebCore::RenderWidget::paint):
952         Custom highlight in front of objects.
953
954 2006-07-10  David Hyatt  <hyatt@apple.com>
955
956         <rdar://problem/4620557> REGRESSION: In a mail message, text isn't painted
957         correctly after choosing Redo Typing
958
959         Better fix for repainting issue with positioned objects when height
960         changes.  Optimize when only a positioned child changes so that we don't
961         incorrectly do normal flow layout.
962
963         Reviewed by darin
964
965         * WebCore.xcodeproj/project.pbxproj:
966         * rendering/RenderBlock.cpp:
967         (WebCore::RenderBlock::layoutBlock):
968         * rendering/RenderFlexibleBox.cpp:
969         (WebCore::RenderFlexibleBox::layoutBlock):
970         * rendering/RenderTable.cpp:
971         (WebCore::RenderTable::layout):
972         * rendering/RenderView.cpp:
973         (WebCore::RenderView::layout):
974         * rendering/bidi.cpp:
975         (WebCore::RenderBlock::layoutInlineChildren):
976
977 2006-07-10  Adele Peterson  <adele@apple.com>
978
979         Reviewed by Beth.
980
981         - Fix for <rdar://problem/4621442> REGRESSION (NativePopup) : Popup menus aren't drawn correctly on page at orbitz.com; cheaptickets.com
982
983         Test: fast/forms/select-style.html
984
985         * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::isControlStyled):
986         Don't let popups be style-able for now.  We'll allow it later, when we
987         have a good way to handle border & backgrounds and still having it look like a control.
988
989 2006-07-10  Justin Garcia  <justin.garcia@apple.com>
990
991         Reviewed by harrison
992         
993         <rdar://problem/4619260>
994         9A213 + Safari 521.15.1 Crash with To Do's alarm icon (WebCore::maxDeepOffset(WebCore::Node const*) )
995         <rdar://problem/4619841>
996         REGRESSION: Dragging selection over input field results in a crash (WebCore::maxDeepOffset(WebCore::Node const*)
997
998         * WebCore.xcodeproj/project.pbxproj:
999         * editing/Selection.cpp:
1000         (WebCore::Selection::adjustForEditableContent): Iterate using next/previousVisuallyDistinctCandidate 
1001         instead of traverseNext/Previous node because we were skipping positions.  Jump out of shadow trees.  
1002         Migrate to isEditablePosition instead of isContentEditable.
1003         
1004
1005 2006-07-10  Beth Dakin  <bdakin@apple.com>
1006
1007         Reviewed by Adele.
1008
1009         Shuffling comments around from my last check-in to make things read 
1010         more clearly.
1011
1012         * page/DOMWindow.h:
1013         * page/DOMWindow.idl:
1014
1015 2006-07-10  Beth Dakin  <bdakin@apple.com>
1016
1017         Reviewed by Darin.
1018
1019         Fix for <rdar://problem/4621095> The should be a way to 
1020         access the user interface scale factor through the DOM
1021
1022         window.devicePixelRatio returns the user interface scale factor.
1023
1024         * page/DOMWindow.cpp:
1025         (WebCore::DOMWindow::devicePixelRatio):
1026         * page/DOMWindow.h:
1027         * page/DOMWindow.idl:
1028
1029 2006-07-10  Brady Eidson  <beidson@apple.com>
1030
1031         Reviewed by Alexey
1032
1033         Resolved the console error messages people got from the new DB even if they didn't have it enabled
1034
1035         * icon/IconDatabase.cpp:
1036         (WebCore::IconDatabase::pruneUnreferencedIcons):
1037         (WebCore::IconDatabase::pruneUnretainedIcons):
1038         Added quick check to bail if the DB isn't open
1039
1040 2006-07-10  David Harrison  <harrison@apple.com>
1041
1042         Reviewed by Tim Hatcher
1043
1044         Partial fix for...
1045         <rdar://problem/4619260> 9A213 + Safari 521.15.1 Crash with To Do's alarm icon (WebCore::maxDeepOffset(WebCore::Node const*) )
1046         
1047         * editing/Selection.cpp:
1048         (WebCore::Selection::adjustForEditableContent):
1049         Allow for node being 0.  This is a bandaid fix to prevent the crash.  It will still assert in a debug build.  See bug for more info.
1050
1051 2006-07-10  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1052
1053         Reviewed by Darin.
1054
1055         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9808
1056           REGRESSION: Incorrect layout (and ERROR) when forcing ATSU For All Text
1057
1058         * manual-tests/ATSU-bad-layout.html: Added.
1059         * platform/mac/FontMac.mm:
1060         (WebCore::Font::floatWidthForComplexText): Return 0 immediately for empty runs.
1061
1062 2006-07-10  Darin Adler  <darin@apple.com>
1063
1064         - try to fix the no-SVG build
1065
1066         * ksvg2/misc/SVGImageLoader.cpp: Move namespace brace inside the #if.
1067
1068 2006-07-10  Darin Adler  <darin@apple.com>
1069
1070         Reviewed by Anders.
1071
1072         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9833
1073           REGRESSION: Reproducible crash: RenderMenuList.cpp:58: failed assertion `!m_first'
1074
1075         * manual-tests/empty-title-popup.html: Added.
1076
1077         * rendering/RenderMenuList.h: Add createInnerBlock.
1078         * rendering/RenderMenuList.cpp:
1079         (WebCore::RenderMenuList::createInnerBlock): Factored out of addChild.
1080         (WebCore::RenderMenuList::addChild): Call createInnerBlock.
1081         (WebCore::RenderMenuList::setText): Changed parameter type.
1082         (WebCore::RenderMenuList::showPopup): Call createInnerBlock before calling
1083         the parent class's addChild.
1084
1085 2006-07-10  Rob Buis  <buis@kde.org>
1086
1087         Reviewed by Maciej via IRC.
1088
1089         Make sure the attributes are calculated against viewport width value,
1090         as defined in the spec.  http://paste.lisp.org/display/22342
1091
1092         * ksvg2/svg/SVGEllipseElement.cpp:
1093         (WebCore::SVGEllipseElement::rx): Changed LM_HEIGHT to LM_WIDTH.
1094         * ksvg2/svg/SVGLineElement.cpp:
1095         (SVGLineElement::x2): Ditto.
1096
1097 2006-07-10  Beth Dakin  <bdakin@apple.com>
1098
1099         Reviewed by Maciej.
1100
1101         Fix for <rdar://problem/4610314> Support the CSS3 content property 
1102         for images
1103
1104         This patch provides initial support for the CSS3 content property. 
1105         It lacks support for any content other than images, and only allows 
1106         content for elements that seemed safe for now.
1107
1108         * css/cssstyleselector.cpp:
1109         (WebCore::CSSStyleSelector::applyProperty): Remove restrictions for 
1110         just :before and :after
1111         * html/HTMLBRElement.cpp:
1112         (WebCore::HTMLBRElement::createRenderer):
1113         * html/HTMLFrameSetElement.cpp:
1114         (WebCore::HTMLFrameSetElement::createRenderer):
1115         * html/HTMLImageElement.cpp:
1116         (WebCore::HTMLImageElement::createRenderer):
1117         * html/HTMLLegendElement.cpp:
1118         (WebCore::HTMLLegendElement::createRenderer):
1119         * rendering/RenderImage.cpp:
1120         (WebCore::RenderImage::RenderImage):
1121         (WebCore::RenderImage::setCachedImage): Don't allow the image to be 
1122         set this way if it was already set with the content property.
1123         * rendering/RenderImage.h:
1124         (WebCore::RenderImage::setIsAnonymousImage): Anonymous images are 
1125         those set through the content property.
1126         (WebCore::RenderImage::isAnonymousImage):
1127         * rendering/RenderObject.cpp:
1128         (WebCore::RenderObject::createObject): If there is content 
1129         specified, create a RenderImage with the content and initialize the 
1130         cached image to whatever was specified in the CSS.
1131
1132 2006-07-10  Brady Eidson  <beidson@apple.com>
1133
1134         Reviewed by NOBODY (Build Fix!)
1135
1136         * icon/SiteIcon.cpp:
1137         (SiteIcon::getImage):
1138         Release build made an "unused variable" warning, which is, of course, an error.  fixed that.
1139
1140 2006-07-10  Brady Eidson  <beidson@apple.com>
1141
1142         Reviewed by Maciej
1143
1144         SQLite Icon DB now fully replicates functionality of the old DB, including pruning to keep unused
1145         information out to keep down disk usage.  For now, it is still off by default, as the critical
1146         feature of importing old icons into the new DB is still unrealized.
1147         If you'd like to test, add #define ICONDEBUG to your WebKitPrefix.h
1148
1149         * icon/IconDatabase.cpp:
1150         (WebCore::IconDatabase::IconDatabase):
1151         (WebCore::IconDatabase::open):
1152           -Sets up a timer for initial pruning
1153         (WebCore::IconDatabase::iconForPageURL):
1154           -Switched away from "dirty blob hack" as the problem is provisionally solved
1155         (WebCore::IconDatabase::retainIconForURL):
1156         (WebCore::IconDatabase::releaseIconForURL):
1157           -Same as found in WebKit
1158         (WebCore::IconDatabase::totalRetainCountForIconURL):
1159           -Adds up all retainers of icon
1160         (WebCore::IconDatabase::forgetIconForIconURLFromDatabase):
1161           -Wipes an Icon table entry out
1162         (WebCore::IconDatabase::establishTemporaryIconIDForIconURL):
1163         (WebCore::IconDatabase::establishTemporaryIconIDForEscapedIconURL):
1164         (WebCore::IconDatabase::establishIconIDForIconURL):
1165         (WebCore::IconDatabase::establishIconIDForEscapedIconURL):
1166           -Added ability to get an iconID without creating a new one if a lookup is all
1167            that is genuinely wanted
1168         (WebCore::IconDatabase::pruneUnreferencedIcons):
1169         (WebCore::IconDatabase::pruneUnretainedIcons):
1170           -Called on a timer on DB startup to clean it out
1171         * icon/IconDatabase.h:
1172         * icon/SiteIcon.cpp:
1173         (SiteIcon::SiteIcon):
1174         (SiteIcon::~SiteIcon):
1175           -Deletes the image on deletion
1176         (SiteIcon::getImage):
1177           -Cut down on no-longer-necessary debug info
1178
1179 2006-07-10  Anders Carlsson  <acarlsson@apple.com>
1180
1181         Reviewed by Adele.
1182
1183         http://bugzilla.opendarwin.org/show_bug.cgi?id=9245
1184         Quirksmode: Incorrect handling of disabled BUTTON elements
1185
1186         * html/HTMLButtonElement.cpp:
1187         (WebCore::HTMLButtonElement::defaultEventHandler):
1188         Don't call prepareSubmit if the element is disabled.
1189
1190         * html/HTMLInputElement.cpp:
1191         (WebCore::HTMLInputElement::defaultEventHandler):
1192         Don't call prepareSubmit if the element is disabled.
1193
1194 2006-07-10  Darin Adler  <darin@apple.com>
1195
1196         - try to fix Windows build
1197
1198         * platform/win/TemporaryLinkStubs.cpp: Put a few functions in the WebCore namespace.
1199         * platform/gdk/TemporaryLinkStubs.cpp: Ditto.
1200
1201 2006-07-10  Darin Adler  <darin@apple.com>
1202
1203         Reviewed by Geoff.
1204
1205         - fix failures seen in layout tests
1206
1207         * bindings/js/kjs_dom.cpp: (KJS::toJS): Restore one of the few WebCore:: prefixes
1208         that really needed to be there -- because we have two classes named JSHTMLDocument
1209         at the moment! (One in KJS and one in WebCore namespace.)
1210
1211 2006-07-10  Darin Adler  <darin@apple.com>
1212
1213         - try to fix Windows build
1214
1215         * rendering/RenderLayer.h: Correct a forward declaration of ScrollBar.
1216
1217 2006-07-09  Adele Peterson  <adele@apple.com>
1218
1219         Reviewed by Maciej.
1220
1221         Fix for <rdar://problem/4463835> Switch to use new popup menu implementation for <select>
1222
1223         * css/html4.css: Added style for new selects, and for list boxes.
1224         * html/HTMLSelectElement.h: (WebCore::HTMLSelectElement::shouldUseMenuList): Removed check for appearance so new popups can be styled.
1225    
1226         * rendering/RenderMenuList.cpp:
1227         (WebCore::RenderMenuList::setStyle): Removed padding.  This is now set by the theme.
1228         (WebCore::RenderMenuList::calcMinMaxWidth): Now takes minimum text size into account.
1229         * rendering/RenderMenuList.h: Removed baselinePosition since we're letting the theme calculate that.
1230
1231         * rendering/RenderTheme.cpp: (WebCore::RenderTheme::isControlContainer): Added menuList as a ControlContainer, 
1232         so RenderThemeMac will compute its baseline.
1233         * rendering/RenderTheme.h: (WebCore::RenderTheme::minimumTextSize): Added.
1234         * rendering/RenderThemeMac.h: Added minimumTextSize, setPopupPaddingFromControlSize, popupButtonSizes, popupButtonMargins, popupButtonPadding.
1235         Removed sizeOfArrowControl. 
1236         * rendering/RenderThemeMac.mm:
1237         (WebCore::): Added enum for padding.
1238         (WebCore::RenderThemeMac::adjustRepaintRect): Now inflates rect to account for control shadow.
1239         (WebCore::RenderThemeMac::baselinePosition): Now calculates baseline for menulist.
1240         (WebCore::RenderThemeMac::popupButtonMargins): Tweaked values.
1241         (WebCore::RenderThemeMac::popupButtonSizes): Added.
1242         (WebCore::RenderThemeMac::popupButtonPadding): Added, so different padding can be set for different control sizes.
1243         (WebCore::RenderThemeMac::setPopupPaddingFromControlSize): Added.
1244         (WebCore::RenderThemeMac::paintMenuList): Now inflates rect to account for control shadow.
1245         (WebCore::RenderThemeMac::adjustMenuListStyle): Resets border, sets padding, sets control size.
1246         (WebCore::RenderThemeMac::setPopupButtonCellState): Removed unnecessary class name.
1247         (WebCore::RenderThemeMac::minimumTextSize): Added.
1248
1249 2006-07-09  Darin Adler  <darin@apple.com>
1250
1251         - add back "unused code" for plain text fields, still used by <isindex>!
1252
1253         * platform/TextField.h:
1254         * platform/mac/TextFieldMac.mm:
1255         * platform/mac/WebCoreTextField.h:
1256         * platform/mac/WebCoreTextField.mm:
1257         * rendering/RenderLineEdit.cpp:
1258
1259 2006-07-09  Darin Adler  <darin@apple.com>
1260
1261         Reviewed by Tim Hatcher.
1262
1263         - put more into the WebCore namespace
1264         - removed unused code for plain text fields
1265
1266         Put more classes, class templates, enums, functions, and constants into
1267         the WebCore namespace, including all the headers in the platform directory.
1268
1269         Removed lots of unneeded "WebCore::" qualifiers and "using" directives.
1270
1271         Added some "WebCore::" qualifiers in a few places.
1272
1273         Removed "uses WebCore::" in headers that we said we'd remove "when
1274         everything is in the WebCore namespace".
1275
1276         * bindings/js/JSDOMParser.cpp:
1277         * bindings/js/JSHTMLElementWrapperFactory.cpp:
1278         * bindings/js/JSXSLTProcessor.cpp:
1279         * bindings/js/kjs_binding.cpp:
1280         * bindings/js/kjs_css.cpp:
1281         * bindings/js/kjs_dom.cpp:
1282         * bindings/js/kjs_dom.h:
1283         * bindings/js/kjs_events.cpp:
1284         * bindings/js/kjs_proxy.h:
1285         * bindings/js/kjs_window.h:
1286         * bindings/objc/DOM.mm:
1287         * bridge/History.h:
1288         * bridge/JavaAppletWidget.h:
1289         * bridge/mac/FormDataMac.h:
1290         * bridge/mac/FormDataMac.mm:
1291         * bridge/mac/WebCoreAXObject.mm:
1292         * bridge/mac/WebCoreEncodings.mm:
1293         * bridge/mac/WebCoreFrameBridge.h:
1294         * bridge/mac/WebCoreIconDatabaseBridge.mm:
1295         * bridge/mac/WebCorePageState.h:
1296         * bridge/mac/WebCoreScriptDebugger.mm:
1297         * bridge/mac/WebCoreSettings.h:
1298         * css/CSSGrammar.y:
1299         * css/CSSPageRule.cpp:
1300         * css/CSSPageRule.h:
1301         * css/MediaList.cpp:
1302         * css/cssstyleselector.h:
1303         * dom/Clipboard.h:
1304         * dom/Document.cpp:
1305         * dom/Document.h:
1306         * dom/EventTargetNode.h:
1307         * dom/Node.cpp:
1308         * dom/Node.h:
1309         * dom/Position.h:
1310         * dom/Range.cpp:
1311         * dom/XMLTokenizer.cpp:
1312         * editing/AppendNodeCommand.h:
1313         * editing/ApplyStyleCommand.cpp:
1314         * editing/BreakBlockquoteCommand.cpp:
1315         * editing/BreakBlockquoteCommand.h:
1316         * editing/CompositeEditCommand.cpp:
1317         * editing/CompositeEditCommand.h:
1318         * editing/CreateLinkCommand.h:
1319         * editing/DeleteFromTextNodeCommand.h:
1320         * editing/DeleteSelectionCommand.h:
1321         * editing/FormatBlockCommand.h:
1322         * editing/HTMLInterchange.cpp:
1323         * editing/HTMLInterchange.h:
1324         * editing/IndentOutdentCommand.h:
1325         * editing/InsertIntoTextNodeCommand.h:
1326         * editing/InsertLineBreakCommand.h:
1327         * editing/InsertListCommand.h:
1328         * editing/InsertNodeBeforeCommand.h:
1329         * editing/InsertTextCommand.cpp:
1330         * editing/InsertTextCommand.h:
1331         * editing/JSEditor.cpp:
1332         * editing/JSEditor.h:
1333         * editing/JoinTextNodesCommand.h:
1334         * editing/MergeIdenticalElementsCommand.cpp:
1335         * editing/MergeIdenticalElementsCommand.h:
1336         * editing/ModifySelectionListLevel.h:
1337         * editing/MoveSelectionCommand.h:
1338         * editing/RebalanceWhitespaceCommand.h:
1339         * editing/RemoveNodeAttributeCommand.h:
1340         * editing/RemoveNodeCommand.h:
1341         * editing/RemoveNodePreservingChildrenCommand.h:
1342         * editing/ReplaceSelectionCommand.h:
1343         * editing/SetNodeAttributeCommand.h:
1344         * editing/SplitElementCommand.cpp:
1345         * editing/SplitElementCommand.h:
1346         * editing/SplitTextNodeCommand.cpp:
1347         * editing/SplitTextNodeCommand.h:
1348         * editing/SplitTextNodeContainingElementCommand.h:
1349         * editing/TypingCommand.cpp:
1350         * editing/TypingCommand.h:
1351         * editing/UnlinkCommand.h:
1352         * editing/VisiblePosition.cpp:
1353         * editing/WrapContentsInDummySpanCommand.cpp:
1354         * editing/WrapContentsInDummySpanCommand.h:
1355         * editing/markup.cpp:
1356         * editing/markup.h:
1357         * html/HTMLAnchorElement.cpp:
1358         * html/HTMLBodyElement.cpp:
1359         * html/HTMLButtonElement.h:
1360         * html/HTMLCollection.h:
1361         * html/HTMLDocument.h:
1362         * html/HTMLEmbedElement.cpp:
1363         * html/HTMLFormElement.cpp:
1364         * html/HTMLFormElement.h:
1365         * html/HTMLFrameElement.cpp:
1366         * html/HTMLFrameSetElement.cpp:
1367         * html/HTMLKeygenElement.cpp:
1368         * html/HTMLLabelElement.cpp:
1369         * html/HTMLObjectElement.cpp:
1370         * html/HTMLObjectElement.h:
1371         * html/HTMLTableElement.cpp:
1372         * html/HTMLTablePartElement.cpp:
1373         * icon/IconDatabase.h:
1374         * kcanvas/KCanvasPath.h:
1375         * kcanvas/KCanvasResources.cpp:
1376         * kcanvas/KCanvasResources.h:
1377         * kcanvas/KCanvasTreeDebug.cpp:
1378         * kcanvas/KCanvasTreeDebug.h:
1379         * kcanvas/RenderSVGContainer.cpp:
1380         * kcanvas/RenderSVGText.h:
1381         * kcanvas/device/KRenderingPaintServer.h:
1382         * kcanvas/device/KRenderingPaintServerGradient.h:
1383         * kcanvas/device/KRenderingPaintServerSolid.cpp:
1384         * ksvg2/misc/SVGImageLoader.cpp:
1385         * ksvg2/svg/SVGElement.cpp:
1386         * ksvg2/svg/SVGElement.h:
1387         * ksvg2/svg/SVGForeignObjectElement.cpp:
1388         * ksvg2/svg/SVGForeignObjectElement.h:
1389         * ksvg2/svg/SVGImageElement.cpp:
1390         * ksvg2/svg/SVGPoint.h:
1391         * ksvg2/svg/SVGStylable.h:
1392         * ksvg2/svg/SVGTRefElement.cpp:
1393         * ksvg2/svg/SVGTRefElement.h:
1394         * ksvg2/svg/SVGTSpanElement.cpp:
1395         * ksvg2/svg/SVGTSpanElement.h:
1396         * ksvg2/svg/SVGTextElement.h:
1397         * ksvg2/svg/svgpathparser.cpp:
1398         * ksvg2/svg/svgpathparser.h:
1399         * loader/Cache.h:
1400         * loader/DocLoader.h:
1401         * loader/LoaderFunctions.h:
1402         * loader/mac/LoaderFunctionsMac.mm:
1403         * page/Frame.h:
1404         * page/FrameView.h:
1405         * page/Page.h:
1406         * page/Settings.h:
1407         * platform/AffineTransform.cpp:
1408         * platform/AffineTransform.h:
1409         * platform/Arena.cpp:
1410         * platform/Arena.h:
1411         * platform/CookieJar.h:
1412         * platform/DeprecatedCString.cpp:
1413         * platform/DeprecatedCString.h:
1414         * platform/DeprecatedPtrList.h:
1415         * platform/DeprecatedPtrListImpl.cpp:
1416         * platform/DeprecatedPtrListImpl.h:
1417         * platform/DeprecatedPtrQueue.h:
1418         * platform/DeprecatedString.cpp:
1419         * platform/DeprecatedString.h:
1420         * platform/DeprecatedStringList.cpp:
1421         * platform/DeprecatedStringList.h:
1422         * platform/DeprecatedValueList.h:
1423         * platform/DeprecatedValueListImpl.cpp:
1424         * platform/DeprecatedValueListImpl.h:
1425         * platform/FileButton.h:
1426         * platform/FloatPoint.h:
1427         * platform/FloatRect.h:
1428         * platform/FloatSize.h:
1429         * platform/FontData.h:
1430         * platform/FontFallbackList.h:
1431         * platform/GraphicsContext.h:
1432         * platform/IntPoint.h:
1433         * platform/IntRect.h:
1434         * platform/IntSize.h:
1435         * platform/KURL.cpp:
1436         * platform/KURL.h:
1437         * platform/ListBox.h:
1438         * platform/Logging.cpp:
1439         * platform/Logging.h:
1440         * platform/Pen.h:
1441         * platform/PopUpButton.h:
1442         * platform/RegularExpression.cpp:
1443         * platform/RegularExpression.h:
1444         * platform/SSLKeyGenerator.h:
1445         * platform/ScrollBar.h:
1446         * platform/SegmentedString.h:
1447         * platform/Shared.h:
1448         * platform/Slider.h:
1449         * platform/StringImpl.h:
1450         * platform/TextBox.h:
1451         * platform/TextField.h:
1452         * platform/TextStream.cpp:
1453         * platform/TextStream.h:
1454         * platform/TransferJob.h:
1455         * platform/TransferJobClient.h:
1456         * platform/Widget.h:
1457         * platform/cg/AffineTransformCG.cpp:
1458         * platform/mac/ClipboardMac.h:
1459         * platform/mac/ClipboardMac.mm:
1460         * platform/mac/DeprecatedStringListMac.mm:
1461         * platform/mac/FontCacheMac.mm:
1462         * platform/mac/KURLMac.mm:
1463         * platform/mac/ListBoxMac.mm:
1464         * platform/mac/PopUpButtonMac.mm:
1465         * platform/mac/SSLKeyGeneratorMac.mm:
1466         * platform/mac/TextBoxMac.mm:
1467         * platform/mac/TextFieldMac.mm:
1468         * platform/mac/WebCoreTextArea.h:
1469         * platform/mac/WebCoreTextArea.mm:
1470         * platform/mac/WebCoreTextField.h:
1471         * platform/mac/WebCoreTextField.mm:
1472         * rendering/DeprecatedRenderSelect.h:
1473         * rendering/RenderArena.cpp:
1474         * rendering/RenderArena.h:
1475         * rendering/RenderBlock.cpp:
1476         * rendering/RenderBox.cpp:
1477         * rendering/RenderContainer.cpp:
1478         * rendering/RenderFlexibleBox.cpp:
1479         * rendering/RenderFlow.cpp:
1480         * rendering/RenderLayer.cpp:
1481         * rendering/RenderLineEdit.cpp:
1482         * rendering/RenderObject.h:
1483         * rendering/RenderStyle.cpp:
1484         * rendering/RenderStyle.h:
1485         * rendering/RenderText.cpp:
1486         * rendering/RenderTextFragment.cpp:
1487         * rendering/RenderTheme.h:
1488         * rendering/RenderTreeAsText.cpp:
1489         * rendering/RenderTreeAsText.h:
1490         * rendering/RenderView.h:
1491         * rendering/bidi.h:
1492         * xml/XSLStyleSheet.cpp:
1493         * xml/XSLTProcessor.cpp:
1494
1495 2006-07-09  Geoffrey Garen  <ggaren@apple.com>
1496
1497         Reviewed by Beth.
1498
1499         * bindings/js/kjs_window.cpp:
1500         (KJS::Window::clear): Garbage collect after reinitalizing the global
1501         object, not before, since the reinitialization tends to create garbage.
1502
1503 2006-07-09  Timothy Hatcher  <timothy@apple.com>
1504
1505         Reviewed by Darin.
1506
1507         Bug 9820: Move new DOM API that has been through API review to public headers
1508         http://bugzilla.opendarwin.org/show_bug.cgi?id=9820
1509
1510         * bindings/objc/DOM.mm:
1511         (-[DOMElement focus]):
1512         (-[DOMElement blur]):
1513         (-[DOMRange text]):
1514         (-[DOMRange _text]):
1515         * bindings/objc/DOMCSS.mm:
1516         (-[DOMRGBColor color]):
1517         (-[DOMRGBColor _color]):
1518         * bindings/objc/DOMCore.h:
1519         * bindings/objc/DOMEvents.h:
1520         * bindings/objc/DOMExtensions.h:
1521         * bindings/objc/DOMHTML.mm:
1522         (-[DOMHTMLElement titleDisplayString]):
1523         (-[DOMHTMLDocument createDocumentFragmentWithMarkupString:baseURL:]):
1524         (-[DOMHTMLDocument createDocumentFragmentWithText:]):
1525         (-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:]):
1526         (-[DOMHTMLDocument _createDocumentFragmentWithText:]):
1527         * bindings/objc/DOMPrivate.h:
1528         * bindings/objc/DOMXPath.h:
1529         * bindings/objc/DOMXPath.mm:
1530
1531 2006-07-09  Beth Dakin  <bdakin@apple.com>
1532
1533         Reviewed by Maciej.
1534
1535         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9749 A 
1536         nested content editable div causes unnecessary screen redraws.
1537         
1538         We were repainting too much because we were deciding that we needed 
1539         a full layout because we didn't have a first line box. Our code 
1540         used to hold a lot of assumptions that positioned elements would 
1541         always have line boxes, but I fixed a few bugs a while back that 
1542         appeared because this assumption isn't true. This assumption was 
1543         also causing the extra redraws because the check meant that we 
1544         would decide to do a full layout for any positioned element that 
1545         did not have any line boxes in the first place. Maciej and I talked 
1546         about this, and we couldn't figure out why the check for line boxes 
1547         was part of determining if we need a full layout in the first 
1548         place. After hunting around the code, we decided to assume that 
1549         this check is antiquated. Removing it fixes the bug and doesn't 
1550         seem to break any layout tests. So, fingers crossed!
1551
1552         Will add layout test so soon.
1553
1554         * rendering/bidi.cpp:
1555         (WebCore::RenderBlock::layoutInlineChildren): Remove firstLineBox 
1556         check.
1557
1558 2006-07-09  David Harrison  <harrison@apple.com>
1559
1560         Reviewed by John Sullivan.
1561
1562         <rdar://problem/4598149> Deleting the contents of a DOMRange and then inserting a node into it crashes in WebCore::Font::canUseGlyphCache
1563
1564         Test: fast/dom/delete-contents.html
1565         
1566         * dom/Range.cpp:
1567         (WebCore::Range::processContents):
1568
1569 2006-07-09  Darin Adler  <darin@apple.com>
1570
1571         - another round of renaming; and KWQ is dead
1572
1573         * WebCore.vcproj/WebCore/WebCore.vcproj: Remove paths for kwq and khtml directories.
1574         Move files to their new locations. Did rename.
1575         * WebCore.xcodeproj/project.pbxproj: Move files to their new locations. Did rename.
1576         * WebCoreSources.bkl: Did rename.
1577         * webcore-base.bkl: Removed kwq.
1578
1579         * kwq/AccessibilityObjectCache.h: Removed.
1580         * kwq/AccessibilityObjectCache.mm: Removed.
1581         * kwq/FormDataMac.h: Removed.
1582         * kwq/FormDataMac.mm: Removed.
1583         * kwq/WebCoreAXObject.h: Removed.
1584         * kwq/WebCoreAXObject.mm: Removed.
1585         * kwq/WebCoreEditCommand.h: Removed.
1586         * kwq/WebCoreEditCommand.mm: Removed.
1587         * kwq/WebCorePageState.h: Removed.
1588         * kwq/WebCorePageState.mm: Removed.
1589         * kwq/WebCoreResourceLoaderImp.h: Removed.
1590         * kwq/WebCoreResourceLoaderImp.mm: Removed.
1591
1592         * bridge/AXObjectCache.h: Added.
1593         * bridge/mac/AXObjectCacheMac.mm: Added.
1594         * bridge/mac/WebCoreAXObject.h: Added.
1595         * bridge/mac/WebCoreAXObject.mm: Added.
1596
1597         * loader/CachedObject.cpp: Removed.
1598         * loader/CachedObject.h: Removed.
1599         * loader/CachedObjectClient.h: Removed.
1600         * loader/CachedObjectClientWalker.cpp: Removed.
1601         * loader/CachedObjectClientWalker.h: Removed.
1602
1603         * loader/CachedResource.cpp: Added.
1604         * loader/CachedResource.h: Added.
1605         * loader/CachedResourceClient.h: Added.
1606         * loader/CachedResourceClientWalker.cpp: Added.
1607         * loader/CachedResourceClientWalker.h: Added.
1608
1609         * bridge/mac/FrameMac.mm:
1610         * bridge/mac/WebCoreFrameBridge.mm:
1611         * css/CSSImageValue.h:
1612         * css/CSSImportRule.h:
1613         * dom/Document.cpp:
1614         * dom/Document.h:
1615         * dom/Notation.h:
1616         * dom/ProcessingInstruction.h:
1617         * dom/XMLTokenizer.cpp:
1618         * html/CanvasPattern.h:
1619         * html/HTMLDocument.h:
1620         * html/HTMLImageLoader.cpp:
1621         * html/HTMLImageLoader.h:
1622         * html/HTMLLinkElement.h:
1623         * html/HTMLScriptElement.cpp:
1624         * html/HTMLScriptElement.h:
1625         * html/HTMLTokenizer.cpp:
1626         * html/HTMLTokenizer.h:
1627         * kcanvas/KCanvasFilters.h:
1628         * ksvg2/svg/SVGCursorElement.cpp:
1629         * ksvg2/svg/SVGCursorElement.h:
1630         * ksvg2/svg/SVGFEImageElement.cpp:
1631         * ksvg2/svg/SVGFEImageElement.h:
1632         * loader/Cache.cpp:
1633         * loader/Cache.h:
1634         * loader/CachedCSSStyleSheet.cpp:
1635         * loader/CachedCSSStyleSheet.h:
1636         * loader/CachedImage.cpp:
1637         * loader/CachedImage.h:
1638         * loader/CachedScript.cpp:
1639         * loader/CachedScript.h:
1640         * loader/CachedXBLDocument.cpp:
1641         * loader/CachedXBLDocument.h:
1642         * loader/CachedXSLStyleSheet.cpp:
1643         * loader/CachedXSLStyleSheet.h:
1644         * loader/DocLoader.cpp:
1645         * loader/DocLoader.h:
1646         * loader/LoaderFunctions.h:
1647         * loader/Request.cpp:
1648         * loader/Request.h:
1649         * loader/loader.cpp:
1650         * loader/loader.h:
1651         * loader/mac/LoaderFunctionsMac.mm:
1652         * page/Frame.cpp:
1653         * page/FrameView.cpp:
1654         * platform/gdk/TemporaryLinkStubs.cpp:
1655         * platform/mac/ClipboardMac.h:
1656         * platform/win/TemporaryLinkStubs.cpp:
1657         * rendering/RenderBox.h:
1658         * rendering/RenderContainer.cpp:
1659         * rendering/RenderImage.cpp:
1660         * rendering/RenderImage.h:
1661         * rendering/RenderLayer.h:
1662         * rendering/RenderObject.cpp:
1663         * rendering/RenderObject.h:
1664         * rendering/RenderStyle.cpp:
1665         * rendering/RenderStyle.h:
1666         * xml/XSLImportRule.h:
1667         Did renaming.
1668
1669         * platform/mac/can-convert.mm: Removed.
1670
1671 2006-07-09  Anders Carlsson  <acarlsson@apple.com>
1672
1673         Reviewed by Tim O.
1674
1675         * WebCore.exp:
1676         Add wkPathFromFont.
1677         
1678         * platform/mac/FontDataMac.mm:
1679         (-[NSFont WebCore]):
1680         Use wkPathFromFont.
1681         
1682         * platform/mac/WebCoreSystemInterface.h:
1683         * platform/mac/WebCoreSystemInterface.mm:
1684         Declare wkPathFromFont.
1685
1686 2006-07-09  Brady Eidson  <beidson@apple.com>
1687
1688         Reviewed by Maciej
1689
1690         Set the stage to remove the workaround for the SQLite BLOB corruption.  A few other small cleanups, and
1691         preparation for pruning unreferenced and unretained icons.
1692
1693         * icon/IconDatabase.cpp:
1694         (WebCore::IconDatabase::recreateDatabase):  Added another trigger to assist in icon removal
1695         (WebCore::IconDatabase::deletePrivateTables):  Cleaned up logging messages
1696         (WebCore::IconDatabase::imageDataForIconID):  #ifdefed the blobbing hack for impending removal, use the real blob by default
1697         (WebCore::IconDatabase::imageDataForIconURL):  same
1698         (WebCore::IconDatabase::imageDataForPageURL):  same
1699         (WebCore::IconDatabase::pruneUnreferencedIcons):  Will delete any icons and their data that are not referenced
1700           by any PageURL
1701         * icon/IconDatabase.h:
1702
1703         * icon/SQLDatabase.h:  Changed BlobAsVector to be unsigned char as thats the most reasonable type for
1704           a byte-buffer, and is what CFData expects
1705         * icon/SQLStatement.cpp:
1706         (WebCore::SQLStatement::getColumnBlobAsVector):
1707
1708 2006-07-09  Darin Adler  <darin@apple.com>
1709
1710         - move all but the last 12 files out of kwq directory
1711         - removed a few unused source files I discovered
1712
1713         * WebCore.vcproj/WebCore/WebCore.vcproj: Update for new file locations.
1714         * WebCore.xcodeproj/project.pbxproj: Ditto.
1715
1716         * bridge/mac/FrameMac.mm:
1717         * dom/Element.h:
1718         * html/HTMLImageLoader.cpp:
1719         * loader/Cache.cpp:
1720         * loader/Cache.h:
1721         * loader/CachedCSSStyleSheet.cpp:
1722         * loader/CachedCSSStyleSheet.h:
1723         * loader/CachedImage.cpp:
1724         * loader/CachedImage.h:
1725         * loader/CachedObject.h:
1726         * loader/CachedScript.cpp:
1727         * loader/CachedScript.h:
1728         * loader/CachedXBLDocument.cpp:
1729         * loader/CachedXBLDocument.h:
1730         * loader/CachedXSLStyleSheet.cpp:
1731         * loader/CachedXSLStyleSheet.h:
1732         * loader/DocLoader.cpp:
1733         * loader/DocLoader.h:
1734         * page/Frame.cpp:
1735         * page/Frame.h:
1736         * page/FramePrivate.h:
1737         * platform/gdk/TemporaryLinkStubs.cpp:
1738         * platform/win/TemporaryLinkStubs.cpp:
1739         * rendering/DeprecatedSlider.cpp:
1740         * rendering/RenderObject.h:
1741         * xml/xmlhttprequest.cpp:
1742         Updated includes as needed for file location changes. Changed
1743         CachePolicy uses to match new filename and enum names.
1744
1745         * loader/CachedResource.cpp: Removed.
1746         * loader/CachedResource.h: Removed.
1747         * loader/CachedResourceClient.h: Removed.
1748         * loader/CachedResourceClientWalker.cpp: Removed.
1749         * loader/CachedResourceClientWalker.h: Removed.
1750         The above files were checked in by accident a while back. The rename of
1751         CachedObject to CachedResource is now reflected in do-webcore-rename,
1752         and will be done soon.
1753
1754         * kwq/AffineTransform.cpp: Removed.
1755         * kwq/AffineTransform.h: Removed.
1756         * kwq/CacheControl.h: Removed.
1757         * kwq/DeprecatedPtrQueue.h: Removed.
1758         * kwq/FileButton.h: Removed.
1759         * kwq/FileButton.mm: Removed.
1760         * kwq/ListBox.h: Removed.
1761         * kwq/ListBox.mm: Removed.
1762         * kwq/LoaderFunctions.h: Removed.
1763         * kwq/LoaderFunctions.mm: Removed.
1764         * kwq/PopUpButton.h: Removed.
1765         * kwq/PopUpButton.mm: Removed.
1766         * kwq/SSLKeyGenerator.h: Removed.
1767         * kwq/SSLKeyGenerator.mm: Removed.
1768         * kwq/Settings.h: Removed.
1769         * kwq/TextBox.h: Removed.
1770         * kwq/TextBox.mm: Removed.
1771         * kwq/TextField.h: Removed.
1772         * kwq/TextField.mm: Removed.
1773         * kwq/WebCoreScrollBar.h: Removed.
1774         * kwq/WebCoreScrollBar.mm: Removed.
1775         * kwq/WebCoreSlider.h: Removed.
1776         * kwq/WebCoreSlider.mm: Removed.
1777
1778         * loader/CachePolicy.h: Added.
1779         * loader/LoaderFunctions.h: Added.
1780
1781         * loader/mac/LoaderFunctionsMac.mm: Added.
1782
1783         * page/Settings.h: Added.
1784
1785         * platform/AffineTransform.cpp: Added.
1786         * platform/AffineTransform.h: Added.
1787         * platform/DeprecatedPtrQueue.h: Added.
1788         * platform/FileButton.h: Added.
1789         * platform/ListBox.h: Added.
1790         * platform/PopUpButton.h: Added.
1791         * platform/SSLKeyGenerator.h: Added.
1792         * platform/ScrollBar.h: Added.
1793         * platform/Slider.h: Added.
1794         * platform/TextBox.h: Added.
1795         * platform/TextField.h: Added.
1796
1797         * platform/cg/AffineTransformCG.cpp: Added.
1798
1799         * platform/mac/FileButtonMac.mm: Added.
1800         * platform/mac/ListBoxMac.mm: Added.
1801         * platform/mac/PopUpButtonMac.mm: Added.
1802         * platform/mac/SSLKeyGeneratorMac.mm: Added.
1803         * platform/mac/ScrollBarMac.mm: Added.
1804         * platform/mac/ScrollBarMac.mm: Added.
1805         * platform/mac/SliderMac.mm: Added.
1806         * platform/mac/SliderMac.mm: Added.
1807         * platform/mac/TextBoxMac.mm: Added.
1808         * platform/mac/TextFieldMac.mm: Added.
1809
1810 2006-07-09  Darin Adler  <darin@apple.com>
1811
1812         - move 4 files out of kwq directory
1813         - make some minor project adjustments for the WebCore project
1814
1815         * WebCore.xcodeproj/project.pbxproj: Link libsqlite3 the same way we do other
1816         libraries, rather than using a custom linker option. Moved the files from their
1817         old locations to the new ones. Removed "khtml" from the list of header search
1818         paths since that directory doesn't exist any more. Eliminated STYLE_LDFLAGS
1819         and just put -umbrella WebKit in OTHER_LDFLAGS in the Production configuration
1820         (was a leftover from "build styles" in Xcode 1). Changed to use EXPORTED_SYMBOLS_FILE
1821         instead of using -exported_symbols_list directly again now that Xcode has fixed the
1822         "strip twice" bug. Removed unneeded explicit SECTORDER_FLAGS = "" settings.
1823         Removed the explicit -Y,3 option now that Xcode does that by default.
1824
1825         * WebCore.vcproj/WebCore/WebCore.vcproj: Removed some obsolete uneeded files,
1826         many of which didn't exist any more. Moved the files from their old locations
1827         to the new ones.
1828
1829         * WebCoreSources.bkl: Moved the files from their old locations to the new ones.
1830
1831         * kwq/DeprecatedCString.cpp: Removed.
1832         * kwq/DeprecatedCString.h: Removed.
1833         * kwq/TextStream.cpp: Removed.
1834         * kwq/TextStream.h: Removed.
1835         * platform/DeprecatedCString.cpp: Added.
1836         * platform/DeprecatedCString.h: Added.
1837         * platform/TextStream.cpp: Added.
1838         * platform/TextStream.h: Added.
1839
1840 2006-07-09  Darin Adler  <darin@apple.com>
1841
1842         Rubber stamped by Maciej (kinda).
1843
1844         - did the next pass of renaming (used do-webcore-rename script)
1845           this takes care of most of the remaining KWQ names (almost all)
1846
1847         * WebCore+SVG/DOMList.h:
1848         * WebCore.vcproj/WebCore/WebCore.vcproj:
1849         * WebCore.xcodeproj/project.pbxproj:
1850         * WebCoreSources.bkl:
1851         * bindings/js/kjs_dom.cpp:
1852         * bindings/js/kjs_window.cpp:
1853         * bindings/objc/DOMHTML.mm:
1854         * bridge/mac/FrameMac.h:
1855         * bridge/mac/FrameMac.mm:
1856         * bridge/mac/WebCoreFrameBridge.mm:
1857         * bridge/mac/WebCoreSettings.h:
1858         * bridge/mac/WebCoreSettings.mm:
1859         * bridge/win/FrameWin.cpp:
1860         * css/CSSPrimitiveValue.cpp:
1861         * css/CSSValueKeywords.in:
1862         * css/MediaQueryEvaluator.cpp:
1863         * css/cssparser.cpp:
1864         * css/cssstyleselector.cpp:
1865         * css/cssstyleselector.h:
1866         * dom/CharacterData.cpp:
1867         * dom/CharacterData.h:
1868         * dom/Document.cpp:
1869         * dom/Element.cpp:
1870         * dom/Element.h:
1871         * dom/EventTargetNode.cpp:
1872         * dom/EventTargetNode.h:
1873         * dom/Node.cpp:
1874         * dom/Node.h:
1875         * dom/Position.cpp:
1876         * dom/ProcessingInstruction.cpp:
1877         * dom/QualifiedName.cpp:
1878         * dom/QualifiedName.h:
1879         * dom/XMLTokenizer.cpp: Added.
1880         * dom/xml_tokenizer.cpp: Removed.
1881         * dom/xml_tokenizer.h: Removed.
1882         * editing/EditAction.h:
1883         * editing/HTMLInterchange.cpp:
1884         * editing/HTMLInterchange.h:
1885         * editing/Selection.h:
1886         * editing/SelectionController.h:
1887         * editing/TextAffinity.h:
1888         * editing/TextIterator.cpp:
1889         * editing/TextIterator.h:
1890         * editing/VisiblePosition.h:
1891         * editing/htmlediting.cpp:
1892         * editing/markup.cpp:
1893         * editing/markup.h:
1894         * editing/visible_units.cpp:
1895         * editing/visible_units.h:
1896         * html/HTMLDocument.cpp:
1897         * html/HTMLFontElement.cpp:
1898         * html/HTMLInputElement.cpp:
1899         * html/HTMLKeygenElement.cpp:
1900         * html/HTMLSelectElement.h:
1901         * html/HTMLTextAreaElement.cpp:
1902         * html/HTMLTextFieldInnerElement.cpp:
1903         * html/HTMLTokenizer.cpp:
1904         * html/HTMLTokenizer.h:
1905         * kcanvas/KCanvasContainer.cpp: Removed.
1906         * kcanvas/KCanvasContainer.h: Removed.
1907         * kcanvas/KCanvasCreator.cpp:
1908         * kcanvas/KCanvasFilters.cpp:
1909         * kcanvas/KCanvasFilters.h:
1910         * kcanvas/KCanvasMatrix.cpp:
1911         * kcanvas/KCanvasMatrix.h:
1912         * kcanvas/KCanvasPath.cpp:
1913         * kcanvas/KCanvasPath.h:
1914         * kcanvas/KCanvasResources.cpp:
1915         * kcanvas/KCanvasResources.h:
1916         * kcanvas/KCanvasTreeDebug.cpp:
1917         * kcanvas/KCanvasTreeDebug.h:
1918         * kcanvas/RenderForeignObject.cpp:
1919         * kcanvas/RenderForeignObject.h:
1920         * kcanvas/RenderPath.cpp:
1921         * kcanvas/RenderPath.h:
1922         * kcanvas/RenderSVGContainer.cpp: Added.
1923         * kcanvas/RenderSVGContainer.h: Added.
1924         * kcanvas/RenderSVGImage.cpp:
1925         * kcanvas/RenderSVGImage.h:
1926         * kcanvas/RenderSVGText.cpp:
1927         * kcanvas/RenderSVGText.h:
1928         * kcanvas/device/KRenderingPaintServer.h:
1929         * kcanvas/device/KRenderingPaintServerGradient.cpp:
1930         * kcanvas/device/KRenderingPaintServerGradient.h:
1931         * kcanvas/device/KRenderingPaintServerPattern.cpp:
1932         * kcanvas/device/KRenderingPaintServerPattern.h:
1933         * kcanvas/device/KRenderingPaintServerSolid.cpp:
1934         * kcanvas/device/KRenderingPaintServerSolid.h:
1935         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
1936         * kcanvas/device/quartz/KCanvasItemQuartz.h:
1937         * kcanvas/device/quartz/KCanvasResourcesQuartz.h:
1938         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
1939         * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
1940         * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
1941         * ksvg2/css/CSSValueKeywords.in:
1942         * ksvg2/css/SVGRenderStyleDefs.cpp:
1943         * ksvg2/misc/KCanvasRenderingStyle.cpp:
1944         * ksvg2/misc/KSVGTimeScheduler.cpp:
1945         * ksvg2/svg/SVGAElement.cpp:
1946         * ksvg2/svg/SVGAnimateTransformElement.cpp:
1947         * ksvg2/svg/SVGAnimateTransformElement.h:
1948         * ksvg2/svg/SVGGElement.cpp:
1949         * ksvg2/svg/SVGHelper.cpp:
1950         * ksvg2/svg/SVGHelper.h:
1951         * ksvg2/svg/SVGImageElement.cpp:
1952         * ksvg2/svg/SVGLinearGradientElement.cpp:
1953         * ksvg2/svg/SVGMarkerElement.cpp:
1954         * ksvg2/svg/SVGMaskElement.cpp:
1955         * ksvg2/svg/SVGMatrix.cpp:
1956         * ksvg2/svg/SVGMatrix.h:
1957         * ksvg2/svg/SVGPatternElement.cpp:
1958         * ksvg2/svg/SVGRadialGradientElement.cpp:
1959         * ksvg2/svg/SVGSVGElement.cpp:
1960         * ksvg2/svg/SVGStyledElement.h:
1961         * ksvg2/svg/SVGStyledTransformableElement.cpp:
1962         * ksvg2/svg/SVGStyledTransformableElement.h:
1963         * ksvg2/svg/SVGSwitchElement.cpp:
1964         * ksvg2/svg/SVGTextElement.cpp:
1965         * ksvg2/svg/SVGTransformable.h:
1966         * ksvg2/svg/SVGUseElement.cpp:
1967         * kwq/AffineTransform.cpp: Added.
1968         * kwq/AffineTransform.h: Added.
1969         * kwq/DeprecatedCString.cpp: Added.
1970         * kwq/DeprecatedCString.h: Added.
1971         * kwq/DeprecatedPtrQueue.h: Added.
1972         * kwq/FileButton.h: Added.
1973         * kwq/FileButton.mm: Added.
1974         * kwq/FormDataMac.mm: Added.
1975         * kwq/KWQCString.cpp: Removed.
1976         * kwq/KWQCString.h: Removed.
1977         * kwq/KWQComboBox.h: Removed.
1978         * kwq/KWQComboBox.mm: Removed.
1979         * kwq/KWQEditCommand.h: Removed.
1980         * kwq/KWQEditCommand.mm: Removed.
1981         * kwq/KWQFileButton.h: Removed.
1982         * kwq/KWQFileButton.mm: Removed.
1983         * kwq/KWQFormData.h: Removed.
1984         * kwq/KWQFormData.mm: Removed.
1985         * kwq/KWQKHTMLSettings.h: Removed.
1986         * kwq/KWQKIOGlobal.h: Removed.
1987         * kwq/KWQKSSLKeyGen.h: Removed.
1988         * kwq/KWQKSSLKeyGen.mm: Removed.
1989         * kwq/KWQLineEdit.h: Removed.
1990         * kwq/KWQLineEdit.mm: Removed.
1991         * kwq/KWQListBox.h: Removed.
1992         * kwq/KWQListBox.mm: Removed.
1993         * kwq/KWQLoader.h: Removed.
1994         * kwq/KWQLoader.mm: Removed.
1995         * kwq/KWQPageState.h: Removed.
1996         * kwq/KWQPageState.mm: Removed.
1997         * kwq/KWQPtrQueue.h: Removed.
1998         * kwq/KWQResourceLoader.h: Removed.
1999         * kwq/KWQResourceLoader.mm: Removed.
2000         * kwq/KWQScrollBar.h: Removed.
2001         * kwq/KWQScrollBar.mm: Removed.
2002         * kwq/KWQSlider.h: Removed.
2003         * kwq/KWQSlider.mm: Removed.
2004         * kwq/KWQTextEdit.h: Removed.
2005         * kwq/KWQTextEdit.mm: Removed.
2006         * kwq/KWQTextStream.cpp: Removed.
2007         * kwq/KWQTextStream.h: Removed.
2008         * kwq/KWQWMatrix.cpp: Removed.
2009         * kwq/KWQWMatrix.h: Removed.
2010         * kwq/ListBox.h: Added.
2011         * kwq/ListBox.mm: Added.
2012         * kwq/LoaderFunctions.h: Added.
2013         * kwq/LoaderFunctions.mm: Added.
2014         * kwq/PopUpButton.h: Added.
2015         * kwq/PopUpButton.mm: Added.
2016         * kwq/SSLKeyGenerator.h: Added.
2017         * kwq/SSLKeyGenerator.mm: Added.
2018         * kwq/Settings.h: Added.
2019         * kwq/TextBox.h: Added.
2020         * kwq/TextBox.mm: Added.
2021         * kwq/TextField.h: Added.
2022         * kwq/TextField.mm: Added.
2023         * kwq/TextStream.cpp: Added.
2024         * kwq/TextStream.h: Added.
2025         * kwq/WebCoreEditCommand.h: Added.
2026         * kwq/WebCoreEditCommand.mm: Added.
2027         * kwq/WebCorePageState.h: Added.
2028         * kwq/WebCorePageState.mm: Added.
2029         * kwq/WebCoreResourceLoaderImp.h: Added.
2030         * kwq/WebCoreResourceLoaderImp.mm: Added.
2031         * kwq/WebCoreScrollBar.h: Added.
2032         * kwq/WebCoreScrollBar.mm: Added.
2033         * kwq/WebCoreSlider.h: Added.
2034         * kwq/WebCoreSlider.mm: Added.
2035         * loader/Cache.h:
2036         * loader/CachedCSSStyleSheet.cpp:
2037         * loader/CachedImage.cpp:
2038         * loader/CachedObject.h:
2039         * loader/CachedObjectClientWalker.h:
2040         * loader/CachedResource.h:
2041         * loader/CachedResourceClientWalker.h:
2042         * loader/CachedScript.h:
2043         * loader/CachedXBLDocument.h:
2044         * loader/Decoder.h:
2045         * loader/DocLoader.cpp:
2046         * loader/DocLoader.h:
2047         * loader/FormData.h:
2048         * loader/ImageDocument.cpp:
2049         * loader/PluginDocument.cpp:
2050         * loader/TextDocument.cpp:
2051         * loader/loader.cpp:
2052         * loader/loader.h:
2053         * page/Frame.cpp:
2054         * page/Frame.h:
2055         * page/FramePrivate.h:
2056         * page/Page.cpp:
2057         * page/Page.h:
2058         * platform/DeprecatedPtrList.h:
2059         * platform/DeprecatedPtrListImpl.cpp:
2060         * platform/DeprecatedPtrListImpl.h:
2061         * platform/DeprecatedString.cpp:
2062         * platform/DeprecatedString.h:
2063         * platform/DeprecatedStringList.cpp:
2064         * platform/DeprecatedStringList.h:
2065         * platform/DeprecatedValueList.h:
2066         * platform/DeprecatedValueListImpl.cpp:
2067         * platform/DeprecatedValueListImpl.h:
2068         * platform/FloatSize.h:
2069         * platform/Font.cpp:
2070         * platform/KURL.cpp:
2071         * platform/RegularExpression.cpp:
2072         * platform/RegularExpression.h:
2073         * platform/SegmentedString.h:
2074         * platform/StreamingTextDecoder.cpp:
2075         * platform/String.cpp:
2076         * platform/StringImpl.cpp:
2077         * platform/TextEncoding.cpp:
2078         * platform/TransferJob.cpp:
2079         * platform/TransferJob.h:
2080         * platform/TransferJobInternal.h:
2081         * platform/gdk/FrameGdk.cpp:
2082         * platform/gdk/TemporaryLinkStubs.cpp:
2083         * platform/mac/ClipboardMac.h:
2084         * platform/mac/ClipboardMac.mm:
2085         * platform/mac/CursorMac.mm:
2086         * platform/mac/DeprecatedStringMac.mm: Added.
2087         * platform/mac/FontCacheMac.mm:
2088         * platform/mac/FontMac.mm:
2089         * platform/mac/FoundationExtras.h:
2090         * platform/mac/ImageMac.mm:
2091         * platform/mac/KURLMac.mm:
2092         * platform/mac/MouseEventMac.mm: Removed.
2093         * platform/mac/QStringListMac.mm: Removed.
2094         * platform/mac/QStringMac.mm: Removed.
2095         * platform/mac/TransferJobMac.mm:
2096         * platform/mac/WebCoreTextArea.h:
2097         * platform/mac/WebCoreTextArea.mm:
2098         * platform/mac/WebCoreTextField.h:
2099         * platform/mac/WebCoreTextField.mm:
2100         * platform/mac/WidgetMac.mm:
2101         * platform/win/TemporaryLinkStubs.cpp:
2102         * rendering/DataRef.h:
2103         * rendering/DeprecatedRenderSelect.cpp:
2104         * rendering/DeprecatedRenderSelect.h:
2105         * rendering/DeprecatedSlider.cpp:
2106         * rendering/InlineFlowBox.cpp:
2107         * rendering/RenderApplet.cpp:
2108         * rendering/RenderBlock.cpp:
2109         * rendering/RenderBlock.h:
2110         * rendering/RenderContainer.cpp:
2111         * rendering/RenderFileButton.cpp:
2112         * rendering/RenderFlexibleBox.cpp:
2113         * rendering/RenderFlow.cpp:
2114         * rendering/RenderFormElement.cpp:
2115         * rendering/RenderFrameSet.cpp:
2116         * rendering/RenderFrameSet.h:
2117         * rendering/RenderImage.cpp:
2118         * rendering/RenderInline.cpp:
2119         * rendering/RenderLayer.cpp:
2120         * rendering/RenderLayer.h:
2121         * rendering/RenderLineEdit.cpp:
2122         * rendering/RenderListItem.cpp:
2123         * rendering/RenderListMarker.cpp:
2124         * rendering/RenderObject.cpp:
2125         * rendering/RenderObject.h:
2126         * rendering/RenderPartObject.cpp:
2127         * rendering/RenderReplaced.cpp:
2128         * rendering/RenderStyle.cpp: Added.
2129         * rendering/RenderStyle.h: Added.
2130         * rendering/RenderTable.cpp:
2131         * rendering/RenderTable.h:
2132         * rendering/RenderTableCell.cpp:
2133         * rendering/RenderTableCell.h:
2134         * rendering/RenderTableCol.cpp:
2135         * rendering/RenderTableCol.h:
2136         * rendering/RenderTableRow.cpp:
2137         * rendering/RenderTableSection.cpp:
2138         * rendering/RenderTableSection.h:
2139         * rendering/RenderText.cpp:
2140         * rendering/RenderText.h:
2141         * rendering/RenderTextArea.cpp:
2142         * rendering/RenderTextControl.cpp: Added.
2143         * rendering/RenderTextControl.h: Added.
2144         * rendering/RenderTextField.cpp: Removed.
2145         * rendering/RenderTextField.h: Removed.
2146         * rendering/RenderTheme.cpp:
2147         * rendering/RenderThemeMac.mm:
2148         * rendering/RenderTreeAsText.cpp:
2149         * rendering/RenderTreeAsText.h:
2150         * rendering/RenderView.cpp:
2151         * rendering/RenderWidget.cpp:
2152         * rendering/bidi.cpp:
2153         * rendering/render_style.cpp: Removed.
2154         * rendering/render_style.h: Removed.
2155         * xml/XSLStyleSheet.cpp:
2156         * xml/XSLTProcessor.cpp:
2157         * xml/xmlhttprequest.cpp:
2158         * xpath/impl/XPathParser.cpp:
2159
2160 2006-07-09  Rob Buis  <buis@kde.org>
2161
2162         Reviewed by Darin.
2163
2164         http://bugzilla.opendarwin.org/show_bug.cgi?id=8251
2165         navigator.platform incorrect in WebKit.app on Intel Macs
2166
2167         For navigator.platform return "MacIntel" for Intel processors, "MacPPC"
2168         otherwise.
2169
2170         * bindings/js/kjs_navigator.cpp:
2171         (KJS::Navigator::getValueProperty):
2172
2173 2006-07-08  Timothy Hatcher  <timothy@apple.com>
2174
2175         Reviewed by Maciej.
2176
2177         Bug 5312: comments aren't available via DOM
2178         http://bugzilla.opendarwin.org/show_bug.cgi?id=5312
2179
2180         <rdar://problem/4564414> getting comments via DOM isn't working (5312)
2181         <rdar://problem/4545691> DOM_COMMENT node masking out real DOM elements
2182
2183         * dom/Document.cpp:
2184         (WebCore::Document::removedLastRef): set m_documentElement to 0
2185         (WebCore::Document::childrenChanged): invalidate the document element we have cached in case it was replaced
2186         (WebCore::Document::documentElement): cache the first element as the document node if m_documentElement is 0
2187         * dom/Document.h: added m_documentElement
2188         * html/HTMLDocument.cpp: removed documentElement(), HTML documents just use Document's documentElement()
2189         * html/HTMLDocument.h: ditto
2190         * html/HTMLParser.cpp:
2191         (WebCore::HTMLParser::handleError): make a new HTML node is the document's firstChild is NULL or
2192         the firstChild is not a HTML element (like a comment)
2193         * html/HTMLTokenizer.cpp:
2194         (WebCore::HTMLTokenizer::parseComment): removed the #ifdef to include comment nodes
2195
2196 2006-07-08  Anders Carlsson  <acarlsson@apple.com>
2197
2198         Reviewed by Darin, tweaked slightly and landed by Maciej.
2199
2200         http://bugzilla.opendarwin.org/show_bug.cgi?id=9787
2201         fast/frames tests failing (bad pointer to owner element) under MallocScribble
2202         
2203         * html/HTMLFrameElement.cpp:
2204         (WebCore::HTMLFrameElement::close):
2205         Disconnect the owner element of our frame.
2206         
2207         * html/HTMLIFrameElement.cpp:
2208         (WebCore::HTMLIFrameElement::attach):
2209         Don't call setFrame here.
2210         
2211         * html/HTMLPlugInElement.cpp:
2212         (WebCore::HTMLPlugInElement::detach):
2213         Disconnect the owner element of our frame.
2214
2215         * html/HTMLPlugInElement.h:
2216         (WebCore::HTMLPlugInElement::setFrameName):        
2217         New function.
2218         
2219         * page/Frame.cpp:
2220         (WebCore::Frame::Frame):
2221         Don't call setFrame.
2222         
2223         (WebCore::Frame::~Frame):
2224         Null out the owner element.
2225         
2226         (WebCore::Frame::requestObject):
2227         When an object creates a child frame, assign it a name so it can be
2228         accessed from HTMLPlugInElement.
2229         
2230         * rendering/RenderPart.cpp:
2231         (WebCore::RenderPart::RenderPart):
2232         (WebCore::RenderPart::~RenderPart):
2233         * rendering/RenderPart.h:
2234         Get rid of setFrame.
2235
2236 2006-07-08  Darin Adler  <darin@apple.com>
2237
2238         Reviewed by Geoff.
2239
2240         - better fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9622
2241           REGRESSION: showModalDialog returnValue ignored, function result is always "undefined"
2242
2243         * bindings/js/kjs_window.cpp:
2244         (KJS::showModalDialog): Set the return value after returning from the function if the
2245         window is not cleared; this is a better way to handle the case where the window does
2246         not get cleared before returning, and handles some new cases created by slight changes
2247         in the latest Safari properly too.
2248         (KJS::Window::clear): Changed logic slightly so we always store the result of getDirect
2249         into the return value slot -- the old code left the storage untouched if it was 0.
2250         Also made it only overwrite the return value slot if it's 0.
2251
2252         * bindings/js/kjs_proxy.h:
2253         * bindings/js/kjs_proxy.cpp:
2254         * bindings/js/kjs_window.h:
2255         * bindings/js/kjs_window.cpp:
2256         * page/Frame.cpp:
2257         Roll the previous fix out.
2258
2259 2006-07-08  Darin Adler  <darin@apple.com>
2260
2261         - try to fix Windows build
2262
2263         * WebCore.vcproj/WebCore/WebCore.vcproj: Add missing source files.
2264
2265 === Safari-521.15 ===
2266
2267 2006-07-07  Justin Garcia  <justin.garcia@apple.com>
2268
2269         Reviewed by levi
2270         
2271         Fix Mail ToDo crashers.
2272
2273         * dom/Range.cpp:
2274         (WebCore::Range::compareBoundaryPoints): Added an ASSERT that both
2275         containers are non-null and an early return.
2276         * editing/Selection.cpp:
2277         (WebCore::Selection::validate): Fix a dangling start/end.
2278         (WebCore::Selection::adjustForEditableContent): Added an early return if
2279         m_start or m_end are null.
2280         (WebCore::Selection::isContentEditable): Use isRichlyEditablePosition.
2281         (WebCore::Selection::isContentRichlyEditable): Ditto.
2282         * editing/Selection.h:
2283         * editing/VisiblePosition.cpp:
2284         (WebCore::VisiblePosition::next): Use the new highestEditableRoot.
2285         (WebCore::VisiblePosition::previous): Ditto.
2286         * editing/htmlediting.cpp:
2287         (WebCore::highestEditableRoot): Takes in a position.
2288         (WebCore::isEditablePosition): Added.
2289         (WebCore::isRichlyEditablePosition): Added.
2290         (WebCore::rootEditableElement): Added.
2291         (WebCore::nextCandidate): Moved and split out from nextVisiblePosition.
2292         (WebCore::nextVisuallyDistinctCandidate): Ditto.
2293         (WebCore::previousCandidate): Moved and split out from previousVisiblePosition.
2294         (WebCore::previousVisuallyDistinctCandidate): Ditto.
2295         (WebCore::firstEditablePositionAfterPositionInRoot): Iterate over positions,
2296         using nextVisuallyDistinctCandidate, skipping atomic nodes that are non-editable.
2297         (WebCore::lastEditablePositionBeforePositionInRoot): Ditto.
2298         * editing/htmlediting.h:
2299         * editing/visible_units.cpp:
2300         (WebCore::startOfWord): Added a FIXME.
2301
2302 2006-07-07  Levi Weintraub  <lweintraub@apple.com>
2303
2304         Reviewed by justin
2305
2306         Allowed deletion typing commands to take in a granularity
2307
2308         * bridge/mac/WebCoreFrameBridge.h: Pass granularity across the bridge
2309         * bridge/mac/WebCoreFrameBridge.mm: Ditto
2310         (-[WebCoreFrameBridge deleteKeyPressedWithSmartDelete:granularity:]):
2311         (-[WebCoreFrameBridge forwardDeleteKeyPressedWithSmartDelete:granularity:]):
2312         * editing/TypingCommand.cpp: Constructors take in a granularity
2313         (WebCore::TypingCommand::TypingCommand):
2314         (WebCore::TypingCommand::deleteKeyPressed):
2315         (WebCore::TypingCommand::forwardDeleteKeyPressed):
2316         * editing/TypingCommand.h: ditto
2317         * page/Frame.h: Fixed bug that shouldDeleteSelection wasn't virtual
2318
2319 2006-07-07  Brady Eidson  <beidson@apple.com>
2320
2321         Reviewed by Anders and Tim Hatcher
2322
2323         Added an accessor to a SQLite config option to change its disk-syncing behavior.
2324         Used this accessor to significantly speed up writes to the Icon DB.
2325
2326         * icon/IconDatabase.cpp:
2327         (WebCore::IconDatabase::open):  Disable full syncing to the SQLite db to speed up writes to the icondb
2328
2329         * icon/SQLDatabase.cpp:
2330         (SQLDatabase::setFullsync):
2331         (SQLDatabase::setSynchronous):
2332         * icon/SQLDatabase.h:
2333         (WebCore::SQLDatabase::):  Added accessor to the SQLite config pragma "synchronous"
2334
2335 2006-07-07  Darin Adler  <darin@apple.com>
2336
2337         Reviewed by Maciej.
2338
2339         - fixed a storage leak noticed by the buildbot
2340
2341         * dom/Document.cpp: (WebCore::Document::removedLastRef):
2342         Call delete on the markers before clearing the map containing them.
2343
2344 2006-07-08  Anders Carlsson  <acarlsson@apple.com>
2345
2346         Reviewed by Brady.
2347
2348         http://bugzilla.opendarwin.org/show_bug.cgi?id=9777
2349         Reproducible crash in Loading/Frames in ToT.
2350         
2351         The problem was that the renderpart destructor resets the frame's 
2352         owner element. For iframes, this should only be done when the element is 
2353         going to be removed from the document.
2354         
2355         * html/HTMLIFrameElement.cpp:
2356         (WebCore::HTMLIFrameElement::~HTMLIFrameElement):
2357         (WebCore::HTMLIFrameElement::willRemove):
2358         (WebCore::HTMLIFrameElement::removedFromDocument):
2359         (WebCore::HTMLIFrameElement::detach):        
2360         * html/HTMLIFrameElement.h:
2361         Remove the frame in willRemove instead.
2362         
2363         * rendering/RenderPart.cpp:
2364         (WebCore::RenderPart::RenderPart):
2365         (WebCore::RenderPart::~RenderPart):
2366         * rendering/RenderPart.h:
2367         Don't call setFrame(0) in the destructor when the element is an iframe element.
2368
2369 2006-07-07  Darin Adler  <darin@apple.com>
2370
2371         Reviewed by Anders.
2372
2373         - fixed a storage leak noticed by the buildbot
2374
2375         * page/FrameView.cpp: (WebCore::FrameViewPrivate::~FrameViewPrivate):
2376         Delete m_scheduledEvents.
2377
2378 2006-07-07  Darin Adler  <darin@apple.com>
2379
2380         Reviewed by Adele.
2381
2382         - fixed a couple of storage leaks noticed by the buildbot
2383
2384         * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::attach):
2385         Call deref on the style after calling setRenderStyle, since styleForRenderer
2386         returns us a "ref'd" RenderStyle object.
2387         * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::attach): Ditto.
2388
2389 2006-07-07  Darin Adler  <darin@apple.com>
2390
2391         Reviewed by Adele.
2392
2393         - fix some license mistakes
2394
2395         * LICENSE-APPLE: Added more years of publication to the copyright here.
2396
2397         * html/CanvasGradient.idl: Corrected license on this file. It had the wrong one.
2398         * html/CanvasPattern.idl: Ditto.
2399         * html/CanvasRenderingContext2D.idl: Ditto.
2400         * html/HTMLCanvasElement.idl: Ditto.
2401
2402 2006-07-06  Levi Weintraub  <lweintraub@apple.com>
2403
2404         Reviewed by justin
2405
2406         Improved table editing: pressing delete directly before or after a table will now select
2407         the table first, then delete it, instead of just deleting it. Useful for when the table's
2408         existence is non-obvious.
2409
2410         * bridge/mac/FrameMac.h: Added shouldDeleteSelection, which allows WebCore to trigger
2411         deletion editing deligates
2412         * bridge/mac/FrameMac.mm: ditto
2413         (WebCore::FrameMac::shouldDeleteSelection):
2414         * bridge/mac/WebCoreFrameBridge.h: ditto
2415         * editing/TypingCommand.cpp: Implemented check for a caret position next to a table, and
2416         subsequent selection (as opposed to removal)
2417         (WebCore::TypingCommand::deleteKeyPressed):
2418         (WebCore::TypingCommand::forwardDeleteKeyPressed):
2419         * page/Frame.cpp: shouldDeleteSelection added
2420         (WebCore::Frame::shouldDeleteSelection):
2421         * page/Frame.h: ditto
2422
2423 2006-07-07  Sam Weinig  <sam.weinig@gmail.com>
2424
2425         Reviewed by Eric.
2426
2427         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9768
2428           Split XSLImportRule out of XSLStyleSheet.* into separate 
2429           files (one class per file).
2430
2431         * WebCore.xcodeproj/project.pbxproj:
2432         * xml/XSLImportRule.cpp: Added.
2433         (WebCore::XSLImportRule::XSLImportRule):
2434         (WebCore::XSLImportRule::parentStyleSheet):
2435         (WebCore::XSLImportRule::loadSheet):
2436         * xml/XSLImportRule.h: Added.
2437         * xml/XSLStyleSheet.cpp:
2438         * xml/XSLStyleSheet.h:
2439
2440 2006-07-07  Anders Carlsson  <acarlsson@apple.com>
2441
2442         Reviewed by Darin.
2443
2444         http://bugzilla.opendarwin.org/show_bug.cgi?id=8300
2445         REGRESSION: First mouse click is randomly ignored when clicking on checkbox and radio buttons
2446         
2447         * css/html4.css:
2448         Set "-webkit-user-select: ignore" on radio buttons and check boxes .
2449         
2450 2006-07-07  Maciej Stachowiak  <mjs@apple.com>
2451
2452         Reviewed by Tim Hatcher.
2453
2454         - fix 20 Node leaks on fast/events tests - these should be the last ones
2455
2456         * bindings/objc/DOMEvents.mm:
2457         (-[DOMEvent dealloc]): implement - deref the event!
2458         (-[DOMEvent finalize]): ditto
2459
2460 2006-07-06  Maciej Stachowiak  <mjs@apple.com>
2461
2462         Reviewed by Tim Hatcher.
2463
2464         - fix 26 Node leaks on fast/dom tests
2465
2466         * dom/Document.cpp:
2467         (WebCore::Document::removedLastRef): delete tokenizer - if we are still parsing at this point, we don't
2468         want nodes held by the parser to keep the document alive.
2469         * html/HTMLParser.cpp:
2470         (WebCore::RefNonDocNodePtr::RefNonDocNodePtr): Smart pointer that acts like RefPtr for Node,
2471         but avoids refing document nodes to avoid cycles.
2472         (WebCore::RefNonDocNodePtr::~RefNonDocNodePtr):
2473         (WebCore::RefNonDocNodePtr::get):
2474         (WebCore::RefNonDocNodePtr::operator*):
2475         (WebCore::RefNonDocNodePtr::operator->):
2476         (WebCore::RefNonDocNodePtr::operator!):
2477         (WebCore::RefNonDocNodePtr::operator UnspecifiedBoolType):
2478         (WebCore::RefNonDocNodePtr::operator=):
2479         (WebCore::operator==):
2480         (WebCore::operator!=):
2481         (WebCore::HTMLStackElem): Use a RefNonDocNodePtr instead of RefPtr<Node>
2482         (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks): Use a RefPtr here to avoid crashing
2483
2484 2006-07-06  Adele Peterson  <adele@apple.com>
2485
2486         Reviewed by Maciej.
2487
2488         Fixed new popup control to open up when the spacebar and the up and down arrows are pressed.
2489
2490         - Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=9762
2491         [Native pop up] Highlighted item text is black instead of white
2492
2493         * html/HTMLSelectElement.cpp:
2494         (WebCore::HTMLSelectElement::isKeyboardFocusable): Added.
2495         (WebCore::HTMLSelectElement::isMouseFocusable): Added.
2496         (WebCore::HTMLSelectElement::defaultEventHandler): Updated to showPopup for up and down arrow keys and spacebar.
2497         * html/HTMLSelectElement.h: (WebCore::HTMLSelectElement::shouldUseMenuList): Made this const.
2498         * rendering/RenderPopupMenu.cpp: (WebCore::RenderPopupMenu::populate): Added FIXME.
2499         * rendering/RenderPopupMenuMac.mm:
2500         (WebCore::RenderPopupMenuMac::showPopup): Updated to save the NSEvent that triggers the popup, so we can send
2501         fake mouseUp and keyUp events when the NSMenu returns.
2502         (WebCore::RenderPopupMenuMac::addGroupLabel): Only set the NSForegroundColorAttributeName attribute if the text isn't black.
2503         Follow-up bug about other colors: http://bugzilla.opendarwin.org/show_bug.cgi?id=9769
2504         (WebCore::RenderPopupMenuMac::addOption): ditto.
2505         * bridge/mac/FrameMac.h: (WebCore::FrameMac::currentEvent): Returns the current NSEvent.
2506
2507 2006-07-06  Justin Garcia  <justin.garcia@apple.com>
2508
2509         Reviewed by levi
2510         
2511         <rdar://problem/4609184>
2512         Mail crashes at WebCore::Selection::adjustForEditableContent
2513         <rdar://problem/4609140>
2514         Crash at WebCore::Range::compareBoundaryPoints
2515         
2516         * editing/Selection.cpp:
2517         (WebCore::Selection::adjustForEditableContent):
2518         * editing/VisiblePosition.cpp:
2519         (WebCore::VisiblePosition::next): Moved code into a helper function.
2520         (WebCore::VisiblePosition::previous): Ditto.
2521         * editing/htmlediting.cpp:
2522         (WebCore::comparePositions): Moved from Selection.cpp.
2523         (WebCore::lowestEditableAncestor): Added.  Returns rootEditableElement
2524         for a node in editable content and the rootEditableElement for the first
2525         ancestor that's editable for a node in non-editable content.
2526         (WebCore::firstEditablePositionAfterPositionInRoot): 
2527         (WebCore::lastEditablePositionBeforePositionInRoot):
2528         * editing/htmlediting.h:
2529
2530 2006-07-06  Anders Carlsson  <acarlsson@apple.com>
2531
2532         Reviewed by Adele.
2533
2534         http://bugzilla.opendarwin.org/show_bug.cgi?id=9528
2535         REGRESSION: arrow key skips '>' in Bugzilla replies due to '\n' in text nodes
2536         
2537         Patch by Darin, tweaked by Anders.
2538         
2539         * html/HTMLElement.cpp:
2540         (WebCore::HTMLElement::setInnerText):
2541         Convert newline characters to <br> elements. I've verified that what's done here is what WinIE does when setting innerText.
2542         
2543         (WebCore::HTMLElement::setOuterText):
2544         Fix comment.
2545
2546         * rendering/RenderTextField.cpp:
2547         (WebCore::RenderTextField::textWithHardLineBreaks):
2548         Remove assert. m_div->firstChild() can be null now because setInnerText doesn't create
2549         text nodes for empty strings anymore.
2550
2551 2006-07-06  Adele Peterson  <adele@apple.com>
2552
2553         Reviewed by Tim Hatcher.
2554
2555         - Speculative fix for <rdar://problem/4605532> unrepro crash at cnn.com after upgrading to 10.4.7 (but happening with 10.4.6 too)
2556
2557         * page/FrameView.cpp: (WebCore::FrameView::layout): Ref's the view during layout, since a recalcStyle could cause the view to be deleted.
2558         If we get back from recalcStyle, and there's only one ref, return early since the the view will be deleted when we exit layout.
2559         * page/FrameView.h: (WebCore::FrameView::hasOneRef): Added.
2560
2561 2006-07-06  Anders Carlsson  <acarlsson@apple.com>
2562
2563         Reviewed by Maciej.
2564
2565         <rdar://problem/4610891> Support overflow events
2566         
2567         * DerivedSources.make:
2568         Add generated sources.
2569         
2570         * WebCore.xcodeproj/project.pbxproj:
2571         Add new files.
2572         
2573         * bindings/js/kjs_events.cpp:
2574         (KJS::toJS):
2575         Support creating wrappers for overflow events..
2576         
2577         * bindings/objc/DOMEvents.h:
2578         * bindings/objc/DOMEvents.mm:
2579         (+[DOMEvent _eventWith:]):
2580         (-[DOMOverflowEvent _overflowEvent]):
2581         (-[DOMOverflowEvent orient]):
2582         (-[DOMOverflowEvent horizontalOverflow]):
2583         (-[DOMOverflowEvent verticalOverflow]):
2584         Add Objective-C wrapper for overflow events.
2585         
2586         * dom/Event.cpp:
2587         (WebCore::Event::isOverflowEvent):        
2588         * dom/Event.h:
2589         * dom/EventNames.h:
2590         * dom/OverflowEvent.cpp: Added.
2591         (WebCore::OverflowEvent::OverflowEvent):
2592         (WebCore::OverflowEvent::isOverflowEvent):
2593         * dom/OverflowEvent.h: Added.
2594         (WebCore::OverflowEvent::):
2595         (WebCore::OverflowEvent::orient):
2596         (WebCore::OverflowEvent::horizontalOverflow):
2597         (WebCore::OverflowEvent::verticalOverflow):
2598         * dom/OverflowEvent.idl: Added.
2599         Add overflow events.
2600         
2601         * page/FrameView.cpp:
2602         (WebCore::FrameViewPrivate::FrameViewPrivate):
2603         (WebCore::FrameView::applyOverflowToViewport):        
2604         (WebCore::FrameView::layout):
2605         Dispatch any scheduled events when layout is done.
2606         
2607         (WebCore::FrameView::scheduleEvent):
2608         New function which schedules an event.
2609         
2610         (WebCore::FrameView::updateOverflowStatus):
2611         Update overflow status for the viewport.
2612         
2613         (WebCore::FrameView::dispatchScheduledEvents):
2614         New function which dispatches all scheduled events.
2615         
2616         * page/FrameView.h:
2617         Add declarations.
2618         
2619         * rendering/RenderLayer.cpp:
2620         (WebCore::RenderLayer::RenderLayer):
2621         (WebCore::RenderLayer::updateOverflowStatus):
2622         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
2623         * rendering/RenderLayer.h:
2624         Schedule overflow events when overflow status changes.
2625
2626 2006-07-06  Timothy Hatcher  <timothy@apple.com>
2627
2628         Reviewed by Geoff.
2629
2630         <rdar://problem/4610881> Expose scroll-related JS properties to ObjC DOM interface
2631         <rdar://problem/4519675> offsetLeft, offsetTop, offsetHeight, and offsetWidth
2632         properties are not exposed to ObjC
2633
2634         * bindings/objc/DOMPrivate.h:
2635         * bindings/objc/DOMHTML.mm:
2636         (-[DOMHTMLElement offsetLeft]):
2637         (-[DOMHTMLElement offsetTop]):
2638         (-[DOMHTMLElement offsetWidth]):
2639         (-[DOMHTMLElement offsetHeight]):
2640         (-[DOMHTMLElement offsetParent]):
2641         (-[DOMHTMLElement clientWidth]):
2642         (-[DOMHTMLElement clientHeight]):
2643         (-[DOMHTMLElement scrollLeft]):
2644         (-[DOMHTMLElement setScrollLeft:]):
2645         (-[DOMHTMLElement scrollTop]):
2646         (-[DOMHTMLElement setScrollTop:]):
2647         (-[DOMHTMLElement scrollWidth]):
2648         (-[DOMHTMLElement scrollHeight]):
2649
2650 2006-07-06  Maciej Stachowiak  <mjs@apple.com>
2651
2652         Reviewed by Adele.
2653
2654         - fix 435 more layout tests Node leaks
2655
2656         * editing/CompositeEditCommand.cpp:
2657         (WebCore::CompositeEditCommand::moveParagraphs): fix more instances of leaked DOM ranges
2658
2659 2006-07-06  David Harrison  <harrison@apple.com>
2660
2661         Reviewed by Geoff
2662
2663         <rdar://problem/4565031> innerHTML of XMP tag returns special characters like '&gt;' instead of '>'
2664  
2665         Test: fast/innerHTML/006.html
2666        
2667         * editing/markup.cpp:
2668         (WebCore::startMarkup):
2669         (WebCore::createMarkup):
2670         Do not special quote content of XMP nodes.
2671
2672 2006-07-06  Maciej Stachowiak  <mjs@apple.com>
2673
2674         Not reviewed - build fix.
2675
2676         - back out earlier leak fix, as it caused a crash on one of the fast/invalid layout tests
2677
2678         * dom/Document.cpp:
2679         (WebCore::Document::removedLastRef):
2680         * html/HTMLParser.cpp:
2681         (WebCore::HTMLStackElem::HTMLStackElem):
2682         (WebCore::HTMLParser::popNestedHeaderTag):
2683         (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks):
2684         (WebCore::HTMLParser::reopenResidualStyleTags):
2685         (WebCore::HTMLParser::popBlock):
2686         (WebCore::HTMLParser::popOneBlock):
2687
2688 2006-07-06  Maciej Stachowiak  <mjs@apple.com>
2689
2690         Reviewed by Anders.
2691
2692         - fix ~3000 Node leaks on the editing tests
2693
2694         * editing/CompositeEditCommand.cpp:
2695         (WebCore::CompositeEditCommand::moveParagraphs): put a newly created Range in a RefPtr
2696         to avoid leaking it, as this leaks the whole document.
2697
2698 2006-07-06  Maciej Stachowiak  <mjs@apple.com>
2699
2700         Reviewed by Anders.
2701
2702         - fix 26 Node leaks on various fast/dom tests
2703
2704         * dom/Document.cpp:
2705         (WebCore::Document::removedLastRef): Delete the tokenizer here, since if we are in mid-parse,
2706         the parser might hold refs on some of our children that have self-only refs.
2707         * html/HTMLParser.cpp:
2708         (WebCore::HTMLStackElem::HTMLStackElem): don't ref the node if it is a document to avoid ref cycles
2709         (WebCore::HTMLStackElem::~HTMLStackElem): ditto
2710         (WebCore::HTMLStackElem::node): changed interface a bit to support the above
2711         (WebCore::HTMLStackElem::setNode): ditto
2712         (WebCore::HTMLParser::popNestedHeaderTag): use new interface to HTMLStackElem
2713         (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks): ditto
2714         (WebCore::HTMLParser::reopenResidualStyleTags): ditto
2715         (WebCore::HTMLParser::popBlock): ditto
2716         (WebCore::HTMLParser::popOneBlock): ditto
2717
2718 2006-07-06  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2719
2720         Reviewed by Adele.
2721         
2722         * rendering/RenderMenuList.h:
2723         (WebCore::RenderMenuList::createsAnonymousWrapper): This method replaces
2724         allowsReusingAnonymousChild() and has the opposite meaning.
2725         
2726 2006-07-05  Adele Peterson  <adele@apple.com>
2727
2728         Build fixes.
2729
2730         * WebCore.vcproj/WebCore/WebCore.vcproj:
2731         * platform/win/TemporaryLinkStubs.cpp:
2732         * rendering/RenderMenuList.cpp:
2733         (WebCore::RenderMenuList::calcMinMaxWidth):
2734         * rendering/RenderPopupMenuWin.h:
2735         (WebCore::RenderPopupMenuWin::RenderPopupMenuWin):
2736         * rendering/RenderThemeWin.cpp:
2737
2738 2006-07-05  Maciej Stachowiak  <mjs@apple.com>
2739
2740         Reviewed by Adele.
2741
2742         - fix 308 Node leaks on the editing layout tests
2743
2744         * dom/Document.cpp: (WebCore::Document::removedLastRef): Clear the markers once there
2745         are no real refs on the document, otherwise a self-only reference cycle w/ the document
2746         can occur.
2747
2748 2006-07-05  Adele Peterson  <adele@apple.com>
2749
2750         Reviewed by Maciej and Hyatt.
2751
2752         Initial implementation of popup menu control.  This can be turned on by setting -webkit-appearance: menulist on a select element.
2753
2754         * WebCore.xcodeproj/project.pbxproj: Added RenderMenuList.h, RenderMenuList.cpp, RenderPopupMenu.h, RenderPopupMenu.cpp, 
2755         RenderPopupMenuWin.h, RenderPopupMenuMac.h, RenderPopupMenuMac.mm, 
2756     
2757         * dom/Node.cpp:
2758         (WebCore::Node::renderStyle): Added. Returns the renderer's style.  If there's no renderer, returns's a RenderStyle that's kept by the node.
2759         This is important for HTMLOptGroupElement and HTMLOptionElement, which don't have renderers.
2760         (WebCore::Node::setRenderStyle): Added.
2761         * dom/Node.h:
2762         * dom/Element.cpp: (WebCore::Element::recalcStyle): Updated to use renderStyle so recalcStyle will work for HTMLOptionElements and HTMLOptGroupElements.
2763            
2764         * css/cssstyleselector.cpp: Updated to call renderStyle method on the node, so resolving style works on elements w/o renderers that cache style. 
2765         (WebCore::CSSStyleSelector::initForStyleResolve):
2766         (WebCore::CSSStyleSelector::locateCousinList):
2767         (WebCore::CSSStyleSelector::canShareStyleWithElement):
2768         (WebCore::CSSStyleSelector::locateSharedStyle):
2769         (WebCore::CSSStyleSelector::checkOneSelector):
2770
2771         * css/html4.css: Removed display:none from options and optgroups, since we're now caching style for these elements.
2772         Added font-weight styles for option and optgroup.
2773         
2774         * html/HTMLOptGroupElement.h: Added m_style to keep track of a RenderStyle for the element, even though we aren't creating a renderer.
2775         This will allow us to honor style for optgroups and options for popup menus (and eventually list boxes too).
2776         (WebCore::HTMLOptGroupElement::rendererIsNeeded): Added.
2777         (WebCore::HTMLOptGroupElement::renderStyle): Added.
2778         * html/HTMLOptionElement.h: ditto.
2779         (WebCore::HTMLOptionElement::rendererIsNeeded): Added.
2780         (WebCore::HTMLOptionElement::renderStyle): Added.
2781         
2782         * html/HTMLOptGroupElement.cpp:
2783         (WebCore::HTMLOptGroupElement::HTMLOptGroupElement): Initialize m_style.
2784         (WebCore::HTMLOptGroupElement::attach): Set the renderStyle.
2785         (WebCore::HTMLOptGroupElement::detach): Clear m_style.
2786         (WebCore::HTMLOptGroupElement::setRenderStyle): Added.
2787         (WebCore::HTMLOptGroupElement::groupLabelText): Added.
2788         * html/HTMLOptionElement.cpp: ditto.
2789         (WebCore::HTMLOptionElement::HTMLOptionElement):
2790         (WebCore::HTMLOptionElement::attach):
2791         (WebCore::HTMLOptionElement::detach):
2792         (WebCore::HTMLOptionElement::setRenderStyle):
2793         (WebCore::HTMLOptionElement::optionText):
2794
2795         * html/HTMLSelectElement.cpp: Added code to use the new RenderMenuList if the appearance is set to MenuListAppearance, 
2796         and if we're not creating a list box renderer.
2797         (WebCore::HTMLSelectElement::recalcStyle):
2798         (WebCore::HTMLSelectElement::createRenderer):
2799         (WebCore::HTMLSelectElement::setRecalcListItems):
2800         (WebCore::HTMLSelectElement::reset):
2801         (WebCore::HTMLSelectElement::notifyOptionSelected):
2802         (WebCore::HTMLSelectElement::defaultEventHandler):
2803         * html/HTMLSelectElement.h:
2804
2805         * WebCore.exp: Added _wkPopupMenu.
2806         * platform/mac/WebCoreSystemInterface.h: Added wkPopupMenu to get the NSMenu to pop up.
2807         * platform/mac/WebCoreSystemInterface.mm:
2808
2809         * platform/win/TemporaryLinkStubs.cpp: Added stubs for RenderPopupMenuWin.
2810         (RenderPopupMenuWin::RenderPopupMenuWin):
2811         (RenderPopupMenuWin::~RenderPopupMenuWin):
2812         (RenderPopupMenuWin::clear):
2813         (RenderPopupMenuWin::populate):
2814         (RenderPopupMenuWin::showPopup):
2815         (RenderPopupMenuWin::addSeparator):
2816         (RenderPopupMenuWin::addGroupLabel):
2817         (RenderPopupMenuWin::addOption):
2818         * rendering/RenderPopupMenuWin.h: Added.
2819
2820         * rendering/RenderPopupMenu.cpp: Added.
2821         (WebCore::RenderPopupMenu::RenderPopupMenu):
2822         (WebCore::RenderPopupMenu::~RenderPopupMenu):
2823         (WebCore::RenderPopupMenu::clear):
2824         (WebCore::RenderPopupMenu::populate): Walks the DOM tree, and adds separators, options, and group labels to the RenderPopupMenu.
2825         (WebCore::RenderPopupMenu::showPopup):
2826         (WebCore::RenderPopupMenu::addSeparator):
2827         (WebCore::RenderPopupMenu::addGroupLabel):
2828         (WebCore::RenderPopupMenu::addOption):
2829         * rendering/RenderPopupMenu.h: Added.
2830         (WebCore::RenderPopupMenu::renderName):
2831         (WebCore::RenderPopupMenu::getRenderMenuList):
2832         * rendering/RenderPopupMenuMac.h: Added.
2833         * rendering/RenderPopupMenuMac.mm: Added.
2834         (WebCore::RenderPopupMenuMac::RenderPopupMenuMac):
2835         (WebCore::RenderPopupMenuMac::~RenderPopupMenuMac):
2836         (WebCore::RenderPopupMenuMac::clear): Removes all items from the menu.
2837         (WebCore::RenderPopupMenuMac::populate): Disables menuChangedMessages before populating the menu.
2838         (WebCore::RenderPopupMenuMac::showPopup): Calculates the right position, and calls wkPopupMenu.
2839         (WebCore::RenderPopupMenuMac::addSeparator):
2840         (WebCore::RenderPopupMenuMac::addGroupLabel):
2841         (WebCore::RenderPopupMenuMac::addOption):
2842         
2843         * rendering/RenderMenuList.cpp: Added.
2844         (WebCore::RenderMenuList::RenderMenuList):
2845         (WebCore::RenderMenuList::addChild):
2846         (WebCore::RenderMenuList::removeChild):
2847         (WebCore::RenderMenuList::setStyle):
2848         (WebCore::RenderMenuList::updateFromElement): If the options have changed, iterate through the children to find the menu item with the widest text.
2849         Set the button text to the selected item's text.
2850         (WebCore::RenderMenuList::setText):
2851         (WebCore::RenderMenuList::paintObject):
2852         (WebCore::RenderMenuList::baselinePosition):
2853         (WebCore::RenderMenuList::calcMinMaxWidth):
2854         (WebCore::RenderMenuList::showPopup):
2855         (WebCore::RenderMenuList::layout):
2856         (WebCore::RenderMenuList::updateSelection):
2857         (WebCore::RenderMenuList::valueChanged):
2858         * rendering/RenderMenuList.h: Added.
2859         (WebCore::RenderMenuList::removeLeftoverAnonymousBoxes):
2860         (WebCore::RenderMenuList::allowsReusingAnonymousChild):
2861         (WebCore::RenderMenuList::canHaveChildren):
2862         (WebCore::RenderMenuList::renderName):
2863         (WebCore::RenderMenuList::setOptionsChanged):
2864         (WebCore::RenderMenuList::selectionChanged):
2865         (WebCore::RenderMenuList::setSelectionChanged):
2866         (WebCore::RenderMenuList::hasPopupMenu):
2867
2868         * rendering/RenderTheme.cpp: Added cases for MenuListAppearance.
2869         (WebCore::RenderTheme::adjustStyle):
2870         (WebCore::RenderTheme::paint):
2871         (WebCore::RenderTheme::paintBorderOnly):
2872         (WebCore::RenderTheme::isControlStyled):
2873         (WebCore::RenderTheme::adjustMenuListStyle):
2874         (WebCore::RenderTheme::createPopupMenu): creates platform-specific RenderPopupMenu.
2875         * rendering/RenderTheme.h:
2876         (WebCore::RenderTheme::sizeOfArrowControl): Added. 
2877         (WebCore::RenderTheme::paintMenuList): Added.
2878         * rendering/RenderThemeMac.h:
2879         * rendering/RenderThemeMac.mm:
2880         (WebCore::RenderThemeMac::adjustRepaintRect):
2881         (WebCore::RenderThemeMac::paintMenuList):
2882         (WebCore::RenderThemeMac::adjustMenuListStyle):
2883         (WebCore::RenderThemeMac::setPopupButtonCellState):
2884         (WebCore::RenderThemeMac::createPopupMenu):
2885         (WebCore::RenderThemeMac::sizeOfArrowControl):
2886         * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::createPopupMenu):
2887         * rendering/RenderThemeWin.h:
2888
2889 2006-07-05  Brady Eidson  <beidson@apple.com>
2890
2891         Reviewed by Tim Omernick.
2892
2893         IconDatabase now respects private browsing via the use of in memory, temporary tables
2894
2895         * bridge/mac/WebCoreIconDatabaseBridge.mm:
2896         (-[WebCoreIconDatabaseBridge iconForPageURL:withSize:]):
2897         (-[WebCoreIconDatabaseBridge iconURLForPageURL:]): Renamed WebCore::IconDatabase methods, changes reflected here
2898
2899         * icon/IconDatabase.cpp:
2900         (WebCore::IconDatabase::clearDatabase):
2901         (WebCore::IconDatabase::deletePrivateTables):
2902         (WebCore::IconDatabase::imageDataForIconID):
2903         (WebCore::IconDatabase::imageDataForIconURL):
2904         (WebCore::IconDatabase::imageDataForPageURL):
2905         (WebCore::IconDatabase::setPrivateBrowsingEnabled):
2906         (WebCore::IconDatabase::iconForPageURL):
2907         (WebCore::IconDatabase::iconURLForPageURL):
2908         (WebCore::IconDatabase::setIconDataForIconURL):
2909         (WebCore::IconDatabase::performSetIconDataForIconID):
2910         (WebCore::IconDatabase::establishTemporaryIconIDForEscapedIconURL):
2911         (WebCore::IconDatabase::establishIconIDForEscapedIconURL):
2912         (WebCore::IconDatabase::setHaveNoIconForIconURL):
2913         (WebCore::IconDatabase::setIconURLForPageURL):
2914         (WebCore::IconDatabase::performSetIconURLForPageURL):
2915         (WebCore::IconDatabase::hasIconForIconURL):
2916         -Some style/comment cleanups, but mainly putting private browsing handling in place
2917
2918         * icon/IconDatabase.h:  Some methods added, others renamed, some comments added
2919
2920         * icon/SQLStatement.cpp:
2921         (WebCore::SQLStatement::getColumnName):
2922         (WebCore::SQLStatement::getColumnName16):
2923         (WebCore::SQLStatement::getColumnText):
2924         (WebCore::SQLStatement::getColumnText16):
2925         -The above 4 had changes to return String() for empty results instead of "" as it's less expensive;
2926
2927 2006-07-05  John Sullivan  <sullivan@apple.com>
2928
2929         Reviewed by Darin and Adele.
2930         
2931         - fixed <rdar://problem/4609162> REGRESSION: When tabbing between links on a page, 
2932         the window doesn't scroll to link that's not in view
2933
2934         * html/HTMLAnchorElement.cpp:
2935         * html/HTMLAnchorElement.h:
2936         removed HTMLAnchorElement::focus and HTMLAnchorElement::blur. 
2937         
2938         HTMLAnchorElement::focus just called document()->setFocusNode(). The scroll-to-reveal
2939         code used to be inside document()->setFocusNode(), but now it's in Element::focus, and this override
2940         was preventing that code from running.
2941         
2942         HTMLAnchorElement::blur was exactly the same implementation as Element::blur (and there aren't any
2943         other implementations of ::blur in the class hierarchy in between). This change has no practical
2944         effect, other than removing duplicate code.
2945         
2946         Adele and I think that it was an oversight not to remove these two methods on 12/20/05
2947         these methods were removed from HTMLButtonElementImpl and HTMLInputElementImpl.
2948
2949 2006-07-05  Anders Carlsson  <acarlsson@apple.com>
2950
2951         * bridge/win/FrameWin.cpp:
2952         (WebCore::FrameWin::FrameWin):
2953         * bridge/win/FrameWin.h:
2954         * platform/win/TemporaryLinkStubs.cpp:
2955         (FrameWin::createFrame):
2956         Fix Win32 build.
2957
2958 2006-07-05  Anders Carlsson  <acarlsson@apple.com>
2959
2960         * WebCore.xcodeproj/project.pbxproj:
2961         Revert accidental change of debug format to DWARF.
2962
2963 2006-07-05  Anders Carlsson  <acarlsson@apple.com>
2964
2965         Reviewed by Maciej.
2966
2967         http://bugzilla.opendarwin.org/show_bug.cgi?id=3581
2968         iFrames set to display:none are Missing from frames array
2969
2970         * bridge/mac/FrameMac.h:
2971         * bridge/mac/FrameMac.mm:
2972         (WebCore::FrameMac::FrameMac):
2973         (WebCore::FrameMac::createFrame):
2974         * bridge/mac/WebCoreFrameBridge.h:
2975         * bridge/mac/WebCoreFrameBridge.mm:
2976         (-[WebCoreFrameBridge initSubframeWithOwnerElement:]):
2977         (-[WebCoreFrameBridge installInFrame:]):
2978         Modify to pass the owner element instead of the owner renderer.        
2979
2980         * dom/ContainerNode.cpp:
2981         (WebCore::ContainerNode::insertBefore):
2982         (WebCore::ContainerNode::replaceChild):
2983         (WebCore::ContainerNode::appendChild):
2984         Dispatch the node inserted events before attaching the nodes. This is what the
2985         tokenizer does.
2986         
2987         * html/HTMLFrameElement.cpp:
2988         (WebCore::HTMLFrameElement::openURL):
2989         (WebCore::HTMLFrameElement::attach):
2990         Pass the element to requestFrame.
2991         
2992         (WebCore::HTMLFrameElement::setLocation):
2993         Don't call attach/detach on an iframe.
2994
2995         * html/HTMLIFrameElement.cpp:
2996         (WebCore::HTMLIFrameElement::insertedIntoDocument):
2997         Load the frame here (using openURL).
2998         
2999         (WebCore::HTMLIFrameElement::removedFromDocument):
3000         Call frameDetached.
3001         
3002         (WebCore::HTMLIFrameElement::attach):
3003         If there's a renderer, attach the content frame to it.
3004         
3005         (WebCore::HTMLIFrameElement::detach):
3006         Reset the renderer's frame.
3007         
3008         (WebCore::HTMLIFrameElement::openURL):
3009         Modify to request the frame.
3010         
3011         * html/HTMLIFrameElement.h:
3012         Add detach.
3013         
3014         * page/Frame.cpp:
3015         (WebCore::parentFromOwnerElement):
3016         (WebCore::Frame::Frame):
3017         (WebCore::Frame::~Frame):
3018         (WebCore::Frame::requestFrame):
3019         (WebCore::Frame::requestObject):
3020         (WebCore::Frame::loadSubframe):
3021         (WebCore::Frame::ownerElement):
3022         (WebCore::Frame::ownerRenderer):
3023         (WebCore::Frame::disconnectOwnerElement):
3024         * page/Frame.h:
3025         * page/FramePrivate.h:
3026         (WebCore::FramePrivate::FramePrivate):        
3027         * rendering/RenderPart.cpp:
3028         (WebCore::RenderPart::setFrame):
3029         Modify to keep an owner element around instead of the renderer. 
3030         
3031         * rendering/RenderPartObject.cpp:
3032         (WebCore::RenderPartObject::updateWidget):
3033         Don't do anything for iframes.
3034
3035 2006-07-04  Kevin Ollivier  <kevino@theolliviers.com>
3036
3037         Reviewed by Maciej, reworked a bit by Darin.
3038
3039         Compile fixes for wx port / gcc 4.0.2
3040         
3041         * platform/PlatformString.h:
3042         * platform/StringImpl.h:
3043         Include CoreFoundation for CF-specific code.
3044         
3045         * dom/DocPtr.h:
3046         * doc/EventTargetNode.h:
3047         Silence warnings about 'extra tokens' after #endif on gcc 4.0.2.
3048         (Not an error but warnings appear frequently.)
3049         
3050         * WebCoreSources.bkl:
3051         * webcore-base.bkl:
3052         Synching ports sources file with TOT. Also, making sure SRCDIR variable
3053         overrides any previous values.
3054         
3055         * loader/ImageDocument.cpp:
3056         Use PLATFORM(MAC) for the parts that are specific to the Macintosh version,
3057         and move the Objective-C parts to another file.
3058
3059         * loader/mac/ImageDocumentMac.h: Added.
3060         * loader/mac/ImageDocumentMac.mm: Added.
3061
3062 2006-07-04  Sam Weinig  <sam.weinig@gmail.com>
3063
3064         Build fix.
3065
3066         * platform/Color.cpp:
3067         (WebCore::makeRGBAFromHSLA):
3068
3069 2006-07-02  David Carson  <dacarson@gmail.com>
3070
3071         Reviewed by Darin.
3072   
3073         - Added HSL color support as specified in CSS3 spec.
3074         http://bugzilla.opendarwin.org/show_bug.cgi?id=9506
3075         Added parsing support of hsl(h,s,l) and hsla(h,s,l,a)
3076         Added converting code to convert HSL to RGB
3077
3078         * css/cssparser.cpp:
3079         (WebCore::CSSParser::parseColorParameters):
3080         Moved common code to parse RGB/RGBA values into it's
3081         own function. This code was duplicated in the parseColorFromValue()
3082         method.
3083         (WebCore::CSSParser::parseHSLParameters):
3084         Common code to parse HSL/HSLA values.
3085         (WebCore::CSSParser::parseColorFromValue):
3086         Moved RGB/RGBA parsing out to seperate function as the code was
3087         duplicated. 
3088         Added parsing support for hsl( and hsla(
3089         * css/cssparser.h:
3090         Added two new functions parseColorParameters() and 
3091         parseHSLParameters().
3092         * platform/Color.cpp:
3093         (WebCore::calcHue):
3094         Added Hue parameter to RGB color.
3095         (WebCore::makeRGBAFromHSLA):
3096         New function to convert HSLA to RGBA.
3097         * platform/Color.h:
3098         Added new functions makeRGBAFromHSLA() and calcHue().
3099
3100 2006-07-02  Mike Emmel  <mike.emmel@gmail.com>
3101
3102         Reviewed and landed by ggaren.
3103
3104         * platform/gdk/TransferJobManager.cpp
3105         Fixed broken dowload logic
3106         * platform/gdk/ScrollViewGdk.cpp 
3107         Add comment that scrollbarSize is a temporary variable
3108         * Projects/gdk/webcore-gdk.bkl
3109         Defined NDEBUG build executable is miscompiled otherwise
3110         * WebCoreSources.bkl
3111         added icon/SiteIcon.cpp editing/IndentOutdentCommand.cpp 
3112         html/HTMLViewSourceDocument.cpp
3113
3114 2006-07-02  Shawn Stricker  <kb1ibt@gmail.com>
3115
3116         Reviewed by Timothy Hatcher.  Build fix for Linux.
3117
3118         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9684
3119           [GDK] multiple little fixes and a few new things for Templinkstubs
3120
3121         * platform/gdk/ScrollViewGdk.cpp:
3122         (WebCore::ScrollView::setDrawable): Changed SCROLLBAR_SIZE to scrollbarSize.
3123         * platform/gdk/TemporaryLinkStubs.cpp:
3124         (Image::drawTiled): Added missing parameter to argument list.
3125         * platform/gdk/TransferJobManager.cpp:
3126         (WebCore::writeCallback): Added missing parenthesis to static_cast.
3127
3128 2006-07-02  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3129
3130         Reviewed by Darin.
3131
3132         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9674
3133           REGRESSION (r15075): Blank or incomplete pages on digg.com
3134
3135         Replaced the requestingScript state bit added in the fix for bug 9317
3136         with a m_requestingScript bool that is set before and restored
3137         after calling ref() on a CachedScript.
3138         
3139         Test: fast/tokenizer/nested-cached-scripts.html
3140
3141         * html/HTMLTokenizer.cpp:
3142         (WebCore::HTMLTokenizer::HTMLTokenizer):
3143         (WebCore::HTMLTokenizer::begin):
3144         (WebCore::HTMLTokenizer::scriptHandler):
3145         (WebCore::HTMLTokenizer::notifyFinished):
3146         * html/HTMLTokenizer.h:
3147         (WebCore::HTMLTokenizer::State::):
3148
3149 2006-07-01  David Kilzer  <ddkilzer@kilzer.net>
3150
3151         Reviewed by NOBODY (build fix).
3152
3153         * platform/gdk/TransferJobManager.cpp:
3154         (WebCore::writeCallback): Changed 'static_cat' to 'static_cast'.
3155
3156 2006-06-30  Mike Emmel  <mike.emmel@gmail.com>
3157
3158         Reviewed and worked over a lot by Darin.
3159
3160         - check in first set of GDK-specific sources
3161
3162         * platform/gdk/BrowserExtensionGdk.h: Added.
3163         * platform/gdk/CookieJarGdk.cpp: Added.
3164         * platform/gdk/CursorGdk.cpp: Added.
3165         * platform/gdk/FontCacheGdk.cpp: Added.
3166         * platform/gdk/FontDataGdk.cpp: Added.
3167         * platform/gdk/FontGdk.cpp: Added.
3168         * platform/gdk/FontPlatformData.h: Added.
3169         * platform/gdk/FontPlatformDataGdk.cpp: Added.
3170         * platform/gdk/FrameGdk.cpp: Added.
3171         * platform/gdk/FrameGdk.h: Added.
3172         * platform/gdk/GlyphMapGdk.cpp: Added.
3173         * platform/gdk/KeyEventGdk.cpp: Added.
3174         * platform/gdk/KeyboardCodes.h: Added.
3175         * platform/gdk/MouseEventGdk.cpp: Added.
3176         * platform/gdk/PageGdk.cpp: Added.
3177         * platform/gdk/RenderThemeGdk.cpp: Added.
3178         * platform/gdk/RenderThemeGdk.h: Added.
3179         * platform/gdk/ScreenGdk.cpp: Added.
3180         * platform/gdk/ScrollViewGdk.cpp: Added.
3181         * platform/gdk/SharedTimerLinux.cpp: Added.
3182         * platform/gdk/SystemTimeLinux.cpp: Added.
3183         * platform/gdk/TemporaryLinkStubs.cpp: Added.
3184         * platform/gdk/TransferJobCurl.cpp: Added.
3185         * platform/gdk/TransferJobManager.cpp: Added.
3186         * platform/gdk/TransferJobManager.h: Added.
3187         * platform/gdk/WheelEventGdk.cpp: Added.
3188         * platform/gdk/WidgetGdk.cpp: Added.
3189         * platform/gdk/gdk-encodings.txt: Added.
3190
3191 2006-06-30  Mike Emmel  <mike.emmel@gmail.com>
3192
3193         Reviewed by Darin.
3194
3195         * WebCoreSources.bkl: Updated for recent file changes.
3196
3197 2006-06-30  Mike Emmel  <mike.emmel@gmail.com>
3198
3199         Reviewed and enhanced by Darin.
3200
3201         Compilation fixes for Linux/Gdk.
3202
3203         * WebCore/platform/FontData.h: Added forward declaration of a class.
3204         * WebCore/platform/cairo/GraphicsContextCairo.cpp: Fixed case on include.
3205         * WebCore/bindings/js/kjs_html.cpp: Added <math.h> include.
3206
3207         * WebCore/css/maketokenizer: Fixed incorrect check for Linux that was
3208         already true even on Mac OS X. Added some additional includes and
3209         defines to the Linux extra generated code.
3210
3211 2006-06-30  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3212
3213         Reviewed by Hyatt.
3214
3215         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7204
3216           float inserted in fixed height block via DOM not repainted
3217
3218         Test: fast/repaint/float-move-during-layout.html
3219
3220         * rendering/RenderBlock.cpp:
3221         (WebCore::RenderBlock::layoutBlockChildren):
3222         (WebCore::RenderBlock::repaintOverhangingFloats): Renamed repaintFloatingDescendants()
3223         to this and limited it to repainting overhanging floats. Added a boolean parameter that forces
3224         all descendant overhanging floats (that don't have their own layer) to paint.
3225         * rendering/RenderBlock.h:
3226         * rendering/RenderBox.cpp:
3227         (WebCore::RenderBox::repaintDuringLayoutIfMoved): Changed to paint all descendant
3228         floats.
3229         * rendering/RenderObject.cpp:
3230         (WebCore::RenderObject::repaintOverhangingFloats):
3231         * rendering/RenderObject.h:
3232
3233 2006-06-30  Levi Weintraub  <lweintraub@apple.com>
3234
3235         Reviewed by justin
3236
3237         * editing/VisiblePosition.cpp: Removed is[Not]EqualIgnoringAffinity and made operator== use the logic that ignores affinity.
3238         * editing/VisiblePosition.h: Ditto.
3239         (WebCore::operator==):
3240         * editing/visible_units.cpp:
3241         (WebCore::isStartOfParagraph): Changed to compare VisiblePositions using ==.
3242         (WebCore::isEndOfParagraph): Ditto.
3243         (WebCore::isStartOfBlock): Ditto.
3244         (WebCore::isEndOfBlock): Ditto.
3245
3246 === Safari-521.14 ===
3247
3248 2006-06-30  Justin Garcia  <justin.garcia@apple.com>
3249
3250         Reviewed by levi
3251
3252         * editing/htmlediting.cpp:
3253         (WebCore::canHaveChildrenForEditing): Don't insert children into
3254         object tags while editing.
3255
3256 2006-06-30  Justin Garcia  <justin.garcia@apple.com>
3257
3258         Reviewed by harrison
3259         
3260         <rdar://problem/4598309
3261         Caret gets stuck when it hits non editable content within an editable body
3262         <http://bugzilla.opendarwin.org/show_bug.cgi?id=9510>
3263         Caret will jump out of an editable region
3264         
3265         * dom/Position.cpp:
3266         (WebCore::Position::upstream): Don't move into a new editable region so that 
3267         candidates that that straddle an editable/non-editable boundary will 
3268         correspond to different VisiblePositions.
3269         (WebCore::Position::downstream): Ditto.
3270         * editing/SelectionController.cpp:
3271         (WebCore::SelectionController::modifyMovingRightForward): Use VisiblePosition::next(true)
3272         (WebCore::SelectionController::modifyMovingLeftBackward): Use VisiblePosition::previous(true)
3273         * editing/VisiblePosition.cpp:
3274         (WebCore::VisiblePosition::next): Added code to jump to the next editable region as long
3275         as it has the same highest editable root.
3276         (WebCore::VisiblePosition::previous): Ditto.
3277         * editing/VisiblePosition.h:
3278         * editing/htmlediting.cpp:
3279         (WebCore::highestEditableRoot): Added, returns the highest editable root of a node if that
3280         node is in editable content, otherwise 0.
3281         * editing/htmlediting.h:
3282
3283 2006-06-30  David Kilzer  <ddkilzer@kilzer.net>
3284
3285         Reviewed by Darin.
3286
3287         - Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9358
3288           REGRESSION: Assertion failure in HTMLInputElement::setValueFromRenderer
3289           (value == constrainValue(value)) when deleting all text
3290
3291         Test: editing/deleting/delete-all-text-in-text-field-assertion.html
3292
3293         Bug 9661 filed to fix the follow-up issue:
3294         http://bugzilla.opendarwin.org/show_bug.cgi?id=9661
3295         textContent returns "\n" for a <br> even if it is collapsed
3296
3297         * html/HTMLInputElement.cpp:
3298         (WebCore::HTMLInputElement::setValueFromRenderer): Work around "\n" value
3299         when all characters are deleted from a text field.
3300
3301 2006-06-30  David Harrison  <harrison@apple.com>
3302
3303         Reviewed by Tim Omernick
3304
3305         <rdar://problem/4609481> Crash calling -[WebScriptObject valueForKey:] when JS disabled
3306         
3307         * bridge/mac/FrameMac.mm:
3308         (WebCore::FrameMac::executionContextForDOM):
3309         Early return if JS is not enabled.
3310
3311 2006-06-30  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3312
3313         Reviewed by Tim H.
3314
3315         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9664
3316           REGRESSION (r15106): Crash in fast/events/mouseover-mouseout2.html
3317
3318         * page/FrameView.cpp:
3319         (WebCore::FrameView::handleMouseMoveEvent): Added a check that oldSubframe is
3320         still a subframe of the view's frame before passing the event to it.
3321
3322 2006-06-29  Timothy Hatcher  <timothy@apple.com>
3323
3324         Reviewed by Darin.
3325
3326         <rdar://problem/3694163> -[KWQPageState finalize] is incorrect; design change needed
3327         <rdar://problem/3694165> -[WebCoreFrameBridge finalize] is incorrect; design change needed
3328
3329         Added close methods that need to be called before these
3330         objects can be released. This ensures proper tear-down under GC.
3331
3332         * WebCore.xcodeproj/project.pbxproj:
3333         * bridge/mac/WebCoreFrameBridge.h:
3334         * bridge/mac/WebCoreFrameBridge.mm:
3335         (-[WebCoreFrameBridge dealloc]):
3336         (-[WebCoreFrameBridge finalize]):
3337         (-[WebCoreFrameBridge close]):
3338         * bridge/mac/WebCorePageBridge.h:
3339         * bridge/mac/WebCorePageBridge.mm:
3340         (-[WebCorePageBridge setMainFrame:]):
3341         (-[WebCorePageBridge dealloc]):
3342         (-[WebCorePageBridge finalize]):
3343         (-[WebCorePageBridge close]):
3344         (-[WebCorePageBridge mainFrame]):
3345         (-[WebCorePageBridge setGroupName:]):
3346         (-[WebCorePageBridge groupName]):
3347         * kwq/KWQPageState.h:
3348         * kwq/KWQPageState.mm:
3349         (-[KWQPageState dealloc]):
3350         (-[KWQPageState finalize]):
3351         (-[KWQPageState close]):
3352
3353 2006-06-29  Sam Weinig  <sam.weinig@gmail.com>
3354
3355         Reviewed by Hyatt.
3356
3357         - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=4874
3358         Table with absolute bottom positioning is positioned incorrectly
3359
3360         Note: patch originally from Mitz, spruced up by Weinig.
3361
3362         * rendering/RenderBox.cpp:
3363         (WebCore::RenderBox::calcAbsoluteVerticalValues):
3364         * rendering/RenderTable.cpp:
3365         (WebCore::RenderTable::layout):
3366
3367 2006-06-29  Graham Dennis  <Graham.Dennis@gmail.com>
3368
3369         Reviewed by Justin.
3370
3371         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9505
3372           moveParagraphContentsToNewBlockIfNecessary creates a new block outside the current position
3373
3374         * editing/CompositeEditCommand.cpp:
3375         Added sanity checking to prevent modifying nodes outside of 
3376         where we should be
3377         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
3378
3379 2006-06-29  Brady Eidson  <beidson@apple.com>
3380
3381         Reviewed by Levi.
3382
3383         In addition to a few small details, logging changes, and style cleanups, this is a stop-gap hack
3384         for a problem in SQLite's blob handling.  Querying for a blob in a void* form is reproducibly
3385         returning a corrupt buffer.  The temporary solution is to query for the blob as "quoted text" and
3386         manually convert the return string into a character buffer.
3387
3388         * icon/IconDatabase.cpp:
3389         (WebCore::IconDatabase::recreateDatabase):
3390         (WebCore::IconDatabase::createPrivateTables):
3391
3392         (WebCore::hexToUnsignedChar): These two functions are the text-to-character-data converters for the time being
3393         (WebCore::hexStringToVector):
3394
3395         (WebCore::IconDatabase::imageDataForIconID):
3396         (WebCore::IconDatabase::imageDataForIconURL):
3397         (WebCore::IconDatabase::imageDataForPageURL):
3398         (WebCore::IconDatabase::iconForPageURL):
3399         (WebCore::IconDatabase::hasIconForIconURL):
3400         * icon/IconDatabase.h:  changes the icon data accessors to return a Vector<unsigned char> instead of void*
3401
3402         * icon/SQLStatement.cpp:
3403         (WebCore::SQLStatement::columnCount):
3404         (WebCore::SQLStatement::getColumnBlob):
3405         * icon/SiteIcon.cpp:
3406         (SiteIcon::getImage):
3407
3408 2006-06-29  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3409
3410         Reviewed by Darin.
3411
3412         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9652
3413           Assertion failure when changing an RTL table cell to display:none
3414
3415         Test: fast/table/rtl-cell-display-none-assert.html
3416
3417         * rendering/RenderTableSection.cpp:
3418         (WebCore::RenderTableSection::layoutRows): Corrected the index used as
3419         the last index in the columnPos vector.
3420
3421 2006-06-29  Darin Adler  <darin@apple.com>
3422
3423         Reviewed by Anders.
3424
3425         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9622
3426           showModalDialog returnValue ignored, function result is always "undefined"
3427
3428         * manual-tests/modal-dialog.html: Added.
3429         * manual-tests/show-modal-dialog-test.html: Added.
3430
3431         * page/Frame.cpp: (WebCore::Frame::clear): Call KJSProxy::clear with the
3432         clearWindowProperties parameter instead of not calling it at all when
3433         clearWindowProperties is false.
3434
3435         * bindings/js/kjs_proxy.h: Add boolean clearWindowProperties parameter.
3436         * bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::clear): Pass clearWindowProperties
3437         variable through to Window::clear instead of not calling it at all.
3438
3439         * bindings/js/kjs_window.h: Add boolean clearWindowProperties parameter.
3440         * bindings/js/kjs_window.cpp: (KJS::Window::clear): If clearWindowProperties
3441         is false, do only the returnValue work, not the rest of the work.
3442
3443         * manual-tests/modal-dialog.html: Added.
3444         * manual-tests/show-modal-dialog-test.html: Added.
3445
3446 2006-06-29  Beth Dakin  <bdakin@apple.com>
3447
3448         Reviewed by Hyatt.
3449
3450         Fix for <rdar://problem/4450615> Add composite mode to background 
3451         styles
3452
3453         -webkit-background-composite will set a composite mode on a 
3454         background image.
3455
3456         * css/CSSComputedStyleDeclaration.cpp:
3457         (WebCore::):
3458         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3459         * css/CSSPropertyNames.in: Add -webkit-background-composite
3460         * css/CSSValueKeywords.in: Add all possible values (clear, copy, 
3461         source-over, source-in, source-out, source-atop, destination-over, 
3462         destination-in, destination-out, destination-atop, xor, plus-
3463         darker, highlight, and plus-lighter)
3464         * css/cssparser.cpp:
3465         (WebCore::CSSParser::parseValue):
3466         (WebCore::CSSParser::parseBackgroundProperty):
3467         * css/cssstyleselector.cpp:
3468         (WebCore::CSSStyleSelector::applyProperty):
3469         (WebCore::CSSStyleSelector::mapBackgroundComposite):
3470         * css/cssstyleselector.h:
3471         * platform/GraphicsContext.cpp:
3472         (WebCore::GraphicsContext::drawTiledImage):
3473         * platform/GraphicsContext.h: drawTiledImage() now takes a 
3474         composite operator.
3475         * platform/Image.h: drawTiled() now takes a composite operator.
3476         * platform/cairo/ImageCairo.cpp:
3477         (WebCore::Image::drawTiled): Set the composite operator.
3478         * platform/mac/ImageMac.mm:
3479         (WebCore::Image::drawTiled): Set the composite operator.
3480         * platform/win/TemporaryLinkStubs.cpp:
3481         (Image::drawTiled):
3482         * rendering/RenderBox.cpp:
3483         (WebCore::RenderBox::paintBackgroundExtended): Send the composite 
3484         operator in the render style over to the graphics context.
3485         * rendering/render_style.cpp:
3486         (WebCore::BackgroundLayer::BackgroundLayer):
3487         (WebCore::BackgroundLayer::operator=):
3488         (WebCore::BackgroundLayer::operator==):
3489         (WebCore::BackgroundLayer::fillUnsetProperties):
3490         (WebCore::BackgroundLayer::cullEmptyLayers):
3491         * rendering/render_style.h:
3492         (WebCore::BackgroundLayer::backgroundComposite):
3493         (WebCore::BackgroundLayer::isBackgroundCompositeSet):
3494         (WebCore::BackgroundLayer::setBackgroundComposite):
3495         (WebCore::BackgroundLayer::clearBackgroundComposite):
3496         (WebCore::RenderStyle::backgroundComposite):
3497         (WebCore::RenderStyle::initialBackgroundComposite):
3498
3499 2006-06-29  David Kilzer  <ddkilzer@kilzer.net>
3500
3501         Reviewed by Darin.
3502
3503         http://bugzilla.opendarwin.org/show_bug.cgi?id=9649
3504         The no-svg build broke after r15091
3505
3506         * bindings/objc/DOMInternal.h: Added #if XPATH_SUPPORT/#endif.
3507         * bindings/objc/DOMInternal.mm: Ditto.
3508         (raiseDOMException):
3509         * bindings/objc/DOMXPath.h: Ditto.
3510         * bindings/objc/DOMXPath.mm: Ditto.
3511         * bindings/objc/DOMXPathInternal.h: Ditto.
3512
3513 2006-06-29  Anders Carlsson  <acarlsson@apple.com>
3514
3515         Reviewed by Tim O.
3516
3517         <rdar://problem/4599760> Objective-C XPath support
3518         
3519         * WebCore.xcodeproj/project.pbxproj:
3520         Add files.
3521         
3522         * bindings/objc/DOMInternal.h:
3523         * bindings/objc/DOMInternal.mm:
3524         (raiseDOMException):
3525         Handle XPath exceptions
3526         
3527         * bindings/objc/DOMXPath.h: Added.
3528         (-[DOMXPathNSResolver lookupNamespaceURI:]):
3529         * bindings/objc/DOMXPath.mm: Added.
3530         (-[DOMNativeXPathNSResolver dealloc]):
3531         (-[DOMNativeXPathNSResolver finalize]):
3532         (-[DOMNativeXPathNSResolver _xpathNSResolver]):
3533         (-[DOMNativeXPathNSResolver _initWithXPathNSResolver:]):
3534         (+[DOMNativeXPathNSResolver _xpathNSResolverWith:]):
3535         (-[DOMNativeXPathNSResolver lookupNamespaceURI:]):
3536         (-[DOMXPathResult dealloc]):
3537         (-[DOMXPathResult finalize]):
3538         (-[DOMXPathResult resultType]):
3539         (-[DOMXPathResult numberValue]):
3540         (-[DOMXPathResult stringValue]):
3541         (-[DOMXPathResult booleanValue]):
3542         (-[DOMXPathResult singleNodeValue]):
3543         (-[DOMXPathResult invalidIteratorState]):
3544         (-[DOMXPathResult snapshotLength]):
3545         (-[DOMXPathResult iterateNext]):
3546         (-[DOMXPathResult snapshotItem:]):
3547         (-[DOMXPathResult _xpathResult]):
3548         (-[DOMXPathResult _initWithXPathResult:]):
3549         (+[DOMXPathResult _xpathResultWith:]):
3550         (-[DOMXPathExpression evaluate:::]):
3551         (-[DOMXPathExpression _xpathExpression]):
3552         (-[DOMXPathExpression _initWithXPathExpression:]):
3553         (+[DOMXPathExpression _xpathExpressionWith:]):
3554         (-[DOMDocument createExpression::]):
3555         (-[DOMDocument createNSResolver:]):
3556         (-[DOMDocument evaluate:::::]):
3557         * bindings/objc/DOMXPathInternal.h: Added.
3558         Add Objective-C XPath API.
3559
3560 2006-06-28  David Hyatt  <hyatt@apple.com>
3561
3562         Add support for custom highlighting to paint at the root line box level
3563         (and to inflate the box it uses so that it can go outside the bounds of
3564         the line if necessary).
3565
3566         Reviewed by harrison
3567
3568         * bridge/mac/FrameMac.h:
3569         * bridge/mac/FrameMac.mm:
3570         (WebCore::FrameMac::customHighlightLineRect):
3571         (WebCore::FrameMac::paintCustomHighlight):
3572         * bridge/mac/WebCoreFrameBridge.h:
3573         * rendering/InlineTextBox.cpp:
3574         (WebCore::InlineTextBox::paintCustomHighlight):
3575         * rendering/RootInlineBox.cpp:
3576         (WebCore::RootInlineBox::paintCustomHighlight):
3577         (WebCore::RootInlineBox::paint):
3578         * rendering/RootInlineBox.h:
3579
3580 2006-06-28  Levi Weintraub  <lweintraub@apple.com>
3581
3582         Reviewed by justin
3583
3584         <rdar://problem/4592005> FormatBlock inserts in the wrong place, disregarding editable content
3585         <rdar://problem/4590763> FormatBlock for paragraph style doesn't work
3586
3587         * dom/Node.cpp:
3588         (WebCore::Node::rootEditableElement): Return inline nodes
3589         * editing/FormatBlockCommand.cpp:
3590         (WebCore::FormatBlockCommand::doApply): Keep from inserting before editable content
3591         * editing/JSEditor.cpp: Support html braces (<>) around tag names
3592
3593 2006-06-28  Justin Garcia  <justin.garcia@apple.com>
3594
3595         Reviewed by levi
3596         
3597         svg/custom/text-hit-test.svg was failing
3598
3599         * rendering/RenderContainer.cpp:
3600         (WebCore::RenderContainer::positionForCoordinates): Don't skip child
3601         renderers that have a height of 0 when looking for the closest child
3602         renderer, they may contain content that overflows.
3603         * rendering/RenderText.cpp:
3604         (WebCore::RenderText::positionForCoordinates): Fixed typos.
3605
3606 2006-06-28  David Hyatt  <hyatt@apple.com>
3607
3608         Make the view source document properly handle <script>.  We don't syntax
3609         highlight the JS yet, but it shows up properly now.
3610
3611         Reviewed by john
3612
3613         * WebCore.xcodeproj/project.pbxproj:
3614         * html/HTMLTokenizer.cpp:
3615         (WebCore::HTMLTokenizer::scriptHandler):
3616
3617 2006-06-28  Timothy Hatcher  <timothy@apple.com>
3618
3619         Prefer the Stabs debugging symbols format until DWARF bugs are fixed.
3620
3621         * WebCore.xcodeproj/project.pbxproj:
3622
3623 2006-06-28  Justin Garcia  <justin.garcia@apple.com>
3624
3625         Reviewed by levi
3626         
3627         Fixed EditActions for InsertHorizontalRule and RemoveFormat.
3628         
3629         * editing/JSEditor.cpp:
3630         * editing/ReplaceSelectionCommand.cpp:
3631         (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
3632         (WebCore::ReplaceSelectionCommand::editingAction):
3633         * editing/ReplaceSelectionCommand.h:
3634
3635 2006-06-28  Levi Weintraub  <lweintraub@apple.com>
3636
3637          Build Fix. Reviewed by NOBODY
3638
3639         * editing/IndentOutdentCommand.cpp:
3640         (WebCore::IndentOutdentCommand::indentRegion):
3641
3642 2006-06-28  Levi Weintraub  <lweintraub@apple.com>
3643
3644         Reviewed by justin
3645
3646         http://bugzilla.opendarwin.org/show_bug.cgi?id=7568
3647         Bug 7568: Implement Indent/Outdent
3648
3649         * WebCore.vcproj/WebCore/WebCore.vcproj: Added IndentOutdentCommand.h/cpp
3650         * WebCore.xcodeproj/project.pbxproj: Ditto.
3651         * editing/IndentOutdentCommand.cpp: Added.
3652         (WebCore::IndentOutdentCommand::IndentOutdentCommand):
3653         (WebCore::enclosingListOrBlockquote):
3654         (WebCore::IndentOutdentCommand::splitTreeToNode): Splits the DOM tree from a
3655         descendent node to an ending ancestor, duplicating nodes when necessary. Returns
3656         the last node split. Used to insert blockquotes at the topmost level.
3657         (WebCore::IndentOutdentCommand::indentRegion):
3658         (WebCore::IndentOutdentCommand::outdentParagraph):
3659         (WebCore::IndentOutdentCommand::outdentRegion):
3660         (WebCore::IndentOutdentCommand::doApply):
3661         * editing/IndentOutdentCommand.h: Added.
3662         (WebCore::IndentOutdentCommand::):
3663         * editing/JSEditor.cpp: Added the execCommands Indent and Outdent
3664         * editing/htmlediting.cpp:
3665         (WebCore::enclosingNodeWithTag): Finds the enclosing node with any specified tag.
3666         (WebCore::enclosingListChild): Added checks for nill and editable boundaries.
3667         (WebCore::outermostEnclosingListChild): Returns the highest ancestor list child.
3668         (WebCore::highestAncestor): Added.
3669         (WebCore::createElement): Changed the passed in string to a const reference.
3670         * editing/htmlediting.h:
3671
3672 2006-06-28  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3673
3674         Reviewed by Darin and Hyatt.
3675
3676         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9561
3677           REGRESSION: Content property on :before of button causes hang on click or hover
3678
3679         Test: fast/forms/button-generated-content.html
3680
3681         * rendering/RenderBlock.cpp:
3682         (WebCore::RenderBlock::setStyle):
3683         * rendering/RenderButton.cpp:
3684         (WebCore::RenderButton::updatePseudoChild): Added. Calls updatePseudoChildForObject()
3685         on the button itself or on its inner div, if it has one.
3686         * rendering/RenderButton.h:
3687         (WebCore::RenderButton::createsAnonymousWrapper): Added. Returns true.
3688         * rendering/RenderContainer.cpp:
3689         (WebCore::RenderContainer::pseudoChild): Added. Returns the child containing
3690         generated content of the requested type if there is one, or otherwise the
3691         child before/after which such generated content should come.
3692         (WebCore::RenderContainer::updatePseudoChild): Removed the child parameter and moved the guts
3693         of this method into updatePseudoChildForObject, which this method calls unless the object
3694         is an anonymous wrapper.
3695         (WebCore::RenderContainer::updatePseudoChildForObject): Added. Does the what
3696         updatePseudoChildForObject did previously, but fetches the pseudo style from
3697         the styledObject parameter.
3698         * rendering/RenderContainer.h:
3699         * rendering/RenderInline.cpp:
3700         (WebCore::RenderInline::setStyle):
3701         (WebCore::RenderInline::addChildToFlow):
3702         (WebCore::RenderInline::splitInlines):
3703         (WebCore::RenderInline::splitFlow):
3704         * rendering/RenderObject.h:
3705         (WebCore::RenderObject::createsAnonymousWrapper): Added. This method replaces
3706         allowsReusingAnonymousChild and returns the opposite of what that method used to
3707         return. Returns true if the object creates an anonymous child to contain all its
3708         other children.
3709
3710 2006-06-27  Brady Eidson  <beidson@apple.com>
3711
3712         Reviewed by Maciej
3713
3714         Hookup the new semi-functional SQLite icon database.
3715         For now, it is living side-by-side with the old DB so one can compare the
3716         two for debugging purposes.  Also, it is disabled (in WebKit) by default unless you
3717         compile with ICONDEBUG #defined.
3718
3719         * WebCore.xcodeproj/project.pbxproj:  Added file SiteIcon.cpp
3720
3721         * bridge/mac/WebCoreIconDatabaseBridge.h:
3722         * bridge/mac/WebCoreIconDatabaseBridge.mm:
3723         (-[WebCoreIconDatabaseBridge privateBrowsingEnabled]):
3724         (-[WebCoreIconDatabaseBridge iconForPageURL:withSize:]):
3725         (-[WebCoreIconDatabaseBridge iconURLForPageURL:]):
3726         (-[WebCoreIconDatabaseBridge _setIconData:forIconURL:]):
3727
3728         * icon/IconDatabase.cpp:
3729         (WebCore::IconDatabase::isValidDatabase):
3730         (WebCore::IconDatabase::recreateDatabase):
3731         (WebCore::IconDatabase::createPrivateTables):
3732         (WebCore::IconDatabase::deletePrivateTables):
3733         (WebCore::IconDatabase::imageDataForIconID):
3734         (WebCore::IconDatabase::imageDataForIconURL):
3735         (WebCore::IconDatabase::imageDataForPageURL):
3736         (WebCore::IconDatabase::setPrivateBrowsingEnabled):
3737         (WebCore::IconDatabase::iconForPageURL):
3738         (WebCore::IconDatabase::iconURLForURL):
3739         (WebCore::IconDatabase::setIconDataForIconURL):
3740         (WebCore::IconDatabase::establishIconIDForEscapedIconURL):
3741         (WebCore::IconDatabase::setHaveNoIconForIconURL):
3742         (WebCore::IconDatabase::setIconURLForPageURL):
3743         (WebCore::IconDatabase::hasIconForIconURL):
3744         * icon/IconDatabase.h:
3745         (WebCore::SiteIcon::getIconURL):
3746         (WebCore::IconDatabase::getPrivateBrowsingEnabled):
3747         
3748         * icon/SiteIcon.cpp: Added.
3749         (SiteIcon::SiteIcon):
3750         (SiteIcon::~SiteIcon):
3751         (SiteIcon::getImage):
3752         (SiteIcon::resetExpiration):
3753         (SiteIcon::getExpiration):
3754
3755 2006-06-27  Rob Buis  <buis@kde.org>
3756
3757         Reviewed by Darin.
3758
3759         http://bugzilla.opendarwin.org/show_bug.cgi?id=9605
3760         REGRESSION: pageX and pageY are both 0 for events created with initMouseEvent
3761
3762         Calculate pageX/pageY and clientX/clientY values when using initMouseEvent.
3763
3764         * dom/MouseEvent.cpp:
3765         (WebCore::MouseEvent::initMouseEvent):
3766         * dom/MouseRelatedEvent.cpp:
3767         (WebCore::MouseRelatedEvent::initCoordinates):
3768         * dom/MouseRelatedEvent.h:
3769
3770 2006-06-27  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3771
3772         Reviewed by Maciej and Darin.
3773
3774         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9317
3775           REGRESSION: crash in HTML tokenizer at Japanese Apple support page
3776
3777         Test: fast/tokenizer/write-unclosed-script.html
3778
3779         * html/HTMLTokenizer.cpp:
3780         (WebCore::HTMLTokenizer::scriptHandler): Changed to reset the inScript flag
3781         and scriptCodeSize before possible script execution, but not afterwards.
3782         This way, if script execution write()s a <script> tag without closing it,
3783         the tokenizer is left in inScript state. Added code to set the requestingScript
3784         flag around the request for the cached script, to let notifiyFinished() know
3785         that it's being called under scriptHandler().
3786         (WebCore::HTMLTokenizer::scriptExecution): Removed code that saved and restored
3787         the inScript flag. This function is always entered now with inScript being false.
3788         (WebCore::HTMLTokenizer::notifyFinished): Changed to use the new requestingScript
3789         state flag instead of the inScript flag, which is always false now when entering
3790         this function.
3791         * html/HTMLTokenizer.h:
3792         Added the requestingScript state bit, used to tell notifyFinished() that it
3793         is being called under scriptHandler() (which happens when the script is already
3794         in cache).
3795
3796 2006-06-27  Justin Garcia  <justin.garcia@apple.com>
3797
3798         Reviewed by levi
3799
3800         * editing/JSEditor.cpp: Added RemoveFormat.
3801
3802 2006-06-27  Kevin Decker    <kdecker@apple.com>
3803
3804         Reviewed by brady.
3805
3806         Fixed: <rdar://problem/4597679> TOT REGRESSION: popup blocker DOA
3807         
3808         Need to add window.open() support to DumpRenderTree before landing an actual layout test.
3809
3810         * bindings/js/kjs_window.cpp: 
3811         (KJS::WindowFunc::callAsFunction): Because FrameTree::find() returns true for empty strings, 
3812         we must check for empty framenames. Otherwise, illegitimate window.open() calls with no name
3813         will pass right through the popup blocker.
3814
3815 2006-06-28  Anders Carlsson  <acarlsson@apple.com>
3816
3817         Reviewed by Darin.
3818
3819         * css/CSSComputedStyleDeclaration.cpp:
3820         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3821         Move FIXME comment here.
3822         
3823         * page/DOMWindow.cpp:
3824         (WebCore::DOMWindow::getComputedStyle):
3825         Don't do a null check on the renderer here. Everything's handled by 
3826         CSSComputedStyleDeclaration anyway.
3827
3828 2006-06-27  Justin Garcia  <justin.garcia@apple.com>
3829
3830         Reviewed by darin
3831
3832         * rendering/RenderContainer.cpp: Fixed #include formatting.
3833
3834 2006-06-27  Justin Garcia  <justin.garcia@apple.com>
3835
3836         Reviewed by levi
3837         
3838         <rdar://problem/4599735> Clicking out of a table at the extremes of an editable document doesn't appear to work
3839
3840         * rendering/RenderBlock.cpp:
3841         (WebCore::RenderBlock::positionForCoordinates): In the fall through case,
3842         where we can't find a child block that contains (x, y), pass to RenderFlow
3843         instead of the last visible child block.
3844         * rendering/RenderContainer.cpp:
3845         (WebCore::RenderContainer::positionForCoordinates): Don't pass to the closest 
3846         child renderer if this is a table and (x, y) is outside the table.  Return
3847         a VisiblePosition before or after the table.
3848         Fixed the code that finds the closest child renderer.
3849
3850 2006-06-27  David Hyatt  <hyatt@apple.com>
3851
3852         Preserve entity text in view source mode.  This patch doesn't highlight the
3853         the entities yet, but it at least prevents their resolution and removal.
3854
3855         Reviewed by darin
3856
3857         * WebCore.xcodeproj/project.pbxproj:
3858         * html/HTMLTokenizer.cpp:
3859         (WebCore::HTMLTokenizer::parseEntity):
3860
3861 2006-06-27  Anders Carlsson  <acarlsson@apple.com>
3862
3863         Reviewed by Geoff.
3864
3865         http://bugzilla.opendarwin.org/show_bug.cgi?id=9623
3866         REGRESSION: getComputedStyle should do a relayout
3867         
3868         * page/DOMWindow.cpp:
3869         (WebCore::DOMWindow::getComputedStyle):
3870         Do a relayout.
3871
3872 2006-06-27  Maciej Stachowiak  <mjs@apple.com>
3873
3874         Reviewed by Adele
3875
3876         - fixed <rdar://problem/4550473> Reproducible hang on www.digg.com
3877         
3878         * dom/NodeList.cpp:
3879         (WebCore::NodeList::recursiveItem): Make NodeList caching also
3880         work for backwards iteration - if the requested index is before
3881         the last cached, but closer to it than to the start of the list,
3882         then search backwards from there.
3883         (WebCore::NodeList::itemForwardsFromCurrent): Split this out as a
3884         helper method.
3885         (WebCore::NodeList::itemBackwardsFromCurrent): New helper, similar
3886         to the above.
3887         * dom/NodeList.h:
3888
3889 2006-06-27  Brady Eidson  <beidson@apple.com>
3890
3891         Reviewed by Levi
3892
3893         Some SQLDatabase cleanup (style stuff) and enhancements
3894
3895         * icon/SQLDatabase.cpp:
3896         (SQLDatabase::open):
3897         (SQLDatabase::executeCommand):
3898         (SQLDatabase::returnsAtLeastOneResult):  Accessor to see if this query returns results
3899         (SQLDatabase::lastInsertRowID):  Accessor for the rowid of the last insert
3900         * icon/SQLDatabase.h:
3901         (WebCore::SQLStatement::prepareAndStep):
3902         * icon/SQLStatement.cpp:
3903         (WebCore::SQLStatement::bindInt64):
3904         -All of the following used to require the user to manually prepare and step a statement
3905         before asking for the result.  Now it will prepare and step itself so you can use a temporary
3906         object to get a quick result
3907         (WebCore::SQLStatement::getColumnName):
3908         (WebCore::SQLStatement::getColumnName16):
3909         (WebCore::SQLStatement::getColumnText):
3910         (WebCore::SQLStatement::getColumnText16):
3911         (WebCore::SQLStatement::getColumnDouble):
3912         (WebCore::SQLStatement::getColumnInt):
3913         (WebCore::SQLStatement::getColumnInt64):
3914         (WebCore::SQLStatement::getColumnBlobAsVector):
3915         (WebCore::SQLStatement::getColumnBlob):
3916
3917 2006-06-27  Ada Chan <adachan@apple.com>
3918
3919         Reviewed by sfalken.
3920
3921         Fixed build.
3922
3923         * WebCore.vcproj/WebCore/WebCore.vcproj:
3924
3925 2006-06-27  Beth Dakin  <bdakin@apple.com>
3926
3927         Reviewed by Hyatt.
3928
3929         Fix for <rdar://problem/4602635> Media queries must be extended to 
3930         address CSS pixel scaling factor
3931
3932         * css/MediaFeatureNames.h: Add -webkit-device-pixel-ratio, -webkit-
3933         min-device-pixel-ratio, and -webkit-max-device-pixel-ratio to the 
3934         list of feature names.
3935         * css/MediaQueryEvaluator.cpp:
3936         (WebCore::cmpvalue): Added a version of cmpvalue that compares 
3937         floats.
3938         (WebCore::device_pixel_ratioMediaFeatureEval):
3939         (WebCore::min_device_pixel_ratioMediaFeatureEval):
3940         (WebCore::max_device_pixel_ratioMediaFeatureEval):
3941
3942 2006-06-27  Darin Adler  <darin@apple.com>
3943
3944         Reviewed by Geoff.
3945
3946         - finish with http://bugzilla.opendarwin.org/show_bug.cgi?id=9606
3947           REGRESSION: some callers are still using clientX/Y to get pageX/Y
3948
3949         * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::userResize):
3950         Change to use pageX/Y, but this really doesn't matter since framesets
3951         can't be scrolled -- it's the frames that are scrolled. So this change
3952         has no user-visible effect, but it's still better this way.
3953
3954 2006-06-27  Darin Adler  <darin@apple.com>
3955
3956         Reviewed by Geoff.
3957
3958         - fix 2/3 of http://bugzilla.opendarwin.org/show_bug.cgi?id=9606
3959           REGRESSION: some callers are still using clientX/Y to get pageX/Y
3960
3961         Test: fast/events/anchor-image-scrolled-x-y.html
3962         Test: fast/events/input-image-scrolled-x-y.html
3963
3964         * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::defaultEventHandler): Use pageX/Y.
3965         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler): Ditto.
3966
3967 2006-06-27  Brady Eidson  <beidson@apple.com>
3968
3969         Reviewed by Maciej
3970
3971         Added functionality to WebCore::Image to get multiple representations/sizes into TIFF data
3972
3973         * platform/mac/ImageMac.mm:
3974         (WebCore::Image::getTIFFRepresentation):
3975
3976 2006-06-26  David Hyatt  <hyatt@apple.com>
3977
3978         Fix for 9538, support syntax highlighted HTML source.  Lots of loose
3979         ends still (script/style/comments/doctype/entities/accurate whitespace).
3980
3981         Reviewed by darin
3982
3983         * DerivedSources.make:
3984         * WebCore.xcodeproj/project.pbxproj:
3985         * bridge/mac/WebCoreFrameBridge.h:
3986         * bridge/mac/WebCoreFrameBridge.mm:
3987         (-[WebCoreFrameBridge setInViewSourceMode:]):
3988         (-[WebCoreFrameBridge inViewSourceMode]):
3989         * css/cssstyleselector.cpp:
3990         (WebCore::CSSStyleSelector::loadDefaultStyle):
3991         (WebCore::CSSStyleSelector::matchUARules):
3992         * css/cssstyleselector.h:
3993         * css/view-source.css: Added.
3994         * dom/Document.cpp:
3995         (WebCore::Document::implicitClose):
3996         * dom/xml_tokenizer.h:
3997         (WebCore::Tokenizer::Tokenizer):
3998         (WebCore::Tokenizer::~Tokenizer):
3999         (WebCore::Tokenizer::inViewSourceMode):
4000         (WebCore::Tokenizer::setInViewSourceMode):
4001         * html/HTMLAttributeNames.in:
4002         * html/HTMLFrameElement.cpp:
4003         (WebCore::HTMLFrameElement::init):
4004         (WebCore::HTMLFrameElement::parseMappedAttribute):
4005         (WebCore::HTMLFrameElement::attach):
4006         * html/HTMLFrameElement.h:
4007         (WebCore::HTMLFrameElement::viewSourceMode):
4008         * html/HTMLTokenizer.cpp:
4009         (WebCore::HTMLTokenizer::HTMLTokenizer):
4010         (WebCore::HTMLTokenizer::scriptHandler):
4011         (WebCore::HTMLTokenizer::scriptExecution):
4012         (WebCore::HTMLTokenizer::parseTag):
4013         (WebCore::HTMLTokenizer::continueProcessing):
4014         (WebCore::HTMLTokenizer::write):
4015         (WebCore::HTMLTokenizer::timerFired):
4016         (WebCore::HTMLTokenizer::end):
4017         (WebCore::HTMLTokenizer::processToken):
4018         (WebCore::HTMLTokenizer::notifyFinished):
4019         * html/HTMLTokenizer.h:
4020         * html/HTMLViewSourceDocument.cpp: Added.
4021         (WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument):
4022         (WebCore::HTMLViewSourceDocument::createTokenizer):
4023         (WebCore::HTMLViewSourceDocument::addViewSourceToken):
4024         (WebCore::HTMLViewSourceDocument::addViewSourceAttribute):
4025         (WebCore::HTMLViewSourceDocument::addSpanWithClassName):
4026         * html/HTMLViewSourceDocument.h: Added.
4027         * page/Frame.cpp:
4028         (WebCore::Frame::begin):
4029         (WebCore::Frame::inViewSourceMode):
4030         (WebCore::Frame::setInViewSourceMode):
4031         * page/Frame.h:
4032         * page/FramePrivate.h:
4033         (WebCore::FramePrivate::FramePrivate):
4034         * rendering/RenderPartObject.cpp:
4035         (WebCore::RenderPartObject::updateWidget):
4036
4037 2006-06-26  Anders Carlsson  <acarlsson@apple.com>
4038
4039         Reviewed by Darin.
4040
4041         http://bugzilla.opendarwin.org/show_bug.cgi?id=9031
4042         REGRESSION: Crash when closing tabs on newegg.com
4043         
4044         * page/Frame.cpp:
4045         (WebCore::Frame::pageDestroyed):        
4046         * page/Frame.h:
4047         Add new method which is invoked when the frame's page has been destroyed.
4048         Currently this function disassociates the JS Window object with the frame, 
4049         stopping any running JS timers.
4050         
4051         * page/Page.cpp:
4052         (WebCore::Page::~Page):
4053         Call pageDestroyed on all frames.
4054
4055 2006-06-26  Rob Buis  <buis@kde.org>
4056
4057         Reviewed and reworked by Darin.
4058
4059         Code cleanup, calculate clientX/clientY in one central place.
4060
4061         * dom/EventTargetNode.h:
4062         * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::dispatchMouseEvent):
4063         Renamed parameters to pageX/Y since they aren't clientX/Y values.
4064         Removed code to compute clientX/Y (was a bit confused in naming before),
4065         because that's now done inside MouseEvent.
4066
4067         * dom/MouseEvent.h:
4068         * dom/MouseEvent.cpp:
4069         (WebCore::MouseEvent::MouseEvent): Removed clientX/Y parameters.
4070         (WebCore::MouseEvent::initMouseEvent): Added comments about problems I noticed.
4071         (WebCore::MouseEvent::which): Fixed comment that confusingly mentioned KHTML,
4072         when it was talking about the DOM standard.
4073
4074         * dom/MouseRelatedEvent.h:
4075         * dom/MouseRelatedEvent.cpp:
4076         (WebCore::contentsX): Added helper function.
4077         (WebCore::contentsY): Ditto.
4078         (WebCore::MouseRelatedEvent::MouseRelatedEvent): Removed clientX/Y parameter,
4079         and added code to compute clientX/Y based on pageX/Y.
4080         (WebCore::MouseRelatedEvent::receivedTarget): Fixed comments.
4081
4082         * dom/WheelEvent.h:
4083         * dom/WheelEvent.cpp: (WebCore::WheelEvent::WheelEvent): Removed clientX/Y
4084         parameter.
4085
4086         * page/FrameView.cpp: (WebCore::FrameView::dispatchDragEvent): Removed the code
4087         to compute coordinates, and renamed the confusingly named clientPos (which was
4088         a page-relative position) to contentsPos.
4089
4090 2006-06-25  David Carson  <dacarson@gmail.com>
4091
4092         Reviewed and tweaked by Darin.
4093
4094         - http://bugzilla.opendarwin.org/show_bug.cgi?id=9185
4095         REGRESSION: UserID field appears with an incorrect height 
4096         on americanexpresslogin page
4097         - Height and Width attribute only applies to IMAGE and HIDDEN
4098         types.
4099
4100         * dom/NamedMappedAttrMap.h:
4101         (WebCore::NamedMappedAttrMap::getAttributeItem):
4102         Added to static_cast method.
4103
4104         * html/HTMLInputElement.cpp:
4105         (WebCore::HTMLInputElement::setInputType):
4106         Update the style decl if input type has changed.
4107         (WebCore::HTMLInputElement::mapToEntry):
4108         Only Cache height and width if it is an IMAGE or HIDDEN
4109         (WebCore::HTMLInputElement::parseMappedAttribute):
4110         Check type before adding height and width style.
4111         (WebCore::HTMLInputElement::attach):
4112         Remove code for discarding width.
4113
4114         * html/HTMLInputElement.h:
4115         (WebCore::HTMLInputElement::respectHeightAndWidthAttrs):
4116         New method added to report if this input type uses height & width.
4117
4118 2006-06-25  David Kilzer  <ddkilzer@kilzer.net>
4119
4120         Reviewed by Darin.
4121
4122         - http://bugzilla.opendarwin.org/show_bug.cgi?id=9537
4123           REGRESSION: Reproducible crash in WebCore::RenderTextField::textWithHardLineBreaks()
4124
4125         Test: fast/forms/textarea-hard-linewrap-empty.html
4126
4127         * rendering/RenderTextField.cpp:
4128         (WebCore::RenderTextField::textWithHardLineBreaks): Added null check for
4129         m_div->firstChild()->renderer().
4130
4131 2006-06-25  Mitz Pettel  <opendarwin.org@mitzpettel.com>
4132
4133         Reviewed by Darin.
4134
4135         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9388
4136           REGRESSION: outlines don't get erased when removed in some cases
4137
4138         Test: fast/repaint/outline-shrinking.html
4139
4140         * rendering/RenderObject.cpp:
4141         (WebCore::RenderObject::setStyle): Always repaint with the old style if the outline is
4142         becoming narrower, even if we are going to relayout.
4143
4144 2006-06-25  Rob Buis  <buis@kde.org>
4145
4146         Reviewed by Darin.
4147
4148         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8707:
4149         event.clientX and event.clientY should be relative to the viewport, not the canvas
4150
4151         Make sure clientX and clientY take into account the scroll offsets
4152         of the view.
4153
4154         * dom/EventTargetNode.cpp:
4155         (WebCore::EventTargetNode::dispatchMouseEvent):
4156         * dom/MouseEvent.cpp:
4157         (WebCore::MouseEvent::MouseEvent):
4158         * dom/MouseEvent.h:
4159         * dom/MouseRelatedEvent.cpp:
4160         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
4161         (WebCore::MouseRelatedEvent::initCoordinates):
4162         * dom/MouseRelatedEvent.h:
4163         * dom/WheelEvent.cpp:
4164         (WebCore::WheelEvent::WheelEvent):
4165         * page/FrameView.cpp:
4166         (WebCore::FrameView::dispatchDragEvent):
4167
4168 2006-06-25  Timothy Hatcher  <timothy@apple.com>
4169
4170         Reviewed by Darin.
4171
4172         Bug 9574: Drosera should show inline scripts within the original HTML
4173   &nbs