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