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