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