LayoutTests:
[WebKit-https.git] / WebCore / ChangeLog
1 2006-12-28  Mitz Pettel  <mitz@webkit.org>
2
3         Reviewed by Darin.
4
5         - fix http://bugs.webkit.org/show_bug.cgi?id=10699
6           div with border-radius does not redraw properly if element inside div is resized
7
8         Test: fast/repaint/border-radius-repaint.html
9
10         * rendering/RenderObject.cpp:
11         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
12
13 2006-12-28  Darin Adler  <darin@apple.com>
14
15         * loader/CachedImage.cpp: (WebCore::CachedImage::createImage):
16         Fixed an #ifdef PLATFORM(CG) that should be #if PLATFORM(CG).
17         Might have broken the build on some platforms.
18
19 2006-12-27  Geoffrey Garen  <ggaren@apple.com>
20
21         Build fix, plus a few "double &" => "double&" changes.
22         
23         * ksvg2/svg/SVGParserUtilities.cpp:
24         (WebCore::parseNumber):
25         (WebCore::SVGPathParser::calculateArc):
26
27 2006-12-27  Oliver Hunt <oliver@apple.com> 
28
29         Build fix
30
31         * platform/graphics/BitmapImage.h:
32         * platform/graphics/Image.cpp:
33         * platform/graphics/Image.h:
34         (WebCore::Image::getHBITMAP):
35         * platform/graphics/cg/PDFDocumentImage.cpp:
36         (WebCore::PDFDocumentImage::PDFDocumentImage):
37
38 2006-12-27  Eric Seidel  <eric@webkit.org>
39
40         Reviewed by olliej.
41
42         Add new PDFDocumentImage and BitmapImage classes (subclasses of Image)
43         (In preparation for adding SVGImage as part of bug 5971)
44         http://bugs.webkit.org/show_bug.cgi?id=11990
45         
46         Test cases landed separately as part of filing bug 11992.
47
48         * WebCore.xcodeproj/project.pbxproj: add BitmapImage.*
49         * loader/CachedImage.cpp:
50         (WebCore::nullImage): use BitmapImage directly
51         (WebCore::CachedImage::createImage): now create either BitmapImage or PDFDocumentImage directly
52         * loader/icon/IconDataCache.cpp:
53         (WebCore::IconDataCache::setImageData): use BitmapImage directly
54         * platform/graphics/BitmapImage.cpp: Added.
55         (WebCore::BitmapImage::BitmapImage):
56         (WebCore::BitmapImage::~BitmapImage):
57         (WebCore::BitmapImage::invalidateData):
58         (WebCore::BitmapImage::cacheFrame):
59         (WebCore::BitmapImage::size):
60         (WebCore::BitmapImage::setNativeData):
61         (WebCore::BitmapImage::frameCount):
62         (WebCore::BitmapImage::isSizeAvailable):
63         (WebCore::BitmapImage::frameAtIndex):
64         (WebCore::BitmapImage::frameDurationAtIndex):
65         (WebCore::BitmapImage::frameHasAlphaAtIndex):
66         (WebCore::BitmapImage::shouldAnimate):
67         (WebCore::BitmapImage::startAnimation):
68         (WebCore::BitmapImage::stopAnimation):
69         (WebCore::BitmapImage::resetAnimation):
70         (WebCore::BitmapImage::advanceAnimation):
71         * platform/graphics/BitmapImage.h: Added.
72         (WebCore::FrameData::FrameData):
73         (WebCore::BitmapImage::nativeImageForCurrentFrame): added.
74         (WebCore::BitmapImage::currentFrame):
75         (WebCore::BitmapImage::mayFillWithSolidColor): added.
76         (WebCore::BitmapImage::solidColor): added.
77         * platform/graphics/Image.cpp:
78         (WebCore::Image::Image):
79         (WebCore::Image::~Image):
80         * platform/graphics/Image.h:
81         (WebCore::Image::setNativeData): now virtual
82         (WebCore::Image::stopAnimation): now virtual
83         (WebCore::Image::resetAnimation): now virtual
84         (WebCore::Image::getNSImage): now virtual
85         (WebCore::Image::getTIFFRepresentation): now virtual
86         (WebCore::Image::getCGImageRef): now virtual
87         * platform/graphics/cg/ImageCG.cpp:
88         (WebCore::BitmapImage::checkForSolidColor):
89         (WebCore::BitmapImage::getCGImageRef): use nativeImageForCurrentFrame
90         (WebCore::fillWithSolidColor): added
91         (WebCore::BitmapImage::draw):
92         (WebCore::drawPattern): use fillWithSolidColor, mayFillWithSolidColor() and solidcolor()
93         (WebCore::BitmapImage::drawTiled): use fillWithSolidColor, mayFillWithSolidColor() and solidcolor()
94         * platform/graphics/cg/PDFDocumentImage.cpp:
95         (WebCore::PDFDocumentImage::PDFDocumentImage):
96         (WebCore::PDFDocumentImage::size): change to subclass from Image
97         (WebCore::PDFDocumentImage::setNativeData):
98         (WebCore::PDFDocumentImage::draw):
99         * platform/graphics/cg/PDFDocumentImage.h:
100         (WebCore::PDFDocumentImage::drawTiled):
101         * platform/graphics/mac/ImageMac.mm:
102         (WebCore::BitmapImage::initPlatformData):
103         (WebCore::BitmapImage::invalidatePlatformData):
104         (WebCore::Image::loadPlatformResource):
105         (WebCore::BitmapImage::getTIFFRepresentation):
106         (WebCore::BitmapImage::getNSImage):
107         * platform/graphics/svg/filters/cg/SVGFEImageCg.mm:
108         (WebCore::SVGFEImage::getCIFilter): remove soon-to-be unnecessary comment
109         * rendering/RenderImage.cpp:
110         (WebCore::RenderImage::nullImage): use BitmapImage
111
112 2006-12-27  Mitz Pettel  <mitz@webkit.org>
113
114         Reviewed by Hyatt.
115
116         - fix http://bugs.webkit.org/show_bug.cgi?id=11452
117           REGRESSION (r16736-r16801): Incorrect repaint of fixed boxes
118
119         Test: fast/repaint/fixed.html
120
121         * rendering/RenderView.cpp:
122         (WebCore::RenderView::computeAbsoluteRepaintRect): Re-added.
123         * rendering/RenderView.h:
124
125 2006-12-27  Mitz Pettel  <mitz@webkit.org>
126
127         Reviewed by Geoff.
128
129         - fix http://bugs.webkit.org/show_bug.cgi?id=11930
130           Specifying border-radius makes the outline shrink
131
132         Test: fast/css/border-radius-outline-offset.html
133
134         * css/cssstyleselector.cpp:
135         (WebCore::CSSStyleSelector::applyProperty): Added missing return statement.
136
137 2006-12-27  Rob Buis  <buis@kde.org>
138
139         Reviewed by Eric.
140
141         http://bugs.webkit.org/show_bug.cgi?id=11108
142         Replace usage of split by proper parsers
143         http://bugs.webkit.org/show_bug.cgi?id=11908
144         WebKit spends 40% of its time displaying "bamboo.svg" executing Regexes
145
146         Get rid of split() when parsing transform attribute.
147
148         * CMakeLists.txt:
149         * WebCore.xcodeproj/project.pbxproj:
150         * ksvg2/svg/SVGParserUtilities.cpp: Added.
151         (WebCore::parseNumber):
152         (WebCore::parseNumberOptionalNumber):
153         (WebCore::SVGPolyParser::parsePoints):
154         (WebCore::SVGPathParser::parseSVG):
155         (WebCore::SVGPathParser::calculateArc):
156         (WebCore::SVGPathParser::svgLineToHorizontal):
157         (WebCore::SVGPathParser::svgLineToVertical):
158         (WebCore::SVGPathParser::svgCurveToCubicSmooth):
159         (WebCore::SVGPathParser::svgCurveToQuadratic):
160         (WebCore::SVGPathParser::svgCurveToQuadraticSmooth):
161         (WebCore::SVGPathParser::svgArcTo):
162         * ksvg2/svg/SVGParserUtilities.h: Added.
163         (WebCore::isWhitespace):
164         (WebCore::skipOptionalSpaces):
165         (WebCore::skipOptionalSpacesOrDelimiter):
166         (WebCore::SVGPolyParser::~SVGPolyParser):
167         (WebCore::SVGPathParser::~SVGPathParser):
168         * ksvg2/svg/SVGPathElement.cpp:
169         (WebCore::SVGPathElement::SVGPathElement):
170         * ksvg2/svg/SVGPathElement.h:
171         * ksvg2/svg/SVGTransformable.cpp:
172         (WebCore::parseTransformParamList):
173         (WebCore::SVGTransformable::parseTransformAttribute):
174         * ksvg2/svg/svgpathparser.cpp:
175         (WebCore::DeprecatedSVGPathParser::parseSVG):
176         (WebCore::DeprecatedSVGPathParser::calculateArc):
177         (WebCore::DeprecatedSVGPathParser::svgLineToHorizontal):
178         (WebCore::DeprecatedSVGPathParser::svgLineToVertical):
179         (WebCore::DeprecatedSVGPathParser::svgCurveToCubicSmooth):
180         (WebCore::DeprecatedSVGPathParser::svgCurveToQuadratic):
181         (WebCore::DeprecatedSVGPathParser::svgCurveToQuadraticSmooth):
182         (WebCore::DeprecatedSVGPathParser::svgArcTo):
183         * ksvg2/svg/svgpathparser.h:
184         (WebCore::DeprecatedSVGPathParser::~DeprecatedSVGPathParser):
185
186 2006-12-27  Mitz Pettel  <mitz@webkit.org>
187
188         Reviewed by Geoff.
189
190         - http://bugs.webkit.org/show_bug.cgi?id=11968
191           BidiContext's m_basicDir is redundant
192
193         No test possible (no functionality change)
194
195         * rendering/bidi.cpp:
196         (WebCore::BidiContext::BidiContext):
197         (WebCore::operator==):
198         (WebCore::RenderBlock::computeHorizontalPositionsForLine): Use the block's
199         direction to resolve 'automatic' text-align.
200         * rendering/bidi.h:
201         (WebCore::BidiContext::dir):
202
203 2006-12-27  Nikolas Zimmermann  <zimmermann@kde.org>
204
205         Build fix, not reviewed.
206
207         Accidently commited an older revision of this file.
208
209         * platform/graphics/svg/SVGPaintServerPattern.h:
210
211 2006-12-27  Nikolas Zimmermann  <zimmermann@kde.org>
212
213         Reviewed by Mitz & Eric.
214
215         Fixes: http://bugs.webkit.org/show_bug.cgi?id=11904
216
217         We need to cache the CGPatternRef (m_pattern) for efficiency
218         in SVGPaintServerPatternCg, and keep track wheter the underlying
219         ImageBuffer has changed, and only update the pattern in that case.
220
221         * platform/graphics/svg/SVGPaintServerPattern.cpp:
222         (WebCore::SVGPaintServerPattern::SVGPaintServerPattern):
223         (WebCore::SVGPaintServerPattern::~SVGPaintServerPattern):
224         (WebCore::SVGPaintServerPattern::setTile):
225         * platform/graphics/svg/SVGPaintServerPattern.h:
226         * platform/graphics/svg/cg/SVGPaintServerPatternCg.cpp:
227         (WebCore::SVGPaintServerPattern::setup):
228         (WebCore::SVGPaintServerPattern::teardown):
229
230 2006-12-26  Geoffrey Garen  <ggaren@apple.com>
231
232         Reviewed by Eric Seidel.
233
234         Fixed <rdar://problem/4740328> Safari crash on quit in _NPN_ReleaseObject 
235         from KJS::Bindings::CInstance::~CInstance
236         
237         No testcase because we can't open and close windows in DumpRenderTree.
238         
239         * loader/FrameLoader.cpp: Removed closeDocument helper function because
240         its only purpose was to call didCloseDocument, which is gone now.
241         (WebCore::FrameLoader::detachFromParent): closeDocument => closeURL, 
242         since didCloseDocument is gone now.
243
244         * loader/FrameLoaderClient.h: Removed didCloseDocument because it proved
245         unnecessary and harmful.
246         
247         * loader/mac/FrameLoaderMac.mm:
248         (WebCore::FrameLoader::transitionToCommitted): closeDocument => closeURL, 
249         since didCloseDocument is gone now.
250
251 2006-12-26  Eric Seidel  <eric@webkit.org>
252
253         Reviewed by olliej.
254
255         ASSERT while loading SVG map
256         http://bugs.webkit.org/show_bug.cgi?id=11987
257
258         * ksvg2/css/SVGCSSParser.cpp: remove a few .impl() calls previously missed.
259         (WebCore::CSSParser::parseSVGValue):
260         (WebCore::CSSParser::parseSVGPaint):
261         (WebCore::CSSParser::parseSVGColor):
262         * ksvg2/misc/KCanvasRenderingStyle.cpp: handle invalid colors
263         (WebCore::KSVGPainterFactory::fillPaintServer):
264         (WebCore::KSVGPainterFactory::strokePaintServer):
265
266 2006-12-26  Eric Seidel  <eric@webkit.org>
267
268         Reviewed by ggaren.
269
270         No test cases changed.
271         
272         Remove unnecessary (and inefficient) .impl() and .deprecatedString() calls.
273         http://bugs.webkit.org/show_bug.cgi?id=11989
274
275         * bindings/js/kjs_dom.cpp:
276         (KJS::DOMNodeList::getOwnPropertySlot):
277         * dom/Document.cpp:
278         (WebCore::Document::createAttributeNS):
279         * dom/Element.cpp:
280         (WebCore::Element::getAttributeNS):
281         (WebCore::Element::setAttribute):
282         (WebCore::Element::setAttributeNS):
283         (WebCore::Element::removeAttributeNS):
284         (WebCore::Element::getAttributeNode):
285         (WebCore::Element::getAttributeNodeNS):
286         (WebCore::Element::hasAttribute):
287         (WebCore::Element::hasAttributeNS):
288         * dom/NamedAttrMap.cpp:
289         (WebCore::NamedAttrMap::getNamedItemNS):
290         (WebCore::NamedAttrMap::removeNamedItemNS):
291         * dom/ProcessingInstruction.cpp:
292         (WebCore::ProcessingInstruction::checkStyleSheet):
293         * html/HTMLBaseElement.cpp:
294         (WebCore::HTMLBaseElement::process):
295         * html/HTMLEmbedElement.cpp:
296         (WebCore::HTMLEmbedElement::parseMappedAttribute):
297         * html/HTMLEmbedElement.h:
298         * html/HTMLHRElement.cpp:
299         (WebCore::HTMLHRElement::parseMappedAttribute):
300         * html/HTMLScriptElement.cpp:
301         (WebCore::HTMLScriptElement::insertedIntoDocument):
302         * html/HTMLStyleElement.cpp:
303         (WebCore::HTMLStyleElement::parseMappedAttribute):
304         * ksvg2/svg/SVGAnimateElement.cpp:
305         (WebCore::SVGAnimateElement::handleTimerEvent):
306         * ksvg2/svg/SVGComponentTransferFunctionElement.cpp:
307         (WebCore::SVGComponentTransferFunctionElement::parseMappedAttribute):
308         * ksvg2/svg/SVGFEColorMatrixElement.cpp:
309         (WebCore::SVGFEColorMatrixElement::parseMappedAttribute):
310         * ksvg2/svg/SVGFEImageElement.cpp:
311         (WebCore::SVGFEImageElement::parseMappedAttribute):
312         * ksvg2/svg/SVGFitToViewBox.cpp:
313         (WebCore::SVGFitToViewBox::parseMappedAttribute):
314         * ksvg2/svg/SVGImageElement.cpp:
315         (WebCore::SVGImageElement::parseMappedAttribute):
316         * ksvg2/svg/SVGPatternElement.cpp:
317         (WebCore::SVGPatternElement::fillAttributesFromReferencePattern):
318         (WebCore::SVGPatternElement::notifyAttributeChange):
319         * ksvg2/svg/SVGPolyElement.cpp:
320         (WebCore::SVGPolyElement::notifyAttributeChange):
321         * ksvg2/svg/SVGStopElement.cpp:
322         (WebCore::SVGStopElement::parseMappedAttribute):
323         * ksvg2/svg/SVGTRefElement.cpp:
324         (WebCore::SVGTRefElement::updateReferencedText):
325         * ksvg2/svg/SVGTests.cpp:
326         (WebCore::SVGTests::parseMappedAttribute):
327         * ksvg2/svg/SVGTextPositioningElement.cpp:
328         (WebCore::SVGTextPositioningElement::parseMappedAttribute):
329         * ksvg2/svg/SVGUseElement.cpp:
330         (WebCore::SVGUseElement::closeRenderer):
331         * ksvg2/svg/SVGViewElement.cpp:
332         (WebCore::SVGViewElement::parseMappedAttribute):
333         * page/Frame.cpp:
334         (WebCore::Frame::selectionComputedStyle):
335         * rendering/RenderPartObject.cpp:
336         (WebCore::RenderPartObject::updateWidget):
337         * rendering/SVGRenderTreeAsText.cpp:
338         (WebCore::writeRenderResources):
339
340 2006-12-26  Nikolas Zimmermann  <zimmermann@kde.org>
341
342         Reviewed by Oliver.
343
344         Add patternContentUnits support, and cleanup SVGPaintServerGradientCg.cpp
345         Fixes coords-units-01-b.svg
346
347         * ksvg2/svg/SVGPatternElement.cpp:
348         (WebCore::SVGPatternElement::drawPatternContentIntoTile):
349         * platform/graphics/svg/SVGPaintServerPattern.cpp:
350         (WebCore::SVGPaintServerPattern::SVGPaintServerPattern):
351         (WebCore::SVGPaintServerPattern::contentBoundingBoxMode):
352         (WebCore::SVGPaintServerPattern::setContentBoundingBoxMode):
353         * platform/graphics/svg/SVGPaintServerPattern.h:
354         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
355         (WebCore::SVGPaintServerGradient::renderPath):
356         * platform/graphics/svg/cg/SVGPaintServerPatternCg.cpp:
357         (WebCore::SVGPaintServerPattern::setup):
358
359 2006-12-26  Eric Seidel  <eric@webkit.org>
360
361         Reviewed by ggaren
362
363         No test cases changed.
364         
365         Remove unneeded isPaintingText() and activeClient() from SVGPaintServer system
366
367         * platform/graphics/svg/SVGPaintServer.cpp:
368         (WebCore::SVGPaintServer::SVGPaintServer):
369         * platform/graphics/svg/SVGPaintServer.h:
370         * platform/graphics/svg/SVGPaintServerGradient.h:
371         * platform/graphics/svg/SVGPaintServerPattern.h:
372         * platform/graphics/svg/SVGPaintServerSolid.h:
373         * platform/graphics/svg/cg/SVGPaintServerCg.cpp:
374         (WebCore::SVGPaintServer::teardown):
375         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
376         (WebCore::SVGPaintServerGradient::teardown):
377         (WebCore::SVGPaintServerGradient::setup):
378         * platform/graphics/svg/cg/SVGPaintServerPatternCg.cpp:
379         (WebCore::SVGPaintServerPattern::setup):
380         (WebCore::SVGPaintServerPattern::teardown):
381         * platform/graphics/svg/cg/SVGPaintServerSolidCg.cpp:
382         (WebCore::SVGPaintServerSolid::setup):
383         * rendering/RenderPath.cpp:
384         (WebCore::RenderPath::paint):
385         * rendering/SVGInlineFlowBox.cpp:
386         (WebCore::paintSVGInlineFlow):
387
388 2006-12-25  Geoffrey Garen  <ggaren@apple.com>
389
390         Reviewed by Adam Roben.
391         
392         Fixed <rdar://problem/4778898> REGRESSION: crash in getInstanceForView() 
393         when quitting from kcbs.com
394         
395         No testcase because we can't open and close windows in DRT.
396         
397         The crash was caused by deallocating plug-ins that were later referenced
398         in the unload event handler.
399
400         * loader/FrameLoader.cpp:
401         (WebCore::FrameLoader::closeDocument): Call didCloseDocument after closing
402         instead of before, so plugins don't get deallocated until the document
403         has been destroyed and all event handlers have fired.
404         
405         * loader/FrameLoaderClient.h: Renamed "willCloseDocument" to "didCloseDocument",
406         since we call it after closing now.
407
408 2006-12-26  Eric Seidel  <eric@webkit.org>
409
410         Reviewed by rwlbuis.
411
412         Replace bogus SVGLength::isFraction() method with valueAsPercentage() to fix:
413         http://bugs.webkit.org/show_bug.cgi?id=11973
414         
415         * ksvg2/svg/SVGLength.cpp:
416         (WebCore::SVGLength::valueInSpecifiedUnits): remove extra spaces
417         (WebCore::SVGLength::valueAsPercentage): new method
418         * ksvg2/svg/SVGLength.h:
419         * ksvg2/svg/SVGLinearGradientElement.cpp:
420         (WebCore::SVGLinearGradientElement::buildGradient): use valueAsPercentage()
421         * ksvg2/svg/SVGPatternElement.cpp:
422         (WebCore::SVGPatternElement::drawPatternContentIntoTile): return if malloc fails
423         * ksvg2/svg/SVGRadialGradientElement.cpp:
424         (WebCore::SVGRadialGradientElement::buildGradient): use valueAsPercentage()
425         * platform/graphics/cg/GraphicsContextCG.cpp:
426         (WebCore::GraphicsContext::createImageBuffer): return 0 if malloc fails
427         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
428         (WebCore::SVGPaintServerGradient::setup): return if malloc fails
429         * platform/graphics/svg/cg/SVGResourceMaskerCg.mm:
430         (WebCore::SVGResourceMasker::applyMask): add comment about possible crash
431
432 2006-12-26  Nikolas Zimmermann  <zimmermann@kde.org>
433
434         Reviewed by Oliver.
435
436         In the DOMParser class, we have to create content-type specific
437         documents, instead of a pure "Document" object. Real-life SVG
438         files us this way to convert strings "<svg><rect x=...></svg>
439         to a new Document structure. 
440
441         Add new testcase dynamic-svg-document-creation.svg.
442
443         * xml/DOMParser.cpp:
444         (WebCore::DOMParser::parseFromString):
445
446 2006-12-25  Geoffrey Garen  <ggaren@apple.com>
447
448         Reviewed by Oliver Hunt.
449
450         Removed WebCoreSettings, cleaned up WebCore::Settings.
451
452         * WebCore.exp: Exported Settings for use by WebKit, removed WebCoreSettings class.
453         
454         * WebCore.xcodeproj/project.pbxproj: Removed WebCoreSetttings.h/.mm.
455         Added Settings.cpp.
456
457         * page/Frame.cpp: Removed cruft that duplicated Settings data. Callers now call
458         through to Settings to get Settings data.
459
460         * page/Page.cpp: Added Settings data member, to replace the one that WebView
461         used to hold.
462
463         * page/Settings.cpp: Added.
464         * page/Settings.h:
465             - Renamed all functions to match WebKit API. Renamed all variables to
466             match functions. Favorite old name: "isPluginsEnabled."
467             - Moved EditableLinkBehavior outside of the class. Having it inside
468             just made it harder to type.
469             - Merged in old WebCoreSettings functionality, like guarding against re-setting
470             to the same value, and making sure to update page layout.
471             - Paired setters and getters, putting setters first.            
472
473 2006-12-26  Nikolas Zimmermann  <zimmermann@kde.org>
474
475         Reviewed by Oliver.
476
477         Fix some minor style issues.
478
479         * ksvg2/svg/SVGPolygonElement.cpp:
480         (WebCore::SVGPolygonElement::toPathData):
481         * ksvg2/svg/SVGPolygonElement.h:
482         * ksvg2/svg/SVGPolylineElement.cpp:
483         (WebCore::SVGPolylineElement::toPathData):
484         * ksvg2/svg/SVGPolylineElement.h:
485
486 2006-12-26  Nikolas Zimmermann  <zimmermann@kde.org>
487
488         Reviewed by Oliver.
489
490         Fixes: http://bugs.webkit.org/show_bug.cgi?id=11963
491         Fixes: http://bugs.webkit.org/show_bug.cgi?id=11123
492
493         Fix SVGList JS wrappers, which operate on POD types (ie. Point).
494         There exists a special JSSVGPODTypeWrapperCreatorForList class now,
495         which operators on specialized SVGPODList's. It makes it possible
496         to support stuff like "myList.getItem(0).value = 200", for POD lists.
497
498         Adding two new testcases demonstrating the usage of SVG DOM & SVGAnimatedPoints.
499
500         * WebCore.pro:
501         * WebCore.xcodeproj/project.pbxproj:
502         * bindings/js/JSSVGPODTypeWrapper.h:
503         (WebCore::JSSVGPODTypeWrapperCreatorForList::JSSVGPODTypeWrapperCreatorForList):
504         (WebCore::JSSVGPODTypeWrapperCreatorForList::~JSSVGPODTypeWrapperCreatorForList):
505         (WebCore::JSSVGPODTypeWrapperCreatorForList::commitChange):
506         * bindings/js/JSSVGPathSegListCustom.cpp:
507         (WebCore::updatePathSegContextMap):
508         (WebCore::removeFromPathSegContextMap):
509         (WebCore::JSSVGPathSegList::clear):
510         (WebCore::JSSVGPathSegList::initialize):
511         * bindings/js/JSSVGPointListCustom.cpp: Added.
512         (WebCore::JSSVGPointList::clear):
513         (WebCore::JSSVGPointList::initialize):
514         (WebCore::JSSVGPointList::getItem):
515         (WebCore::JSSVGPointList::insertItemBefore):
516         (WebCore::JSSVGPointList::replaceItem):
517         (WebCore::JSSVGPointList::removeItem):
518         (WebCore::JSSVGPointList::appendItem):
519         * bindings/scripts/CodeGeneratorJS.pm:
520         * ksvg2/misc/SVGDocumentExtensions.h:
521         (WebCore::SVGDocumentExtensions::baseValueMap):
522         (WebCore::SVGDocumentExtensions::genericContextMap):
523         (WebCore::SVGDocumentExtensions::genericContext):
524         (WebCore::SVGDocumentExtensions::setGenericContext):
525         (WebCore::SVGDocumentExtensions::removeGenericContext):
526         (WebCore::SVGDocumentExtensions::hasGenericContext):
527         * ksvg2/svg/SVGAnimatedPathData.cpp:
528         * ksvg2/svg/SVGAnimatedPathData.h:
529         * ksvg2/svg/SVGAnimatedPoints.cpp:
530         * ksvg2/svg/SVGAnimatedPoints.h:
531         * ksvg2/svg/SVGLengthList.cpp:
532         (WebCore::SVGLengthList::SVGLengthList):
533         (WebCore::SVGLengthList::parse):
534         * ksvg2/svg/SVGLengthList.h:
535         * ksvg2/svg/SVGList.h:
536         (WebCore::SVGPODListItem::SVGPODListItem):
537         (WebCore::SVGPODListItem::operator Item&):
538         (WebCore::SVGPODListItem::operator const Item&):
539         (WebCore::SVGPODListItem::value):
540         (WebCore::SVGPODListItem::setValue):
541         (WebCore::SVGPODList::SVGPODList):
542         (WebCore::SVGPODList::initialize):
543         (WebCore::SVGPODList::getFirst):
544         (WebCore::SVGPODList::getLast):
545         (WebCore::SVGPODList::getItem):
546         (WebCore::SVGPODList::insertItemBefore):
547         (WebCore::SVGPODList::replaceItem):
548         (WebCore::SVGPODList::removeItem):
549         (WebCore::SVGPODList::appendItem):
550         * ksvg2/svg/SVGPathSegList.idl:
551         * ksvg2/svg/SVGPointList.cpp:
552         (SVGPointList::SVGPointList):
553         (SVGPointList::context):
554         * ksvg2/svg/SVGPointList.h:
555         * ksvg2/svg/SVGPointList.idl:
556         * ksvg2/svg/SVGPolyElement.cpp:
557         (WebCore::SVGPolyElement::SVGPolyElement):
558         (WebCore::SVGPolyElement::points):
559         (WebCore::SVGPolyElement::animatedPoints):
560         (WebCore::SVGPolyElement::parseMappedAttribute):
561         (WebCore::SVGPolyElement::notifyAttributeChange):
562         * ksvg2/svg/SVGPolyElement.h:
563         * rendering/RenderSVGText.cpp:
564
565 2006-12-25  Alexey Proskuryakov  <ap@webkit.org>
566
567         Reviewed by Maciej.
568
569         http://bugs.webkit.org/show_bug.cgi?id=10313
570         Reproducible crash when doing importStylesheet in javascript with 
571         xsl files that use xsl:import
572
573         This doesn't fully address the bug, but makes a couple of steps
574         in that direction.
575
576         * xml/XSLTProcessor.cpp:
577         (WebCore::transformToString): Set m_stylesheet even if it's created implicitly,
578         rather than passed from outside. Always reset it in the end (this doesn't affect
579         Document::applyXSLTransform(), which was the only user of setXSLStylesheet()).
580
581         * xml/xmlhttprequest.cpp:
582         (WebCore::XMLHttpRequest::getResponseXML): Set the loaded document's URL.
583
584 2006-12-24  Mitz Pettel  <mitz@webkit.org>
585
586         Reviewed by Maciej and Geoff.
587
588         - remove unused member variable m_styleSelectorDirty
589
590         No test possible (no functionality change)
591
592         * dom/Document.cpp:
593         (WebCore::Document::Document):
594         (WebCore::Document::recalcStyleSelector):
595         * dom/Document.h:
596
597 2006-12-24  Sam Weinig  <sam@webkit.org>
598
599         Reviewed by Geoff.
600
601         Patch for http://bugs.webkit.org/show_bug.cgi?id=11952
602         style changes made through CSSMediaRule functions insertRule() 
603         and deleteRule do not show up on the screen 
604
605         Tests added:
606         * fast/dom/css-mediarule-deleteRule-update.html
607         * fast/dom/css-mediarule-insertRule-update.html
608
609         * css/CSSMediaRule.cpp:
610         (WebCore::CSSMediaRule::insertRule):
611         (WebCore::CSSMediaRule::deleteRule):
612
613 2006-12-24  Rob Buis  <buis@kde.org>
614
615         Reviewed by Alexey.
616
617         Get rid of unused variable.
618
619         * ksvg2/svg/SVGURIReference.cpp:
620         (WebCore::SVGURIReference::getTarget):
621
622 2006-12-23  Alexey Proskuryakov  <ap@webkit.org>
623
624         Reviewed by Geoff.
625
626         http://bugs.webkit.org/show_bug.cgi?id=11933
627         REGRESSION: trying to change a property in a computed style declaration results in a crash
628
629         Test: fast/dom/computed-style-set-property.html
630
631         * bindings/js/kjs_css.cpp:
632         (KJS::DOMCSSStyleDeclaration::put): Added a check for null m_impl->stylesheet(). Also, fixed
633         incorrect logic in Dashboard branch - it didn't return in time if removeProperty() raised
634         an exception (credit for noticing this bug goes to Geoff).
635
636 2006-12-23  Lars Naesbye Christensen  <larsnaesbye@stud.ku.dk>
637
638         Reviewed by Geoff.
639
640         Patch for http://bugs.webkit.org/show_bug.cgi?id=11940
641         Bad transparency in some cursor pointer images
642
643         * Resources/northEastResizeCursor.png:
644         * Resources/northEastSouthWestResizeCursor.png:
645         * Resources/northWestResizeCursor.png:
646         * Resources/northWestSouthEastResizeCursor.png:
647         * Resources/southEastResizeCursor.png:
648         * Resources/southWestResizeCursor.png:
649
650 2006-12-23  Sam Weinig  <sam@webkit.org>
651
652         Reviewed by Geoff.
653
654         Patch for http://bugs.webkit.org/show_bug.cgi?id=11876
655         CSSMediaRule functions insertRule and deleteRule don't raise exceptions
656
657         Test added:
658         * fast/dom/css-mediarule-functions.html
659
660         * bindings/js/kjs_css.cpp:
661         (KJS::DOMCSSRuleFunc::callAsFunction):
662         * css/CSSMediaRule.cpp: add exception handling
663         (WebCore::CSSMediaRule::insertRule):
664         (WebCore::CSSMediaRule::deleteRule):
665         * css/CSSMediaRule.h: add ExceptionCode arguments
666         * css/CSSMediaRule.idl: un-comment exceptions
667
668 2006-12-23  David Hyatt  <hyatt@apple.com>
669
670         Fix 11942.  The inheritable properties array is duplicated (lame).  Make
671         sure to keep both in sync.
672
673         Reviewed by mitz
674
675         * css/CSSComputedStyleDeclaration.cpp:
676         * css/CSSMutableStyleDeclaration.cpp:
677         (WebCore::):
678
679 2006-12-22  Geoffrey Garen  <ggaren@apple.com>
680
681         Reviewed by Brady Eidson.
682         
683         Fixed <rdar://problem/4871518> Leopard9A321: Crash visiting www.audible.com 
684         (WebCore::FrameLoader::loadSubframe)
685
686         * loader/mac/FrameLoaderMac.mm:
687         (WebCore::FrameLoader::createFrame): Updated to reflect the fact that
688         createChildFrameNamed: now returns a WebCore::Frame* instead of a 
689         WebCoreFrameBridge *.
690         * page/mac/WebCoreFrameBridge.h:
691
692 2006-12-22  David Hyatt  <hyatt@apple.com>
693
694         Make sure to actually set the stroke thickness for text decorations.
695         Covered by bugzilla bug 11921.
696
697         Reviewed by mitz
698
699         * rendering/InlineFlowBox.cpp:
700         (WebCore::InlineFlowBox::paintDecorations):
701         * rendering/InlineTextBox.cpp:
702         (WebCore::InlineTextBox::paintDecoration):
703
704 2006-12-22  Nikolas Zimmermann  <zimmermann@kde.org>
705
706         Reviewed by Rob.
707
708         Fixes: http://bugs.webkit.org/show_bug.cgi?id=11934
709
710         Adding/removing SVGPathSeg* items to a SVGPathElement (through SVGPathSegList
711         interface) has live update problems, as the notifyAttributeChange() function
712         isn't called anywhere. The context param is currently stored per SVGPathSeg,
713         which is not needed - as it can be done using SVGPathSegList completely. It
714         wastes memory, that is fixed. In order to get rid of the context param in
715         SVGPathSeg, we need a way to map SVGPathSeg* objects to SVGStyledElement*
716         objects ("context element"). That is done using a new HashMap in the
717         SVGDocumentExtensions class.
718
719         * WebCore.pro:
720         * WebCore.xcodeproj/project.pbxproj:
721         * bindings/js/JSSVGPathSegListCustom.cpp: Added.
722         (WebCore::updatePathSegContextMap):
723         (WebCore::removeFromPathSegContextMap):
724         (WebCore::JSSVGPathSegList::getItem):
725         (WebCore::JSSVGPathSegList::insertItemBefore):
726         (WebCore::JSSVGPathSegList::replaceItem):
727         (WebCore::JSSVGPathSegList::removeItem):
728         (WebCore::JSSVGPathSegList::appendItem):
729         * bindings/scripts/CodeGeneratorJS.pm:
730         * ksvg2/misc/SVGDocumentExtensions.h:
731         (WebCore::SVGDocumentExtensions::pathSegContextMap):
732         (WebCore::SVGDocumentExtensions::pathSegContext):
733         (WebCore::SVGDocumentExtensions::setPathSegContext):
734         (WebCore::SVGDocumentExtensions::removePathSegContext):
735         (WebCore::SVGDocumentExtensions::hasPathSegContext):
736         * ksvg2/svg/SVGList.h:
737         (WebCore::SVGList::getFirst):
738         (WebCore::SVGList::getLast):
739         * ksvg2/svg/SVGPathElement.cpp:
740         (WebCore::SVGPathElement::createSVGPathSegMovetoAbs):
741         (WebCore::SVGPathElement::createSVGPathSegMovetoRel):
742         (WebCore::SVGPathElement::createSVGPathSegLinetoAbs):
743         (WebCore::SVGPathElement::createSVGPathSegLinetoRel):
744         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicAbs):
745         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicRel):
746         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticAbs):
747         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticRel):
748         (WebCore::SVGPathElement::createSVGPathSegArcAbs):
749         (WebCore::SVGPathElement::createSVGPathSegArcRel):
750         (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalAbs):
751         (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalRel):
752         (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalAbs):
753         (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalRel):
754         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs):
755         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel):
756         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs):
757         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel):
758         (WebCore::SVGPathElement::svgMoveTo):
759         (WebCore::SVGPathElement::svgLineTo):
760         (WebCore::SVGPathElement::svgLineToHorizontal):
761         (WebCore::SVGPathElement::svgLineToVertical):
762         (WebCore::SVGPathElement::svgCurveToCubic):
763         (WebCore::SVGPathElement::svgCurveToCubicSmooth):
764         (WebCore::SVGPathElement::svgCurveToQuadratic):
765         (WebCore::SVGPathElement::svgCurveToQuadraticSmooth):
766         (WebCore::SVGPathElement::svgArcTo):
767         (WebCore::SVGPathElement::pathSegList):
768         * ksvg2/svg/SVGPathElement.h:
769         * ksvg2/svg/SVGPathSeg.cpp: Removed.
770         * ksvg2/svg/SVGPathSeg.h:
771         (WebCore::SVGPathSeg::SVGPathSeg):
772         (WebCore::SVGPathSeg::~SVGPathSeg):
773         (WebCore::SVGPathSeg::toString):
774         * ksvg2/svg/SVGPathSegArc.cpp:
775         (WebCore::SVGPathSegArcAbs::SVGPathSegArcAbs):
776         (WebCore::SVGPathSegArcAbs::setX):
777         (WebCore::SVGPathSegArcAbs::setY):
778         (WebCore::SVGPathSegArcAbs::setR1):
779         (WebCore::SVGPathSegArcAbs::setR2):
780         (WebCore::SVGPathSegArcAbs::setAngle):
781         (WebCore::SVGPathSegArcAbs::setLargeArcFlag):
782         (WebCore::SVGPathSegArcAbs::setSweepFlag):
783         (WebCore::SVGPathSegArcRel::SVGPathSegArcRel):
784         (WebCore::SVGPathSegArcRel::setX):
785         (WebCore::SVGPathSegArcRel::setY):
786         (WebCore::SVGPathSegArcRel::setR1):
787         (WebCore::SVGPathSegArcRel::setR2):
788         (WebCore::SVGPathSegArcRel::setAngle):
789         (WebCore::SVGPathSegArcRel::setLargeArcFlag):
790         (WebCore::SVGPathSegArcRel::setSweepFlag):
791         * ksvg2/svg/SVGPathSegArc.h:
792         * ksvg2/svg/SVGPathSegClosePath.cpp:
793         * ksvg2/svg/SVGPathSegClosePath.h:
794         * ksvg2/svg/SVGPathSegCurvetoCubic.cpp:
795         (WebCore::SVGPathSegCurvetoCubicAbs::SVGPathSegCurvetoCubicAbs):
796         (WebCore::SVGPathSegCurvetoCubicAbs::setX):
797         (WebCore::SVGPathSegCurvetoCubicAbs::setY):
798         (WebCore::SVGPathSegCurvetoCubicAbs::setX1):
799         (WebCore::SVGPathSegCurvetoCubicAbs::setY1):
800         (WebCore::SVGPathSegCurvetoCubicAbs::setX2):
801         (WebCore::SVGPathSegCurvetoCubicAbs::setY2):
802         (WebCore::SVGPathSegCurvetoCubicRel::SVGPathSegCurvetoCubicRel):
803         (WebCore::SVGPathSegCurvetoCubicRel::setX):
804         (WebCore::SVGPathSegCurvetoCubicRel::setY):
805         (WebCore::SVGPathSegCurvetoCubicRel::setX1):
806         (WebCore::SVGPathSegCurvetoCubicRel::setY1):
807         (WebCore::SVGPathSegCurvetoCubicRel::setX2):
808         (WebCore::SVGPathSegCurvetoCubicRel::setY2):
809         * ksvg2/svg/SVGPathSegCurvetoCubic.h:
810         * ksvg2/svg/SVGPathSegCurvetoCubicSmooth.cpp:
811         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::SVGPathSegCurvetoCubicSmoothAbs):
812         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::setX):
813         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::setY):
814         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::setX2):
815         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::setY2):
816         (WebCore::SVGPathSegCurvetoCubicSmoothRel::SVGPathSegCurvetoCubicSmoothRel):
817         (WebCore::SVGPathSegCurvetoCubicSmoothRel::setX):
818         (WebCore::SVGPathSegCurvetoCubicSmoothRel::setY):
819         (WebCore::SVGPathSegCurvetoCubicSmoothRel::setX2):
820         (WebCore::SVGPathSegCurvetoCubicSmoothRel::setY2):
821         * ksvg2/svg/SVGPathSegCurvetoCubicSmooth.h:
822         * ksvg2/svg/SVGPathSegCurvetoQuadratic.cpp:
823         (WebCore::SVGPathSegCurvetoQuadraticAbs::SVGPathSegCurvetoQuadraticAbs):
824         (WebCore::SVGPathSegCurvetoQuadraticAbs::setX):
825         (WebCore::SVGPathSegCurvetoQuadraticAbs::setY):
826         (WebCore::SVGPathSegCurvetoQuadraticAbs::setX1):
827         (WebCore::SVGPathSegCurvetoQuadraticAbs::setY1):
828         (WebCore::SVGPathSegCurvetoQuadraticRel::SVGPathSegCurvetoQuadraticRel):
829         (WebCore::SVGPathSegCurvetoQuadraticRel::setX):
830         (WebCore::SVGPathSegCurvetoQuadraticRel::setY):
831         (WebCore::SVGPathSegCurvetoQuadraticRel::setX1):
832         (WebCore::SVGPathSegCurvetoQuadraticRel::setY1):
833         * ksvg2/svg/SVGPathSegCurvetoQuadratic.h:
834         * ksvg2/svg/SVGPathSegCurvetoQuadraticSmooth.cpp:
835         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::SVGPathSegCurvetoQuadraticSmoothAbs):
836         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::setX):
837         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::setY):
838         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::SVGPathSegCurvetoQuadraticSmoothRel):
839         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::setX):
840         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::setY):
841         * ksvg2/svg/SVGPathSegCurvetoQuadraticSmooth.h:
842         * ksvg2/svg/SVGPathSegLineto.cpp:
843         (WebCore::SVGPathSegLinetoAbs::SVGPathSegLinetoAbs):
844         (WebCore::SVGPathSegLinetoAbs::setX):
845         (WebCore::SVGPathSegLinetoAbs::setY):
846         (WebCore::SVGPathSegLinetoRel::SVGPathSegLinetoRel):
847         (WebCore::SVGPathSegLinetoRel::setX):
848         (WebCore::SVGPathSegLinetoRel::setY):
849         * ksvg2/svg/SVGPathSegLineto.h:
850         * ksvg2/svg/SVGPathSegLinetoHorizontal.cpp:
851         (WebCore::SVGPathSegLinetoHorizontalAbs::SVGPathSegLinetoHorizontalAbs):
852         (WebCore::SVGPathSegLinetoHorizontalAbs::setX):
853         (WebCore::SVGPathSegLinetoHorizontalRel::SVGPathSegLinetoHorizontalRel):
854         (WebCore::SVGPathSegLinetoHorizontalRel::setX):
855         * ksvg2/svg/SVGPathSegLinetoHorizontal.h:
856         * ksvg2/svg/SVGPathSegLinetoVertical.cpp:
857         (WebCore::SVGPathSegLinetoVerticalAbs::SVGPathSegLinetoVerticalAbs):
858         (WebCore::SVGPathSegLinetoVerticalAbs::setY):
859         (WebCore::SVGPathSegLinetoVerticalRel::SVGPathSegLinetoVerticalRel):
860         (WebCore::SVGPathSegLinetoVerticalRel::setY):
861         * ksvg2/svg/SVGPathSegLinetoVertical.h:
862         * ksvg2/svg/SVGPathSegList.cpp:
863         (WebCore::SVGPathSegList::SVGPathSegList):
864         (WebCore::SVGPathSegList::context):
865         * ksvg2/svg/SVGPathSegList.h:
866         * ksvg2/svg/SVGPathSegList.idl:
867         * ksvg2/svg/SVGPathSegMoveto.cpp:
868         (WebCore::SVGPathSegMovetoAbs::SVGPathSegMovetoAbs):
869         (WebCore::SVGPathSegMovetoAbs::setX):
870         (WebCore::SVGPathSegMovetoAbs::setY):
871         (WebCore::SVGPathSegMovetoRel::SVGPathSegMovetoRel):
872         (WebCore::SVGPathSegMovetoRel::setX):
873         (WebCore::SVGPathSegMovetoRel::setY):
874         * ksvg2/svg/SVGPathSegMoveto.h:
875
876 2006-12-22  Mitz Pettel  <mitz@webkit.org>
877
878         Reviewed by Beth.
879
880         - fix http://bugs.webkit.org/show_bug.cgi?id=11903
881           REGRESSION: outline not drawn if line style is dashed.
882
883         This fixes a bunch of existing pixel tests.
884
885         * rendering/RenderObject.cpp:
886         (WebCore::RenderObject::drawBorder):
887
888 2006-12-22  John Sullivan  <sullivan@apple.com>
889
890         Reviewed by Kevin Decker
891
892         - renamed markMisspellingsInAdjacentWords to markMisspellingsAfterTypingToPosition
893           in anticipation of fixing it to work more correctly with grammar checking, where
894           only checking adjacent words isn't good enough.
895
896         * editing/Editor.h:
897         renamed markMisspellingsInAdjacentWords to markMisspellingsAfterTypingToPosition 
898
899         * editing/TypingCommand.cpp:
900         (WebCore::TypingCommand::markMisspellingsAfterTyping):
901         updated for name change
902
903         * editing/mac/EditorMac.mm:
904         (WebCore::Editor::markMisspellingsAfterTypingToPosition):
905         renamed from markMisspellingsInAdjacentWords and added FIXME comment
906
907 2006-12-22  Eric Seidel  <eric@webkit.org>
908
909         Reviewed by aroben.
910
911         http://bugs.webkit.org/show_bug.cgi?id=11912
912         Overriding visibility does not behave as expected.
913
914         * rendering/RenderSVGContainer.cpp:
915         (WebCore::RenderSVGContainer::paint): allow children to draw when container is visibility='hidden'
916
917 2006-12-22  Nikolas Zimmermann  <zimmermann@kde.org>
918
919         Reviewed by Rob.
920
921         Fix SVGPathSeg JS object creation. SVGPathSegList has to return
922         the actual SVGPathSegLineToAbs/MoveToRel... object instead of a pure
923         SVGPathSeg JS object.
924
925         * WebCore.xcodeproj/project.pbxproj:
926         * WebCore/bindings/js/JSSVGPathSegCustom.cpp: Added.
927         * bindings/scripts/CodeGeneratorJS.pm:
928
929 2006-12-21  Beth Dakin  <bdakin@apple.com>
930
931         Reviewed by Geoff.
932
933         Fix for <rdar://problem/4897162> REGRESSION: Attempting to create a 
934         new message in .Mac web mail causes Safari to crash 
935         ( KJS::DOMCSSStyleDeclaration::put() + 368 )
936
937         This was a regression from my clone-node change. This fix is very 
938         simple.
939
940         * dom/StyledElement.cpp:
941         (WebCore::StyledElement::copyNonAttributeProperties): Must set the 
942         data that getInlineStyleDecl() points to instead of setting 
943         m_inlineStyleDecl directly. I also changed some variable names.
944         * dom/StyledElement.h: Don't need parameter name here.
945
946 2006-12-21  Adele Peterson  <adele@apple.com>
947
948         Reviewed by Geoff.
949
950         - Fix for <rdar://problem/4895716> REGRESSION: Pressing return key in search field doesn't begin search
951
952         Test: fast/events/onsearch-enter.html
953
954         * html/HTMLInputElement.cpp:
955         (WebCore::HTMLInputElement::defaultEventHandler): Calls onSearch when handling "Enter".  Also removed
956          special case for AppKit search fields, so now the enter event is considered handled here.
957         (WebCore::HTMLInputElement::onSearch): Added. Dispatches search event.
958         * html/HTMLInputElement.h: Added onSearch.
959         * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::onSearch): Calls onSearch on the node.
960
961 2006-12-21  Geoffrey Garen  <ggaren@apple.com>
962
963         Reviewed by Brady Eidson.
964         
965         Fixed <rdar://problem/4897205> ASSERTION FAILURE in ContainerNode::queuePostAttachCallback 
966         when creating an iframe from an iframe onload handler
967
968         I added that assertion to try to "keep things simple," but I've found a 
969         testcase that demonstrates why things need to be complicated.
970
971         * dom/ContainerNode.cpp:
972         (WebCore::ContainerNode::queuePostAttachCallback):
973
974 2006-12-21  Alexey Proskuryakov  <ap@webkit.org>
975
976         Reviewed by Darin.
977
978         http://bugs.webkit.org/show_bug.cgi?id=11919
979         Allow setting CSS values to null.
980
981         * bindings/js/kjs_css.cpp:
982         (KJS::DOMCSSStyleDeclaration::put):
983         (KJS::DOMCSSStyleDeclarationProtoFunc::callAsFunction):
984         Convert null values to null strings.
985
986 2006-12-21  Rob Buis  <buis@kde.org>
987
988         Reviewed by Anders.
989
990         http://bugs.webkit.org/show_bug.cgi?id=11898
991         CSSMediaRule functions insertRule and deleteRule assert when called from js in debug builds
992
993         Test explicitly for the two media rule functions so it ends up calling callAsFunction.
994
995         * bindings/js/kjs_css.cpp:
996         (KJS::DOMCSSRule::getOwnPropertySlot):
997
998 2006-12-21  Lars Knoll <lars@trolltech.com>
999
1000         Reviewed by Zack
1001
1002         * loader/FrameLoaderClient.h:
1003         * loader/qt/FrameLoaderQt.cpp:
1004         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
1005         (WebCore::FrameLoader::partClearedInBegin):
1006         (WebCore::FrameLoader::restoreDocumentState):
1007                 comment out a few notImplemented() warnings
1008         * platform/qt/FrameQt.cpp:
1009         (WebCore::FrameQt::bindingRootObject):
1010         (WebCore::FrameQt::addPluginRootObject):
1011         * platform/qt/FrameQt.h:
1012                  implement these
1013
1014 2006-12-20  David Hyatt  <hyatt@apple.com>
1015
1016         Make sure the execrable match-nearest-mail-blockquote-color CSS property is actually initialized (amazingly
1017         it started off with the value "match", since it wasn't even initialized).  Now that it is actually being
1018         initialized and properly copied and assigned to, tests have failed.  It seems that we were getting the
1019         behavior of "match" by default, when the initial value was supposed to be "normal."
1020
1021         Because this property really should not exist at all, it's unclear to me what the right solution is here.
1022         
1023         * rendering/RenderStyle.cpp:
1024         (WebCore::StyleCSS3NonInheritedData::StyleCSS3NonInheritedData):
1025         (WebCore::StyleCSS3NonInheritedData::operator==):
1026         * rendering/RenderStyle.h:
1027
1028 2006-12-20  Brady Eidson  <beidson@apple.com>
1029
1030         Reviewed by Adam's rubberstamp
1031
1032         Accidentally left a logging channel on in my checkin
1033
1034         * platform/Logging.cpp:
1035         (WebCore::):
1036
1037 2006-12-21  Nikolas Zimmermann  <zimmermann@kde.org>
1038
1039         Reviewed by Oliver.
1040
1041         Fix removeItem recursively calling itself (!). It was meant to call m_vector.remove(index)
1042         not removeItem(index, ec). This bug is in SVN for quite some time now :-)
1043
1044         * ksvg2/svg/SVGList.h:
1045         (WebCore::SVGList::removeItem):
1046
1047 2006-12-20  David Harrison  <harrison@apple.com>
1048
1049         Reviewed by John Sullivan.
1050
1051         <rdar://problem/4893376> REGRESSION: Crash occurs at WebCoreFrameBridge fontForSelection: when drag selecting from a line break
1052         
1053         No layout test added because crash only happens in path where editing window is key,
1054         which is never the case for the automated tests.
1055
1056         * page/mac/WebCoreFrameBridge.mm:
1057         (-[WebCoreFrameBridge fontForSelection:]):
1058         Add nil check of fontForSelection() result.
1059
1060 2006-12-21  Nikolas Zimmermann  <zimmermann@kde.org>
1061
1062         Reviewed by Maciej.
1063
1064         Fix dynamic gradient changes, via JS. It actually worked before, but it
1065         wasn't repainted. Behave just like the pattern notifyAttributeChange() code now.
1066
1067         * ksvg2/svg/SVGGradientElement.cpp:
1068         (WebCore::SVGGradientElement::notifyAttributeChange):
1069
1070 2006-12-20  Geoffrey Garen  <ggaren@apple.com>
1071
1072         Reviewed by Darin Adler.
1073
1074         Fixed <rdar://problem/4809825>. We need to check isSafeScript when converting
1075         a Location to string. 
1076         
1077         It's really a bug, and poor design, for objects to override toString.
1078         Subclasses that want custom toString implementations should add a toString 
1079         function to their prototypes instead of overriding the JavaScript ToString 
1080         operation. Following this design pattern would have avoided this bug in the
1081         first place.
1082         
1083         * bindings/js/kjs_window.cpp:
1084         (KJS::Location::toString):
1085
1086 2006-12-20  David Hyatt  <hyatt@apple.com>
1087
1088         Fix SVG stroking.  Make strokeThickness() get pushed into CG immediately
1089         when set in the GraphicsContext.  Remove setLineWidth since it is
1090         redundant with setStrokeThickness now.
1091
1092         Reviewed by mitz
1093
1094         * html/CanvasRenderingContext2D.cpp:
1095         (WebCore::CanvasRenderingContext2D::setLineWidth):
1096         * platform/graphics/GraphicsContext.cpp:
1097         (WebCore::GraphicsContext::setPlatformStrokeThickness):
1098         (WebCore::GraphicsContext::setPlatformStrokeStyle):
1099         * platform/graphics/GraphicsContext.h:
1100         * platform/graphics/cg/GraphicsContextCG.cpp:
1101         (WebCore::GraphicsContext::drawLine):
1102         (WebCore::GraphicsContext::drawEllipse):
1103         (WebCore::GraphicsContext::strokeArc):
1104         (WebCore::GraphicsContext::drawConvexPolygon):
1105         (WebCore::GraphicsContext::setPlatformStrokeThickness):
1106         * platform/graphics/qt/GraphicsContextQt.cpp:
1107         * platform/mac/FontMac.mm:
1108         (WebCore::Font::drawComplexText):
1109         (WebCore::Font::drawGlyphs):
1110
1111 2006-12-20  David Hyatt  <hyatt@apple.com>
1112
1113         Fix for bug 11893, white text on form controls.  Just make sure that
1114         all form control drawing in RenderTheme is bracketed by save/restore
1115         calls.
1116
1117         Reviewed by adele
1118
1119         * platform/mac/LocalCurrentGraphicsContext.h:
1120         * platform/mac/LocalCurrentGraphicsContext.mm:
1121         (WebCore::LocalCurrentGraphicsContext::LocalCurrentGraphicsContext):
1122         (WebCore::LocalCurrentGraphicsContext::~LocalCurrentGraphicsContext):
1123         * rendering/RenderThemeMac.mm:
1124         (WebCore::RenderThemeMac::paintTextField):
1125         (WebCore::RenderThemeMac::paintTextArea):
1126
1127 2006-12-20  Mark Rowe  <bdash@webkit.org>
1128
1129         Reviewed by Anders.
1130
1131         Fix leak of CGContextRef from GraphicsContext::createImageBuffer.
1132
1133         * platform/graphics/cg/GraphicsContextCG.cpp:
1134         (WebCore::GraphicsContext::createImageBuffer): Release newly-created CGContextRef after passing it to GraphicsContext.
1135
1136 2006-12-20  Timothy Hatcher  <timothy@apple.com>
1137
1138         Reviewed by Mark Rowe.
1139
1140         <rdar://problem/4871993> WebCore-421.31 build fails with "Public API change" error when gcc 3.3 is the default compiler
1141
1142         * bindings/scripts/CodeGeneratorObjC.pm: ignore blank lines in the public API check
1143
1144 2006-12-20  David Harrison  <harrison@apple.com>
1145
1146         Reviewed by John Sullivan.
1147
1148         <rdar://problem/4570218> REGRESSION (?-10.4.7): cntl-K only works the first time
1149
1150         Test:
1151         * editing/deleting/delete-to-end-of-paragraph.html
1152         
1153         * editing/TypingCommand.cpp:
1154         (WebCore::TypingCommand::forwardDeleteKeyPressed):
1155         If the selection was a caret at the end of the paragraph, extend selection so it wraps to the start of next paragraph (if any),
1156
1157 2006-12-20  Nikolas Zimmermann  <zimmermann@kde.org>
1158
1159         Build fix, reviewed by Mitz.
1160
1161         Fix mac build, by using proper float -> int conversion.
1162
1163         * rendering/InlineFlowBox.cpp:
1164         (WebCore::InlineFlowBox::placeBoxesHorizontally):
1165
1166 2006-12-20  David Hyatt  <hyatt@apple.com>
1167
1168         Make sure text decoration colors prefer stroke over fill (and honor both of the new CSS properties added
1169         for these values over color).
1170
1171         Reviewed by mitz
1172
1173         Added fast/text/stroking-decorations.html
1174
1175         * rendering/InlineFlowBox.cpp:
1176         (WebCore::InlineFlowBox::paintDecorations):
1177         * rendering/RenderObject.cpp:
1178         (WebCore::decorationColor):
1179         (WebCore::RenderObject::getTextDecorationColors):
1180
1181 2006-12-20  David Kilzer  <ddkilzer@kilzer.net>
1182
1183         Reviewed by Darin.
1184
1185         http://bugs.webkit.org/show_bug.cgi?id=11746
1186         REGRESSION(r14931): Outlook Web Access incorrectly positions the insertion point when replying to e-mail
1187
1188         Set caret at beginning of text on initial focus.
1189
1190         Test: fast/forms/textarea-initial-caret-position.html
1191
1192         * html/HTMLTextAreaElement.cpp:
1193         (WebCore::HTMLTextAreaElement::updateFocusAppearance):
1194
1195 2006-12-20  David Hyatt  <hyatt@apple.com>
1196
1197         Fix for bug 11889, support stroking and filling of HTML text from CSS.  This patch adds four new CSS properties:
1198         text-fill-color, text-stroke-color, text-stroke-width and text-stroke (a shorthand for the other two).  Text
1199         is filled and not stroked by default and does so using the text-fill-color.  If this property is not set, then
1200         color is used.
1201
1202         Stroking is accomplished by setting a stroke width.  Stroke color, if omitted, will be picked up from the color
1203         property.  You can set either color to be transparent or partially transparent.  A fully transparent fill color is
1204         the way to achieve an "outline" effect where only stroking happens.
1205
1206         Stroking and filling are both customizable inside the ::selection pseudo-element, and so when selecting you can
1207         vary colors and widths.
1208
1209         text-shadow applies to both the stroke and the fill.
1210
1211         text-decorations do not yet respect the stroke/fill colors.  This will follow in a later patch.
1212
1213         Reviewed by mitz
1214
1215         Added fast/text/stroking.html as a layout test.  Enhanced RenderTreeAsText.cpp to dump fill and stroke information.
1216
1217         * css/CSSComputedStyleDeclaration.cpp:
1218         (WebCore::):
1219         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1220         * css/CSSPropertyNames.in:
1221         * css/cssparser.cpp:
1222         (WebCore::CSSParser::parseValue):
1223         * css/cssstyleselector.cpp:
1224         (WebCore::CSSStyleSelector::applyProperty):
1225         * platform/mac/FontMac.mm:
1226         (WebCore::Font::drawComplexText):
1227         (WebCore::Font::drawGlyphs):
1228         * rendering/InlineFlowBox.cpp:
1229         (WebCore::InlineFlowBox::placeBoxesHorizontally):
1230         * rendering/InlineFlowBox.h:
1231         (WebCore::InlineFlowBox::InlineFlowBox):
1232         (WebCore::InlineFlowBox::maxHorizontalVisualOverflow):
1233         * rendering/InlineTextBox.cpp:
1234         (WebCore::updateGraphicsContext):
1235         (WebCore::InlineTextBox::paint):
1236         (WebCore::InlineTextBox::paintSelection):
1237         (WebCore::InlineTextBox::paintMarkedTextBackground):
1238         (WebCore::InlineTextBox::paintTextMatchMarker):
1239         * rendering/RenderObject.cpp:
1240         (WebCore::RenderObject::selectionForegroundColor):
1241         * rendering/RenderStyle.cpp:
1242         (WebCore::StyleCSS3InheritedData::StyleCSS3InheritedData):
1243         (WebCore::StyleCSS3InheritedData::operator==):
1244         (WebCore::RenderStyle::diff):
1245         * rendering/RenderStyle.h:
1246         (WebCore::RenderStyle::textStrokeColor):
1247         (WebCore::RenderStyle::textStrokeWidth):
1248         (WebCore::RenderStyle::textFillColor):
1249         (WebCore::RenderStyle::setTextStrokeColor):
1250         (WebCore::RenderStyle::setTextStrokeWidth):
1251         (WebCore::RenderStyle::setTextFillColor):
1252         (WebCore::RenderStyle::initialTextStrokeWidth):
1253         * rendering/RenderTreeAsText.cpp:
1254         (WebCore::operator<<):
1255
1256 2006-12-19  Adele Peterson  <adele@apple.com>
1257
1258         Reviewed by Anders.
1259
1260         - Fix for <rdar://problem/3824247> Select All works even if -khtml-user-select:none; style is set
1261
1262         Also made user-select:none work on new list boxes, and cleaned up the list box defaultEventHandler.
1263
1264         Test: editing/selection/select-all-user-select-none.html
1265
1266         * editing/SelectionController.cpp: (WebCore::SelectionController::selectAll): Make sure canSelect is true on the root renderer.
1267         * html/HTMLSelectElement.cpp:
1268         (WebCore::HTMLSelectElement::canSelectAll): Check canSelect here.
1269         (WebCore::HTMLSelectElement::selectAll): Added nil check for renderer.
1270         (WebCore::HTMLSelectElement::defaultEventHandler): Return early if the event has been handled.
1271         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): Check canSelect here.
1272         * html/HTMLSelectElement.h:
1273
1274 2006-12-19  Anders Carlsson  <acarlsson@apple.com>
1275
1276         Reviewed by Adele.
1277
1278         <rdar://problem/4701860> 
1279         http://bugs.webkit.org/show_bug.cgi?id=11010
1280         [9A255] Crash in WebCore::EventTargetNode::dispatchEvent
1281         
1282         * html/HTMLScriptElement.cpp:
1283         (WebCore::HTMLScriptElement::notifyFinished):
1284         Ref the script element while running the script since it can be freed
1285         when executing the script.
1286
1287 2006-12-19  Darin Adler  <darin@apple.com>
1288
1289         Reviewed by Geoff.
1290
1291         - <rdar://problem/4885227>
1292           frame resizing is now live and no longer does direct drawing
1293
1294         * html/HTMLFrameSetElement.h: Made frameBorder() and noResize() const.
1295         Added rowLengths() and colLengths() getters so that we don't have to
1296         have RenderFrameSet as a friend. Stopped using bit fields.
1297
1298         * html/HTMLFrameSetElement.cpp:
1299         (WebCore::HTMLFrameSetElement::defaultEventHandler): Removed now-uneeded
1300         check for contextmenu events. Look at return value from userResize to
1301         decide whether to mark the event as "default handled". In the case where
1302         the event is handled, don't call through to the base class.
1303
1304         * rendering/RenderFrameSet.h: No longer mark HTMLFrameSetElement as a
1305         friend. Made positionFrames and canResize private, and changed canResize
1306         to take an IntPoint. Added isResizingRow, isResizingColumn, canResizeRow,
1307         and canResizeColumn functions to be used soon for cursor feedback.
1308         Removed override of non-virtual element() function and replaced it with
1309         a private frameSet() inline function. Grouped all the data members for
1310         each axis into a GridAxis class, and made one called m_cols and one called
1311         m_rows. Used vectors for the resizable bits of this instead of new/delete
1312         arrays. Added a constant named "noSplit" so we don't have to use -1
1313         everywhere explicitly for this purpose. Renamed setResizing to
1314         setIsResizing and made it private. Eliminated resizing() function.
1315         Added new private helper functions, layOutAxis, findNonResizableSplits,
1316         splitPosition, hitTestSplit, startResizing, and continueResizing.
1317         Renamed m_resizing to m_isResizing, and m_clientResizing to
1318         m_isChildResizing.
1319
1320         * rendering/RenderFrameSet.cpp:
1321         (WebCore::RenderFrameSet::RenderFrameSet): Removed now-unneeded initialization
1322         that is handled by the GridAxis and Vector constructors.
1323         (WebCore::RenderFrameSet::~RenderFrameSet): Ditto (for destructors).
1324         (WebCore::RenderFrameSet::GridAxis::GridAxis): Added.
1325         (WebCore::RenderFrameSet::frameSet): Added. Inline function so we don't have
1326         to cast the result of node() or element() everywhere.
1327         (WebCore::RenderFrameSet::nodeAtPoint): Updated for name changes.
1328         (WebCore::RenderFrameSet::GridAxis::resize): Added. Helper function to be used
1329         in the layout function.
1330         (WebCore::RenderFrameSet::layOutAxis): Added. Factored out the part of the
1331         layout function that used to be inside a for loop for the two axes.
1332         The algorithm is otherwise unchanged.
1333         (WebCore::RenderFrameSet::findNonResizableSplits): Added. Factored out the
1334         code that set up the "split variable" arrays from the layout function.
1335         (WebCore::RenderFrameSet::layout): Moved the bulk of this function into the
1336         new helpers. This allowed me to remove the use of goto.
1337         (WebCore::RenderFrameSet::positionFrames): Updated for change to data structures.
1338         Also added some more local variables for clarity.
1339         (WebCore::RenderFrameSet::startResizing): Added. Code factored out of the
1340         userResize function that handles mousedown events that might begin a resize.
1341         (WebCore::RenderFrameSet::continueResizing): Added. Code factored out of the
1342         userResize function that handles mouse events that continue a resize already
1343         in progress, including mouseup events that end the resizing. Uses the new
1344         splitPosition function so it can be used over and over again while resizing.
1345         (WebCore::RenderFrameSet::userResize): Restructured to use the new helper
1346         functions. Removed the direct drawing of a gray bar during mouse movement;
1347         instead we do the resizing live.
1348         (WebCore::RenderFrameSet::setIsResizing): Updated for name changes.
1349         (WebCore::RenderFrameSet::isResizingRow): Added.
1350         (WebCore::RenderFrameSet::isResizingColumn): Added.
1351         (WebCore::RenderFrameSet::canResize): Changed to use hitTestSplit for clarity.
1352         (WebCore::RenderFrameSet::canResizeRow): Added.
1353         (WebCore::RenderFrameSet::canResizeColumn): Added.
1354         (WebCore::RenderFrameSet::splitPosition): Added.
1355         (WebCore::RenderFrameSet::hitTestSplit): Added. Contains the guts of the code
1356         that was used both in canResize and userResize before -- now it's shared.
1357         (WebCore::RenderFrameSet::dump): Updated for name changes.
1358
1359 2006-12-19  Justin Garcia  <justin.garcia@apple.com>
1360
1361         Reviewed by harrison
1362         
1363         Added Selection::removeAllRanges() and ::addRange()
1364
1365         * bindings/js/kjs_window.cpp:
1366         (KJS::SelectionFunc::callAsFunction): Added the bindings for
1367         the two new functions.
1368         * bindings/js/kjs_window.h:
1369         (KJS::Selection::):
1370         * editing/SelectionController.cpp:
1371         (WebCore::SelectionController::removeAllRanges): Equivalent
1372         to clear().
1373         (WebCore::SelectionController::addRange): Until we support
1374         discontiguous selections, the new selected range is the 
1375         union of the old selected range and the passed range if
1376         the two intersect, and the old range if they don't.
1377         * editing/SelectionController.h:
1378
1379 2006-12-19  Beth Dakin  <bdakin@apple.com>
1380
1381         Reviewed by Hyatt.
1382
1383         Fix for <rdar://problem/4860924> outerHTML gives an out-of-date 
1384         result when applied to a clone
1385
1386         We were only copying the m_inlineStyleDecl over to clones, but we 
1387         need to copy m_isStyleAttributeValid and 
1388         m_synchronizingStyleAttribute as well to know when we have to 
1389         update style, etc.
1390
1391         * dom/StyledElement.cpp:
1392         (WebCore::StyledElement::copyNonAttributeProperties): Copy over all 
1393         three member variables.
1394         * dom/StyledElement.h:
1395         * html/HTMLElement.cpp:
1396         (WebCore::HTMLElement::cloneNode): No longer need to copy the 
1397         inline style decl explicitly because copyNonAttributeProperties() 
1398         will take care of it.
1399         * html/HTMLInputElement.cpp:
1400         (WebCore::HTMLInputElement::copyNonAttributeProperties): Call into 
1401         parent class implementation. This is important now that there is 
1402         more than one implementation of this function.
1403
1404 2006-12-19  Geoffrey Garen  <ggaren@apple.com>
1405
1406         Reviewed by Darin Adler.
1407
1408         Fixed http://bugs.webkit.org/show_bug.cgi?id=11880
1409         REGRESSION (r18304): Assertion failure in -[WebHTMLView _canProcessDragWithDraggingInfo:] 
1410         when dragging over the window's a scroll bar (innerFrame)
1411         
1412         RenderLayer needs to check 'active,' when deciding what to do if hit testing 
1413         hasn't hit anything, because we want the default hit testing mechanism to return the 
1414         document when we hit a scrollbar.
1415         
1416         This problem shows that the idea of 'capturing' was a little too ambitious
1417         in hit testing, at least given the current state of things. So, I've replaced
1418         'capturing' with 'mouseUp,' the condition that provided the immediate need
1419         for the capturing flag in the first place.
1420
1421         * page/EventHandler.cpp:
1422         (WebCore::EventHandler::handleMouseMoveEvent):
1423         * rendering/HitTestRequest.h: Removed 'capturing' 
1424         (WebCore::HitTestRequest::HitTestRequest):
1425         * rendering/RenderLayer.cpp:
1426         (WebCore::RenderLayer::hitTestLayer):
1427
1428 2006-12-19  Brady Eidson  <beidson@apple.com>
1429
1430         Reviewed by Ada
1431
1432         Added a logging channel for network activity for loader work
1433
1434         * platform/Logging.cpp:
1435         (WebCore::):
1436         * platform/Logging.h:
1437         * platform/mac/LoggingMac.mm:
1438         (WebCore::InitializeLoggingChannelsIfNecessary):
1439
1440 2006-12-19  Justin Garcia  <justin.garcia@apple.com>
1441
1442         Reviewed by hyatt
1443         
1444         <rdar://problem/4888891>
1445         Docs & Spreadsheets: Comment fails to insert if text is selected in the document
1446         
1447         * dom/Range.cpp:
1448         (WebCore::Range::surroundContents): If startContainer is a text node,
1449         it will be split when the range is extracted, and it will be its parent
1450         that will have to accept newParent.  Also cleaned up some code with 
1451         isDescendantOf.
1452
1453 2006-12-19  Timothy Hatcher  <timothy@apple.com>
1454
1455         Reviewed by Darin.
1456
1457         <rdar://problem/4891774> Local WebCore/WebBrowser builds fail in 9A328 due to warning about ObjC-2.0 language features
1458
1459         * WebCore.xcodeproj/project.pbxproj:
1460
1461 2006-12-19  Nikolas Zimmermann  <zimmermann@kde.org>
1462
1463         Reviewed by Oliver.
1464
1465         Fix SVGList index validation (off-by-one error).
1466
1467         Adding new testcase js-font-test.svg, which uses SVGLengthList interface.
1468         (This is a very old ksvg1 testcase, adopted for SVG1.1)
1469
1470         * ksvg2/svg/SVGList.h:
1471         (WebCore::SVGList::getItem):
1472         (WebCore::SVGList::replaceItem):
1473         (WebCore::SVGList::removeItem):
1474
1475 2006-12-19  Nikolas Zimmermann  <zimmermann@kde.org>
1476
1477         Reviewed by Oliver.
1478
1479         Fixes: http://bugs.webkit.org/show_bug.cgi?id=11879
1480
1481         Fix pattern on stroke/fill of text.
1482
1483         * ksvg2/svg/SVGPatternElement.cpp:
1484         (WebCore::SVGPatternElement::notifyAttributeChange):
1485         * platform/graphics/svg/SVGPaintServerGradient.cpp:
1486         (WebCore::SVGPaintServerGradient::SVGPaintServerGradient):
1487         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
1488         (WebCore::SVGPaintServerGradient::teardown):
1489         (WebCore::SVGPaintServerGradient::setup):
1490         * platform/graphics/svg/cg/SVGPaintServerPatternCg.cpp:
1491         (WebCore::SVGPaintServerPattern::setup):
1492
1493 2006-12-19  Alice Liu  <alice.liu@apple.com>
1494
1495         Build fix
1496
1497         * platform/graphics/ImageBuffer.cpp:
1498
1499 2006-12-19  Alexey Proskuryakov  <ap@webkit.org>
1500
1501         Reviewed by Darin.
1502
1503         http://bugs.webkit.org/show_bug.cgi?id=7296
1504         JavaScript error not thrown when trying to set a CSS property to an invalid value
1505
1506         * bindings/js/kjs_css.cpp:
1507         (KJS::DOMCSSStyleDeclaration::put): When not in Dashboard compatibility mode,
1508         raise exception for invalid values. Also removed an unnecessary call to
1509         removeProperty(), which prevented the property value from being preserved in 
1510         error case.
1511
1512         * css/CSSMutableStyleDeclaration.cpp:
1513         (WebCore::CSSMutableStyleDeclaration::setProperty): Moved the handling of
1514         empty property values here. Also removed an unnecessary call to removeProperty().
1515
1516 2006-12-19  Anders Carlsson  <acarlsson@apple.com>
1517
1518         Reviewed by Adam.
1519
1520         * dom/Document.h:
1521         * page/EventHandler.h:
1522         Use correct forward declarations for HitTestRequest.
1523         
1524 2006-12-19  Nikolas Zimmermann  <zimmermann@kde.org>
1525
1526         Build fix, not reviewed.
1527
1528         Fix Qt/Linux build. Missing GraphicsContext.h include.
1529         Fix Mac build, by adding lroundf() (I swear this compiled w/o that, locally :-)
1530
1531         * platform/graphics/qt/ImageBufferQt.cpp:
1532         * ksvg2/svg/SVGPatternElement.cpp:
1533
1534 2006-12-19  Nikolas Zimmermann  <zimmermann@kde.org>
1535
1536         Reviewed by Sam. Previous attempts reviewed by Oliver & Eric.
1537
1538         Fixes: http://bugs.webkit.org/show_bug.cgi?id=11867
1539
1540         Bring back masking, by adding off-screen rendering functionality in GraphicsContext.
1541         Add new "static GraphicsContext* createImageContext(const IntSize& size, bool grayScale)"
1542         function, and implement it with CGBitmapContext in the GraphicsContextCG (stubs for Qt.)
1543
1544         Mask image sizes are dynamically calculated using the passed bounding box in applyMask,
1545         as it was orignally planned. Gradient stroke mask image sizes aren't hardcoded to 2048x2048
1546         anymore, but are as well dynamically calculated using getAbsoluteRepaintRect().
1547
1548         Add new ImageBuffer class encapsulating the size of the image, a platform-specific
1549         handle (ie. CGImageRef for CG platform) plus the GraphicsContext pointer, obtained
1550         via GraphicsContext::createImageBuffer. Offer a generic logic for rendering subtrees
1551         of the rendering tree into a ImageBuffer (see renderSubtreeToImage function)
1552         ImageBufferCG is completly implemented, ImageBufferQt is stubbed.
1553
1554         Also add correct default values for x/y/width/height of <mask>.
1555         Fixes masking related LayoutTests, and speeds up gradient-on-stroke a lot.
1556
1557         * CMakeLists.txt:
1558         * WebCore.pro:
1559         * WebCore.xcodeproj/project.pbxproj:
1560         * ksvg2/svg/SVGFEImageElement.cpp:
1561         * ksvg2/svg/SVGImageElement.cpp:
1562         * ksvg2/svg/SVGMaskElement.cpp:
1563         (WebCore::SVGMaskElement::SVGMaskElement):
1564         (WebCore::SVGMaskElement::attributeChanged):
1565         (WebCore::SVGMaskElement::parseMappedAttribute):
1566         (WebCore::SVGMaskElement::drawMaskerContent):
1567         (WebCore::SVGMaskElement::canvasResource):
1568         * ksvg2/svg/SVGMaskElement.h:
1569         * ksvg2/svg/SVGPatternElement.cpp:
1570         (WebCore::SVGPatternElement::drawPatternContentIntoTile):
1571         (WebCore::SVGPatternElement::notifyAttributeChange):
1572         * ksvg2/svg/SVGPatternElement.h:
1573         * platform/graphics/GraphicsContext.h:
1574         * platform/graphics/ImageBuffer.cpp: Added.
1575         (WebCore::ImageBuffer::renderSubtreeToImage):
1576         * platform/graphics/ImageBuffer.h: Added.
1577         * platform/graphics/cg/GraphicsContextCG.cpp:
1578         (WebCore::GraphicsContext::createImageBuffer):
1579         * platform/graphics/cg/ImageBufferCG.cpp: Added.
1580         (WebCore::ImageBuffer::ImageBuffer):
1581         (WebCore::ImageBuffer::~ImageBuffer):
1582         (WebCore::ImageBuffer::size):
1583         (WebCore::ImageBuffer::context):
1584         (WebCore::ImageBuffer::cgImage):
1585         * platform/graphics/mac/GraphicsContextMac.mm:
1586         * platform/graphics/qt/GraphicsContextQt.cpp:
1587         (WebCore::GraphicsContext::createImageBuffer):
1588         * platform/graphics/qt/ImageBufferQt.cpp: Added.
1589         (WebCore::ImageBuffer::ImageBuffer):
1590         (WebCore::ImageBuffer::~ImageBuffer):
1591         (WebCore::ImageBuffer::size):
1592         (WebCore::ImageBuffer::context):
1593         * platform/graphics/svg/SVGPaintServerGradient.h:
1594         * platform/graphics/svg/SVGPaintServerPattern.cpp:
1595         (WebCore::SVGPaintServerPattern::tile):
1596         (WebCore::SVGPaintServerPattern::setTile):
1597         * platform/graphics/svg/SVGPaintServerPattern.h:
1598         * platform/graphics/svg/SVGResourceImage.h: Removed.
1599         * platform/graphics/svg/SVGResourceMasker.cpp:
1600         (WebCore::SVGResourceMasker::setMask):
1601         (WebCore::SVGResourceMasker::mask):
1602         * platform/graphics/svg/SVGResourceMasker.h:
1603         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
1604         (WebCore::SVGPaintServerGradient::teardown):
1605         (WebCore::SVGPaintServerGradient::renderPath):
1606         (WebCore::SVGPaintServerGradient::setup):
1607         * platform/graphics/svg/cg/SVGPaintServerPatternCg.cpp:
1608         (WebCore::patternCallback):
1609         (WebCore::SVGPaintServerPattern::setup):
1610         * platform/graphics/svg/cg/SVGResourceImageCg.cpp: Removed.
1611         * platform/graphics/svg/cg/SVGResourceMaskerCg.mm:
1612         (WebCore::SVGResourceMasker::applyMask):
1613         * platform/graphics/svg/qt/SVGResourceImageQt.cpp: Removed.
1614
1615 2006-12-19  David Hyatt  <hyatt@apple.com>
1616
1617         Make sure to initialize the CG fill and stroke colors to our initial fill/stroke colors when first
1618         constructing a GraphicsContextCG.  Because Safari actually draws text in the bookmarks bar using GraphicsContext
1619         and sets a fill color, this could only really be seen in another WebKit app.
1620
1621         Patched GraphicsContextQt as well, since it has the same pattern.
1622
1623         Reviewed by bdash
1624
1625         * platform/graphics/cg/GraphicsContextCG.cpp:
1626         (WebCore::setCGFillColor):
1627         (WebCore::setCGStrokeColor):
1628         (WebCore::GraphicsContext::GraphicsContext):
1629
1630 2006-12-19  Lars Knoll <lars@trolltech.com>
1631
1632         Reviewed by Rob.
1633
1634         * loader/FrameLoader.cpp:
1635         (WebCore::FrameLoader::URL):\
1636                 Fix a crash, because of the incompletely ported loader
1637         * platform/qt/FontQt.cpp:
1638         (WebCore::Font::drawGlyphs):
1639                 Adapt to the changes in GraphicsContext
1640
1641 2006-12-19  David Hyatt  <hyatt@apple.com>
1642
1643         Convert stroke thickness to a float.  This allows the thickness argument to strokeArc to be eliminated.
1644        
1645         Reviewed by olliej
1646
1647         * platform/graphics/GraphicsContext.cpp:
1648         (WebCore::GraphicsContext::setStrokeThickness):
1649         (WebCore::GraphicsContext::strokeThickness):
1650         (WebCore::GraphicsContext::setPlatformStrokeThickness):
1651         * platform/graphics/GraphicsContext.h:
1652         * platform/graphics/cg/GraphicsContextCG.cpp:
1653         (WebCore::GraphicsContext::drawEllipse):
1654         (WebCore::GraphicsContext::strokeArc):
1655         * platform/graphics/qt/GraphicsContextQt.cpp:
1656         (WebCore::GraphicsContext::strokeArc):
1657         (WebCore::GraphicsContext::setPlatformStrokeThickness):
1658         * rendering/RenderObject.cpp:
1659         (WebCore::RenderObject::drawBorderArc):
1660
1661 2006-12-19  David Hyatt  <hyatt@apple.com>
1662
1663         Rename drawArc to strokeArc and remove its strange behavior of trying to "fill" by stroking using the passed in
1664         thickness.  Now the method is purely about stroking an arc and always uses the passed in thickness.   Fix the
1665         border-radius code that calls the method so that it makes more sense now.  If stroke thickness is converted
1666         to a float, then even the extra argument can go away, and this method can be a clean stroke of an arc.
1667
1668         Make sure to get square list markers right by setting both stroke and fill color properly.
1669
1670         Reviewed by mitz, olliej
1671
1672         * platform/graphics/GraphicsContext.h:
1673         * platform/graphics/cg/GraphicsContextCG.cpp:
1674         (WebCore::GraphicsContext::strokeArc):
1675         * platform/graphics/qt/GraphicsContextQt.cpp:
1676         (WebCore::GraphicsContext::strokeArc):
1677         * rendering/RenderListMarker.cpp:
1678         (WebCore::RenderListMarker::paint):
1679         * rendering/RenderObject.cpp:
1680         (WebCore::RenderObject::drawBorderArc):
1681
1682 2006-12-18  Geoffrey Garen  <ggaren@apple.com>
1683
1684         Reviewed by Beth Dakin.
1685
1686         Fixed <rdar://problem/4549745> REGRESSION: scrolling on Google maps 
1687         continues after the mouse is released outside the window (8137)
1688         
1689         The RenderLayer hit testing code assumed that, when the mouse was outside
1690         the WebView, we only needed to capture mouse events while the mouse was
1691         down (in other words, mouse move events). We actually need to capture mouse 
1692         up events, as well.
1693
1694         * dom/Document.cpp:
1695         (WebCore::Document::prepareMouseEvent): To match EventHandler::prepareMouseEvent, 
1696         I changed this function to take a HitTestRequest instead of the broken-out values of one.
1697         For clarity, I moved an assert to top of function.
1698         (WebCore::Document::addMarker): Removed stray character.
1699         * dom/Document.h:
1700
1701         * page/EventHandler.cpp: Changed prepareMouseEvent to take a HitTestRequest,
1702         instead of the broken-out values of one. This simplified the code, and made
1703         the task of adding an extra, optional parameter to hit testing much easier.
1704         (WebCore::EventHandler::handleMousePressEvent):
1705         (WebCore::EventHandler::handleMouseDoubleClickEvent):
1706         (WebCore::EventHandler::handleMouseMoveEvent): Set the 'capturing' flag
1707         if the move occurs while the mouse is down. This replaces RenderLayer's
1708         heavy-handed assumption that we should always capture if the mouse is down.
1709         (WebCore::EventHandler::handleMouseReleaseEvent): Set the 'capturing'
1710         flag, since we assume every mouse up follows a mouse down inside the WebView.
1711         (We'd like to ASSERT as much, but DRT's event sending mechanism is crazy, and
1712         violates this axiom.)
1713         (WebCore::EventHandler::updateDragAndDrop):
1714         (WebCore::EventHandler::prepareMouseEvent):
1715         (WebCore::EventHandler::handleWheelEvent):
1716         (WebCore::EventHandler::sendContextMenuEvent):
1717         (WebCore::EventHandler::hoverTimerFired):
1718         * page/EventHandler.h:
1719
1720         * rendering/HitTestRequest.h:
1721         (WebCore::HitTestRequest::HitTestRequest): Added 'capturing' data member,
1722         which specifies whether the hit test should capture mouse events that occur
1723         outside the WebView.
1724
1725         * rendering/RenderLayer.cpp:
1726         (WebCore::RenderLayer::hitTestLayer): Moved misleading comment to where
1727         it actually applies. Changed 'active' test to new 'capturing' test, so
1728         the hit test requester can decide whether we need to capture mouse events
1729         that don't intersect any layer.
1730
1731 2006-12-18  David Hyatt  <hyatt@apple.com>
1732
1733         Make sure a stroke style is set for list bullets.
1734
1735         Reviewed by mitz
1736
1737         * rendering/RenderListMarker.cpp:
1738         (WebCore::RenderListMarker::paint):
1739
1740 2006-12-18  Ada Chan  <adachan@apple.com>
1741
1742         Reviewed by Adam.
1743
1744         Moved implementation of Frame::scheduleClose to Frame.cpp.
1745         Added canRunBeforeUnloadConfirmPanel, runBeforeUnloadConfirmPanel, and closeWindowSoon
1746         in Chrome and ChromeClient.
1747
1748         * WebCore.exp:
1749         * bridge/win/FrameWin.h:
1750         * page/Chrome.cpp:
1751         (WebCore::Chrome::canRunBeforeUnloadConfirmPanel):
1752         (WebCore::Chrome::runBeforeUnloadConfirmPanel):
1753         (WebCore::Chrome::closeWindowSoon):
1754         * page/Chrome.h:
1755         * page/ChromeClient.h:
1756         * page/Frame.cpp:
1757         (WebCore::Frame::shouldClose):
1758         (WebCore::Frame::scheduleClose):
1759         * page/Frame.h:
1760         * page/mac/FrameMac.h:
1761         * page/mac/FrameMac.mm:
1762         * page/mac/WebCoreFrameBridge.h:
1763         * platform/gdk/FrameGdk.h:
1764         * platform/gdk/TemporaryLinkStubs.cpp:
1765         (FrameGdk::issuePasteCommand):
1766         * platform/qt/FrameQt.cpp:
1767         * platform/qt/FrameQt.h:
1768         * platform/win/TemporaryLinkStubs.cpp:
1769         (WebCore::FrameWin::issuePasteCommand):
1770
1771 2006-12-18  Alice Liu  <alice.liu@apple.com>
1772
1773         Reviewed by Adam.
1774
1775         Fixed <rdar://problem/4766174> REGRESSION(r16081): Aspect eWFM: Unable to log in
1776
1777         * loader/FrameLoader.cpp:
1778         (WebCore::FrameLoader::didExplicitOpen):
1779
1780 2006-12-18  David Hyatt  <hyatt@apple.com>
1781
1782         Add save/restore calls around the painting of text areas on Mac, since the methods in question
1783         alter the current fill color in CG destructively.
1784
1785         Reviewed by olliej
1786
1787         * rendering/RenderThemeMac.mm:
1788         (WebCore::RenderThemeMac::paintButton):
1789         (WebCore::RenderThemeMac::paintTextField):
1790         (WebCore::RenderThemeMac::paintTextArea):
1791         (WebCore::RenderThemeMac::paintSliderTrack):
1792         (WebCore::RenderThemeMac::paintSliderThumb):
1793
1794 2006-12-18  David Hyatt  <hyatt@apple.com>
1795
1796         Fix list markers to properly stroke and fill.  I screwed this up when changing how text draws.
1797
1798         Reviewed by olliej
1799
1800         * rendering/RenderListMarker.cpp:
1801         (WebCore::RenderListMarker::paint):
1802
1803 2006-12-18  David Hyatt  <hyatt@apple.com>
1804
1805         Eliminate the Pen object in favor of separate stroke variables, since most code just wants to set the
1806         stroke color.  This also makes it easier for us to push only stroke color through into CG synchronously
1807         while leaving the others alone.
1808
1809         Reviewed by olliej
1810
1811         * platform/graphics/GraphicsContext.cpp:
1812         (WebCore::GraphicsContextState::GraphicsContextState):
1813         (WebCore::GraphicsContext::setStrokeThickness):
1814         (WebCore::GraphicsContext::setStrokeStyle):
1815         (WebCore::GraphicsContext::setStrokeColor):
1816         (WebCore::GraphicsContext::strokeThickness):
1817         (WebCore::GraphicsContext::strokeStyle):
1818         (WebCore::GraphicsContext::strokeColor):
1819         (WebCore::GraphicsContext::setPlatformStrokeStyle):
1820         (WebCore::GraphicsContext::setPlatformStrokeThickness):
1821         * platform/graphics/GraphicsContext.h:
1822         (WebCore::):
1823         * platform/graphics/cg/GraphicsContextCG.cpp:
1824         (WebCore::GraphicsContext::drawRect):
1825         (WebCore::GraphicsContext::drawLine):
1826         (WebCore::GraphicsContext::drawEllipse):
1827         (WebCore::GraphicsContext::drawArc):
1828         (WebCore::GraphicsContext::drawConvexPolygon):
1829         (WebCore::GraphicsContext::drawLineForText):
1830         (WebCore::GraphicsContext::setPlatformStrokeColor):
1831         * platform/graphics/qt/GraphicsContextQt.cpp:
1832         (WebCore::toQPenStyle):
1833         (WebCore::GraphicsContext::setPlatformStrokeColor):
1834         (WebCore::GraphicsContext::setPlatformStrokeStyle):
1835         (WebCore::GraphicsContext::setPlatformStrokeThickness):
1836         * platform/mac/FontMac.mm:
1837         (WebCore::Font::drawComplexText):
1838         (WebCore::Font::drawGlyphs):
1839         * rendering/InlineFlowBox.cpp:
1840         (WebCore::InlineFlowBox::paintDecorations):
1841         * rendering/InlineTextBox.cpp:
1842         (WebCore::updateTextColor):
1843         (WebCore::InlineTextBox::paint):
1844         (WebCore::InlineTextBox::paintDecoration):
1845         (WebCore::InlineTextBox::paintMarkedTextUnderline):
1846         * rendering/RenderBlock.cpp:
1847         (WebCore::RenderBlock::paintObject):
1848         * rendering/RenderBox.cpp:
1849         * rendering/RenderBox.h:
1850         * rendering/RenderFrameSet.cpp:
1851         (WebCore::RenderFrameSet::userResize):
1852         * rendering/RenderImage.cpp:
1853         (WebCore::RenderImage::paint):
1854         * rendering/RenderObject.cpp:
1855         (WebCore::RenderObject::drawBorderArc):
1856         (WebCore::RenderObject::drawBorder):
1857         * rendering/RenderTable.cpp:
1858         (WebCore::RenderTable::paint):
1859         * rendering/RenderTableCell.cpp:
1860         (WebCore::RenderTableCell::paint):
1861         * rendering/RenderText.cpp:
1862         * rendering/RenderThemeMac.mm:
1863         (WebCore::RenderThemeMac::paintMenuListButton):
1864
1865 2006-12-18  Darin Adler  <darin@apple.com>
1866
1867         Reviewed by Adele.
1868
1869         - fix <rdar://problem/4889565> REGRESSION (r17597): Command-clicking a submit
1870           button does not submit in a new tab/window
1871           http://bugs.webkit.org/show_bug.cgi?id=11858
1872
1873         - change DOMActivate events to be created as a part of default handling of
1874           click events instead of having the sender of the click event also send
1875           a DOMActivate event
1876
1877         - fixed some edge cases in the slider thumb element handler; since this is
1878           inside a shadow DOM, it's likely none of these can arise in practice
1879
1880         No easy way to test the command-click part since the behavior is in Safari.
1881         To make a test we'd have to provide JavaScript access to the modifiers passed
1882         to the policy delegate or have some way to query the underlying event from
1883         JavaScript.
1884
1885         * dom/EventTargetNode.cpp: Change all assert to ASSERT.
1886         (WebCore::EventTargetNode::dispatchMouseEvent): Renamed some local variables
1887         for clarity. Added a RefPtr for relatedTarget since it might be deallocated
1888         by the handlers for the click event and is used in the code that creates the
1889         dblclick event. Removed the code to create a DOMActivate event, since that's
1890         now done in the default event handler for the click event.
1891         (WebCore::EventTargetNode::defaultEventHandler): Added code to check for a
1892         click event and dispatch a DOMActivate event using the click event as the
1893         underlying event. The part of this that fixes the bug is that we use the
1894         click event as the underlying event; the old code used the same underlying
1895         event as for the click event, not the click event itself. The underlying event
1896         for the click event is usually 0, since we propagate the key state to the click
1897         event instead of using an underlying event in the common case.
1898
1899         * dom/Document.cpp: (WebCore::Document::defaultEventHandler): Added call
1900         to the base class's defaultEventHandler function, except in the case where
1901         the event is already handled.
1902
1903         * html/HTMLInputElement.h: Removed clickX() and clickY().
1904         * html/HTMLInputElement.cpp:
1905         (WebCore::HTMLInputElement::appendFormData): Use xPos and yPos directly,
1906         so we can remove clickX() and clickY().
1907         (WebCore::HTMLInputElement::defaultEventHandler): Removed code that calls
1908         setDefaultHandled for click events since we are just recording the x and y
1909         coordinates of the events; that's not "handling" an event, and setting
1910         the flag prevents us from calling the base class's default event handler,
1911         which is now needed to submmit the form.
1912
1913         * rendering/RenderSlider.cpp:
1914         (WebCore::HTMLSliderThumbElement::defaultEventHandler):
1915         Added some missing isMouseEvent checks in code that casts to a MouseEvent.
1916         Added check document()->frame() in code that manipulates the frame so that
1917         fake events, which might happen when there's no frame, can't cause a crash.
1918         Added an m_inDragMode check so we don't try to handle mouseup events when
1919         we are not handling a drag. Remove the setDefaultHandled call from the
1920         mousemove case, because mousemove events are observed, and not "handled"
1921         in the "nobody else should look at this event" sense. Added a call to the
1922         base class's default event handler, and some return statements so that we
1923         won't call it when the event has been handled.
1924
1925         * html/HTMLLabelElement.cpp: (WebCore::HTMLLabelElement::defaultEventHandler):
1926         Removed an unneeded "return" for a function that has no return value.
1927
1928 2006-12-18  Beth Dakin  <bdakin@apple.com>
1929
1930         Reviewed by Adele.
1931
1932         Fix for <rdar://problem/4749770> WebCore crashes on a blog website 
1933         in WebCore::InlineBox::root() + 6
1934
1935         We null-check inlineBoxWrapper everywhere else in the code except 
1936         for these 3 spots. This patch adds them in. Only one of the checks 
1937         is required to fix the crash. What we render for the test case now 
1938         matches shipping Safari, but still seems wrong because we do not 
1939         match Firefox. I will file a follow-up about the rendering problem.
1940
1941         * rendering/RenderListItem.cpp:
1942         (WebCore::RenderListItem::positionListMarker): This is the required 
1943         null-check. 
1944         * rendering/RenderListMarker.cpp:
1945         (WebCore::RenderListMarker::setSelectionState): Null-check for 
1946         safety. 
1947         (WebCore::RenderListMarker::selectionRect): Same.
1948
1949 2006-12-18  David Hyatt  <hyatt@apple.com>
1950
1951         Fix performance regression caused by adding setting of stroke colors as well as fill colors to every font drawing
1952         call on Mac.  Fix is rather involved:
1953
1954         (1) Fill color is now updated in CG synchronously.  There is no more delay in the push.  I used the model that
1955         Qt added for this, setPlatformFillColor, so we're the same now.
1956
1957         (2) Text was being drawn using the pen color, which is tantamount to using the stroke color.  Since text in HTML
1958         is really a fill and not a stroke, all cross-platform code that draws text has been patched to use fill instead
1959         of the pen.
1960
1961         (3) Added a new API to GraphicsContext to set the text drawing mode to any combination of fill/stroke/clip.
1962         Ports should implement setPlatformTextDrawingMode or just query the mode in their drawGlyphs/drawComplexText
1963         method on their Font class to get the new functionality.
1964
1965         (4) InlineTextBox will set the fill and stroke colors appropriately now rather than always assuming fill.
1966
1967         (5) Fixed a bug in GraphicsContextCG where fillRectWithColor was updating the CG fill color in the state object
1968         as a side effect, creating a mismatch between CG's fill color and the stored cross-platform fill color.
1969
1970         Reviewed by olliej
1971
1972         * platform/graphics/GraphicsContext.cpp:
1973         (WebCore::GraphicsContextState::GraphicsContextState):
1974         (WebCore::GraphicsContext::textDrawingMode):
1975         (WebCore::GraphicsContext::setTextDrawingMode):
1976         (WebCore::GraphicsContext::setPlatformTextDrawingMode):
1977         (WebCore::GraphicsContext::setPlatformPen):
1978         * platform/graphics/GraphicsContext.h:
1979         * platform/graphics/cg/GraphicsContextCG.cpp:
1980         (WebCore::GraphicsContext::fillRect):
1981         (WebCore::GraphicsContext::setPlatformTextDrawingMode):
1982         (WebCore::GraphicsContext::setPlatformFillColor):
1983         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
1984         (WebCore::SVGPaintServerGradient::teardown):
1985         (WebCore::SVGPaintServerGradient::setup):
1986         * platform/graphics/svg/cg/SVGPaintServerPatternCg.cpp:
1987         (WebCore::SVGPaintServerPattern::setup):
1988         (WebCore::SVGPaintServerPattern::teardown):
1989         * platform/graphics/svg/cg/SVGPaintServerSolidCg.cpp:
1990         (WebCore::SVGPaintServerSolid::setup):
1991         * platform/mac/FontMac.mm:
1992         (WebCore::Font::drawComplexText):
1993         (WebCore::Font::drawGlyphs):
1994         * platform/mac/WebCoreTextRenderer.mm:
1995         (WebCoreDrawTextAtPoint):
1996         * rendering/EllipsisBox.cpp:
1997         (WebCore::EllipsisBox::paint):
1998         * rendering/InlineTextBox.cpp:
1999         (WebCore::correctedTextColor):
2000         (WebCore::updateTextColor):
2001         (WebCore::InlineTextBox::paint):
2002         (WebCore::InlineTextBox::paintSelection):
2003         (WebCore::InlineTextBox::paintMarkedTextBackground):
2004         (WebCore::InlineTextBox::paintTextMatchMarker):
2005         * rendering/RenderFileUploadControl.cpp:
2006         (WebCore::RenderFileUploadControl::paintObject):
2007         * rendering/RenderListBox.cpp:
2008         (WebCore::RenderListBox::paintItemForeground):
2009         * rendering/RenderListMarker.cpp:
2010         (WebCore::RenderListMarker::paint):
2011
2012 2006-12-18  Dex Deacon  <occupant4@gmail.com>
2013
2014         Reviewed by Maciej.
2015
2016         Bug 11760: Animated GIFs with offsets crash WebKit
2017         http://bugs.webkit.org/show_bug.cgi?id=11760
2018
2019         * platform/image-decoders/gif/GIFImageDecoder.cpp:
2020         ensure we don't write past the end of the image buffer when the offset
2021         is nonzero.  also fix the way we composite frames when animating.
2022         (WebCore::GIFImageDecoder::initFrameBuffer):
2023         (WebCore::GIFImageDecoder::haveDecodedRow):
2024
2025 2006-12-18  Kirby White  <KWhiteRight@gmail.com>
2026
2027         Reviewed by Darin.
2028
2029         Changed hidden input controls to reset to their initial values
2030         when the form is reset.  Also added layout tests for resetting
2031         other input controls.
2032
2033         Fixes http://bugs.webkit.org/show_bug.cgi?id=11866
2034
2035         * html/HTMLInputElement.cpp:
2036         (WebCore::HTMLInputElement::setValue):
2037         (WebCore::HTMLInputElement::storesValueSeparateFromAttribute):
2038
2039 2006-12-18  Alice Liu  <alice.liu@apple.com>
2040
2041         Oops forgot a file. 
2042
2043         * editing/EditorDeleteAction.h: Added.
2044         (WebCore::):
2045
2046 2006-12-18  Alice Liu  <alice.liu@apple.com>
2047
2048         Reviewed by Adam.
2049
2050         Have the Editor handle deletion instead of WebHTMLView
2051
2052         * WebCore.exp:
2053         Exposed Editor::deleteWithDirection and ::deleteRange()
2054
2055         * WebCore.xcodeproj/project.pbxproj:
2056         Added EditorDeleteAction.h
2057
2058         * editing/Editor.cpp:
2059         (WebCore::Editor::deleteRange):
2060         (WebCore::Editor::deleteWithDirection):
2061         Implemented
2062
2063         (WebCore::Editor::deleteSelectionWithSmartDelete):
2064         Overloaded to take no params, in which case canSmartCopyOrDelete is called
2065
2066         (WebCore::execCopy):
2067         (WebCore::execCut):
2068         (WebCore::execDelete):
2069         (WebCore::execPaste):
2070         Call the editor instead of asking frame to cut/copy/paste/delete
2071
2072         (WebCore::execBackwardDelete):
2073         (WebCore::execForwardDelete):
2074         Call deleteWithDirection instead of just executing a TypingCommand
2075
2076         (WebCore::CommandEntry::):
2077         distinguished delete (which deletes selection) from backwards delete (single character, no selection)
2078
2079         (WebCore::Editor::cut):
2080         (WebCore::Editor::performDelete):
2081         Trivial changes
2082
2083         * editing/Editor.h:
2084         Added some functons.
2085         (WebCore::Editor::setStartNewKillRingSequence):
2086         (WebCore::Editor::propogateDOMException):
2087         (WebCore::Editor::addToKillRing):
2088         * editing/mac/EditorMac.mm:
2089         Factored out support for Kill Rings to this file
2090
2091         * platform/mac/PasteboardMac.mm:
2092         Trivial change
2093
2094 2006-12-18  Kevin McCullough  <KMcCullough@apple.com>
2095
2096         Reviewed by Oliver.
2097
2098         - Removed CG header include
2099
2100         * platform/graphics/ImageSource.h:
2101
2102 2006-12-18  John Sullivan  <sullivan@apple.com>
2103
2104         Reviewed by Tim Hatcher
2105
2106         - fixed <rdar://problem/4887764> GMAIL: Crash occurs at WebCore::Range::cloneRange() 
2107           when I ctrl-click in a empty list item
2108
2109         * editing/mac/EditorMac.mm:
2110         (WebCore::isRangeUngrammatical):
2111         bail out immediately for nil range (which selectionController()->toRange().get()
2112         can return). Also save some work by bailing out immediately for collapsed ranges.
2113
2114 2006-12-18  Alice Liu  <alice.liu@apple.com>
2115
2116         Leopard build fix.
2117
2118         * platform/ContextMenu.cpp:
2119         (WebCore::ContextMenu::checkOrEnableIfNeeded):
2120
2121 2006-12-17  Zack Rusin  <zack@kde.org>
2122
2123         Fix compilation after the const changes.
2124
2125         * platform/qt/ContextMenuItemQt.cpp:
2126         (WebCore::ContextMenuItem::type):
2127         (WebCore::ContextMenuItem::setTitle):
2128         (WebCore::ContextMenuItem::setChecked):
2129         (WebCore::ContextMenuItem::setEnabled):
2130
2131 2006-12-17  Nikolas Zimmermann  <zimmermann@kde.org>
2132
2133         Reviewed by Eric.
2134
2135         Fixes: http://bugs.webkit.org/show_bug.cgi?id=10956
2136
2137         Long standing regression. The old code in FontMac.mm, used set the fill/stroke
2138         color "[nsColor(graphicsContext->pen().color()) set];", and current code only
2139         sets the fill color. Reverting to old behaviour fixes gradient-on-stroke-of-text.
2140
2141         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
2142         (WebCore::SVGPaintServerGradient::setup):
2143         * platform/mac/FontMac.mm:
2144         (WebCore::Font::drawComplexText):
2145         (WebCore::Font::drawGlyphs):
2146
2147 2006-12-17  Lars Naesbye Christensen  <larsnaesbye@stud.ku.dk>
2148
2149         Reviewed, tweaked and landed by Alexey.
2150
2151         http://bugs.webkit.org/show_bug.cgi?id=11798
2152         [CSS 3] missing cursor support for 'none'
2153
2154         * Resources/noneCursor.png: Added.
2155         * WebCore.xcodeproj/project.pbxproj:
2156         * css/CSSComputedStyleDeclaration.cpp:
2157         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2158         * css/CSSValueKeywords.in:
2159         * css/cssparser.cpp: Also fixed previously broken -webkit-background-composite: copy.
2160         * manual-tests/cursor.html:
2161         * page/EventHandler.cpp:
2162         (WebCore::selectCursor):
2163         * platform/Cursor.h:
2164         * platform/gdk/CursorGdk.cpp:
2165         (WebCore::noneCursor):
2166         * platform/mac/CursorMac.mm:
2167         (WebCore::noneCursor):
2168         * platform/qt/CursorQt.cpp:
2169         (WebCore::noneCursor):
2170         * platform/win/CursorWin.cpp:
2171         (WebCore::noneCursor):
2172         * rendering/RenderStyle.h:
2173         (WebCore::):
2174
2175 2006-12-17  Nikolas Zimmermann  <zimmermann@kde.org>
2176
2177         Build fix, not reviewed.
2178
2179         This should hopefully fix Qt build.
2180
2181         * ksvg2/svg/SVGLength.cpp: Include math.h for Qt/Linux build.
2182
2183 2006-12-17  Nikolas Zimmermann  <zimmermann@kde.org>
2184
2185         Reviewed by Rob.
2186
2187         Remove SVGHelper class. Move the last static function "parseSeparatedList"
2188         to the only place using it: SVGAnimationElement. Update all build files.
2189
2190         Remove any lazy_create macro usage, by what it does - cleaner.
2191
2192         * CMakeLists.txt:
2193         * WebCore.pro:
2194         * WebCore.xcodeproj/project.pbxproj:
2195         * ksvg2/misc/KCanvasRenderingStyle.cpp:
2196         * ksvg2/svg/SVGAElement.cpp:
2197         * ksvg2/svg/SVGAnimationElement.cpp:
2198         (WebCore::parseSeparatedList):
2199         (WebCore::SVGAnimationElement::parseMappedAttribute):
2200         * ksvg2/svg/SVGCircleElement.cpp:
2201         * ksvg2/svg/SVGClipPathElement.cpp:
2202         * ksvg2/svg/SVGComponentTransferFunctionElement.cpp:
2203         * ksvg2/svg/SVGCursorElement.cpp:
2204         * ksvg2/svg/SVGEllipseElement.cpp:
2205         * ksvg2/svg/SVGExternalResourcesRequired.cpp:
2206         * ksvg2/svg/SVGFEBlendElement.cpp:
2207         * ksvg2/svg/SVGFEColorMatrixElement.cpp:
2208         * ksvg2/svg/SVGFEComponentTransferElement.cpp:
2209         * ksvg2/svg/SVGFECompositeElement.cpp:
2210         * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
2211         * ksvg2/svg/SVGFEDisplacementMapElement.cpp:
2212         * ksvg2/svg/SVGFEFloodElement.cpp:
2213         * ksvg2/svg/SVGFEGaussianBlurElement.cpp:
2214         * ksvg2/svg/SVGFEImageElement.cpp:
2215         * ksvg2/svg/SVGFELightElement.cpp:
2216         * ksvg2/svg/SVGFEMergeElement.cpp:
2217         * ksvg2/svg/SVGFEMergeNodeElement.cpp:
2218         * ksvg2/svg/SVGFEOffsetElement.cpp:
2219         * ksvg2/svg/SVGFESpecularLightingElement.cpp:
2220         * ksvg2/svg/SVGFETileElement.cpp:
2221         * ksvg2/svg/SVGFilterElement.cpp:
2222         * ksvg2/svg/SVGForeignObjectElement.cpp:
2223         * ksvg2/svg/SVGGradientElement.cpp:
2224         * ksvg2/svg/SVGHelper.cpp: Removed.
2225         * ksvg2/svg/SVGHelper.h: Removed.
2226         * ksvg2/svg/SVGImageElement.cpp:
2227         * ksvg2/svg/SVGLength.cpp:
2228         * ksvg2/svg/SVGLineElement.cpp:
2229         * ksvg2/svg/SVGLinearGradientElement.cpp:
2230         * ksvg2/svg/SVGMarkerElement.cpp:
2231         * ksvg2/svg/SVGMaskElement.cpp:
2232         * ksvg2/svg/SVGPathElement.cpp:
2233         * ksvg2/svg/SVGPatternElement.cpp:
2234         * ksvg2/svg/SVGPolyElement.cpp:
2235         * ksvg2/svg/SVGRadialGradientElement.cpp:
2236         * ksvg2/svg/SVGRectElement.cpp:
2237         * ksvg2/svg/SVGStopElement.cpp:
2238         * ksvg2/svg/SVGStyledElement.cpp:
2239         * ksvg2/svg/SVGStyledTransformableElement.cpp:
2240         * ksvg2/svg/SVGSymbolElement.cpp:
2241         * ksvg2/svg/SVGTests.cpp:
2242         * ksvg2/svg/SVGTextContentElement.cpp:
2243         * ksvg2/svg/SVGTextElement.cpp:
2244         * ksvg2/svg/SVGTextPositioningElement.cpp:
2245         * ksvg2/svg/SVGTransformable.cpp:
2246         * ksvg2/svg/SVGURIReference.cpp:
2247         * ksvg2/svg/SVGUseElement.cpp:
2248         * ksvg2/svg/SVGViewElement.cpp:
2249         * ksvg2/svg/SVGZoomAndPan.cpp:
2250
2251 2006-12-17  Nikolas Zimmermann  <zimmermann@kde.org>
2252
2253         Reviewed by Rob.
2254
2255         Fixes: http://bugs.webkit.org/show_bug.cgi?id=11813
2256
2257         Pass SVGLength around by value, remove any SVGLength* usage.
2258         Bindings work fine, as the SVG POD JS Wrapper stuff is already in svn.
2259
2260         No new regressions, none fixed. But the code itself is much cleaner.
2261         And some problems with width-full-percentage.svg have been fixed, viewport
2262         clipping works in any case now, also for percentual width/height values set on <svg>.
2263
2264         * bindings/scripts/CodeGenerator.pm:
2265         * bindings/scripts/CodeGeneratorJS.pm:
2266         * ksvg2/misc/KCanvasRenderingStyle.cpp:
2267         (WebCore::KSVGPainterFactory::cssPrimitiveToLength):
2268         * ksvg2/svg/SVGAnimatedTemplate.h:
2269         * ksvg2/svg/SVGCircleElement.cpp:
2270         (WebCore::SVGCircleElement::SVGCircleElement):
2271         (WebCore::SVGCircleElement::parseMappedAttribute):
2272         (WebCore::SVGCircleElement::toPathData):
2273         * ksvg2/svg/SVGCircleElement.h:
2274         * ksvg2/svg/SVGCursorElement.cpp:
2275         (WebCore::SVGCursorElement::SVGCursorElement):
2276         (WebCore::SVGCursorElement::parseMappedAttribute):
2277         * ksvg2/svg/SVGCursorElement.h:
2278         * ksvg2/svg/SVGElement.cpp:
2279         * ksvg2/svg/SVGEllipseElement.cpp:
2280         (WebCore::SVGEllipseElement::SVGEllipseElement):
2281         (WebCore::SVGEllipseElement::parseMappedAttribute):
2282         (WebCore::SVGEllipseElement::toPathData):
2283         * ksvg2/svg/SVGEllipseElement.h:
2284         * ksvg2/svg/SVGFilterElement.cpp:
2285         (WebCore::SVGFilterElement::SVGFilterElement):
2286         (WebCore::SVGFilterElement::parseMappedAttribute):
2287         (WebCore::SVGFilterElement::canvasResource):
2288         * ksvg2/svg/SVGFilterElement.h:
2289         * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.cpp:
2290         (WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
2291         (WebCore::SVGFilterPrimitiveStandardAttributes::parseMappedAttribute):
2292         (WebCore::SVGFilterPrimitiveStandardAttributes::setStandardAttributes):
2293         * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.h:
2294         * ksvg2/svg/SVGFitToViewBox.cpp:
2295         (WebCore::SVGFitToViewBox::parseViewBox):
2296         * ksvg2/svg/SVGForeignObjectElement.cpp:
2297         (WebCore::SVGForeignObjectElement::SVGForeignObjectElement):
2298         (WebCore::SVGForeignObjectElement::parseMappedAttribute):
2299         (WebCore::SVGForeignObjectElement::createRenderer):
2300         (WebCore::SVGForeignObjectElement::childShouldCreateRenderer):
2301         * ksvg2/svg/SVGForeignObjectElement.h:
2302         * ksvg2/svg/SVGHelper.cpp:
2303         (WebCore::SVGHelper::parseSeparatedList):
2304         * ksvg2/svg/SVGHelper.h:
2305         * ksvg2/svg/SVGImageElement.cpp:
2306         (WebCore::SVGImageElement::SVGImageElement):
2307         (WebCore::SVGImageElement::parseMappedAttribute):
2308         * ksvg2/svg/SVGImageElement.h:
2309         * ksvg2/svg/SVGLength.cpp:
2310         (WebCore::storeUnit):
2311         (WebCore::extractMode):
2312         (WebCore::extractType):
2313         (WebCore::lengthTypeToString):
2314         (WebCore::stringToLengthType):
2315         (WebCore::SVGLength::SVGLength):
2316         (WebCore::SVGLength::unitType):
2317         (WebCore::SVGLength::value):
2318         (WebCore::SVGLength::setValue):
2319         (WebCore::SVGLength::setValueInSpecifiedUnits):
2320         (WebCore::SVGLength::setValueAsString):
2321         (WebCore::SVGLength::valueAsString):
2322         (WebCore::SVGLength::newValueSpecifiedUnits):
2323         (WebCore::SVGLength::convertToSpecifiedUnits):
2324         (WebCore::SVGLength::isFraction):
2325         (WebCore::SVGLength::dpi):
2326         (WebCore::SVGLength::PercentageOfViewport):
2327         * ksvg2/svg/SVGLength.h:
2328         (WebCore::):
2329         (WebCore::SVGLength::):
2330         * ksvg2/svg/SVGLength.idl:
2331         * ksvg2/svg/SVGLengthList.cpp:
2332         (WebCore::SVGLengthList::SVGLengthList):
2333         (WebCore::SVGLengthList::parse):
2334         * ksvg2/svg/SVGLengthList.h:
2335         * ksvg2/svg/SVGLineElement.cpp:
2336         (WebCore::SVGLineElement::SVGLineElement):
2337         (WebCore::SVGLineElement::parseMappedAttribute):
2338         (WebCore::SVGLineElement::toPathData):
2339         * ksvg2/svg/SVGLineElement.h:
2340         * ksvg2/svg/SVGLinearGradientElement.cpp:
2341         (WebCore::SVGLinearGradientElement::SVGLinearGradientElement):
2342         (WebCore::SVGLinearGradientElement::parseMappedAttribute):
2343         (WebCore::SVGLinearGradientElement::buildGradient):
2344         * ksvg2/svg/SVGLinearGradientElement.h:
2345         * ksvg2/svg/SVGMarkerElement.cpp:
2346         (WebCore::SVGMarkerElement::SVGMarkerElement):
2347         (WebCore::SVGMarkerElement::parseMappedAttribute):
2348         (WebCore::SVGMarkerElement::canvasResource):
2349         * ksvg2/svg/SVGMarkerElement.h:
2350         * ksvg2/svg/SVGMaskElement.cpp:
2351         (WebCore::SVGMaskElement::SVGMaskElement):
2352         (WebCore::SVGMaskElement::attributeChanged):
2353         (WebCore::SVGMaskElement::parseMappedAttribute):
2354         (WebCore::SVGMaskElement::drawMaskerContent):
2355         * ksvg2/svg/SVGMaskElement.h:
2356         * ksvg2/svg/SVGPatternElement.cpp:
2357         (WebCore::SVGPatternElement::SVGPatternElement):
2358         (WebCore::SVGPatternElement::parseMappedAttribute):
2359         (WebCore::SVGPatternElement::drawPatternContentIntoTile):
2360         (WebCore::SVGPatternElement::notifyAttributeChange):
2361         (WebCore::SVGPatternElement::getCTM):
2362         * ksvg2/svg/SVGPatternElement.h:
2363         * ksvg2/svg/SVGRadialGradientElement.cpp:
2364         (WebCore::SVGRadialGradientElement::SVGRadialGradientElement):
2365         (WebCore::SVGRadialGradientElement::parseMappedAttribute):
2366         (WebCore::SVGRadialGradientElement::buildGradient):
2367         * ksvg2/svg/SVGRadialGradientElement.h:
2368         * ksvg2/svg/SVGRectElement.cpp:
2369         (WebCore::SVGRectElement::SVGRectElement):
2370         (WebCore::SVGRectElement::parseMappedAttribute):
2371         (WebCore::SVGRectElement::toPathData):
2372         * ksvg2/svg/SVGRectElement.h:
2373         * ksvg2/svg/SVGSVGElement.cpp:
2374         (WebCore::SVGSVGElement::SVGSVGElement):
2375         (WebCore::SVGSVGElement::viewport):
2376         (WebCore::SVGSVGElement::parseMappedAttribute):
2377         (WebCore::SVGSVGElement::createSVGLength):
2378         (WebCore::SVGSVGElement::getCTM):
2379         (WebCore::SVGSVGElement::getScreenCTM):
2380         * ksvg2/svg/SVGSVGElement.h:
2381         * ksvg2/svg/SVGStyledElement.cpp:
2382         * ksvg2/svg/SVGStyledElement.h:
2383         * ksvg2/svg/SVGTextContentElement.cpp:
2384         (WebCore::SVGTextContentElement::SVGTextContentElement):
2385         (WebCore::SVGTextContentElement::parseMappedAttribute):
2386         * ksvg2/svg/SVGTextContentElement.h:
2387         * ksvg2/svg/SVGTextElement.cpp:
2388         * ksvg2/svg/SVGTextPositioningElement.cpp:
2389         (WebCore::SVGTextPositioningElement::parseMappedAttribute):
2390         * ksvg2/svg/SVGUseElement.cpp:
2391         (WebCore::SVGUseElement::SVGUseElement):
2392         (WebCore::SVGUseElement::parseMappedAttribute):
2393         (WebCore::SVGUseElement::closeRenderer):
2394         * ksvg2/svg/SVGUseElement.h:
2395         * page/EventHandler.cpp:
2396         (WebCore::selectCursor):
2397         * rendering/RenderForeignObject.cpp:
2398         (WebCore::RenderForeignObject::translationForAttributes):
2399         * rendering/RenderPath.cpp:
2400         * rendering/RenderPath.h:
2401         * rendering/RenderSVGContainer.cpp:
2402         (WebCore::RenderSVGContainer::layout):
2403         (WebCore::RenderSVGContainer::calcViewport):
2404         * rendering/RenderSVGImage.cpp:
2405         (WebCore::RenderSVGImage::relativeBBox):
2406         (WebCore::RenderSVGImage::getAbsoluteRepaintRect):
2407         (WebCore::RenderSVGImage::translationForAttributes):
2408         * rendering/RenderSVGText.cpp:
2409         (WebCore::RenderSVGText::layout):
2410         * rendering/SVGInlineFlowBox.cpp:
2411         (WebCore::translateBox):
2412         (WebCore::placePositionedBoxesHorizontally):
2413         (WebCore::placeBoxesVerticallyWithAbsBaseline):
2414
2415 2006-12-16  Sam Weinig  <sam@webkit.org>
2416
2417         Reviewed by Maciej.
2418
2419         Patch for http://bugs.webkit.org/show_bug.cgi?id=11856
2420         Update renderName() methods to return current class names.
2421
2422         * rendering/RenderPath.h:
2423         (WebCore::RenderPath::renderName): Returns "RenderPath" instead of "KCanvasItem".
2424         * rendering/RenderSVGContainer.h:
2425         (WebCore::RenderSVGContainer::renderName): Returns "RenderSVGContainer" instead of "KCanvasContainer".
2426         * rendering/RenderTextControl.h:
2427         (WebCore::RenderTextControl::renderName): Returns "RenderTextControl" instead of "RenderTextField".
2428
2429 2006-12-16  Sam Weinig  <sam@webkit.org>
2430
2431         Reviewed by Mitz.
2432
2433         Patch for http://bugs.webkit.org/show_bug.cgi?id=11844
2434         Code Cleanup for more of the rendering code
2435
2436         * WebCore.xcodeproj/project.pbxproj:
2437         * rendering/RenderCounter.cpp:
2438         (WebCore::RenderCounter::calcMinMaxWidth):
2439         * rendering/RenderText.cpp:
2440         (WebCore::RenderText::RenderText):
2441         (WebCore::RenderText::setStyle):
2442         (WebCore::RenderText::destroy):
2443         (WebCore::RenderText::attachTextBox):
2444         (WebCore::RenderText::findNextInlineTextBox):
2445         (WebCore::RenderText::positionForCoordinates):
2446         (WebCore::firstRendererOnNextLine):
2447         (WebCore::lastRendererOnPrevLine):
2448         (WebCore::RenderText::caretRect):
2449         (WebCore::RenderText::posOfChar):
2450         (WebCore::RenderText::allAscii):
2451         (WebCore::RenderText::shouldUseMonospaceCache):
2452         (WebCore::RenderText::cacheWidths):
2453         (WebCore::RenderText::widthFromCache):
2454         (WebCore::RenderText::trimmedMinMaxWidth):
2455         (WebCore::RenderText::calcMinMaxWidth):
2456         (WebCore::isSpaceAccordingToStyle):
2457         (WebCore::RenderText::containsOnlyWhitespace):
2458         (WebCore::RenderText::minXPos):
2459         (WebCore::RenderText::setSelectionState):
2460         (WebCore::RenderText::setTextWithOffset):
2461         (WebCore::RenderText::setText):
2462         (WebCore::RenderText::position):
2463         (WebCore::RenderText::width):
2464         (WebCore::RenderText::getAbsoluteRepaintRect):
2465         (WebCore::RenderText::selectionRect):
2466         (WebCore::RenderText::verticalPositionHint):
2467         (WebCore::RenderText::font):
2468         (WebCore::RenderText::caretMinOffset):
2469         (WebCore::RenderText::caretMaxOffset):
2470         (WebCore::RenderText::previousOffset):
2471         (WebCore::RenderText::nextOffset):
2472         (WebCore::RenderText::inlineBox):
2473         * rendering/RenderText.h:
2474         (WebCore::RenderText::isTextFragment):
2475         (WebCore::RenderText::data):
2476         (WebCore::RenderText::string):
2477         (WebCore::RenderText::paint):
2478         (WebCore::RenderText::layout):
2479         (WebCore::RenderText::nodeAtPoint):
2480         (WebCore::RenderText::length):
2481         (WebCore::RenderText::text):
2482         (WebCore::RenderText::stringLength):
2483         * rendering/RenderTextControl.cpp:
2484         (WebCore::RenderTextControl::setStyle):
2485         (WebCore::disabledTextColor):
2486         (WebCore::RenderTextControl::createInnerBlockStyle):
2487         (WebCore::RenderTextControl::createInnerTextStyle):
2488         (WebCore::RenderTextControl::createResultsButtonStyle):
2489         (WebCore::RenderTextControl::createCancelButtonStyle):
2490         (WebCore::RenderTextControl::showPlaceholderIfNeeded):
2491         (WebCore::RenderTextControl::hidePlaceholderIfNeeded):
2492         (WebCore::RenderTextControl::createSubtreeIfNeeded):
2493         (WebCore::RenderTextControl::updateFromElement):
2494         (WebCore::RenderTextControl::selectionStart):
2495         (WebCore::RenderTextControl::setSelectionRange):
2496         (WebCore::RenderTextControl::visiblePositionForIndex):
2497         (WebCore::RenderTextControl::subtreeHasChanged):
2498         (WebCore::RenderTextControl::textWithHardLineBreaks):
2499         (WebCore::RenderTextControl::calcHeight):
2500         (WebCore::RenderTextControl::nodeAtPoint):
2501         (WebCore::RenderTextControl::layout):
2502         (WebCore::RenderTextControl::calcMinMaxWidth):
2503         (WebCore::RenderTextControl::addSearchResult):
2504         (WebCore::RenderTextControl::showPopup):
2505         (WebCore::RenderTextControl::itemText):
2506         (WebCore::RenderTextControl::itemIsEnabled):
2507         (WebCore::RenderTextControl::listSize):
2508         (WebCore::RenderTextControl::scroll):
2509         * rendering/RenderTextControl.h:
2510         (WebCore::RenderTextControl::renderName):
2511         (WebCore::RenderTextControl::removeLeftoverAnonymousBoxes):
2512         * rendering/RenderTextFragment.cpp:
2513         (WebCore::RenderTextFragment::RenderTextFragment):
2514         (WebCore::RenderTextFragment::originalString):
2515         * rendering/RenderTextFragment.h:
2516         (WebCore::RenderTextFragment::isTextFragment):
2517         * rendering/RenderTheme.cpp:
2518         (WebCore::RenderTheme::adjustStyle):
2519         (WebCore::RenderTheme::isControlStyled):
2520         (WebCore::RenderTheme::stateChanged):
2521         (WebCore::RenderTheme::adjustCheckboxStyle):
2522         (WebCore::RenderTheme::adjustRadioStyle):
2523         * rendering/RenderTheme.h:
2524         (WebCore::):
2525         * rendering/RenderThemeMac.h:
2526         * rendering/RenderThemeMac.mm:
2527         (WebCore::RenderThemeMac::RenderThemeMac):
2528         (WebCore::RenderThemeMac::platformActiveSelectionBackgroundColor):
2529         (WebCore::RenderThemeMac::platformInactiveSelectionBackgroundColor):
2530         (WebCore::RenderThemeMac::activeListBoxSelectionBackgroundColor):
2531         (WebCore::RenderThemeMac::systemFont):
2532         (WebCore::RenderThemeMac::isControlStyled):
2533         (WebCore::RenderThemeMac::adjustRepaintRect):
2534         (WebCore::RenderThemeMac::updateCheckedState):
2535         (WebCore::RenderThemeMac::controlSupportsTints):
2536         (WebCore::RenderThemeMac::setFontFromControlSize):
2537         (WebCore::RenderThemeMac::paintCheckbox):
2538         (WebCore::RenderThemeMac::checkboxMargins):
2539         (WebCore::RenderThemeMac::setCheckboxCellState):
2540         (WebCore::RenderThemeMac::setCheckboxSize):
2541         (WebCore::RenderThemeMac::paintRadio):
2542         (WebCore::RenderThemeMac::radioMargins):
2543         (WebCore::RenderThemeMac::setRadioCellState):
2544         (WebCore::RenderThemeMac::setRadioSize):
2545         (WebCore::RenderThemeMac::adjustButtonStyle):
2546         (WebCore::RenderThemeMac::buttonMargins):
2547         (WebCore::RenderThemeMac::setButtonSize):
2548         (WebCore::RenderThemeMac::setButtonCellState):
2549         (WebCore::RenderThemeMac::adjustTextFieldStyle):
2550         (WebCore::RenderThemeMac::adjustTextAreaStyle):
2551         (WebCore::RenderThemeMac::popupButtonMargins):
2552         (WebCore::RenderThemeMac::popupButtonPadding):
2553         (WebCore::TopGradientInterpolate):
2554         (WebCore::BottomGradientInterpolate):
2555         (WebCore::MainGradientInterpolate):
2556         (WebCore::TrackGradientInterpolate):
2557         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
2558         (WebCore::RenderThemeMac::paintMenuListButton):
2559         (WebCore::RenderThemeMac::adjustMenuListStyle):
2560         (WebCore::RenderThemeMac::adjustMenuListButtonStyle):
2561         (WebCore::RenderThemeMac::paintSliderTrack):
2562         (WebCore::RenderThemeMac::paintSliderThumb):
2563         (WebCore::RenderThemeMac::paintSearchField):
2564         (WebCore::RenderThemeMac::setSearchCellState):
2565         (WebCore::RenderThemeMac::adjustSearchFieldStyle):
2566         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
2567         (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration):
2568         * rendering/RenderTreeAsText.cpp:
2569         (WebCore::operator<<):
2570         (WebCore::writeIndent):
2571         (WebCore::printBorderStyle):
2572         (WebCore::getTagName):
2573         (WebCore::isEmptyOrUnstyledAppleStyleSpan):
2574         (WebCore::writeTextRun):
2575         (WebCore::write):
2576         (WebCore::writeLayers):
2577         (WebCore::nodePosition):
2578         (WebCore::writeSelection):
2579         * rendering/RenderTreeAsText.h:
2580         * rendering/RenderView.cpp:
2581         (WebCore::RenderView::RenderView):
2582         (WebCore::RenderView::calcMinMaxWidth):
2583         (WebCore::RenderView::layout):
2584         (WebCore::RenderView::absolutePosition):
2585         (WebCore::RenderView::paint):
2586         (WebCore::RenderView::repaintViewRectangle):
2587         (WebCore::rendererAfterPosition):
2588         (WebCore::RenderView::selectionRect):
2589         (WebCore::RenderView::setSelection):
2590         (WebCore::RenderView::selectionStartEnd):
2591         (WebCore::RenderView::updateWidgetPositions):
2592         (WebCore::RenderView::addWidget):
2593         (WebCore::RenderView::removeWidget):
2594         (WebCore::RenderView::viewRect):
2595         (WebCore::RenderView::docHeight):
2596         (WebCore::RenderView::docWidth):
2597         (WebCore::RenderView::setBestTruncatedAt):
2598         * rendering/RenderView.h:
2599         (WebCore::RenderView::renderName):
2600         (WebCore::RenderView::selectionStart):
2601         (WebCore::RenderView::selectionEnd):
2602         * rendering/RenderWidget.cpp:
2603         (WebCore::RenderWidget::destroy):
2604         (WebCore::RenderWidget::resizeWidget):
2605         (WebCore::RenderWidget::setStyle):
2606         (WebCore::RenderWidget::paint):
2607         (WebCore::RenderWidget::updateWidgetPosition):
2608         (WebCore::RenderWidget::setSelectionState):
2609         * rendering/RootInlineBox.cpp:
2610         (WebCore::RootInlineBox::placeEllipsis):
2611         (WebCore::RootInlineBox::fillLineSelectionGap):
2612         (WebCore::RootInlineBox::selectionState):
2613         (WebCore::RootInlineBox::firstSelectedBox):
2614         (WebCore::RootInlineBox::lastSelectedBox):
2615         (WebCore::RootInlineBox::selectionTop):
2616         (WebCore::RootInlineBox::closestLeafChildForXPos):
2617         * rendering/RootInlineBox.h:
2618         (WebCore::RootInlineBox::isRootInlineBox):
2619         (WebCore::RootInlineBox::setVerticalOverflowPositions):
2620         (WebCore::RootInlineBox::setHorizontalOverflowPositions):
2621         (WebCore::RootInlineBox::setVerticalSelectionPositions):
2622         (WebCore::RootInlineBox::lineBreakObj):
2623         (WebCore::RootInlineBox::lineBreakPos):
2624         (WebCore::RootInlineBox::setLineBreakPos):
2625         (WebCore::RootInlineBox::blockHeight):
2626         (WebCore::RootInlineBox::setBlockHeight):
2627         (WebCore::RootInlineBox::endsWithBreak):
2628         (WebCore::RootInlineBox::setEndsWithBreak):
2629         * rendering/SVGInlineFlowBox.cpp:
2630         (WebCore::SVGInlineFlowBox::paint):
2631         (WebCore::paintSVGInlineFlow):
2632         (WebCore::translateBox):
2633         (WebCore::placePositionedBoxesHorizontally):
2634         (WebCore::placeBoxesVerticallyWithAbsBaseline):
2635         (WebCore::placeSVGFlowVertically):
2636         * rendering/SVGInlineFlowBox.h:
2637         * rendering/SVGRenderTreeAsText.cpp:
2638         (WebCore::TextStreamSeparator::TextStreamSeparator):
2639         (WebCore::operator<<):
2640         (WebCore::hasFractions):
2641         (WebCore::writeIndent):
2642         (WebCore::writeStyle):
2643         (WebCore::getTagName):
2644         (WebCore::write):
2645         (WebCore::writeRenderResources):
2646         * rendering/SVGRenderTreeAsText.h:
2647         (WebCore::operator<<):
2648         * rendering/SVGRootInlineBox.cpp:
2649         (WebCore::SVGRootInlineBox::paint):
2650         (WebCore::SVGRootInlineBox::placeBoxesHorizontally):
2651         * rendering/SVGRootInlineBox.h:
2652         * rendering/TableLayout.h:
2653
2654 2006-12-16  Adam Roben  <aroben@apple.com>
2655
2656         Build fixes.
2657
2658         * platform/ContextMenuItem.h: Fixed const declarations.
2659         * platform/mac/ContextMenuItemMac.mm: Dito.
2660         (WebCore::ContextMenuItem::type):
2661         (WebCore::ContextMenuItem::setTitle):
2662         (WebCore::ContextMenuItem::setChecked):
2663         (WebCore::ContextMenuItem::setEnabled):
2664
2665 2006-12-16  Adele Peterson  <adele@apple.com>
2666
2667         Reviewed by Maciej.
2668
2669         Fix for http://bugs.webkit.org/show_bug.cgi?id=11189
2670         <rdar://problem/4770249> REGRESSION (NativeListBox): When a list box has focus, pressing command- A (select all) doesn't selected all items in list
2671
2672         Test: fast/forms/listbox-select-all.html
2673
2674         * dom/Node.h: We should try to find a more appropriate place to put these methods.
2675         (WebCore::Node::canSelectAll): Added.
2676         (WebCore::Node::selectAll): Added.
2677         * editing/SelectionController.cpp: (WebCore::SelectionController::selectAll): Before selecting editable content, give the focused node
2678           a chance to select its content.
2679         * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::selectAll): Selects all items in a multi-select list box.  Single-select
2680           list boxes will just do nothing, but we still want the select to handle this case when it has focus, rather than selecting other content.
2681         * html/HTMLSelectElement.h: (WebCore::HTMLSelectElement::canSelectAll): Returns true for list boxes.
2682
2683 2006-12-16  Zack Rusin  <zack@kde.org>
2684
2685         Add a stub for SearchPopupMenu for Qt code.
2686
2687         * platform/qt/SearchPopupMenuQt.cpp: Added.
2688         (WebCore::SearchPopupMenu::SearchPopupMenu):
2689         (WebCore::SearchPopupMenu::saveRecentSearches):
2690         (WebCore::SearchPopupMenu::loadRecentSearches):
2691
2692 2006-12-16  Zack Rusin  <zack@kde.org>
2693
2694         Make it compile after last nights changes.
2695
2696         * WebCore.pro:
2697         * loader/qt/DocumentLoaderQt.cpp:
2698         (WebCore::DocumentLoader::stopLoading):
2699         (WebCore::DocumentLoader::prepareForLoadStart):
2700         * platform/qt/ContextMenuItemQt.cpp:
2701         (WebCore::ContextMenuItem::ContextMenuItem):
2702         (WebCore::ContextMenuItem::releasePlatformDescription):
2703         (WebCore::ContextMenuItem::type):
2704         (WebCore::ContextMenuItem::setType):
2705         (WebCore::ContextMenuItem::action):
2706         (WebCore::ContextMenuItem::setAction):
2707         (WebCore::ContextMenuItem::setTitle):
2708         (WebCore::ContextMenuItem::platformSubMenu):
2709         (WebCore::ContextMenuItem::setSubMenu):
2710         (WebCore::ContextMenuItem::setChecked):
2711         (WebCore::ContextMenuItem::setEnabled):
2712         * platform/qt/ContextMenuQt.cpp:
2713         (WebCore::ContextMenu::appendItem):
2714         (WebCore::ContextMenu::insertItem):
2715         * platform/qt/TemporaryLinkStubs.cpp:
2716
2717 2006-12-16  Adele Peterson  <adele@apple.com>
2718
2719         One more...
2720
2721         * editing/ReplaceSelectionCommand.cpp:
2722         (WebCore::ReplacementFragment::ReplacementFragment):
2723
2724 2006-12-16  Adele Peterson  <adele@apple.com>
2725
2726         Missed one instance of isNonWidgetTextField.
2727
2728         * editing/DeleteSelectionCommand.cpp:
2729         (WebCore::DeleteSelectionCommand::doApply):
2730
2731 2006-12-16  Hunter L. Williams <hlwebkit@gmail.com>
2732
2733         Reviewed by Adele.
2734
2735         Fix mouse wheel scrolling in <textarea> controls.
2736
2737         * rendering/RenderTextControl.cpp:
2738         * rendering/RenderTextControl.h:
2739         Override |scroll| on RenderTextControl to forward the call to the RenderObject of the 
2740         inner m_innerText, which has a layer that can be scrolled.
2741
2742 2006-12-16  Adele Peterson  <adele@apple.com>
2743
2744         RS by Adam.
2745
2746         Removed RenderLineEdit, TextField, WebCoreTextField classes, and use of isNonWidgetTextField,
2747
2748         * WebCore.xcodeproj/project.pbxproj:
2749         * html/HTMLInputElement.cpp:
2750         (WebCore::HTMLInputElement::isKeyboardFocusable):
2751         (WebCore::HTMLInputElement::isMouseFocusable):
2752         (WebCore::HTMLInputElement::focus):
2753         (WebCore::HTMLInputElement::updateFocusAppearance):
2754         (WebCore::HTMLInputElement::aboutToUnload):
2755         (WebCore::HTMLInputElement::dispatchFocusEvent):
2756         (WebCore::HTMLInputElement::dispatchBlurEvent):
2757         (WebCore::HTMLInputElement::setValue):
2758         (WebCore::HTMLInputElement::defaultEventHandler):
2759         * html/HTMLInputElement.h:
2760         (WebCore::HTMLInputElement::isTextField):
2761         * html/HTMLTextFieldInnerElement.cpp:
2762         (WebCore::HTMLTextFieldInnerTextElement::defaultEventHandler):
2763         * platform/TextField.h: Removed.
2764         * platform/mac/TextFieldMac.mm: Removed.
2765         * platform/mac/WebCoreTextField.h: Removed.
2766         * platform/mac/WebCoreTextField.mm: Removed.
2767         * rendering/RenderLineEdit.cpp: Removed.
2768         * rendering/RenderLineEdit.h: Removed.
2769
2770 2006-12-16  Adele Peterson  <adele@apple.com>
2771
2772         Two more files I forgot to svn add for search fields.
2773
2774         * platform/SearchPopupMenu.h: Added.
2775         (WebCore::SearchPopupMenu::create):
2776         * platform/mac/SearchPopupMenuMac.mm: Added.
2777         (WebCore::SearchPopupMenu::SearchPopupMenu):
2778         (WebCore::autosaveKey):
2779         (WebCore::SearchPopupMenu::saveRecentSearches):
2780         (WebCore::SearchPopupMenu::loadRecentSearches):
2781
2782 2006-12-16  Adele Peterson  <adele@apple.com>
2783
2784         Reviewed by Adam.
2785
2786         * platform/PopupMenuClient.h: Added. Broken out of PopupMenu class.
2787         (WebCore::PopupMenuClient::~PopupMenuClient):
2788
2789 2006-12-16  Adele Peterson  <adele@apple.com>
2790
2791         Reviewed by Adam.
2792
2793         WebCore part of fix for:
2794         <rdar://problem/4463829> Switch to use new search field implementation for <input type="search">
2795
2796         * WebCore.xcodeproj/project.pbxproj: Added SearchPopupMenu.h, SearchPopupMenuMac.mm, and PopupMenuClient.h.
2797
2798         Added pseudo classes and corresponding values for -webkit appearance for the cancel button and for the three types of "decoration" that 
2799         correspond to the different functions of the magnifier glass in the search field.  One for the button that will show and hide the
2800         recent searches menu.  One for decoration when the results attribute is set, but no results are saved.  And one for decoration
2801         when no results attribute is set.  We added these different pseudo elements so that RenderTextControl can decide which pseudo class
2802         is appropriate, and each theme can decide for itself which kind of image is appropriate for each function.
2803         
2804         * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType):
2805         * css/CSSSelector.h: (WebCore::CSSSelector::): Added to PseudoType enum.
2806         * css/CSSValueKeywords.in: Added searchfield-decoration, searchfield-results-decoration, searchfield-results-button, searchfield-cancel-button values.
2807         * css/cssstyleselector.cpp: (WebCore::CSSStyleSelector::checkOneSelector): Added cases for -webkit-search-cancel-button, 
2808           -webkit-search-decoration, -webkit-search-results-decoration, -webkit-search-results-button
2809         * rendering/RenderStyle.cpp: Addes new pseudoBits for matching pseudoIds.
2810         (WebCore::):
2811         (WebCore::pseudoBit):
2812         * rendering/RenderStyle.h: Added new appearance values and pseudoIds.
2813         (WebCore::):
2814         (WebCore::RenderStyle::):
2815         * css/html4.css: Added style for input[type=search], and the new pseudo elements.
2816
2817         The structure of the shadow DOM for new search field adds an intermediate block that contains 3 inline-blocks for the magnifier, text element, and cancel button.
2818         Since the tree has become deeper, some editing and event code that used to check for a shadowParent, really needs to check the shadowAncestorNode.
2819
2820         * editing/Editor.cpp: (WebCore::Editor::dispatchCPPEvent): Check shadowAncestorNode instead of shadowParentNode.
2821         * editing/Selection.cpp: (WebCore::Selection::adjustForEditableContent): ditto.
2822         * editing/htmlediting.cpp:
2823         (WebCore::firstEditablePositionAfterPositionInRoot): ditto.
2824         (WebCore::lastEditablePositionBeforePositionInRoot): ditto.
2825         * editing/ReplaceSelectionCommand.cpp:
2826         (WebCore::ReplacementFragment::ReplacementFragment): ditto.
2827         (WebCore::ReplaceSelectionCommand::shouldMerge): Nil check enclosingBlock call.  I ran into this while testing search fields in mixed editability.
2828         (WebCore::ReplaceSelectionCommand::doApply): ditto.
2829
2830         * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::submit): Remove use of RenderLineEdit.
2831         * html/HTMLInputElement.cpp:
2832         (WebCore::HTMLInputElement::selectionStart): ditto.
2833         (WebCore::HTMLInputElement::selectionEnd): ditto.
2834         (WebCore::HTMLInputElement::setSelectionStart): ditto.
2835         (WebCore::HTMLInputElement::setSelectionEnd): ditto.
2836         (WebCore::HTMLInputElement::select): ditto.
2837         (WebCore::HTMLInputElement::setSelectionRange): ditto.
2838         (WebCore::HTMLInputElement::parseMappedAttribute): ditto.
2839         (WebCore::HTMLInputElement::createRenderer): ditto.
2840         (WebCore::HTMLInputElement::defaultEventHandler): ditto.
2841         (WebCore::HTMLInputElement::addSearchResult): Added. Calls addSearchResult on the renderer.
2842         * html/HTMLInputElement.h:
2843         (WebCore::HTMLInputElement::isNonWidgetTextField): Added case for search field.
2844         (WebCore::HTMLInputElement::isSearchField): Added.
2845
2846         * platform/PopupMenu.h: Broke PopupMenuClient out into a separate file.
2847         * platform/PopupMenuClient.h: Added.
2848         (WebCore::PopupMenuClient::~PopupMenuClient):
2849         * platform/graphics/Icon.h:
2850
2851         * platform/SearchPopupMenu.h: Added. Saves and loads recent search vector.
2852         (WebCore::SearchPopupMenu::create):
2853         * platform/mac/SearchPopupMenuMac.mm: Added.
2854         (WebCore::SearchPopupMenu::SearchPopupMenu):
2855         (WebCore::autosaveKey):
2856         (WebCore::SearchPopupMenu::saveRecentSearches):
2857         (WebCore::SearchPopupMenu::loadRecentSearches):
2858
2859         * html/HTMLTextFieldInnerElement.h: Reorganized this class.
2860           Added subclasses HTMLTextFieldInnerTextElement, HTMLSearchFieldResultsButtonElement, HTMLSearchFieldCancelButtonElement
2861         (WebCore::HTMLTextFieldInnerElement::isMouseFocusable): Added.  Returns false so setFocusNodeIfNeeded 
2862          will try to focus the input element instead of nodes in the shadow tree.
2863         (WebCore::HTMLTextFieldInnerElement::isShadowNode): Now returns whether or not a shadowParent has been specified.
2864          * html/HTMLTextFieldInnerElement.cpp:
2865         (WebCore::HTMLTextFieldInnerTextElement::HTMLTextFieldInnerTextElement):
2866         (WebCore::HTMLTextFieldInnerTextElement::defaultEventHandler): Moved this from the old HTMLTextFieldInnerElement class.
2867         (WebCore::HTMLSearchFieldResultsButtonElement::HTMLSearchFieldResultsButtonElement):
2868         (WebCore::HTMLSearchFieldResultsButtonElement::defaultEventHandler): Shows and hides recent searches menu.
2869         (WebCore::HTMLSearchFieldCancelButtonElement::HTMLSearchFieldCancelButtonElement):
2870         (WebCore::HTMLSearchFieldCancelButtonElement::defaultEventHandler): On mouse up, clears the value from the text field.
2871
2872        * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::listSize): Changed return type to unsigned.
2873         * rendering/RenderMenuList.h: (WebCore::RenderMenuList::valueShouldChangeOnHotTrack): Added.
2874         
2875         * WebCore.exp: Export _wkDrawTextFieldCellFocusRing.
2876         * platform/mac/WebCoreSystemInterface.h: Added wkDrawTextFieldCellFocusRing
2877         * platform/mac/WebCoreSystemInterface.mm: ditto.
2878
2879         * rendering/RenderTextControl.h:
2880         (WebCore::RenderTextControl::popupIsVisible): Added so HTMLSearchFieldResultsButtonElement knows whether or not the menu is already up.
2881         (WebCore::RenderTextControl::shouldPopOver): Added as a PopupClient method so the results menu shows up under the control instead of over.
2882         (WebCore::RenderTextControl::valueShouldChangeOnHotTrack):
2883         * rendering/RenderTextControl.cpp:
2884         (WebCore::RenderTextControl::RenderTextControl): Initialize m_placeholderIsVisible, m_searchPopup, and m_searchPopupIsVisible.
2885         (WebCore::RenderTextControl::~RenderTextControl): Detach the node at the top of the shadow tree (m_innerBlock for search fields, and m_innerText for other text controls).
2886         (WebCore::RenderTextControl::setStyle): Sets style on new elements.
2887         (WebCore::disabledTextColor): Added so this can be used in setPlaceholder.
2888         (WebCore::RenderTextControl::createInnerBlockStyle): Added.
2889         (WebCore::RenderTextControl::createInnerTextStyle): Added.
2890         (WebCore::RenderTextControl::createResultsButtonStyle): Added.
2891         (WebCore::RenderTextControl::createCancelButtonStyle): Added.
2892         (WebCore::RenderTextControl::showPlaceholderIfNeeded): Added. Shows the placeholder if there's no value and the field doesn't have focus.
2893         (WebCore::RenderTextControl::hidePlaceholderIfNeeded): Added. Clears the placeholder if there's a value or the field has focus. 
2894         (WebCore::RenderTextControl::createSubtreeIfNeeded): Added. Creates all of the shadow tree elements.
2895         (WebCore::RenderTextControl::updateFromElement): Calls showPlaceholderIfNeeded.
2896         (WebCore::RenderTextControl::visiblePositionForIndex): Renaming (m_div to m_innerText).
2897         (WebCore::RenderTextControl::indexForVisiblePosition): ditto.
2898         (WebCore::RenderTextControl::updateCancelButtonVisibility): Shows and hides cancel button based on the value of the control.
2899         (WebCore::RenderTextControl::subtreeHasChanged): Fires onSearch if the incremental attribute is set.
2900         (WebCore::RenderTextControl::text): Renaming.
2901         (WebCore::RenderTextControl::textWithHardLineBreaks): ditto.
2902         (WebCore::RenderTextControl::calcHeight): Take the size of the results button and cancel button into account when calculating height.
2903         (WebCore::RenderTextControl::nodeAtPoint): Act as if we've hit the shadow tree elements based on the x coordinate of the mouse event.
2904         (WebCore::RenderTextControl::layout): Set the height and width of the text block taking the other shadow tree elements into account.
2905         (WebCore::RenderTextControl::calcMinMaxWidth): Take new shadow tree elements into account when calculating width.
2906         (WebCore::RenderTextControl::forwardEvent): Forward events to appropriate shadow nodes.
2907         (WebCore::RenderTextControl::scrollWidth): Renaming.
2908         (WebCore::RenderTextControl::scrollHeight): ditto.
2909         (WebCore::RenderTextControl::scrollLeft): ditto.
2910         (WebCore::RenderTextControl::scrollTop): ditto.
2911         (WebCore::RenderTextControl::setScrollLeft): ditto.
2912         (WebCore::RenderTextControl::setScrollTop): ditto.
2913         (WebCore::RenderTextControl::autosaveName): ditto.
2914         (WebCore::RenderTextControl::addSearchResult): Added. Saves value to search result list.
2915         (WebCore::RenderTextControl::onSearch): Added. Dispatches search event.
2916         (WebCore::RenderTextControl::showPopup): Added. Loads searches, and displays menu.
2917         (WebCore::RenderTextControl::hidePopup): Added PopupClient method.
2918         (WebCore::RenderTextControl::valueChanged): Added PopupClient method. Interprets the selected menu item index, and either sets the value and 
2919          fires onSearch, or clears all recent searches for this autosave name.
2920         (WebCore::RenderTextControl::itemText): Added PopupClient method.
2921         (WebCore::RenderTextControl::itemIsEnabled): Added PopupClient method.
2922         (WebCore::RenderTextControl::itemStyle): ditto.
2923         (WebCore::RenderTextControl::clientStyle): ditto.
2924         (WebCore::RenderTextControl::clientDocument): ditto.
2925         (WebCore::RenderTextControl::clientPaddingLeft): ditto.
2926         (WebCore::RenderTextControl::clientPaddingRight): ditto.
2927         (WebCore::RenderTextControl::listSize): ditto.
2928         (WebCore::RenderTextControl::selectedIndex): ditto.
2929         (WebCore::RenderTextControl::itemIsSeparator): ditto.
2930         (WebCore::RenderTextControl::itemIsLabel): ditto.
2931         (WebCore::RenderTextControl::itemIsSelected): ditto.
2932         (WebCore::RenderTextControl::setTextFromItem): ditto.
2933
2934         * rendering/RenderTheme.cpp: Added search field theme.
2935         (WebCore::RenderTheme::adjustStyle):
2936         (WebCore::RenderTheme::paint):
2937         (WebCore::RenderTheme::paintBorderOnly):
2938         (WebCore::RenderTheme::paintDecorations):
2939         (WebCore::RenderTheme::isControlStyled): Returns false for search fields, until we've worked out the kinks.
2940         (WebCore::RenderTheme::adjustSearchFieldStyle):
2941         (WebCore::RenderTheme::adjustSearchFieldCancelButtonStyle):
2942         (WebCore::RenderTheme::adjustSearchFieldDecorationStyle):
2943         (WebCore::RenderTheme::adjustSearchFieldResultsDecorationStyle):
2944         (WebCore::RenderTheme::adjustSearchFieldResultsButtonStyle):
2945         * rendering/RenderTheme.h:
2946         (WebCore::RenderTheme::paintSearchField):
2947         (WebCore::RenderTheme::paintSearchFieldCancelButton):
2948         (WebCore::RenderTheme::paintSearchFieldDecoration):
2949         (WebCore::RenderTheme::paintSearchFieldResultsDecoration):
2950         (WebCore::RenderTheme::paintSearchFieldResultsButton):
2951         * rendering/RenderThemeMac.h:
2952         * rendering/RenderThemeMac.mm:
2953         (WebCore::RenderThemeMac::RenderThemeMac):
2954         (WebCore::RenderThemeMac::sizeForSystemFont): Added.  Compares style's font to systemFontSizeForControlSize to determine
2955          what controlSize to use after a style's font has already been initially adjusted.
2956         (WebCore::RenderThemeMac::controlSizeForSystemFont): Added. ditto.
2957         (WebCore::RenderThemeMac::paintCheckbox):
2958         (WebCore::RenderThemeMac::paintRadio):
2959         (WebCore::RenderThemeMac::menuListSizes): 
2960         (WebCore::RenderThemeMac::minimumMenuListSize): Uses sizeForSystemFont instead of hardcoded adjusted font sizes.
2961         (WebCore::RenderThemeMac::paintSearchField):
2962         (WebCore::RenderThemeMac::setSearchCellState):
2963         (WebCore::RenderThemeMac::adjustSearchFieldStyle):
2964         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
2965         (WebCore::RenderThemeMac::cancelButtonSizes):
2966         (WebCore::RenderThemeMac::adjustSearchFieldCancelButtonStyle):
2967         (WebCore::RenderThemeMac::resultsButtonSizes):
2968         (WebCore::RenderThemeMac::adjustSearchFieldDecorationStyle):
2969         (WebCore::RenderThemeMac::paintSearchFieldDecoration):
2970         (WebCore::RenderThemeMac::adjustSearchFieldResultsDecorationStyle):
2971         (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration):
2972         (WebCore::RenderThemeMac::adjustSearchFieldResultsButtonStyle):
2973         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
2974
2975 2006-12-16  Beth Dakin  <bdakin@apple.com>
2976
2977         Reviewed by Adam (and partially Geoff).
2978
2979         Primarily, this patch gives WebCore context menus the ability to
2980         enable/disable and set state. It does a few other things along the
2981         way, though. Some of the more noticeable things:
2982                -Re-architects the ContextMenuItem class a bit so that the
2983                 ownership model is a bit less confusing. ContextMenuItem is
2984                 now *purely* a wrapper for the platformDescription. There
2985                 are no other member variables. If you ever need the
2986                 platformDescription outside of the MenuItem class, you have
2987                 to call releasePlatformDescription(), which transfers
2988                 ownership of the platformDescription to the caller.
2989                -Moves fontForSelection() from FrameMac into Editor.cpp.
2990                 Turns out I don't need to use this function for my patch
2991                 after all, but it doesn't seem like a terrible idea to move
2992                 it anyway since we seem to be moving things from FrameMac
2993                 into Editor these days anyway.
2994
2995         * WebCore.exp:
2996         * editing/Editor.cpp:
2997         (WebCore::Editor::fontForSelection): Moved in from FrameMac.
2998         * editing/Editor.h: Same, and name change.
2999         * editing/mac/EditorMac.mm: Name change.
3000         * page/ContextMenuClient.h: contextMenuItemSelected() has to take a
3001         pointer to the parent context menu since ContextMenuItem no longer
3002         holds on to it.
3003         * page/ContextMenuController.cpp: Same.
3004         (WebCore::ContextMenuController::contextMenuItemSelected): Same.
3005         * page/mac/FrameMac.h: Move fontForSelection to Editor
3006         * page/mac/FrameMac.mm: Same.
3007         * page/mac/WebCoreFrameBridge.mm:
3008         (-[WebCoreFrameBridge fontForSelection:]): Account for above.
3009         * platform/ContextMenu.cpp:
3010         (WebCore::separatorItem): Can't be const because appendItem now
3011         expects a non-const menu item.
3012         (WebCore::createAndAppendFontSubMenu): Change name for clarity.
3013         (WebCore::createAndAppendSpellingAndGrammarSubMenu): Same.
3014         (WebCore::createAndAppendSpellingSubMenu): Same.
3015         (WebCore::createAndAppendSpeechSubMenu): Same.
3016         (WebCore::createAndAppendWritingDirectionSubMenu): Same.
3017         (WebCore::ContextMenu::populate): Account for above.
3018         (WebCore::triStateToBool): New helper.
3019         (WebCore::ContextMenu::checkOrEnableIfNeeded): Transfers
3020         logic from WebHTMLView into WebCore to determine if menu items are
3021         enabled or disabled and to determine if they require a check.
3022         * platform/ContextMenu.h:
3023         * platform/ContextMenuItem.h: Re-factored stuff so that our only
3024         member variable is the platform description.
3025         (WebCore::): Get rid of if-def.
3026         * platform/cf/RetainPtr.h: Add releaseRef like in PassRefPtr.
3027         (WebCore::RetainPtr::releaseRef):
3028         * platform/mac/ContextMenuItemMac.mm: Same as .h
3029         (WebCore::ContextMenuItem::ContextMenuItem): Same.
3030         (WebCore::ContextMenuItem::releasePlatformDescription): Same.
3031         (WebCore::ContextMenuItem::type): Same.
3032         (WebCore::ContextMenuItem::platformSubMenu): Same.
3033         (WebCore::ContextMenuItem::setType): Same.
3034         (WebCore::ContextMenuItem::setTitle): Same.
3035         (WebCore::ContextMenuItem::setSubMenu): Same.
3036         (WebCore::ContextMenuItem::setChecked): Same.
3037         (WebCore::ContextMenuItem::setEnabled): Same.
3038         * platform/mac/ContextMenuMac.mm:
3039         (-[WebCoreMenuTarget forwardContextMenuAction:]): Don't set the
3040         parent menu.
3041         (WebCore::setMenuItemTarget):
3042         (WebCore::ContextMenu::appendItem): Call releasePlatformDescription
3043         (WebCore::ContextMenu::insertItem): Same.
3044
3045 2006-12-15  MorganL  <morganl.webkit@yahoo.com>
3046
3047         Reviewed by Oliver.
3048
3049         Allow images to load into frames again.  Tidy up code a bit and
3050         add some much needed documentation.
3051
3052         * platform/MimeTypeRegistry.cpp:
3053         (WebCore::initialiseSupportedImageMIMETypes):
3054         (WebCore::initialiseSupportedNonImageMimeTypes):
3055         * platform/MimeTypeRegistry.h:
3056
3057 2006-12-15  Anders Carlsson  <acarlsson@apple.com>
3058
3059         Fix build.
3060
3061         * loader/DocumentLoader.cpp:
3062         (WebCore::DocumentLoader::response):
3063         (WebCore::DocumentLoader::setResponse):
3064         (WebCore::DocumentLoader::isStopping):
3065         (WebCore::DocumentLoader::mainDocumentError):
3066         * loader/DocumentLoader.h:
3067
3068 2006-12-15  Anders Carlsson  <acarlsson@apple.com>
3069
3070         Reviewed by Geoff.
3071
3072         More loader cleanup.
3073
3074         * loader/DocumentLoader.h:
3075         (WebCore::DocumentLoader::isStopping):
3076         (WebCore::DocumentLoader::response):
3077         (WebCore::DocumentLoader::mainDocumentError):
3078         (WebCore::DocumentLoader::setResponse):
3079         * loader/FrameLoader.h:
3080         * loader/FrameLoaderClient.h:
3081         * loader/mac/DocumentLoaderMac.mm:
3082         (WebCore::DocumentLoader::DocumentLoader):
3083         (WebCore::DocumentLoader::stopLoading):
3084         (WebCore::DocumentLoader::receivedData):
3085         (WebCore::DocumentLoader::setupForReplaceByMIMEType):
3086         (WebCore::DocumentLoader::prepareForLoadStart):
3087         * loader/mac/FrameLoaderMac.mm:
3088         (WebCore::FrameLoader::commitProvisionalLoad):
3089         (WebCore::FrameLoader::setResponse):
3090         * loader/mac/ImageDocumentMac.mm:
3091         (WebCore::finishImageLoad):
3092
3093 2006-12-15  Anders Carlsson  <acarlsson@apple.com>
3094
3095         * loader/DocumentLoader.h:
3096         Whoops, didn't mean to commit this.
3097         
3098 2006-12-15  Anders Carlsson  <acarlsson@apple.com>
3099
3100         Reviewed by Darin and Brady (in no particular order).
3101         
3102         More loader cleanup.
3103         
3104         * loader/FrameLoader.h:
3105         * loader/mac/FrameLoaderMac.mm:
3106         (WebCore::FrameLoader::cancelledError):
3107         (WebCore::FrameLoader::fileDoesNotExistError):
3108         (WebCore::FrameLoader::cannotShowMIMEType):
3109         (WebCore::FrameLoader::interruptionForPolicyChangeError):
3110         * loader/mac/MainResourceLoaderMac.mm:
3111         * loader/mac/NetscapePlugInStreamLoaderMac.mm:
3112
3113 2006-12-16  Alexey Proskuryakov  <ap@webkit.org>
3114
3115         Try to fix Windows buid.
3116
3117         * WebCore.vcproj/WebCore/WebCore.vcproj: Added EventTarget.{h,cpp}
3118
3119 2006-12-15  Alexey Proskuryakov  <ap@webkit.org>
3120
3121         Reviewed by Darin.
3122
3123         http://bugs.webkit.org/show_bug.cgi?id=11610
3124         XMLHttpRequest.onreadystatechange doesn't provide access to the request object
3125
3126         Created a separate EventTarget class, now that EventTargetNode isn't the only kind.
3127
3128         Test: http/tests/xmlhttprequest/event-target.html
3129
3130         * WebCore.xcodeproj/project.pbxproj: Added EventTarget.{h,cpp}
3131
3132         * bindings/js/kjs_dom.cpp:
3133         (KJS::toJS): Added an EventTarget variant.
3134         * bindings/js/kjs_dom.h: Added toJS() for EventTarget; some minor style fixes.
3135
3136         * bindings/objc/DOM.mm:
3137         (+[DOMNode _eventTargetWith:WebCore::]):
3138         * bindings/scripts/CodeGeneratorObjC.pm:
3139         Added an EventTarget->DOMEventTarget converter in DOMNode (WebCoreInternal). 
3140         It only works for nodes, since we don't have an ObjC binding for XMLHttpRequest.
3141         Corrected spelling of internalHeaderContent.
3142
3143         * dom/Event.cpp:
3144         (WebCore::Event::setTarget):
3145         * dom/Event.h:
3146         (WebCore::Event::target):
3147         (WebCore::Event::currentTarget):
3148         (WebCore::Event::setCurrentTarget):
3149         These methods now work with EventTargets instead of Nodes.
3150
3151         * dom/EventTarget.cpp: Added.
3152         (WebCore::EventTarget::~EventTarget):
3153         (WebCore::EventTarget::toNode):
3154         (WebCore::EventTarget::toXMLHttpRequest):
3155         * dom/EventTarget.h: Added.
3156         (WebCore::EventTarget::ref):
3157         (WebCore::EventTarget::deref):
3158         Originally, my intention was to share much of the implementation between 
3159         EventTargetNode and XHR, but now I don't see anything substantial worth sharing.
3160
3161         * dom/EventTargetNode.cpp:
3162         (WebCore::EventTargetNode::dispatchGenericEvent): Cast Node to EventTargetNode.
3163
3164         * dom/EventTargetNode.h: Made EventTarget methods virtual.
3165         (WebCore::EventTargetNode::toNode): Added poor man's RTTI to upcast from EventTarget.
3166         (WebCore::EventTargetNode::refEventTarget):
3167         (WebCore::EventTargetNode::derefEventTarget):
3168
3169         * dom/MouseEvent.cpp:
3170         (WebCore::MouseEvent::toElement):
3171         (WebCore::MouseEvent::fromElement):
3172         * dom/MouseRelatedEvent.cpp:
3173         (WebCore::MouseRelatedEvent::receivedTarget):
3174         * html/HTMLAnchorElement.cpp:
3175         (WebCore::HTMLAnchorElement::defaultEventHandler):
3176         * html/HTMLLabelElement.cpp:
3177         (WebCore::HTMLLabelElement::defaultEventHandler):
3178         * page/ContextMenuController.cpp:
3179         (WebCore::ContextMenuController::handleContextMenuEvent):
3180         * rendering/RenderSlider.cpp:
3181         (WebCore::RenderSlider::mouseEventIsInThumb):
3182         Cast from EventTarget to Node as appropriate.
3183
3184         * xml/xmlhttprequest.cpp:
3185         (WebCore::XMLHttpRequest::dispatchEvent):
3186         (WebCore::XMLHttpRequest::callReadyStateChangeListener):
3187         Set target and currentTarget before dispatching.
3188
3189         * xml/xmlhttprequest.h: Made EventTarget methods virtual, added a bool tempEvent parameter
3190         to match EventTargetNode.
3191         (WebCore::XMLHttpRequest::toXMLHttpRequest): Added poor man's RTTI to upcast from EventTarget.
3192         (WebCore::XMLHttpRequest::refEventTarget):
3193         (WebCore::XMLHttpRequest::derefEventTarget):
3194
3195 2006-12-15  Anders Carlsson  <acarlsson@apple.com>
3196
3197         Reviewed by Darin.
3198
3199         More loader cleanup, use KURL instead of NSURL in a couple of places.
3200
3201         * loader/DocumentLoader.h:
3202         * loader/FrameLoader.h:
3203         * loader/FrameLoaderClient.h:
3204         * loader/ResourceLoader.h:
3205         * loader/mac/DocumentLoaderMac.mm:
3206         (WebCore::DocumentLoader::DocumentLoader):
3207         (WebCore::DocumentLoader::prepareForLoadStart):
3208         * loader/mac/FrameLoaderMac.mm:
3209         (WebCore::FrameLoader::willUseArchive):
3210         * loader/mac/ResourceLoaderMac.mm:
3211         (WebCore::ResourceLoader::load):
3212
3213 2006-12-15  Marvin Decker  <marv.decker@gmail.com>
3214
3215         Reviewed by Darin and Alexey.
3216
3217         Fix the Windows build, move various Client implementations out of
3218         WebCore and into WebKit.
3219
3220         * WebCore.vcproj/WebCore/WebCore.vcproj:
3221         * bridge/win/ChromeClientWin.h: Removed.
3222         * bridge/win/ContextMenuClientWin.h: Removed.
3223         * bridge/win/EditorClientWin.h: Removed.
3224         * bridge/win/FrameWin.cpp:
3225         (WebCore::FrameWin::FrameWin):
3226         * bridge/win/FrameWin.h:
3227         * loader/win/FrameLoaderClientWin.cpp: Removed.
3228         * loader/win/FrameLoaderClientWin.h: Removed.
3229         * platform/network/win/ResourceHandleWin.cpp:
3230         (WebCore::ResourceHandle::start):
3231         * platform/win/TemporaryLinkStubs.cpp:
3232         (WebCore::DocumentLoader::URL):
3233         (WebCore::FrameLoader::load):
3234         (WebCore::FrameLoader::createFrame):
3235         (WebCore::FrameLoader::loadResourceSynchronously):
3236         (WebCore::Pasteboard::writeSelection):
3237         (WebCore::Pasteboard::writeURL):
3238         (WebCore::Pasteboard::clear):
3239         (WebCore::Pasteboard::~Pasteboard):
3240         (WebCore::PolicyCheck::call):
3241         (WebCore::PopupMenu::PopupMenu):
3242         (WebCore::ResourceHandle::loadsBlocked):
3243         (WebCore::ResourceLoader::cancel):
3244
3245 2006-12-15  Anders Carlsson  <acarlsson@apple.com>
3246
3247         Reviewed by Maciej.
3248
3249         http://bugs.webkit.org/show_bug.cgi?id=11842
3250         REGRESSION: Using Safari's snippet editor leaves applewebdata: URLs in history
3251         
3252         * loader/mac/DocumentLoaderMac.mm:
3253         (WebCore::DocumentLoader::URLForHistory):
3254         Don't return appleweburls without an unreachable url.
3255
3256 2006-12-15  Anders Carlsson  <acarlsson@apple.com>
3257
3258         Reviewed by Darin.
3259
3260         Replace more instances of NSError with ResourceError.
3261         
3262         Also remove a check for a selector that was added pre-Tiger.
3263         
3264         * WebCore.exp:
3265         * loader/DocumentLoader.h:
3266         * loader/FrameLoader.h:
3267         * loader/ResourceLoader.h:
3268         * loader/mac/DocumentLoaderMac.mm:
3269         (WebCore::DocumentLoader::setMainDocumentError):
3270         (WebCore::DocumentLoader::mainDocumentError):
3271         (WebCore::DocumentLoader::clearErrors):
3272         (WebCore::DocumentLoader::mainReceivedError):
3273         * loader/mac/FrameLoaderMac.mm:
3274         (WebCore::FrameLoader::cancelMainResourceLoad):
3275         (WebCore::FrameLoader::opened):
3276         (WebCore::FrameLoader::mainReceivedError):
3277         (WebCore::FrameLoader::cancelledError):
3278         (WebCore::FrameLoader::fileDoesNotExistError):
3279         (WebCore::FrameLoader::handleUnimplementablePolicy):
3280         (WebCore::FrameLoader::setMainDocumentError):
3281         (WebCore::FrameLoader::mainReceivedCompleteError):
3282         (WebCore::FrameLoader::sendRemainingDelegateMessages):
3283         (WebCore::FrameLoader::requestFromDelegate):
3284         (WebCore::FrameLoader::loadedResourceFromMemoryCache):
3285         (WebCore::FrameLoader::loadResourceSynchronously):
3286         * loader/mac/ResourceLoaderMac.mm:
3287         (WebCore::ResourceLoader::willSendRequest):
3288         (WebCore::ResourceLoader::didCancel):
3289         (WebCore::ResourceLoader::cancel):
3290         (WebCore::ResourceLoader::cancelledError):
3291         * loader/mac/SubresourceLoaderMac.mm:
3292         (WebCore::SubresourceLoader::didCancel):
3293
3294 2006-12-15  Rob Buis  <buis@kde.org>
3295
3296         Reviewed by Darin.
3297
3298         http://bugs.webkit.org/show_bug.cgi?id=11824
3299         CSSStyleSheet.title property is always null
3300
3301         Set title on the stylesheet just after creating it, for the HTML
3302         elements <link> and <style>.
3303
3304         * css/StyleSheet.h:
3305         (WebCore::StyleSheet::setTitle):
3306         * dom/Element.cpp:
3307         (WebCore::Element::title):
3308         * dom/Element.h:
3309         * dom/StyleElement.cpp:
3310         (WebCore::StyleElement::childrenChanged):
3311         * dom/StyleElement.h:
3312         * html/HTMLElement.cpp:
3313         * html/HTMLElement.h:
3314         * html/HTMLLinkElement.cpp:
3315         (WebCore::HTMLLinkElement::parseMappedAttribute):
3316         (WebCore::HTMLLinkElement::setCSSStyleSheet):
3317         * html/HTMLStyleElement.cpp:
3318         (WebCore::HTMLStyleElement::parseMappedAttribute):
3319         * ksvg2/svg/SVGStyleElement.cpp:
3320         (WebCore::SVGStyleElement::setTitle):
3321         (WebCore::SVGStyleElement::parseMappedAttribute):
3322         * ksvg2/svg/SVGStyleElement.h:
3323
3324 2006-12-15  Lars Knoll  <lars@trolltech.com>
3325
3326         Reviewed by Zack
3327
3328         Fix compilation.
3329
3330         * loader/SubresourceLoader.h:
3331         * platform/qt/PopupMenuQt.cpp:
3332         (WebCore::PopupMenu::PopupMenu):
3333
3334 2006-12-14  Anders Carlsson  <acarlsson@apple.com>
3335
3336         Reviewed by Maciej.
3337
3338         Use char* pointer + length instead of NSData in a bunch of places.
3339
3340         * loader/DocumentLoader.h:
3341         * loader/FrameLoader.h:
3342         * loader/FrameLoaderClient.h:
3343         * loader/MainResourceLoader.h:
3344         * loader/NetscapePlugInStreamLoader.h:
3345         * loader/ResourceLoader.h:
3346         (WebCore::ResourceLoader::willStopBufferingData):
3347         * loader/SubresourceLoader.h:
3348         * loader/mac/DocumentLoaderMac.mm:
3349         (WebCore::DocumentLoader::commitLoad):
3350         (WebCore::DocumentLoader::receivedData):
3351         (WebCore::DocumentLoader::setupForReplaceByMIMEType):
3352         * loader/mac/FrameLoaderMac.mm:
3353         (WebCore::FrameLoader::didReceiveData):
3354         (WebCore::FrameLoader::receivedData):
3355         (WebCore::FrameLoader::committedLoad):
3356         * loader/mac/MainResourceLoaderMac.mm:
3357         (WebCore::MainResourceLoader::addData):
3358         (WebCore::MainResourceLoader::didReceiveData):
3359         * loader/mac/NetscapePlugInStreamLoaderMac.mm:
3360         (WebCore::NetscapePlugInStreamLoader::didReceiveData):
3361         * loader/mac/ResourceLoaderMac.mm:
3362         (WebCore::ResourceLoader::addData):
3363         (WebCore::ResourceLoader::didReceiveData):
3364         (WebCore::ResourceLoader::willStopBufferingData):
3365         * loader/mac/SubresourceLoaderMac.mm:
3366         (WebCore::SubresourceLoader::didReceiveData):
3367         * platform/network/ResourceHandleClient.h:
3368         (WebCore::ResourceHandleClient::willStopBufferingData):
3369         * platform/network/mac/ResourceHandleMac.mm:
3370         (-[WebCoreResourceHandleAsDelegate connection:willStopBufferingData:]):
3371
3372 2006-12-14  Adele Peterson  <adele@apple.com>
3373
3374         Reviewed by Adam. 
3375
3376         Added PopupMenuClient class so the PopupMenu class no longer needs to know
3377         about the RenderMenuList or the DOM.
3378
3379         * platform/PopupMenu.h:
3380         (WebCore::PopupMenuClient::~PopupMenuClient):
3381         (WebCore::PopupMenu::create): Made this protected so PopupMenu can be subclassed.
3382         (WebCore::PopupMenu::disconnectClient): Renamed from disconnectMenuList.
3383         (WebCore::PopupMenu::client): Added.
3384         * platform/mac/PopupMenuMac.mm:
3385         (WebCore::PopupMenu::PopupMenu): Created using PopupMenuClient instead of RenderMenuList.
3386         (WebCore::PopupMenu::populate): Asks the client for info about the list items instead of looking at the DOM or the renderer. 
3387         (WebCore::PopupMenu::show): ditto.
3388         (WebCore::PopupMenu::hide): ditto.
3389         * rendering/RenderMenuList.h: Now also inherits from PopupMenuClient.
3390         (WebCore::RenderMenuList::shouldPopOver): Added.  Tells the popup whether the menu should pop over the client, or under.
3391         * rendering/RenderMenuList.cpp:
3392         (WebCore::RenderMenuList::~RenderMenuList): Calls disconnectClient().
3393         (WebCore::RenderMenuList::calcMinMaxWidth): Removed unnecessary (and harmful) call to updateFromElement. updateFromElmeent
3394          can add children, and you don't want to do that in the middle of calculating width.
3395         (WebCore::RenderMenuList::itemText): Added PopupClient method to provide information about the items in the menu list.
3396         (WebCore::RenderMenuList::itemIsEnabled): ditto.
3397         (WebCore::RenderMenuList::itemStyle): ditto.
3398         (WebCore::RenderMenuList::clientStyle): ditto.
3399         (WebCore::RenderMenuList::clientDocument): ditto.
3400         (WebCore::RenderMenuList::clientPaddingLeft): ditto.
3401         (WebCore::RenderMenuList::clientPaddingRight): ditto.
3402         (WebCore::RenderMenuList::listSize): ditto.
3403         (WebCore::RenderMenuList::selectedIndex): ditto.
3404         (WebCore::RenderMenuList::itemIsSeparator): ditto.
3405         (WebCore::RenderMenuList::itemIsLabel): ditto.
3406         (WebCore::RenderMenuList::itemIsSelected): ditto.
3407         (WebCore::RenderMenuList::setTextFromItem): ditto.
3408
3409 2006-12-14  Geoffrey Garen  <ggaren@apple.com>
3410
3411         Fixed <rdar://problem/4882713> GMAIL (REGRESSION): Can't apply font style, 
3412         foreground or background to selected text
3413         
3414         Also <rdar://problem/4883751> REGRESSION: Caret fails to insert itself 
3415         automatically in a new note window
3416         
3417         I'm rolling out my change to move focus to the page level because it caused
3418         too many unexpected and bizarre regressions. Our code relies on focus
3419         being per-document so that it can make focus changes that are effectively
3420         no-ops, and so that it can conflate focus and selection in some cases (a bad 
3421         idea, since they're not the same).
3422         
3423         Hopefully we can revisit this, along with hover and active, in the future.
3424
3425         * dom/Document.cpp:
3426         (WebCore::widgetForNode):
3427         (WebCore::relinquishesEditingFocus):
3428         (WebCore::acceptsEditingFocus):
3429         (WebCore::clearSelectionIfNeeded):
3430         (WebCore::Document::removedLastRef):
3431         (WebCore::Document::detach):
3432         (WebCore::Document::focusedNodeDetached):
3433         (WebCore::Document::setFocusedNode):
3434         * dom/Document.h:
3435         (WebCore::Document::focusedNode):
3436         * page/FocusController.cpp:
3437         * page/FocusController.h:
3438
3439 2006-12-14  Maciej Stachowiak  <mjs@apple.com>
3440
3441         Reviewed by Geoff.
3442
3443         - fix failing drag & drop layout tests
3444
3445         * platform/mac/KURLMac.mm:
3446         (WebCore::KURL::getNSURL): Turn empty KURL into empty NSURL, but null KURL into
3447         nil.
3448
3449 2006-12-14  Steve Falkenburg  <sfalken@apple.com>
3450
3451         Build fix.
3452
3453         * loader/MainResourceLoader.h:
3454
3455 2006-12-14  Anders Carlsson  <acarlsson@apple.com>
3456
3457         Reviewed by John.
3458
3459         Convert a bunch of NSErrors to ResourceError.
3460         
3461         Make the ResourceError accessor functions const.
3462         
3463         * WebCore.exp:
3464         * WebCore.xcodeproj/project.pbxproj:
3465         * loader/FrameLoader.h:
3466         * loader/FrameLoaderClient.h:
3467         * loader/MainResourceLoader.h:
3468         * loader/NetscapePlugInStreamLoader.h:
3469         * loader/ResourceLoader.h:
3470         * loader/SubresourceLoader.h:
3471         * loader/mac/FrameLoaderMac.mm:
3472         (WebCore::FrameLoader::didFailToLoad):
3473         (WebCore::FrameLoader::receivedMainResourceError):
3474         (WebCore::FrameLoader::interruptionForPolicyChangeError):
3475         * loader/mac/MainResourceLoaderMac.mm:
3476         (WebCore::MainResourceLoader::receivedError):
3477         (WebCore::MainResourceLoader::didCancel):
3478         (WebCore::MainResourceLoader::interruptionForPolicyChangeError):
3479         (WebCore::MainResourceLoader::didFail):
3480         * loader/mac/NetscapePlugInStreamLoaderMac.mm:
3481         (WebCore::NetscapePlugInStreamLoader::didFail):
3482         (WebCore::NetscapePlugInStreamLoader::didCancel):
3483         * loader/mac/ResourceLoaderMac.mm:
3484         (WebCore::ResourceLoader::didFail):
3485         (WebCore::ResourceLoader::didCancel):
3486         * loader/mac/SubresourceLoaderMac.mm:
3487         (WebCore::SubresourceLoader::didFail):
3488         (WebCore::SubresourceLoader::didCancel):
3489         * platform/network/ResourceError.h:
3490         (WebCore::ResourceError::domain):
3491         (WebCore::ResourceError::errorCode):
3492         (WebCore::ResourceError::failingURL):
3493         (WebCore::ResourceError::localizedDescription):
3494         (WebCore::ResourceError::unpackPlatformErrorIfNeeded):
3495
3496 2006-12-14  George Staikos  <staikos@kde.org>
3497
3498         Link, after the last loader changes.  Please update this directory with stubs when modifying the loader.
3499
3500         * loader/qt/FrameLoaderQt.cpp:
3501         (WebCore::FrameLoader::loadResourceSynchronously):
3502
3503 2006-12-14  Justin Garcia  <justin.garcia@apple.com>
3504
3505         Reviewed by harrison
3506
3507         <rdar://problem/4866671>
3508         CrashTracer: 1 crashes in Mail after deleting a list item at WebCore::DeleteSelectionCommand::doApply()
3509         
3510         Don't allow VisiblePositions inside -webkit-user-select:none regions.
3511         Renamed inRenderedContent to isCandidate.
3512
3513         * dom/Document.cpp:
3514         (WebCore::Document::updateSelection):
3515         * dom/Position.cpp:
3516         (WebCore::Position::previousCharacterPosition):
3517         (WebCore::Position::nextCharacterPosition):
3518         (WebCore::nodeIsUserSelectNone):
3519         (WebCore::Position::isCandidate):
3520         (WebCore::Position::rendersInDifferentPosition):
3521         * dom/Position.h:
3522         * editing/InsertParagraphSeparatorCommand.cpp:
3523         (WebCore::InsertParagraphSeparatorCommand::doApply):
3524         * editing/InsertTextCommand.cpp:
3525         (WebCore::InsertTextCommand::input):