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