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