e984fc04959236fde431d03777ccd335dbd0af2a
[WebKit-https.git] / WebCore / ChangeLog
1 2008-01-08  Anders Carlsson  <andersca@apple.com>
2
3         Reviewed by Mitz.
4
5         Don't add the applet widget to the view, that's done later by RenderApplet.
6             
7         * loader/FrameLoader.cpp:
8         (WebCore::FrameLoader::createJavaAppletWidget):
9
10 2008-01-08  Antti Koivisto  <antti@apple.com>
11
12         Reviewed by Weinig.
13         
14         Add security check for Audio constructor.
15
16         * bindings/js/kjs_window.cpp:
17         (KJS::Window::getValueProperty):
18
19 2008-01-08  Timothy Hatcher  <timothy@apple.com>
20
21         Reviewed by Adam Roben.
22
23         <rdar://problem/5676515> List of scripts and images missing when opening Web Inspector from new window (16567)
24
25         InspectorController::didLoadResourceFromMemoryCache was not being called for
26         resources that loaded from the memory cache that the FrameLoader's client
27         has already been notified about. This fix always calls the InspectorController
28         when loading a memory cached resource. No test possible for the Web Inspector.
29
30         * loader/DocLoader.cpp:
31         (WebCore::DocLoader::checkCacheObjectStatus): Moved most of the logic to
32         FrameLoader::loadedResourceFromMemoryCache so the InspectorController can always be notified.
33         * loader/FrameLoader.cpp:
34         (WebCore::FrameLoader::didTellClientAboutLoad): Renamed from didTellBridgeAboutLoad.
35         (WebCore::FrameLoader::haveToldClientAboutLoad): Renamed from haveToldBridgeAboutLoad.
36         (WebCore::FrameLoader::loadResourceSynchronously): Call the renamed didTellClientAboutLoad.
37         (WebCore::FrameLoader::loadedResourceFromMemoryCache): Only takes a CachedResource now.
38         Always call InspectorController. If the resource's sendResourceLoadCallbacks is false or
39         didTellClientAboutLoad is true, do an early return. Otherwise call the client and call
40         didTellClientAboutLoad.
41         (WebCore::FrameLoader::dispatchDidLoadResourceFromMemoryCache): Removed, work now done
42         in FrameLoader::loadedResourceFromMemoryCache.
43         * loader/FrameLoader.h: Renamed {didTell,haveTold}BridgeAboutLoad to {didTell,haveTold}ClientAboutLoad.
44         Made loadedResourceFromMemoryCache only take a CachedResource. Renamed m_urlsBridgeKnowsAbout to 
45         m_urlsClientKnowsAbout.
46         * loader/SubresourceLoader.cpp:
47         (WebCore::SubresourceLoader::load): Call the renamed didTellClientAboutLoad.
48
49 2008-01-08  Dan Bernstein  <mitz@apple.com>
50
51         Rubber-stamped by Sam Weinig.
52
53         - prefix all member variables in CSSStyleSelector with m_
54
55         * css/CSSStyleSelector.cpp:
56         (WebCore::CSSStyleSelector::CSSStyleSelector):
57         (WebCore::CSSStyleSelector::init):
58         (WebCore::CSSStyleSelector::setEncodedURL):
59         (WebCore::CSSStyleSelector::loadDefaultStyle):
60         (WebCore::CSSStyleSelector::matchRules):
61         (WebCore::CSSStyleSelector::matchRulesForList):
62         (WebCore::CSSStyleSelector::initElementAndPseudoState):
63         (WebCore::CSSStyleSelector::initForStyleResolve):
64         (WebCore::CSSStyleSelector::canShareStyleWithElement):
65         (WebCore::CSSStyleSelector::locateSharedStyle):
66         (WebCore::CSSStyleSelector::matchUARules):
67         (WebCore::CSSStyleSelector::styleForElement):
68         (WebCore::CSSStyleSelector::pseudoStyleForElement):
69         (WebCore::CSSStyleSelector::updateFont):
70         (WebCore::CSSStyleSelector::cacheBorderAndBackground):
71         (WebCore::CSSStyleSelector::checkSelector):
72         (WebCore::CSSStyleSelector::checkOneSelector):
73         (WebCore::CSSStyleSelector::applyProperty):
74         (WebCore::CSSStyleSelector::mapBackgroundImage):
75         (WebCore::CSSStyleSelector::mapBackgroundSize):
76         (WebCore::CSSStyleSelector::mapBackgroundXPosition):
77         (WebCore::CSSStyleSelector::mapBackgroundYPosition):
78         (WebCore::CSSStyleSelector::checkForTextSizeAdjust):
79         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
80         * css/CSSStyleSelector.h:
81         (WebCore::CSSStyleSelector::):
82         (WebCore::CSSRuleData::CSSRuleData):
83         (WebCore::CSSRuleDataList::CSSRuleDataList):
84         (WebCore::CSSRuleDataList::append):
85         * css/SVGCSSStyleSelector.cpp:
86         (WebCore::CSSStyleSelector::applySVGProperty):
87         * rendering/RenderStyle.cpp:
88         (WebCore::RenderStyle::isStyleAvailable):
89
90 2008-01-08  David D. Kilzer  <ddkilzer@apple.com>
91
92         Removed unnecessary files from Copy Bundle Resources build phase.
93
94         Reviewed by Sam.
95
96         * WebCore.xcodeproj/project.pbxproj: Files removed from build phase:
97         DOMCoreException.idl
98         EventException.idl
99         MessageEvent.idl
100         SVGAElement.idl
101         SVGAngle.idl
102         SVGAnimateColorElement.idl
103         SVGAnimateElement.idl
104         SVGAnimateTransformElement.idl
105         SVGAnimatedAngle.idl
106         SVGAnimatedBoolean.idl
107         SVGAnimatedEnumeration.idl
108         SVGAnimatedInteger.idl
109         SVGAnimatedLength.idl
110         SVGAnimatedLengthList.idl
111         SVGAnimatedNumber.idl
112         SVGAnimatedNumberList.idl
113         SVGAnimatedPathData.idl
114         SVGAnimatedPoints.idl
115         SVGAnimatedPreserveAspectRatio.idl
116         SVGAnimatedRect.idl
117         SVGAnimatedString.idl
118         SVGAnimatedTransformList.idl
119         SVGAnimationElement.idl
120         SVGCSSPropertyNames.in
121         SVGCSSValueKeywords.in
122         SVGCircleElement.idl
123         SVGClipPathElement.idl
124         SVGColor.idl
125         SVGComponentTransferFunctionElement.idl
126         SVGCursorElement.idl
127         SVGDefinitionSrcElement.idl
128         SVGDefsElement.idl
129         SVGDescElement.idl
130         SVGDocument.idl
131         SVGElement.idl
132         SVGElementInstance.idl
133         SVGElementInstanceList.idl
134         SVGEllipseElement.idl
135         SVGException.idl
136         SVGExternalResourcesRequired.idl
137         SVGFEBlendElement.idl
138         SVGFEColorMatrixElement.idl
139         SVGFEComponentTransferElement.idl
140         SVGFECompositeElement.idl
141         SVGFEDiffuseLightingElement.idl
142         SVGFEDisplacementMapElement.idl
143         SVGFEDistantLightElement.idl
144         SVGFEFloodElement.idl
145         SVGFEFuncAElement.idl
146         SVGFEFuncBElement.idl
147         SVGFEFuncGElement.idl
148         SVGFEFuncRElement.idl
149         SVGFEGaussianBlurElement.idl
150         SVGFEImageElement.idl
151         SVGFEMergeElement.idl
152         SVGFEMergeNodeElement.idl
153         SVGFEOffsetElement.idl
154         SVGFEPointLightElement.idl
155         SVGFESpecularLightingElement.idl
156         SVGFESpotLightElement.idl
157         SVGFETileElement.idl
158         SVGFETurbulenceElement.idl
159         SVGFilterElement.idl
160         SVGFilterPrimitiveStandardAttributes.idl
161         SVGFitToViewBox.idl
162         SVGFontElement.idl
163         SVGFontFaceElement.idl
164         SVGFontFaceFormatElement.idl
165         SVGFontFaceNameElement.idl
166         SVGFontFaceSrcElement.idl
167         SVGFontFaceUriElement.idl
168         SVGForeignObjectElement.idl
169         SVGGElement.idl
170         SVGGlyphElement.idl
171         SVGGradientElement.idl
172         SVGImageElement.idl
173         SVGLangSpace.idl
174         SVGLength.idl
175         SVGLengthList.idl
176         SVGLineElement.idl
177         SVGLinearGradientElement.idl
178         SVGLocatable.idl
179         SVGMarkerElement.idl
180         SVGMaskElement.idl
181         SVGMatrix.idl
182         SVGMetadataElement.idl
183         SVGMissingGlyphElement.idl
184         SVGNumber.idl
185         SVGNumberList.idl
186         SVGPaint.idl
187         SVGPathElement.idl
188         SVGPathSeg.idl
189         SVGPathSegArcAbs.idl
190         SVGPathSegArcRel.idl
191         SVGPathSegClosePath.idl
192         SVGPathSegCurvetoCubicAbs.idl
193         SVGPathSegCurvetoCubicRel.idl
194         SVGPathSegCurvetoCubicSmoothAbs.idl
195         SVGPathSegCurvetoCubicSmoothRel.idl
196         SVGPathSegCurvetoQuadraticAbs.idl
197         SVGPathSegCurvetoQuadraticRel.idl
198         SVGPathSegCurvetoQuadraticSmoothAbs.idl
199         SVGPathSegCurvetoQuadraticSmoothRel.idl
200         SVGPathSegLinetoAbs.idl
201         SVGPathSegLinetoHorizontalAbs.idl
202         SVGPathSegLinetoHorizontalRel.idl
203         SVGPathSegLinetoRel.idl
204         SVGPathSegLinetoVerticalAbs.idl
205         SVGPathSegLinetoVerticalRel.idl
206         SVGPathSegList.idl
207         SVGPathSegMovetoAbs.idl
208         SVGPathSegMovetoRel.idl
209         SVGPatternElement.idl
210         SVGPoint.idl
211         SVGPointList.idl
212         SVGPolygonElement.idl
213         SVGPolylineElement.idl
214         SVGPreserveAspectRatio.idl
215         SVGRadialGradientElement.idl
216         SVGRect.idl
217         SVGRectElement.idl
218         SVGRenderingIntent.idl
219         SVGSVGElement.idl
220         SVGScriptElement.idl
221         SVGSetElement.idl
222         SVGStopElement.idl
223         SVGStringList.idl
224         SVGStylable.idl
225         SVGStyleElement.idl
226         SVGSwitchElement.idl
227         SVGSymbolElement.idl
228         SVGTRefElement.idl
229         SVGTSpanElement.idl
230         SVGTests.idl
231         SVGTextContentElement.idl
232         SVGTextElement.idl
233         SVGTextPathElement.idl
234         SVGTextPositioningElement.idl
235         SVGTitleElement.idl
236         SVGTransform.idl
237         SVGTransformList.idl
238         SVGTransformable.idl
239         SVGURIReference.idl
240         SVGUnitTypes.idl
241         SVGUseElement.idl
242         SVGViewElement.idl
243         SVGViewSpec.idl
244         SVGZoomAndPan.idl
245         SVGZoomEvent.idl
246         XMLHttpRequestException.idl
247         XPathException.idl
248         character-sets.txt
249         mac-encodings.txt
250         make-charset-table.pl
251         svgattrs.in
252         svgtags.in
253         xlinkattrs.in
254
255 2008-01-08  Luca Bruno  <lethalman88@gmail.com>
256
257         Reviewed by Alp Toker.
258
259         Support copying the selected URL to the clipboard.
260
261         * platform/gtk/PasteboardGtk.cpp:
262         (WebCore::Pasteboard::writeURL): implemented
263
264 2008-01-08  David D. Kilzer  <ddkilzer@webkit.org>
265
266         Renamed CharacterData::m_str to m_data
267
268         Rubber-stamped by Adam again.
269
270         No test cases added since there is no change in behavior.
271
272         * dom/CDATASection.cpp:
273         * dom/CharacterData.cpp:
274         (WebCore::CharacterData::CharacterData):
275         (WebCore::CharacterData::setData):
276         (WebCore::CharacterData::substringData):
277         (WebCore::CharacterData::appendData):
278         (WebCore::CharacterData::insertData):
279         (WebCore::CharacterData::deleteData):
280         (WebCore::CharacterData::replaceData):
281         (WebCore::CharacterData::nodeValue):
282         (WebCore::CharacterData::containsOnlyWhitespace):
283         (WebCore::CharacterData::dispatchModifiedEvent):
284         (WebCore::CharacterData::checkCharDataOperation):
285         (WebCore::CharacterData::dump):
286         * dom/CharacterData.h:
287         * dom/Comment.cpp:
288         * dom/Text.cpp:
289         (WebCore::Text::splitText):
290         (WebCore::Text::createRenderer):
291         (WebCore::Text::recalcStyle):
292
293 2008-01-08  Steve Falkenburg  <sfalken@apple.com>
294
295         Fix a couple of compiler warnings.
296         
297         Reviewed by Mitz.
298
299         * platform/win/ThreadingWin.cpp:
300         * platform/win/UniscribeController.cpp: Remove unused function.
301         (WebCore::UniscribeController::advance): Fix bogus warning about un-initialized variable.
302
303 2008-01-08  Adele Peterson  <adele@apple.com>
304
305         Reviewed by Darin.
306
307         Fix for <rdar://problem/5674667> fast/forms/slider-mouse-events.html is broken by media control checkin 29257
308
309         * rendering/RenderSlider.cpp: (WebCore::HTMLSliderThumbElement::defaultEventHandler):
310           After fixing a bug in EventHandler to make sure events always go to the capturing node, this bug was exposed.
311           MouseMove and MouseUp events were going to the thumb element, but not to the slider input element.  
312           This change makes the input element the capturing node, and then the input element forwards the mouse events to the thumb element.
313           I also added a missing call to setDefaultHandled for the mousemove event.
314
315 2008-01-08  Adele Peterson  <adele@apple.com>
316
317         Reviewed by Adam. 
318
319         * rendering/RenderThemeSafari.cpp: Use the SafariTheme version number to decide whether or not to
320         paint the media controls in RenderThemeSafari.
321
322 2008-01-08  Oliver Hunt  <oliver@apple.com>
323
324         Reviewed by Adele and John.
325
326         Fix <rdar://problem/5652740> Crash occurs at WebCore::Widget::getView() after
327         dragging file into window that contains web page ( http://www.econocraft.com/flood_arch.htm )
328
329         We hit this crash if the page reloads between DragController::dragUpdated
330         and DragController::performDrag, meaning that m_document starts pointing to
331         a now viewless document.  This is picked up by an assertion in performDrag
332         which I have now replaced with an assignment given that the assertion is 
333         invalid -- it is possible for m_document to be changed between dragUpdated
334         performDrag
335
336         * page/DragController.cpp:
337         (WebCore::DragController::performDrag):
338
339 2008-01-08  Alexey Proskuryakov  <ap@webkit.org>
340
341         Reviewed by Darin.
342
343         <rdar://problem/5659812> CrashTracer: 462 crashes in Safari at com.apple.WebCore:
344         WebCore::Node::setChanged + 96
345
346         Test: fast/dom/cssTarget-crash.html
347
348         * dom/Node.cpp: (WebCore::Node::removedFromDocument):
349         Check to see if the node being removed is currently set as the Document's cssTarget.
350         If it is, clear the cssTarget to prevent a hanging reference to it.
351
352 2008-01-08  Adam Roben  <aroben@apple.com>
353
354         * bindings/scripts/CodeGeneratorJS.pm: Touch this so the bindings will
355         rebuild on Windows now that the media elements are enabled.
356
357 2008-01-08  Adam Roben  <aroben@apple.com>
358
359         * svg/svgtags.in: Touch this again for the sake of the Windows bots.
360
361 2008-01-08  Timothy Hatcher  <timothy@apple.com>
362
363         Reviewed by Adam Roben.
364
365         Use JSRetainPtr in the Web Inspector everywhere we own a JSStringRef.
366         Also added some #pragma marks to help find places in the file.
367
368         * page/InspectorController.cpp:
369         (WebCore::callSimpleFunction): Use JSRetainPtr<JSStringRef>.
370         And return the result of JSObjectCallAsFunction.
371         (WebCore::search): Use JSRetainPtr<JSStringRef>.
372         (WebCore::databaseTableNames): Ditto.
373         (WebCore::localizedStrings): Ditto.
374         (WebCore::InspectorController::~InspectorController): Ditto.
375         (WebCore::InspectorController::focusNode): Ditto.
376         (WebCore::InspectorController::windowScriptObjectAvailable): Ditto.
377         (WebCore::InspectorController::scriptObjectReady): Ditto.
378         (WebCore::addHeaders): Ditto.
379         (WebCore::InspectorController::addScriptResource): Ditto.
380         (WebCore::InspectorController::removeScriptResource): Ditto.
381         (WebCore::InspectorController::updateScriptResourceRequest): Ditto.
382         (WebCore::InspectorController::updateScriptResourceResponse): Ditto.
383         (WebCore::InspectorController::updateScriptResource): Ditto.
384         (WebCore::InspectorController::addDatabaseScriptResource): Ditto.
385         (WebCore::InspectorController::removeDatabaseScriptResource): Ditto.
386         (WebCore::InspectorController::addScriptConsoleMessage): Ditto.
387
388 2008-01-08  Dan Bernstein  <mitz@apple.com>
389
390         Rubber-stamped by Sam Weinig.
391
392         - rename FontDataBaseClass.{cpp,h} back to FontData.{cpp,h}
393
394         * GNUmakefile.am:
395         * WebCore.pro:
396         * WebCore.vcproj/WebCore.vcproj:
397         * WebCore.xcodeproj/project.pbxproj:
398         * WebCoreSources.bkl:
399         * editing/Editor.cpp:
400         * platform/graphics/FontData.cpp: Copied from WebCore/platform/graphics/FontDataBaseClass.cpp.
401         * platform/graphics/FontData.h: Copied from WebCore/platform/graphics/FontDataBaseClass.h.
402         * platform/graphics/FontDataBaseClass.cpp: Removed.
403         * platform/graphics/FontDataBaseClass.h: Removed.
404         * platform/graphics/SegmentedFontData.h:
405         * platform/graphics/SimpleFontData.h:
406
407 2008-01-08  Dan Bernstein  <mitz@apple.com>
408
409         Fix a Wx build error.
410
411         * platform/graphics/wx/GlyphMapWx.cpp:
412         (WebCore::GlyphPage::fill):
413
414 2008-01-08  Dan Bernstein  <mitz@apple.com>
415
416         Fix a Qt build error.
417
418         * platform/graphics/qt/SimpleFontDataQt.cpp:
419         (WebCore::SimpleFontData::containsCharacters):
420         (WebCore::SimpleFontData::fontDataForCharacter):
421         (WebCore::SimpleFontData::isSegmented):
422
423 2008-01-08  Adam Roben  <aroben@apple.com>
424
425         Windows build fix.
426
427         Touch config.h to force a rebuild (apparently changing preprocessor
428         definitions in the .vcproj doesn't force a rebuild).
429
430         * config.h:
431
432 2008-01-08  Dan Bernstein  <mitz@apple.com>
433
434         Fix a Wx build failure.
435
436         * webcore-wx.bkl:
437
438 2008-01-08  Dan Bernstein  <mitz@apple.com>
439
440         Fix a Qt build failure.
441
442         * WebCore.pro:
443
444 2008-01-08  John Sullivan  <sullivan@apple.com>
445
446         Reviewed by Adam Roben
447         
448         - fixed <rdar://problem/5671668> REGRESSION (r28711-r28730): With caret in an empty form field, 
449           Delete menu item is enabled but shouldn't be
450
451         The enabled logic was incorrect for the Delete menu item. To fix this, I added an EditorCommandSource
452         parameter to the enabled functions so that they can have parallel logic to the execute functions.
453
454         * editing/EditorCommand.cpp:
455         added EditorCommandSource parameter to isEnabled function prototype
456         (WebCore::enabled):
457         added unused EditorCommandSource parameter to these isEnabled functions:
458         (WebCore::enabledAnySelection):
459         (WebCore::enabledAnySelectionAndMark):
460         (WebCore::enableCaretInEditableText):
461         (WebCore::enabledCopy):
462         (WebCore::enabledCut):
463
464         (WebCore::enabledDelete):
465         new function, uses logic previously used by Delete command for DOM sources; uses logic in enabledCut
466         for menu source
467
468         added unused EditorCommandSource parameter to these isEnabled functions:
469         (WebCore::enabledInEditableText):
470         (WebCore::enabledInRichlyEditableText):
471         (WebCore::enabledPaste):
472         (WebCore::enabledRangeInEditableText):
473         (WebCore::enabledRangeInRichlyEditableText):
474         (WebCore::enabledRedo):
475         (WebCore::enabledUndo):
476         
477         (WebCore::CommandEntry::):
478         wire up new enabledDelete function as delete function for Delete command
479         
480         (WebCore::Editor::Command::isEnabled):
481         pass EditorCommandSource parameter to isEnabled function
482
483 2008-01-08  Adam Roben  <aroben@apple.com>
484
485         Visual C++ Express build fix
486
487         * WebCore.vcproj/QTMovieWin.vcproj: Explicitly link against user32.lib
488         and advapi32.lib. VS implicitly links against these, VC++ Express
489         doesn't.
490
491 2008-01-08  Dan Bernstein  <mitz@apple.com>
492
493         - add bug number
494
495         * platform/graphics/mac/FontCustomPlatformData.cpp:
496         (WebCore::createFontCustomPlatformData):
497
498 2008-01-08  Dan Bernstein  <mitz@apple.com>
499
500         Try to fix the Qt build.
501
502         * WebCore.pro:
503
504 2008-01-08  Nikolas Zimmermann  <zimmermann@kde.org>
505
506         Not reviewed. Try to fix Qt builds after Timothy's inspector changes.
507
508         * page/inspector/WebKit.qrc:
509
510 2008-01-08  Maciej Stachowiak  <mjs@apple.com>
511
512         Reviewed by Mark.
513
514         - remove duplicate definition of getElementById from HTMLDocument IDL (and ObjC bindings)
515
516         * bindings/objc/PublicDOMInterfaces.h:
517         * html/HTMLDocument.idl:
518
519 2008-01-08  David D. Kilzer  <ddkilzer@webkit.org>
520
521         Renamed CharacterData::str to m_str to match coding style
522
523         Rubber-stamped by Adam.
524
525         No test cases added since there is no change in behavior.
526
527         * dom/CDATASection.cpp:
528         * dom/CharacterData.cpp:
529         (WebCore::CharacterData::CharacterData):
530         (WebCore::CharacterData::setData):
531         (WebCore::CharacterData::substringData):
532         (WebCore::CharacterData::appendData):
533         (WebCore::CharacterData::insertData):
534         (WebCore::CharacterData::deleteData):
535         (WebCore::CharacterData::replaceData):
536         (WebCore::CharacterData::nodeValue):
537         (WebCore::CharacterData::containsOnlyWhitespace):
538         (WebCore::CharacterData::dispatchModifiedEvent):
539         (WebCore::CharacterData::checkCharDataOperation):
540         (WebCore::CharacterData::dump):
541         * dom/CharacterData.h:
542         * dom/Comment.cpp:
543         * dom/Text.cpp:
544         (WebCore::Text::splitText):
545         (WebCore::Text::createRenderer):
546         (WebCore::Text::recalcStyle):
547
548 2008-01-08  Oliver Hunt  <oliver@apple.com>
549
550         Reviewed by NOBODY (Build fix).
551
552         Set the ENABLE_SVG_FONTS flag in Windows build, now builds, 
553         I'm not sure if it just caused the right files to regenerate,
554         or if there's some configuration weirdness in the non-SVG-fonts
555         build. 
556
557         * WebCore.vcproj/WebCore.vcproj:
558
559 2008-01-07  Maciej Stachowiak  <mjs@apple.com>
560
561         Reviewed by Brady.
562
563         - fixed <rdar://problem/5644300> Back/Forward Cache should not include pages with databases
564         
565         Track whether a document has ever opened a database; if so, exclude it from b/f caching (for now)
566         
567         * dom/Document.cpp:
568         (WebCore::Document::Document):
569         * dom/Document.h:
570         (WebCore::Document::setHasOpenDatabases):
571         (WebCore::Document::hasOpenDatabases):
572         * loader/FrameLoader.cpp:
573         (WebCore::FrameLoader::canCachePage):
574         * storage/Database.cpp:
575         (WebCore::Database::openDatabase):
576
577 2008-01-07  Dan Bernstein  <mitz@apple.com>
578
579         Reviewed by Oliver Hunt.
580
581         - fix leaks seen on the build bot
582
583         * css/CSSFontSelector.cpp:
584         (WebCore::CSSFontSelector::addFontFaceRule): Avoid creating a
585         CSSFontFaceSource for SVG font-face elements going into an
586         SVGCSSFontFace because it just leaks them. Avoid adding SVG font-
587         face elements to a CSSFontFace because it will not work as expected.
588
589 2008-01-07  Mark Rowe  <mrowe@apple.com>
590
591         Tiger build fix.
592
593         * platform/graphics/mac/FontCustomPlatformData.cpp:
594         (WebCore::createFontCustomPlatformData): Only include this code on Leopard.
595         It's not needed on Tiger, and breaks the build.
596
597 2008-01-07  Antti Koivisto  <antti@apple.com>
598
599         Reviewed by Steve.
600
601         Re-enable media support in Windows build.
602
603         * WebCore.vcproj/QTMovieWin.vcproj:
604         * WebCore.vcproj/WebCore.vcproj:
605         * WebCore.vcproj/build-generated-files.sh:
606
607 2008-01-07  Steve Falkenburg  <sfalken@apple.com>
608
609         Add version resource to QTMovieWin.dll
610         
611         Reviewed by Adam.
612
613         * WebCore.vcproj/PRODUCTVERSION: Copied from ../WebKit/win/WebKit.vcproj/PRODUCTVERSION.
614         * WebCore.vcproj/QTMovieWin.rc: Added.
615         * WebCore.vcproj/QTMovieWin.vcproj:
616         * WebCore.vcproj/VERSION: Copied from ../WebKit/win/WebKit.vcproj/VERSION.
617         * WebCore.vcproj/auto-version.sh: Copied from ../WebKit/win/WebKit.vcproj/auto-version.sh.
618
619 2008-01-07  Dan Bernstein  <mitz@apple.com>
620
621         Build fix.
622
623         * platform/graphics/qt/FontCustomPlatformData.cpp:
624         (WebCore::FontCustomPlatformData::~FontCustomPlatformData): Added.
625         Calls QFontDatabase::removeApplicationFont().
626         * platform/graphics/qt/FontCustomPlatformData.h:
627         * platform/graphics/qt/GlyphPageTreeNodeQt.cpp:
628         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData): Removed the
629         implementation because Qt does not use the WebCore glyph cache.
630
631 2008-01-07  Dan Bernstein  <mitz@apple.com>
632
633         Reviewed by Oliver Hunt.
634
635         - fix an assertion failure in svg/W3C-SVG-1.1/fonts-elem-03-b.svg on
636           Tiger and multiple SVG layout test failures on Leopard.
637
638         * css/CSSSegmentedFontFace.cpp:
639         (WebCore::CSSSegmentedFontFace::getFontData): Avoid returning an
640         empty SegmentedFontData.
641         * platform/graphics/mac/FontCustomPlatformData.cpp:
642         (WebCore::createFontCustomPlatformData): Avoid creating a font that
643         contains no glyphs. On Leopard, ATS might create such a font given
644         data in an unsupported format (such as SVG).
645
646 2008-01-07  Steve Falkenburg  <sfalken@apple.com>
647
648         Build fix.
649
650         * WebCore.vcproj/WebCore.sln:
651         * WebCore.vcproj/WebCore.submit.sln:
652
653 2008-01-07  Oliver Hunt  <oliver@apple.com>
654
655         Reviewed by Niko.
656
657         Fix painting of SVG <image> when the image must be scaled to retain aspect ratio
658
659         Test: svg/custom/image-with-aspect-ratio-stretch.svg
660
661         * rendering/RenderSVGImage.cpp:
662         (WebCore::RenderSVGImage::adjustRectsForAspectRatio):
663
664 2008-01-07  Dan Bernstein  <mitz@apple.com>
665
666         Build fix.
667
668         * platform/graphics/qt/GlyphPageTreeNodeQt.cpp:
669         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
670
671 2008-01-07  Adele Peterson  <adele@apple.com>
672
673         Add missing newline.
674
675         * rendering/MediaControlElements.cpp:
676
677 2008-01-07  Jon Honeycutt  <jhoneycutt@apple.com>
678
679         Reviewed by Hyatt.
680
681         <rdar://problem/5673489> Safari does not render windowless plugins in an
682         iframe when opacity < 1.0
683
684         Plugins in transparency layers handle their own world transforms, so
685         only apply the horizontal/vertical transform if we are not in a
686         transparency layer.
687
688         * platform/graphics/GraphicsContext.h: Add a Windows-platform-only
689         inTransparencyLayer() function
690         * platform/win/GraphicsContextWin.cpp:
691         (WebCore::GraphicsContext::getWindowsContext): Use inTransparencyLayer()
692         (WebCore::GraphicsContext::inTransparencyLayer):
693         (WebCore::GraphicsContext::releaseWindowsContext): Use
694         inTransparencyLayer()
695         * plugins/win/PluginViewWin.cpp:
696         (WebCore::PluginViewWin::paint): When retrieving the HDC, use the rect
697         relative to the window. Pass m_isTransparent to
698         get/releaseWindowsContext(). Only set the world transform if we are not
699         in a transparency layer.
700
701 2008-01-07  Adele Peterson  <adele@apple.com>
702
703         Build fix.  Need to wrap these classes in #if ENABLE(VIDEO)
704
705         * rendering/MediaControlElements.cpp:
706         * rendering/MediaControlElements.h:
707
708 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
709
710         Reviewed by Mark.
711
712         Enable SVG_FONTS by default.
713
714         * Configurations/WebCore.xcconfig:
715         * WebCore.vcproj/build-generated-files.sh:
716
717 2008-01-07  Dan Bernstein  <mitz@apple.com>
718
719         Build fix.
720
721         * platform/graphics/qt/SimpleFontDataQt.cpp:
722         (WebCore::SimpleFontData::SimpleFontData):
723         (WebCore::SimpleFontData::~SimpleFontData):
724
725 2008-01-07  Adam Barth  <hk9565@gmail.com>
726
727         Reviewed by Sam Weinig
728
729         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16523
730         <rdar://problem/5657447>
731
732         When a frame is created with the URL "about:blank" or "", it should
733         inherit its SecurityOrigin from its opener.  However, once it has
734         decided on that SecurityOrigin, it should not change its mind.
735         Prior to this patch, several events could induce the frame to change
736         its SecurityOrigin, permitting an attacker to inject script into an
737         arbitrary SecurityOrigin.
738
739         This patch makes several changes:
740
741         1) Documents refuse to change from one SecurityOrigin to another
742            unless explicitly instructed to do so.
743
744         2) Navigating to a JavaScript URL that produces a value
745            preserves the current SecurityOrigin explicitly instead of
746            relying on the URL to preserve the origin (which fails for
747            about:blank URLs and SecurityOrigins with document.domain set).
748
749            Ideally, we should not preserve the URL at all.  Instead, the
750            frame's URL should be the JavaScript URL, as in Firefox, but this
751            would require changes that are too risky for this patch.  I'll
752            file this as a separate issue.
753
754         3) Various methods of navigating to JavaScript URLs were not
755            properly handling JavaScript that returned a value (and should
756            therefore replace the current document).  This patch unifies
757            those code paths with the path that works.
758
759            There are still a handful of bugs relating to the handling of
760            JavaScript URLs, but I'll file those as separate issues.
761
762         Tests: http/tests/security/aboutBlank/xss-DENIED-navigate-opener-document-write.html
763                http/tests/security/aboutBlank/xss-DENIED-navigate-opener-javascript-url.html
764                http/tests/security/aboutBlank/xss-DENIED-set-opener.html
765
766         * dom/Document.cpp:
767         (WebCore::Document::initSecurityOrigin):
768         * dom/Document.h:
769         (WebCore::Document::setSecurityOrigin):
770         * loader/FrameLoader.cpp:
771         (WebCore::FrameLoader::changeLocation):
772         (WebCore::FrameLoader::urlSelected):
773         (WebCore::FrameLoader::requestFrame):
774         (WebCore::FrameLoader::submitForm):
775         (WebCore::FrameLoader::executeIfJavaScriptURL):
776         (WebCore::FrameLoader::begin):
777         * loader/FrameLoader.h:
778         * platform/SecurityOrigin.cpp:
779         (WebCore::SecurityOrigin::setForURL):
780         (WebCore::SecurityOrigin::createForFrame):
781         * platform/SecurityOrigin.h:
782
783 2008-01-07  Adele Peterson  <adele@apple.com>
784
785         Forgot to check in these changes in my last checkin.
786
787         * rendering/RenderThemeSafari.cpp:
788
789 2008-01-07  Dan Bernstein  <mitz@apple.com>
790
791         Build fixes.
792
793         * WebCore.pro:
794         * platform/graphics/qt/FontCacheQt.cpp:
795         (WebCore::FontCache::getCachedFontData):
796
797 2008-01-07  Timothy Hatcher  <timothy@apple.com>
798
799         Reviewed by John Sullivan.
800
801         <rdar://problem/5674119> Make the Web Inspector toolbar the normal size when not docked
802
803         * page/inspector/inspector.css: Changed CSS rules to have the toolbar and buttons be
804           normal height when not docked, and small when docked. Also added some cursor properties
805           prevent showing the text cursor over areas that are not selectable.
806         * page/inspector/Images: A few images added and old ones removed or renamed.
807
808 2008-01-07  Alp Toker  <alp@atoker.com>
809
810         Prospective GTK+ autotools/qmake VIDEO build fix for breakage
811         introduced in r29257.
812
813         * GNUmakefile.am:
814         * WebCore.pro:
815
816 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
817
818         Reviewed by Oliver.
819
820         Build fix affecting all builds - again related to the unicode-range addition.
821
822         * css/CSSFontSelector.cpp:
823         (WebCore::CSSFontSelector::addFontFaceRule):
824         * css/SVGCSSFontFace.cpp:
825         (WebCore::SVGCSSFontFace::SVGCSSFontFace):
826         * css/SVGCSSFontFace.h:
827         * rendering/RenderSVGText.cpp:
828         * svg/SVGFont.cpp:
829         (WebCore::svgFontAndFontFaceElementForFontData):
830         (WebCore::floatWidthMissingGlyphCallback):
831         (WebCore::drawTextMissingGlyphCallback):
832         * svg/SVGFontFaceElement.cpp:
833
834 2008-01-07  Adele Peterson  <adele@apple.com>
835
836         Reviewed by Antti, Adam, and Mitz.
837
838         WebCore part of fix for 
839         <rdar://problem/5619073> Updated look for <video> controls
840         <rdar://problem/5619057> Add volume control to video controls
841
842         * WebCore.base.exp: Added symbols for WebKitSystemInterface drawing methods.
843         * WebCore.xcodeproj/project.pbxproj: Added MediaControlElements.h/cpp
844         * WebCore.vcproj/WebCore.vcproj: ditto.
845
846         * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added cases for new appearances.
847         * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType): Added cases for new types.
848         * css/CSSSelector.h: (WebCore::CSSSelector::): Added new pseudo elements.
849         * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::checkOneSelector): ditto.
850         * css/CSSValueKeywords.in: Added keywords for new control appearance styles.
851         * css/html4.css: Added new styles for new controls.
852
853         * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::canPlay): Added. Takes loading state into account.
854         * html/HTMLMediaElement.h:
855
856         * page/EventHandler.cpp: (WebCore::EventHandler::updateMouseEventTargetNode): Make sure the events always go to the capturing node, if there is one.
857
858         * platform/mac/WebCoreSystemInterface.h: Added drawing methods for controls.
859         * platform/mac/WebCoreSystemInterface.mm: ditto.
860
861         * rendering/MediaControlElements.cpp: Added.
862         (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement): Moved from RenderMedia.  Made this relatively positioned, instead of absolute.
863         (WebCore::MediaControlInputElement::MediaControlInputElement): Moved from RenderMedia.  Removed call to updateFromElement, 
864          since its too early to do this here, and causes crashes for the slider.
865         (WebCore::MediaControlInputElement::attachToParent): Moved from RenderMedia.
866         (WebCore::MediaControlInputElement::update): ditto.
867         (WebCore::MediaControlMuteButtonElement::MediaControlMuteButtonElement): Added.
868         (WebCore::MediaControlMuteButtonElement::defaultEventHandler): ditto.
869         (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement): Moved from RenderMedia.
870         (WebCore::MediaControlPlayButtonElement::defaultEventHandler): ditto.
871         (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement): Added.
872         (WebCore::MediaControlSeekButtonElement::defaultEventHandler): ditto.
873         (WebCore::MediaControlSeekButtonElement::seekTimerFired): ditto.
874         (WebCore::MediaControlTimelineElement::MediaControlTimelineElement): Moved from RenderMedia.
875         (WebCore::MediaControlTimelineElement::defaultEventHandler): ditto.
876         (WebCore::MediaControlTimelineElement::update): ditto. 
877         (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement): Added.
878         (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler): ditto.
879         * rendering/MediaControlElements.h: Added. Moved from RenderMedia.
880         (WebCore::MediaControlShadowRootElement::isShadowNode):
881         (WebCore::MediaControlShadowRootElement::shadowParentNode):
882         (WebCore::RenderMediaControlShadowRoot::RenderMediaControlShadowRoot):
883         (WebCore::RenderMediaControlShadowRoot::setParent):
884
885         * rendering/RenderMedia.cpp: Moved control element classes to MediaControlElements files.
886         (WebCore::RenderMedia::RenderMedia): No need to initialize RefPtrs.
887         (WebCore::RenderMedia::layout): Set the position for the controlsRenderer.
888         (WebCore::RenderMedia::createPanel): Added nil check for the renderer.
889         (WebCore::RenderMedia::createMuteButton): Added.
890         (WebCore::RenderMedia::createSeekBackButton): ditto.
891         (WebCore::RenderMedia::createSeekForwardButton): ditto.
892         (WebCore::RenderMedia::createTimeDisplay): Added nil check for the renderer.
893         (WebCore::RenderMedia::createFullscreenButton): Added.
894         (WebCore::RenderMedia::updateControls): Create, delete, and update new controls when appropriate.
895         (WebCore::RenderMedia::updateControlVisibility): Don't fade controls for audio controls. 
896         (WebCore::RenderMedia::forwardEvent): Forward events for new controls.
897         * rendering/RenderMedia.h: Added new methods for creating new controls.
898
899         * rendering/RenderObject.cpp: (WebCore::RenderObject::containingBlock): Updated special case for media elements, which are replaced elements, 
900           but also can contain children (the controls' container) that may need to look for the containing block.
901
902         * rendering/RenderSlider.cpp: (WebCore::RenderSlider::createThumbStyle): Added case for MediaSliderAppearance.
903
904         * rendering/RenderStyle.h: Added appearance constants and pseudo ids for new controls.
905         (WebCore::):
906         (WebCore::RenderStyle::):
907
908         * rendering/RenderTheme.cpp:
909         (WebCore::RenderTheme::adjustStyle): Added cases for new appearances.
910         (WebCore::RenderTheme::paint): ditto.
911         * rendering/RenderTheme.h: Added new methods for painting new appearances.
912         (WebCore::RenderTheme::paintMediaBackground):
913         (WebCore::RenderTheme::paintMediaFullscreenButton):
914         (WebCore::RenderTheme::paintMediaPlayButton):
915         (WebCore::RenderTheme::paintMediaMuteButton):
916         (WebCore::RenderTheme::paintMediaSeekBackButton):
917         (WebCore::RenderTheme::paintMediaSeekForwardButton):
918         (WebCore::RenderTheme::paintMediaSliderThumb):
919         * rendering/RenderThemeMac.h:
920         * rendering/RenderThemeMac.mm:
921         (WebCore::RenderThemeMac::RenderThemeMac): Initialize m_mediaControlBackgroundImage.
922         (WebCore::RenderThemeMac::~RenderThemeMac): Delete m_mediaControlBackgroundImage.
923         (WebCore::RenderThemeMac::paintCapsLockIndicator): Use LocalCurrentGraphicsContext here too, since we use it in all other painting methods.
924         (WebCore::RenderThemeMac::paintSliderTrack): Added case for MediaSliderAppearance.
925         (WebCore::RenderThemeMac::adjustSliderThumbSize): Added case for MediaSliderThumbAppearance.
926         (WebCore::RenderThemeMac::paintMediaBackground): Draws the new artwork for the controls.
927         (WebCore::RenderThemeMac::paintMediaFullscreenButton): ditto.
928         (WebCore::RenderThemeMac::paintMediaMuteButton): ditto.
929         (WebCore::RenderThemeMac::paintMediaPlayButton): ditto.
930         (WebCore::RenderThemeMac::paintMediaSeekBackButton): ditto.
931         (WebCore::RenderThemeMac::paintMediaSeekForwardButton): ditto.
932         (WebCore::RenderThemeMac::paintMediaSliderThumb): ditto.
933         * rendering/RenderThemeSafari.cpp: Draws the new artwork on Windows.
934         (WebCore::RenderThemeSafari::paintSliderTrack):
935         (WebCore::RenderThemeSafari::adjustSliderThumbSize):
936         (WebCore::RenderThemeSafari::paintMediaBackground):
937         (WebCore::RenderThemeSafari::paintMediaFullscreenButton):
938         (WebCore::RenderThemeSafari::paintMediaMuteButton):
939         (WebCore::RenderThemeSafari::paintMediaPlayButton):
940         (WebCore::RenderThemeSafari::paintMediaSeekBackButton):
941         (WebCore::RenderThemeSafari::paintMediaSeekForwardButton):
942         (WebCore::RenderThemeSafari::paintMediaSliderThumb):
943         * rendering/RenderThemeSafari.h:
944
945 2008-01-07  Timothy Hatcher  <timothy@apple.com>
946
947         Reviewed by Darin Adler.
948
949         Fix ASSERTION FAILED: dstOffset + srcSegmentLength == static_cast<int>(data.size())
950         when the replacment string is a different length.
951
952         * platform/text/StringImpl.cpp:
953         (WebCore::StringImpl::replace): Move the parenthesis to be around only the subtraction in
954         the Vector size calculation, correcting the order of math operations.
955
956 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
957
958         Reviewed by Eric. Hopefully fix build with mac tiger after the unicode-range addition. NSInteger not available there.
959
960         * platform/graphics/mac/FontCacheMac.mm:
961
962 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
963
964         Reviewed by Oliver. Fix build error introduced by Dan's unicode-range support patch & enabling SVG_FONTS by default.
965
966         * css/CSSFontSelector.cpp:
967         (WebCore::CSSFontSelector::getFontData):
968
969 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
970
971         Not reviewed. Next try to fix wx/mac leopard build.
972
973         * css/CSSFontSelector.cpp: Need to wrap a SVG* include in ENABLE(SVG) blocks, as this port doesn't build this generated file.
974         * svg/SVGFontFaceElement.cpp:
975         (WebCore::SVGFontFaceElement::createFontData): Fix double<->float conversion issue.
976         * webcore-base.bkl: Undo svg/ include.
977
978 2008-01-07  Dan Bernstein  <mitz@apple.com>
979
980         Reviewed by Dave Hyatt.
981
982         - <rdar://problem/5665216> Support the unicode-range property in @font-face rules
983
984         * GNUmakefile.am:
985         * WebCore.pro:
986         * WebCore.vcproj/WebCore.vcproj:
987         * WebCore.xcodeproj/project.pbxproj:
988         * WebCoreSources.bkl:
989         * bindings/objc/DOM.mm:
990         * bridge/mac/WebCoreAXObject.mm:
991         * css/CSSComputedStyleDeclaration.cpp:
992         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
993         * css/CSSFontFace.cpp:
994         (WebCore::CSSFontFace::fontLoaded): Changed to call the owning segmented
995         font face.
996         (WebCore::CSSFontFace::getFontData):
997         * css/CSSFontFace.h:
998         (WebCore::CSSFontFace::CSSFontFace):
999         (WebCore::CSSFontFace::setSegmentedFontFace):
1000         * css/CSSFontFaceSource.cpp:
1001         (WebCore::CSSFontFaceSource::pruneTable): Removed the calls to
1002         GlyphPageTreeNode::pruneTreeCustomFontData because the fonts in the
1003         font table are not exposed in the glyph page tree. Only the segmented
1004         font is, and that is taken care of by the segmented font face.
1005         (WebCore::CSSFontFaceSource::getFontData):
1006         * css/CSSFontFaceSource.h:
1007         * css/CSSFontSelector.cpp:
1008         (WebCore::CSSFontSelector::addFontFaceRule): Changed to collect
1009         @font-face rules with the same family and traits into a single
1010         segmented font face, instead of just retaining the most recent one.
1011         (WebCore::CSSFontSelector::fontLoaded):
1012         (WebCore::CSSFontSelector::getFontData):
1013         * css/CSSFontSelector.h:
1014         * css/CSSGrammar.y:
1015         * css/CSSParser.cpp:
1016         (WebCore::CSSParser::parseValue):
1017         (WebCore::CSSParser::parseFontFaceUnicodeRange): Added. Parses a unicode
1018         range value.
1019         * css/CSSParser.h:
1020         * css/CSSPrimitiveValue.h:
1021         (WebCore::CSSPrimitiveValue::):
1022         * css/CSSPropertyNames.in:
1023         * css/CSSSegmentedFontFace.cpp: Added.
1024         (WebCore::CSSSegmentedFontFace::CSSSegmentedFontFace):
1025         (WebCore::CSSSegmentedFontFace::~CSSSegmentedFontFace):
1026         (WebCore::CSSSegmentedFontFace::pruneTable):
1027         (WebCore::CSSSegmentedFontFace::isLoaded):
1028         (WebCore::CSSSegmentedFontFace::isValid):
1029         (WebCore::CSSSegmentedFontFace::fontLoaded):
1030         (WebCore::CSSSegmentedFontFace::overlayRange):
1031         (WebCore::CSSSegmentedFontFace::getFontData):
1032         * css/CSSSegmentedFontFace.h: Added.
1033         (WebCore::FontFaceRange::FontFaceRange):
1034         (WebCore::FontFaceRange::from):
1035         (WebCore::FontFaceRange::to):
1036         (WebCore::FontFaceRange::fontFace):
1037         (WebCore::CSSSegmentedFontFace::fontSelector):
1038         * css/CSSStyleSelector.cpp:
1039         (WebCore::CSSStyleSelector::applyProperty):
1040         * css/CSSUnicodeRangeValue.cpp: Added.
1041         (WebCore::CSSUnicodeRangeValue::~CSSUnicodeRangeValue):
1042         (WebCore::CSSUnicodeRangeValue::cssText):
1043         * css/CSSUnicodeRangeValue.h: Added.
1044         (WebCore::CSSUnicodeRangeValue::CSSUnicodeRangeValue):
1045         (WebCore::CSSUnicodeRangeValue::from):
1046         (WebCore::CSSUnicodeRangeValue::to):
1047         * css/SVGCSSFontFace.cpp:
1048         (WebCore::SVGCSSFontFace::getFontData):
1049         * css/SVGCSSFontFace.h:
1050         * editing/Editor.cpp:
1051         (WebCore::Editor::fontForSelection):
1052         * editing/Editor.h:
1053         * page/mac/FrameMac.mm:
1054         * page/mac/WebCoreFrameBridge.mm:
1055         (-[WebCoreFrameBridge fontForSelection:]):
1056         * platform/graphics/Font.cpp:
1057         (WebCore::WidthIterator::advance):
1058         (WebCore::Font::glyphDataForCharacter):
1059         (WebCore::Font::primaryFont): Changed to return the simple font data
1060         used for the space character.
1061         (WebCore::Font::fontDataAt):
1062         (WebCore::Font::fontDataForCharacters):
1063         (WebCore::Font::drawGlyphBuffer):
1064         * platform/graphics/Font.h:
1065         * platform/graphics/FontCache.cpp:
1066         (WebCore::FontCache::getCachedFontData):
1067         (WebCore::FontCache::getFontData):
1068         * platform/graphics/FontCache.h:
1069         * platform/graphics/FontData.cpp: Renamed to SimpleFontData.cpp
1070         * platform/graphics/FontData.h: Renamed to SimpleFontData.cpp.
1071         * platform/graphics/FontDataBaseClass.cpp: Added. This will be renamed
1072         FontData.cpp.
1073         (WebCore::FontData::~FontData):
1074         * platform/graphics/FontDataBaseClass.h: Added. This will be renamed
1075         FontData.h.
1076         * platform/graphics/FontFallbackList.cpp:
1077         (WebCore::FontFallbackList::determinePitch):
1078         (WebCore::FontFallbackList::fontDataAt):
1079         (WebCore::FontFallbackList::fontDataForCharacters):
1080         * platform/graphics/FontFallbackList.h:
1081         (WebCore::FontFallbackList::primaryFont):
1082         * platform/graphics/FontSelector.h:
1083         * platform/graphics/GlyphBuffer.h:
1084         (WebCore::GlyphBuffer::fontDataAt):
1085         (WebCore::GlyphBuffer::swap):
1086         (WebCore::GlyphBuffer::add):
1087         * platform/graphics/GlyphPageTreeNode.cpp:
1088         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
1089         (WebCore::GlyphPageTreeNode::initializePage): Added code to initialize
1090         pages for segmented font data.
1091         (WebCore::GlyphPageTreeNode::getChild):
1092         (WebCore::GlyphPageTreeNode::pruneCustomFontData):
1093         * platform/graphics/GlyphPageTreeNode.h:
1094         (WebCore::GlyphPage::setGlyphDataForCharacter):
1095         (WebCore::GlyphPage::setGlyphDataForIndex):
1096         (WebCore::GlyphPageTreeNode::getRootChild):
1097         * platform/graphics/SegmentedFontData.cpp: Added.
1098         (WebCore::SegmentedFontData::~SegmentedFontData):
1099         (WebCore::SegmentedFontData::fontDataForCharacter):
1100         (WebCore::SegmentedFontData::containsCharacters):
1101         (WebCore::SegmentedFontData::isCustomFont):
1102         (WebCore::SegmentedFontData::isLoading):
1103         (WebCore::SegmentedFontData::isSegmented):
1104         * platform/graphics/SegmentedFontData.h: Added.
1105         (WebCore::FontDataRange::FontDataRange):
1106         (WebCore::FontDataRange::from):
1107         (WebCore::FontDataRange::to):
1108         (WebCore::FontDataRange::fontData):
1109         (WebCore::SegmentedFontData::appendRange):
1110         (WebCore::SegmentedFontData::numRanges):
1111         (WebCore::SegmentedFontData::rangeAt):
1112         * platform/graphics/SimpleFontData.cpp: Copied from WebCore/platform/graphics/FontData.cpp.
1113         (WebCore::SimpleFontData::SimpleFontData):
1114         (WebCore::SimpleFontData::~SimpleFontData):
1115         (WebCore::SimpleFontData::ascent):
1116         (WebCore::SimpleFontData::descent):
1117         (WebCore::SimpleFontData::widthForGlyph):
1118         (WebCore::SimpleFontData::fontDataForCharacter):
1119         (WebCore::SimpleFontData::isSegmented):
1120         * platform/graphics/SimpleFontData.h: Copied from WebCore/platform/graphics/FontData.h.
1121         (WebCore::SimpleFontData::isCustomFont):
1122         (WebCore::SimpleFontData::isLoading):
1123         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1124         (WebCore::GraphicsContext::setPlatformFont):
1125         * platform/graphics/gtk/FontCacheGtk.cpp:
1126         (WebCore::FontCache::getFontDataForCharacters):
1127         * platform/graphics/gtk/FontDataGtk.cpp: Renamed to
1128         SimpleFontDataGtk.cpp.
1129         * platform/graphics/gtk/FontGtk.cpp:
1130         (WebCore::Font::drawGlyphs):
1131         * platform/graphics/gtk/GlyphPageTreeNodeGtk.cpp:
1132         (WebCore::GlyphPage::fill):
1133         * platform/graphics/gtk/SimpleFontDataGtk.cpp: Copied from WebCore/platform/graphics/gtk/FontDataGtk.cpp.
1134         (WebCore::SimpleFontData::platformInit):
1135         (WebCore::SimpleFontData::platformDestroy):
1136         (WebCore::SimpleFontData::smallCapsFontData):
1137         (WebCore::SimpleFontData::containsCharacters):
1138         (WebCore::SimpleFontData::determinePitch):
1139         (WebCore::SimpleFontData::platformWidthForGlyph):
1140         (WebCore::SimpleFontData::setFont):
1141         * platform/graphics/mac/FontCacheMac.mm:
1142         (WebCore::FontCache::getFontDataForCharacters):
1143         * platform/graphics/mac/FontDataMac.mm: Renamed to SimpleFontDataMac.mm.
1144         * platform/graphics/mac/FontMac.mm:
1145         (WebCore::initializeATSUStyle):
1146         (WebCore::overrideLayoutOperation):
1147         (WebCore::ATSULayoutParameters::initialize):
1148         (WebCore::Font::drawGlyphs):
1149         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
1150         (WebCore::GlyphPage::fill):
1151         * platform/graphics/mac/SimpleFontDataMac.mm: Copied from WebCore/platform/graphics/mac/FontDataMac.mm.
1152         (WebCore::initFontData):
1153         (WebCore::SimpleFontData::platformInit):
1154         (WebCore::SimpleFontData::platformDestroy):
1155         (WebCore::SimpleFontData::smallCapsFontData):
1156         (WebCore::SimpleFontData::containsCharacters):
1157         (WebCore::SimpleFontData::determinePitch):
1158         (WebCore::SimpleFontData::platformWidthForGlyph):
1159         (WebCore::SimpleFontData::checkShapesArabic):
1160         * platform/graphics/qt/FontDataQt.cpp: Renamed to SimpleFontDataQt.cpp.
1161         * platform/graphics/qt/GlyphPageTreeNodeQt.cpp:
1162         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
1163         * platform/graphics/qt/SimpleFontDataQt.cpp: Copied from WebCore/platform/graphics/qt/FontDataQt.cpp.
1164         * platform/graphics/win/FontCacheWin.cpp:
1165         (WebCore::FontCache::getFontDataForCharacters):
1166         * platform/graphics/win/FontDataWin.cpp: Renamed to
1167         SimpleFontDataWin.cpp.
1168         * platform/graphics/win/FontWin.cpp:
1169         (WebCore::Font::drawGlyphs):
1170         * platform/graphics/win/GlyphPageTreeNodeWin.cpp:
1171         (WebCore::GlyphPage::fill):
1172         * platform/graphics/win/SimpleFontDataWin.cpp: Copied from WebCore/platform/graphics/win/FontDataWin.cpp.
1173         (WebCore::SimpleFontData::setShouldApplyMacAscentHack):
1174         (WebCore::SimpleFontData::platformInit):
1175         (WebCore::SimpleFontData::platformDestroy):
1176         (WebCore::SimpleFontData::smallCapsFontData):
1177         (WebCore::SimpleFontData::containsCharacters):
1178         (WebCore::SimpleFontData::determinePitch):
1179         (WebCore::SimpleFontData::platformWidthForGlyph):
1180         (WebCore::SimpleFontData::scriptFontProperties):
1181         * platform/graphics/wx/FontCacheWx.cpp:
1182         (WebCore::FontCache::getFontDataForCharacters):
1183         * platform/graphics/wx/FontDataWx.cpp: Renamed to SimpleFontDataWx.cpp.
1184         * platform/graphics/wx/FontWx.cpp:
1185         (WebCore::Font::drawGlyphs):
1186         * platform/graphics/wx/GlyphMapWx.cpp:
1187         (WebCore::GlyphPage::fill):
1188         * platform/graphics/wx/SimpleFontDataWx.cpp: Copied from WebCore/platform/graphics/wx/FontDataWx.cpp.
1189         (WebCore::SimpleFontData::platformInit):
1190         (WebCore::SimpleFontData::platformDestroy):
1191         (WebCore::SimpleFontData::smallCapsFontData):
1192         (WebCore::SimpleFontData::containsCharacters):
1193         (WebCore::SimpleFontData::determinePitch):
1194         (WebCore::SimpleFontData::platformWidthForGlyph):
1195         * platform/mac/FileChooserMac.mm:
1196         * platform/mac/PopupMenuMac.mm:
1197         * platform/mac/WebCoreTextRenderer.mm:
1198         * platform/win/PopupMenuWin.cpp:
1199         * platform/win/UniscribeController.cpp:
1200         (WebCore::UniscribeController::advance):
1201         (WebCore::UniscribeController::itemizeShapeAndPlace):
1202         (WebCore::UniscribeController::shapeAndPlaceItem):
1203         (WebCore::UniscribeController::shape):
1204         * platform/win/UniscribeController.h:
1205         * svg/SVGFont.cpp:
1206         (WebCore::Font::drawGlyphsWithSVGFont):
1207         * svg/SVGFontElement.cpp:
1208         (WebCore::SVGFontElement::collectGlyphs):
1209         * svg/SVGFontFaceElement.cpp:
1210         (WebCore::SVGFontFaceElement::createFontData):
1211         * svg/SVGFontFaceElement.h:
1212         * svg/SVGGlyphElement.cpp:
1213
1214 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
1215
1216         Not reviewed. Try to fix mac build by forcing SVGNames regeneration.
1217
1218         * svg/svgtags.in:
1219
1220 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
1221
1222         Not reviewed. Proposed build fix for wx.
1223
1224         * webcore-base.bkl:
1225
1226 2008-01-07  Dan Bernstein  <mitz@apple.com>
1227
1228         64-bit build fix
1229
1230         * platform/graphics/mac/FontCustomPlatformData.cpp:
1231         (WebCore::FontCustomPlatformData::fontPlatformData): Have to use a
1232         cast here since FMGetFontFromATSFontRef() is not available on 64-bit.
1233
1234 2008-01-06  Nikolas Zimmermann  <zimmermann@kde.org>
1235
1236         Reviewed by Oliver. Parts reviewed by Eric, David Hyatt & Dan & Alexey.
1237         Fixes: http://bugs.webkit.org/show_bug.cgi?id=15741 (REGRESSION: svg/W3C-SVG-1.1/fonts-elem-03-b.svg shows worse behavior on TOT)
1238
1239         Display SVG Fonts, fill svg/SVGFont.cpp with life by adding all needed code to
1240         measure & render glyphs contained in SVG Fonts, including ligature lookup support.
1241
1242         Implement floatWidth/selectionRectForText for SVG Fonts, fixing text selection.
1243
1244         Support horiz-origin-x/y, horiz-adv-x, vert-adv-y, vert-origin-x/y & arabic-form.
1245         Implement simple algorithm to determine the arabic forms for a string (initial, isolated, medial, terminal).
1246
1247         Removed drawGlyphsWithSVGFont - create a new function drawTextWithSVGFont instead.
1248         This doesn't involve creating/using a 'GlyphBuffer' object anymore, which is not
1249         required for SVG Fonts anyway (we already know all our offsets/advances/etc..)
1250
1251         Don't call it from drawSimpleText anymore, but directly in drawText - as Dan suggested.
1252
1253         <glyph> elements now register themselves in the SVGFontElement's glyph cache.
1254         (insertedIntoDocument / removedFromDocument take care of this)
1255
1256         The cache is built once now, and is kept updated - it's not rebuild anymore
1257         on painting (!) - which was a crude hack for testing.
1258
1259         W3C testcase which include SVG Fonts:
1260         svg/W3C-SVG-1.1/animate-elem-03-t.svg (Fixed, of course not the anim itself, but it's SVG Fonts usage)
1261         svg/W3C-SVG-1.1/animate-elem-24-t.svg (Ditto)
1262         svg/W3C-SVG-1.1/animate-elem-36-t.svg (Ditto)
1263         svg/W3C-SVG-1.1/animate-elem-40-t.svg (Ditto)
1264         svg/W3C-SVG-1.1/fonts-kern-01-t.svg (missing <vkern>/<hkern> support)
1265         svg/W3C-SVG-1.1/fonts-desc-02-t.svg (Fixed, tests CSS font matching based on font-variant attribute)
1266         svg/W3C-SVG-1.1/fonts-elem-01-t.svg (Fixed, basic SVG font test)
1267         svg/W3C-SVG-1.1/fonts-elem-02-t.svg (Fixed, accuracy test for embedded SVG font)
1268         svg/W3C-SVG-1.1/fonts-elem-05-t.svg (Fixed, checks horiz-origin-x support, note: W3C reference image is wrong)
1269         svg/W3C-SVG-1.1/fonts-elem-06-t.svg (Fixed, checks horiz-adv-x support)
1270         svg/W3C-SVG-1.1/fonts-glyph-02-t.svg (Fixed, checks arabic-form support)
1271         svg/W3C-SVG-1.1/fonts-glyph-03-t.svg (Fixed, checks glyph matching based on xml:lang)
1272         svg/W3C-SVG-1.1/masking-mask-01-b.svg (Fixed, SVG Fonts & masking)
1273         svg/W3C-SVG-1.1/pservers-grad-08-b.svg (Fixed, SVG Fonts & gradient on fill/stroke)
1274         svg/W3C-SVG-1.1/render-elems-06-t.svg (Fixed, simple 'fill' property test)
1275         svg/W3C-SVG-1.1/render-elems-07-t.svg (Fixed, simple 'stroke' property test - shows SVG Font interprets stroke-width in glyph coordinate system, as demanded by spec)
1276         svg/W3C-SVG-1.1/render-elems-08-t.svg (Fixed, simple 'fill' & 'stroke' property test)
1277         svg/W3C-SVG-1.1/render-groups-01-b.svg (missing <vkern>/<hkern> support)
1278         svg/W3C-SVG-1.1/render-groups-03-t.svg (Ditto)
1279         svg/W3C-SVG-1.1/text-altglyph-01-b.svg (no <altGlyph> support yet)
1280         svg/W3C-SVG-1.1/text-text-04-t.svg (Fixed, absolute placing of characters pixel perfect now)
1281         svg/W3C-SVG-1.1/text-text-05-t.svg (FIXME: problem with text-anchor)
1282         svg/W3C-SVG-1.1/text-text-06-t.svg (highlights problem with ligatures & absolute positioned characters)
1283
1284         Questionable testcases:
1285         svg/W3C-SVG-1.1/fonts-glyph-04-t.svg (tests that glyph selection is done in the order in the definition of the font element.)
1286         I am not sure why this behaviour is desired, no comment given in spec - doesn't make much sense to me, ignoring it for now.
1287
1288         Several other batik testcases fixed, which use SVG Fonts in combination with gradients & filters.
1289
1290         * css/CSSFontSelector.cpp:
1291         (WebCore::CSSFontSelector::addFontFaceRule):
1292         (WebCore::CSSFontSelector::getFontData):
1293         * platform/graphics/Font.cpp:
1294         (WebCore::Font::lineSpacing):
1295         (WebCore::Font::xHeight):
1296         (WebCore::Font::canUseGlyphCache):
1297         (WebCore::Font::drawGlyphBuffer):
1298         (WebCore::Font::drawText):
1299         (WebCore::Font::floatWidth):
1300         (WebCore::Font::selectionRectForText):
1301         * platform/graphics/Font.h:
1302         (WebCore::TextRun::TextRun):
1303         (WebCore::TextRun::activePaintServer):
1304         (WebCore::TextRun::setActivePaintServer):
1305         * platform/graphics/FontData.cpp:
1306         (WebCore::FontData::lineSpacing):
1307         (WebCore::FontData::lineGap):
1308         (WebCore::FontData::xHeight):
1309         * platform/graphics/FontData.h:
1310         * platform/graphics/win/FontWin.cpp:
1311         (WebCore::Font::drawGlyphs):
1312         * rendering/RenderSVGText.cpp:
1313         (WebCore::RenderSVGText::relativeBBox):
1314         * rendering/SVGInlineTextBox.cpp:
1315         (WebCore::SVGInlineTextBox::paintCharacters):
1316         * rendering/SVGInlineTextBox.h:
1317         * rendering/SVGRootInlineBox.cpp:
1318         (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
1319         * svg/SVGFont.cpp:
1320         (WebCore::):
1321         (WebCore::processArabicFormDetection):
1322         (WebCore::charactersWithArabicForm):
1323         (WebCore::isCompatibleArabicForm):
1324         (WebCore::isCompatibleGlyph):
1325         (WebCore::svgFontAndFontFaceElementForFontData):
1326         (WebCore::SVGTextRunWalker::SVGTextRunWalker):
1327         (WebCore::SVGTextRunWalker::walk):
1328         (WebCore::floatWidthUsingSVGFontCallback):
1329         (WebCore::floatWidthMissingGlyphCallback):
1330         (WebCore::floatWidthOfSubStringUsingSVGFont):
1331         (WebCore::Font::floatWidthUsingSVGFont):
1332         (WebCore::drawTextUsingSVGFontCallback):
1333         (WebCore::drawTextMissingGlyphCallback):
1334         (WebCore::Font::drawTextUsingSVGFont):
1335         (WebCore::Font::selectionRectForTextUsingSVGFont):
1336         * svg/SVGFontElement.cpp:
1337         (WebCore::SVGFontElement::SVGFontElement):
1338         (WebCore::SVGFontElement::addGlyphToCache):
1339         (WebCore::SVGFontElement::removeGlyphFromCache):
1340         (WebCore::SVGFontElement::firstMissingGlyphElement):
1341         (WebCore::SVGFontElement::glyphIdentifiersForString):
1342         * svg/SVGFontElement.h:
1343         (WebCore::SVGFontElement::maximumHashKeyLength):
1344         * svg/SVGFontFaceElement.cpp:
1345         (WebCore::SVGFontFaceElement::createFontData):
1346         (WebCore::SVGFontFaceElement::rebuildFontFace):
1347         (WebCore::SVGFontFaceElement::associatedFontElement):
1348         * svg/SVGFontFaceElement.h:
1349         * svg/SVGGlyphElement.cpp:
1350         (WebCore::SVGGlyphElement::insertedIntoDocument):
1351         (WebCore::SVGGlyphElement::removedFromDocument):
1352         (WebCore::parseArabicForm):
1353         (WebCore::SVGGlyphElement::inheritUnspecifiedAttributes):
1354         (WebCore::SVGGlyphElement::buildGlyphIdentifier):
1355         * svg/SVGGlyphElement.h:
1356         (WebCore::SVGGlyphIdentifier::):
1357         (WebCore::SVGGlyphIdentifier::SVGGlyphIdentifier):
1358         (WebCore::SVGGlyphIdentifier::inheritedValue):
1359         (WebCore::SVGGlyphIdentifier::operator==):
1360         (WebCore::SVGGlyphElement::~SVGGlyphElement):
1361
1362 2008-01-07  David Hyatt  <hyatt@apple.com>
1363
1364         Fix for bug 13095, CSS3 multiple backgrounds don't work on table cells.
1365
1366         Reviewed by Dan
1367
1368         * rendering/RenderBox.h:
1369         * rendering/RenderTableCell.cpp:
1370         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
1371
1372 2008-01-07  Holger Freyther  <zecke@selfish.org>
1373
1374         Reviewed by Alp Toker.
1375
1376         * Fix indention
1377
1378         * platform/gtk/ContextMenuGtk.cpp:
1379         (WebCore::ContextMenu::~ContextMenu):
1380
1381 2008-01-07  Holger Freyther  <zecke@selfish.org>
1382
1383         Reviewed by Alp Toker.
1384
1385         * The ContextMenuController is going to live longer than the ContextMenu. It is
1386         going to live as long as the WebCore::Page is around where the ContextMenu, specially
1387         in the case of a SubMenu, is gone before we popup the menu.
1388
1389         * platform/gtk/ContextMenuGtk.cpp:
1390         (WebCore::menuItemActivated):
1391         (WebCore::ContextMenu::appendItem):
1392
1393 2008-01-07  Holger Freyther  <zecke@selfish.org>
1394
1395         Reviewed by Alp Toker.
1396
1397         * Fix SubMenu handling
1398         * Do not connect to the activated signal if we are a separator or submenu
1399         * Change our type from ActionType to SubMenuType when we have a submenu
1400         * Initialize the SubMenu
1401
1402         * platform/gtk/ContextMenuGtk.cpp:
1403         (WebCore::ContextMenu::appendItem):
1404         * platform/gtk/ContextMenuItemGtk.cpp:
1405         (WebCore::ContextMenuItem::ContextMenuItem):
1406         (WebCore::ContextMenuItem::createNativeMenuItem):
1407         (WebCore::ContextMenuItem::setSubMenu):
1408
1409 2008-01-07  Holger Freyther  <zecke@selfish.org>
1410
1411         Reviewed by Alp Toker.
1412
1413         * Qt and Gtk must know if a ContextMenuItem is checkable. Add a new ContextMenuItemType for checkable
1414         actions.
1415         * Use this information in the Gtk platform to create a GtkCheckMenuItem when needed.
1416         * Update the ContextMenuController to accept CheckableActionTypes as well.
1417         * Change ContextMenu.cpp to use the CheckableActionType. The information if a item is checkable
1418         was extracted from ContextMenu::checkOrEnableIfNeeded.
1419         * Update the Qt and Windows port.
1420
1421
1422         * page/ContextMenuController.cpp:
1423         * platform/ContextMenu.cpp:
1424         (WebCore::createAndAppendFontSubMenu):
1425         (WebCore::createAndAppendSpellingAndGrammarSubMenu):
1426         (WebCore::createAndAppendSpellingSubMenu):
1427         (WebCore::createAndAppendWritingDirectionSubMenu):
1428         * platform/ContextMenuItem.h:
1429         * platform/gtk/ContextMenuItemGtk.cpp:
1430         (WebCore::ContextMenuItem::ContextMenuItem):
1431         (WebCore::ContextMenuItem::createNativeMenuItem):
1432
1433 2008-01-07  Luca Bruno  <lethalman88@gmail.com>
1434
1435         Reviewed by Alp Toker.
1436
1437         http://bugs.webkit.org/show_bug.cgi?id=16745
1438         [GTK] Context menu doesn't feel or look native - no icons
1439
1440         Use GTK+ stock icons for menu items where possible.
1441
1442         * platform/gtk/ContextMenuItemGtk.cpp:
1443         (WebCore::gtkStockIDFromContextMenuAction):
1444         (WebCore::ContextMenuItem::createNativeMenuItem):
1445         (WebCore::ContextMenuItem::setAction):
1446
1447 2008-01-07  Dan Bernstein  <mitz@apple.com>
1448
1449         Reviewed by John Sullivan.
1450
1451         - make the ATSUI code path work with custom fonts rather than crash
1452
1453         * platform/graphics/mac/FontCustomPlatformData.cpp:
1454         (WebCore::FontCustomPlatformData::fontPlatformData):
1455         * platform/graphics/mac/FontMac.mm:
1456         (WebCore::initializeATSUStyle):
1457
1458 2008-01-07  Thiago Macieira  <thiago.macieira@trolltech.com>
1459
1460         Reviewed by Simon.
1461
1462         abort() now emits the signals, so disconnect them before you abort()
1463
1464         * platform/network/qt/QNetworkReplyHandler.cpp:
1465         (WebCore::QNetworkReplyHandler::abort):
1466
1467 2008-01-07  Simon Hausmann  <hausmann@webkit.org>
1468
1469         Reviewed by Lars.
1470
1471         Use a faster and safer way of flattening the form data.
1472
1473         * platform/network/qt/QNetworkReplyHandler.cpp:
1474         (WebCore::QNetworkReplyHandler::start):
1475
1476 2008-01-07  Simon Hausmann  <hausmann@webkit.org>
1477
1478         Reviewed by Lars.
1479
1480         Ported of the network backend of the Qt platform to Qt 4.4's new networking API.
1481
1482         * WebCore.pro:
1483         * platform/network/ResourceHandleInternal.h:
1484         * platform/network/qt/QNetworkReplyHandler.cpp: Added.
1485         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
1486         (WebCore::QNetworkReplyHandler::abort):
1487         (WebCore::QNetworkReplyHandler::finish):
1488         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
1489         (WebCore::QNetworkReplyHandler::forwardData):
1490         (WebCore::QNetworkReplyHandler::start):
1491         * platform/network/qt/QNetworkReplyHandler.h: Added.
1492         (WebCore::QNetworkReplyHandler::reply):
1493         * platform/network/qt/ResourceHandleQt.cpp:
1494         (WebCore::ResourceHandle::start):
1495         (WebCore::ResourceHandle::cancel):
1496         (WebCore::ResourceHandle::loadResourceSynchronously):
1497         * platform/network/qt/ResourceRequest.h:
1498         (WebCore::ResourceRequest::ResourceRequest):
1499         * platform/network/qt/ResourceRequestQt.cpp: Added.
1500         (WebCore::ResourceRequest::toNetworkRequest):
1501         * platform/qt/MIMETypeRegistryQt.cpp:
1502         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
1503         * platform/qt/PlugInInfoStoreQt.cpp:
1504         (WebCore::PlugInInfoStore::createPluginInfoForPluginAtIndex):
1505         (WebCore::PlugInInfoStore::pluginCount):
1506         (WebCore::PlugInInfoStore::pluginNameForMIMEType):
1507
1508 2008-01-07  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1509
1510         Reviewed by Lars.
1511
1512         * Remove m_dirtyRegion as it is not used as we pass every dirty region
1513         directly to the ChromeClient
1514
1515         * platform/qt/ScrollViewQt.cpp:
1516         (WebCore::ScrollView::paint):
1517
1518 2008-01-06  Nikolas Zimmermann  <zimmermann@kde.org>
1519
1520         Reviewed by Oliver.
1521
1522         Small CG paint server cleanups - use more GraphicsContext method where possible.
1523
1524         * svg/graphics/cg/CgSupport.cpp:
1525         (WebCore::applyStrokeStyleToContext):
1526         (WebCore::strokeBoundingBox):
1527         * svg/graphics/cg/CgSupport.h:
1528         * svg/graphics/cg/RenderPathCg.cpp:
1529         (WebCore::RenderPath::strokeContains):
1530         * svg/graphics/cg/SVGPaintServerGradientCg.cpp:
1531         (WebCore::SVGPaintServerGradient::setup):
1532         * svg/graphics/cg/SVGPaintServerPatternCg.cpp:
1533         (WebCore::SVGPaintServerPattern::setup):
1534         * svg/graphics/cg/SVGPaintServerSolidCg.cpp:
1535         (WebCore::SVGPaintServerSolid::setup):
1536
1537 2008-01-06  Nikolas Zimmermann  <zimmermann@kde.org>
1538
1539         Reviewed by Dan.
1540
1541         Use new helper function isArabicChar() - which also calls ublock_getCode() == UBLOCK_ARABIC on mac.
1542
1543         * platform/graphics/mac/FontMac.mm:
1544         (WebCore::ATSULayoutParameters::initialize):
1545
1546 2008-01-06  Andrew Wellington  <proton@wiretapped.net>
1547
1548         Reviewed by Darin.
1549         
1550         DOMRange doesn't correctly re-size when inserting items (Acid3)
1551         http://bugs.webkit.org/show_bug.cgi?id=16764
1552         
1553         Update the offset for the range when inserting items into the range.
1554
1555         Test: fast/dom/Range/range-modifycontents.html
1556
1557         * dom/Range.cpp:
1558         (WebCore::Range::insertNode):
1559
1560 2008-01-06  Alexey Proskuryakov  <ap@webkit.org>
1561
1562         Reviewed by Darin.
1563
1564         http://bugs.webkit.org/show_bug.cgi?id=16731
1565         Incorrect node type for whitespace when setting innerHTML in an XHTML document
1566
1567         Test: fast/dom/xhtml-fragment-whitespace.xhtml
1568
1569         * dom/XMLTokenizer.cpp: (WebCore::parseXMLDocumentFragment):
1570         Use balancedCharactersHandler for ignorable whitespace.
1571
1572 2008-01-06  Alexey Proskuryakov  <ap@webkit.org>
1573
1574         Reviewed by Darin.
1575
1576         http://bugs.webkit.org/show_bug.cgi?id=16701
1577         <rdar://problem/5666580> REGRESSION: URL-encoded space (%20) in livejournal url
1578         causes page load error
1579
1580         Test: http/tests/misc/location-with-space.php
1581
1582         * platform/network/cf/ResourceRequestCFNet.cpp:
1583         (WebCore::ResourceRequest::doUpdatePlatformRequest): Do update its URL, too.
1584
1585 2008-01-06  Andrew Wellington  <proton@wiretapped.net>
1586
1587         Reviewed by Darin.
1588         
1589         DOMRange.cloneContents does not work (Acid3 bug)
1590         http://bugs.webkit.org/show_bug.cgi?id=16748
1591         
1592         When cloning an empty range, return an empty DocmentFragment instead of
1593         null or undefined.
1594
1595         Test: fast/dom/Range/range-clone-empty.html
1596
1597         * dom/Range.cpp:
1598         (WebCore::Range::processContents):
1599
1600 2008-01-06  Luca Bruno  <lethalman88@gmail.com>
1601
1602         Reviewed by Alp Toker.
1603
1604         Remove curl handles immediately if the timer is not running.
1605
1606         * platform/network/curl/ResourceHandleManager.cpp:
1607         (WebCore::ResourceHandleManager::cancel):
1608
1609 2008-01-06  Alp Toker  <alp@atoker.com>
1610
1611         Reviewed by Eric.
1612
1613         Cairo canvas refcounting fix. Reference the surface in the constructor
1614         to match its destruction in the destructor.
1615
1616         Fixes a crash triggered by leaving this page:
1617           http://philip.html5.org/tests/canvas/misc/globalalpha-pattern.html
1618
1619         * html/CanvasPattern.cpp:
1620         (WebCore::CanvasPattern::CanvasPattern):
1621
1622 2008-01-06  Eric Seidel  <eric@webkit.org>
1623
1624         Reviewed by darin.
1625
1626         Make attr selectors case-insensitive for certain HTML attributes
1627         http://bugs.webkit.org/show_bug.cgi?id=15470
1628
1629         Test: fast/css/html-attr-case-sensitivity.html
1630
1631         * css/CSSStyleSelector.cpp:
1632         (WebCore::addLocalNameToSet):
1633         (WebCore::createHtmlCaseInsensitiveAttributesSet):
1634         (WebCore::htmlAttributeHasCaseInsensitiveValue):
1635         (WebCore::CSSStyleSelector::checkOneSelector):
1636
1637 2008-01-06  Eric Seidel  <eric@webkit.org>
1638
1639         Reviewed by Sam.
1640
1641         Fix :checked matching type='text' and add test case
1642         http://bugs.webkit.org/show_bug.cgi?id=16750
1643
1644         Test: fast/dom/HTMLInputElement/checked-pseudo-selector.html
1645
1646         * html/HTMLInputElement.h: isChecked() can only be true for RADIO or CHECKBOX
1647
1648 2008-01-05  Sam Weinig  <sam@webkit.org>
1649
1650         Reviewed by Eric Seidel.
1651
1652         Patch for http://bugs.webkit.org/show_bug.cgi?id=16758
1653         ASSERT when using TreeWalker methods for a current node outside of the root (Acid3)
1654
1655         - Ensure that returned nodes are within the root node, or return 0, in adherence with the spec.
1656
1657         Test: fast/dom/TreeWalker/TreeWalker-currentNode.html
1658
1659         * dom/TreeWalker.cpp:
1660         (WebCore::TreeWalker::parentNode):
1661         (WebCore::TreeWalker::firstChild):
1662         (WebCore::TreeWalker::lastChild):
1663         (WebCore::TreeWalker::previousSibling):
1664         (WebCore::TreeWalker::nextSibling):
1665         (WebCore::TreeWalker::previousNode):
1666         (WebCore::TreeWalker::nextNode):
1667
1668 2008-01-04  Oliver Hunt  <oliver@apple.com>
1669
1670         Reviewed by Beth Dakin.
1671
1672         Fix bounds computation bugs responsible for http://bugs.webkit.org/show_bug.cgi?id=16015
1673         and other image repaint bugs.
1674
1675         We now cache the full local bounds for the <image> element, as otherwise certain
1676         combinations of attribute changes could result in incorrect dirty rects.
1677         Additionally we no longer use any of the integer bounds fields on RenderObject for
1678         determining repaint bounds (this was the principle cause of bug #16015).
1679
1680         I also removed the outline painting code as it was both wrong, and not correctly
1681         repainted.  I feel safe doing this as no other browser or viewer supports outline
1682         properties on svg elements.
1683
1684         I was unable to make a testcase for this unfortunately, despite seemingly deterministic 
1685         behaviour :(
1686
1687         * rendering/RenderSVGImage.cpp:
1688         (WebCore::RenderSVGImage::layout):
1689         (WebCore::RenderSVGImage::paint):
1690         (WebCore::RenderSVGImage::nodeAtPoint):
1691         (WebCore::RenderSVGImage::calculateAbsoluteBounds):
1692         * rendering/RenderSVGImage.h:
1693
1694 2008-01-04  Beth Dakin  <bdakin@apple.com>
1695
1696         Reviewed by Oliver.
1697
1698         Fix for http://bugs.webkit.org/show_bug.cgi?id=16704 input with 
1699         type="hidden" matches :enabled/:disabled (Acid3 bug)
1700
1701         Prevent :enabled and :disabled from applying to input type="hidden" 
1702
1703         * css/CSSStyleSelector.cpp:
1704         (WebCore::CSSStyleSelector::checkOneSelector): Rather than 
1705         allowing :enabled and :disabled to apply to all controls, only 
1706         allow it to apply to non-"hidden" controls
1707         * dom/Element.h:
1708         (WebCore::Element::isInputTypeHidden): 
1709         * html/HTMLInputElement.h:
1710         (WebCore::HTMLInputElement::isInputTypeHidden):
1711
1712 2008-01-04  Sam Weinig  <sam@webkit.org>
1713
1714         Reviewed by Oliver Hunt.
1715
1716         - Match the spec when calling getFloatValue, getStringValue, getCounterValue,
1717           getRectValue and getRGBColorValue of CSSPrimitiveValue by throwing exceptions
1718           if the type of the CSSPrimitiveValue is not the same as the type requested.
1719         - Fix the intermittent assertion failure seen in svg/css/glyph-orientation-rounding-test.xhtml
1720
1721         Test: fast/css/CSSPrimitiveValue-exceptions.html
1722
1723         * css/CSSPrimitiveValue.cpp:
1724         (WebCore::CSSPrimitiveValue::getDoubleValue):
1725         (WebCore::CSSPrimitiveValue::getStringValue):
1726         (WebCore::CSSPrimitiveValue::getCounterValue):
1727         (WebCore::CSSPrimitiveValue::getRectValue):
1728         (WebCore::CSSPrimitiveValue::getRGBColorValue):
1729         (WebCore::CSSPrimitiveValue::getPairValue):
1730         * css/CSSPrimitiveValue.h:
1731         (WebCore::CSSPrimitiveValue::getFloatValue):
1732         (WebCore::CSSPrimitiveValue::getIntValue):
1733         (WebCore::CSSPrimitiveValue::getCounterValue):
1734         (WebCore::CSSPrimitiveValue::getRectValue):
1735         (WebCore::CSSPrimitiveValue::getDashboardRegionValue):
1736         * css/CSSPrimitiveValue.idl:
1737
1738 2008-01-04  Antti Koivisto  <antti@apple.com>
1739
1740         Reviewed by Darin.
1741         
1742         Windows part of <rdar://problem/5647034>
1743         Media tests crash if an old version of QuickTime is installed
1744
1745         Check QuickTime version on Windows too.
1746
1747         * platform/graphics/MediaPlayer.cpp:
1748         (WebCore::MediaPlayer::isAvailable):
1749         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
1750         (WebCore::MediaPlayerPrivate::isAvailable):
1751         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
1752         (WebCore::MediaPlayerPrivate::isAvailable):
1753         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
1754         * platform/graphics/win/QTMovieWin.cpp:
1755         (QTMovieWin::initializeQuickTime):
1756
1757 2008-01-04  Darin Adler  <darin@apple.com>
1758
1759         Reviewed by Maciej and Alice.
1760
1761         - fix <rdar://problem/4404302> Borders where there should be none (canadasmountains.com)
1762
1763         Test: fast/images/border.html
1764
1765         * html/HTMLImageElement.cpp:
1766         (WebCore::HTMLImageElement::parseMappedAttribute): Change the code that handles cases
1767         where the border value is not a number to use the value "0" for the border width instead
1768         of not setting the border width and style at all. This matches other browsers, and makes
1769         more sense.
1770
1771 2008-01-04  Antti Koivisto  <antti@apple.com>
1772
1773         Try to fix 64-bit build
1774
1775         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1776         (WebCore::MediaPlayerPrivate::isAvailable):
1777
1778 2008-01-04  Stephanie  <slewis@apple.com>
1779
1780         Reviewed by Oliver.
1781
1782         WARNING: NO TEST CASES ADDED OR CHANGED
1783
1784         Fix another stringImpl leak.
1785
1786         * platform/text/StringImpl.cpp: remove an extra allocation
1787         (WebCore::StringImpl::StringImpl):
1788
1789 2008-01-04  Alice Liu  <alice.liu@apple.com>
1790
1791         Reviewed by Mitz.
1792
1793         * platform/graphics/win/FontCacheWin.cpp:
1794         fix loop condition that was causing crash
1795
1796 2008-01-04  Timothy Hatcher  <timothy@apple.com>
1797
1798         Reviewed by Adam Roben.
1799
1800         <rdar://problem/5671059> Always show the Timeline and Console buttons in the Inspector
1801
1802         * page/inspector/inspector.css: Remove styles related to the toggle button
1803           and make the area always visible. 
1804         * page/inspector/inspector.html: Remove the toggle button.
1805         * page/inspector/inspector.js: Remove code to toggle the status area.
1806
1807 2008-01-04  Alexey Proskuryakov  <ap@webkit.org>
1808
1809         Reviewed by Adam Roben.
1810
1811         Temporarily restore BackwardDelete for Windows nightlies to work correctly.
1812
1813         * editing/EditorCommand.cpp: (WebCore::CommandEntry::):
1814
1815 2008-01-04  Alexey Proskuryakov  <ap@webkit.org>
1816
1817         Reviewed by Darin.
1818
1819         <rdar://problem/5611712> xsl:sort does not use a case folding sort, and the 'case-order' attribute is ignored (16077)
1820
1821         Enable the fix on Windows.
1822
1823         * xml/XSLTProcessor.cpp: (WebCore::XSLTProcessor::transformToString):
1824         Always set a custom sort function, even if it doesn't implement proper collation on the platform.
1825
1826         * xml/XSLTUnicodeSort.cpp:
1827         (WebCore::xsltUnicodeSortFunction):
1828         * xml/XSLTUnicodeSort.h:
1829         If the platform does not use ICU, or ICU has collation support disabled, fall back to binary comparison.
1830
1831 2008-01-04  Antti Koivisto  <antti@apple.com>
1832
1833         Fix build.
1834
1835         * bindings/js/JSHTMLElementWrapperFactory.cpp:
1836
1837 2008-01-04  Antti Koivisto  <antti@apple.com>
1838
1839         Reviewed by Darin.
1840         
1841         Partial fix for <rdar://problem/5647034>
1842         Media tests crash if an old version of QuickTime is installed
1843
1844         Disable media support if QuickTime is not current enough (>=7.3).
1845         
1846         Windows patch coming soon.
1847
1848         * bindings/js/JSHTMLElementWrapperFactory.cpp:
1849         (WebCore::createJSHTMLWrapper):
1850         * bindings/js/kjs_window.cpp:
1851         (KJS::Window::getValueProperty):
1852         * html/HTMLElementFactory.cpp:
1853         (WebCore::audioConstructor):
1854         (WebCore::videoConstructor):
1855         (WebCore::sourceConstructor):
1856         * platform/graphics/MediaPlayer.cpp:
1857         (WebCore::MediaPlayer::isAvailable):
1858         * platform/graphics/MediaPlayer.h:
1859         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1860         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1861         (WebCore::MediaPlayerPrivate::isAvailable):
1862
1863 2008-01-04  Timothy Hatcher  <timothy@apple.com>
1864
1865         Reviewed by Darin Adler.
1866
1867         <rdar://problem/5604409> JavaScript privilege escalation when Web Inspector accesses page unsafely (16011)
1868
1869         Check if the property is a getter before asking for the value.
1870         If the property is a getter, we no longer show the value.
1871
1872         * page/inspector/PropertiesSidebarPane.js:
1873         * page/inspector/inspector.css:
1874
1875 2008-01-04  Dan Bernstein  <mitz@apple.com>
1876
1877         Reviewed by Darin Adler.
1878
1879         - fix synthetic bold and italic on Windows
1880
1881         Covered by an existing test.
1882
1883         * platform/graphics/win/FontPlatformDataWin.cpp:
1884         (WebCore::FontPlatformData::FontPlatformData):
1885
1886 2008-01-04  Alp Toker  <alp@atoker.com>
1887
1888         GTK+ autotools build fix. Terminate empty rules.
1889
1890         * GNUmakefile.am:
1891
1892 2008-01-04  Lars Knoll  <lars@trolltech.com>
1893
1894         Reviewed by Simon.
1895
1896         Remove most dependencies of Widget/ScrollView onto native QWidgets.
1897
1898         This also brings the code closer in line with the Windows code. Seems
1899         to work nicely on first try :)
1900
1901         * page/qt/FrameQt.cpp:
1902         (WebCore::Frame::createScriptInstanceForWidget):
1903         * platform/Widget.h:
1904         * platform/qt/PlatformScreenQt.cpp:
1905         (WebCore::screenDepth):
1906         (WebCore::screenDepthPerComponent):
1907         (WebCore::screenIsMonochrome):
1908         (WebCore::screenRect):
1909         * platform/qt/PlatformScrollBarQt.cpp:
1910         (WebCore::PlatformScrollbar::thumbPosition):
1911         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
1912         * platform/qt/ScrollViewQt.cpp:
1913         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
1914         (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
1915         (WebCore::ScrollView::updateContents):
1916         (WebCore::ScrollView::update):
1917         (WebCore::ScrollView::scrollRectIntoViewRecursively):
1918         (WebCore::ScrollView::updateScrollbars):
1919         (WebCore::ScrollView::addChild):
1920         (WebCore::ScrollView::removeChild):
1921         (WebCore::ScrollView::paint):
1922         * platform/qt/WidgetQt.cpp:
1923         (WebCore::WidgetPrivate::WidgetPrivate):
1924         (WebCore::WidgetPrivate::~WidgetPrivate):
1925         (WebCore::Widget::frameGeometry):
1926         (WebCore::Widget::setFrameGeometry):
1927         (WebCore::Widget::setCursor):
1928         (WebCore::Widget::show):
1929         (WebCore::Widget::hide):
1930         (WebCore::Widget::nativeWidget):
1931         (WebCore::Widget::setNativeWidget):
1932         (WebCore::Widget::suppressInvalidation):
1933         (WebCore::Widget::setSuppressInvalidation):
1934         (WebCore::Widget::invalidateRect):
1935         (WebCore::Widget::topLevel):
1936         (WebCore::Widget::containingWindow):
1937
1938 2008-01-04  Lars Knoll  <lars@trolltech.com>
1939
1940         Reviewed by Simon.
1941
1942         make QWebPage a QObject and get things to compile.
1943
1944         Nothing works currently though.
1945
1946         * platform/qt/ScrollViewQt.cpp:
1947         (WebCore::ScrollView::updateContents):
1948         (WebCore::ScrollView::update):
1949         * platform/qt/WidgetQt.cpp:
1950         (WebCore::Widget::qwidget):
1951         (WebCore::Widget::invalidateRect):
1952
1953 2008-01-04  Alp Toker  <alp@atoker.com>
1954
1955         Reviewed by Mark Rowe.
1956
1957         http://bugs.webkit.org/show_bug.cgi?id=16667
1958         make -j is failing with the autotools based system
1959
1960         Support parallel code generation. Nearly every use of explicit
1961         multiple targets was a potential concurrency bug, though in practice
1962         the bison rules were the first to be noticed because they took longer
1963         to complete and broke the build immediately.
1964
1965         * GNUmakefile.am:
1966
1967 2008-01-04  Alp Toker  <alp@atoker.com>
1968
1969         Reviewed by Mark Rowe.
1970
1971         Re-use a single static dummy surface rather than creating and
1972         destroying a surface for each CairoPath.
1973
1974         * platform/graphics/cairo/CairoPath.h:
1975         (WebCore::CairoPath::CairoPath):
1976
1977 2008-01-04  Mark Rowe  <mrowe@apple.com>
1978
1979         Tiger build fix.
1980
1981         * platform/Threading.h: The OSAtomic functions take non-volatile pointers on Tiger.
1982
1983 2008-01-03  Mark Rowe  <mrowe@apple.com>
1984
1985         Reviewed by Maciej Stachowiak.
1986
1987         Use platform-provided atomic operations in place of inline assembly to
1988         increase portability.
1989
1990         * platform/Threading.h:
1991         (WebCore::atomicIncrement):
1992         (WebCore::atomicDecrement):
1993
1994 2008-01-03  Oliver Hunt  <oliver@apple.com>
1995
1996         Reviewed by Maciej.
1997
1998         Fix <rdar://problem/5668517> REGRESSION: Major under painting issues in SVG (carto.net dock example)
1999
2000         We need to cache the absolute bounds of the <image>,
2001         as there's no reliable way to recompute the old bounding
2002         box one we have started layout.
2003
2004         * rendering/RenderSVGImage.cpp:
2005         (WebCore::RenderSVGImage::layout):
2006         (WebCore::RenderSVGImage::calculateAbsoluteBounds):
2007         * rendering/RenderSVGImage.h:
2008
2009 2008-01-03  Alp Toker  <alp@atoker.com>
2010
2011         Reviewed by Mark Rowe.
2012
2013         Support building in Scratchbox, which has a version of make that fails
2014         on wildcard syntax. Use a vpath to match IDL files instead.
2015
2016         * GNUmakefile.am:
2017
2018 2008-01-03  Jon Honeycutt  <jhoneycutt@apple.com>
2019
2020         Reviewed by Darin.
2021
2022         <rdar://problem/5504775> PDF page will not load first time after Adobe
2023         Reader install, unless browser is relaunched
2024
2025         Refresh and re-search the plugin database if the MIME type is not
2026         registered.
2027
2028         * plugins/win/PluginDatabaseWin.cpp:
2029         (WebCore::PluginDatabaseWin::isMIMETypeRegistered):
2030         * plugins/win/PluginDatabaseWin.h:
2031
2032 2008-01-03  Dan Bernstein  <mitz@apple.com>
2033
2034         Reviewed by Darin Adler.
2035
2036         - fix http://bugs.webkit.org/show_bug.cgi?id=16548
2037           <rdar://problem/5659452> REGRESSION(r28810): Font style and sizes are weird for Japanese text
2038
2039         * platform/graphics/win/FontCacheWin.cpp:
2040         (WebCore::linkedFontEnumProc): Added. This callback is used to fetch
2041         a valid LOGFONT for a given family.
2042         (WebCore::getLinkedFonts): Added. Returns a vector of font families
2043         linked to the given font family by the Windows registry key
2044         HKLM\Software\...\FontLink\SystemLink. The registry values typically
2045         differ based on the installed language version of Windows.
2046         (WebCore::FontCache::getFontDataForCharacters): Changed to not use MLang
2047         font mapping, which is Windows code page based, except for characters in
2048         the range U+2000..U+200F. Instead, this function gets the font Uniscribe
2049         would use for the character. However, that font might not actually
2050         contain the character, in which case GDI font linking would substitute a
2051         different font. Therefore, this function walks the linked font list
2052         until it finds a font that actually contains the character.
2053
2054 2008-01-03  Darin Adler  <darin@apple.com>
2055
2056         Reviewed by Mitz.
2057
2058         - fix http://bugs.webkit.org/show_bug.cgi?id=16723
2059           tables/mozilla/bugs/bug30418.html test failing due to problems updating dynamic border rules
2060
2061         Test: fast/table/border-changes.html
2062
2063         * html/HTMLTableElement.h:
2064         * html/HTMLTableElement.cpp:
2065         (WebCore::HTMLTableElement::parseMappedAttribute): Check the border type before and after
2066         parsing attributes, rather than doing this only for the rules attribute.
2067         (WebCore::HTMLTableElement::cellBorders): Added.
2068         (WebCore::HTMLTableElement::getSharedCellDecl): Changed to use cellBorders to factor out the
2069         rule about what type of borders to use.
2070
2071 2008-01-02  Sam Weinig  <sam@webkit.org>
2072
2073         Reviewed by Darin.
2074
2075         Pass the prototype of WebCore JS objects up the constructor chain
2076         rather than explicitly setting using setPrototype.  This removes many
2077         redundant settings of the prototype on construction.  To avoid a CG 
2078         hazard, the prototype must be constructed before calling the
2079         constructor of the JS object.
2080
2081         - JS objects that inherit from DOMObject, which all bindings objects
2082           (except Window) do, now can't implicitly have a jsNull prototype, but
2083           must explicitly pass it up the construction chain.
2084
2085         * bindings/js/JSCSSRuleCustom.cpp:
2086         (WebCore::toJS):
2087         * bindings/js/JSCSSValueCustom.cpp:
2088         (WebCore::toJS):
2089         * bindings/js/JSDocumentCustom.cpp:
2090         (WebCore::toJS):
2091         * bindings/js/JSEventCustom.cpp:
2092         (WebCore::toJS):
2093         * bindings/js/JSEventTargetNode.cpp:
2094         (WebCore::JSEventTargetNode::JSEventTargetNode):
2095         * bindings/js/JSEventTargetNode.h:
2096         * bindings/js/JSHTMLAllCollection.h:
2097         (WebCore::JSHTMLAllCollection::JSHTMLAllCollection):
2098         * bindings/js/JSHTMLAudioElementConstructor.cpp:
2099         (WebCore::JSHTMLAudioElementConstructor::JSHTMLAudioElementConstructor):
2100         * bindings/js/JSHTMLCollectionCustom.cpp:
2101         (WebCore::getNamedItems):
2102         (WebCore::toJS):
2103         * bindings/js/JSHTMLElementWrapperFactory.cpp:
2104         (WebCore::createJSHTMLWrapper):
2105         * bindings/js/JSHTMLFormElementCustom.cpp:
2106         (WebCore::JSHTMLFormElement::nameGetter):
2107         * bindings/js/JSHTMLInputElementBase.cpp:
2108         (WebCore::JSHTMLInputElementBase::JSHTMLInputElementBase):
2109         * bindings/js/JSHTMLInputElementBase.h:
2110         * bindings/js/JSHTMLOptionElementConstructor.cpp:
2111         (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor):
2112         * bindings/js/JSLocation.cpp:
2113         (WebCore::JSLocation::JSLocation):
2114         * bindings/js/JSLocation.h:
2115         * bindings/js/JSNamedNodesCollection.cpp:
2116         (WebCore::JSNamedNodesCollection::JSNamedNodesCollection):
2117         * bindings/js/JSNamedNodesCollection.h:
2118         * bindings/js/JSNodeCustom.cpp:
2119         (WebCore::toJS):
2120         * bindings/js/JSSVGElementWrapperFactory.cpp:
2121         (WebCore::createJSSVGWrapper):
2122         * bindings/js/JSSVGPathSegCustom.cpp:
2123         (WebCore::toJS):
2124         * bindings/js/JSStyleSheetCustom.cpp:
2125         (WebCore::toJS):
2126         * bindings/js/JSXMLHttpRequest.cpp:
2127         (KJS::JSXMLHttpRequestConstructorImp::JSXMLHttpRequestConstructorImp):
2128         (KJS::JSXMLHttpRequestConstructorImp::construct):
2129         (KJS::JSXMLHttpRequest::JSXMLHttpRequest):
2130         * bindings/js/JSXMLHttpRequest.h:
2131         * bindings/js/JSXSLTProcessor.cpp:
2132         (KJS::JSXSLTProcessor::JSXSLTProcessor):
2133         (KJS::XSLTProcessorConstructorImp::XSLTProcessorConstructorImp):
2134         (KJS::XSLTProcessorConstructorImp::implementsConstruct):
2135         (KJS::XSLTProcessorConstructorImp::construct):
2136         * bindings/js/JSXSLTProcessor.h:
2137         * bindings/js/kjs_binding.h:
2138         (KJS::DOMObject::DOMObject):
2139         (KJS::cacheDOMObject):
2140         (KJS::cacheSVGDOMObject):
2141         * bindings/js/kjs_css.cpp:
2142         (WebCore::JSRGBColor::JSRGBColor):
2143         (WebCore::getJSRGBColor):
2144         * bindings/js/kjs_css.h:
2145         * bindings/js/kjs_events.cpp:
2146         (WebCore::JSClipboard::JSClipboard):
2147         (WebCore::toJS):
2148         * bindings/js/kjs_events.h:
2149         * bindings/js/kjs_html.cpp:
2150         (WebCore::ImageConstructorImp::ImageConstructorImp):
2151         * bindings/js/kjs_navigator.cpp:
2152         (KJS::Navigator::Navigator):
2153         (KJS::PluginBase::PluginBase):
2154         * bindings/js/kjs_navigator.h:
2155         * bindings/js/kjs_window.cpp:
2156         (KJS::Window::Window):
2157         (KJS::Window::location):
2158         (KJS::Window::getValueProperty):
2159         * bindings/js/kjs_window.h:
2160         * bindings/scripts/CodeGeneratorJS.pm:
2161
2162 2008-01-03  Holger Hans Peter Freyther  <zecke@selfish.org>
2163
2164         Reviewed by Alp.
2165
2166         -This is from http://bugs.webkit.org/show_bug.cgi?id=16115
2167
2168         Change the Gtk ContextMenuItem code to generate the GtkMenuItem
2169         or GtkCheckMenuItem on the fly. Currently we will create a
2170         GtkCheckMenuItem if the ContextMenuItem has been checked. What needs
2171         to be done is to change WebCore to tell the platform code if an item
2172         is checkable or not.
2173
2174         * platform/ContextMenuItem.h:
2175         (WebCore::PlatformMenuItemDescription::PlatformMenuItemDescription):
2176         * platform/gtk/ContextMenuGtk.cpp:
2177         (WebCore::ContextMenu::appendItem):
2178         * platform/gtk/ContextMenuItemGtk.cpp:
2179         (WebCore::ContextMenuItem::ContextMenuItem):
2180         (WebCore::ContextMenuItem::~ContextMenuItem):
2181         (WebCore::ContextMenuItem::createNativeMenuItem):
2182         (WebCore::ContextMenuItem::releasePlatformDescription):
2183         (WebCore::ContextMenuItem::type):
2184         (WebCore::ContextMenuItem::setType):
2185         (WebCore::ContextMenuItem::action):
2186         (WebCore::ContextMenuItem::setAction):
2187         (WebCore::ContextMenuItem::platformSubMenu):
2188         (WebCore::ContextMenuItem::setSubMenu):
2189         (WebCore::ContextMenuItem::setChecked):
2190
2191 2008-01-03  Dan Bernstein  <mitz@apple.com>
2192
2193         Rubber-stamped by Adam Roben.
2194
2195         - update the project hierarchy to match the on-disk organization of
2196           the platform directory.
2197
2198         * WebCore.vcproj/WebCore.vcproj:
2199
2200 2008-01-03  Adam Roben  <aroben@apple.com>
2201
2202         Fix a buffer overrun and a leak introduced in r29098
2203
2204         Reviewed by Mark.
2205
2206         * platform/text/StringImpl.cpp:
2207         (WebCore::StringImpl::StringImpl): Only allocate one buffer, and make
2208         it be big enough to hold the string contents plus the null terminator.
2209
2210 2008-01-03  Simon Hausmann  <hausmann@webkit.org>
2211
2212         Reviewed by Lars.
2213
2214         Added the first revision of QWebView and started moving functionality from QWebPave over to QWebView and QWebFrame.
2215
2216         * WebCore.pro:
2217
2218 2008-01-03  Alp Toker  <alp@atoker.com>
2219
2220         Suggested by Mark Rowe.
2221
2222         Fix indentation and remove trailing whitespace.
2223
2224         * platform/network/curl/ResourceHandleManager.cpp:
2225
2226 2008-01-03  Luca Bruno  <lethalman88@gmail.com>
2227
2228         Reviewed by Alp Toker.
2229
2230         Fix HTTP POST-based logins to sites like Facebook, GMail by ensuring
2231         that the two POST methods don't conflict.
2232
2233         * platform/network/curl/ResourceHandleManager.cpp:
2234         (WebCore::ResourceHandleManager::setupPOST):
2235
2236 2008-01-02  Darin Adler  <darin@apple.com>
2237
2238         - touched some files to try to get the Windows buildbot building again
2239
2240 2008-01-02  Dan Bernstein  <mitz@apple.com>
2241
2242         Reviewed by Sam Weinig.
2243
2244         - fix small caps rendering
2245
2246         Covered by an existing test.
2247
2248         * platform/graphics/win/FontDataWin.cpp:
2249         (WebCore::FontData::smallCapsFontData):
2250
2251 2008-01-02  Antti Koivisto  <antti@apple.com>
2252
2253         Reviewed by Oliver.
2254
2255         Calculate video position and size within the renderer box in WebCore. This
2256         way the aspect ratio calculation is not needed in each MediaPlayer implementation.
2257         
2258         This fixes video aspect ratio on Windows.
2259         
2260         Covered by an existing pixel test.
2261
2262         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2263         (WebCore::MediaPlayerPrivate::createQTMovieView):
2264         * rendering/RenderVideo.cpp:
2265         (WebCore::RenderVideo::videoBox):
2266         (WebCore::RenderVideo::paintReplaced):
2267         (WebCore::RenderVideo::updatePlayer):
2268         * rendering/RenderVideo.h:
2269
2270 2008-01-02  Ada Chan  <adachan@apple.com>
2271
2272         Fix windows build.
2273
2274         * WebCore.vcproj/WebCore.vcproj:
2275
2276 2008-01-02  John Sullivan  <sullivan@apple.com>
2277
2278         Reviewed by Dan Bernstein
2279         
2280         - fixed <rdar://problem/5579010> REGRESSION: Safari inserts newlines in tab names when U+2028 is present
2281
2282         * loader/DocumentLoader.cpp:
2283         (WebCore::canonicalizedTitle):
2284         in the code that replaces control characters with white space, also replace the unicode line separator
2285         and paragraph separator characters
2286
2287 2008-01-02  Darin Adler  <darin@apple.com>
2288
2289         - fix buffer overruns seen on buildbot
2290
2291         * platform/text/StringImpl.cpp:
2292         (WebCore::countCharacter): Added this.
2293         (WebCore::StringImpl::toCoordsArray): Use countCharacter instead of incorrect find expression.
2294         (WebCore::StringImpl::toLengthArray): Ditto.
2295         (WebCore::StringImpl::replace): Added assertions.
2296
2297 2008-01-02  Darin Adler  <darin@apple.com>
2298
2299         Reviewed by Maciej.
2300
2301         - fix http://bugs.webkit.org/show_bug.cgi?id=16657
2302           Acid3 failure since table.caption and table.thead do not work for nodes added by appendChild
2303         - fix http://bugs.webkit.org/show_bug.cgi?id=16659
2304           Acid3 expects HTMLTableElement.rows to include a <tr> element that is an immediate child of the <table>
2305
2306         Tests: dom/html/level2/html/HTMLCollection07.html
2307                dom/html/level2/html/HTMLCollection08.html
2308                dom/html/level2/xhtml/HTMLCollection07.xhtml
2309                dom/html/level2/xhtml/HTMLCollection08.xhtml
2310                fast/dom/HTMLTableElement/early-acid3-65-excerpt.html
2311                fast/dom/HTMLTableElement/early-acid3-66-excerpt.html
2312
2313         * GNUmakefile.am: Added HTMLTableRowsCollection.
2314         * WebCore.pro: Ditto.
2315         * WebCore.vcproj/WebCore.vcproj: Ditto.
2316         * WebCore.xcodeproj/project.pbxproj: Ditto.
2317         * WebCoreSources.bkl: Ditto.
2318
2319         * dom/XMLTokenizer.cpp: Took out stray include.
2320
2321         * html/HTMLCollection.cpp:
2322         (WebCore::HTMLCollection::itemAfter): Removed all the table rows code, since we now use
2323         a separate class for that collection. Also got rid of the distinct types for custom collections
2324         that don't need them (use Other for both).
2325         * html/HTMLCollection.h: Also made firstItem non-virtual because it doesn't need to be virtual.
2326
2327         * html/HTMLFormCollection.cpp:
2328         (WebCore::HTMLFormCollection::HTMLFormCollection): Use Other instead of FormElements
2329         for the HTMLCollection type.
2330
2331         * html/HTMLTableElement.cpp:
2332         (WebCore::HTMLTableElement::HTMLTableElement): Eliminated m_head, m_foot, m_firstBody, and m_caption.
2333         (WebCore::HTMLTableElement::caption): Added non-inline version. Finds the caption rather than
2334         keeping a pointer to it.
2335         (WebCore::HTMLTableElement::setCaption): Rewrote.
2336         (WebCore::HTMLTableElement::tHead): Ditto.
2337         (WebCore::HTMLTableElement::setTHead): Ditto.
2338         (WebCore::HTMLTableElement::tFoot): Ditto.
2339         (WebCore::HTMLTableElement::setTFoot): Ditto.
2340         (WebCore::HTMLTableElement::createTHead): Ditto.
2341         (WebCore::HTMLTableElement::deleteTHead): Ditto.
2342         (WebCore::HTMLTableElement::createTFoot): Ditto.
2343         (WebCore::HTMLTableElement::deleteTFoot): Ditto.
2344         (WebCore::HTMLTableElement::createCaption): Ditto.
2345         (WebCore::HTMLTableElement::deleteCaption): Ditto.
2346         (WebCore::HTMLTableElement::lastBody): Added.
2347         (WebCore::HTMLTableElement::insertRow): Rewrote to use a loop based on code in HTMLTableRowsCollection.
2348         This is different from the old code mainly in how it handles rows outside any section.
2349         (WebCore::HTMLTableElement::deleteRow): Ditto.
2350         (WebCore::HTMLTableElement::addChild): Removed code to set the various members. Keeping pointers to
2351         these was a possible source of serious bugs too, including crashes with stale pointers, although I
2352         didn't write any test cases to prove those bugs existed.
2353         (WebCore::HTMLTableElement::parseMappedAttribute): Changed the rules code to visit all cells, not
2354         just the cells of the first body. I believe this fixed rendering on some table tests. I think the code
2355         visits too many cells and also the use of recursion is overkill, but I didn't try to fix that.
2356         (WebCore::HTMLTableElement::rows): Changed to use the new HTMLTableRowsCollection.
2357         * html/HTMLTableElement.h: Changed functions to return PassRefPtr, which can be important if strange
2358         things like DOM mutation events take things ot of the tree before they are safely referenced by
2359         JavaScript wrappers. Also changed functions to take PassRefPtr and added exceptions. Removed unneeded
2360         firstTBody and setTBody functions and childrenChanged function override, as well as unused Rules and
2361         Frame enums. Removed m_head, m_foot, m_firstBody, and m_caption, and added lastBody function. Removed
2362         unneeded friend declaration for HTMLTableCellElement.
2363         * html/HTMLTableElement.idl: Allow the setteres for caption, tHead, and tFoot to raise exceptions.
2364
2365         * html/HTMLTableRowsCollection.cpp: Added. Implements the HTML 5 rule for which rows are in the
2366         collection in which order.
2367         * html/HTMLTableRowsCollection.h: Added.
2368
2369         * loader/FTPDirectoryDocument.cpp:
2370         (WebCore::FTPDirectoryTokenizer::appendEntry): Use the standard insertRow function instead of
2371         coming up with our own way of inserting a row. Simplifies things -- we can remove the code to
2372         create a tbody element.
2373
2374 2008-01-02  Darin Adler  <darin@apple.com>
2375
2376         Reviewed by Alice and Tim.
2377
2378         - try to fix GTK and Qt builds
2379
2380         * platform/win/ScrollViewWin.cpp:
2381         (WebCore::ScrollView::scroll): Improve logic slightly for the case of
2382         vertical scrolling when there's no vertical scroll bar.
2383
2384         * platform/gtk/ScrollViewGtk.cpp:
2385         (WebCore::ScrollView::scroll): Copy the code from Windows. Maybe this
2386         should be factored differently.
2387         * platform/qt/ScrollViewQt.cpp:
2388         (WebCore::ScrollView::scroll): Ditto.
2389
2390 2008-01-02  Darin Adler  <darin@apple.com>
2391
2392         Reviewed by Anders.
2393
2394         - http://bugs.webkit.org/show_bug.cgi?id=16712
2395           change StringImpl to take and return PassRefPtr instead of raw pointers
2396
2397         Also eliminated use of const StringImpl. Since StringImpl is immutable there
2398         is no distinction between a const and non-const one at the moment.
2399
2400         * WebCore.base.exp: Updated.
2401
2402         * css/CSSHelper.cpp:
2403         (WebCore::parseURL): Make String directly, not by making a StringImpl.
2404         * dom/Attr.cpp:
2405         (WebCore::Attr::createTextChild): Convert AtomicString to String with domString,
2406         not via StringImpl.
2407         (WebCore::Attr::setValue): Remove unneed call to impl() when passing a String
2408         to a function that takes a String.
2409
2410         * dom/CDATASection.cpp: Removed unused constructor.
2411         (WebCore::CDATASection::cloneNode): Added a now-needed .get().
2412         (WebCore::CDATASection::createNew): Changed function to take a PassRefPtr.
2413         * dom/CDATASection.h:
2414
2415         * dom/CharacterData.cpp:
2416         (WebCore::CharacterData::CharacterData): Removed unneeded initialization and
2417         ref() now that the string is a RefPtr. Also updated to not call "new StringImpl".
2418         (WebCore::CharacterData::~CharacterData): Removed unneeded deref() since it's
2419         a RefPtr.
2420         (WebCore::CharacterData::setData): More of that.
2421         (WebCore::CharacterData::substringData): Ditto.
2422         (WebCore::CharacterData::appendData): Ditto.
2423         (WebCore::CharacterData::insertData): Ditto.
2424         (WebCore::CharacterData::deleteData): Ditto.
2425         (WebCore::CharacterData::replaceData): Ditto.
2426         (WebCore::CharacterData::nodeValue): Ditto.
2427         (WebCore::CharacterData::dispatchModifiedEvent): Ditto.
2428         (WebCore::CharacterData::dump): Ditto.
2429         * dom/CharacterData.h: Changed to use a RefPtr. I could have used a String
2430         instead, but since String adds extra branches to handle 0, I figured it was
2431         more conservative to just use RefPtr. Later it would be good to figure out
2432         which is preferred style and be more consistent. Maybe we'll phase out
2433         StringImpl, or maybe we'll go the other way and use it more since it can be
2434         more efficient.
2435
2436         * dom/DOMImplementation.cpp:
2437         (WebCore::addString): Changed set to use String rather than StringImpl.
2438         (WebCore::isSVG10Feature): Ditto.
2439         (WebCore::isSVG11Feature): Ditto.
2440         (WebCore::DOMImplementation::createDocument): Replaced custom code to
2441         find a colon with a call to String::find.
2442
2443         * dom/Range.cpp:
2444         (WebCore::Range::insertNode): Updated since the result of splitText is now
2445         a PassRefPtr.
2446
2447         * dom/Text.cpp:
2448         (WebCore::Text::splitText): Updated since str is now a RefPtr. Also made the
2449         result of this function be a PassRefPtr.
2450         (WebCore::Text::createRenderer): Ditto.
2451         (WebCore::Text::createNew): Made the parameter and result both be PassRefPtr.
2452         * dom/Text.h:
2453
2454         * html/HTMLElement.cpp:
2455         (WebCore::HTMLElement::nodeName): Use String::upper.
2456
2457         * html/HTMLInputElement.cpp:
2458         (WebCore::numGraphemeClusters): Remove now-unneeded const.
2459         (WebCore::numCharactersInGraphemeClusters): Ditto.
2460
2461         * html/HTMLTokenizer.cpp:
2462         (WebCore::HTMLTokenizer::processToken): Updated for function name change.
2463
2464         * platform/text/AtomicString.cpp:
2465         (WebCore::CStringTranslator::translate): Updated since there is no longer
2466         a constructor that takes a string.
2467
2468         * platform/text/PlatformString.h: Added new constructors that take
2469         PassRefPtr and RefPtr. Removed misleading comment.
2470
2471         * platform/text/String.cpp:
2472         (WebCore::String::String): Changed to use StringImpl::create, which handles
2473         the empty string automatically.
2474         (WebCore::String::append): Ditto.
2475         (WebCore::String::charactersWithNullTermination): Similar.
2476         (WebCore::String::format): Ditto.
2477
2478         * platform/text/StringHash.h: Took out unneeded const.
2479
2480         * platform/text/StringImpl.cpp:
2481         (WebCore::deleteUCharVector): Changed to take a const pointer since the
2482         buffers are now const UChar buffers.
2483         (WebCore::StringImpl::StringImpl): Removed some constructors. Got rid of the
2484         separate init functions. The constructors are now private and used only in
2485         the create functions and one or two other places.
2486         (WebCore::StringImpl::containsOnlyWhitespace): Removed now-meaningless const.
2487         (WebCore::StringImpl::substring): Ditto. Also changed return value to be a
2488         PassRefPtr.
2489         (WebCore::StringImpl::characterStartingAt): Ditto.
2490         (WebCore::StringImpl::toLength): Ditto.
2491         (WebCore::StringImpl::toCoordsArray): Ditto.
2492         (WebCore::StringImpl::toLengthArray): Ditto.
2493         (WebCore::StringImpl::isLower): Ditto.
2494         (WebCore::StringImpl::lower): Ditto. Changed to use Vector and adopt so we
2495         don't have to use new directly here. Makes empty string handling more consistent.
2496         (WebCore::StringImpl::upper): Ditto.
2497         (WebCore::StringImpl::secure): Ditto.
2498         (WebCore::StringImpl::foldCase): Ditto.
2499         (WebCore::StringImpl::stripWhiteSpace): Ditto.
2500         (WebCore::StringImpl::simplifyWhiteSpace): Ditto.
2501         (WebCore::StringImpl::capitalize): Ditto.
2502         (WebCore::StringImpl::toInt): Removed now-meaningless const.
2503         (WebCore::StringImpl::toInt64): Ditto.
2504         (WebCore::StringImpl::toUInt64): Ditto.
2505         (WebCore::StringImpl::toDouble): Ditto.
2506         (WebCore::StringImpl::toFloat): Ditto.
2507         (WebCore::StringImpl::find): Ditto.
2508         (WebCore::StringImpl::reverseFind): Ditto.
2509         (WebCore::StringImpl::endsWith): Ditto.
2510         (WebCore::StringImpl::replace): Ditto.
2511         (WebCore::equal): Ditto.
2512         (WebCore::equalIgnoringCase): Ditto.
2513         (WebCore::StringImpl::ascii): Ditto.
2514         (WebCore::StringImpl::defaultWritingDirection): Ditto.
2515         (WebCore::StringImpl::createStrippingNullCharacters): Ditto.
2516         (WebCore::StringImpl::adopt): Added special case so this uses the shared
2517         empty string like other functions. Also optimized the common case where the
2518         vector happens to already have the right size so we don't do a fastRealloc
2519         at all in those cases.
2520         (WebCore::StringImpl::create): Added. These are now the public functions for
2521         creating new StringImpl objects. They all implement the shared empty string.
2522         (WebCore::StringImpl::createWithTerminatingNullCharacter):
2523         * platform/text/StringImpl.h:
2524
2525         * platform/text/cf/StringCF.cpp:
2526         (WebCore::String::String): Use StringImpl::create instead of new StringImpl.
2527         * platform/text/cf/StringImplCF.cpp:
2528         (WebCore::StringImpl::createCFString): Removed now-obsolete const.
2529         * platform/text/mac/StringImplMac.mm:
2530         (WebCore::StringImpl::operator NSString *): Ditto.
2531         * platform/text/mac/StringMac.mm:
2532         (WebCore::String::String): Use StringImpl::create instead of new StringImpl.
2533         * platform/text/qt/StringQt.cpp:
2534         (WebCore::String::String): Ditto.
2535         * platform/text/wx/StringWx.cpp:
2536         (WebCore::String::String): Ditto.
2537         * rendering/RenderBR.cpp:
2538         (WebCore::RenderBR::RenderBR): Ditto.
2539
2540         * rendering/RenderSVGInlineText.cpp:
2541         (WebCore::RenderSVGInlineText::RenderSVGInlineText): Use PassRefPtr.
2542         * rendering/RenderSVGInlineText.h:
2543
2544         * rendering/RenderText.cpp:
2545         (WebCore::charactersAreAllASCII): Removed now-unneeded const.
2546         * rendering/RenderTextFragment.cpp:
2547         (WebCore::RenderTextFragment::originalText): Use RefPtr.
2548
2549 2008-01-02  Timothy Hatcher  <timothy@apple.com>
2550
2551         Reviewed by Oliver Hunt.
2552
2553         <rdar://problem/5618086> WebInspector does not expand the DOM tree after being closed
2554
2555         Closing the Web Inspector causes the DOM tree outline to be torn down, clearing the
2556         internal element lookup tables. The represented DOM node object still holds the identifier
2557         it was assigned, and a later call to findTreeElement will use that original identifier
2558         against a cleared lookup table. In that case we need to fallback on DOM ancestor lookup.
2559
2560         * page/inspector/treeoutline.js:
2561         (TreeOutline.prototype.findTreeElement): If the DOM node already had a __treeElementIdentifier,
2562         but the TreeOutline no longer has the element in the _knownTreeElements list do an ancestor lookup
2563         instead of an early return.
2564
2565 2008-01-02  Alice Liu  <alice.liu@apple.com>
2566
2567         Reviewed by Maciej.
2568
2569         Fixed <rdar://5283861> (problems scrolling in gmail message content area)
2570
2571         * platform/ScrollView.h:
2572         * platform/win/ScrollViewWin.cpp:
2573         (WebCore::ScrollView::scroll):
2574          Changed return value to bool to reflect success of scroll attempt
2575
2576 2008-01-02  Alexey Proskuryakov  <ap@webkit.org>
2577
2578         Fixed a typo (pointed out in review, but I somehow missed it at first).
2579
2580         * editing/EditorCommand.cpp: (WebCore::executeDelete):
2581
2582 2008-01-02  Alexey Proskuryakov  <ap@webkit.org>
2583
2584         Reviewed by Darin.
2585
2586         Resolved several FIXMEs in EditorCommand.
2587         Made recently added commands hidden from JS again.
2588         Removed BackwardDelete implementation, which used to be dead code, but got exposed now.
2589
2590         Tests: editing/execCommand/delete-no-scroll.html
2591                editing/execCommand/forward-delete-no-scroll.html
2592                editing/execCommand/insert-line-break-no-scroll.html
2593
2594         * editing/EditorCommand.cpp:
2595         (WebCore::executeDelete):
2596         (WebCore::executeForwardDelete):
2597         (WebCore::executeInsertLineBreak):
2598         (WebCore::supportedFromMenuOrKeyBinding):
2599         (WebCore::CommandEntry::):
2600
2601 2008-01-02  Alexey Proskuryakov  <ap@webkit.org>
2602
2603         Reviewed by Darin.
2604
2605         http://bugs.webkit.org/show_bug.cgi?id=14555
2606         action=mailto + method=get - The generated mailto URI is incorrect and the hvalues are encoded twice
2607
2608         http://bugs.webkit.org/show_bug.cgi?id=14774
2609         Submitted data only includes first input item
2610
2611         Reworked encoding of mailto URLs to match other browsers.
2612         Moved most of related logic from FrameLoader::submitForm() to HTMLFormElement::submit().
2613
2614         Tests: fast/forms/mailto/advanced-get.html
2615                fast/forms/mailto/advanced-put.html
2616                fast/forms/mailto/get-multiple-items-text-plain.html
2617                fast/forms/mailto/get-multiple-items-x-www-form-urlencoded.html
2618                fast/forms/mailto/get-multiple-items.html
2619                fast/forms/mailto/get-non-ascii.html
2620                fast/forms/mailto/get-non-ascii-text-plain.html
2621                fast/forms/mailto/get-overwrite-query.html
2622                fast/forms/mailto/post-append-query.html
2623                fast/forms/mailto/post-multiple-items-multipart-form-data.html
2624                fast/forms/mailto/post-multiple-items-text-plain.html
2625                fast/forms/mailto/post-multiple-items-x-www-form-urlencoded.html
2626                fast/forms/mailto/post-multiple-items.html
2627
2628         * html/HTMLFormElement.cpp:
2629         (WebCore::HTMLFormElement::submit):
2630         * loader/FrameLoader.cpp:
2631         (WebCore::FrameLoader::submitForm):
2632
2633 2008-01-02  Mark Rowe  <mrowe@apple.com>
2634
2635         Autotools build fix.
2636
2637         * GNUmakefile.am: Remove files before generating them, not after.
2638
2639 2008-01-02  Mark Rowe  <mrowe@apple.com>
2640
2641         Rubber-stamped by Alp Toker.
2642
2643         Add missing dependencies to some GNUmakefile.am rules.
2644
2645         * GNUmakefile.am:
2646
2647 2008-01-02  Mark Rowe  <mrowe@apple.com>
2648
2649         Reviewed by Alp Toker.
2650
2651         Autotools build fix.  Make can expand $@ to any of the targets for the rule,
2652         while we always want to use the name of the .cpp file as the output file.
2653
2654         * GNUmakefile.am:
2655
2656 2008-01-02  Luca Bruno  <lethalman88@gmail.com>
2657
2658         Reviewed by Alp Toker.
2659
2660         http://bugs.webkit.org/show_bug.cgi?id=16115
2661         [GTK] ContextMenu and ContextMenuItem lacks an implementation
2662
2663         Add context menu support.
2664
2665         Based on a patch by Holger Freyther.
2666
2667         * platform/gtk/ContextMenuGtk.cpp:
2668         (WebCore::menuItemActivated):
2669         (WebCore::ContextMenu::ContextMenu):
2670         (WebCore::ContextMenu::~ContextMenu):
2671         (WebCore::ContextMenu::appendItem):
2672         (WebCore::ContextMenu::setPlatformDescription):
2673         (WebCore::ContextMenu::releasePlatformDescription):
2674         * platform/gtk/ContextMenuItemGtk.cpp:
2675         (WebCore::ContextMenuItem::ContextMenuItem):
2676         (WebCore::ContextMenuItem::~ContextMenuItem):
2677         (WebCore::ContextMenuItem::releasePlatformDescription):
2678         (WebCore::ContextMenuItem::type):
2679         (WebCore::ContextMenuItem::action):
2680         (WebCore::ContextMenuItem::setAction):
2681         (WebCore::ContextMenuItem::platformSubMenu):
2682         (WebCore::ContextMenuItem::setSubMenu):
2683         (WebCore::ContextMenuItem::setChecked):
2684         (WebCore::ContextMenuItem::setEnabled):
2685
2686 2008-01-02  Alp Toker  <alp@atoker.com>
2687
2688         GTK+ autotools build fix. Track changes in r29073.
2689
2690         * GNUmakefile.am:
2691
2692 2008-01-01  Darin Adler  <darin@apple.com>
2693
2694         - fix release build
2695
2696         * bindings/js/kjs_binding.cpp:
2697         (KJS::setDOMException): Initialize to avoid uninitialized variable warning.
2698         Removed default so we get a warning if there's a missing case.
2699
2700 2008-01-01  David D. Kilzer  <ddkilzer@webkit.org>
2701
2702         Scripting MIME Types application/ecmascript, application/javascript not viewable
2703         <http://bugs.webkit.org/show_bug.cgi?id=11063>
2704
2705         Reviewed by Darin.
2706
2707         This patch consolidates the list of acceptable MIME types for JavaScript
2708         source into the MIMETypeRegistry class, and replaces checks for these
2709         types with a call to MIMETypeRegistry::isSupportedJavaScriptMIMEType().
2710
2711         No tests added since viewing JavaScript source is not testable.
2712
2713         * dom/DOMImplementation.cpp:
2714         (WebCore::DOMImplementation::isTextMIMEType): Use
2715         MIMETypeRegistry::isSupportedJavaScriptMIMEType() instead of a single
2716         hard-coded MIME type, "application/x-javascript".
2717
2718         * html/HTMLScriptElement.cpp:
2719         (WebCore::HTMLScriptElement::shouldExecuteAsJavaScript): Moved list of
2720         JavaScript MIME types from here to
2721         MIMETypeRegistry::initialiseSupportedJavaScriptMIMETypes().
2722
2723         * platform/MIMETypeRegistry.cpp:
2724         (WebCore::initialiseSupportedJavaScriptMIMETypes): Added. List of
2725         MIME types came from HTMLScriptElement::shouldExecuteAsJavaScript().
2726         (WebCore::initialiseSupportedNonImageMimeTypes): Remove single
2727         hard-coded MIME type, "application/x-javascript", from the list.
2728         (WebCore::initialiseMIMETypeRegistry): Initialise
2729         supportedJavaScriptMIMETypes, then pre-populate supportedNonImageMIMETypes
2730         with values in supportedJavaScriptMIMETypes.
2731         (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType): Added.
2732
2733         * platform/MIMETypeRegistry.h: Added isSupportedJavaScriptMIMEType().
2734
2735 2008-01-01  Sam Weinig  <sam@webkit.org>
2736
2737         Reviewed by Darin.
2738
2739         Patch for http://bugs.webkit.org/show_bug.cgi?id=16691
2740         Use real JS objects for the rest of the DOMExceptions (EventException, RangeException, etc)
2741
2742         - Create JS objects for all the different types of exceptions, each with there own prototype and constructor.
2743         - Abstract all the logic and storage for exception classes in to an ExceptionBase class.
2744         - Move specialized ExceptionCodes into the exception classes. (ie. the EventExceptionCode enum is now in EventException).
2745
2746         Tests: fast/dom/DOMException/EventException.html
2747                fast/dom/DOMException/RangeException.html
2748                fast/dom/DOMException/XPathException.html
2749                http/tests/xmlhttprequest/XMLHttpRequestException.html
2750                svg/custom/SVGException.html
2751
2752         * DerivedSources.make:
2753         * WebCore.pro:
2754         * WebCore.vcproj/WebCore.vcproj:
2755         * WebCore.xcodeproj/project.pbxproj:
2756         * WebCoreSources.bkl:
2757         * bindings/js/JSSVGMatrixCustom.cpp:
2758         (WebCore::JSSVGMatrix::inverse):
2759         (WebCore::JSSVGMatrix::rotateFromVector):
2760         * bindings/js/kjs_binding.cpp:
2761         (KJS::setDOMException):
2762         * bindings/scripts/CodeGeneratorJS.pm: Use the constant values defined
2763         in the IDL as the ObjC bindings do.
2764         * bindings/scripts/CodeGeneratorObjC.pm:
2765         * dom/DOMCoreException.cpp: Removed.
2766         * dom/DOMCoreException.h:
2767         (WebCore::DOMCoreException::DOMCoreException):
2768         * dom/DOMCoreException.idl:
2769         * dom/Event.h:
2770         * dom/EventException.h: Copied from WebCore/dom/DOMCoreException.h.
2771         (WebCore::EventException::EventException):
2772         (WebCore::EventException::):
2773         * dom/EventException.idl: Copied from WebCore/dom/DOMCoreException.idl.
2774         * dom/EventTargetNode.cpp:
2775         (WebCore::EventTargetNode::dispatchEvent):
2776         * dom/ExceptionBase.cpp: Copied from WebCore/dom/DOMCoreException.cpp.
2777         (WebCore::ExceptionBase::ExceptionBase):
2778         (WebCore::ExceptionBase::toString):
2779         * dom/ExceptionBase.h: Copied from WebCore/dom/DOMCoreException.h.
2780         (WebCore::ExceptionBase::code):
2781         * dom/ExceptionCode.cpp:
2782         (WebCore::getExceptionCodeDescription):
2783         * dom/ExceptionCode.h:
2784         (WebCore::):
2785         * dom/Range.cpp:
2786         (WebCore::Range::insertNode):
2787         (WebCore::Range::checkNodeWOffset):
2788         (WebCore::Range::checkNodeBA):
2789         (WebCore::Range::selectNode):
2790         (WebCore::Range::selectNodeContents):
2791         (WebCore::Range::surroundContents):
2792         * dom/RangeException.h:
2793         (WebCore::RangeException::RangeException):
2794         (WebCore::RangeException::):
2795         * dom/RangeException.idl:
2796         * page/DOMWindow.idl:
2797         * svg/SVGColor.cpp:
2798         (WebCore::SVGColor::setRGBColor):
2799         * svg/SVGException.h:
2800         (WebCore::SVGException::SVGException):
2801         (WebCore::SVGException::):
2802         * svg/SVGException.idl:
2803         * svg/SVGLocatable.cpp:
2804         (WebCore::SVGLocatable::getTransformToElement):
2805         * xml/XMLHttpRequest.cpp:
2806         (WebCore::XMLHttpRequest::dispatchEvent):
2807         (WebCore::XMLHttpRequest::open):
2808         (WebCore::XMLHttpRequest::send):
2809         * xml/XMLHttpRequest.h:
2810         * xml/XMLHttpRequestException.h: Copied from WebCore/dom/DOMCoreException.h.
2811         (WebCore::XMLHttpRequestException::XMLHttpRequestException):
2812         (WebCore::XMLHttpRequestException::):
2813         * xml/XMLHttpRequestException.idl: Copied from WebCore/dom/DOMCoreException.idl.
2814         * xml/XPathEvaluator.h:
2815         * xml/XPathException.h: Copied from WebCore/dom/DOMCoreException.h.
2816         (WebCore::XPathException::XPathException):
2817         (WebCore::XPathException::):
2818         * xml/XPathException.idl: Copied from WebCore/dom/DOMCoreException.idl.
2819         * xml/XPathParser.cpp:
2820         (WebCore::XPath::Parser::parseStatement):
2821         * xml/XPathResult.cpp:
2822         (WebCore::XPathResult::convertTo):
2823         (WebCore::XPathResult::numberValue):
2824         (WebCore::XPathResult::stringValue):
2825         (WebCore::XPathResult::booleanValue):
2826         (WebCore::XPathResult::singleNodeValue):
2827         (WebCore::XPathResult::snapshotLength):
2828         (WebCore::XPathResult::iterateNext):
2829         (WebCore::XPathResult::snapshotItem):
2830
2831 2008-01-01  Sam Weinig  <sam@webkit.org>
2832
2833         Remove JSDomExceptionConstructor.lut.h from clean step
2834         as it no longer exists.
2835
2836         * GNUmakefile.am:
2837
2838 2008-01-01  Dan Bernstein  <mitz@apple.com>
2839
2840         - Windows build fix
2841
2842         * WebCore.vcproj/WebCore.vcproj:
2843
2844 2008-01-01  Sam Weinig  <sam@webkit.org>
2845
2846         Try again to fix the builds
2847
2848         * DerivedSources.make:
2849
2850 2008-01-01  Sam Weinig  <sam@webkit.org>
2851
2852         Fix non-mac builds.
2853
2854         * WebCore.pro:
2855         * WebCore.vcproj/WebCore.vcproj:
2856         * WebCoreSources.bkl:
2857
2858 2008-01-01  Eric Seidel  <eric@webkit.org>
2859
2860         Reviewed by Alexey.
2861
2862         Don't replace \ with / in data: urls
2863         http://bugs.webkit.org/show_bug.cgi?id=16692
2864
2865         Test: fast/loader/url-data-replace-backslash.html
2866
2867         * platform/KURL.cpp:
2868         (WebCore::KURL::init):
2869
2870 2008-01-01  Alp Toker  <alp@atoker.com>
2871
2872         GTK+ autotools build fix. Track changes in r29051, r29058 and pass the
2873         correct parameter to AM_INIT_AUTOMAKE.
2874
2875         * GNUmakefile.am:
2876
2877 2007-12-31  Sam Weinig  <sam@webkit.org>
2878
2879         Reviewed by Darin.
2880
2881         Patch for http://bugs.webkit.org/show_bug.cgi?id=16637
2882         Acid3 expects ExeceptionCode constants to be defined on DOMException objects
2883
2884         - Make DOMException a real JS object.
2885
2886         Test: fast/dom/DOMException/prototype-object.html
2887
2888         * DerivedSources.make:
2889         * WebCore.xcodeproj/project.pbxproj:
2890
2891         This is no longer needed as the autogenerated classes now includes the
2892         constructor.
2893         * bindings/js/JSDOMExceptionConstructor.cpp: Removed.
2894         * bindings/js/JSDOMExceptionConstructor.h: Removed.
2895
2896         Create on demand and use the new class for DOMExceptions.
2897         * bindings/js/kjs_binding.cpp:
2898         (KJS::setDOMException):
2899
2900         Remove no longer needed custom constructor getter.
2901         * bindings/js/kjs_window.cpp:
2902         (KJS::Window::getValueProperty):
2903
2904         Don't expose DOMCoreException as the name of class by special casing
2905         the user visible class name to be DOMException.
2906         * bindings/scripts/CodeGeneratorJS.pm:
2907
2908         The DOMException class/file needs to be named DOMCoreException because there is
2909         name conflict with one of the Objective-C bindings classes.  It should be renamed
2910         to DOMException when the Objective-C bindings are moved into WebKit.
2911         * dom/DOMCoreException.cpp: Added.
2912         (WebCore::DOMCoreException::DOMCoreException):
2913         (WebCore::DOMCoreException::toString):
2914         * dom/DOMCoreException.h: Added.
2915         (WebCore::DOMCoreException::):
2916         (WebCore::DOMCoreException::code):
2917         (WebCore::DOMCoreException::name):
2918         (WebCore::DOMCoreException::message):
2919         * dom/DOMCoreException.idl: Added.
2920         * page/DOMWindow.idl:
2921
2922 2007-12-31  Sam Weinig  <sam@webkit.org>
2923
2924         Re-enable querySelector and querySelectorAll and touch the necessary files to not
2925         kill the windows build.
2926
2927         * WebCore.vcproj/build-generated-files.sh:
2928         * bindings/scripts/CodeGeneratorCOM.pm:
2929         * dom/Document.idl:
2930         * dom/Element.idl:
2931
2932 2007-12-31  Darin Adler  <darin@apple.com>
2933
2934         - fix Windows build
2935
2936         * dom/Document.idl: Temporarily disable querySelector and querySelectorAll, since they are showing
2937         up as pure virtual functions. Sam can fix this later.
2938         * dom/Element.idl: Ditto.
2939
2940 2007-12-31  Dan Bernstein  <mitz@apple.com>
2941
2942         Reviewed by Darin Adler.
2943
2944         - fix http://bugs.webkit.org/show_bug.cgi?id=14134
2945           <rdar://problem/5655160> REGRESSION (r25353): Whitespace nodes ignored between inline list items
2946
2947         Test: fast/dynamic/create-renderer-for-whitespace-only-text.html
2948
2949         * dom/Node.cpp:
2950         (WebCore::Node::attach): Added code to check if this node's renderer
2951         has become the "previous renderer" of any sibling text node, and if so,
2952         ensure that that node gets a renderer if it now needs one.
2953         (WebCore::Node::createRendererIfNeeded): Removed the assertion that the
2954         node is not attached.
2955
2956 2007-12-31  Darin Adler  <darin@apple.com>
2957
2958         Reviewed by Mitz.
2959
2960         - fix http://bugs.webkit.org/show_bug.cgi?id=16641
2961           Acid3 reveals HTMLFormElement.elements fails to update when element name changes
2962
2963         Test: fast/dom/HTMLFormElement/elements-not-in-document.html
2964
2965         This was a bug specific to forms that are not in the document tree.
2966         The fix was to change the code to increment the document version number to match
2967         up with other document change tracking. Maybe at some point we can clean these up
2968         so we don't have so many competing change notification systems.
2969
2970         * dom/ContainerNode.cpp:
2971         (WebCore::ContainerNode::replaceChild): Removed bogus comment.
2972         (WebCore::ContainerNode::addChild): Added an explicit incDOMTreeVersion
2973         call here, since this code path bypasses the subtree-modified event code.
2974
2975         * dom/Element.cpp:
2976         (WebCore::Element::setAttribute): Remove the inDocument() check -- not all HTML
2977         collections are for things in the document.
2978         (WebCore::Element::setAttributeMap): Ditto.
2979
2980         * dom/EventTargetNode.cpp:
2981         (WebCore::EventTargetNode::dispatchSubtreeModifiedEvent): Added a call to
2982         incDOMTreeVersion here; covers most cases of tree structure changes.
2983
2984         * dom/Node.cpp:
2985         (WebCore::Node::attach): Remove call to incDOMTreeVersion -- creating a renderer
2986         has nothing to do with changes to the DOM tree!
2987         (WebCore::Node::detach): Ditto.
2988
2989         * html/HTMLFormElement.cpp:
2990         (WebCore::HTMLFormElement::registerFormElement): Remove call to incDOMTreeVersion.
2991         This is handled at a lower level and doesn't need to be here.
2992         (WebCore::HTMLFormElement::removeFormElement): Ditto.
2993
2994 2007-12-31  Henry Mason  <hmason@mac.com>
2995
2996         Reviewed by Darin.
2997
2998         Patch for http://bugs.webkit.org/show_bug.cgi?id=14994
2999         Support for MessageEvent and cross-domain messaging
3000
3001         Test: http/tests/messaging/cross-domain-message-send.html
3002
3003         * DerivedSources.make:
3004         * WebCore.pro:
3005         * WebCore.vcproj/WebCore.vcproj:
3006         * WebCore.xcodeproj/project.pbxproj:
3007         * WebCoreSources.bkl:
3008         * bindings/js/JSDOMWindowCustom.cpp:
3009         (WebCore::JSDOMWindow::customGetOwnPropertySlot): Allow cross-domain access to the
3010         postMessage function.
3011         (WebCore::JSDOMWindow::postMessage):
3012         * bindings/js/JSEventCustom.cpp:
3013         (WebCore::toJS):
3014         * dom/Event.cpp:
3015         (WebCore::Event::isMessageEvent):
3016         * dom/Event.h:
3017         * dom/EventNames.h: New event name
3018         * dom/MessageEvent.cpp: Added.
3019         * dom/MessageEvent.h: Added.
3020         * dom/MessageEvent.idl: Added.
3021         * page/DOMWindow.cpp:
3022         (WebCore::DOMWindow::postMessage): Added.
3023         * page/DOMWindow.h:
3024         * page/DOMWindow.idl:
3025
3026 2007-12-31  Darin Adler  <darin@apple.com>
3027
3028         Suggested by Antti.
3029
3030         - turn ENABLE_VIDEO back off for Windows until we can install QuickTime on the build bots
3031
3032         * WebCore.vcproj/WebCore.vcproj: Removed ENABLE_VIDEO.
3033         * WebCore.vcproj/build-generated-files.sh: Ditto.
3034
3035 2007-12-30  Alp Toker  <alp@atoker.com>
3036
3037         Reviewed by Dan Bernstein.
3038
3039         Silence warning.
3040
3041         * dom/NodeList.h:
3042
3043 2007-12-30  Sam Weinig  <sam@webkit.org>
3044
3045         Reviewed by Oliver Hunt.
3046
3047         Fix for http://bugs.webkit.org/show_bug.cgi?id=16387
3048         Variable names can be enumerated across domains
3049         <rdar://problem/5640454>
3050
3051         Test: http/tests/security/cross-frame-access-enumeration.html
3052
3053         * bindings/js/kjs_window.cpp:
3054         (KJS::Window::getPropertyNames): Override method to test same-origin policy.
3055         * bindings/js/kjs_window.h:
3056
3057 2007-12-30  Sam Weinig  <sam@webkit.org>
3058
3059         Reviewed by Oliver Hunt.
3060
3061         Patch for http://bugs.webkit.org/show_bug.cgi?id=10686
3062         event instanceof MouseEvent throws exception
3063
3064         Add JS constructors for all the Event types.
3065
3066         Test: fast/events/event-instanceof.html
3067
3068         * WebCore.xcodeproj/project.pbxproj:
3069         * dom/KeyboardEvent.idl:
3070         * dom/MouseEvent.idl:
3071         * dom/MutationEvent.idl:
3072         * dom/OverflowEvent.idl:
3073         * dom/ProgressEvent.idl:
3074         * dom/TextEvent.idl:
3075         * dom/UIEvent.idl:
3076         * dom/WheelEvent.idl:
3077         * page/DOMWindow.idl:
3078
3079 2007-12-30  David Kilzer  <ddkilzer@webkit.org>
3080
3081         Reviewed by Darin.
3082
3083         - fix http://bugs.webkit.org/show_bug.cgi?id=15359
3084           JPEG image not shown when height is specified as percentage inside a table
3085
3086         The problem occurs when a replaced element (image, canvas, etc.) with
3087         a percent-height attribute is contained by a table cell with an auto-
3088         or percent-height attribute.  If there are no other conditions to cause
3089         the table cell's height to expand, an available height of zero will
3090         always be returned.  In these cases, the intrinsic height of the
3091         replaced element should be used if it is greater than the available
3092         height of the table cell.
3093
3094         Tests: fast/replaced/table-percent-height.html
3095                tables/mozilla/bugs/bug137388-1.html
3096                tables/mozilla/bugs/bug137388-2.html
3097
3098         * rendering/RenderBox.cpp:
3099         (WebCore::RenderBox::calcReplacedHeightUsing):
3100
3101 2007-12-30  Luca Bruno  <lethalman88@gmail.com>
3102
3103         Reviewed by Alp Toker.
3104
3105         http://bugs.webkit.org/show_bug.cgi?id=16099
3106         Crash in CURL for empty POST
3107
3108         We have to set POST even when the data is empty, otherwise cURL will
3109         hang while waiting for a response.
3110
3111         * platform/network/curl/ResourceHandleManager.cpp
3112         (ResourceHandleManager::setupPOST): allow empty POST
3113
3114 2007-12-29  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
3115
3116         Reviewed by Alp Toker.
3117
3118         Move all SVG related stuff inside SVG block. Don't include
3119         SVGNames, SVGElementFactory, and XLinkNames when SVG is not
3120         enabled
3121
3122         * GNUmakefile.am:
3123
3124 2007-12-29  Alexey Proskuryakov  <ap@webkit.org>
3125
3126         Reviewed by Darin.
3127
3128         http://bugs.webkit.org/show_bug.cgi?id=14428
3129         FCKEditor: Images disappear on drag/drop and copy/paste
3130
3131         Test: editing/pasteboard/drag-image-in-about-blank-frame.html
3132
3133         * editing/markup.cpp: (WebCore::createFragmentFromMarkup): Don't use "about:blank" as a
3134         base URL, just like we don't use an empty one.
3135
3136 2007-12-29  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
3137
3138         Reviewed by Alp Toker.
3139
3140         http://bugs.webkit.org/show_bug.cgi?id=16669
3141         autotools update and fixes
3142
3143         Autotools update and database/icon database inclusion guard fixes
3144
3145         * GNUmakefile.am:
3146           - Update autotools config as per -r29012 changes
3147           - Fix CSSGrammar.h/cpp generation (Seo Sanghyeon, sanxiyn)
3148         * dom/Document.cpp:
3149         * loader/icon/IconDatabase.h:
3150         * page/DOMWindow.cpp:
3151         * page/InspectorController.cpp:
3152         * page/Settings.cpp:
3153         * storage/Database.h:
3154           - Remove ENABLE(DATABASE) inclusion guard. Let the includer add the guard instead.
3155
3156 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
3157
3158         Reviewed by Alexey.
3159
3160         Respect horiz-origin-x / horiz-origin-y / vert-origin-x / vert-origin-y properties when drawing SVG Fonts.
3161         (Fixes fonts-elem-05-t.svg in a --svg-fonts build)
3162
3163         * svg/SVGFont.cpp:
3164         (WebCore::Font::drawGlyphsWithSVGFont):
3165
3166 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
3167
3168         Reviewed by Oliver.
3169
3170         Further SVG Font work. Parse all <glyph> attributes, using SVGGlyphElement::buildGlyphIdentifier.
3171         SVGFontElement::collectGlyphs() now uses this method. Per character advance values work well now.
3172
3173         * platform/graphics/FontData.cpp:
3174         (WebCore::SVGFontData::convertEmUnitToPixel): Add helper function.
3175         (WebCore::FontData::ascent):
3176         (WebCore::FontData::descent):
3177         * platform/graphics/FontData.h:
3178         * svg/SVGFont.cpp:
3179         (WebCore::isVerticalWritingMode): Add helper function.
3180         (WebCore::Font::drawGlyphsWithSVGFont):
3181         * svg/SVGFontElement.cpp:
3182         (WebCore::SVGFontElement::collectGlyphs): Simplified implementation - SVGGlyphIdentifier now build by SVGGlyphElement.
3183         * svg/SVGGlyphElement.cpp:
3184         (WebCore::parseArabicForm): Helper function.
3185         (WebCore::parseOrientation): Ditto.
3186         (WebCore::parsePathData): Ditto.
3187         (WebCore::SVGGlyphElement::buildGlyphIdentifier):
3188         * svg/SVGGlyphElement.h:
3189         (WebCore::SVGGlyphElement::rendererIsNeeded):
3190
3191 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
3192
3193         Reviewed by Oliver.
3194
3195         Refactor SVGAnimationElement::parseValues into a generic function parseDelimitedString.
3196         SVGAnimationElement needs to parse semicolon-seperated strings, SVGGlyphElement comma-seperated.
3197
3198         * svg/SVGAnimationElement.cpp:
3199         (WebCore::SVGAnimationElement::parseMappedAttribute):
3200         * svg/SVGParserUtilities.cpp:
3201         (WebCore::parseDelimitedString):
3202         * svg/SVGParserUtilities.h:
3203
3204 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
3205
3206         Reviewed by Maciej.
3207
3208         Add new helper structure SVGFontData - FontData holds this object as OwnPtr.
3209         Store several attribute values there (horiz-adv-x, horiz-origin-x etc..)
3210
3211         To optimize for the common case ('FontData' used for HTML rendering) it feels
3212         better to hold one OwnPtr in FontData, than several floats.
3213
3214         Parse all <font> attributes in SVGFontFaceElement::createFontData.
3215
3216         * platform/graphics/FontData.cpp:
3217         (WebCore::SVGFontData::SVGFontData):
3218         (WebCore::FontData::FontData):
3219         (WebCore::FontData::ascent):
3220         (WebCore::FontData::descent):
3221         * platform/graphics/FontData.h:
3222         (WebCore::FontData::isSVGFont):
3223         (WebCore::FontData::svgFontData):
3224         * svg/SVGFont.cpp:
3225         (WebCore::Font::drawGlyphsWithSVGFont):
3226         * svg/SVGFontElement.cpp:
3227         * svg/SVGFontElement.h:
3228         (WebCore::SVGFontElement::rendererIsNeeded):
3229         * svg/SVGFontFaceElement.cpp:
3230         (WebCore::SVGFontFaceElement::unitsPerEm):
3231         (WebCore::SVGFontFaceElement::createFontData):
3232
3233 2007-12-28  Darin Adler  <darin@apple.com>
3234
3235         - try to fix Windows and WX builds (broken by SVG Fonts check-in)
3236
3237         * platform/graphics/win/FontWin.cpp:
3238         (WebCore::Font::drawGlyphs): Pass font size to FontData::ascent, now that it requires it.
3239         I can't see how it can be right to require the font size for ascent and descent,
3240         but not for other metrics functions in FontData.
3241
3242         * platform/graphics/wx/FontWx.cpp:
3243         (WebCore::Font::drawGlyphs): Pass font size to FontData::ascent and FontData::descent.
3244
3245 2007-12-28  Dan Bernstein  <mitz@apple.com>
3246
3247         Reviewed by Mark Rowe.
3248
3249         - fix http://bugs.webkit.org/show_bug.cgi?id=16650
3250           <rdar://problem/5664872> REGRESSION (r28278-r28314): ATSUI uses LTR writing direction for all text runs
3251
3252         Covered by existing pixel tests.
3253
3254         * platform/graphics/mac/FontMac.mm:
3255         (WebCore::Font::drawComplexText): Corrected to maintain the style
3256         information in the adjusted text run when passing it to
3257         ATSUILayoutParameters. Prior to r28298 the style was passed separately.
3258
3259 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
3260
3261         Build fix, not reviewed.
3262
3263         Add wtf/OwnPtr.h include, to fix --svg-fonts build.
3264
3265         * css/SVGCSSFontFace.h:
3266
3267 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
3268
3269         Reviewed by Eric.
3270
3271         Fixes: http://bugs.webkit.org/show_bug.cgi?id=10649 (WebKit SVG needs SVG Fonts support)
3272
3273         Begin implementation of SVG Fonts module. Basic documents using SVG Fonts already work.
3274         Only local, in-document fonts who declare their glyphs using the <glyph d="..."> path syntax
3275         are supported. (<glyph> containing arbitary SVG content as child elements, not supported yet).
3276
3277         Limited to single char <-> glyph mapping, no ligatures supported yet.
3278         (ie. <glyph unicode='A'/> <glyph unicode='AB'/> - it ignores the 'AB' glyph definition for now)
3279
3280         Mark all SVG Font related classes & usages in ENABLE(SVG_FONTS) blocks.
3281
3282         No layout test changes for a --no-svg-fonts build, heavy changes if enabled. Because a lot of SVG Font
3283         attributes are not processed yet, the rendering looks wrong - hence disabled by default.)
3284
3285         * DerivedSources.make: Add SVGFontElement/SVGGlyphElement/SVGMissingGlyphElement
3286         * WebCore.pro: Updated build system.
3287         * WebCore.vcproj/WebCore.vcproj: Ditto.
3288         * WebCore.xcodeproj/project.pbxproj: Ditto.
3289         * bindings/js/JSSVGElementWrapperFactory.cpp: Add JSSVGFontElement/JSSVGGlyphElement/JSSVGMissingGlyphElement
3290         * bindings/objc/DOM.mm: Ditto (for DOMSVG*).
3291         (WebCore::createElementClassMap):
3292         * bindings/objc/DOMInternal.h: Ditto.
3293         * bindings/objc/DOMSVG.h: Ditto.
3294         * css/CSSFontFace.h: Mark three functions 'virtual', to be overriden by SVGCSSFontFace
3295         * css/CSSFontFaceSrcValue.h: Add functionality to identify as SVG CSS font face source.
3296         (WebCore::CSSFontFaceSrcValue::m_fontFaceElement): Hold a pointer to the font face which created it.
3297         (WebCore::CSSFontFaceSrcValue::svgFontFaceElement):
3298         (WebCore::CSSFontFaceSrcValue::setSVGFontFaceElement):
3299         * css/CSSFontSelector.cpp: Build 'SVGCSSFontFace' objects for local, in-document SVG fonts.
3300         (WebCore::CSSFontSelector::addFontFaceRule):
3301         * css/SVGCSSFontFace.cpp: Added. (Simplified implementation for SVG Fonts)
3302         (WebCore::SVGCSSFontFace::SVGCSSFontFace):
3303         (WebCore::SVGCSSFontFace::~SVGCSSFontFace):
3304         (WebCore::SVGCSSFontFace::isValid):
3305         (WebCore::SVGCSSFontFace::addSource):
3306         (WebCore::SVGCSSFontFace::getFontData):
3307         * css/SVGCSSFontFace.h: Added.
3308         * platform/graphics/cg/PathCG.cpp:
3309         (WebCore::Path::closeSubpath): Silence a CG warning when calling closeSubpath() on empty path.
3310         * platform/graphics/Font.cpp: Add some logic to call into SVG Font code when operating on SVG Fonts.
3311         (WebCore::Font::ascent): Pass font size to FontData::ascent() call
3312         (WebCore::Font::descent): Pass font size to FontData::descent() call
3313         (WebCore::Font::canUseGlyphCache): Always return true for SVG fonts here.
3314         (WebCore::Font::drawGlyphBuffer): Call drawGlyphsWithSVGFont (instead of drawGlyphs) if the primary font is a SVG font.
3315         * platform/graphics/Font.h: Add (SVG-only!) ability to store a RenderObject pointer, to the element which invoked the drawText() call.
3316         (WebCore::TextRun::TextRun):
3317         (WebCore::TextRun::referencingRenderObject):
3318         (WebCore::TextRun::setReferencingRenderObject):
3319         * platform/graphics/FontData.cpp:
3320         (WebCore::FontData::FontData):
3321         (WebCore::FontData::ascent):
3322         (WebCore::FontData::descent):
3323         * platform/graphics/FontData.h: Store a pointer to the SVGFontFaceElement, which created this FontData object - needed for drawGlyphsWithSVGFont().
3324         (WebCore::FontData::isSVGFont): Offer a way to determine wheter this is a FontData object, created by a SVGFontFaceElement.
3325         (WebCore::FontData::svgFontFace):
3326         * rendering/SVGInlineTextBox.cpp:
3327         (WebCore::SVGInlineTextBox::calculateGlyphWidth): Add assertion.
3328         * rendering/SVGRootInlineBox.cpp:
3329         (WebCore::svgTextRunForInlineTextBox): Always call 'setReferencingRenderObject(myRenderSVGText)' on the new TextRun
3330         * svg/SVGFont.cpp: Added.
3331         (WebCore::Font::drawGlyphsWithSVGFont): Outsourced implementation of SVG Fonts into it's own file.
3332         * svg/SVGFontElement.cpp: Added. (Note: this holds the GlyphHashMap which associates certain <glyph> objects with unicode values)
3333         (WebCore::SVGFontElement::SVGFontElement):
3334         (WebCore::SVGFontElement::~SVGFontElement):
3335         (WebCore::SVGFontElement::parseMappedAttribute):
3336         (WebCore::SVGFontElement::collectGlyphs):
3337         (WebCore::SVGFontElement::glyphIdentifierForGlyphCode):
3338         * svg/SVGFontElement.h: Added.
3339         (WebCore::GlyphHash::hash):
3340         (WebCore::GlyphHash::equal):
3341         (WebCore::GlyphHashTraits::deletedValue):
3342         (WebCore::SVGFontElement::rendererIsNeeded):
3343         (WebCore::SVGFontElement::contextElement):
3344         * svg/SVGFontElement.idl: Added.
3345         * svg/SVGFontFaceElement.cpp: Build SVG specific 'FontData' object
3346         (WebCore::SVGFontFaceElement::unitsPerEm):
3347         (WebCore::SVGFontFaceElement::fontFamily):
3348         (WebCore::SVGFontFaceElement::createFontData): Builds SVG specified 'FontData' object with the markup specified ascent/descent values etc..
3349         (WebCore::SVGFontFaceElement::rebuildFontFace): Construct CSSFontFaceSrc object (marked as 'isSVGFontFaceSrc') to satisfy CSSFontSelector::addFontFaceRule.
3350         (WebCore::SVGFontFaceElement::insertedIntoDocument): Rebuild font face.
3351         (WebCore::SVGFontFaceElement::glyphIdentifierForGlyphCode): Allows drawGlyphsWithSVGFont to access the glyph hash map living in the SVGFontElement.
3352         * svg/SVGFontFaceElement.h: Fixed code formatting issues & wrap in ENABLE(SVG_FONTS) blocks.
3353         * svg/SVGFontFaceElement.idl: Ditto.
3354         * svg/SVGFontFaceFormatElement.cpp: Ditto.
3355         * svg/SVGFontFaceFormatElement.h: Ditto.
3356         * svg/SVGFontFaceFormatElement.idl: Ditto.
3357         * svg/SVGFontFaceNameElement.cpp: Ditto.
3358         * svg/SVGFontFaceNameElement.h: Ditto.
3359         * svg/SVGFontFaceNameElement.idl: Ditto.
3360         * svg/SVGFontFaceSrcElement.cpp: Ditto.
3361         * svg/SVGFontFaceSrcElement.h: Ditto.
3362         * svg/SVGFontFaceSrcElement.idl: Ditto.
3363         * svg/SVGFontFaceUriElement.cpp: Ditto.
3364         * svg/SVGFontFaceUriElement.h: Ditto.
3365         * svg/SVGFontFaceUriElement.idl: Ditto.
3366         * svg/SVGDefinitionSrcElement.cpp: Ditto.
3367         * svg/SVGDefinitionSrcElement.h: Ditto.
3368         * svg/SVGDefinitionSrcElement.idl: Ditto.
3369         * svg/SVGGlyphElement.cpp: Added.
3370         (WebCore::SVGGlyphElement::SVGGlyphElement):
3371         (WebCore::SVGGlyphElement::parseMappedAttribute):
3372         (WebCore::SVGGlyphElement::childrenChanged):
3373         * svg/SVGGlyphElement.h: Added.
3374         (WebCore::SVGGlyphElement::rendererIsNeeded):
3375         (WebCore::SVGGlyphIdentifier::): Structure holding all data to represent a SVG glyph (origin, advance, orientation etc..)
3376         (WebCore::SVGGlyphIdentifier::SVGGlyphIdentifier):
3377         * svg/SVGGlyphElement.idl: Added.
3378         * svg/SVGMissingGlyphElement.cpp: Added. (stub implementation)
3379         (WebCore::SVGMissingGlyphElement::SVGMissingGlyphElement):
3380         (WebCore::SVGMissingGlyphElement::parseMappedAttribute):
3381         (WebCore::SVGMissingGlyphElement::childrenChanged):
3382         * svg/SVGMissingGlyphElement.h: Added.
3383         (WebCore::SVGMissingGlyphElement::rendererIsNeeded):
3384         * svg/SVGMissingGlyphElement.idl: Added.
3385         * svg/svgtags.in: Wrap all SVGFont* elements in ENABLE(SVG_FONTS) block - to assure --no-svg-fonts compilation works (which is the default for now!).
3386
3387 2007-12-27  Dan Bernstein  <mitz@apple.com>
3388
3389         Reviewed by Alexey Proskuryakov.
3390
3391         - fix http://bugs.webkit.org/show_bug.cgi?id=16628
3392           ASSERTION FAILED: m_resizeLayer (running layout tests)
3393
3394         * rendering/RenderLayer.cpp:
3395         (WebCore::RenderLayer::~RenderLayer): Avoid calling
3396         EventHandler::resizeLayerDestroyed() if the document is being destroyed.
3397
3398 2007-12-27  Dan Bernstein  <mitz@apple.com>
3399
3400         Reviewed by Oliver Hunt.
3401
3402         - fix http://bugs.webkit.org/show_bug.cgi?id=16603
3403           <rdar://problem/5664199> Crash when resizing text field
3404
3405         Test: fast/layers/resize-layer-deletion-crash.html
3406
3407         The event handler has only a weak reference to the layer that is
3408         currently in resize mode, so it is the layer's responsibility to let
3409         the event handler know if it has been destroyed while in that mode.
3410
3411         * page/EventHandler.cpp:
3412         (WebCore::EventHandler::resizeLayerDestroyed): Added. Resets
3413         m_resizeLayer to 0.
3414         * page/EventHandler.h:
3415         * rendering/RenderLayer.cpp:
3416         (WebCore::RenderLayer::~RenderLayer): Added a call to
3417         EventHandler::resizeLayerDestroyed() if the layer is in resize mode.
3418
3419 2007-12-27  Collin Jackson  <webkit@collinjackson.com>
3420
3421         Reviewed by Sam Weinig.
3422
3423         http://bugs.webkit.org/show_bug.cgi?id=16539
3424         <rdar://problem/5659269>
3425
3426         The same-origin check was missing in the implementation of 
3427         setTimeout, setInterval, addEventListener, and removeEventListener.
3428
3429         Suppose <http://www.badguy.com/> contains an iframe to 
3430         <http://www.goodguy.com/>. Now www.badguy.com can steal
3431         www.goodguy.com cookies by running this code:
3432
3433         setTimeout.call(frames[0], "alert(document.cookie)", 1000);
3434
3435         This patch changes the behavior so that setTimeout to does 
3436         nothing and returns an undefined value if the caller is not
3437         permitted to script the window whose setTimeout method is being
3438         called. The same applies to setInterval, addEventListener, and 
3439         removeEventListener.
3440
3441         Tests: http/tests/security/cross-frame-access-call.html
3442
3443         * bindings/js/kjs_window.cpp:
3444         (KJS::WindowProtoFuncSetTimeout::callAsFunction)
3445         (KJS::WindowProtoFuncSetInterval::callAsFunction)
3446         (KJS::WindowProtoFuncAddEventListener::callAsFunction)
3447         (KJS::WindowProtoFuncRemoveEventListener::callAsFunction)
3448
3449 2007-12-27  Dan Bernstein  <mitz@apple.com>
3450
3451         Reviewed by Dave Hyatt and Sam Weinig.
3452
3453         - fix <rdar://problem/5605937> Inspector: Disclosure triangle not drawn in node's properties panel until click
3454
3455         Test: fast/layers/add-layer-with-nested-stacking.html
3456         Test: fast/layers/remove-layer-with-nested-stacking.html
3457
3458         * rendering/RenderLayer.cpp:
3459         (WebCore::RenderLayer::addChild): If the new child is overflow-only
3460         but has children of its own, dirty the stacking context's z-order lists
3461         since the grandchildren might need to be in them.
3462         (WebCore::RenderLayer::removeChild): Similarly for the old child.
3463
3464 2007-12-27  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
3465
3466         Reviewed by Alp Toker.
3467
3468         http://bugs.webkit.org/show_bug.cgi?id=16353
3469         [GTK] Check for deprecated API use (G_DISABLE_DEPRECATED etc.)
3470
3471         Added the flags mentioned in the bug only when doing 'debug'
3472         builds. -DGST_DISABLE_DEPRECATED only added when video is enabled.
3473
3474         * GNUmakefile.am:
3475         * WebCore.pro:
3476
3477 2007-12-27  Dan Bernstein  <mitz@apple.com>
3478
3479         Reviewed by Eric Seidel.
3480
3481         - fix http://bugs.webkit.org/show_bug.cgi?id=16490
3482           ASSERT in ~FrameView while viewing/reloading WICD test case
3483
3484         Test: fast/dynamic/paused-event-dispatch.html
3485
3486         * page/FrameView.cpp:
3487         (WebCore::FrameView::~FrameView):
3488         (WebCore::FrameView::layout): Changed to always pause event dispatch and
3489         always resume event dispatch, regardless of whether the post-layout
3490         task timer is active. However, if it is active, assert that event
3491         dispatch is still paused.
3492
3493 2007-12-27  Alexey Proskuryakov  <ap@webkit.org>
3494
3495         Reviewed by Maciej.
3496
3497         http://bugs.webkit.org/show_bug.cgi?id=14500
3498         need to be more generous about charset declaration with meta tag
3499         
3500         http://bugs.webkit.org/show_bug.cgi?id=12526
3501         <rdar://problem/4867183> Safari ignores encoding description "charset=Shift_JIS" in invalid html
3502
3503         <rdar://problem/4892428> Unlike other browsers, WebKit ignores <meta> charset definitions outside the head
3504
3505         <rdar://problem/5643774> REGRESSION: Text is garbled when clicking a link inside an Arabic website
3506
3507         Tests: fast/encoding/ahram-org-eg.html
3508                fast/encoding/bandai-co-jp-releases.html
3509                fast/encoding/floraexpress-ru.html
3510                fast/encoding/hanarei-blog32-fc2-com.html
3511                fast/encoding/yahoo-mail.html
3512
3513         * loader/TextResourceDecoder.cpp:
3514         (WebCore::TextResourceDecoder::checkForHeadCharset): Don't stop looking for <meta> until we've
3515         seen at least 512 bytes of input.
3516
3517 2007-12-26  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
3518
3519         Reviewed by Alp Toker.
3520
3521         http://bugs.webkit.org/show_bug.cgi?id=16390
3522         Use autotools or GNU make as the build system for the GTK port
3523
3524         * GNUmakefile.am: Added.
3525
3526 2007-12-26  Alexey Proskuryakov  <ap@webkit.org>
3527
3528         Reviewed by Sam Weinig.
3529
3530         http://bugs.webkit.org/show_bug.cgi?id=16609
3531         Make manual-tests/xmlhttprequest-contenttype-empty.html test automatic
3532
3533         * manual-tests/xmlhttprequest-contenttype-empty.html: Removed (moved to LayoutTests/http).
3534
3535 2007-12-26  Mark Rowe  <mrowe@apple.com>
3536
3537         Windows build fix.
3538
3539         * platform/Threading.h:
3540
3541 2007-12-25  Rob Buis  <buis@kde.org>
3542
3543         Reviewed by Eric.
3544
3545         http://bugs.webkit.org/show_bug.cgi?id=15514
3546         <clipPath> with <use> not respected
3547         http://bugs.webkit.org/show_bug.cgi?id=16557
3548         SVG circle elements have been clipped away completely, instead of partially.
3549
3550         Add toClipPath to get clip path data for the clipping paths. Implement it for <use>, thereby allowing clip paths using use.
3551
3552         * svg/SVGClipPathElement.cpp:
3553         (WebCore::SVGClipPathElement::canvasResource):
3554         * svg/SVGStyledTransformableElement.h:
3555         (WebCore::SVGStyledTransformableElement::toClipPath):
3556         * svg/SVGUseElement.cpp:
3557         (WebCore::isDirectReference):
3558         (WebCore::SVGUseElement::toClipPath):
3559         * svg/SVGUseElement.h:
3560
3561 2007-12-25  Sam Weinig  <sam@webkit.org>
3562
3563         Reviewed by Eric Seidel.
3564
3565         Clean up the files relating to NodeLists.
3566
3567         * dom/ChildNodeList.cpp:
3568         (WebCore::ChildNodeList::ChildNodeList):
3569         (WebCore::ChildNodeList::length):
3570         (WebCore::ChildNodeList::item):
3571         (WebCore::ChildNodeList::nodeMatches):
3572         * dom/ChildNodeList.h:
3573         * dom/DynamicNodeList.cpp:
3574         (WebCore::DynamicNodeList::itemForwardsFromCurrent):
3575         (WebCore::DynamicNodeList::itemBackwardsFromCurrent):
3576         (WebCore::DynamicNodeList::itemWithName):
3577         * dom/DynamicNodeList.h:
3578         (WebCore::DynamicNodeList::needsNotifications):
3579         * dom/NameNodeList.cpp:
3580         (WebCore::NameNodeList::NameNodeList):
3581         (WebCore::NameNodeList::rootNodeAttributeChanged):
3582         (WebCore::NameNodeList::nodeMatches):
3583         * dom/NameNodeList.h:
3584         * dom/NodeList.h:
3585         * dom/SelectorNodeList.h:
3586
3587 2007-12-25  Sam Weinig  <sam@webkit.org>
3588
3589         Fix non-mac builds.
3590
3591         * WebCore.pro:
3592         * WebCore.vcproj/WebCore.vcproj:
3593         * WebCoreSources.bkl:
3594
3595 2007-12-25  Sam Weinig  <sam@webkit.org>
3596
3597         Rubber stamped by Eric Seidel.
3598
3599         Move TagNodeList into its own file.
3600
3601         * WebCore.xcodeproj/project.pbxproj:
3602         * dom/Node.cpp:
3603         * dom/TagNodeList.cpp: Copied from dom/Node.cpp.
3604         (WebCore::TagNodeList::TagNodeList):
3605         * dom/TagNodeList.h: Copied from dom/Node.cpp.
3606
3607 2007-12-25  Sam Weinig  <sam@webkit.org>
3608
3609         Reviewed by Eric Seidel.
3610
3611         Simplify the NodeList architecture.
3612         - Rename recursiveItem() to item(), since it is not recursive.
3613         - Make recursiveLength() iterative and rename to length().
3614         - Remove now unneeded overrides of item() and length() that used 
3615           to call the recursive variants.
3616
3617         * dom/ClassNodeList.cpp:
3618         * dom/ClassNodeList.h:
3619         * dom/DynamicNodeList.cpp:
3620         (WebCore::DynamicNodeList::length):
3621         (WebCore::DynamicNodeList::item):
3622         (WebCore::DynamicNodeList::rootNodeAttributeChanged): Move implementation 
3623         into the .cpp file since virtual methods can't be inlined.
3624         * dom/DynamicNodeList.h:
3625         * dom/NameNodeList.cpp:
3626         * dom/NameNodeList.h:
3627         * dom/Node.cpp:
3628
3629 2007-12-25  Alp Toker  <alp@atoker.com>
3630
3631         More complete GTK+/Qt/Wx/Win build fixes for breakage introduced in
3632         r28981.
3633
3634         * WebCore.pro:
3635         * WebCore.vcproj/WebCore.vcproj:
3636         * WebCoreSources.bkl:
3637
3638 2007-12-25  Alp Toker  <alp@atoker.com>
3639
3640         Win build fix for breakage introduced in r28981.
3641
3642         * WebCore.vcproj/WebCore.vcproj:
3643
3644 2007-12-25  Alp Toker  <alp@atoker.com>
3645
3646         Wx build fix for breakage introduced in r28981.
3647
3648         * WebCoreSources.bkl:
3649
3650 2007-12-25  Alp Toker  <alp@atoker.com>
3651
3652         GTK+/Qt build fix for breakage introduced in r28981.
3653
3654         * WebCore.pro:
3655
3656 2007-12-25  David Smith  <catfish.man@gmail.com> and Sam Weinig  <sam@webkit.org>
3657
3658         Reviewed by Oliver.
3659         
3660         - http://bugs.webkit.org/show_bug.cgi?id=16587
3661         Implement the most useful part of the W3C Selectors API.
3662
3663         * WebCore.xcodeproj/project.pbxproj:
3664         * css/CSSStyleSelector.h: Make Node a friend of CSSStyleSelector so it can use checkSelector()
3665         * dom/ChildNodeList.cpp:
3666         (WebCore::ChildNodeList::ChildNodeList): Change to being a DynamicNodeList
3667         * dom/ChildNodeList.h:
3668         * dom/ClassNodeList.cpp:
3669         (WebCore::ClassNodeList::ClassNodeList): Change to being a DynamicNodeList
3670         * dom/ClassNodeList.h:
3671         * dom/Document.idl: Add the new functions
3672         * dom/DynamicNodeList.cpp: Copied from WebCore/dom/NodeList.cpp.
3673         (WebCore::DynamicNodeList::DynamicNodeList): Rename NodeList to DynamicNodeList, to differentiate it from the new StaticNodeList
3674         (WebCore::DynamicNodeList::~DynamicNodeList):
3675         (WebCore::DynamicNodeList::recursiveLength):
3676         (WebCore::DynamicNodeList::itemForwardsFromCurrent):
3677         (WebCore::DynamicNodeList::itemBackwardsFromCurrent):
3678         (WebCore::DynamicNodeList::recursiveItem):
3679         (WebCore::DynamicNodeList::itemWithName):
3680         (WebCore::DynamicNodeList::rootNodeChildrenChanged):
3681         (WebCore::DynamicNodeList::Caches::Caches):
3682         (WebCore::DynamicNodeList::Caches::reset):
3683         * dom/DynamicNodeList.h: Copied from WebCore/dom/NodeList.h.
3684         (WebCore::DynamicNodeList::rootNodeAttributeChanged):
3685         * dom/Element.idl: Add the new functions
3686         * dom/NameNodeList.cpp: Change to being a DynamicNodeList
3687         (WebCore::NameNodeList::NameNodeList):
3688         * dom/NameNodeList.h:
3689         (WebCore::NameNodeList::rootNodeAttributeChanged):
3690         * dom/Node.cpp:
3691         (WebCore::TagNodeList::TagNodeList): Change to being a DynamicNodeList
3692         (WebCore::Node::registerDynamicNodeList):
3693         (WebCore::Node::unregisterDynamicNodeList):
3694         (WebCore::Node::getElementsByName):
3695         (WebCore::Node::getElementsByClassName):
3696         (WebCore::Node::querySelector): new
3697         (WebCore::Node::querySelectorAll): new
3698         * dom/Node.h:
3699         * dom/NodeList.cpp: Removed.
3700         * dom/NodeList.h: This is now an abstract superclass of DynamicNodeList and StaticNodeList
3701         (WebCore::NodeList::NodeList):
3702         (WebCore::NodeList::~NodeList):
3703         * dom/SelectorNodeList.cpp: Added.
3704         (WebCore::SelectorNodeList::SelectorNodeList): New StaticNodeList subclass that filters elements by CSS selector
3705         * dom/SelectorNodeList.h: Added.
3706         * dom/StaticNodeList.cpp: Added.
3707         (WebCore::StaticNodeList::length):
3708         (WebCore::StaticNodeList::item):
3709         (WebCore::StaticNodeList::itemWithName):
3710         * dom/StaticNodeList.h: Added.
3711         (WebCore::StaticNodeList::StaticNodeList):
3712         (WebCore::StaticNodeList::~StaticNodeList):
3713
3714 2007-12-25  Mark Rowe  <mrowe@apple.com>
3715
3716         Reviewed by Sam Weinig.
3717
3718         Implement a lock-free ThreadSafeShared for i386, x86_64, ppc and ppc64.
3719         http://bugs.webkit.org/show_bug.cgi?id=16596
3720
3721         This is a 1.7x as fast as the lock-based implementation on x86 for a single-threaded use
3722         of ThreadSafeShared but is closer to 280x as fast when there is heavy concurrent multi-threaded
3723         access to a single ThreadSafeShared object.
3724
3725         The atomic operations are based on those used by the Boost C++ library's shared_ptr implementation.
3726
3727         * platform/Threading.h:
3728         (WebCore::atomicIncrement):
3729         (WebCore::atomicDecrement):
3730         (WebCore::ThreadSafeShared::ThreadSafeShared):
3731         (WebCore::ThreadSafeShared::ref): Use lock-free operations if available.
3732         (WebCore::ThreadSafeShared::deref): Ditto.
3733         (WebCore::ThreadSafeShared::hasOneRef):
3734         (WebCore::ThreadSafeShared::refCount):
3735         (WebCore::ThreadSafeShared::isThreadSafe):
3736
3737 2007-12-24  Darin Adler  <darin@apple.com>
3738
3739         * platform/text/PlatformString.h: Removed now-incorrect comment.
3740         Added a comment about copy().
3741         * platform/text/StringImpl.h: Added a comment about copy().
3742
3743 2007-12-24  Darin Adler  <darin@apple.com>
3744
3745         Reviewed by Maciej.
3746
3747         - http://bugs.webkit.org/show_bug.cgi?id=16550
3748           make StringImpl immutable
3749
3750         I tried to keep the changes to a minimum. In some cases there is
3751         room for optimization -- I didn't try to add in the "single ref count"
3752         optimizations and there might be a tiny bit more string copying than
3753         we had before.
3754
3755         * WebCore.base.exp: Updated.
3756
3757         * dom/CharacterData.cpp:
3758         (WebCore::CharacterData::appendData): Changed to use String since
3759         StringImpl doesn't have mutating functions any more.
3760         (WebCore::CharacterData::insertData): Ditto.
3761         (WebCore::CharacterData::deleteData): Ditto.
3762         (WebCore::CharacterData::replaceData): Ditto.
3763         * dom/Text.cpp:
3764         (WebCore::Text::splitText): Changed to use substring instead of
3765         remove since StringImpl does't have mutating functions any more.
3766         * editing/CompositeEditCommand.cpp:
3767         (WebCore::CompositeEditCommand::deleteInsignificantText): Changed
3768         to use String instead of StringImpl so we can use remove.
3769
3770         * platform/text/PlatformString.h: Removed newUninitialized.
3771         Added append that takes a character pointer and length.
3772
3773         * platform/text/String.cpp:
3774         (WebCore::String::insert): Added an implementation that does not
3775         rely on an underlying StringImpl function.
3776         (WebCore::String::append): Ditto.
3777         (WebCore::String::truncate): Ditto.
3778         (WebCore::String::remove): Ditto.
3779         (WebCore::String::charactersWithNullTermination): Added an
3780         implementation that uses the new StringImpl null termination feature,
3781         which does not require modifying a string.
3782
3783         * platform/text/StringImpl.cpp:
3784         (WebCore::isSpace): Fix comment.
3785         (WebCore::StringImpl::StringImpl): Added a new constructor that makes
3786         a string with a trailing null character.
3787         (WebCore::StringImpl::substring): Marked const.
3788         (WebCore::StringImpl::replace): Marked const; had to add quite a few
3789         const_cast. Also rewrote one of these to work without modifying the
3790         existing string.
3791
3792         * platform/text/StringImpl.h: Fixed a mistake where the empty string had
3793         m_hasTerminatingNullCharacter uninitialized. Added a type and constructor
3794         for creating strings that have a trailing null character. Added a
3795         hasTerminatingNullCharacter function. Removed newUninitialized,
3796         charactersWithNullTermination, append, insert, truncate, and remove.
3797         Marked lots of other functions const.
3798
3799         * platform/text/TextCodecLatin1.cpp:
3800         (WebCore::TextCodecLatin1::decode): Rewrote to use a Vector instead of
3801         newUninitialized.
3802         * platform/text/TextCodecUTF16.cpp:
3803         (WebCore::TextCodecUTF16::decode): Ditto.
3804         * platform/text/TextCodecUserDefined.cpp:
3805         (WebCore::TextCodecUserDefined::decode): Ditto.
3806
3807         * rendering/RenderStyle.cpp:
3808         (WebCore::RenderStyle::setContent): Changed to use String since
3809         StringImpl doesn't have mutating functions any more.
3810
3811 2007-12-24  Alexey Proskuryakov  <ap@webkit.org>
3812
3813         Reviewed by Oliver.
3814
3815         Fix fast/events/arrow-keys-on-body.html, failing on Windows.
3816
3817         * platform/win/KeyEventWin.cpp:
3818         (WebCore::isKeypadEvent):
3819         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
3820         Use HIWORD() macro instead of shifting the value explicitly (no change in behavior).
3821
3822 2007-12-23  Alexey Proskuryakov  <ap@webkit.org>
3823
3824         Fix Debug and Release QTMovieWin bulds.
3825
3826         * WebCore.vcproj/QTMovieWin.vcproj:
3827         * WebCore.vcproj/debug.vsprops:
3828         * WebCore.vcproj/debug_internal.vsprops:
3829         * WebCore.vcproj/release.vsprops:
3830         Use LibraryConfigSuffix instead of WebKitConfigSuffix for pthreadVC2.
3831         Build release import lib into \lib, not \bin.
3832
3833 2007-12-23  Alp Toker  <alp@atoker.com>
3834
3835         Reviewed by Holger Freyther.
3836
3837         http://bugs.webkit.org/show_bug.cgi?id=15382
3838         [CAIRO] Canvas pattern support
3839
3840         http://bugs.webkit.org/show_bug.cgi?id=16577
3841         Merge Cairo enhancements from Apollo project
3842
3843         Add support for canvas patterns.
3844
3845         Make Image::nativeImageForCurrentFrame() public.
3846
3847         Fix some typos along the way.
3848
3849         The globalAlpha canvas fixes are not included in this patch as
3850         they're slightly more intrusive and may conflict conceptually with
3851         GraphicsContext::setAlpha().
3852
3853         * html/CanvasPattern.cpp:
3854         (WebCore::CanvasPattern::CanvasPattern):
3855         (WebCore::CanvasPattern::~CanvasPattern):
3856         (WebCore::CanvasPattern::createPattern):
3857         * html/CanvasPattern.h:
3858         (WebCore::CanvasPattern::platformImage):
3859         * html/CanvasRenderingContext2D.cpp:
3860         (WebCore::CanvasRenderingContext2D::setShadow):
3861         (WebCore::CanvasRenderingContext2D::applyShadow):
3862         (WebCore::CanvasRenderingContext2D::drawImage):
3863         (WebCore::CanvasRenderingContext2D::createPattern):
3864         (WebCore::CanvasRenderingContext2D::applyStrokePattern):
3865         (WebCore::CanvasRenderingContext2D::applyFillPattern):
3866         * platform/graphics/Image.h:
3867         (WebCore::Image::nativeImageForCurrentFrame):
3868
3869 2007-12-23  Kevin Ollivier  <kevino@theolliviers.com>
3870
3871         Reviewed by Eric Seidel.
3872
3873         Remove getWxBitmap as we have nativeImageForCurrentFrame now,
3874         and don't draw a border in fillRect.
3875
3876         * platform/graphics/BitmapImage.h:
3877         * platform/graphics/wx/GraphicsContextWx.cpp:
3878         (WebCore::GraphicsContext::fillRect):
3879         * platform/graphics/wx/ImageWx.cpp:
3880
3881 2007-12-23  Alp Toker  <alp@atoker.com>
3882
3883         Reviewed by Holger Freyther.
3884
3885         http://bugs.webkit.org/show_bug.cgi?id=16577
3886         Merge Cairo enhancements from Apollo project
3887
3888         This patch is based on initial merging work by Brent Fulgham. Adobe's
3889         code has been modified in a few places to better suit the existing
3890         coding style.
3891
3892         Implement more clipping and drawing functions.
3893
3894         Save and restore the fill rule manually when clipping.
3895
3896         Avoid image surface creation when the image buffer has height zero.
3897
3898         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3899         (WebCore::GraphicsContext::clip):
3900         (WebCore::GraphicsContext::addInnerRoundedRectClip):
3901         (WebCore::GraphicsContext::addPath):
3902         (WebCore::GraphicsContext::clipOut):
3903         (WebCore::GraphicsContext::clipOutEllipseInRect):
3904         (WebCore::GraphicsContext::fillRoundedRect):
3905         * platform/graphics/cairo/ImageSourceCairo.cpp:
3906         (WebCore::ImageSource::createFrameAtIndex):
3907
3908 2007-12-23  Nikolas Zimmermann  <zimmermann@kde.org>
3909
3910         Reviewed by Mark.
3911
3912         Fix wrong placed ifdef - wrapping SVGDefsElement, instead of SVGDefinitionSrcElement in SVG_FONTS block.
3913
3914         * bindings/objc/DOM.mm:
3915         (WebCore::createElementClassMap):
3916
3917 2007-12-22  Alp Toker  <alp@atoker.com>
3918
3919         GTK+ build fix
3920
3921         GTK_TARGET_OTHER_APP is not available in older GTK+ versions. Pass
3922         empty target flags for now.
3923
3924         Check GTK+, not GLib versions, since they are different.
3925
3926         * platform/gtk/PasteboardGtk.cpp:
3927         (WebCore::Pasteboard::documentFragment):
3928
3929 2007-12-22  Luca Bruno  <lethalman88@gmail.com>
3930
3931         Reviewed by Alp Toker.
3932
3933         http://bugs.webkit.org/show_bug.cgi?id=16311
3934         [Gtk] Copy rich text to clipboard as text/plain and text/html.
3935
3936         Hook into the WebView to get the correct clipboard object on the
3937         appropriate display. This is necessary because GTK+ does not have
3938         global clipboards.
3939
3940         * WebCore.pro:
3941         * platform/Pasteboard.h:
3942         (WebCore::Pasteboard::setHelper): added for GTK
3943         (WebCore::Pasteboard::m_helper): private added for GTK
3944         * platform/gtk/PasteboardGtk.cpp:
3945         (WebCore::PasteboardSelectionData): added to support GTK selection data callback
3946         (WebCore::clipboard_get_contents_cb): added
3947         (WebCore::clipboard_clear_contents_cb): added
3948         (WebCore::Pasteboard::~Pasteboard):
3949         (WebCore::Pasteboard::setHelper):
3950         (WebCore::Pasteboard::writeSelection): copy rich text
3951         (WebCore::Pasteboard::documentFragment): 
3952         (WebCore::Pasteboard::plainText): 
3953         * platform/gtk/PasteboardHelper.h: Added.
3954
3955 2007-12-22  Nikolas Zimmermann  <zimmermann@kde.org>
3956
3957         Reviewed by Oliver.
3958
3959         Fixes: http://bugs.webkit.org/show_bug.cgi?id=15966 (Crash in SVGRootInlineBox::walkTextChunks() on mouse hover)
3960
3961         Add new isSVGRootInlineBox() function to InlineBox to be able to differentiate between RootInlineBox/SVGRootInlineBox.
3962         SVG assumed it's root inline box (for <text> elements) is always of type SVGRootInlineBox, which is not the case
3963         for HTML text in <foreignObject>. Text selection doesn't work so far as line box offsets are wrong - which is visible
3964         in Web Inspector.
3965
3966         * rendering/InlineBox.h:
3967         (WebCore::InlineBox::isSVGRootInlineBox):
3968         * rendering/SVGInlineTextBox.cpp:
3969         (WebCore::SVGInlineTextBox::svgRootInlineBox):
3970         (WebCore::SVGInlineTextBox::closestCharacterToPosition):
3971         (WebCore::SVGInlineTextBox::selectionRect):
3972         * rendering/SVGRenderTreeAsText.cpp:
3973         (WebCore::writeSVGInlineTextBox):
3974         * rendering/SVGRootInlineBox.h:
3975         (WebCore::SVGRootInlineBox::isSVGRootInlineBox):
3976
3977 2007-12-22  Alp Toker  <alp@atoker.com>
3978
3979         LOW_BANDWIDTH_DISPLAY build fix
3980
3981         Track recent KURL DeprecatedString changes.
3982
3983         * loader/FrameLoader.cpp:
3984         (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
3985
3986 2007-12-22  Dan Bernstein  <mitz@apple.com>
3987
3988         - Windows build fix
3989
3990         * WebCore.vcproj/WebCore.vcproj:
3991
3992 2007-12-22  Xan Lopez  <xan@gnome.org>
3993
3994         Reviewed by Alp Toker.
3995
3996         Add missing return 0 to fix a compile warning.
3997
3998         * page/gtk/FrameGtk.cpp:
3999         (WebCore::Frame::createScriptInstanceForWidget):
4000
4001 2007-12-21  Antti Koivisto  <antti@apple.com>
4002
4003         Reviewed by Darin, Adam and Steve.
4004
4005         Add media playback support for Windows.
4006         
4007         The implementation uses low level QuickTime API. DLL is
4008         needed to work around CF use in both WebKit and QuickTime.
4009         
4010         This makes Windows build depend on the QuickTime SDK 
4011         
4012         http://developer.apple.com/quicktime/download/
4013         
4014         but not QuickTime itself.
4015         
4016         QTMovieWinTimer contains some copy code from SharedTimerWin. It
4017         is used in the QuickTime access DLL which can't use WebCore
4018         SharedTimer due to dependency problems.
4019
4020         * WebCore.vcproj/QTMovieWin.vcproj: Added.
4021         * WebCore.vcproj/WebCore.vcproj:
4022         * WebCore.vcproj/build-generated-files.sh:
4023         * html/HTMLMediaElement.cpp:
4024         (WebCore::HTMLMediaElement::setSrc):
4025         * platform/graphics/MediaPlayer.cpp:
4026         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: Added.
4027         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
4028         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
4029         (WebCore::MediaPlayerPrivate::load):
4030         (WebCore::MediaPlayerPrivate::play):
4031         (WebCore::MediaPlayerPrivate::pause):
4032         (WebCore::MediaPlayerPrivate::duration):
4033         (WebCore::MediaPlayerPrivate::currentTime):
4034         (WebCore::MediaPlayerPrivate::seek):
4035         (WebCore::MediaPlayerPrivate::doSeek):
4036         (WebCore::MediaPlayerPrivate::cancelSeek):
4037         (WebCore::MediaPlayerPrivate::seekTimerFired):
4038         (WebCore::MediaPlayerPrivate::setEndTime):
4039         (WebCore::MediaPlayerPrivate::startEndPointTimerIfNeeded):
4040         (WebCore::MediaPlayerPrivate::endPointTimerFired):
4041         (WebCore::MediaPlayerPrivate::paused):
4042         (WebCore::MediaPlayerPrivate::seeking):
4043         (WebCore::MediaPlayerPrivate::naturalSize):
4044         (WebCore::MediaPlayerPrivate::hasVideo):
4045         (WebCore::MediaPlayerPrivate::setVolume):
4046         (WebCore::MediaPlayerPrivate::setMuted):
4047         (WebCore::MediaPlayerPrivate::setRate):
4048         (WebCore::MediaPlayerPrivate::dataRate):
4049         (WebCore::MediaPlayerPrivate::maxTimeBuffered):
4050         (WebCore::MediaPlayerPrivate::maxTimeSeekable):
4051         (WebCore::MediaPlayerPrivate::maxTimeLoaded):
4052         (WebCore::MediaPlayerPrivate::bytesLoaded):
4053         (WebCore::MediaPlayerPrivate::totalBytesKnown):
4054         (WebCore::MediaPlayerPrivate::totalBytes):
4055         (WebCore::MediaPlayerPrivate::cancelLoad):
4056         (WebCore::MediaPlayerPrivate::updateStates):
4057         (WebCore::MediaPlayerPrivate::didEnd):
4058         (WebCore::MediaPlayerPrivate::setRect):
4059         (WebCore::MediaPlayerPrivate::setVisible):
4060         (WebCore::MediaPlayerPrivate::paint):
4061         (WebCore::MediaPlayerPrivate::getSupportedTypes):
4062         (WebCore::MediaPlayerPrivate::movieEnded):
4063         (WebCore::MediaPlayerPrivate::movieLoadStateChanged):
4064         (WebCore::MediaPlayerPrivate::movieTimeChanged):
4065         (WebCore::MediaPlayerPrivate::movieNewImageAvailable):
4066         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h: Added.
4067         (WebCore::MediaPlayerPrivate::networkState):
4068         (WebCore::MediaPlayerPrivate::readyState):
4069         * platform/graphics/win/QTMovieWin.cpp: Added.
4070         (updateTaskTimer):
4071         (QTMovieWinPrivate::QTMovieWinPrivate):
4072         (QTMovieWinPrivate::~QTMovieWinPrivate):
4073         (taskTimerFired):
4074         (QTMovieWinPrivate::startTask):
4075         (QTMovieWinPrivate::endTask):
4076         (QTMovieWinPrivate::task):
4077         (QTMovieWinPrivate::registerDrawingCallback):
4078         (QTMovieWinPrivate::drawingComplete):
4079         (QTMovieWinPrivate::createGWorld):
4080         (QTMovieWinPrivate::setSize):
4081         (QTMovieWinPrivate::deleteGWorld):
4082         (QTMovieWin::QTMovieWin):
4083         (QTMovieWin::~QTMovieWin):
4084         (QTMovieWin::play):
4085         (QTMovieWin::pause):
4086         (QTMovieWin::rate):
4087         (QTMovieWin::setRate):
4088         (QTMovieWin::duration):
4089         (QTMovieWin::currentTime):
4090         (QTMovieWin::setCurrentTime):
4091         (QTMovieWin::setVolume):
4092         (QTMovieWin::setMuted):
4093         (QTMovieWin::dataSize):
4094         (QTMovieWin::maxTimeLoaded):
4095         (QTMovieWin::loadState):
4096         (QTMovieWin::getNaturalSize):
4097         (QTMovieWin::setSize):
4098         (QTMovieWin::setVisible):
4099         (QTMovieWin::paint):
4100         (QTMovieWin::load):
4101         (movieDrawingCompleteProc):
4102         (initializeSupportedTypes):
4103         (QTMovieWin::countSupportedTypes):
4104         (QTMovieWin::getSupportedType):
4105         (QTMovieWin::initializeQuickTime):
4106         (DllMain):
4107         * platform/graphics/win/QTMovieWin.h: Added.
4108         * platform/graphics/win/QTMovieWinTimer.cpp: Added.
4109         (TimerWindowWndProc):
4110         (initializeOffScreenTimerWindow):
4111         (setSharedTimerFiredFunction):
4112         (timerFired):
4113         (setSharedTimerFireDelay):
4114         (stopSharedTimer):
4115         (setSharedTimerInstanceHandle):
4116         (systemTime):
4117         * platform/graphics/win/QTMovieWinTimer.h: Added.
4118         * rendering/RenderMedia.cpp:
4119         (WebCore::MediaControlPlayButtonElement::update):
4120
4121 2007-12-21  Brent Fulgham  <bfulgham@gmail.com>
4122
4123         Reviewed by Alp Toker.
4124
4125         http://bugs.webkit.org/show_bug.cgi?id=16558
4126         Cairo WebCore Rendering Fails on arc drawing
4127
4128         Fix for bug reported (and patched) by Apollo team in which
4129         arcs were draw in reverse (resulting in inverted images).
4130         Review of the source found that the 'clockwise' term was
4131         actually meant to mean 'anticlockwise' so the IDL and
4132         supporting classes have been changed to match this. 
4133
4134         * html/CanvasRenderingContext2D.cpp:
4135         (WebCore::CanvasRenderingContext2D::arc):
4136         * html/CanvasRenderingContext2D.idl:
4137         * platform/graphics/cairo/PathCairo.cpp:
4138         (WebCore::Path::addArc):
4139         (WebCore::Path::addEllipse):
4140         * platform/graphics/Path.h:
4141
4142 2007-12-21  Alexey Proskuryakov  <ap@webkit.org>
4143
4144         Reviewed by Oliver.
4145
4146         <rdar://problem/5629995> Incorrect display of Danish characters on web site.
4147
4148         Test: http/tests/xmlhttprequest/response-encoding.html
4149
4150         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::didReceiveData):
4151         Default to UTF-8 for HTML, too. It's unfortunate that we have to use different
4152         rules for main content and XHR responses, but this matches both IE and Firefox.
4153
4154 2007-12-20  Jon Honeycutt  <jhoneycutt@apple.com>
4155
4156         Reviewed by Kevin Decker.
4157
4158         <rdar://problem/5655797> REGRESSION(304-306A10) Safari does not find
4159         shockwave plugin on freshly installed OS
4160
4161         Look for Director plugin in its native directory.
4162
4163         * plugins/win/PluginDatabaseWin.cpp:
4164         (WebCore::PluginDatabaseWin::getPluginsInPaths): The Director plugin
4165         doesn't start with "np," so special case its filename.
4166         (WebCore::addMacromediaPluginPaths): Add Flash and "Shockwave 10"
4167         directories to the plugin paths.
4168         (WebCore::PluginDatabaseWin::defaultPluginPaths):
4169
4170 2007-12-20  Peter Kasting  <zerodpx@gmail.com>
4171
4172         Reviewed by Alp Toker.
4173
4174         http://bugs.webkit.org/show_bug.cgi?id=16508
4175         Fix regression in GIFImageDecoder.cpp: "Haeberli hack" led to wrongly
4176         decoded transparent areas.
4177
4178         * platform/image-decoders/gif/GIFImageDecoder.cpp:
4179         (WebCore::GIFImageDecoder::haveDecodedRow):
4180         * platform/image-decoders/gif/GIFImageDecoder.h:
4181         * platform/image-decoders/gif/GIFImageReader.cpp:
4182         (GIFImageReader::output_row):
4183
4184 2007-12-20  Justin Garcia  <justin.garcia@apple.com>
4185
4186         Reviewed by Oliver Hunt.
4187
4188         <rdar://problem/5543472> GoogleDocs: Safari hangs when creating a list from a particular selection
4189         
4190         Still need to fix similar issues with the other operations that iterate 
4191         over selected paragraphs, like FormatBlock, Indent and Outdent (<rdar://problem/5658933>).
4192
4193         * editing/IndentOutdentCommand.cpp:
4194         (WebCore::IndentOutdentCommand::indentRegion): Added a FIXME.
4195         * editing/IndentOutdentCommand.h: Removed an unused function.
4196         * editing/InsertListCommand.cpp:
4197         (WebCore::InsertListCommand::modifyRange): 
4198         Renamed visibleStart to startOfSelection and visibleEnd to endOfSelection.
4199         Call the new selectionForParagraphIteration, which a) prevents operations like this
4200         one from being performed on a table that isn't fully selected (where the selection
4201         starts just before the table and ends inside it), and b) helps prevent paragraph
4202         iteration from going past the end of the selection.
4203         Call the new startOfNextParagraph, instead of using endOfParagraph(v).next(),
4204         since when v is in the last paragraph of the last cell of a table, that expression 
4205         will return the position after the table, not the start of the next paragraph.
4206         * editing/htmlediting.cpp:
4207         (WebCore::enclosingListChild): Don't go above a table cell, so that list operations
4208         take effect inside the table cell where they are performed.
4209         (WebCore::selectionForParagraphIteration): Added, see above.
4210         (WebCore::indexForVisiblePosition): Moved from IndentOutdentCommand.cpp.
4211         * editing/htmlediting.h:
4212         * editing/visible_units.cpp:
4213         (WebCore::startOfNextParagraph): Added, see above.
4214         * editing/visible_units.h:
4215         * editing/TextIterator.h:
4216         (WebCore::TextIterator::exitNode): Added a FIXME.
4217
4218 2007-12-20  Alp Toker  <alp@atoker.com>
4219
4220         Rubber-stamped by Maciej.
4221
4222         http://bugs.webkit.org/show_bug.cgi?id=16542
4223         [GTK] Text