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