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