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