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