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