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