647be93d131a1c4ec29f0b06da916f9288dcfe84
[WebKit-https.git] / WebCore / ChangeLog
1 2006-04-25  Maciej Stachowiak  <mjs@apple.com>
2
3         Reviewed by Adele.
4
5         - don't have a fini method, since trying to call it will actually call the subclass method
6         and mess up the bridge count.
7
8         * bridge/mac/WebCoreFrameBridge.mm:
9         (-[WebCoreFrameBridge dealloc]):
10         (-[WebCoreFrameBridge finalize]):
11
12 2006-04-25  Steve Falkenburg  <sfalkenburg@apple.com>
13
14         Reviewed by eseidel.
15
16         No test case needed
17
18         * platform/win/TemporaryLinkStubs.cpp:
19         (KWQFileButton::setFrameGeometry):
20
21 2006-04-25  Eric Seidel  <eseidel@apple.com>
22
23         Reviewed by mjs.
24
25         Fix reproducible crash in html parser code.
26         http://bugzilla.opendarwin.org/show_bug.cgi?id=7137
27
28         Test: fast/parser/remove-current-node-parent.html
29
30         * html/HTMLParser.cpp:
31         (WebCore::HTMLParser::handleError):
32
33 2006-04-25  Maciej Stachowiak  <mjs@apple.com>
34
35         Reviewed by Eric.
36
37         - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=8575
38         New KWQFileButton leaks reported by buildbot
39
40         * kwq/KWQFileButton.mm:
41         (KWQFileButton::KWQFileButton): Add a missing release
42
43 2006-04-24  David Hyatt  <hyatt@apple.com>
44
45         Fix for 8336, focus ring redrawing on top of itself.  Make sure
46         not to include empty rects when doing the focus ring drawing, since
47         that results in a draw with no clip set.
48
49         Reviewed by adele
50
51         * platform/mac/GraphicsContextMac.mm:
52         (WebCore::GraphicsContext::drawFocusRing):
53
54 2006-04-24  Eric Seidel  <eseidel@apple.com>
55
56         Reviewed by ggaren.
57
58         Fix for 5th worst unresolved crasher:
59         <rdar://problem/4129744> [REGRESSION]CrashTracer: ..400 crashes at com.apple.WebCore: DOM::NodeImpl::createRendererIfNeeded + 44
60
61         Test: fast/dom/remove-style-element.html
62
63         * dom/ContainerNode.cpp:
64         (WebCore::ContainerNode::removeChildren):
65
66 2006-04-24  Eric Seidel  <eseidel@apple.com>
67
68         Reviewed by mjs.
69
70         Speculative fix for our 7th worst crasher.
71         Also added ASSERTs to help us better understand the issue.
72         <rdar://problem/4153404> CrashTracer: 2412 crashes in Safari at com.apple.WebCore: khtml::RenderStyle::RenderStyle[unified] + 44
73
74         * dom/Document.cpp:
75         (WebCore::Document::recalcStyle):
76         (WebCore::Document::setInPageCache):
77         * dom/Document.h:
78         * dom/Element.cpp:
79         (WebCore::Element::recalcStyle):
80
81 2006-04-24  Adele Peterson  <adele@apple.com>
82
83         Reviewed by Hyatt.
84
85         Fix for <rdar://problem/4503438> REGRESSION (NativeTextField): Can't insert caret when 
86         selection is active in field (Business/Unit)
87
88         * css/html4.css: Added -webkit-user-select:text for input elements.
89
90 2006-04-24  Maciej Stachowiak  <mjs@apple.com>
91
92         Build fix:
93         
94         - move some prematurely moved code back
95
96         * bridge/mac/WebCoreFrameBridge.h:
97         * bridge/mac/WebCoreFrameBridge.mm:
98         (-[WebCoreFrameBridge fini]):
99
100 2006-04-24  Maciej Stachowiak  <mjs@apple.com>
101
102         Reviewed by Darin.
103
104         - move more code from WebFrameBridge to WebCoreFrameBridge
105
106         * bridge/mac/WebCoreFrameBridge.h:
107         * bridge/mac/WebCoreFrameBridge.mm:
108         (-[WebCoreFrameBridge domain]):
109         (-[WebCoreFrameBridge canTargetLoadInFrame:]):
110         (-[WebCoreFrameBridge fini]):
111         (-[WebCoreFrameBridge dealloc]):
112         (-[WebCoreFrameBridge finalize]):
113         (_getPreSmartSet):
114         (_getPostSmartSet):
115         (-[WebCoreFrameBridge isCharacterSmartReplaceExempt:isPreviousCharacter:]):
116         (-[WebCoreFrameBridge _retrieveKeyboardUIModeFromPreferences:]):
117         (-[WebCoreFrameBridge keyboardUIMode]):
118
119 2006-04-24  Adele Peterson  <adele@apple.com>
120
121         Reviewed by Tim O.
122
123         Fix to send textFieldDidBeginEditing on the first editing change instead of on focus.
124         This matches our old behavior.
125
126         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::dispatchFocusEvent):
127         * rendering/RenderTextField.cpp: (WebCore::RenderTextField::subtreeHasChanged):
128
129 2006-04-24  Beth Dakin  <bdakin@apple.com>
130
131         Reviewed by Eric.
132
133         Fix for <rdar://problem/4513383> REGRESSION: Crash in 
134         WebCore::shouldEmitTabBeforeNode() when iterating through document 
135         text
136
137         * editing/TextIterator.cpp:
138         (WebCore::shouldEmitTabBeforeNode): Need to nil-check the renderer.
139
140 2006-04-23  Geoffrey Garen  <ggaren@apple.com>
141
142         Reviewed by Maciej.
143
144         * bindings/scripts/CodeGeneratorJS.pm: Removed confusing 'JS' prefix
145         from string descriptions of DOM prototypes, so the prototype for, e.g.,
146         Document serializes as 'Document,' not 'JSDocument.'
147
148 2006-04-23  Geoffrey Garen  <ggaren@apple.com>
149
150         Reviewed by Darin.
151
152         - Took the larger snippets of C++ in the code generator and broke
153         them into HERE documents in the hopes of improving readability.
154         
155         * bindings/scripts/CodeGeneratorJS.pm: I indented variable names
156         level with their corresponding HERE documents to clearly
157         "sandwich" the HERE documents between opening and closing EOF
158         statements.
159
160 2006-04-23  Maciej Stachowiak  <mjs@apple.com>
161
162         Reviewed by Darin.
163         
164         - push WebFileButton and WebStringTruncator code down to WebCore
165         http://bugzilla.opendarwin.org/show_bug.cgi?id=8552
166
167         * WebCore.exp:
168         * WebCore.xcodeproj/project.pbxproj:
169         * bridge/mac/WebCoreFrameBridge.h:
170         * bridge/mac/WebCoreStringTruncator.h: Added.
171         * bridge/mac/WebCoreStringTruncator.mm: Added.
172         (stringWidth):
173         (truncateString):
174         (+[WebCoreStringTruncator widthOfString:font:]):
175         * bridge/mac/WebCoreViewFactory.h:
176         * kwq/KWQFileButton.h:
177         * kwq/KWQFileButton.mm:
178         (-[WebFileChooserButton initWithWidget::]):
179         (-[WebCoreFileButton positionButton]):
180         (-[WebCoreFileButton initWithWidget:]):
181         (-[WebCoreFileButton initWithFrame:]):
182         (-[WebCoreFileButton dealloc]):
183         (-[WebCoreFileButton isFlipped]):
184         (-[WebCoreFileButton drawRect:]):
185         (-[WebCoreFileButton updateLabel]):
186         (-[WebCoreFileButton setFilename:]):
187         (-[WebCoreFileButton filename]):
188         (-[WebCoreFileButton setFrameSize:]):
189         (-[WebCoreFileButton bestVisualFrameSizeForCharacterCount:]):
190         (-[WebCoreFileButton visualFrame]):
191         (-[WebCoreFileButton setVisualFrame:]):
192         (-[WebCoreFileButton baseline]):
193         (-[WebCoreFileButton beginSheet]):
194         (-[WebCoreFileButton chooseFilename:]):
195         (-[WebCoreFileButton cancel]):
196         (-[WebCoreFileButton chooseButtonPressed:]):
197         (-[WebCoreFileButton mouseDown:]):
198         (-[WebCoreFileButton acceptsFirstResponder]):
199         (-[WebCoreFileButton becomeFirstResponder]):
200         (-[WebCoreFileButton nextKeyView]):
201         (-[WebCoreFileButton previousKeyView]):
202         (-[WebCoreFileButton nextValidKeyView]):
203         (-[WebCoreFileButton previousValidKeyView]):
204         (-[WebCoreFileButton performClick]):
205         (-[WebFileChooserButton initWithWidget:]):
206         (-[WebFileChooserButton nextValidKeyView]):
207         (-[WebFileChooserButton previousValidKeyView]):
208         (-[WebFileChooserButton resignFirstResponder]):
209         (KWQFileButton::KWQFileButton):
210         (KWQFileButton::setFilename):
211         (KWQFileButton::click):
212         (KWQFileButton::sizeForCharacterWidth):
213         (KWQFileButton::frameGeometry):
214         (KWQFileButton::setFrameGeometry):
215         (KWQFileButton::baselinePosition):
216         (KWQFileButton::filenameChanged):
217
218 2006-04-23  Maciej Stachowiak  <mjs@apple.com>
219
220         Reviewed by Eric.
221
222         - remove WebCoreCookieAdapter, instead make mac implementation of
223         CookieJar use Foundation directly.
224
225         * WebCore.exp:
226         * WebCore.xcodeproj/project.pbxproj:
227         * platform/mac/CookieJar.mm:
228         (WebCore::cookies):
229         (WebCore::setCookies):
230         (WebCore::cookiesEnabled):
231         * platform/mac/WebCoreCookieAdapter.h: Removed.
232         * platform/mac/WebCoreCookieAdapter.m: Removed.
233
234 2006-04-21  Rob Buis  <buis@kde.org>
235
236         Reviewed by hyatt.  Landed by eseidel.
237
238         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8170:
239         SVG CSS property values with extra items do not get treated
240         as invalid (they should)
241
242         Fixes the handling of invalid svg css properties similar
243         to how invalid html css properties are handled, ie. discard
244         the property if there are more values in the value list than
245         expected.
246
247         Test: svg/custom/invalid-css.svg
248
249         * ksvg2/css/SVGCSSParser.cpp:
250         (WebCore::CSSParser::parseSVGValue):
251
252 2006-04-23  Michael Emmel  <mike.emmel@gmail.com>
253
254         Reviewed by mjs.  Landed by eseidel.
255
256         http://bugzilla.opendarwin.org/show_bug.cgi?id=8517
257         No test necessary, no functional change.
258
259         * DerivedSources.make: use VPATH more consistently.
260
261 2006-04-23  Jon Shier  <jshier@iastate.edu>
262         
263         Reviewed by ggaren.  Landed by eseidel.
264         
265         - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8511
266         onerror JS property does not register listener properly
267
268         Test: fast/dom/onerror-img.html       
269  
270         * bindings/js/kjs_dom.cpp:  
271         (KJS::DOMEventTargetNode::getValueProperty): changed khtmlErrorEvent to errorEvent.
272         (KJS::DOMEventTargetNode::putValueProperty): ditto.
273         * bindings/js/kjs_window.cpp:
274         (KJS::Window::getValueProperty): ditto.
275         (KJS::Window::put):
276         * dom/EventNames.h: Removed khtmlError macro.
277         
278 2006-04-23  Eric Seidel  <eseidel@apple.com>
279
280         Reviewed by hyatt.
281
282         Reproducible crasher with <li value=1234567890 type=A>
283         http://bugzilla.opendarwin.org/show_bug.cgi?id=8542
284
285         Fixed our alphabetical list generation to match WinIE (not FireFox)
286         Previously our alphabetical lists were completely wrong past 26 items.
287
288         Tests:
289         * fast/lists/alpha-list-wrap.html
290         * fast/lists/li-style-alpha-huge-value-crash.html
291
292         * rendering/render_list.cpp:
293         (WebCore::toLetterString):
294         (WebCore::toHebrew):
295         (WebCore::RenderListMarker::calcMinMaxWidth):
296
297 2006-04-22  Geoffrey Garen  <ggaren@apple.com>
298
299         Reviewed by Darin.
300
301         - Finished autogeneration of Element
302
303         * bindings/js/kjs_dom.cpp: Removed DOMElement class
304         * bindings/js/kjs_dom.h: ditto
305         * bindings/scripts/CodeGeneratorJS.pm: added support for special
306         attribute lookup that elements do
307         * dom/Element.idl: added new attribute, 
308         "IncludeAttributesInPropertyLookup," which tells the code generator 
309         to include HTML element attributes in property lookup
310
311 2006-04-22  Michael Emmel  <mike.emmel@gmail.com>
312
313         Reviewed by Maciej.
314
315         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8529
316           Extra Qaulification in header
317         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8530
318           Missing assert.h include
319
320         * rendering/RenderObject.h: Removed erroneous RenderObject::
321         prefix from a member function name.
322         * rendering/RenderText.h: Removed erroneous RenderText::
323         prefix from a member function name.
324
325         * platform/Arena.cpp: Added <assert.h> to list of includes.
326         * platform/KURL.cpp: Ditto.
327         * platform/StringImpl.cpp: Ditto.
328         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: Ditto.
329         * platform/image-decoders/png/PNGImageDecoder.cpp: Ditto.
330
331 2006-04-22  Darin Adler  <darin@apple.com>
332
333         * doc: Added.
334
335 2006-04-22  Maciej Stachowiak  <mjs@apple.com>
336
337         Reviewed by Eric.
338
339         - push down a bunch of WebCoreFrameBridge code to C++ (plus some reformatting)
340
341         * bridge/mac/WebCoreFrameBridge.mm:
342         (-[WebCoreFrameBridge isDescendantOfFrame:]):
343         (-[WebCoreFrameBridge traverseNextFrameStayWithin:]):
344         (-[WebCoreFrameBridge nextFrameWithWrap:]):
345         (-[WebCoreFrameBridge previousFrameWithWrap:]):
346         (+[WebCoreFrameBridge bridgeForDOMDocument:]):
347         (-[WebCoreFrameBridge parent]):
348         (-[WebCoreFrameBridge addData:]):
349         (-[WebCoreFrameBridge didNotOpenURL:pageCache:]):
350         (-[WebCoreFrameBridge restoreDocumentState]):
351         (-[WebCoreFrameBridge _stringWithDocumentTypeStringAndMarkupString:]):
352         (-[WebCoreFrameBridge nodesFromList:]):
353         (-[WebCoreFrameBridge markupStringFromNode:nodes:]):
354         (-[WebCoreFrameBridge markupStringFromRange:nodes:]):
355         (-[WebCoreFrameBridge rangeByExpandingSelectionWithGranularity:]):
356         (-[WebCoreFrameBridge rangeByAlteringCurrentSelection:direction:granularity:]):
357         (-[WebCoreFrameBridge alterCurrentSelection:direction:granularity:]):
358         (-[WebCoreFrameBridge rangeByAlteringCurrentSelection:verticalDistance:]):
359         (-[WebCoreFrameBridge alterCurrentSelection:verticalDistance:]):
360         (-[WebCoreFrameBridge replaceMarkedTextWithText:]):
361         (-[WebCoreFrameBridge replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
362         (-[WebCoreFrameBridge increaseSelectionListLevel]):
363         (-[WebCoreFrameBridge decreaseSelectionListLevel]):
364         (-[WebCoreFrameBridge insertLineBreak]):
365         (-[WebCoreFrameBridge insertParagraphSeparator]):
366         (-[WebCoreFrameBridge insertParagraphSeparatorInQuotedContent]):
367         (-[WebCoreFrameBridge insertText:selectInsertedText:]):
368         (-[WebCoreFrameBridge deleteSelectionWithSmartDelete:]):
369         (-[WebCoreFrameBridge ensureSelectionVisible]):
370         (-[WebCoreFrameBridge RenderObject::nodeInfoAtPoint:allowShadowContent:]):
371         * page/Frame.cpp:
372         (WebCore::Frame::nodeInfoAtPoint):
373         (WebCore::Frame::hasSelection):
374         (WebCore::Frame::documentTypeString):
375         * page/Frame.h:
376         * page/FrameTree.cpp:
377         (WebCore::FrameTree::traverseNextWithWrap):
378         (WebCore::FrameTree::traversePreviousWithWrap):
379         (WebCore::FrameTree::deepLastChild):
380         * page/FrameTree.h:
381
382 2006-04-22  Beth Dakin  <bdakin@apple.com>
383
384         Reviewed by Hyatt.
385
386         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6141 
387         DOMCSSPrimitiveValue is always returning values in pixels when 
388         using getComputedStyle:
389
390         getFloatValue() took a unit type as a parameter, ignored it, and 
391         returned m_value.num. This patch writes a second version of the 
392         function that actually converts m_value.num to the specified unites 
393         before returning it. Where a conversion is not required, I removed 
394         the unit type from the caller so that it would go directly to the 
395         inline version of the function.
396
397         * css/css_valueimpl.cpp:
398         (WebCore::CSSPrimitiveValue::computeLengthFloat): Remove type 
399         parameter since a conversion is not needed.
400         (WebCore::scaleFactorForConversion): Helper function for 
401         conversion.
402         (WebCore::CSSPrimitiveValue::getFloatValue): This version of 
403         getFloatValue() takes a unit type parameter and converts 
404         m_value.num.
405         * css/css_valueimpl.h:
406         (WebCore::CSSPrimitiveValue::getFloatValue): This version does not 
407         take a parameter and just returns m_value.num.
408         * css/cssparser.cpp:
409         (WebCore::BorderImageParseContext::commitBorderImage): Remove type 
410         parameter since a conversion is not needed.
411         * css/cssstyleselector.cpp:
412         (WebCore::convertToLength): Same.
413         (WebCore::CSSStyleSelector::applyProperty): Same.
414         (WebCore::CSSStyleSelector::mapBackgroundSize): Same.
415         (WebCore::CSSStyleSelector::mapBackgroundXPosition): Same.
416         (WebCore::CSSStyleSelector::mapBackgroundYPosition): Same.
417         * editing/ApplyStyleCommand.cpp:
418         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange): Same.
419         * ksvg2/css/SVGCSSStyleSelector.cpp:
420         (WebCore::CSSStyleSelector::applySVGProperty): Same.
421         * ksvg2/misc/KCanvasRenderingStyle.cpp:
422         (WebCore::KSVGPainterFactory::cssPrimitiveToLength): Same.
423
424 2006-04-21  Geoffrey Garen  <ggaren@apple.com>
425
426         Reviewed by John.
427
428         - Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=8509
429         javascript:document.importNode(null)
430         
431         * dom/Document.cpp:
432         (WebCore::Document::importNode): Throw an error if the node is null.
433         This happens when the object provided in the JavaScript call is not
434         a node.
435         (WebCore::Document::adoptNode): Set the DOM exception code in all error
436         cases instead of just a few, because that's what the spec requires.
437
438 2006-04-21  Geoffrey Garen  <ggaren@apple.com>
439
440         Reviewed by John.
441
442         - Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=8510
443         submit event doesn't bubble - it's supposed to.
444
445         * html/HTMLElement.cpp:
446         (WebCore::HTMLElement::parseMappedAttribute): Added recognition for the
447         onsubmit attribute, so elements can use it
448         * html/HTMLFormElement.cpp:
449         (WebCore::HTMLFormElement::prepareSubmit): Changed bubbling attribute
450         to 'true'
451
452 2006-04-21  Geoffrey Garen  <ggaren@apple.com>
453
454         Reviewed by TimO.
455
456         - Fixed: error event does not bubble
457
458         I discovered this bug while working on the "submit event does not
459         bubble" bug. The DOM spec says the event should bubble, and that's how
460         it works in Firefox.
461
462         The DOM Spec also says that the error event is "valid for
463         OBJECT elements, BODY elements, and FRAMESET element." But it doesn't
464         say "valid ONLY." Firefox supports it on all elements and web
465         developers tend to think it will work for things like <img> and
466         <script>, so I went whole hog here.
467
468         * html/HTMLElement.cpp:
469         (WebCore::HTMLElement::parseMappedAttribute): Make onerror a mapped
470         attribute for all elements, so containing elements can register for
471         the event.
472         * html/HTMLTokenizer.cpp:
473         (WebCore::HTMLTokenizer::notifyFinished): make onerror bubble
474         * html/html_headimpl.cpp:
475         (WebCore::HTMLScriptElement::parseMappedAttribute): Remove special
476         case for onerror because HTMLElement will take care of it
477         (WebCore::HTMLScriptElement::notifyFinished): make onerror bubble
478         * html/html_imageimpl.cpp:
479         (WebCore::HTMLImageElement::parseMappedAttribute): Remove special
480         case for onerror because HTMLElement will take care of it
481
482 2006-04-21  Adele Peterson  <adele@apple.com>
483
484         Test for: http://bugzilla.opendarwin.org/show_bug.cgi?id=8181
485         REGRESSION: After tabbing in page's field, attempting to tab from Google toolbar search to page fails on first try
486
487         * manual-tests/tabbing-input-google.html: Added.
488
489 2006-04-21  Kevin M. Ollivier  <kevino@theolliviers.com>
490
491         Reviewed by Darin.
492
493         - http://bugzilla.opendarwin.org/show_bug.cgi?id=8507
494           Compilation fixes for building on gcc 4.0.2, and without precomp headers
495
496         * platform/Cursor.h: Created a fallback case that typedefs PlatformCursor
497         to void * if it isn't defined to anything else. (Useful to help get new ports
498         initially compiling.)
499         
500         * bindings/js/kjs_window.cpp:
501         * rendering/RenderTextField.cpp:
502         * rendering/RenderBox.cpp:
503         Add missing headers to resolve issues when compiling without precompiled
504         headers.
505         
506         * rendering/RenderText.h: Declare the InlineTextBox class before 
507         friend declaration to resolve compilation issues with gcc 4.0.2.
508         
509 2006-04-21  Adele Peterson  <adele@apple.com>
510
511         Reviewed by Darin.
512
513         Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=8213
514         REGRESSION: Can't tab out of text field if iframe comes after it
515
516         Test: fast/forms/tabbing-input-iframe.html
517
518         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::nextKeyViewInFrame):
519           If the next focusable node is a RenderWidget without a view, then continue in the loop.  We used to break out in this case. 
520           I also made some formatting changes and reorganized the function to make it easier to read.
521
522 2006-04-21  Adele Peterson  <adele@apple.com>
523
524         Reviewed by Beth.
525
526         Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=8496
527         REGRESSION: Dragging to select text around a text field causes the text field to scroll.
528
529         Test: manual-tests/text-field-autoscroll.html
530
531         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::handleMouseMoveEvent): Start the frame's autoscroll timer
532         even when we're calling over the bridge to handle the autoscroll.
533         * page/Frame.cpp: (WebCore::Frame::stopAutoscrollTimer): Clear out pointer to layer.
534
535 2006-04-21  Geoffrey Garen  <ggaren@apple.com>
536
537         - And again.
538
539         * WebCore.vcproj/WebCore/WebCore.vcproj:
540
541 2006-04-21  Geoffrey Garen  <ggaren@apple.com>
542
543         - Futile attempt to fix Windows build.
544         
545         * WebCore.vcproj/WebCore/WebCore.vcproj:
546
547 2006-04-20  Geoffrey Garen  <ggaren@apple.com>
548
549         Reviewed by Maciej.
550
551         - Added autogeneration of JS bindings for CSSRule, CSSValue,
552         Event, and NodeFilter.  
553
554         - Made related prototype objects hold the relevant constants, to
555         match Mozilla and the DOM 2 spec. (Previously, only the related
556         constructor objects held those constants, in accordance with the
557         DOM 3 spec.)
558
559         - Fixed up remaining Windows build issues.
560
561         * DerivedSources.make: Added new autogenerated files
562         * WebCore.xcodeproj/project.pbxproj: ditto
563         * bindings/js/kjs_css.cpp:
564         (KJS::DOMCSSRule::classInfo):
565         (KJS::DOMCSSRule::getOwnPropertySlot): scope call to classInfo()
566         because it's virtual and DOMCSSRule has a derrived class now.
567         (KJS::DOMCSSRule::put): ditto
568         (KJS::DOMCSSRuleFunc::callAsFunction):
569         (KJS::toJS):
570         * bindings/js/kjs_css.h:
571         * bindings/js/kjs_events.cpp:
572         (KJS::toJS):
573         * bindings/js/kjs_events.h:
574         * bindings/js/kjs_html.cpp:
575         (KJS::OptionConstructorImp::OptionConstructorImp):
576         * bindings/js/kjs_traversal.cpp:
577         (KJS::toJS):
578         * bindings/js/kjs_traversal.h:
579         * bindings/js/kjs_window.cpp: 
580         (KJS::Window::getValueProperty): added CSSValue global object
581         * bindings/js/kjs_window.h:
582         (KJS::Window::):
583         * bindings/scripts/CodeGeneratorJS.pm: Changed generator to write
584         constants to prototype objects (previously only wrote constants to
585         constructor objects)
586         * css/CSSPrimitiveValue.idl: Removed LegacyParent since CSSValue now
587         exists in IDL
588         * css/CSSRule.idl: Added.
589         * css/CSSValue.idl: Added.
590         * css/css_ruleimpl.h:
591         (WebCore::CSSRule::):
592         * css/css_valueimpl.h:
593         * dom/Event.idl: Added.
594         * dom/MutationEvent.idl: Removed LegacyParent since Event now exists
595         in IDL
596         * dom/NodeFilter.idl: Added.
597         * dom/UIEvent.idl: Removed LegacyParent since event now exists in IDL
598         * dom/dom2_eventsimpl.h:
599         (WebCore::Event::):
600
601 2006-04-21  Darin Adler  <darin@apple.com>
602
603         - one more attempt to fix Windows build
604
605         * platform/cairo/GraphicsContextCairo.cpp:
606         (WebCore::GraphicsContext::fillRect): Update to use Color and match
607         the similar function on GraphicsContextMac.
608
609 2006-04-21  Beth Dakin  <bdakin@apple.com>
610
611         Reviewed by Hyatt.
612
613         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8495 
614         REGRESSION: Sidebar on cnn.com is hosed
615
616         * platform/mac/ImageMac.mm:
617         (WebCore::Image::drawTiled): Use the size of the destination rect, 
618         not the oneTileRect in the no-pattern case.
619         * rendering/RenderBox.cpp:
620         (WebCore::RenderBox::paintBackgroundExtended): Initialize 
621         scaledWidth and scaledHeight to the appropriate value (was wrong in 
622         scroll case), adjust position at appropriate times, and take out 
623         no-repeat clause for now since we don't have enough test cases yet 
624         to be sure we won't cause massive regressions. 
625
626 2006-04-21  Darin Adler  <darin@apple.com>
627
628         - attempt to fix Windows build after my last check-in
629
630         * WebCore.vcproj/Image Viewer/ImageView.cpp: Changed calls to use the
631         new IntRect-based API.
632
633         * html/CanvasPattern.cpp: (WebCore::CanvasPattern::CanvasPattern):
634         Put appropriate ifdefs around the m_platformImage initializer.
635
636         * page/Frame.cpp: Make Frame::adjustPageHeight Mac-OS-X-only for now
637         since it's used for printing and we don't have printing going on any
638         other platforms yet.
639
640         * platform/cairo/GraphicsContextCairo.cpp: Take out constructor that
641         takes only the "for printing" boolean for now.
642
643         * platform/cairo/ImageCairo.cpp: Include the GraphicsContext.h header.
644
645         * platform/win/TemporaryLinkStubs.cpp: (GraphicsContext::setShadow):
646         Fix up this stub and remove the GraphicsContext empty constructor stub.
647
648 2006-04-21  Darin Adler  <darin@apple.com>
649
650         - fix build
651
652         * WebCore.xcodeproj/project.pbxproj: Replaced absolute path on my system
653         with a build-result-relative path; also removed some source files from the
654         list of resources to install!
655
656 2006-04-20  Darin Adler  <darin@apple.com>
657
658         Reviewed by Hyatt.
659
660         - make <canvas> element and related API behave more like the draft of
661           the WhatWG Web Application specification, checking parameter validity
662           and raising exceptions
663         - changed HTMLCanvasElement bindings to be auto-generated, fixing all
664           issues so we can generate bindings for classes drived from HTMLElement
665         - change GraphicsContext API to use IntRect/Point/Size in more cases
666         - change GraphicsContext so it is closer to truly wrapping a graphics
667           context rather than representing the current NSGraphicsContext; there
668           are still some things like text and rectangle fills that are tied to
669           NSGraphicsContext, but we're most of the way there
670         - removed Brush class since it just amounted to a color, using an RGBA32
671           instead where we used to use a Brush
672
673         * DerivedSources.make: Added JSHTMLCanvasElement.h.
674         * WebCore.xcodeproj/project.pbxproj: Added new files.
675
676         * bindings/js/JSCanvasRenderingContext2DBase.h: Added toJS.
677         * bindings/js/JSCanvasRenderingContext2DBase.cpp:
678         (WebCore::JSCanvasRenderingContext2DBaseProtoFunc::callAsFunction):
679         Added exception code handling for strokeRect, drawImage, and createPattern.
680         Added version of createPattern that takes a canvas. Use TYPE_MISMATCH_ERR
681         instead of JavaScript TypeError when parameter is neither an image or canvas
682         element. Adapt for new HTMLCanvasElement binding.
683         (WebCore::toJS): Added. Converts context object to JS wrapper.
684
685         * bindings/js/JSHTMLElementWrapperFactory.h: Added.
686         * bindings/js/JSHTMLElementWrapperFactory.cpp: Added. Creates a JavaScript
687         wrapper for an arbitrary HTML element. Better than putting this all in the
688         DOM node class toJS function.
689
690         * bindings/js/JSXMLSerializer.cpp: Tweaked to make it build.
691         * bindings/js/kjs_dom.cpp: (KJS::toJS): Changed to call the
692         JSHTMLElementWrapperFactory function createJSWrapper, instead
693         of always creating a JSHTMLElement.
694
695         * bindings/js/kjs_html.h: Removed canvas-related stuff. Added HTMLElement
696         prototype.
697         * bindings/js/kjs_html.cpp:
698         (KJS::JSHTMLElement::classInfo): Removed canvas element.
699         (KJS::JSHTMLElement::accessors): Ditto.
700         (KJS::JSHTMLElementProtoFunc::callAsFunction): Added, to help the auto-binding
701         machiner cope with HTMLElement.
702         (KJS::HTMLElementFunction::callAsFunction): Removed canvas element.
703
704         * bindings/scripts/CodeGeneratorJS.pm: Added types needed for HTMLCanvasElement.
705
706         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::setDisplaysWithFocusAttributes):
707         Changed to create a GraphicsContext with the new constructor that takes
708         a CGContextRef.
709         * bridge/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge drawRect:]):
710         Changed to create a GraphicsContext with the new constructor that takes
711         a NSGraphicsContext.
712         * page/Frame.cpp: (WebCore::Frame::adjustPageHeight): Changed to create a
713         GraphicsContext with the new constructor that takes a CGContextRef.
714
715         * editing/SelectionController.cpp: (WebCore::SelectionController::paintCaret):
716         Eliminated a use of obsolete class Brush.
717
718         * html/CanvasPattern.h:
719         * html/CanvasPattern.cpp:
720         (WebCore::CanvasPattern::parseRepetitionType): Added. Parses a repetition
721         type. Different from the old logic in that it is case-sensitive and rejects
722         anything other than null, empty string, or the four repeat types.
723         (WebCore::CanvasPattern::CanvasPattern): Added constructor that takes
724         a CGImageRef. Changed constructor to take two booleans instead of the repetition
725         type string. It's the caller's responsibility to parse the string.
726         (WebCore::CanvasPattern::~CanvasPattern): Release the CGImage.
727         (WebCore::patternCallback): Handle the CGImage case. Also changed the code
728         to create a GraphicsContext as needed and call the image drawing code with that.
729         (WebCore::CanvasPattern::createPattern): Handle both the image element case and
730         the canvas element case.
731         
732         * html/CanvasRenderingContext2D.h:
733         * html/CanvasRenderingContext2D.cpp:
734         (WebCore::CanvasRenderingContext2D::State::State): Change line cap, line join,
735         and global composite to store enum values instead of strings.
736         (WebCore::CanvasRenderingContext2D::setLineWidth): Do nothing if width is NaN
737         or <= 0.
738         (WebCore::CanvasRenderingContext2D::lineCap): Return a string based on a
739         stored enum, rather than returning a stored string.
740         (WebCore::CanvasRenderingContext2D::setLineCap): Do nothing if the string is
741         not one of the standard line cap types. Also case sensitive and stores enum
742         rather than the string.
743         (WebCore::CanvasRenderingContext2D::lineJoin): Return a string based on a
744         stored enum, rather than returning a stored string.
745         (WebCore::CanvasRenderingContext2D::setLineJoin): Do nothing if the string is
746         not one of the standard line join types. Also case sensitive and stores enum
747         rather than the string.
748         (WebCore::CanvasRenderingContext2D::setMiterLimit): Do nothing if limit is NaN
749         or <= 0.
750         (WebCore::CanvasRenderingContext2D::setGlobalAlpha): Do nothing if alpha is NaN
751         or < 0 or > 1.
752         (WebCore::CanvasRenderingContext2D::globalCompositeOperation): Return a string
753         based on a stored enum, rather than returning a stored string.
754         (WebCore::CanvasRenderingContext2D::setGlobalCompositeOperation): Do nothing if
755         the string is not one of the standard compositing modes. Also case sensitive and
756         stores enum rather than the string.
757         (WebCore::CanvasRenderingContext2D::arcTo): Generate INDEX_SIZE_ERR exception
758         if radius is NaN or <= 0.
759         (WebCore::CanvasRenderingContext2D::arc): Ditto.
760         (WebCore::CanvasRenderingContext2D::rect): Generate INDEX_SIZE_ERR exception
761         if width or height is NaN or <= 0.
762         (WebCore::CanvasRenderingContext2D::clearRect): Ditto.
763         (WebCore::CanvasRenderingContext2D::fillRect): Ditto.
764         (WebCore::CanvasRenderingContext2D::strokeRect): Ditto, same for line width.
765         Changed the case where the line width is not specified to share code with the
766         case where it is.
767         (WebCore::size): Renamed from imageSize, since C++ overloads based on parameter
768         types anyway.
769         (WebCore::CanvasRenderingContext2D::drawImage): Generate INDEX_SIZE_ERR exception
770         if the source rect is not entirely inside the image rect, or if the width or height
771         of either the source or destination rect is NaN or <= 0. Changed image drawing
772         code to be platform-independent for the image element case, but not yet for the
773         canvas case.
774         (WebCore::CanvasRenderingContext2D::drawImageFromRect): Change code to parse the
775         composite operation to use the new code shared with Image.
776         (WebCore::CanvasRenderingContext2D::createPattern): Added code to parse the
777         repetition type separately before creating the pattern. Added an overload for
778         canvas elements.
779         (WebCore::CanvasRenderingContext2D::drawingContext): Changed to return a
780         GraphicsContext*.
781         (WebCore::CanvasRenderingContext2D::platformContext): Added. Now does what
782         drawingContext used to do.
783
784         * html/CanvasRenderingContext2D.idl: Added exception declarations as needed
785         for changes above.
786
787         * html/HTMLCanvasElement.h:
788         * html/HTMLCanvasElement.cpp:
789         (WebCore::HTMLCanvasElement::HTMLCanvasElement): Changed m_drawingContext
790         to be a GraphicsContext instead of a CGContextRef.
791         (WebCore::HTMLCanvasElement::~HTMLCanvasElement): Ditto.
792         (WebCore::HTMLCanvasElement::getContext): Removed special cases for null
793         and empty string. Only give a 2D graphics context if the string is "2d".
794         (WebCore::HTMLCanvasElement::reset): Updated for change to GraphicsContext
795         from CGContextRef.
796         (WebCore::HTMLCanvasElement::paint): Ditto.
797         (WebCore::HTMLCanvasElement::createDrawingContext): Changed to create a
798         GraphicsContext* instead of a CGContextRef.
799         (WebCore::HTMLCanvasElement::drawingContext): Changed to return a
800         GraphicsContext* instead of a CGContextRef.
801         (WebCore::HTMLCanvasElement::createPlatformImage): Updated for changes above.
802
803         * html/HTMLCanvasElement.idl: Added.
804
805         * html/HTMLParser.h:
806         * html/HTMLParser.cpp:
807         (WebCore::HTMLParser::canvasCreateErrorCheck): Added. An attempt to implement the
808         fallback behavior for canvas elements when JavaScript is off.
809         (WebCore::HTMLParser::getNode): Sorted list of functions. Added case for canvas.
810
811         * html/html_imageimpl.h:
812         * html/html_imageimpl.cpp:
813         (WebCore::HTMLImageElement::HTMLImageElement): Changed m_compositeOperator to be
814         an enum instead of a string.
815         (WebCore::HTMLImageElement::parseMappedAttribute): Parse the enum here.
816
817         * kcanvas/KCanvasResources.h:
818         * kcanvas/KCanvasResources.cpp: (WebCore::KCanvasMarker::draw): Changed to take a
819         GraphicsContext parameter.
820
821         * kcanvas/RenderPath.h: Added GraphicsContext parameter to drawMarkersIfNeeded.
822
823         * kcanvas/RenderPath.cpp: (WebCore::RenderPath::paint):
824         * kcanvas/RenderSVGImage.cpp: (WebCore::RenderSVGImage::paint):
825         * kcanvas/RenderSVGText.cpp: (WebCore::RenderSVGText::paint):
826         Changed to generate and use an appropriate GraphicsContext.
827
828         * kcanvas/device/quartz/KCanvasItemQuartz.h: Added GraphicsContext parameter to
829         drawMarkersIfNeeded.
830         * kcanvas/device/quartz/KCanvasItemQuartz.mm:
831         (WebCore::DrawMarkersData::DrawMarkersData): Added GraphicsContext*.
832         (WebCore::drawMarkerWithData): Pass along a GraphicsContext*.
833         (WebCore::drawStartAndMidMarkers): Ditto.
834         (WebCore::KCanvasItemQuartz::drawMarkersIfNeeded): Pass a long a GraphicsContext*.
835
836         * kcanvas/device/KRenderingDevice.h: Added a pure virtual createGraphicsContext
837         to bridge back to a GraphicsContext. Long term that class will replace this one.
838         * kcanvas/device/quartz/KRenderingDeviceQuartz.h:
839         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
840         (WebCore::KRenderingDeviceContextQuartz::createGraphicsContext): Added.
841
842         * ksvg2/svg/SVGMaskElement.cpp: (WebCore::SVGMaskElement::drawMaskerContent):
843         Create and pass a GraphicsContext -- old code used the default constructor for
844         GraphicsContext which meant "current context", and that no longer exists.
845         * ksvg2/svg/SVGPatternElement.cpp:
846         (WebCore::SVGPatternElement::drawPatternContentIntoTile): Ditto.
847
848         * platform/Brush.h: Removed.
849         * platform/CompositeOperator.h: Added.
850         * platform/CompositeOperator.cpp: Added.
851
852         * platform/Font.h: Changed calls to use IntPoint instead of pairs of ints.
853         Also removed the const from all the uses of GraphicsContext*.
854
855         * platform/GraphicsContext.h: Eliminated default constructor and constructor
856         that takes only a boolean. Replaced with constructors that take platform
857         graphics contexts only. Replaced brush-related calls with fill color calls.
858         Replaced use of Brush with use of Color. Changed Image::CompositeOperator to
859         just plain CompositeOperator. Changed tuples of ints into IntRect and IntPoint.
860         Moved setFocusRingClip and clearFocusRingClip out of ifdefs. Removed unused
861         getCompositeOperation and string-based setCompositeOperation. Moved
862         currentCGContext and the other setCompositeOperation out of the GraphicsContext
863         class and made them global functions. Fixed platformContext so it won't always
864         return the CGContextRef of the current NSGraphicsContext. Instead, it will
865         return the appropriate CGContextRef for the GraphicsContext. This eliminates
866         the need to use void* for the image-drawing functions.
867
868         * platform/GraphicsContext.cpp:
869         (WebCore::GraphicsContextState::GraphicsContextState): Replaced Brush with
870         an RGBA fill color.
871         (WebCore::GraphicsContext::setFillColor): Renamed from setBrush.
872         (WebCore::GraphicsContext::fillColor): Renamed from brush.
873         (WebCore::GraphicsContext::drawImage): Changed to use IntRect.
874         (WebCore::GraphicsContext::drawTiledImage): Moved here from GraphicsContextMac.mm.
875         (WebCore::GraphicsContext::drawText): Changed to use IntPoint.
876         (WebCore::GraphicsContext::drawHighlightForText): Ditto.
877         (WebCore::GraphicsContext::drawLineForText): Ditto.
878         (WebCore::GraphicsContext::drawLineForMisspelling): Ditto.
879
880         * platform/Image.h: Removed CompositeOperator and related functions.
881         Removed void* context parameters from draw functions.
882
883         * platform/Image.cpp: Removed compositeOperatorFromString.
884
885         * platform/Widget.h: Added a GraphicsContext* return value from lockDrawingFocus
886         that you pass back to unlockDrawingFocus (for deletion).
887
888         * platform/mac/FontMac.mm:
889         (WebCore::Font::selectionRectForText): Changed parameter to point and removed
890         const on GraphicsContext* parameter.
891         (WebCore::Font::drawText): Ditto.
892         (WebCore::Font::drawHighlightForText): Ditto.
893         (WebCore::Font::drawLineForText): Ditto.
894         (WebCore::Font::drawLineForMisspelling): Ditto.
895         (WebCore::Font::misspellingLineThickness): Removed const.
896
897         * platform/mac/GraphicsContextMac.mm:
898         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
899         Added fields to store a CGContextRef and an NSGraphicsContext.
900         (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
901         Release both the CGContextRef and the NSGraphicsContext.
902         (WebCore::GraphicsContext::GraphicsContext): Implement to set up both the
903         CGContextRef and the NSGraphicsContext in one case, and only the CGContextRef
904         in the other.
905         (WebCore::GraphicsContext::savePlatformState): Implement for the CGContext-only
906         case.
907         (WebCore::GraphicsContext::restorePlatformState): Ditto.
908         (WebCore::GraphicsContext::drawRect): Assert that the NS context is present
909         and 
910         (WebCore::GraphicsContext::setColorFromFillColor): Renamed from
911         setColorFromBrush.
912         (WebCore::GraphicsContext::setColorFromPen): Added assertion.
913         (WebCore::GraphicsContext::drawLine): Added assertion.
914         (WebCore::GraphicsContext::drawEllipse): Get CGContext from the platformContext
915         function instead of currentCGContext, and changed to use fillColor.
916         (WebCore::GraphicsContext::drawArc): Ditto.
917         (WebCore::GraphicsContext::drawConvexPolygon): Ditto.
918         (WebCore::setCompositeOperation): Changed to global function and also changed
919         to do the work here -- no need to use WebCoreImageRendererFactory.
920         (WebCore::GraphicsContext::drawImage): Move most of this into GraphicsContext.cpp.
921         Remove the void* context parameter. Changed to take rects instead of separate coordinates.
922         (WebCore::GraphicsContext::fillRect): Changed to take color instead of Brush.
923         (WebCore::GraphicsContext::addClip): Added assertion.
924         (WebCore::GraphicsContext::addRoundedRectClip): Get CGContextRef from the platformContext
925         function instead of currentCGContext.
926         (WebCore::GraphicsContext::createRenderingDeviceContext): Ditto.
927         (WebCore::GraphicsContext::beginTransparencyLayer): Ditto.
928         (WebCore::GraphicsContext::endTransparencyLayer): Ditto.
929         (WebCore::GraphicsContext::setShadow): Change to take size instead of x,y. Also get
930         CGCOntextRef from the platformContext function instead of currentCGContext.
931         (WebCore::GraphicsContext::clearShadow): Get CGContextRef from the platformContext
932         function instead of currentCGContext.
933         (WebCore::GraphicsContext::platformContext): Added. Returns m_data->m_cgContext.
934
935         * platform/mac/ImageMac.mm:
936         (WebCore::fillSolidColorInRect): Updated for change in CompositeOperator type.
937         (WebCore::Image::checkForSolidColor): Ditto.
938         (WebCore::Image::draw): Removed void* context parameter and replaced it with
939         a GraphicsContext* parameter. Renamed from drawInRect.
940         (WebCore::Image::drawTiled): Ditto. Renamed from tileInRect and scaleAndTileInRect.
941
942         * platform/mac/PDFDocumentImage.h: Updated for change in CompositeOperator type.
943         * platform/mac/PDFDocumentImage.mm: (WebCore::PDFDocumentImage::draw): Ditto.
944
945         * platform/mac/WidgetMac.mm:
946         (WebCore::Widget::lockDrawingFocus): Changed to return a GraphicsContext*.
947         (WebCore::Widget::unlockDrawingFocus): Changed to take a GraphicsContext*.
948
949         * rendering/InlineTextBox.cpp:
950         (WebCore::InlineTextBox::selectionRect): Changed to pass IntPoint.
951         (WebCore::InlineTextBox::paint): Changed to pass IntSize.
952         (WebCore::InlineTextBox::paintSelection): More of the same.
953         (WebCore::InlineTextBox::paintMarkedTextBackground): Ditto.
954         (WebCore::InlineTextBox::paintDecoration): Ditto.
955         (WebCore::InlineTextBox::paintSpellingMarker): Ditto.
956         (WebCore::InlineTextBox::paintTextMatchMarker): Ditto.
957         (WebCore::InlineTextBox::paintMarkedTextUnderline): Ditto.
958         (WebCore::InlineTextBox::positionForOffset): Ditto.
959         * rendering/RenderBlock.cpp:
960         (WebCore::RenderBlock::fillHorizontalSelectionGap): Ditto.
961         (WebCore::RenderBlock::fillVerticalSelectionGap): Ditto.
962         (WebCore::RenderBlock::fillLeftSelectionGap): Ditto.
963         (WebCore::RenderBlock::fillRightSelectionGap): Ditto.
964         * rendering/RenderBox.cpp:
965         (WebCore::RenderBox::paintBackgroundExtended): Ditto.
966         (WebCore::RenderBox::outlineBox): Ditto.
967         * rendering/RenderImage.cpp:
968         (WebCore::RenderImage::paint): Ditto.
969         * rendering/RenderLayer.cpp:
970         (WebCore::setClip): Take out ifdefs. We'll do that inside GraphicsContext instead.
971         (WebCore::restoreClip): Ditto.
972         * rendering/RenderObject.cpp:
973         (WebCore::RenderObject::drawBorder): More of the same.
974         (WebCore::RenderObject::paintBorderImage): Ditto.
975         * rendering/render_line.cpp:
976         (WebCore::InlineFlowBox::paintDecorations): Ditto.
977         (WebCore::EllipsisBox::paint): Ditto.
978         * rendering/render_list.cpp:
979         (WebCore::RenderListMarker::paint): Ditto.
980
981         * rendering/render_frames.cpp: (WebCore::RenderFrameSet::userResize): Set up a graphics
982         context by calling lockDrawingFocus. Also changed a color here to be a constant.
983
984         * platform/cairo/GraphicsContextCairo.cpp:
985         (WebCore::GraphicsContext::drawImage): Update for parameter type changes.
986         (WebCore::GraphicsContext::drawScaledAndTiledImage):
987         (WebCore::GraphicsContext::setFocusRingClip):
988         (WebCore::GraphicsContext::clearFocusRingClip):
989         * platform/cairo/ImageCairo.cpp:
990         (WebCore::setCompositingOperation):
991         (WebCore::Image::tileInRect):
992         (WebCore::Image::scaleAndTileInRect):
993
994 2006-04-20  Mitz Pettel  <opendarwin.org@mitzpettel.com>
995
996         Reviewed by Darin.
997
998         WebCore part of:
999         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8276
1000           REGRESSION (NativeTextField): Pasting a Finder item into a text field results in
1001             a file: URL being pasted instead of just the file name
1002         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8283
1003           REGRESSION: File's path doesn't appear after dragging file into input field
1004
1005         * bridge/mac/WebCoreFrameBridge.h:
1006         * bridge/mac/WebCoreFrameBridge.mm:
1007         (-[WebCoreFrameBridge isDragCaretRichlyEditable]): Added.
1008         * manual-tests/plain-text-paste.html: Added.
1009         * manual-tests/resources/plain-text-paste: Added.
1010         * manual-tests/resources/plain-text-paste/1.textClipping: Added.
1011         * manual-tests/resources/plain-text-paste/2.textClipping: Added.
1012         * manual-tests/resources/plain-text-paste/3.gif: Added.
1013         * manual-tests/resources/plain-text-paste/4.txt: Added.
1014         * manual-tests/resources/plain-text-paste/5.webloc: Added.
1015
1016 2006-04-20  Darin Adler  <darin@apple.com>
1017
1018         Reviewed by Adele.
1019
1020         - WebCore part of http://bugzilla.opendarwin.org/show_bug.cgi?id=8505
1021           eliminate WebCoreGraphics bridge, demonstrate new SystemInterface technique
1022
1023         * platform/mac/WebCoreGraphicsBridge.h: Removed.
1024         * platform/mac/WebCoreGraphicsBridge.m: Removed.
1025         * platform/mac/WebCoreSystemInterface.h: Added.
1026         * platform/mac/WebCoreSystemInterface.mm: Added.
1027
1028         * WebCore.exp: Add new SystemInterface globals, remove WebCoreGraphicsBridge.
1029
1030         * WebCore.xcodeproj/project.pbxproj: Updated for removed and added files.
1031         Sorted files.
1032
1033         * bridge/mac/FrameMac.mm: Removed unneeded include of WebCoreGraphicsBridge.h.
1034
1035         * platform/mac/ClipboardMac.mm: (WebCore::ClipboardMac::setDragImage):
1036         Moved code from WebGraphicsBridge here, using WebCoreSystemInterface so we can
1037         call wkSetDragImage.
1038
1039         * platform/mac/GraphicsContextMac.mm: (WebCore::GraphicsContext::drawFocusRing):
1040         Moved code from WebGraphicsBridge here, using WebCoreSystemInterface so we can
1041         call wkDrawFocusRing.
1042
1043         * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintTextField):
1044         Call wkDrawBezeledTextFieldCell from WebCoreSystemInterface instead of using
1045         WebGraphicsBridge to do the same thing.
1046
1047 2006-04-20  Adele Peterson  <adele@apple.com>
1048
1049         Reviewed by Hyatt.
1050
1051         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8273
1052         REGRESSION: Read only input text field renders at the wrong height when value attribute is not present
1053
1054         Test: fast/forms/input-readonly-empty.html
1055
1056         * rendering/RenderBlock.h: Added hasLineIfEmpty.
1057         * rendering/RenderBlock.cpp:
1058         (WebCore::RenderBlock::hasLineIfEmpty): Added.  Checks for rootEditableElement as well as 
1059          a shadowNode who has an input element as a parent.
1060         (WebCore::RenderBlock::getBaselineOfLastLineBox): Calls hasLineIfEmpty instead of just checking for the rootEditableElement.
1061         * rendering/bidi.cpp: (WebCore::RenderBlock::layoutInlineChildren): ditto.
1062
1063 2006-04-20  Darin Adler  <darin@apple.com>
1064
1065         Reviewed by Timothy.
1066
1067         Removed TO_NODE_OFFSET and TO_NODE_ADDRESS macros. These can just be done inline with pointer math.
1068
1069         * platform/DeprecatedString.cpp:
1070         (allocateNode):
1071         (freeHandle):
1072
1073 2006-04-19  Adele Peterson  <adele@apple.com>
1074
1075         Rubber-stamped by Darin.
1076
1077         Removed optimizations recently added in setInnerHTML and setInnerText.  The setInnerHTML change broke a first-letter style test.
1078         The setInnerText change caused an empty text node to get added when setting inner text to an empty string.  The bug that this
1079         change went in with remains fixed.
1080
1081         * html/HTMLElement.cpp:
1082         (WebCore::HTMLElement::setInnerHTML):
1083         (WebCore::HTMLElement::setInnerText):
1084
1085 2006-04-19  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1086
1087         Reviewed by Haytt.
1088
1089         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6770
1090           REGRESSION: Incomplete repaint when block with clipping grows
1091
1092         * manual-tests/repaint-resized-overflow.html: Added.
1093         * rendering/RenderLayer.cpp:
1094         (WebCore::RenderLayer::RenderLayer):
1095         (WebCore::RenderLayer::computeRepaintRects): Set the m_repaintOverflowOnResize
1096         flag to true if our object itself needs layout or if we're an overflow
1097         and have a normal child that needs layout, in which case if we end up
1098         resizing it will be because of the child, and that child might have not repainted
1099         itself correctly during its own layout.
1100         (WebCore::RenderLayer::updateLayerPositions): Do a full repaint if
1101         m_repaintOverflowOnResize is set and we resized but didn't move.
1102         * rendering/RenderLayer.h:
1103
1104 2006-04-19  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1105
1106         Reviewed by Hyatt.
1107
1108         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8352
1109           CSS text-shadow does not repaint completely when changed
1110
1111         * manual-tests/dynamic-shadow.html: Added.
1112         * rendering/render_style.cpp:
1113         (WebCore::RenderStyle::diff): Changed to return Layout when text-shadow
1114         changes.
1115
1116 2006-04-19  Adele Peterson  <adele@apple.com>
1117
1118         Reviewed by Darin.
1119
1120         Added readOnly methods for HTMLInputElement and HTMLTextAreaElement so the DOM bindings can call
1121         a method with the same name.  This will make it easier to autogenerate the DOM bindings in the future.
1122  
1123         * html/HTMLInputElement.h: (WebCore::HTMLInputElement::readOnly): Added. Calls isReadOnlyControl.
1124         * html/HTMLTextAreaElement.h: (WebCore::HTMLTextAreaElement::readOnly): ditto.
1125         * bindings/js/kjs_html.cpp:
1126         (KJS::JSHTMLElement::inputGetter): Calls readOnly instead of isReadOnlyControl.
1127         (KJS::JSHTMLElement::textAreaGetter): ditto.
1128         * bindings/objc/DOMHTML.mm:
1129         (-[DOMHTMLInputElement readOnly]): ditto.
1130         (-[DOMHTMLTextAreaElement readOnly]): Calls readOnly instead of getting the attribute directly.
1131         (-[DOMHTMLTextAreaElement setReadOnly:]): Calls setReadOnly instead of setting the attribute directly.
1132
1133 2006-04-19  Adele Peterson  <adele@apple.com>
1134
1135         Reviewed by Hyatt.
1136
1137         Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=8297
1138         REGRESSION: Input element extends outside of DIV element at http://www.macdock.com/
1139
1140         * platform/Font.h: Added runRounding parameter to floatWidth.
1141         * platform/mac/FontMac.mm: (WebCore::Font::floatWidth): ditto.
1142         * platform/win/FontWin.cpp: (WebCore::Font::floatWidth): ditto.
1143         * rendering/RenderTextField.cpp: (WebCore::RenderTextField::calcMinMaxWidth):
1144           Use new floatWidth parameter to turn off run rounding.
1145
1146 2006-04-19  Adele Peterson  <adele@apple.com>
1147
1148         Reviewed by Beth.
1149
1150         Fix for Windows build.
1151
1152         * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::determineState):
1153         Use isReadOnlyControl instead of isReadOnly.
1154
1155  2006-04-19  Adele Peterson  <adele@apple.com>
1156  
1157          Reviewed by Beth.
1158  
1159          Fix to make readonly text fields have dimmed borders to match AppKit behavior.
1160  
1161          Test: fast/forms/input-readonly-dimmed.html
1162  
1163          * dom/Node.h: (WebCore::Node::isReadOnlyControl): Changed from const version of isReadOnly.
1164          * dom/Node.cpp:
1165          (WebCore::Node::isReadOnlyNode): Changed from isReadOnly.
1166          (WebCore::Node::setNodeValue): Uses isReadOnlyNode instead of isReadOnly.
1167          (WebCore::Node::checkSetPrefix): ditto.
1168          (WebCore::Node::checkAddChild): ditto.
1169          * dom/Attr.cpp: (WebCore::Attr::setValue): ditto.
1170          * dom/CharacterData.cpp:
1171          (WebCore::CharacterData::setData): ditto.
1172          (WebCore::CharacterData::appendData): ditto.
1173          (WebCore::CharacterData::checkCharDataOperation): ditto.
1174          * dom/ContainerNode.cpp: (WebCore::ContainerNode::removeChild): ditto.
1175          * dom/Element.cpp: (WebCore::Element::setAttribute): ditto.
1176          * dom/NamedAttrMap.cpp:
1177          (WebCore::NamedAttrMap::setNamedItem): ditto.
1178          (WebCore::NamedAttrMap::removeNamedItem): ditto.
1179          * dom/NamedAttrMap.h: (WebCore::NamedAttrMap::isReadOnlyNode): ditto.
1180          * dom/NamedNodeMap.h: (WebCore::NamedNodeMap::isReadOnlyNode): ditto.
1181          * dom/Range.cpp:
1182          (WebCore::Range::checkDeleteExtract): ditto.
1183          (WebCore::Range::containedByReadOnly): ditto.
1184          * dom/Text.cpp: (WebCore::Text::splitText): ditto.
1185          * dom/dom_xmlimpl.cpp: (WebCore::ProcessingInstruction::setData): ditto.
1186  
1187          * bindings/js/kjs_html.cpp:
1188          (KJS::JSHTMLElement::inputGetter): Uses isReadOnlyControl instead of isReadOnly.
1189          (KJS::JSHTMLElement::textAreaGetter): ditto.
1190          * bindings/objc/DOMHTML.mm: (-[DOMHTMLInputElement readOnly]): ditto.
1191          * rendering/render_form.cpp:
1192          (WebCore::RenderLineEdit::updateFromElement): ditto.
1193          (WebCore::RenderTextArea::updateFromElement): ditto.
1194          * rendering/RenderTextField.cpp:
1195          (WebCore::RenderTextField::createDivStyle): ditto.
1196          (WebCore::RenderTextField::updateFromElement): ditto.
1197  
1198          * html/HTMLGenericFormElement.cpp: (WebCore::HTMLGenericFormElement::parseMappedAttribute): 
1199            When readonly attribute changes, update the theme so the control will repaint.
1200          * html/HTMLGenericFormElement.h: (WebCore::HTMLGenericFormElement::isReadOnlyControl): Renamed from readOnly.
1201          * html/HTMLInputElement.h: Removed isReadOnly, since isReadOnlyControl now exists on HTMLGenericFormElement.
1202          * rendering/RenderTheme.cpp: (WebCore::RenderTheme::isReadOnlyControl): Renamed from isReadOnly.
1203          * rendering/RenderTheme.h: (WebCore::): Added ReadOnlyState to ControlState enum.
1204          * rendering/RenderThemeMac.h: Removed NSTextFieldCell since it was only being used to store the enabled state.
1205            Removed setTextFieldState since it was updating the enabled state of the cell, which is only used in one place.
1206          * rendering/RenderThemeMac.mm:
1207          (WebCore::RenderThemeMac::RenderThemeMac): No longer initialized the NSTextFieldCell.
1208          (WebCore::RenderThemeMac::adjustRepaintRect): No longer calls setTextFieldState.
1209          (WebCore::RenderThemeMac::paintTextField): Uses the enabled state and the readonly state to determine whether to draw
1210           a dimmed version of the aqua border.
1211  
1212 2006-04-19  Beth Dakin  <bdakin@apple.com>
1213
1214         Reviewed by Hyatt.
1215
1216         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8467 Block 
1217         with percentage background-size doesn't repaint properly when it 
1218         grows
1219
1220         * manual-tests/backgroundSizeRepaint.html: Added.
1221         * manual-tests/resources/apple.jpg: Added.
1222         * rendering/RenderObject.cpp:
1223         (WebCore::RenderObject::mustRepaintBackgroundOrBorder): We must 
1224         return true if we have a percentage background-size.
1225
1226 2006-04-19  David Hyatt  <hyatt@apple.com>
1227
1228         Fix for a regression in the new text fields.  Don't allow the repaint
1229         rect created by dynamic line layout changes to spill out of an overflow
1230         area's clip region.
1231
1232         (There is no test, since we have no way of testing cases where we repaint
1233          too much rather than too little.)
1234
1235         Reviewed by darin
1236
1237         * rendering/bidi.cpp:
1238         (WebCore::RenderBlock::layoutInlineChildren):
1239
1240 2006-04-19  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1241
1242         Fix for bug 8449, incomplete repaint of table cell that moved.  This
1243         fix also solves some of the textfield repainting problems (e.g., on
1244         google.com and lxr.mozilla.org).
1245
1246         Reviewed by hyatt
1247
1248         * manual-tests/table-cell-move.html: Added.
1249         * rendering/RenderCanvas.cpp:
1250         (WebCore::RenderCanvas::repaintViewRectangle):
1251         * rendering/RenderTableSection.cpp:
1252         (WebCore::RenderTableSection::layoutRows):
1253
1254 2006-04-19  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1255
1256         Reviewed by Eric, landed by ap.
1257
1258         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8469
1259           CRASH: WebCore::CSSParser::parseDashboardRegions when attr() is passed
1260
1261         Test: fast/css/dashboard-regions-attr-crash.html
1262
1263         * css/cssparser.cpp:
1264         (WebCore::CSSParser::parseDashboardRegions): Added null check for args.
1265
1266 2006-04-18  Rob Buis  <buis@kde.org>
1267
1268         Reviewed by eseidel & darin.  Landed by eseidel.
1269
1270         No automated tests possible (from javascript).
1271
1272         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6664:
1273         Inspector does not highlight SVG elements properly
1274
1275         Make sure RenderObject::absoluteBoundingBoxRect works for
1276         svg specific render objects by overriding absoluteRects.
1277         This fixes highlighting in the Inspector of svg shapes, paths,
1278         images and text.
1279
1280         * kcanvas/RenderPath.cpp:
1281         (WebCore::RenderPath::absoluteRects):
1282         * kcanvas/RenderPath.h:
1283         * kcanvas/RenderSVGImage.cpp:
1284         (WebCore::RenderSVGImage::getAbsoluteRepaintRect):
1285         (WebCore::RenderSVGImage::absoluteRects):
1286         * kcanvas/RenderSVGImage.h:
1287         * kcanvas/RenderSVGText.cpp:
1288         (WebCore::RenderSVGText::absoluteRects):
1289         * kcanvas/RenderSVGText.h:
1290
1291 2006-04-17  Rob Buis  <buis@kde.org>
1292
1293         Reviewed by eseidel.  Landed by eseidel.
1294
1295         Test: svg/custom/tref-update.svg
1296
1297         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6427:
1298         <tref> element not implemented
1299
1300         Implementation of <tref> element.
1301
1302         * WebCore.xcodeproj/project.pbxproj:
1303         * ksvg2/svg/SVGTRefElement.cpp: Added.
1304         (SVGTRefElement::SVGTRefElement):
1305         (SVGTRefElement::~SVGTRefElement):
1306         (SVGTRefElement::parseMappedAttribute):
1307         (SVGTRefElement::closeRenderer):
1308         (SVGTRefElement::childShouldCreateRenderer):
1309         (SVGTRefElement::createRenderer):
1310         * ksvg2/svg/SVGTRefElement.h: Added.
1311         (WebCore::SVGTRefElement::rendererIsNeeded):
1312         * ksvg2/svg/SVGTSpanElement.cpp:
1313         (SVGTSpanElement::childShouldCreateRenderer):
1314         * ksvg2/svg/SVGTextElement.cpp:
1315         (WebCore::SVGTextElement::childShouldCreateRenderer):
1316         * ksvg2/svg/svgtags.in:
1317
1318 2006-04-18  Darin Adler  <darin@apple.com>
1319
1320         * rendering/render_form.cpp: (WebCore::RenderSelect::updateFromElement):
1321         Roll out accidentally-landed change for bug 8398.
1322
1323 2006-04-18  Beth Dakin  <bdakin@apple.com>
1324
1325         Reviewed by Darin.
1326
1327         Fix for a leak exposed by background-size and detected by the 
1328         layout tests.
1329
1330         * css/css_valueimpl.cpp:
1331         (WebCore::CSSPrimitiveValue::cleanup): We must deref pairs.
1332
1333 2006-04-18  Beth Dakin  <bdakin@apple.com>
1334
1335         Reviewed by Eric.
1336
1337         Build fix for Windows. Just a few typos from background-size patch.
1338
1339         * platform/cairo/GraphicsContextCairo.cpp:
1340         (WebCore::GraphicsContext::drawTiledImage):
1341         * platform/cairo/ImageCairo.cpp:
1342         (WebCore::Image::tileInRect):
1343
1344 2006-04-18  Beth Dakin  <bdakin@apple.com>
1345
1346         Reviewed by Hyatt.
1347
1348         Implementation of CSS3 background-size property. See 
1349         http://bugzilla.opendarwin.org/show_bug.cgi?id=8353 for details.
1350
1351         * Viewer/ImageView.cpp: Adjust parameters to drawTiledImage()
1352         * css/CSSComputedStyleDeclaration.cpp: Add background-size
1353         * css/CSSPropertyNames.in: Same.
1354         * css/css_valueimpl.h: Add a constructor for Pair that takes the 
1355         two halves of the pair.
1356         * css/cssparser.cpp: Parse background-size. Still need to take care 
1357         of parsing the shorthand.
1358         * css/cssparser.h: Same.
1359         * css/cssstyleselector.cpp: Address background-size.
1360         * css/cssstyleselector.h: Same.
1361         * platform/GraphicsContext.h: drawTiledImage() now takes the 
1362         tileSize so that it can appropriately scale.
1363         * platform/Image.h: Same as above, but for tileInRect()
1364         * platform/cairo/GraphicsContextCairo.cpp:
1365         (WebCore::GraphicsContext::drawTiledImage):
1366         * platform/cairo/ImageCairo.cpp:
1367         (WebCore::Image::tileInRect): Take care of scaling image in 
1368         necessary in Cairo.
1369         * platform/mac/GraphicsContextMac.mm:
1370         (WebCore::GraphicsContext::drawTiledImage): 
1371         * platform/mac/ImageMac.mm:
1372         (WebCore::Image::tileInRect): Take care of scaling image if 
1373         necessary in CG.
1374         * rendering/RenderBox.cpp:
1375         (WebCore::RenderBox::paintBackgroundExtended): Compute appropriate 
1376         scale if background-size is set. If no-repeat is set, just call 
1377         drawImage() directly.
1378         * rendering/render_style.cpp: Add background-size to the style.
1379         (WebCore::m_next):
1380         (WebCore::BackgroundLayer::BackgroundLayer):
1381         (WebCore::BackgroundLayer::operator=):
1382         (WebCore::BackgroundLayer::operator==):
1383         (WebCore::BackgroundLayer::fillUnsetProperties):
1384         (WebCore::BackgroundLayer::cullEmptyLayers):
1385         * rendering/render_style.h: Same.
1386         (WebCore::BackgroundLayer::backgroundSize):
1387         (WebCore::BackgroundLayer::isBackgroundSizeSet):
1388         (WebCore::BackgroundLayer::setBackgroundSize):
1389         (WebCore::BackgroundLayer::clearBackgroundSize):
1390         (WebCore::RenderStyle::backgroundSize):
1391         (WebCore::RenderStyle::initialBackgroundSize):
1392
1393 2006-04-17  Justin Garcia  <justin.garcia@apple.com>
1394
1395         Reviewed by harrison
1396
1397         * editing/CompositeEditCommand.cpp:
1398         (WebCore::CompositeEditCommand::moveParagraph): The placeholder that's inserted 
1399         to keep content from collapsing due to pruning was inserted at the position after 
1400         the moved paragraph.  That's only appropriate when moving the paragraph backward 
1401         into the previous paragraph.
1402         
1403         * editing/ReplaceSelectionCommand.cpp:
1404         (WebCore::ReplaceSelectionCommand::doApply): The last paragraph of the incoming
1405         fragment should be merged with the paragraph after the end of the selection being pasted
1406         into even if the incoming fragment has only one block.   This fixes a bug and gets
1407         rid of a use of the info gathered during the test insertion.
1408
1409 2006-04-17  Adele Peterson  <adele@apple.com>
1410
1411         Reviewed by Darin.
1412
1413         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8407
1414         REGRESSION (NativeTextField): Leading and trailing spaces trimmed from text field value attribute
1415
1416         Test: fast/forms/input-spaces.html
1417
1418         * rendering/RenderTextField.cpp: (WebCore::RenderTextField::createDivStyle): 
1419         Use white-space:pre for the inner div to avoid collapsing spaces in the text field.
1420
1421 2006-04-18  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1422
1423         Reviewed by Darin.
1424
1425         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8437
1426           iExploder(#293): Crash in StringImpl::hash()
1427
1428         * manual-tests/applet-param-no-name.html: Added.
1429         * rendering/RenderApplet.cpp:
1430         (WebCore::RenderApplet::createWidgetIfNecessary): Skip param elements with
1431         empty name.
1432
1433 2006-04-18  Darin Adler  <darin@apple.com>
1434
1435         - try to fix the Windows build
1436
1437         * platform/cairo/GraphicsContextCairo.cpp: (WebCore::setColor):
1438         Update for changes to getRGBA.
1439
1440 2006-04-17  Alexey Proskuryakov  <ap@nypop.com>
1441
1442         Reviewed by Darin.
1443
1444         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8440
1445         iExploder(#3327): Crash in StringImpl::initWithQChar()
1446
1447         Test: fast/parser/number-sign-in-map-name.html
1448
1449         * html/html_imageimpl.cpp:
1450         (WebCore::HTMLMapElement::parseMappedAttribute): Fixed handling of names starting with a '#'.
1451
1452 2006-04-17  Adele Peterson  <adele@apple.com>
1453
1454         Reviewed by Darin.
1455
1456         Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=8269
1457         REGRESSION: disabled text field does not display greyed-out text
1458
1459         * rendering/RenderTextField.cpp: (WebCore::RenderTextField::createDivStyle): 
1460         For disabled text fields, lighten or darken text color based on background color.
1461         Tries to get as close as possible to logic in AppKit for old text fields.
1462         * platform/Color.h: Removed hsv and setHsv since they were just used within Color.cpp.
1463         * platform/Color.cpp:
1464         (WebCore::parseHexColor): Cleanup.
1465         (WebCore::differenceSquared): Added. Returns the difference squared of two colors.
1466         (WebCore::convertRGBToHSV): Added static function. Replaces hsv and setHSV, and fixes bug in old implementation of the algorithm.
1467         (WebCore::convertHSVToRGB): ditto.
1468         (WebCore::Color::light): No longer takes in a factor, since all callers use the same factor.  Uses new conversion functions.
1469         (WebCore::Color::dark): ditto.
1470         * rendering/InlineTextBox.cpp: Removed simpleDifferenceBetweenColors.
1471         (WebCore::correctedTextColor):  Uses differenceSquared instead of simpleDifferenceBetweenColors.
1472
1473 2006-04-17  David Hyatt  <hyatt@apple.com>
1474
1475         Fix for bug 8270, text highlights outside of textfield when it shouldn't.
1476
1477         Reviewed by darin
1478
1479         Added fast/forms/input-double-click-selection-gap-bug.html
1480
1481         * rendering/RenderBlock.cpp:
1482         (WebCore::RenderBlock::fillInlineSelectionGaps):
1483
1484 2006-04-17  David Hyatt  <hyatt@apple.com>
1485
1486         Fix for bug 8848, caret off by 1 pixel on numerous pixel tests.
1487
1488         Reviewed by darin
1489
1490         * rendering/InlineTextBox.cpp:
1491         (WebCore::InlineTextBox::positionForOffset):
1492         * rendering/RenderText.cpp:
1493         (WebCore::RenderText::caretRect):
1494
1495 2006-04-17  Timothy Hatcher  <timothy@apple.com>
1496
1497         Reviewed by Darin.
1498
1499         <rdar://problem/4506601> TOT WebCore fails to build ppc64
1500
1501         Switch many CG calls to use CGFloat for colors and gradients
1502
1503         * bindings/objc/DOMCSS.mm:
1504         (-[DOMRGBColor dealloc]): cast _internal to uintptr_t
1505         (-[DOMRGBColor finalize]): cast _internal to uintptr_t
1506         (-[DOMRGBColor red]): cast _internal to uintptr_t
1507         (-[DOMRGBColor green]): cast _internal to uintptr_t
1508         (-[DOMRGBColor blue]): cast _internal to uintptr_t
1509         (-[DOMRGBColor alpha]): cast _internal to uintptr_t
1510         (-[DOMRGBColor _color]): cast _internal to uintptr_t
1511         * bridge/mac/FrameMac.mm:
1512         (WebCore::regExpForLabels): use CFIndex as the type returned from indexOfObject:
1513         * bridge/mac/WebCoreFrameBridge.mm:
1514         (-[WebCoreFrameBridge baseWritingDirectionForSelectionStart]): workaround for <rdar://problem/4509035>
1515         * config.h: define CGFloat if it isn't defined already
1516         * html/CanvasGradient.cpp:
1517         (WebCore::CanvasGradient::addColorStop):
1518         (WebCore::gradientCallback):
1519         (WebCore::CanvasGradient::platformShading):
1520         * html/CanvasRenderingContext2D.cpp:
1521         (WebCore::CanvasRenderingContext2D::setShadow):
1522         (WebCore::CanvasRenderingContext2D::applyShadow):
1523         (WebCore::CanvasRenderingContext2D::applyStrokePattern):
1524         (WebCore::CanvasRenderingContext2D::applyFillPattern):
1525         * html/CanvasStyle.cpp:
1526         (WebCore::CanvasStyle::applyStrokeColor):
1527         (WebCore::CanvasStyle::applyFillColor):
1528         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
1529         (WebCore::alphaImageForImage):
1530         (WebCore::KCanvasFEColorMatrixQuartz::getCIFilter):
1531         * kcanvas/device/quartz/KCanvasMaskerQuartz.mm:
1532         (WebCore::applyLuminanceToAlphaFilter):
1533         (WebCore::applyExpandAlphatoGrayscaleFilter):
1534         (WebCore::transformImageIntoGrayscaleMask):
1535         * kcanvas/device/quartz/KCanvasPathQuartz.mm:
1536         (WebCore::scratchContext):
1537         * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
1538         (WebCore::cgGradientCallback):
1539         (WebCore::CGShadingRefForLinearGradient):
1540         (WebCore::CGShadingRefForRadialGradient):
1541         (WebCore::KRenderingPaintServerGradientQuartz::updateQuartzGradientStopsCache):
1542         * kcanvas/device/quartz/KRenderingPaintServerQuartz.h:
1543         (WebCore::):
1544         * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
1545         (WebCore::KRenderingPaintServerPatternQuartz::setup):
1546         * kcanvas/device/quartz/QuartzSupport.mm:
1547         (WebCore::applyStrokeStyleToContext):
1548         * kwq/WebCoreAXObject.mm:
1549         (CreateCGColorIfDifferent):
1550         * platform/Color.cpp:
1551         (WebCore::Color::getRGBA): new name, was getRgbaF. getRGBA uses float and has a double overload
1552         * platform/Color.h:
1553         * platform/mac/ClipboardMac.h: no need to define NSDragOperation
1554         * platform/mac/ColorMac.mm:
1555         (+[WebCoreControlTintObserver WebCore]):
1556         * platform/mac/GraphicsContextMac.mm:
1557         (WebCore::GraphicsContext::drawLine):
1558         * platform/mac/ImageMac.mm:
1559         (WebCore::Image::checkForSolidColor):
1560         (WebCore::Image::tileInRect):
1561         (WebCore::Image::scaleAndTileInRect):
1562         * platform/mac/TextEncodingMac.cpp:
1563         (WebCore::TextEncoding::fromUnicode):
1564
1565 2006-04-17  Justin Garcia  <justin.garcia@apple.com>
1566
1567         Reviewed by darin
1568         
1569         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8402>
1570         Fix interchange newline handling and avoid use of test rendering info
1571
1572         * editing/ReplaceSelectionCommand.cpp:
1573         (WebCore::ReplaceSelectionCommand::doApply):
1574         Fixed bugs in handling of interchange newlines at the end of incoming 
1575         fragments.  Removed the use of !fragment.isBlockFlow since it isn't 
1576         correct and relies on information gathered during the test insertion, which 
1577         we're trying to get rid of. 
1578         * editing/VisiblePosition.h:
1579         (WebCore::VisiblePosition::rootEditableElement): Added for convenience.
1580
1581 2006-04-16  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1582
1583         Reviewed by Darin.
1584
1585         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8408
1586           Paint the highlight behind selected list markers
1587
1588         Test: fast/lists/markers-in-selection.html
1589
1590         * rendering/RenderObject.h: Added selectionColorImageOverlayAlpha constant -
1591         the maximum opacity of the selection color when painted over images.
1592         * rendering/render_list.cpp:
1593         (WebCore::RenderListMarker::RenderListMarker):
1594         (WebCore::RenderListMarker::paint): Paint the selection highlight
1595         if selected: over the marker for image markers, under the marker for all other
1596         markers.
1597         (WebCore::RenderListMarker::setSelectionState): Added.
1598         (WebCore::RenderListMarker::selectionRect): Added.
1599         (WebCore::RenderListMarker::selectionColor): Added. Ensures that the selection
1600         color is transparent for image markers.
1601         * rendering/render_list.h:
1602         (WebCore::RenderListMarker::selectionState):
1603         (WebCore::RenderListMarker::canBeSelectionLeaf):
1604         * rendering/render_replaced.cpp
1605         (WebCore::RenderReplaced::selectionColor): Changed to use the selectionColorImageOverlayAlpha
1606         constant.
1607
1608 2006-04-16  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1609
1610         Reviewed by Darin.
1611
1612         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8420
1613           iExploder(#12): Assertion failure in RenderContainer::removeChildNode
1614
1615         Test: fast/forms/button-inner-block-reuse.html
1616
1617         Buttons have a distinguished anonymous child that holds all their other
1618         descendants. Descendants ended up in a sibling anonymous block as the
1619         initial anonymous child was being reused to hold the initial part of an
1620         inline that got split.
1621
1622         * rendering/RenderInline.cpp:
1623         (WebCore::RenderInline::splitFlow): Check if the anonymous block's parent
1624         allows us to reuse it.
1625         * rendering/RenderObject.h:
1626         (WebCore::RenderObject::allowsReusingAnonymousChild): Added. Returns true.
1627         * rendering/render_button.h:
1628         (WebCore::RenderButton::allowsReusingAnonymousChild): Added. Returns false.
1629
1630 2006-04-16  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1631
1632         Reviewed by Justin.
1633
1634         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8394
1635           Editable region does not accept dropped text if there is no selection
1636
1637         Test: editing/pasteboard/drop-text-without-selection.html
1638
1639         * bridge/mac/WebCoreFrameBridge.mm:
1640         (-[WebCoreFrameBridge documentFragmentWithText:]): Changed to allow
1641         creating a fragment regardless of the selection.
1642
1643 2006-04-16  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1644
1645         Reviewed by Darin.
1646
1647         - WebCore part of fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8324
1648           REGRESSION: textarea :focus not applied immediately
1649
1650         * bridge/mac/WebCoreFrameBridge.h:
1651         * kwq/KWQComboBox.mm:
1652         (-[KWQPopUpButton becomeFirstResponder]): Added call to formControlIsBecomingFirstResponder:.
1653         (-[KWQPopUpButton resignFirstResponder]): Cleaned up.
1654         * kwq/KWQListBox.mm: Ditto.
1655         (-[KWQTableView becomeFirstResponder]):
1656         (-[KWQTableView resignFirstResponder]):
1657         * kwq/KWQSlider.mm:
1658         (-[KWQSlider becomeFirstResponder]): Added call to formControlIsBecomingFirstResponder: and
1659         cleaned up.
1660         (-[KWQSlider resignFirstResponder]): Cleaned up.
1661         * platform/mac/WebCoreTextArea.mm:
1662         (-[WebCoreTextView becomeFirstResponder]): Added call to formControlIsBecomingFirstResponder:.
1663         (-[WebCoreTextView resignFirstResponder]): Cleaned up.
1664         * platform/mac/WebCoreTextField.mm:
1665         (-[KWQTextFieldController setHasFocus:]): Added call to formControlIsBecomingFirstResponder:.
1666         * manual-tests/textarea-focus.html: Added.
1667
1668 2006-04-16  Darin Adler  <darin@apple.com>
1669
1670         Reviewed by Adele and Justin.
1671
1672         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8298
1673           REGRESSION: Crash occurs when attempting to drag selection into
1674           Depart/Return input fields at http://www.travelocity.com/
1675         - remove the mutation event listener that's installed all the time,
1676           since it slows things down a bit
1677
1678         Calling SelectionController::nodeWillBeRemoved from Document::notifyBeforeNodeRemoval
1679         fixes the crash, which was happening because the call that was removing the text
1680         node, removeChildren, does not send a "node removed" mutation event (it sends a
1681         "subtree modified" mutation event instead). So this change alone fixes the crash.
1682
1683         But I also changed setInnerText to not blow away the text node each time the value
1684         is changed, and that makes the test case behave even better -- you don't even lose
1685         the selection; it works as it did with the NSTextField-based text field.
1686
1687         * manual-tests/input-empty-on-focus.html: Added.
1688
1689         * page/Frame.h: Tweaked a few comments and functions related to selection.
1690         * page/Frame.cpp: (WebCore::Frame::dragCaret): Made non-const.
1691
1692         * dom/Document.cpp: (WebCore::Document::notifyBeforeNodeRemoval):
1693         Call nodeWillBeRemoved on the two selection controllers before removing
1694         a node from the document.
1695
1696         * editing/SelectionController.h: Tweak formatting. Remove MutationListener
1697         class and m_mutationListener field.
1698         * editing/SelectionController.cpp:
1699         (WebCore::SelectionController::SelectionController): Remove code to set up
1700         the mutation event listener.
1701         (WebCore::SelectionController::setSelection): Remove code to maintain the
1702         mutation event listener.
1703
1704         * html/HTMLElement.cpp:
1705         (WebCore::HTMLElement::setInnerHTML): In cases where the container has only a
1706         single child use replaceChild, and in cases where the HTML being inserted
1707         also has only a single child and both are text nodes use setData. It's common
1708         to use setInnerHTML to set something that's just text.
1709         (WebCore::HTMLElement::setInnerText): Same as above, but simpler since the
1710         thing we're replacing with is always text.
1711
1712 2006-04-16  Kevin Ollivier  <kevino@theolliviers.com>
1713
1714         Reviewed by Darin.
1715
1716         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8417
1717           make-css-file-arrays.pl hangs when run on Linux
1718
1719         * css/make-css-file-arrays.pl: Remove the "-" parameter from the invocation of cpp,
1720         which means "send output to stdout". It's optional on Mac OS X, and is causing a
1721         hang on Linux.
1722         * rendering/RenderArena.cpp: Added a missing include of <assert.h>.
1723
1724 2006-04-15  Darin Adler  <darin@apple.com>
1725
1726         - removed references to a couple files that are obsolete
1727           but were still in the Windows project file
1728
1729         * WebCore.vcproj/WebCore/WebCore.vcproj: Remove kjs_views.h and .cpp.
1730
1731 2006-04-15  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1732
1733         Reviewed by Maciej.
1734
1735         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8405
1736           REGRESSION: Web Inspector's Style pane is blank
1737
1738         * bindings/js/kjs_window.cpp:
1739         (KJS::Window::isSafeScript): Use isEmpty() instead of isNull() for checking
1740         the domain to determine if the document in a local file. 
1741
1742 2006-04-14  David Hyatt  <hyatt@apple.com>
1743
1744         CSS vendor-specific property/value cleanup.  Properly qualify background-clip,
1745         background-origin, border-image and the border-radius properties.  Make sure
1746         our overflow extensions of marquee and overlay are qualified as well.  Rename
1747         the -khtml- extension to -webkit.
1748
1749         Reviewed by beth
1750
1751         * bindings/js/kjs_css.cpp:
1752         (KJS::cssPropertyName):
1753         * bindings/objc/DOMCSS.mm:
1754         (-[DOMCSSStyleDeclaration _fontSizeDelta]):
1755         (-[DOMCSSStyleDeclaration _setFontSizeDelta:]):
1756         * bindings/objc/DOMHTML.mm:
1757         (-[DOMHTMLInputElement _setAutofilled:]):
1758         * bridge/mac/FrameMac.h:
1759         * bridge/mac/FrameMac.mm:
1760         * css/CSSComputedStyleDeclaration.cpp:
1761         (WebCore::):
1762         (WebCore::valueForTextAlign):
1763         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1764         * css/CSSGrammar.y:
1765         * css/CSSPropertyNames.in:
1766         * css/CSSValueKeywords.in:
1767         * css/css_base.cpp:
1768         (WebCore::CSSSelector::extractPseudoType):
1769         * css/css_valueimpl.cpp:
1770         (WebCore::):
1771         * css/css_valueimpl.h:
1772         * css/cssparser.cpp:
1773         (WebCore::CSSParser::parseRule):
1774         (WebCore::CSSParser::parseValue):
1775         (WebCore::CSSParser::parseColor):
1776         (WebCore::CSSParser::parseDeclaration):
1777         (WebCore::CSSParser::parseBackgroundShorthand):
1778         (WebCore::CSSParser::parseBackgroundColor):
1779         (WebCore::CSSParser::parseBackgroundProperty):
1780         (WebCore::CSSParser::parseFontFamily):
1781         (WebCore::CSSParser::parseShadow):
1782         * css/cssstyleselector.cpp:
1783         (WebCore::CSSStyleSelector::applyDeclarations):
1784         (WebCore::CSSStyleSelector::applyProperty):
1785         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
1786         * css/cssstyleselector.h:
1787         * css/html4.css:
1788         * css/quirks.css:
1789         * css/tokenizer.flex:
1790         * editing/ApplyStyleCommand.cpp:
1791         (WebCore::StyleChange::init):
1792         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
1793         (WebCore::ApplyStyleCommand::removeInlineStyle):
1794         * editing/CompositeEditCommand.cpp:
1795         (WebCore::blockPlaceholderClassString):
1796         * editing/JSEditor.cpp:
1797         * editing/ReplaceSelectionCommand.cpp:
1798         (WebCore::ReplaceSelectionCommand::fixupNodeStyles):
1799         (WebCore::styleForNode):
1800         * editing/htmlediting.cpp:
1801         (WebCore::rebalanceWhitespaceInTextNode):
1802         * html/HTMLElement.cpp:
1803         (WebCore::HTMLElement::addHTMLAlignment):
1804         (WebCore::HTMLElement::setContentEditable):
1805         * html/html_blockimpl.cpp:
1806         (WebCore::HTMLDivElement::parseMappedAttribute):
1807         (WebCore::HTMLParagraphElement::parseMappedAttribute):
1808         (WebCore::HTMLMarqueeElement::parseMappedAttribute):
1809         * html/html_inlineimpl.cpp:
1810         (WebCore::HTMLFontElement::parseMappedAttribute):
1811         * html/html_tableimpl.cpp:
1812         (WebCore::HTMLTablePartElement::parseMappedAttribute):
1813         (WebCore::HTMLTableCellElement::parseMappedAttribute):
1814         * page/Frame.cpp:
1815         (WebCore::Frame::canMouseDownStartSelect):
1816         * page/Frame.h:
1817         * rendering/RenderObject.cpp:
1818         (WebCore::RenderObject::draggableNode):
1819
1820 2006-04-14  Eric Seidel  <eseidel@apple.com>
1821
1822         Reviewed by beth.
1823
1824         Fix win32 build.
1825
1826         * WebCore.vcproj/WebCore/WebCore.vcproj:
1827         * page/FramePrivate.h:
1828
1829 2006-04-04  Eric Seidel  <eseidel@apple.com>
1830
1831         Reviewed by darin.
1832
1833         Fix build-warnings in cairo code.
1834         http://bugzilla.opendarwin.org/show_bug.cgi?id=8176
1835
1836         * platform/cairo/cairo/src/cairo-win32-surface.c:
1837         (_cairo_win32_print_gdi_error):
1838         (_cairo_win32_surface_create_for_dc):
1839         (_composite_alpha_blend):
1840         (cairo_win32_surface_create):
1841         * platform/cairo/pixman/src/iccolor.c:
1842         (pixman_pixel_to_color):
1843
1844 2006-04-14  David Hyatt  <hyatt@apple.com>
1845
1846         Fix for 8333, make sure newlines in whitespace:pre (and friends) get
1847         line boxes created for them.  This resolves all the weird selection/navigation
1848         issues that arise by not creating lines (and thus not having navigable positions
1849         on those lines).
1850
1851         This checkin is also removing all of the layout test hacks that have piled
1852         up, so layout test results are being regenerated completely.
1853
1854         Reviewed by eric
1855
1856         * dom/Position.cpp:
1857         (WebCore::Position::downstream):
1858         * editing/CompositeEditCommand.cpp:
1859         (WebCore::CompositeEditCommand::moveParagraph):
1860         * editing/DeleteSelectionCommand.cpp:
1861         (WebCore::DeleteSelectionCommand::doApply):
1862         * editing/visible_units.cpp:
1863         (WebCore::startOfParagraph):
1864         (WebCore::endOfParagraph):
1865         * kwq/RenderTreeAsText.cpp:
1866         (getTagName):
1867         (operator<<):
1868         * rendering/InlineTextBox.cpp:
1869         (WebCore::InlineTextBox::selectionState):
1870         (WebCore::InlineTextBox::isLineBreak):
1871         (WebCore::InlineTextBox::nodeAtPoint):
1872         (WebCore::InlineTextBox::paint):
1873         (WebCore::InlineTextBox::offsetForPosition):
1874         (WebCore::InlineTextBox::positionForOffset):
1875         * rendering/InlineTextBox.h:
1876         * rendering/RenderBR.cpp:
1877         * rendering/RenderBR.h:
1878         * rendering/RenderText.cpp:
1879         (WebCore::RenderText::atLineWrap):
1880         (WebCore::RenderText::caretRect):
1881         (WebCore::RenderText::height):
1882         (WebCore::RenderText::inlineBox):
1883         * rendering/bidi.cpp:
1884         (WebCore::RenderBlock::computeHorizontalPositionsForLine):
1885         (WebCore::RenderBlock::layoutInlineChildren):
1886         (WebCore::RenderBlock::findNextLineBreak):
1887         * rendering/render_line.h:
1888         (WebCore::InlineBox::isLineBreak):
1889
1890 2006-04-13  Darin Adler  <darin@apple.com>
1891
1892         Reviewed by Geoff.
1893
1894         - moved a few things out of kwq and cleaned up the
1895           Java-applet-related renderers
1896
1897         * WebCore.vcproj/WebCore/WebCore.vcproj: Updated for file location
1898         and name changes.
1899         * WebCore.xcodeproj/project.pbxproj: Ditto.
1900
1901         * kwq/JavaAppletWidget.h: Moved.
1902         * kwq/JavaAppletWidget.mm: Moved.
1903         * kwq/RegularExpression.cpp: Moved.
1904         * kwq/RegularExpression.h: Moved.
1905         * kwq/RenderTreeAsText.cpp: Moved.
1906         * kwq/RenderTreeAsText.h: Moved.
1907         * rendering/render_applet.cpp: Moved.
1908         * rendering/render_applet.h: Moved.
1909
1910         * bridge/JavaAppletWidget.h: Moved here.
1911         * bridge/mac/JavaAppletWidget.mm: Moved here.
1912         * platform/RegularExpression.cpp: Moved here.
1913         * platform/RegularExpression.h: Moved here.
1914         * rendering/RenderTreeAsText.cpp: Moved here.
1915         * rendering/RenderTreeAsText.h: Moved here.
1916
1917         * rendering/RenderApplet.h: Moved here and made changes.
1918         Removed unused element() function.
1919         * rendering/RenderApplet.cpp: Moved here and made changes.
1920         (WebCore::RenderApplet::RenderApplet): Changed parameter type to
1921         be more precise (HTMLAppletElement).
1922         (WebCore::RenderApplet::intrinsicWidth): Removed unnecessary type
1923         cast and simplified.
1924         (WebCore::RenderApplet::intrinsicHeight): Ditto.
1925         (WebCore::RenderApplet::createWidgetIfNecessary): Straightened out
1926         the if statements and changed to use node() instead of element().
1927         (WebCore::RenderApplet::layout): Removed unneeded check before
1928         calling createWidgetIfNecessary.
1929
1930         * rendering/RenderEmptyApplet.h: Moved here and made changes.
1931         Removed unneeded overrides of intrinsicWidth and intrinsicHeight.
1932         * rendering/RenderEmptyApplet.cpp: Moved here and made changes.
1933         (WebCore::RenderEmptyApplet::RenderEmptyApplet): Added code to
1934         set the intrinsic width and height.
1935
1936         * rendering/render_replaced.cpp:
1937         (WebCore::RenderWidget::RenderWidget): Initialize m_widget
1938         with contructor syntax.
1939         (WebCore::RenderWidget::paint): Changed _tx and _ty to be just
1940         tx and ty. Rearranged the code so the transparent wash will draw
1941         even if m_widget is 0.
1942
1943         * html/html_objectimpl.cpp: Update includes for new file names.
1944
1945 2006-04-12  Geoffrey Garen  <ggaren@apple.com>
1946
1947         Reviewed by Darin.
1948
1949         - Fixed <rdar://problem/4478467> document.defaultView should return 
1950         the window object
1951         
1952         Also made part of the window object autogenerated by IDL file.
1953         
1954         * DerivedSources.make: Added /page to IDL file search path, added
1955         JSDOMWindow.h, removed kjs_views.lut.h
1956         * WebCore.xcodeproj/project.pbxproj: Added missing files, removed
1957         obsolete files
1958         * bindings/js/kjs_dom.cpp:
1959         * bindings/js/kjs_events.cpp:
1960         * bindings/js/kjs_proxy.cpp:
1961         (WebCore::KJSProxy::initScriptIfNeeded):
1962         * bindings/js/kjs_views.cpp: Removed.
1963         * bindings/js/kjs_views.h: Removed.
1964         * bindings/js/kjs_window.cpp: Removed document property -- it now
1965         belongs to JSDOMWindow. Added toJS and toDOMWindow.
1966         (KJS::Window::Window):
1967         (KJS::Window::impl):
1968         (KJS::Window::getValueProperty):
1969         (KJS::Window::clear): Added call to setPrototype to ensure
1970         that the prototype gets cleared during navigation. (Previously
1971         this wasn't an issue because the window object had no real prototype.)
1972         (WebCore::toJS):
1973         (WebCore::toDOMWindow):
1974         * bindings/js/kjs_window.h:
1975         (KJS::Window::):
1976         * bindings/objc/DOMCSS.mm: Added NULL checks for the AbstractView
1977         (Presumably this is an issue after the window is closed.) Typedef-ed
1978         AbstractView as DOMWindow. I could have just replaced AbstractView
1979         with DOMWindow, but I think it's clearer to say, "There's this thing
1980         called the AbstractView, but really it's just the window."
1981         (-[DOMDocument getComputedStyle::]):
1982         (-[DOMDocument getMatchedCSSRules::]):
1983         * bindings/objc/DOMViews.mm:
1984         * bindings/objc/DOMViewsInternal.h:
1985         * bindings/scripts/CodeGeneratorJS.pm: Removed unused
1986         GetLegacyImplementationIncludes. Added support for DOMWindow and new
1987         "DoNotCache" attribute. Replaced C macros with text because (1) it
1988         makes the generated source easier to read and debug and (2) it made 
1989         it much easier to implement the DoNotCache attribute.
1990         * bindings/scripts/IDLParser.pm: Return a hash reference instead of
1991         a hash, because otherwise an interface with more than one attribute
1992         returns too many arguments to be processed.
1993         * bridge/mac/FrameMac.mm:
1994         * dom/AbstractView.cpp: Removed.
1995         * dom/AbstractView.h: Removed.
1996         * dom/Document.cpp:
1997         (WebCore::Document::Document):
1998         (WebCore::Document::defaultView):
1999         * dom/Document.h:
2000         * dom/Document.idl:
2001         * dom/KeyboardEvent.idl:
2002         * dom/MouseEvent.idl:
2003         * dom/Position.cpp:
2004         * dom/UIEvent.idl:
2005         * dom/dom2_eventsimpl.h:
2006         * page/DOMWindow.cpp: Added.
2007         (WebCore::DOMWindow::DOMWindow):
2008         (WebCore::DOMWindow::frame):
2009         (WebCore::DOMWindow::disconnectFrame):
2010         (WebCore::DOMWindow::document):
2011         (WebCore::DOMWindow::getComputedStyle):
2012         (WebCore::DOMWindow::getMatchedCSSRules):
2013         * page/DOMWindow.h: Added.
2014         * page/DOMWindow.idl: Added.
2015         * page/Frame.cpp:
2016         (WebCore::Frame::~Frame): Disconnect the new DOMWindow object in
2017         addition to the Window object. Maybe we can unify this in the future.
2018         (WebCore::Frame::tree):
2019         (WebCore::Frame::domWindow):
2020         * page/Frame.h:
2021         * page/FramePrivate.h:
2022
2023 2006-04-13  Alexey Proskuryakov  <ap@nypop.com>
2024
2025         Reviewed by Darin.
2026
2027         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7602
2028         Only use fixupChar for entities
2029
2030         * html/HTMLTokenizer.cpp: Only use fixUpChar() when handling entities.
2031         (WebCore::HTMLTokenizer::parseSpecial):
2032         (WebCore::HTMLTokenizer::parseText):
2033         (WebCore::HTMLTokenizer::parseTag):
2034         (WebCore::HTMLTokenizer::write):
2035         * platform/StreamingTextDecoder.cpp:
2036         (WebCore::StreamingTextDecoder::convert): Remove the special case for Latin-1, because it is already handled 
2037         via effectiveEncoding().
2038         * platform/StreamingTextDecoder.h: Remove convertLatin1().
2039
2040 2006-04-13  Darin Adler  <darin@apple.com>
2041
2042         * platform/mac/GraphicsContextMac.mm: Fix one no-SVG compile problem by adding
2043         a "using namespace std".
2044
2045 2006-04-12  Darin Adler  <darin@apple.com>
2046
2047         Rubber-stamped by Anders.
2048
2049         - fix Windows build
2050
2051         * WebCore.vcproj/Image\ Viewer/Image\ Viewer.vcproj: Add loader directory.
2052
2053         - use std::min/max exclusively intead of kMin/Max
2054         - eliminate KWQDef.h since all it had left in it was kMin/Max
2055
2056         * WebCore.vcproj/WebCore/WebCore.vcproj: Remove KWQDef.h.
2057         * WebCore.xcodeproj/project.pbxproj: Ditto.
2058
2059         * kwq/KWQDef.h: Removed.
2060
2061         * bridge/mac/FrameMac.mm:
2062         (WebCore::FrameMac::attributedString):
2063         * bridge/mac/WebCoreFrameBridge.mm:
2064         (-[WebCoreFrameBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]):
2065         * css/cssstyleselector.cpp:
2066         (WebCore::CSSStyleSelector::applyProperty):
2067         (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
2068         (WebCore::CSSStyleSelector::fontSizeForKeyword):
2069         * dom/Document.cpp:
2070         (WebCore::Document::minimumLayoutDelay):
2071         (WebCore::Document::addMarker):
2072         * dom/StyledElement.cpp:
2073         (WebCore::StyledElement::addCSSColor):
2074         * dom/xml_tokenizer.cpp:
2075         (WebCore::OffsetBuffer::readOutBytes):
2076         * editing/ApplyStyleCommand.cpp:
2077         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
2078         * editing/CompositeEditCommand.cpp:
2079         (WebCore::CompositeEditCommand::deleteInsignificantText):
2080         * editing/TextIterator.cpp:
2081         (WebCore::TextIterator::handleTextNode):
2082         (WebCore::TextIterator::handleTextBox):
2083         (WebCore::CharacterIterator::string):
2084         (WebCore::findPlainText):
2085         * editing/htmlediting.cpp:
2086         (WebCore::rangeCompliantEquivalent):
2087         * editing/markup.cpp:
2088         (WebCore::renderedText):
2089         * editing/visible_units.cpp:
2090         (WebCore::startOfParagraph):
2091         * html/HTMLSelectElement.cpp:
2092         (WebCore::HTMLSelectElement::parseMappedAttribute):
2093         * html/HTMLTokenizer.cpp:
2094         (WebCore::HTMLTokenizer::parseComment):
2095         (WebCore::HTMLTokenizer::parseEntity):
2096         (WebCore::HTMLTokenizer::parseTag):
2097         (WebCore::HTMLTokenizer::enlargeBuffer):
2098         (WebCore::HTMLTokenizer::enlargeScriptBuffer):
2099         * html/html_imageimpl.cpp:
2100         (WebCore::HTMLAreaElement::getRegion):
2101         * html/html_tableimpl.cpp:
2102         (WebCore::HTMLTableElement::parseMappedAttribute):
2103         * ksvg2/css/SVGCSSParser.cpp:
2104         (WebCore::CSSParser::parseSVGPaint):
2105         (WebCore::CSSParser::parseSVGColor):
2106         * kwq/KWQComboBox.mm:
2107         (QComboBox::sizeHint):
2108         * kwq/KWQListBox.mm:
2109         (QListBox::sizeForNumberOfLines):
2110         * kwq/KWQSlider.mm:
2111         (QSlider::setValue):
2112         * loader/Cache.cpp:
2113         (WebCore::Cache::setSize):
2114         * page/Frame.cpp:
2115         (WebCore::Frame::forceLayoutWithPageWidthRange):
2116         * platform/DeprecatedPtrListImpl.h:
2117         * platform/DeprecatedString.cpp:
2118         (ucstrcmp):
2119         * platform/DeprecatedString.h:
2120         * platform/DeprecatedValueListImpl.h:
2121         * platform/mac/GraphicsContextMac.mm:
2122         (WebCore::GraphicsContext::addRoundedRectClip):
2123         * platform/mac/WebCoreTextArea.mm:
2124         (-[WebCoreTextView _trackResizeFromMouseDown:]):
2125         * rendering/InlineTextBox.cpp:
2126         (WebCore::InlineTextBox::isSelected):
2127         (WebCore::InlineTextBox::selectionRect):
2128         (WebCore::InlineTextBox::placeEllipsisBox):
2129         (WebCore::InlineTextBox::selectionStartEnd):
2130         (WebCore::InlineTextBox::paintMarkedTextBackground):
2131         (WebCore::InlineTextBox::paintSpellingMarker):
2132         (WebCore::InlineTextBox::paintTextMatchMarker):
2133         (WebCore::InlineTextBox::paintMarkedTextUnderline):
2134         * rendering/RenderBlock.cpp:
2135         (WebCore::RenderBlock::overflowRect):
2136         (WebCore::RenderBlock::layoutBlock):
2137         (WebCore::RenderBlock::collapseMargins):
2138         (WebCore::RenderBlock::clearFloatsIfNeeded):
2139         (WebCore::RenderBlock::estimateVerticalPosition):
2140         (WebCore::RenderBlock::determineHorizontalPosition):
2141         (WebCore::RenderBlock::setCollapsedBottomMargin):
2142         (WebCore::RenderBlock::handleBottomOfBlock):
2143         (WebCore::RenderBlock::layoutBlockChildren):
2144         (WebCore::RenderBlock::fillVerticalSelectionGap):
2145         (WebCore::RenderBlock::fillLeftSelectionGap):
2146         (WebCore::RenderBlock::fillRightSelectionGap):
2147         (WebCore::RenderBlock::positionNewFloats):
2148         (WebCore::RenderBlock::nearestFloatBottom):
2149         (WebCore::RenderBlock::lowestPosition):
2150         (WebCore::RenderBlock::rightmostPosition):
2151         (WebCore::RenderBlock::leftmostPosition):
2152         (WebCore::RenderBlock::getClearDelta):
2153         (WebCore::RenderBlock::calcMinMaxWidth):
2154         (WebCore::RenderBlock::calcInlineMinMaxWidth):
2155         (WebCore::RenderBlock::calcBlocminMaxWidth):
2156         * rendering/RenderBlock.h:
2157         * rendering/RenderBox.cpp:
2158         (WebCore::RenderBox::calcBorderBoxWidth):
2159         (WebCore::RenderBox::calcBorderBoxHeight):
2160         (WebCore::RenderBox::calcContentBoxWidth):
2161         (WebCore::RenderBox::calcContentBoxHeight):
2162         (WebCore::RenderBox::paintRootBoxDecorations):
2163         (WebCore::RenderBox::paintBoxDecorations):
2164         (WebCore::RenderBox::calcWidth):
2165         (WebCore::RenderBox::calcWidthUsing):
2166         (WebCore::RenderBox::calcHeight):
2167         (WebCore::RenderBox::calcPercentageHeight):
2168         (WebCore::RenderBox::calcReplacedWidth):
2169         (WebCore::RenderBox::calcReplacedHeight):
2170         (WebCore::RenderBox::calcAbsoluteHorizontalValues):
2171         (WebCore::RenderBox::calcAbsoluteVerticalValues):
2172         * rendering/RenderCanvas.cpp:
2173         (WebCore::RenderCanvas::layout):
2174         * rendering/RenderFlexibleBox.cpp:
2175         (WebCore::RenderFlexibleBox::calcMinMaxWidth):
2176         (WebCore::RenderFlexibleBox::layoutHorizontalBox):
2177         (WebCore::RenderFlexibleBox::layoutVerticalBox):
2178         (WebCore::RenderFlexibleBox::allowedChildFlex):
2179         * rendering/RenderFlow.cpp:
2180         (WebCore::RenderFlow::paintLines):
2181         (WebCore::RenderFlow::lowestPosition):
2182         (WebCore::RenderFlow::rightmostPosition):
2183         (WebCore::RenderFlow::leftmostPosition):
2184         (WebCore::RenderFlow::paintOutlineForLine):
2185         * rendering/RenderImage.cpp:
2186         (WebCore::RenderImage::imageChanged):
2187         (WebCore::RenderImage::calcReplacedWidth):
2188         (WebCore::RenderImage::calcReplacedHeight):
2189         * rendering/RenderLayer.cpp:
2190         (WebCore::RenderLayer::scrollRectToVisible):
2191         (WebCore::RenderLayer::computeScrollDimensions):
2192         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
2193         (WebCore::RenderLayer::absoluteBoundingBox):
2194         (WebCore::Marquee::marqueeSpeed):
2195         (WebCore::Marquee::computePosition):
2196         (WebCore::Marquee::timerFired):
2197         * rendering/RenderObject.cpp:
2198         (WebCore::RenderObject::drawBorder):
2199         (WebCore::RenderObject::paintBorderImage):
2200         (WebCore::RenderObject::paintBorder):
2201         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
2202         * rendering/RenderTable.cpp:
2203         (WebCore::RenderTable::calcWidth):
2204         (WebCore::RenderTable::layout):
2205         (WebCore::RenderTable::paintBoxDecorations):
2206         * rendering/RenderTableCell.cpp:
2207         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
2208         * rendering/RenderTableSection.cpp:
2209         (WebCore::RenderTableSection::layoutRows):
2210         (WebCore::RenderTableSection::lowestPosition):
2211         (WebCore::RenderTableSection::rightmostPosition):
2212         (WebCore::RenderTableSection::leftmostPosition):
2213         * rendering/RenderText.cpp:
2214         (WebCore::RenderText::caretRect):
2215         (WebCore::RenderText::calcMinMaxWidth):
2216         (WebCore::RenderText::minXPos):
2217         (WebCore::RenderText::width):
2218         (WebCore::RenderText::caretMinOffset):
2219         (WebCore::RenderText::caretMaxOffset):
2220         * rendering/bidi.cpp:
2221         (WebCore::RenderBlock::computeHorizontalPositionsForLine):
2222         (WebCore::RenderBlock::layoutInlineChildren):
2223         (WebCore::RenderBlock::checkLinesForOverflow):
2224         * rendering/render_form.cpp:
2225         (WebCore::RenderLineEdit::setSelectionStart):
2226         (WebCore::RenderLineEdit::setSelectionEnd):
2227         (WebCore::RenderLineEdit::setSelectionRange):
2228         (WebCore::RenderFieldset::layoutLegend):
2229         (WebCore::RenderFieldset::paintBoxDecorations):
2230         (WebCore::RenderSelect::layout):
2231         (WebCore::RenderTextArea::calcMinMaxWidth):
2232         (WebCore::RenderSlider::updateFromElement):
2233         * rendering/render_frames.cpp:
2234         (WebCore::RenderFrameSet::layout):
2235         * rendering/render_line.cpp:
2236         (WebCore::InlineFlowBox::placeBoxesHorizontally):
2237         (WebCore::InlineFlowBox::verticallyAlignBoxes):
2238         (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
2239         (WebCore::InlineFlowBox::placeBoxesVertically):
2240         (WebCore::InlineFlowBox::paintBackgroundAndBorder):
2241         * rendering/render_line.h:
2242         (WebCore::RootInlineBox::selectionHeight):
2243         * rendering/render_list.cpp:
2244         (WebCore::RenderListItem::positionListMarker):
2245         * rendering/render_replaced.cpp:
2246         (WebCore::RenderReplaced::shouldPaint):
2247         * rendering/table_layout.cpp:
2248         (WebCore::FixedTableLayout::calcMinMaxWidth):
2249         (WebCore::AutoTableLayout::recalcColumn):
2250         (WebCore::AutoTableLayout::calcMinMaxWidth):
2251         (WebCore::AutoTableLayout::calcEffectiveWidth):
2252         (WebCore::AutoTableLayout::layout):
2253         Use min/max instead of kMin/kMax.
2254
2255 2006-04-12  Darin Adler  <darin@apple.com>
2256
2257         Rubber-stamped by Anders.
2258
2259         - get ready for some more de-KWQ-ing done by the renaming script in two ways
2260             1) stop using forwarding headers for things within WebCore
2261             2) remove a bit of unused stuff
2262
2263         * loader/CachedImage.h:
2264         * loader/CachedImage.cpp:
2265         * loader/DocLoader.cpp:
2266         * loader/DocLoader.h:
2267         * page/Frame.cpp:
2268         * xml/XSLTProcessor.cpp:
2269         Removed unused showAnimations functions and data. We can add back later if we need it.
2270         And if we do, we won't use a typedef from KHTMLSettings.
2271
2272         * ForwardingHeaders/java: Removed.
2273         * ForwardingHeaders/java/kjavaappletwidget.h: Removed.
2274         * ForwardingHeaders/khtml_settings.h: Removed.
2275         * ForwardingHeaders/kio: Removed.
2276         * ForwardingHeaders/kio/global.h: Removed.
2277         * ForwardingHeaders/ksslkeygen.h: Removed.
2278         * ForwardingHeaders/q3ptrlist.h: Removed.
2279         * ForwardingHeaders/q3valuelist.h: Removed.
2280         * ForwardingHeaders/qcombobox.h: Removed.
2281         * ForwardingHeaders/qfontmetrics.h: Removed.
2282         * ForwardingHeaders/qlineedit.h: Removed.
2283         * ForwardingHeaders/qmatrix.h: Removed.
2284         * ForwardingHeaders/qptrlist.h: Removed.
2285         * ForwardingHeaders/qptrqueue.h: Removed.
2286         * ForwardingHeaders/qregexp.h: Removed.
2287         * ForwardingHeaders/qscrollbar.h: Removed.
2288         * ForwardingHeaders/qtextedit.h: Removed.
2289         * ForwardingHeaders/qtextstream.h: Removed.
2290         * ForwardingHeaders/qvaluelist.h: Removed.
2291         * ForwardingHeaders/qwmatrix.h: Removed.
2292
2293         * WebCore+SVG/DOMList.h:
2294         * bindings/js/kjs_dom.cpp:
2295         * bindings/js/kjs_dom.h:
2296         * bindings/js/kjs_window.cpp:
2297         * css/css_stylesheetimpl.h:
2298         * css/css_valueimpl.cpp:
2299         * css/css_valueimpl.h:
2300         * css/cssstyleselector.cpp:
2301         * dom/CharacterData.cpp:
2302         * dom/Document.cpp:
2303         * dom/Document.h:
2304         * dom/EventTargetNode.cpp:
2305         * dom/Node.cpp:
2306         * editing/BreakBlockquoteCommand.h:
2307         * editing/htmlediting.cpp:
2308         * html/FormDataList.h:
2309         * html/HTMLKeygenElement.cpp:
2310         * html/HTMLTokenizer.h:
2311         * html/html_objectimpl.cpp:
2312         * kcanvas/KCanvasFilters.cpp:
2313         * kcanvas/KCanvasMatrix.cpp:
2314         * kcanvas/KCanvasMatrix.h:
2315         * kcanvas/KCanvasPath.cpp:
2316         * kcanvas/KCanvasPath.h:
2317         * kcanvas/KCanvasResources.cpp:
2318         * kcanvas/KCanvasTreeDebug.h:
2319         * kcanvas/RenderForeignObject.h:
2320         * kcanvas/RenderPath.h:
2321         * kcanvas/RenderSVGImage.h:
2322         * kcanvas/RenderSVGText.h:
2323         * kcanvas/device/KRenderingPaintServerGradient.cpp:
2324         * kcanvas/device/KRenderingPaintServerPattern.cpp:
2325         * kcanvas/device/KRenderingPaintServerSolid.cpp:
2326         * kcanvas/device/quartz/KCanvasItemQuartz.h:
2327         * kcanvas/device/quartz/KCanvasResourcesQuartz.h:
2328         * ksvg2/svg/SVGColor.cpp:
2329         * ksvg2/svg/SVGComponentTransferFunctionElement.cpp:
2330         * ksvg2/svg/SVGDocument.h:
2331         * ksvg2/svg/SVGFEBlendElement.cpp:
2332         * ksvg2/svg/SVGFEColorMatrixElement.cpp:
2333         * ksvg2/svg/SVGFEComponentTransferElement.cpp:
2334         * ksvg2/svg/SVGFECompositeElement.cpp:
2335         * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
2336         * ksvg2/svg/SVGFEDisplacementMapElement.cpp:
2337         * ksvg2/svg/SVGFEGaussianBlurElement.cpp:
2338         * ksvg2/svg/SVGFELightElement.cpp:
2339         * ksvg2/svg/SVGFEMergeElement.cpp:
2340         * ksvg2/svg/SVGFEOffsetElement.cpp:
2341         * ksvg2/svg/SVGFESpecularLightingElement.cpp:
2342         * ksvg2/svg/SVGFETileElement.cpp:
2343         * ksvg2/svg/SVGFETurbulenceElement.cpp:
2344         * ksvg2/svg/SVGFitToViewBox.cpp:
2345         * ksvg2/svg/SVGLengthList.cpp:
2346         * ksvg2/svg/SVGMatrix.h:
2347         * ksvg2/svg/SVGNumberList.cpp:
2348         * ksvg2/svg/SVGPreserveAspectRatio.cpp:
2349         * ksvg2/svg/SVGSVGElement.cpp:
2350         * ksvg2/svg/SVGStringList.cpp:
2351         * ksvg2/svg/SVGStyledElement.h:
2352         * ksvg2/svg/SVGStyledTransformableElement.cpp:
2353         * ksvg2/svg/SVGTransformable.cpp:
2354         * ksvg2/svg/SVGURIReference.h:
2355         * ksvg2/svg/svgpathparser.cpp:
2356         * kwq/KWQKHTMLSettings.h:
2357         * loader/Cache.h:
2358         * loader/CachedObject.h:
2359         * loader/Decoder.cpp:
2360         * loader/FormData.h:
2361         * loader/loader.h:
2362         * page/Frame.h:
2363         * page/FramePrivate.h:
2364         * platform/Font.cpp:
2365         * platform/SegmentedString.h:
2366         * platform/mac/FontMac.mm:
2367         * platform/mac/WebCoreTextField.mm:
2368         * rendering/RenderBlock.cpp:
2369         * rendering/RenderObject.cpp:
2370         * rendering/RenderTable.cpp:
2371         * rendering/RenderTableCell.cpp:
2372         * rendering/RenderTableCol.cpp:
2373         * rendering/RenderTableSection.cpp:
2374         * rendering/bidi.h:
2375         * rendering/break_lines.cpp:
2376         * rendering/render_applet.cpp:
2377         * rendering/render_form.cpp:
2378         * rendering/render_form.h:
2379         * rendering/render_frames.cpp:
2380         * rendering/render_style.h:
2381         * xml/xmlhttprequest.cpp:
2382         Updated includes.
2383
2384         * WebCore.xcodeproj/project.pbxproj: Resorted a couple things.
2385
2386 2006-04-12  Adele Peterson  <adele@apple.com>
2387
2388         Reviewed by Darin and Tim O.
2389
2390         WebCore part of fix for:
2391         http://bugzilla.opendarwin.org/show_bug.cgi?id=8061
2392         REGRESSION: New text fields need to send callbacks used by autocomplete
2393
2394         Fix for:
2395         http://bugzilla.opendarwin.org/show_bug.cgi?id=8156
2396         FrameMac::submitForm is busted after Vector changes
2397
2398         * bindings/objc/DOMHTML.mm:
2399         (-[DOMHTMLInputElement _rectOnScreen]): Use boundingBox method so this no longer relies on an NSTextField.  
2400         The old code is no longer needed because this method was used by autocomplete, and that was not enabled for password or search fields.
2401         (-[DOMHTMLInputElement _replaceCharactersInRange:withString:selectingFromIndex:]): New implementation that uses setValue and setSelectionRange
2402         instead of NSTextField specific code.
2403         (-[DOMHTMLInputElement _selectedRange]): Creates range by calling selectionStart and selectionEnd on the input element.
2404         (-[DOMHTMLInputElement _setAutofilled:]): Provides a way for the autofill code to set a flag on the input element so
2405          it knows when its value is set by autofill.  This is how we change the background color.
2406         * bindings/objc/DOMPrivate.h: Removed _displayedValue, _setDisplayedValue, _setBackgroundColor since these are no
2407          longer needed for the new text field implementation, and aren't used for remaining NSView-style password and search fields.
2408          Added _setAutofilled method.
2409         * bridge/mac/FrameMac.h: Added virtual clearRecordedFormValues and recordFormValue.  These were moved into Frame.cpp recently, which broke
2410         how Safari asked to add form values to the keychain.
2411
2412         * bridge/mac/FrameMac.mm:
2413         (WebCore::createNSDictionary): Added. Converts a hashmap to an NSDictionary for m_formValuesAboutToBeSubmitted.  This is needed to fix the submit form bug.
2414         (WebCore::selectorForKeyEvent): Added.  This helper function converts key events into selectors that the autocomplete code needs to know about.
2415         (WebCore::FrameMac::FrameMac):
2416         (WebCore::FrameMac::submitForm): Convert saved form and formValues into DOMElement and NSMutableDictionary.
2417         (WebCore::FrameMac::textFieldDidBeginEditing): Added so the input element can send this notification over the bridge.
2418         (WebCore::FrameMac::textFieldDidEndEditing): ditto.
2419         (WebCore::FrameMac::textDidChangeInTextField): ditto.
2420         (WebCore::FrameMac::doTextFieldCommandFromEvent): ditto. Also calls selectorForKeyEvent.
2421         (WebCore::FrameMac::textWillBeDeletedInTextField): ditto.
2422         * page/Frame.cpp:
2423         (WebCore::Frame::textFieldDidBeginEditing): ditto.
2424         (WebCore::Frame::textFieldDidEndEditing): ditto.
2425         (WebCore::Frame::textDidChangeInTextField): ditto.
2426         (WebCore::Frame::doTextFieldCommandFromEvent): ditto.
2427         (WebCore::Frame::textWillBeDeletedInTextField): ditto.
2428         * page/Frame.h: ditto.
2429         * platform/PlatformString.h: (WebCore::String::replace): Added to use an existing version of StringImpl::replace.
2430
2431         * rendering/RenderTextField.cpp:
2432         (WebCore::RenderTextField::setSelectionRange): Setting the selection here should close the typing command.
2433         (WebCore::RenderTextField::subtreeHasChanged): Calls textDidChangeInTextField.
2434
2435         * dom/Document.cpp: (WebCore::Document::setFocusNode): Calls dispatchFocusEvent and dispatchBlurEvent instead of directly dispatching the events.  This gives the node a chance to do other work before dispatching the event.
2436
2437         * dom/EventTargetNode.cpp:
2438         (WebCore:: EventTargetNode::dispatchFocusEvent): Added.
2439         (WebCore:: EventTargetNode::dispatchBlurEvent): Added.
2440         * dom/EventTargetNode.h:
2441
2442         * html/HTMLInputElement.cpp:
2443         (WebCore::HTMLInputElement::init): initializes m_autofilled.
2444         (WebCore::HTMLInputElement::dispatchFocusEvent): Calls textFieldDidBeginEditing and then calls up to the base class
2445         (WebCore::HTMLInputElement::dispatchBlurEvent): Calls textFieldDidEndEditing and then calls up to the base class
2446         (WebCore::HTMLInputElement::defaultEventHandler): For keypress events, calls doTextFieldCommandFromEvent so the form delegate will
2447         have a chance to say whether or not it is going to handle the event.
2448        (WebCore::HTMLInputElement::isKeyboardFocusable): Uses isNonWidgetTextField instead of checking the inputType.
2449         (WebCore::HTMLInputElement::isMouseFocusable): ditto.
2450         (WebCore::HTMLInputElement::focus): ditto.
2451         (WebCore::HTMLInputElement::constrainValue): Uses isTextField instead of checking inputType.
2452         * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::submit): ditto.
2453         * html/HTMLInputElement.h:
2454         (WebCore::HTMLInputElement::isTextField): Added. Checks for TEXT, PASSWORD, and SEARCH
2455         (WebCore::HTMLInputElement::isNonWidgetTextField): Added.  Checks for all converted controls.
2456         (WebCore::HTMLInputElement::autofilled): Added.
2457         (WebCore::HTMLInputElement::setAutofilled): Added.
2458         * html/HTMLTextFieldInnerElement.cpp: (WebCore::HTMLTextFieldInnerElement::defaultEventHandler): Uses isNonWidgetTextField instead of checking the inputType.
2459
2460         * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::doApply):
2461          If the deletion is occuring in a text field, call textWillBeDeletedInTextField so the frame can
2462          call across the bridge to notify the form delegate.
2463
2464         * css/css_base.cpp: (WebCore::CSSSelector::extractPseudoType): Added autofill string for "-khtml-autofill".
2465         * css/css_base.h: (WebCore::CSSSelector::): Added PseudoAutofill to enum.
2466         * css/cssstyleselector.cpp:
2467         (WebCore::CSSStyleSelector::checkOneSelector): Added case for PseudoAutofill that checks the input element's autofilled flag.
2468         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Changed  -webkit-focus-ring-color to -khtml-focus-ring-color for consistency.
2469         * css/html4.css: Added background-color and background-image for input:-khtml-autofill style.
2470          Changed -webkit-focus-ring-color to -khtml-focus-ring-color for consistency.
2471         * css/CSSValueKeywords.in: ditto.
2472         * css/cssparser.cpp:
2473         (WebCore::CSSParser::parseValue): ditto.
2474         (WebCore::CSSParser::parseShadow): ditto.
2475
2476 2006-04-12  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2477  
2478          Reviewed by hyatt
2479  
2480          - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=4855
2481            List item's bullets fail to redraw correctly after their style is set with JavaScript
2482  
2483          * manual-tests/list-marker-repaint.html: Added.
2484          * rendering/RenderBlock.cpp:
2485          (WebCore::RenderBlock::layoutBlock): Call positionListMarker() after laying out
2486          the children.
2487          (WebCore::RenderBlock::calcInlineMinMaxWidth): Call calcWidth() on the child
2488          if we are going to use its marginLeft() or marginRight(), which is if they are
2489          given as a percentage or if the child is a list marker.
2490          * rendering/RenderBlock.h:
2491          (WebCore::RenderBlock::positionListMarker): Added this virtual function which
2492          RenderListItem implements and which is called from layoutBlock().
2493          * rendering/RenderFlow.cpp:
2494          (WebCore::RenderFlow::addFocusRingRects): Avoid adding focus rings around outside list
2495          markers. Previously it did not matter since the markers had zero width.
2496          * rendering/bidi.cpp:
2497          (WebCore::RenderBlock::findNextLineBreak): Outside list markers should not contribute
2498          to the line width, even now that they have width.
2499          * rendering/render_line.cpp:
2500          (WebCore::InlineFlowBox::placeBoxesHorizontally): Skip outside list markers.
2501          * rendering/render_list.cpp:
2502          (WebCore::RenderListItem::positionListMarker): Added.
2503          (WebCore::RenderListMarker::paint): Removed code that was used to right-align outside
2504          text markers, since that is achieved by margins now.
2505          (WebCore::RenderListMarker::calcMinMaxWidth): Changed the marker height to be the font height.
2506          Made the width of outside list markers non-zero and equal to the width of inside markers.
2507          Changed the width to include only the marker and not any padding. Increased the width of bullets
2508          by 2 to contain spillage due to antialiasing.
2509          (WebCore::RenderListMarker::calcWidth): Calculate horizontal margins. Padding that was
2510          previously included in the width is now part of the margins. 
2511          (WebCore::RenderListMarker::getRelativeMarkerRect): Adjusted for the changes to width and
2512          margins.
2513          * rendering/render_list.h:
2514
2515 2006-04-12  Darin Adler  <darin@apple.com>
2516
2517         Rubber-stamped by Hyatt.
2518
2519         - moved some more files out of KWQ to more-permanent homes
2520
2521         * WebCore.vcproj/WebCore/WebCore.vcproj: Updated for new locations.
2522         * WebCore.xcodeproj/project.pbxproj: Ditto.
2523
2524         * kwq/BlockExceptions.h: Removed.
2525         * kwq/BlockExceptions.mm: Removed.
2526         * kwq/ClipboardMac.h: Removed.
2527         * kwq/ClipboardMac.mm: Removed.
2528         * kwq/DeprecatedPtrList.h: Removed.
2529         * kwq/DeprecatedPtrListImpl.cpp: Removed.
2530         * kwq/DeprecatedPtrListImpl.h: Removed.
2531         * kwq/DeprecatedValueList.h: Removed.
2532         * kwq/DeprecatedValueListImpl.cpp: Removed.
2533         * kwq/DeprecatedValueListImpl.h: Removed.
2534         * kwq/WebCoreTextArea.h: Removed.
2535         * kwq/WebCoreTextArea.mm: Removed.
2536         * kwq/WebCoreTextField.h: Removed.
2537         * kwq/WebCoreTextField.mm: Removed.
2538         * platform/DeprecatedPtrList.h: Added.
2539         * platform/DeprecatedPtrListImpl.cpp: Added.
2540         * platform/DeprecatedPtrListImpl.h: Added.
2541         * platform/DeprecatedValueList.h: Added.
2542         * platform/DeprecatedValueListImpl.cpp: Added.
2543         * platform/DeprecatedValueListImpl.h: Added.
2544         * platform/mac/BlockExceptions.h: Added.
2545         * platform/mac/BlockExceptions.mm: Added.
2546         * platform/mac/ClipboardMac.h: Added.
2547         * platform/mac/ClipboardMac.mm: Added.
2548         * platform/mac/WebCoreTextArea.h: Added.
2549         * platform/mac/WebCoreTextArea.mm: Added.
2550         * platform/mac/WebCoreTextField.h: Added.
2551         * platform/mac/WebCoreTextField.mm: Added.
2552
2553 2006-04-12  David Harrison  <harrison@apple.com>
2554
2555         Reviewed by Darin.
2556
2557         <rdar://problem/4386640> AX: AXPreviousSentenceStartTextMarkerForTextMarker does not respect paragraph boundary
2558         <rdar://problem/4414575> AX: Dictionary popup cannot find some words on Dictionary.app
2559
2560         AXPreviousSentenceStartTextMarkerForTextMarker failed to stop at the beginning a block because
2561         SimplifiedBackwardsTextIterator::handleNonTextNode() emitted a space when exiting the block.
2562         Fixed by emitting a newline instead.
2563         
2564         Word boundary failed to stop at the beginning of a block because no character at all was emitted
2565         when leaving the block, because the exitNode was checking specific html tags to decide whether the
2566         node is block, but the node was xml.  Fixed by using the node's renderer, if present.
2567         
2568         (see related changes in WebKit)
2569         
2570         Tests added:
2571         * editing/selection/extend-by-sentence-001.html: Added.
2572         * fast/dom/inner-text-001.html: Added.
2573         
2574         * bridge/mac/WebCoreFrameBridge.h:
2575         * bridge/mac/WebCoreFrameBridge.mm:
2576         (-[WebCoreFrameBridge alterCurrentSelection:direction:granularity:]):
2577         Add sentence navigation/selection.
2578         
2579         * editing/Selection.cpp:
2580         (WebCore::Selection::validate):
2581         Add sentence navigation/selection.
2582
2583         * editing/SelectionController.cpp:
2584         (WebCore::SelectionController::modifyExtendingRightForward):
2585         (WebCore::SelectionController::modifyMovingRightForward):
2586         (WebCore::SelectionController::modifyExtendingLeftBackward):
2587         (WebCore::SelectionController::modifyMovingLeftBackward):
2588         (WebCore::SelectionController::modify):
2589         Add sentence navigation/selection.
2590
2591         * editing/TextGranularity.h:
2592         (WebCore::):
2593         Add SentenceGranularity and SentenceBoundary.
2594
2595         * editing/TextIterator.cpp:
2596         (WebCore::isTableCell):
2597         (WebCore::shouldEmitTabBeforeNode):
2598         (WebCore::shouldEmitNewlineForNode):
2599         (WebCore::shouldEmitNewlinesBeforeAndAfterNode):
2600         (WebCore::shouldEmitExtraNewlineForNode):
2601         New utility functions that prefer renderers over html tag names.
2602
2603         (WebCore::TextIterator::handleNonTextNode):
2604         (WebCore::TextIterator::exitNode):
2605         (WebCore::SimplifiedBackwardsTextIterator::advance):
2606         Use new utility functions.
2607         
2608         (WebCore::SimplifiedBackwardsTextIterator::handleNonTextNode):
2609         Use new utility functions.  Also emit linefeed instead of space,
2610         so sentence parsing works across block boundaries.
2611         
2612         (WebCore::SimplifiedBackwardsTextIterator::exitNode):
2613         Use new utility functions.
2614
2615         (WebCore::SimplifiedBackwardsTextIterator::emitNewline):
2616         Renamed from emitNewlineForBROrText because it is not always for BR or text.
2617         
2618         * editing/TextIterator.h:
2619         Renamed emitNewlineForBROrText to emitNewline.
2620         
2621         * editing/visible_units.cpp:
2622         * editing/visible_units.h:
2623         (WebCore::previousBoundary):
2624         (WebCore::nextBoundary):
2625         (WebCore::previousSentencePosition):
2626         (WebCore::nextSentencePosition):
2627         Add sentence navigation/selection.
2628
2629 2006-04-12  Darin Adler  <darin@apple.com>
2630
2631         Rubber-stamped by Hyatt.
2632
2633         - moved Decoder and FormData classes into loader directory
2634           (Decoder, because it's part of the loading process.
2635            FormData, because it's used as a parameter when specifying
2636            what to load. Arguably either could be in page instead.)
2637         - moved Length.h from css to renderer, cause that's where Hyatt
2638           says it belongs
2639
2640         * WebCore.vcproj/WebCore/WebCore.vcproj: Updated for new locations.
2641         * WebCore.xcodeproj/project.pbxproj: Ditto.
2642
2643         * khtml: Removed.
2644         * loader/Decoder.cpp: Added.
2645         * loader/Decoder.h: Added.
2646         * loader/FormData.cpp: Added.
2647         * loader/FormData.h: Added.
2648
2649         * css/Length.h: Removed.
2650         * rendering/Length.h: Added.
2651
2652         * bridge/mac/WebCoreEncodings.mm:
2653         * dom/Document.h:
2654         * kwq/KWQFormData.mm:
2655         * loader/CachedXBLDocument.cpp:
2656         * loader/CachedXSLStyleSheet.cpp:
2657         * page/ResourceRequest.h:
2658         * platform/TransferJobInternal.h:
2659         * xml/xmlhttprequest.cpp:
2660         Updated includes.
2661
2662 2006-04-12  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2663
2664         Reviewed by darin
2665
2666         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8337
2667           Incomplete repaint of inlines' outline during editing
2668
2669         * manual-tests/inline-outline-repaint.html: Added.
2670         * rendering/RenderBlock.cpp:
2671         (WebCore::RenderBlock::layoutBlock): Add the maximal outline width to the
2672         inlines' repaint rect.
2673
2674 2006-04-12  Justin Garcia  <justin.garcia@apple.com>
2675
2676         Reviewed by darin
2677         
2678         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8335>
2679         Implement execCommand(InsertHorizontalRule)
2680
2681         * editing/JSEditor.cpp:
2682
2683 2006-04-12  Darin Adler  <darin@apple.com>
2684
2685         Rubber-stamped by Hyatt.
2686
2687         - moved xsl files into xml directory, removed xbl files (for now)
2688
2689         * WebCore.vcproj/WebCore/WebCore.vcproj: Updated for new locations.
2690         * WebCore.xcodeproj/project.pbxproj: Ditto.
2691         * khtml/xbl: Removed.
2692         * khtml/xsl: Removed.
2693         * xml/XSLStyleSheet.cpp: Added.
2694         * xml/XSLStyleSheet.h: Added.
2695         * xml/XSLTProcessor.cpp: Added.
2696         * xml/XSLTProcessor.h: Added.
2697
2698 2006-04-12  David Hyatt  <hyatt@apple.com>
2699
2700         Fix for 5283, make sure overflow doesn't paint on top of positioned elements.
2701
2702         Reviewed by beth
2703
2704         * kwq/RenderTreeAsText.cpp:
2705         (writeLayers):
2706         * rendering/RenderLayer.cpp:
2707         (WebCore::RenderLayer::RenderLayer):
2708         (WebCore::RenderLayer::~RenderLayer):
2709         (WebCore::RenderLayer::addChild):
2710         (WebCore::RenderLayer::removeChild):
2711         (WebCore::RenderLayer::paintLayer):
2712         (WebCore::RenderLayer::hitTestLayer):
2713         (WebCore::RenderLayer::dirtyOverflowList):
2714         (WebCore::RenderLayer::updateOverflowList):
2715         (WebCore::RenderLayer::collectLayers):
2716         (WebCore::RenderLayer::shouldBeOverflowOnly):
2717         (WebCore::RenderLayer::styleChanged):
2718         * rendering/RenderLayer.h:
2719         (WebCore::RenderLayer::isOverflowOnly):
2720         (WebCore::RenderLayer::overflowList):
2721
2722 2006-04-12  Darin Adler  <darin@apple.com>
2723
2724         * WebCore.xcodeproj/project.pbxproj: Turn SVG support back on.
2725         I accidentally checked in this file with SVG off last night.
2726
2727 2006-04-12  Darin Adler  <darin@apple.com>
2728
2729         - try to fix Windows build
2730
2731         * platform/TransferJobInternal.h: Declare HANDLE.
2732         * platform/image-decoders/gif/GIFImageReader.h: Include GIFImageDecoder.h.
2733         * rendering/RenderThemeWin.h: Declare HANDLE and HMODULE.
2734
2735 2006-04-12  Darin Adler  <darin@apple.com>
2736
2737         - another attempt to get things building
2738
2739         * bindings/js/kjs_proxy.cpp: Add "kjs_events.h" include, needed when not
2740         building SVG (so for Windows too).
2741         * editing/TextIterator.h: Add back include of Vector.h.
2742
2743 2006-04-11  Darin Adler  <darin@apple.com>
2744
2745         - try to fix Windows build
2746
2747         * html/HTMLCollection.h: Add back include of Vector.h.
2748         * page/Frame.h: Ditto.
2749         * platform/Timer.h: Ditto.
2750
2751         - more changes for no-SVG (not working yet though)
2752
2753         * editing/CompositeEditCommand.h: Added css_valueimpl.h include.
2754
2755 2006-04-11  Darin Adler  <darin@apple.com>
2756
2757         - try to fix no-SVG build
2758
2759         * kwq/RenderTreeAsText.cpp: Added back an include only needed for non-SVG.
2760         * rendering/RenderObject.h: Ditto.
2761
2762 2006-04-11  Darin Adler  <darin@apple.com>
2763
2764         - try to fix Windows build
2765
2766         * ForwardingHeaders/kxmlcore/HashForward.h: Removed.
2767         * dom/xml_tokenizer.h: Include another header instead of HashForward.h.
2768         * loader/Cache.h: Ditto.
2769         * page/Page.h: Ditto.
2770         * platform/TransferJob.h: Ditto.
2771
2772 2006-04-11  Justin Garcia  <justin.garcia@apple.com>
2773
2774         Reviewed by harrison
2775         
2776         Fixes more instances of:
2777         <rdar://problem/3950559>
2778         CrashTracer: 2116 crashes in Mail at com.apple.WebCore: khtml::CompositeEditCommand::insertNodeAfter + 32
2779
2780         * editing/ReplaceSelectionCommand.cpp:
2781         (WebCore::ReplaceSelectionCommand::doApply): Do paragraph merging using moveParagraphs.
2782
2783 2006-04-11  Justin Garcia  <justin.garcia@apple.com>
2784
2785         Reviewed by harrison
2786         
2787         Some setup for work on paste performance.
2788
2789         * editing/CompositeEditCommand.cpp:
2790         (WebCore::CompositeEditCommand::moveParagraph): 
2791         Moved code from mergeParagraphs so that it can be used in ReplaceSelectionCommand.
2792         * editing/CompositeEditCommand.h:
2793         * editing/DeleteSelectionCommand.cpp:
2794         (WebCore::DeleteSelectionCommand::mergeParagraphs):
2795         (WebCore::DeleteSelectionCommand::doApply):
2796         * editing/VisiblePosition.cpp:
2797         (WebCore::VisiblePosition::init): Put the code that chooses m_deepPosition into initDeepPosition.
2798         (WebCore::VisiblePosition::initDeepPosition): 
2799         Fixed a bug: don't fall through to the code that's only for positions inside unrendered space between blocks when
2800         downstream() is a candidate.  Added a comment about why the fall through code is necessary.
2801         * editing/VisiblePosition.h:
2802
2803 2006-04-11  John Sullivan  <sullivan@apple.com>
2804
2805         Reviewed by Darin Adler.
2806         
2807         - fixed <rdar://problem/4509328> highlight all matches hangs when searching for tab character on www.google.com (and others)
2808         
2809         For reasons not yet completely understood, searching for a tab character on some pages (Google, Amazon) finds a match
2810         with a non-collapsed range but then claims that the end visible position of the match is the original start visible 
2811         position of the search range. This was causing the highlightAllMatches code to loop forever. Fixed the loop by 
2812         checking for the non-advancing search range explicitly. I'm going to track down a reduction of the bogus 
2813         search-for-tab issue, and write that up as a separate bug (that bug is not a regression; you can "find" a tab on 
2814         google in Tiger also).
2815
2816         * page/Frame.cpp:
2817         (WebCore::Frame::highlightAllMatchesForString):
2818         break the loop if the search range hasn't advanced
2819
2820 2006-04-10  Darin Adler  <darin@apple.com>
2821
2822         Rubber-stamped by John Sullivan (except for pbxproj change).
2823
2824         - updated to use the new Forward.h and HashForward.h headers
2825         - moved the showTree debugging functions out of the WebCore
2826           namespace so they are easier to call from gdb, and renamed
2827           the showTree member functions so they don't get in the way;
2828           now you can do "call showTree(x)" in gdb and it just works
2829         - removed a lot of unneeded includes
2830
2831         * WebCore.xcodeproj/project.pbxproj: Fixed a lot of paths that
2832         were not relative to the enclosing group.
2833
2834         * ForwardingHeaders/kxmlcore/Forward.h: Added.
2835         * ForwardingHeaders/kxmlcore/HashForward.h: Added.
2836         * bindings/js/JSCanvasRenderingContext2DBase.cpp:
2837         * bindings/js/JSXMLHttpRequest.cpp:
2838         * bindings/js/JSXMLHttpRequest.h:
2839         * bindings/js/JSXSLTProcessor.h:
2840         * bindings/js/kjs_binding.h:
2841         * bindings/js/kjs_dom.cpp:
2842         * bindings/js/kjs_dom.h:
2843         * bindings/js/kjs_events.cpp:
2844         * bindings/js/kjs_events.h:
2845         * bindings/js/kjs_html.cpp:
2846         * bindings/js/kjs_navigator.cpp:
2847         * bindings/js/kjs_navigator.h:
2848         * bindings/js/kjs_proxy.cpp:
2849         * bindings/js/kjs_traversal.h:
2850         * bindings/js/kjs_window.cpp:
2851         * bindings/js/kjs_window.h:
2852         * bindings/objc/DOM.mm:
2853         * bindings/objc/DOMCSS.mm:
2854         * bindings/objc/DOMCore.h:
2855         * bindings/objc/DOMEvents.mm:
2856         * bindings/objc/DOMHTML.mm:
2857         * bindings/objc/DOMImplementationFront.h:
2858         * bindings/objc/DOMInternal.mm:
2859         * bindings/objc/DOMUtility.mm:
2860         * bindings/objc/DOMViews.mm:
2861         * bridge/BrowserExtension.h:
2862         * bridge/mac/BrowserExtensionMac.mm:
2863         * bridge/mac/FrameMac.h:
2864         * bridge/mac/FrameMac.mm:
2865         * bridge/mac/WebCoreFrameBridge.mm:
2866         * bridge/mac/WebCoreFrameNamespaces.mm:
2867         * bridge/mac/WebCoreJavaScript.mm:
2868         * bridge/win/PageWin.cpp:
2869         * css/CSSComputedStyleDeclaration.cpp:
2870         * css/css_base.h:
2871         * css/css_ruleimpl.h:
2872         * css/css_valueimpl.cpp:
2873         * css/cssparser.cpp:
2874         * css/cssparser.h:
2875         * css/cssstyleselector.cpp:
2876         * css/cssstyleselector.h:
2877         * dom/AbstractView.h:
2878         * dom/AtomicStringList.h:
2879         * dom/Attribute.cpp:
2880         * dom/Attribute.h:
2881         * dom/Comment.cpp:
2882         * dom/ContainerNode.cpp:
2883         * dom/DOMImplementation.cpp:
2884         * dom/DOMImplementation.h:
2885         * dom/Document.cpp:
2886         * dom/Document.h:
2887         * dom/Element.h:
2888         * dom/EventTargetNode.cpp:
2889         (WebCore::EventTargetNode::dump):
2890         (WebCore::forbidEventDispatch):
2891         (WebCore::allowEventDispatch):
2892         (WebCore::eventDispatchForbidden):
2893         * dom/EventTargetNode.h:
2894         (WebCore::EventTargetNode::postDispatchEventHandler):
2895         * dom/NamedAttrMap.h:
2896         * dom/Node.cpp:
2897         (WebCore::Node::showNode):
2898         (WebCore::Node::showTree):
2899         (WebCore::Node::showTreeAndMark):
2900         (showTree):
2901         * dom/Node.h:
2902         * dom/NodeList.cpp:
2903         * dom/NodeList.h:
2904         * dom/Position.cpp:
2905         (showTree):
2906         * dom/Position.h:
2907         * dom/Range.cpp:
2908         * dom/Range.h:
2909         * dom/StyledElement.cpp:
2910         * dom/StyledElement.h:
2911         * dom/dom2_eventsimpl.cpp:
2912         * dom/dom2_eventsimpl.h:
2913         * dom/dom2_traversalimpl.h:
2914         * dom/dom_xmlimpl.cpp:
2915         * dom/xml_tokenizer.cpp:
2916         * dom/xml_tokenizer.h:
2917         * editing/AppendNodeCommand.cpp:
2918         * editing/ApplyStyleCommand.cpp:
2919         * editing/ApplyStyleCommand.h:
2920         * editing/BreakBlockquoteCommand.cpp:
2921         * editing/CompositeEditCommand.cpp:
2922         * editing/CreateLinkCommand.cpp:
2923         * editing/DeleteFromTextNodeCommand.cpp:
2924         * editing/DeleteFromTextNodeCommand.h:
2925         * editing/DeleteSelectionCommand.cpp:
2926         * editing/EditCommand.cpp:
2927         * editing/EditCommand.h:
2928         * editing/HTMLInterchange.cpp:
2929         * editing/InsertIntoTextNodeCommand.cpp:
2930         * editing/InsertIntoTextNodeCommand.h:
2931         * editing/InsertLineBreakCommand.cpp:
2932         * editing/InsertNodeBeforeCommand.cpp:
2933         * editing/InsertParagraphSeparatorCommand.cpp:
2934         * editing/InsertTextCommand.cpp:
2935         * editing/JSEditor.cpp:
2936         * editing/JoinTextNodesCommand.cpp:
2937         * editing/MergeIdenticalElementsCommand.cpp:
2938         * editing/ModifySelectionListLevelCommand.cpp:
2939         * editing/MoveSelectionCommand.cpp:
2940         * editing/RebalanceWhitespaceCommand.h:
2941         * editing/RemoveCSSPropertyCommand.h:
2942         * editing/ReplaceSelectionCommand.cpp:
2943         * editing/ReplaceSelectionCommand.h:
2944         * editing/Selection.cpp:
2945         (WebCore::Selection::formatForDebugger):
2946         (WebCore::Selection::showTree):
2947         (showTree):
2948         * editing/Selection.h:
2949         * editing/SelectionController.cpp:
2950         (WebCore::SelectionController::formatForDebugger):
2951         (WebCore::SelectionController::showTree):
2952         (showTree):
2953         * editing/SelectionController.h:
2954         * editing/TextIterator.cpp:
2955         * editing/TextIterator.h:
2956         * editing/TypingCommand.cpp:
2957         * editing/TypingCommand.h:
2958         * editing/UnlinkCommand.cpp:
2959         * editing/VisiblePosition.cpp:
2960         (WebCore::isEqualIgnoringAffinity):
2961         (WebCore::VisiblePosition::formatForDebugger):
2962         (WebCore::VisiblePosition::showTree):
2963         (showTree):
2964         * editing/VisiblePosition.h:
2965         (WebCore::VisiblePosition::VisiblePosition):
2966         (WebCore::operator==):
2967         * editing/WrapContentsInDummySpanCommand.cpp:
2968         * editing/htmlediting.h:
2969         * editing/markup.cpp:
2970         * editing/markup.h:
2971         (WebCore::):
2972         * editing/visible_units.cpp:
2973         * html/CanvasGradient.cpp:
2974         * html/CanvasRenderingContext2D.h:
2975         * html/CanvasStyle.cpp:
2976         * html/CanvasStyle.h:
2977         * html/FormDataList.cpp:
2978         * html/FormDataList.h:
2979         * html/HTMLCollection.cpp:
2980         * html/HTMLCollection.h:
2981         * html/HTMLDocument.cpp:
2982         * html/HTMLDocument.h:
2983         * html/HTMLElement.cpp:
2984         * html/HTMLElementFactory.cpp:
2985         * html/HTMLElementFactory.h:
2986         * html/HTMLFormCollection.cpp:
2987         * html/HTMLFormElement.cpp:
2988         * html/HTMLFormElement.h:
2989         * html/HTMLInputElement.cpp:
2990         * html/HTMLParser.cpp:
2991         * html/HTMLSelectElement.cpp:
2992         * html/HTMLSelectElement.h:
2993         * html/HTMLTokenizer.cpp:
2994         * html/HTMLTokenizer.h:
2995         * html/html_baseimpl.cpp:
2996         * html/html_headimpl.h:
2997         * kcanvas/KCanvasCreator.cpp:
2998         * kcanvas/KCanvasFilters.h:
2999         * kcanvas/KCanvasPath.h:
3000         * kcanvas/KCanvasResources.h:
3001         * kcanvas/KCanvasTreeDebug.cpp:
3002         * kcanvas/RenderPath.cpp:
3003         * kcanvas/RenderPath.h:
3004         * kcanvas/device/KRenderingDevice.h:
3005         * kcanvas/device/KRenderingPaintServerGradient.h:
3006         * kcanvas/device/KRenderingPaintServerPattern.h:
3007         * kcanvas/device/KRenderingPaintServerSolid.h:
3008         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
3009         * kcanvas/device/quartz/KCanvasMaskerQuartz.h:
3010         * kcanvas/device/quartz/KCanvasResourcesQuartz.h:
3011         * kcanvas/device/quartz/KCanvasResourcesQuartz.mm:
3012         * kcanvas/device/quartz/KRenderingPaintServerQuartz.h:
3013         * khtml/misc/decoder.cpp:
3014         * khtml/misc/decoder.h:
3015         * khtml/xsl/XSLStyleSheet.cpp:
3016         * khtml/xsl/XSLTProcessor.cpp:
3017         * khtml/xsl/XSLTProcessor.h:
3018         * ksvg2/css/SVGRenderStyle.h:
3019         * ksvg2/ecma/GlobalObject.cpp:
3020         * ksvg2/misc/KCanvasRenderingStyle.h:
3021         * ksvg2/misc/SVGDocumentExtensions.h:
3022         * ksvg2/svg/SVGAngle.h:
3023         * ksvg2/svg/SVGAnimateColorElement.h:
3024         * ksvg2/svg/SVGAnimatedColor.h:
3025         * ksvg2/svg/SVGAnimatedLengthList.h:
3026         * ksvg2/svg/SVGAnimatedNumberList.h:
3027         * ksvg2/svg/SVGAnimatedString.h:
3028         * ksvg2/svg/SVGAnimatedTransformList.h:
3029         * ksvg2/svg/SVGAnimationElement.h:
3030         * ksvg2/svg/SVGColor.h:
3031         * ksvg2/svg/SVGCursorElement.h:
3032         * ksvg2/svg/SVGHelper.h:
3033         * ksvg2/svg/SVGLength.h:
3034         * ksvg2/svg/SVGList.h:
3035         * ksvg2/svg/SVGPaint.h:
3036         * ksvg2/svg/SVGPathSeg.h:
3037         * ksvg2/svg/SVGPatternElement.h:
3038         * ksvg2/svg/SVGSVGElement.cpp:
3039         * ksvg2/svg/SVGSVGElement.h:
3040         * ksvg2/svg/SVGStringList.h:
3041         * ksvg2/svg/SVGTransform.h:
3042         * kwq/AccessibilityObjectCache.mm:
3043         * kwq/ClipboardMac.mm:
3044         * kwq/JavaAppletWidget.mm:
3045         * kwq/KWQComboBox.mm:
3046         * kwq/KWQEditCommand.mm:
3047         * kwq/KWQFileButton.mm:
3048         * kwq/KWQKHTMLSettings.h:
3049         * kwq/KWQKSSLKeyGen.mm:
3050         * kwq/KWQLoader.mm:
3051         * kwq/KWQPageState.mm:
3052         * kwq/KWQTextEdit.mm:
3053         * kwq/RegularExpression.h:
3054         * kwq/RenderTreeAsText.cpp:
3055         * kwq/RenderTreeAsText.h:
3056         * kwq/WebCoreAXObject.mm:
3057         * loader/Cache.cpp:
3058         * loader/Cache.h:
3059         * loader/CachedCSSStyleSheet.cpp:
3060         * loader/CachedObject.h:
3061         * loader/CachedScript.cpp:
3062         * loader/CachedXBLDocument.cpp:
3063         * loader/CachedXBLDocument.h:
3064         * loader/CachedXSLStyleSheet.cpp:
3065         * loader/CachedXSLStyleSheet.h:
3066         * loader/DocLoader.cpp:
3067         * page/Frame.cpp:
3068         * page/Frame.h:
3069         * page/FramePrivate.h:
3070         * page/FrameTree.cpp:
3071         * page/FrameTree.h:
3072         * page/FrameView.cpp:
3073         * page/FrameView.h:
3074         * page/Page.cpp:
3075         * page/Page.h:
3076         * page/Plugin.h:
3077         (WebCore::Plugin::Plugin):
3078         (WebCore::Plugin::view):
3079         * platform/Color.cpp:
3080         * platform/FloatRect.h:
3081         * platform/Font.cpp:
3082         * platform/Font.h:
3083         * platform/FontFamily.cpp:
3084         * platform/GraphicsContext.cpp:
3085         * platform/Image.cpp:
3086         * platform/Image.h:
3087         * platform/IntRect.h:
3088         * platform/KURL.cpp:
3089         * platform/KURL.h:
3090         * platform/SegmentedString.h:
3091         * platform/Shared.h:
3092         * platform/StreamingTextDecoder.cpp:
3093         * platform/StringImpl.cpp:
3094         * platform/StringImpl.h:
3095         * platform/TextEncoding.h:
3096         * platform/Timer.cpp:
3097         * platform/Timer.h:
3098         * platform/TransferJob.cpp:
3099         * platform/TransferJob.h:
3100         * platform/TransferJobInternal.h:
3101         * platform/cairo/GraphicsContextCairo.cpp:
3102         * platform/cairo/ImageCairo.cpp:
3103         * platform/cairo/ImageSourceCairo.cpp:
3104         * platform/image-decoders/gif/GIFImageReader.cpp:
3105         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
3106         * platform/mac/FontFamilyMac.mm:
3107         * platform/mac/FontMac.mm:
3108         * platform/mac/ImageMac.mm:
3109         * platform/mac/TextEncodingMac.cpp:
3110         * platform/mac/TransferJobMac.mm:
3111         * platform/win/FontPlatformDataWin.cpp:
3112         * platform/win/TransferJobWin.cpp:
3113         * rendering/RenderBlock.cpp:
3114         * rendering/RenderBlock.h:
3115         * rendering/RenderBox.cpp:
3116         * rendering/RenderBox.h:
3117         * rendering/RenderCanvas.cpp:
3118         * rendering/RenderCanvas.h:
3119         * rendering/RenderContainer.cpp:
3120         * rendering/RenderFlexibleBox.h:
3121         * rendering/RenderFlow.cpp:
3122         * rendering/RenderFlow.h:
3123         * rendering/RenderImage.cpp:
3124         * rendering/RenderImage.h:
3125         * rendering/RenderLayer.cpp:
3126         * rendering/RenderLayer.h:
3127         * rendering/RenderObject.cpp:
3128         (showTree):
3129         * rendering/RenderObject.h:
3130         * rendering/RenderTableCell.h:
3131         * rendering/RenderTableSection.h:
3132         * rendering/RenderText.cpp:
3133         * rendering/RenderText.h:
3134         * rendering/RenderTextField.cpp:
3135         * rendering/RenderTextFragment.h:
3136         * rendering/RenderTheme.h:
3137         * rendering/RenderThemeMac.mm:
3138         * rendering/RenderThemeWin.cpp:
3139         * rendering/bidi.cpp:
3140         * rendering/render_form.h:
3141         * rendering/render_line.cpp:
3142         (showTree):
3143         * rendering/render_line.h:
3144         * rendering/render_list.cpp:
3145         * rendering/render_replaced.cpp:
3146         * rendering/render_replaced.h:
3147         * rendering/render_style.cpp:
3148         * rendering/render_style.h:
3149         * xml/xmlhttprequest.h:
3150
3151 2006-04-10  Darin Adler  <darin@apple.com>
3152
3153         - try to fix the Windows build
3154
3155         * WebCore.vcproj/WebCore/WebCore.vcproj: Fix mistaken bad editing of
3156         AdditionalIncludeDirectories.
3157
3158 2006-04-10  David Hyatt  <hyatt@apple.com>
3159
3160         Make focus ring painting respect clips set by WebCore (e.g., overflow).
3161
3162         Reviewed by darin
3163
3164         * platform/GraphicsContext.h:
3165         * platform/mac/GraphicsContextMac.mm:
3166         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
3167         (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
3168         (WebCore::GraphicsContext::setFocusRingClip):
3169         (WebCore::GraphicsContext::clearFocusRingClip):
3170         (WebCore::GraphicsContext::drawFocusRing):
3171         * platform/mac/WebCoreGraphicsBridge.h:
3172         * platform/mac/WebCoreGraphicsBridge.m:
3173         (-[WebCoreGraphicsBridge drawFocusRingWithPath:radius:color:clipRect:]):
3174         * rendering/RenderLayer.cpp:
3175         (WebCore::setClip):
3176         (WebCore::restoreClip):
3177
3178 2006-04-10  Darin Adler  <darin@apple.com>
3179
3180         Reviewed by Geoff.
3181
3182         - death to khtml/ecma, long live bindings/js
3183
3184         * khtml/ecma: Removed. Moved all files to bindings/js.
3185
3186         * bindings/js/JSDOMParser.cpp: Added.
3187         * bindings/js/JSDOMParser.h: Added.
3188         * bindings/js/JSXMLHttpRequest.cpp: Added.
3189         * bindings/js/JSXMLHttpRequest.h: Added.
3190         * bindings/js/JSXMLSerializer.cpp: Added.
3191         * bindings/js/JSXMLSerializer.h: Added.
3192         * bindings/js/JSXSLTProcessor.cpp: Added.
3193         * bindings/js/JSXSLTProcessor.h: Added.
3194         * bindings/js/kjs_binding.cpp: Added.
3195         * bindings/js/kjs_binding.h: Added.
3196         * bindings/js/kjs_css.cpp: Added.
3197         * bindings/js/kjs_css.h: Added.
3198         * bindings/js/kjs_dom.cpp: Added.
3199         * bindings/js/kjs_dom.h: Added.
3200         * bindings/js/kjs_events.cpp: Added.
3201         * bindings/js/kjs_events.h: Added.
3202         * bindings/js/kjs_html.cpp: Added.
3203         * bindings/js/kjs_html.h: Added.
3204         * bindings/js/kjs_navigator.cpp: Added.
3205         * bindings/js/kjs_navigator.h: Added.
3206         * bindings/js/kjs_proxy.cpp: Added.
3207         * bindings/js/kjs_proxy.h: Added.
3208         * bindings/js/kjs_traversal.cpp: Added.
3209         * bindings/js/kjs_traversal.h: Added.
3210         * bindings/js/kjs_views.cpp: Added.
3211         * bindings/js/kjs_views.h: Added.
3212         * bindings/js/kjs_window.cpp: Added.
3213         * bindings/js/kjs_window.h: Added.
3214
3215         * DerivedSources.make: Removed khtml/ecma from directory list.
3216         * WebCore.vcproj/WebCore/WebCore.vcproj: Moved files from
3217         khtml/ecma to bindings/js.
3218         * WebCore.xcodeproj/project.pbxproj: Ditto.
3219
3220 2006-04-10  Darin Adler  <darin@apple.com>
3221
3222         Reviewed by Geoff.
3223
3224         - try to fix the Windows build
3225
3226         * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::reset):
3227         Put code to release m_drawingContext into an __APPLE__ ifdef.
3228
3229         * platform/win/TemporaryLinkStubs.cpp:
3230
3231 2006-04-10  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3232
3233         Reviewed by Eric, landed by ap.
3234
3235         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8295
3236           Dictionary pop-up panel targets the wrong word in a scrolled IFRAME
3237
3238         * kwq/WebCoreAXObject.mm:
3239         (-[WebCoreAXObject doAXTextMarkerForPosition:]): Removed the addition of scroll
3240         offsets, which is redundant for scrolled views, then changed the first view
3241         to be the document's scrolled view instead of its scroll view (all subsequent views were
3242         already scrolled views).
3243         * manual-tests/dictionary-scrolled-iframe.html: Added.
3244
3245 2006-04-09  Alexey Proskuryakov  <ap@nypop.com>
3246
3247         Reviewed by Darin.
3248
3249         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7877
3250         XMLHttpRequest ignores username/password passed to open()
3251
3252         Test: http/tests/xmlhttprequest/basic-auth.html
3253
3254         * platform/KURL.cpp:
3255         (KURL::setUser): Enable a code path that handles non-empty user name -
3256         it was already present, but commented out and protected with an assertion.
3257         (KURL::setPass): Ditto.
3258
3259 2006-04-09  Darin Adler  <darin@apple.com>
3260
3261         Reviewed by Anders.
3262
3263         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=4884
3264           Canvas element breaks when RenderObject creation is deferred by external CSS
3265
3266         Test: fast/canvas/canvas-before-css.html
3267
3268         This patch makes us match the canvas documentation in Hixie's Web Applications
3269         draft as far as when the canvas is created and recreated and how it's sized.
3270         It also gets rid of the compositeOperation attribute of the canvas element.
3271         We can add that back if we need it. Anders points out that this specifically
3272         changes behavior for canvas elements where the size is set in CSS and not with
3273         width and height attributes. The CSS size now determines how big a box the canvas
3274         is rendered into, but has no effect on the size of the canvas's buffer.
3275
3276         * html/CanvasRenderingContext2D.h: Added overloads of drawImage that take
3277         HTMLCanvasElement, which is no longer derived from HTMLImageElement.
3278         * html/CanvasRenderingContext2D.cpp:
3279         (WebCore::imageSize): Renamed from imageOrCanvasSize. Now used for images only,
3280         because canvas is no longer derived from image.
3281         (WebCore::CanvasRenderingContext2D::drawImage): Split the implementation of this
3282         for image sources from the implementation for canvas sources.
3283         (WebCore::CanvasRenderingContext2D::willDraw): Changed to call a new willDraw
3284         function on the canvas element.
3285         (WebCore::CanvasRenderingContext2D::drawingContext): Changed to call drawingContext
3286         on the canvas element rather than the renderer.
3287
3288         * html/HTMLCanvasElement.h: Changed HTMLCanvasElement to derive from HTMLElement
3289         instead of HTMLImageElement. Added width, height, setWidth, setHeight, willDraw,
3290         paint, drawingContext, createDrawingContext, and reset functions. Added m_size,
3291         m_createdDrawingContext, m_data, and m_drawingContext data members. Removed
3292         mapToEntry, attach, detach, and isURLAttribute functins.
3293
3294         * html/HTMLCanvasElement.cpp:
3295         (WebCore::HTMLCanvasElement::HTMLCanvasElement): Added initializers for new m_size,
3296         m_createdDrawingContext, m_data, and m_drawingContext data members.
3297         (WebCore::HTMLCanvasElement::~HTMLCanvasElement): Free m_data and m_drawingContext.
3298         (WebCore::HTMLCanvasElement::parseMappedAttribute): Got rid of special case for
3299         srcAttr, which is no longer needed since we aren't deriving from HTMLImageElement.
3300         Added code that triggers a reset when either width or height is set.
3301         (WebCore::HTMLCanvasElement::createRenderer): Added code to set the intrinsic
3302         width and height of the renderer to the size of the element.
3303         (WebCore::HTMLCanvasElement::setHeight): Added. Sets the height attribute.
3304         (WebCore::HTMLCanvasElement::setWidth): Added. Sets the width attribute.
3305         (WebCore::HTMLCanvasElement::willDraw): Added. Tells the renderer to repaint.
3306         Also has FIXME mentioning we could dirty only the part that has changed in the future.
3307         (WebCore::HTMLCanvasElement::reset): Added. Sets the size of the canvas and discards
3308         the old buffer, which is an indirect way of resetting the buffer to transparent black.
3309         (WebCore::HTMLCanvasElement::paint): Added. Draws the canvas image into the graphics
3310         context that's passed in.
3311         (WebCore::HTMLCanvasElement::createDrawingContext): Added. Allocates a buffer for
3312         the bits, then creates a bitmap context for drawing into the buffer.
3313         (WebCore::HTMLCanvasElement::drawingContext): Added. Calls createDrawingContext if
3314         needed, then returns the current drawing context.
3315         (WebCore::HTMLCanvasElement::createPlatformImage): Changed to always call CGContextFlush
3316         and to create the image from the context in this class.
3317
3318         * rendering/RenderHTMLCanvas.h: Remove almost all of the contents of this file.
3319         Removed ~RenderHTMLCanvas, setNeedsImageUpdate, element, updateDrawnImage, drawingContext,
3320         createDrawingContext, and drawnImage functions and _drawingContext, _drawingContextData,
3321         _drawnImage, and _needsImageUpdate booleans. Changed RenderHTMLCanvas to derive from
3322         RenderReplaced instead of RenderImage.
3323
3324         * rendering/RenderHTMLCanvas.cpp:
3325         (WebCore::RenderHTMLCanvas::RenderHTMLCanvas): Changed to only initialize RenderReplaced.
3326         (WebCore::RenderHTMLCanvas::renderName): Moved this in here, since there's no good reason
3327         to have this virtual function inlined.
3328         (WebCore::RenderHTMLCanvas::paint): Changed implementation to use HTMLCanvasElement::paint
3329         instead ofcalling CGContextDrawImage directly.
3330         (WebCore::RenderHTMLCanvas::layout): Removed the code that detects changes in width and
3331         causes the drawing context to be recreated; instead, if the width and height changes we
3332         scale when we paint the canvas.
3333
3334         * bindings/js/JSCanvasRenderingContext2DBase.cpp:
3335         (WebCore::JSCanvasRenderingContext2DBaseProtoFunc::callAsFunction):
3336         Separated out handling for <canvas> vs. <img> elements in drawRect, since
3337         HTMLCanvasElement is no longer derived from HTMLImageElement.
3338
3339 2006-04-09  Rob Buis  <buis@kde.org>
3340
3341         Reviewed by eseidel.  Landed by eseidel.
3342
3343         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6027:
3344         Dirty rect invalidation issues in mozilla sample
3345
3346         Make sure the paths calculate the new bounding box and not
3347         use the cached bbox.
3348
3349         No automated test case possible.
3350
3351         * kcanvas/RenderPath.cpp:
3352         (WebCore::RenderPath::setPath):
3353
3354 2006-04-09  Rob Buis  <buis@kde.org>
3355
3356         Reviewed by darin.  Landed by eseidel.
3357
3358         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6930:
3359         % width/height on nested <svg> tags do not work
3360
3361         Set the context correctly for inner <svg>, so calculation of
3362         width/height for inner <svg> elements is done against the
3363         viewport element.
3364
3365         Test: svg/custom/inner-percent.svg
3366
3367         * ksvg2/svg/SVGSVGElement.cpp:
3368         (WebCore::SVGSVGElement::width):
3369         (WebCore::SVGSVGElement::height):
3370
3371 2006-04-08  Rob Buis  <buis@kde.org>
3372
3373         Reviewed by eseidel.  Landed by eseidel.
3374
3375         No automated test case possible.
3376
3377         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=7531:
3378         hang in SVGPolygonElementImpl::toPathData in polygon test case
3379
3380         Make sure the points list is cleared, just like the path
3381         list is cleared first before (re)parsing.
3382
3383         * ksvg2/svg/SVGPolyElement.cpp:
3384         (SVGPolyElement::parseMappedAttribute):
3385
3386 2006-04-08  Darin Adler  <darin@apple.com>
3387
3388         Reviewed by Beth.
3389
3390         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7622
3391           REGRESSION: New text fields should compute maxlength considering composed character sequences
3392
3393         Test: fast/forms/input-text-maxlength.html
3394         Test: fast/forms/input-text-paste-maxlength.html
3395
3396         * html/HTMLInputElement.h: Removed all friend classes (not needed any more). Renamed
3397         typeEnum to InputType. Made init() function private. Tweaked parameter names and formatting
3398         in many function declarations. Made canHaveSelection, selectionStart, and selectionEnd
3399         const. Made data members except for m_name private instead of protected. Added private
3400         functions constrainValue and recheckValue. Removed unused isEditable function.
3401
3402         * html/HTMLInputElement.cpp:
3403         (WebCore::numGraphemeClusters): Added.
3404         (WebCore::numCharactersInGraphemeClusters): Added.
3405         (WebCore::HTMLInputElement::isKeyboardFocusable): Use inputType() instead of using m_type
3406         directly.
3407         (WebCore::HTMLInputElement::isMouseFocusable): Ditto.
3408         (WebCore::HTMLInputElement::focus): Ditto.
3409         (WebCore::HTMLInputElement::setInputType): Added code to call constrainValue or recheckValue
3410         so we will enforce maxLen if changing from a type that doesn't have maxLen to one that does.
3411         (WebCore::HTMLInputElement::type): More-standard formatting for switch statement. Put
3412         cases into alphabetical order.
3413         (WebCore::HTMLInputElement::state): Changed switch statement to include all case values and
3414         not include a default case to take advantage of gcc's missing case warning.
3415         (WebCore::HTMLInputElement::restoreState): Ditto.
3416         (WebCore::HTMLInputElement::canHaveSelection): Ditto.
3417         (WebCore::HTMLInputElement::selectionStart): Ditto.
3418         (WebCore::HTMLInputElement::selectionEnd): Ditto.
3419         (WebCore::HTMLInputElement::setSelectionStart): Ditto.
3420         (WebCore::HTMLInputElement::setSelectionEnd): Ditto.
3421         (WebCore::HTMLInputElement::select): Ditto.
3422         (WebCore::HTMLInputElement::setSelectionRange): Ditto.
3423         (WebCore::HTMLInputElement::click): Ditto.
3424         (WebCore::HTMLInputElement::accessKeyAction): Ditto.
3425         (WebCore::HTMLInputElement::parseMappedAttribute): Use inputType() instead of using m_type
3426         directly. Added call to recheckValue when parsing a new value for the maxlength attribute.
3427         (WebCore::HTMLInputElement::rendererIsNeeded): Changed switch statement to include all case
3428         values and not include a default case to take advantage of gcc's missing case warning.
3429         (WebCore::HTMLInputElement::createRenderer): Ditto.
3430         (WebCore::HTMLInputElement::attach): Remove code to condition the value attribute when done
3431         parsing. This is now all handled by constrainValue and recheckValue as needed.
3432         (WebCore::HTMLInputElement::isSuccessfulSubmitButton): Use inputType() instead of using
3433         m_type directly.
3434         (WebCore::HTMLInputElement::appendFormData): Ditto. Rearranged code a little.
3435         (WebCore::HTMLInputElement::setChecked): Ditto.
3436         (WebCore::HTMLInputElement::setIndeterminate): Ditto.
3437         (WebCore::HTMLInputElement::value): Ditto. Call constrainValue when reading the value out
3438         of the value attribute.
3439         (WebCore::HTMLInputElement::valueWithDefault): Use inputType() instead of using
3440         m_type directly. Changed switch statement to include all case values and not include a
3441         default case to take advantage of gcc's missing case warning.
3442         (WebCore::HTMLInputElement::setValue): Ditto. Call constrainValue when storing a value.
3443         (WebCore::HTMLInputElement::setValueFromRenderer): Added an assertion.
3444         (WebCore::HTMLInputElement::storesValueSeparateFromAttribute): Use inputType() instead of
3445         using m_type directly.
3446         (WebCore::HTMLInputElement::preDispatchEventHandler): Ditto.
3447         (WebCore::HTMLInputElement::postDispatchEventHandler): Ditto.
3448         (WebCore::HTMLInputElement::defaultEventHandler): Ditto. Changed code to truncate inserted
3449         text in a BeforeTextInsertedEvent to use the new constrainValue function and also the
3450         numGraphemeClusters function, so it's based on grapheme clusters instead of characters and
3451         shares code.
3452         (WebCore::HTMLInputElement::constrainValue): Added.
3453         (WebCore::HTMLInputElement::recheckValue): Added.
3454
3455         * html/HTMLIsIndexElement.cpp: (WebCore::HTMLIsIndexElement::HTMLIsIndexElement):
3456         Removed unneeded code to set m_type to TEXT, which is already what it gets set to by
3457         the base class's constructor.
3458
3459         * html/HTMLGenericFormElement.h: Removed unused isEditable function.
3460         * html/HTMLGenericFormElement.cpp: Ditto.
3461         * html/HTMLTextAreaElement.h: Ditto.
3462         * html/HTMLTextAreaElement.cpp: Ditto.
3463
3464         * platform/StringImpl.cpp: (WebCore::StringImpl::truncate): Changed > to >= so that
3465         truncating to the size of the string does nothing, efficiently.
3466
3467         * rendering/RenderText.h: Added declaration of characterBreakIterator.
3468         * rendering/RenderText.cpp:
3469         (WebCore::characterBreakIterator): Made this public so it can be used in other files.
3470         Maybe we should also move it to another source file later. Also renamed to remove the
3471         "get" from the title.
3472         (WebCore::RenderText::previousOffset): Updated for name change.
3473         (WebCore::RenderText::nextOffset): Updated for name change.
3474
3475         * rendering/RenderTextField.cpp: (WebCore::RenderTextField::updateFromElement):
3476         Removed code to implement maxlength checking. That's handled entirely in the DOM now.
3477         Also moved down the code to get the value into a string so that it's done only in the
3478         case where the string is used.
3479
3480         * rendering/render_form.cpp: (WebCore::RenderFileButton::valueChanged): Use setValueFromRenderer
3481         instead of setting the value directly in the input element. We changed this for all the other
3482         types a while ago, and it works just as well for the input element.
3483
3484         * dom/BeforeTextInsertedEvent.h: Added setText function. Previously, clients changed the text
3485         by modifying the text object in place, but going forward we'd like to avoid that sort of thing.
3486  
3487         * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplacementFragment::ReplacementFragment):
3488         Changed code to assume clients will change the text in the event rather than mutating the
3489         text object itself. This is compatible with possible future changes to String to be copy
3490         on write.
3491         * editing/TypingCommand.cpp: (WebCore::TypingCommand::insertText): Ditto.
3492
3493 2006-04-07  Darin Adler  <darin@apple.com>
3494
3495         Reviewed by Hyatt.
3496
3497         - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=8134
3498           REGRESSION: dragging down from the middle of a text field does not select to end of field
3499
3500         * editing/Selection.cpp:
3501         (WebCore::comparePositions): Added. Takes shadow content into account.
3502         (WebCore::Selection::validate): Changed to call comparePositions instead of calling
3503         Range::compareBoundaryPoints directly. Also removed unneeded code to redundantly set
3504         m_start and m_end to null and did a bit of reformatting.
3505
3506         - some tiny efficiency improvements to the tokenizer -- no measurable speedup, but removes
3507           a little bit of unneeded code
3508
3509         * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::parseTag): Changed all the places
3510         that do "unsigned short x = *c" to "unsigned short x = c->unicode()" when c is a QChar,
3511         otherwise we do an unnecessary conversion to char (which requires a branch to see if
3512         the c fits in a char).
3513
3514 2006-04-07  Justin Garcia  <justin.garcia@apple.com>
3515
3516         Reviewed by harrison
3517         
3518         Rolled the fix for 8250 back in and fixed a bug:
3519         The local variables for the first and last nodes in the fragment
3520         need to be reset when the fragment is changed for plaintext-only mode
3521         or a change from the beforetextinserted event handler.
3522
3523         * editing/ReplaceSelectionCommand.cpp:
3524         (WebCore::ReplacementFragment::ReplacementFragment):
3525
3526 2006-04-07  Maciej Stachowiak  <mjs@apple.com>
3527
3528         Reviewed by Darin.
3529         
3530         - fixed REGRESSION: offsetParent on element with no offset parent crashes
3531
3532         * dom/Element.cpp:
3533         (WebCore::Element::offsetParent): Add missing null check.
3534
3535 2006-04-07  Justin Garcia  <justin.garcia@apple.com>
3536
3537         Reviewed by adele
3538         
3539         maxlength truncation in text fields didn't work if the fragment was a
3540         single text node.
3541
3542         * editing/ReplaceSelectionCommand.cpp:
3543         (WebCore::ReplacementFragment::ReplacementFragment):
3544
3545 2006-04-07  Justin Garcia  <justin.garcia@apple.com>
3546
3547         Reviewed by harrison
3548         
3549         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8250>
3550         REGRESSION: Interchange newlines aren't passed with the khtmlBeforeTextInsertedEvent
3551
3552         * editing/ReplaceSelectionCommand.cpp:
3553         (WebCore::ReplacementFragment::ReplacementFragment):
3554         Interchange content removal happened before khtmlBeforeTextInsertedEvent was sent.
3555
3556 2006-04-07  Justin Garcia  <justin.garcia@apple.com>
3557
3558         Reviewed by adele
3559         
3560         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8219>
3561         REGRESSION: Two extra newlines added when pasting a single styled line into a plaintext-only region
3562
3563         * editing/ReplaceSelectionCommand.cpp:
3564         (WebCore::ReplacementFragment::ReplacementFragment):
3565         Converting the fragment to plaintext introduced an extraneous newline because
3566         the range passed to plainText ended after the paragraph containing the fragment
3567         built from the markup that TextEdit put on the paste board.  TextIterator will
3568         emit a newline when it exits a paragraph.
3569         Two extra newlines were added because the '\n' in the plaintext string turns
3570         into an interchange newline, which isn't removed because of 8250, and the
3571         interchange newline looks like inline content that requires the insertion of
3572         a paragraph separator during paste.
3573         Fixed by creating a range using VisiblePositions at the start and the end of 
3574         the node that holds the fragment during paste's test rendering.
3575
3576 2006-04-06  Justin Garcia  <justin.garcia@apple.com>
3577
3578         Reviewed by harrison
3579         
3580         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8145>
3581         REGRESSION: Pasting text from TextEdit with a bold word into text field results in crash
3582
3583         * editing/AppendNodeCommand.cpp:
3584         (WebCore::AppendNodeCommand::doApply): 
3585         Assert that the node will be placed somewhere that's contenteditable.
3586         * editing/InsertNodeBeforeCommand.cpp:
3587         (WebCore::InsertNodeBeforeCommand::doApply): Ditto
3588         * editing/JSEditor.cpp: 
3589         Enabled insertHTML for plaintext-only regions since it's useful for debugging rich 
3590         content pastes into the new text fields.
3591         * editing/ReplaceSelectionCommand.cpp:
3592         (WebCore::ReplaceSelectionCommand::doApply):
3593         1) After the first paragraph of the fragment has been merged with the first part of the
3594         paragraph where the paste occured, if the next node to be inserted is inline, we put it 
3595         in a new paragraph because it was at the start of a paragraph in the fragment.  The change
3596         is to insert a paragraph separator if insertionPos.next() is null or outside of the current 
3597         editable region.
3598         2) Before the paste begins, a paragraph separator is inserted in order to avoid 
3599         nesting blocks from the fragment to be pasted inside the block where the paste will 
3600         occur.  I made two fixes to the code that decides whether or not to insert the 
3601         paragraph separator and added testcases for each.  Added a fixme because it appears that
3602         this code is also used to ensure that the aforementioned insertionPos will be at the end of 
3603         a paragraph.  This code should only be about preventing nesting.
3604
3605 2006-04-06  Maciej Stachowiak  <mjs@apple.com>
3606
3607         Reviewed by Anders.
3608
3609         - Convert Element JS bindings to be almost completely autogenerated
3610         http://bugzilla.opendarwin.org/show_bug.cgi?id=8227
3611
3612         * dom/Element.idl: Declare full interface in IDL.
3613         * dom/Element.h:
3614         (WebCore::Element::tagQName): Renamed from tagName, so the real DOM
3615         method can be called tagName.
3616         (WebCore::Element::tagName): inline alias for nodeName.
3617         * dom/Element.cpp:
3618         (WebCore::Element::scrollByUnits): Moved logic from JS bindings to
3619         core DOM.
3620         (WebCore::Element::scrollByLines): ditto
3621         (WebCore::Element::scrollByPages): ditto
3622         (WebCore::Element::offsetLeft): ditto, plus make unrendered elements return 0 not undefined
3623         (WebCore::Element::offsetTop): ditto, plus make unrendered elements return 0 not undefined
3624         (WebCore::Element::offsetWidth): ditto, plus make unrendered elements return 0 not undefined
3625         (WebCore::Element::offsetHeight): ditto, plus make unrendered elements return 0 not undefined
3626         (WebCore::Element::offsetParent): ditto
3627         (WebCore::Element::clientWidth): ditto, plus make unrendered elements return 0 not undefined
3628         (WebCore::Element::clientHeight): ditto, plus make unrendered elements return 0 not undefined
3629         (WebCore::Element::scrollLeft): ditto
3630         (WebCore::Element::scrollTop): ditto
3631         (WebCore::Element::setScrollLeft): ditto
3632         (WebCore::Element::setScrollTop): ditto
3633         (WebCore::Element::scrollWidth): ditto, plus make unrendered elements return 0 not undefined
3634         (WebCore::Element::scrollHeight): ditto, plus make unrendered elements return 0 not undefined
3635
3636         * bindings/scripts/CodeGeneratorJS.pm: Added support for
3637         ConvertUndefinedToTrue, for benefit of scroll methods where
3638         omitted arguments should be treated as true.  However, maybe
3639         explicit overloading in the IDL would be a better long-term
3640         approach for optional arguments.
3641
3642         * khtml/ecma/kjs_binding.cpp:
3643         (KJS::valueToStringWithNullCheck): fixed formatting
3644         (KJS::valueToBooleanTreatUndefinedAsTrue): added for binding of scrollIntoView
3645         (isn't this lame?)
3646         * khtml/ecma/kjs_binding.h:
3647         (KJS::toJS): fixed formatting, added new stuff
3648         * khtml/ecma/kjs_dom.cpp:
3649         (KJS::DOMElement::getValueProperty): removed most of contents
3650         (KJS::DOMElement::putValueProperty): ditto
3651         (KJS::DOMElementProtoFunc::callAsFunction): ditto
3652
3653         * css/cssstyleselector.cpp:
3654         (WebCore::CSSStyleSelector::canShareStyleWithElement): updated for rename
3655         of tagName to tagQName
3656         (WebCore::CSSStyleSelector::checkOneSelector): ditto
3657         * dom/Document.cpp:
3658         (WebCore::Document::importNode): ditto
3659         * editing/ApplyStyleCommand.cpp:
3660         (WebCore::ApplyStyleCommand::removeInlineStyle): ditto
3661         (WebCore::areIdenticalElements): ditto
3662         * html/HTMLElement.cpp:
3663         (WebCore::HTMLElement::inEitherTagList): ditto
3664         (WebCore::HTMLElement::inInlineTagList): ditto
3665         (WebCore::HTMLElement::inBlockTagList): ditto
3666
3667 2006-04-06  Beth Dakin  <bdakin@apple.com>
3668
3669         Reviewed by Darin.
3670
3671         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8203 
3672         REGRESSION: "Invite a friend" text field in GMail page spills out 
3673         of table
3674
3675         RenderReplaced::calcMinMaxWidth() sets m_minWidth to 0 when the 
3676         width is a percent, so this patch copies that behavior into 
3677         RenderTextField::calcMinMaxWidth().
3678
3679         * rendering/RenderTextField.cpp:
3680         (WebCore::RenderTextField::calcMinMaxWidth):
3681
3682 2006-04-06  Darin Adler  <darin@apple.com>
3683
3684         - try to fix Windows build
3685
3686         * WebCore.vcproj/WebCore/WebCore.vcproj: Add JSDocument.cpp.
3687
3688 2006-04-05  Darin Adler  <darin@apple.com>
3689
3690         Reviewed by Adele.
3691
3692         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8111
3693           REGRESSION (NativeTextField): first click in form field on weather.com leaves focus
3694           but no caret
3695
3696         Test: fast/forms/input-text-self-emptying-click.html
3697
3698         * page/MouseEventWithHitTestResults.h: Removed url, target, m_url and m_target,
3699         replacing them with isOverLink and m_isOverLink. Replaced innerNode with targetNode,
3700         and added logic to handle the case where the target node is removed from the document
3701         but the element the target node was in is still inside the document.
3702         * page/MouseEventWithHitTestResults.cpp: Added.
3703
3704         * WebCore.xcodeproj/project.pbxproj: Added MouseEventWithHitTestResults.cpp.
3705         * WebCore.vcproj/WebCore/WebCore.vcproj: Ditto.
3706
3707         * kwq/RenderTreeAsText.cpp: (nodePosition): Added a call to shadowParentNode so we
3708         correctly dump positions within shadow trees. This was needed to give a good result
3709         from my new test for this bug.
3710
3711         * dom/Document.cpp:
3712         (WebCore::Document::prepareMouseEvent): Update to pass fewer parameters to the
3713         constructor for MouseEventWithHitTestResults. Now takes isOverLink boolean, and no
3714         longer takes href and target parameters.
3715
3716         * page/Frame.cpp:
3717         (WebCore::Frame::handleMousePressEventDoubleClick): Use new name targetNode, instead
3718         of old name innerNode.
3719         (WebCore::Frame::handleMousePressEventTripleClick): Ditto.
3720         (WebCore::Frame::handleMousePressEventSingleClick): Ditto. Also change code to check
3721         if over a link to use !isOverLink instead of url.isNull.
3722         (WebCore::Frame::handleMousePressEvent): Ditto. Also remove unused "url" local variable.
3723         (WebCore::Frame::handleMouseMoveEvent): Ditto.
3724         (WebCore::Frame::handleMouseReleaseEvent): Ditto.
3725         (WebCore::Frame::passWidgetMouseDownEventToWidget): Ditto.
3726
3727         * bridge/mac/FrameMac.mm:
3728         (WebCore::FrameMac::handleMousePressEvent): Use new name targetNode, instead of old
3729         name innerNode.
3730         (WebCore::FrameMac::handleMouseMoveEvent): Ditto.
3731         (WebCore::FrameMac::passSubframeEventToSubframe): Ditto.
3732         (WebCore::FrameMac::sendContextMenuEvent): Ditto.
3733
3734         * page/FrameView.cpp:
3735         (WebCore::subframeForEvent): Use new name targetNode, instead of old name innerNode.
3736         (WebCore::FrameView::handleMousePressEvent): Ditto.
3737         (WebCore::FrameView::handleMouseDoubleClickEvent): Ditto.
3738         (WebCore::selectCursor): Ditto. Also change code to check if over a link to use
3739         isOverLink instead of !url.isNull.
3740         (WebCore::FrameView::handleMouseMoveEvent): Ditto.
3741         (WebCore::FrameView::handleMouseReleaseEvent): Ditto.
3742         (WebCore::FrameView::updateDragAndDrop): Ditto.
3743
3744 2006-04-05  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3745
3746         Reviewed and landed by Maciej.
3747
3748         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8184
3749           REGRESSION (r13655): Layer outline not clipped where it should be
3750
3751         * rendering/RenderLayer.cpp:
3752         (WebCore::RenderLayer::calculateRects): Reverted this part of the fix for bug 7943.
3753         The outlineRect should not be inflated.
3754
3755 2006-04-05  Rob Buis  <buis@kde.org>
3756
3757         Reviewed by Eric, landed by Maciej.
3758
3759         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=7627:
3760         SVG from the W3C SVG 1.1 test suite (cubic01.svg) renders as all black
3761
3762         Fix this svg stylesheet to use strict-mode, as this makes sure
3763         class selecting is done correctly.
3764
3765         * ksvg2/svg/SVGStyleElement.cpp:
3766         (SVGStyleElement::childrenChanged):
3767
3768 2006-04-05  Justin Garcia  <justin.garcia@apple.com>
3769
3770         Reviewed by mjs
3771
3772         I forgot to convert one of the implicit remove/inserts to an explicit remove/insert,
3773         so we were hitting the assert I just added to InsertNodeBeforeCommand that checked for
3774         implicit removes.
3775
3776         * editing/ReplaceSelectionCommand.cpp:
3777         (WebCore::ReplaceSelectionCommand::doApply):
3778
3779 2006-04-05  Maciej Stachowiak  <mjs@apple.com>
3780
3781         Reviewed by Anders.
3782
3783         - autogenerate bindings for all of the methods and properties of Document
3784         http://bugzilla.opendarwin.org/show_bug.cgi?id=8163
3785
3786         - also removed document.actualEncoding since it is not in any spec
3787         or implemented by any other browser
3788         
3789         * DerivedSources.make: add JSDocument.h to results
3790         * WebCore.xcodeproj/project.pbxproj: Added new files to project
3791         * bindings/scripts/CodeGeneratorJS.pm: Support for new stuff needed by Document.
3792         * dom/Document.cpp:
3793         (WebCore::Document::readyState): moved impl here from JS bindings
3794         (WebCore::Document::inputEncoding): ditto
3795         (WebCore::Document::defaultCharset): ditto
3796         (WebCore::Document::setCharset): ditto
3797         * dom/Document.h:
3798         (WebCore::Document::charset): added, synonym for inputEncoding.
3799         (WebCore::Document::characterSet): ditto
3800         * dom/Document.idl: Added. Full interface for the Document object.
3801         * khtml/ecma/JSXMLHttpRequest.cpp:
3802         (KJS::JSXMLHttpRequestProtoFunc::callAsFunction): JSDocument, not DOMDocument
3803         * khtml/ecma/JSXSLTProcessor.cpp:
3804         (KJS::XSLTProcessorProtoFunc::callAsFunction): ditto
3805         * khtml/ecma/kjs_binding.cpp:
3806         (KJS::jsStringOrFalse): Added this convenience for the method on Document
3807         that bizzarely returns false on failure and a string otherwise.
3808         * khtml/ecma/kjs_binding.h:
3809         * khtml/ecma/kjs_css.cpp:
3810         (KJS::toJS): renamed for consistency
3811         * khtml/ecma/kjs_css.h:
3812         * khtml/ecma/kjs_dom.cpp:
3813         - removed all traces of DOMDocument
3814         (KJS::toJS): JSDocument, not DOMDocument
3815         * khtml/ecma/kjs_dom.h:
3816         * khtml/ecma/kjs_html.cpp:
3817         (KJS::):
3818         (KJS::JSHTMLDocument::JSHTMLDocument): inherit from JSDocument
3819         (KJS::JSHTMLDocument::getOwnPropertySlot): ditto
3820         (KJS::JSHTMLDocument::put): ditto
3821         * khtml/ecma/kjs_html.h:
3822         * khtml/ecma/kjs_traversal.cpp:
3823         (KJS::toJS): added overloads
3824         (KJS::toNodeFilter): handle JS functions as well as impl NodeFilter objects
3825         * khtml/ecma/kjs_traversal.h:
3826         * platform/AtomicString.h:
3827         (WebCore::AtomicString::AtomicString): Allow implicit conversion from String.
3828
3829 2006-04-05  Justin Garcia  <justin.garcia@apple.com>
3830
3831         Reviewed by darin
3832         
3833         <http://bugzilla.opendarwin.org/show_bug.cgi?id=8198>
3834         Hitting an assert on undo paste
3835         
3836         ReplaceSelectionCommand was doing a combination of undoable and non-undoable 
3837         removes from the ReplacementFragment.  On Undo Paste, the undoable removes 
3838         couldn't be undone because the tree was in a different state than it was
3839         at the time of the remove.  This patch makes all the removes from the fragment 
3840         non-undoable.  We could make them all undoable, but I can't think of any reason 
3841         why we'd want the fragment to be reconstructed on an Undo Paste.
3842
3843         * editing/AppendNodeCommand.cpp:
3844         (WebCore::AppendNodeCommand::doApply):
3845         Assert that the node to append isn't already in a tree, since if it is, it will 
3846         be removed in a non-undoable way.
3847         * editing/InsertNodeBeforeCommand.cpp:
3848         (WebCore::InsertNodeBeforeCommand::doApply): Ditto.
3849         * editing/ReplaceSelectionCommand.cpp:
3850         (WebCore::ReplaceSelectionCommand::doApply): 
3851         Nodes were being moved from the fragment to the document with undoable inserts.  
3852         Undoable inserts implicitly remove the node (in a non-undoable way) from its 
3853         old location if it is already in a tree.  I now explicitly remove the nodes 
3854         from the fragment before inserting them into the document to make it clear that 
3855         they are being removed in a non-non-undoable way.  I also changed the one undoable 
3856         remove from the fragment to a non-undoable remove.
3857         * editing/ReplaceSelectionCommand.h: 
3858         Made ReplacementFragment's non-undoable removeNode public.
3859
3860 2006-04-05  Darin Adler  <darin@apple.com>
3861
3862         - fixed the build
3863
3864         * WebCore.xcodeproj/project.pbxproj: Oops! Resolved merge conflict.
3865
3866 2006-04-05  Darin Adler  <darin@apple.com>
3867
3868         Reviewed by Maciej.
3869
3870         - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8049
3871           StringImpl hash traits deleted value creates an init routine for WebCore
3872           <rdar://problem/4442248> REGRESSION: WebCore has init routines (8049)
3873
3874         * platform/StringHash.h: Added. Moved hash functions and such for
3875         WebCore::String and friends into this file so we don't have to include
3876         the hash traits header everywhere. Changed hashing for WebCore::StringImpl
3877         and WebCore::String so that they use a raw pointer for the underlying
3878         storage type, taking advantage of the new feature added in JavaScriptCore.
3879
3880         * platform/AtomicString.h: Moved StrHash specialization to StringHash.h.
3881         * platform/PlatformString.h: Moved StrHash specialization to StringHash.h.
3882         * platform/StringImpl.h: Moved StrHash, CaseInsensitiveHash, and HashTraits
3883         to StringHash.h. Left DefaultHash behind so that you can't get the wrong
3884         hash function by accident if you forget to include "StringHash.h".
3885
3886         * platform/StringImpl.cpp: Added include of StringHash.h and removed
3887         RefPtr<StringImpl> HashTraits<RefPtr<StringImpl> >::_deleted, which is
3888         the object with a global initializer causing all the trouble!
3889
3890         * kwq/AccessibilityObjectCache.h: Changed hash function to be IntHash
3891         instead of PtrHash.
3892
3893         * dom/StyledElement.cpp: Changed MappedAttributeKeyTraits to inherit from
3894         the generic traits in KXMLCore so we get a StorageType. Also cleaned up a
3895         tiny bit by adding default values to the MappedAttributeKey constructor.
3896
3897         * platform/CharsetNames.cpp: Changed hash traits here to be a new
3898         TextEncodingIDHashTraits struct rather than defining new default traits
3899         for the integer type since more integer types have default traits in
3900         HashTraits.h now. Also added a specialization so this class will share
3901         the underlying implementation (since InvalidEncoding happens to be -1).
3902
3903         * bridge/mac/FrameMac.h:
3904         * dom/Document.h:
3905         * dom/xml_tokenizer.h:
3906         * khtml/xsl/XSLTProcessor.h:
3907         * kwq/JavaAppletWidget.h:
3908         * page/FramePrivate.h:
3909         * page/Page.cpp:
3910         * platform/AtomicString.cpp:
3911         * platform/TransferJob.h:
3912         * rendering/render_applet.h:
3913         Added include of StringHash.h.
3914
3915         * WebCore.xcodeproj/project.pbxproj: Added StringHash.h. Remove unneeded
3916         CREATE_HASH_TABLE variable in build settings. Re-sorted some file lists.
3917         Added quotes to the CREATE_HASH_TABLE initialization in the rule that
3918         builds generated files. Removed various unneeded build settings for that
3919         target as well.
3920
3921         * ForwardingHeaders/kxmlcore/HashTraits.h: Added.
3922
3923         - other minor cleanup
3924
3925         * bridge/mac/FrameMac.mm: Sorted includes.
3926         * dom/Node.cpp: Removed bogus symbol after #endif.
3927
3928         * khtml/xsl/XSLTProcessor.cpp: Sorted includes. Removed redundant using
3929         namespace WebCore.
3930         * loader/Cache.cpp: Ditto.
3931
3932 2006-04-05  Beth Dakin  <bdakin@apple.com>
3933
3934         Reviewed by Darin.
3935
3936         Fix for <rdar://problem/4502311> text-transform:capitalize needs to 
3937         treat nbsp as a regular space when ICU changes
3938
3939         There will be future changes in ICU to match the Unicode 4.1 
3940         standard which no longer recognizes &nbsp as a word separator. We 
3941         need to work around this with text-transform:capitalize because 
3942         words after non-breaking spaces still need to be capitalized.
3943
3944         No layout tests added because existing layout tests cover this.
3945
3946         * platform/StringImpl.cpp:
3947         (WebCore::StringImpl::capitalize): If the character is a non-
3948         breaking space, add a regular space to our temporary buffer, 
3949         otherwise, just copy the character in.
3950
3951 2006-04-05  Alexey Proskuryakov  <ap@nypop.com>
3952
3953         Reviewed by Darin.
3954
3955         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8110
3956           Define navigator.vendorSub (bcms.gov.uk doesn't allow access to login page)
3957
3958         Test: fast/dom/navigator-vendorSub.html
3959
3960         * khtml/ecma/kjs_navigator.cpp:
3961         (KJS::Navigator::getValueProperty): Return an empty string for vendorSub property.
3962         * khtml/ecma/kjs_navigator.h:
3963
3964 2006-04-04  Darin Adler  <darin@apple.com>
3965
3966         Reviewed by Justin (editing parts) and Adele (the rest).
3967
3968         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8182
3969           some text-field-related layout tests are failing
3970
3971         The smart paste code was getting confused and adding extra spaces.
3972
3973         * editing/ReplaceSelectionCommand.cpp:
3974         (WebCore::ReplaceSelectionCommand::doApply): Use isStartOfParagraph instead of
3975         isStartOfLine.
3976         (WebCore::ReplaceSelectionCommand::removeLinePlaceholderIfNeeded): Ditto.
3977
3978         * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::enclosingEmptyListItem):
3979         Change to call isStart/EndOfParagraph instead of Line.
3980
3981         * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::input):
3982         Add a comment about how isStartOfLine is almost certainly wrong here.
3983
3984         - clean up some loose ends in the Frame class from the recent renaming
3985
3986         * page/Frame.h: Removed declarations of deleteMe1, deleteMe2, and
3987         handleMouseMoveEventPart2.
3988         * page/Frame.cpp: (WebCore::Frame::handleMouseMoveEvent): Removed
3989         handleMouseMoveEventPart2 by renaming it to handleMouseMoveEvent and removing
3990         handleMouseMoveEvent itself.
3991
3992         - invoke the makefile directly, removing the generate-derived-sources script
3993
3994         * WebCore.vcproj/WebCore/build-generated-files.sh: Call make directly.
3995         * WebCore.xcodeproj/project.pbxproj: Ditto.
3996         * generate-derived-sources: Removed.
3997
3998 2006-04-04  Adele Peterson  <adele@apple.com>
3999
4000         Reviewed by Justin.
4001
4002         - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8158
4003         REGRESSION: Clicking past RTL text in a new text field puts the caret on the wrong side of the text
4004
4005         Tests:
4006         editing/selection/caret-rtl.html
4007         editing/selection/caret-rtl-2.html
4008
4009         * rendering/RenderText.cpp: (WebCore::RenderText::positionForCoordinates):
4010         When calculating the position for the beginning or end of an InlineTextBox,
4011         we now use offsetForPosition instead of just using m_start and m_len, because
4012         offsetForPosition will take rtl text into account.  I also made some formatting
4013         changes.
4014
4015 2006-04-04  David Hyatt  <hyatt@apple.com>
4016
4017         Fix for bug 8065, inline blocks incorrectly loses spaces between them.
4018
4019         Reviewed by beth
4020
4021         * dom/Text.cpp:
4022         (WebCore::Text::rendererIsNeeded):
4023
4024 2006-04-04  Adele Peterson  <adele@apple.com>
4025
4026         Reviewed by Hyatt.
4027
4028         - Fix for:
4029         http://bugzilla.opendarwin.org/show_bug.cgi?id=8092
4030         REGRESSION (NativeTextField): table contents misaligned in Netflix queue
4031
4032         http://bugzilla.opendarwin.org/show_bug.cgi?id=8141
4033         REGRESSION: Native text field fails to wrap inside table
4034
4035         http://bugzilla.opendarwin.org/show_bug.cgi?id=8072
4036         REGRESSION: text fields at connect.apple.com spill out of the containing box
4037
4038         Test: fast/forms/input-table.html
4039
4040         Rewrote calcMinMaxWidth for text fields so it considers width, 
4041         min-width, and max-width settings as well as the size attribute.
4042
4043         * rendering/RenderTextField.cpp: (WebCore::RenderTextField::calcMinMaxWidth):
4044
4045 2006-04-04  Beth Dakin  <bdakin@apple.com>
4046
4047         Reviewed by Darin.
4048
4049         This is a followup to my fix for <rdar://problem/4493218>
4050         
4051         This patch re-names computeIntLength() and computeShortLength() to 
4052         be computeLengthInt() and computeLengthShort(), respectively, to 
4053         match the pre-existing computeLengthFloat(). This patch also adds 
4054         the slightly confusing-ly named computeLengthIntForLength() which 
4055         uses the max and min values of a 28-bit integer as bounds for 
4056         overflow. This function is necessary because Length objects expect 
4057         28-bit integers. 
4058
4059         * css/css_valueimpl.cpp:
4060         (WebCore::CSSPrimitiveValue::computeLengthInt):
4061         (WebCore::CSSPrimitiveValue::computeLengthIntForLength):
4062         (WebCore::CSSPrimitiveValue::computeLengthShort):
4063         * css/css_valueimpl.h:
4064         * css/cssstyleselector.cpp:
4065         (WebCore::convertToLength):
4066         (WebCore::CSSStyleSelector::applyProperty):
4067         (WebCore::CSSStyleSelector::mapBackgroundXPosition):
4068         (WebCore::CSSStyleSelector::mapBackgroundYPosition):
4069
4070 2006-04-04  Timothy Hatcher  <timothy@apple.com>
4071
4072         Reviewed by Darin.
4073
4074         The Debug and Release frameworks are now built with install paths relative to the build products directory.
4075         This removes the need for other projects to build with -framework WebCore and -framework JavaScriptCore. 
4076
4077         * WebCore.xcodeproj/project.pbxproj:
4078
4079 2006-04-04  Justin Garcia  <justin.garcia@apple.com>
4080
4081         Reviewed by darin
4082         
4083         <http://bugzilla.opendarwin.org/show_bug.cgi?id=6608>
4084         REGRESSION: Line disappears when deleting
4085         
4086         Rewrote moveNodesAfterNode to address these problems:
4087         It moved nodes without preserving their style. 
4088         It traversed over siblings looking for a br to know&nbs