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