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