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