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