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