* Coding-Style fix
[WebKit-https.git] / WebCore / ChangeLog
1 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2
3         Reviewed by Simon.
4
5         * Coding-Style fix
6
7         * platform/graphics/qt/ImageDecoderQt.cpp:
8         (WebCore::ImageDecoderQt::ReadContext::ReadContext):
9
10 2008-01-17  Geoffrey Garen  <ggaren@apple.com>
11
12         Reviewed by Darin Adler.
13
14         Fixed: lots of WebCore leaks reported when quitting Safari
15         
16         If we're quitting with a GC still scheduled, do the GC before quitting.
17         That way, WebCore's leak counters won't count objects that were
18         scheduled for GC.
19
20         * bindings/js/GCController.cpp:
21         (WebCore::GCController::~GCController):
22         (WebCore::GCController::garbageCollectNow):
23         * bindings/js/GCController.h:
24
25 2008-01-17  Alp Toker  <alp@atoker.com>
26
27         Reviewed by Oliver Hunt.
28
29         gdk_screen_get_font_options() returns NULL if no default options are
30         set so we always have to NULL check to avoid crashes later on since
31         Cairo doesn't accept NULL font options.
32
33         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
34         (WebCore::FontPlatformData::FontPlatformData):
35
36 2008-01-17  Antti Koivisto  <antti@apple.com>
37
38         Reviewed by Adele.
39
40         Windows fix for <rdar://problem/5605682>
41         Disallow streaming protocols for media elements
42         and <rdar://problem/5668711>
43         Limit the container and codec types that the <video> tag supports
44         
45         - Disable unsupported QuickTime tracks types. 
46         - Disallow streaming protocols (for now).
47
48         * WebCore.vcproj/WebCore.vcproj:
49         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
50         (WebCore::MediaPlayerPrivate::updateStates):
51         * platform/graphics/win/QTMovieWin.cpp:
52         (QTMovieWin::load):
53         (QTMovieWin::disableUnsupportedTracks):
54         * platform/graphics/win/QTMovieWin.h:
55
56 2008-01-17  Oliver Hunt  <oliver@apple.com>
57
58         Support smart copy and paste during drag and drop
59         
60         Reviewed by Alice
61         
62         In order for the drag and drop tests in Windows DRT to pass
63         we need to support smart cut and paste operations during
64         drag and drop on windows.
65         
66         There is no layout test as drag and drop is still unsupported
67         on windows.  Once supported smart drag/drop is tested by existing
68         tests
69
70         * platform/win/ClipboardUtilitiesWin.cpp:
71         (WebCore::smartPasteFormat):
72         * platform/win/ClipboardUtilitiesWin.h:
73         * platform/win/ClipboardWin.cpp:
74         (WebCore::ClipboardWin::writeRange):
75         * platform/win/DragDataWin.cpp:
76
77 2008-01-17  Oliver Hunt  <oliver@apple.com>
78
79         Reviewed by Anders.
80
81         <rdar://problem/5692940> Crash when attempting to get text properties in
82         SVG with no renderer
83
84         We use the element renderer to calculate the text element bounds,
85         however there was no check against the possibility of the text dimension
86         properties being requested on a element with no renderer (eg. unattached, 
87         display: none).
88
89         Test: svg/text/text-property-with-display-none.html
90
91         * svg/SVGTextContentElement.cpp:
92         (WebCore::rootInlineBoxForTextContentElement):
93
94 2008-01-17  Anders Carlsson  <andersca@apple.com>
95
96         Reviewed by Oliver.
97
98         <rdar://problem/5636742>
99         CrashTracer: [USER] 1302 crashes in Safari at com.apple.WebCore: WTF::Vector<char, 0ul>::reserveCapacity + 78
100         
101         When loading full-frame plug-ins, disable buffering data for the main resource loader. Otherwise, this can cause us
102         to crash when loading large files such as movies in the browser. We already do this for embedded plug-ins.
103         
104         * WebCore.base.exp:
105         * loader/DocumentLoader.h:
106         (WebCore::DocumentLoader::mainResourceLoader):
107         New accessor method.
108         
109         * loader/PluginDocument.cpp:
110         (WebCore::PluginTokenizer::writeRawData):
111         Disable buffering for the main resource loader.
112         
113         * loader/ResourceLoader.cpp:
114         (WebCore::ResourceLoader::setShouldBufferData):
115         * loader/ResourceLoader.h:
116         Have this free the buffer when disabling buffering.
117
118 2008-01-17  Adam Roben  <aroben@apple.com>
119
120         More Qt/GTK+ build fixing.
121
122         * platform/gtk/ScrollViewGtk.cpp:
123         * platform/qt/ScrollViewQt.cpp:
124
125 2008-01-17  Alexey Proskuryakov  <ap@webkit.org>
126
127         Reviewed by Darin.
128
129         http://bugs.webkit.org/show_bug.cgi?id=16902
130         <rdar://problem/5692566> fast/encoding/mailto-always-utf-8.html fails when run after
131         fast/dom/Window/window-property-shadowing.html
132
133         Test: fast/dom/Window/window-property-shadowing_.html
134
135         * loader/FrameLoader.cpp: (WebCore::FrameLoader::clear): Clear the frame name, too.
136
137 2008-01-17  Adam Roben  <aroben@apple.com>
138
139         Qt/GTK+ build fix.
140
141         * platform/gtk/ScrollViewGtk.cpp:
142         (WebCore::ScrollView::ScrollViewPrivate::isActive):
143         * platform/qt/ScrollViewQt.cpp:
144         (WebCore::ScrollView::ScrollViewPrivate::isActive):
145
146 2008-01-16  Adam Roben  <aroben@apple.com>
147
148         Update scroll bars/form controls when FocusController::isActive changes
149
150         Part of <rdar://5006915> Inactive look for Aqua controls
151
152         Reviewed by Darin.
153
154         All tests pass.
155
156         * page/FocusController.cpp:
157         (WebCore::FocusController::setActive): Update control tints when the
158         active state changes.
159         * page/FrameView.cpp:
160         (WebCore::FrameView::updateControlTints): On Windows, we have to ask
161         ScrollView to paint so that the outermost scroll bars will paint. On
162         Mac, the outermost scroll bars are taken care of by NSScroller.
163         * platform/PopupMenu.h: Updated for ScrollBarClient changes.
164         * platform/ScrollBar.h: Added a new ScrollBarClient method.
165         * platform/win/PlatformScrollBarSafari.cpp:
166         (WebCore::PlatformScrollbar::paint): Invalidate when updating control
167         tints so that we can paint with the new tint later.
168         (WebCore::PlatformScrollbar::paintButton): Pass the active state down
169         to SafariTheme.
170         (WebCore::PlatformScrollbar::paintTrack): Ditto.
171         (WebCore::PlatformScrollbar::paintThumb): Ditto.
172         * platform/win/ScrollViewWin.cpp:
173         (WebCore::ScrollView::ScrollViewPrivate::isActive): Added.
174         (WebCore::ScrollView::paint): Pass paint calls on down if we're
175         updating control tints so the scroll bars can invalidate.
176         * rendering/RenderLayer.cpp:
177         (WebCore::RenderLayer::isActive): Added.
178         * rendering/RenderLayer.h:
179         * rendering/RenderListBox.cpp:
180         (WebCore::RenderListBox::isActive): Added.
181         * rendering/RenderListBox.h:
182         * rendering/RenderTheme.cpp:
183         (WebCore::RenderTheme::isActive): Added.
184         * rendering/RenderTheme.h:
185         * rendering/RenderThemeSafari.cpp:
186         (WebCore::RenderThemeSafari::determineState): Pass the active state
187         down to SafariTheme.
188
189 2008-01-16  Adam Roben  <aroben@apple.com>
190
191         Move focused/active state from Frame to SelectionController/FocusController
192
193         This is the first part of <rdar://5006915> Inactive look for Aqua
194         controls.
195
196         The following methods were moved/renamed:
197             - Frame::setIsActive -> FocusController::setActive
198             - Frame::isActive -> SelectionController::isActiveAndFocused
199             - Frame::setWindowHasFocus -> SelectionController::setFocused
200
201         Active state is now correctly a Page-level concept.
202
203         The Mac parts of this patch were written by Darin.
204
205         Reviewed by Darin.
206
207         All tests pass.
208
209         * WebCore.base.exp: Updated for method renames.
210         * css/CSSStyleSelector.cpp:
211         (WebCore::CSSStyleSelector::checkOneSelector): Ditto.
212         * editing/SelectionController.cpp:
213         (WebCore::SelectionController::SelectionController): Initialize new
214         member.
215         (WebCore::SelectionController::focusedOrActiveStateChanged): New
216         private method. Most of this code came from Frame::setIsActive.
217         (WebCore::SelectionController::pageActivationChanged): Added.
218         (WebCore::SelectionController::setFocused): Added. Replaces
219         Frame::setWindowHasFocus.
220         (WebCore::SelectionController::isFocusedAndActive): Added. Replaces
221         Frame::isActive.
222         * editing/SelectionController.h:
223         * page/FocusController.cpp:
224         (WebCore::FocusController::FocusController): Initialize new member.
225         (WebCore::FocusController::setFocusedFrame): Changed to just call
226         SelectionController::setFocused, since active state has doesn't change
227         when the focused frame changes.
228         (WebCore::FocusController::setActive): Added. Replaces
229         Frame::setIsActive.
230         * page/FocusController.h:
231         (WebCore::FocusController::isActive): Added.
232         * page/Frame.cpp:
233         (WebCore::Frame::setDocument): Updated for method renames.
234         (WebCore::Frame::setFocusedNodeIfNeeded): Ditto.
235         (WebCore::Frame::updateSecureKeyboardEntryIfActive): Ditto.
236         (WebCore::FramePrivate::FramePrivate): Removed initialization of
237         removed members.
238         * page/Frame.h:
239         * page/FramePrivate.h:
240         * page/mac/WebCoreFrameBridge.h: Removed -selectionColor.
241         * page/mac/WebCoreFrameBridge.mm: Ditto.
242         * rendering/RenderListBox.cpp:
243         (WebCore::RenderListBox::paintItemForeground): Updated for method
244         renames.
245         (WebCore::RenderListBox::paintItemBackground): Ditto.
246         * rendering/RenderObject.cpp:
247         (WebCore::RenderObject::selectionBackgroundColor): Ditto.
248         (WebCore::RenderObject::selectionForegroundColor): Ditto.
249         * rendering/RenderTextControl.cpp:
250         (WebCore::RenderTextControl::capsLockStateMayHaveChanged): Ditto.
251         * rendering/RenderTheme.cpp:
252         (WebCore::RenderTheme::isFocused): Ditto.
253
254 2008-01-17  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
255
256         Reviewed by Simon.
257
258         * Make the nice 'safari' feature work on our port. When viewing a single image, clicking
259         on the image will zoom it.
260         * It seems like our platform can only determine the size of the image once it is completely
261         loaded. Call m_doc->imageChanged on the last chunk of data as well.
262
263         * loader/ImageDocument.cpp:
264         (WebCore::ImageTokenizer::finish):
265
266 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
267
268         Reviewed by Lars.
269
270         Set the library version of QtWebKit to the Qt version.
271
272         * WebCore.pro:
273
274 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
275
276         Reviewed by Holger.
277
278         Re-enable gzip compression as accepted encoding, now that the bug is fixed in Qt 4.4's network module.
279
280         * platform/network/qt/QNetworkReplyHandler.cpp:
281         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
282
283 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
284
285         Another Windows build fix, setCookies accidentially had a const
286         Document pointer.
287
288         * platform/network/win/CookieJarWin.cpp:
289
290 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
291
292         MSVC Windows build fix. Forward declaring Document in CookieJar.h
293         seems not enough for MSVC.
294
295         * platform/network/win/CookieJarWin.cpp:
296
297 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
298
299         Reviewed by Maciej, Lars, Holger.
300
301         http://bugs.webkit.org/show_bug.cgi?id=16589
302
303         Add a document parameter to WebCore::cookies, setCookies and cookiesEnabled.
304
305         * WebCore.pro:
306         * bindings/js/kjs_navigator.cpp:
307         (KJS::Navigator::getValueProperty):
308         * dom/Document.cpp:
309         (WebCore::Document::cookie):
310         * platform/CookieJar.h:
311         * platform/gtk/CookieJarGtk.cpp:
312         (WebCore::setCookies):
313         (WebCore::cookies):
314         * platform/mac/CookieJar.mm:
315         * platform/network/win/CookieJarWin.cpp:
316         * platform/qt/CookieJarQt.cpp:
317         (WebCore::setCookies):
318         (WebCore::cookies):
319         (WebCore::cookiesEnabled):
320         * platform/wx/TemporaryLinkStubs.cpp:
321
322 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
323
324         Reviewed by Holger.
325
326         Windows build fix. (use localtime_r again instead of _s)
327
328         * loader/FTPDirectoryDocument.cpp:
329         (WebCore::processFileDateString):
330
331 2008-01-17  Frans Englich  <fenglich@trolltech.com>
332
333         Reviewed by Simon Hausmann <hausmann@webkit.org>.
334
335         Fix linking on MinGW and at least one MSVC platform by having gmtimeQt in the correct namespace.
336
337         * loader/FTPDirectoryDocument.cpp:
338
339 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
340
341         Reviewed by Holger.
342
343         Don't link QtWebKit against libQtXml when building against Qt 4.4.
344
345         This is not necessary anymore since QXmlStream has been moved into QtCore.
346
347         * WebCore.pro:
348
349 2008-01-17  HÃ¥vard Wall  <hwall@trolltech.com>
350
351         Reviewed by Simon Hausmann <hausmann@webkit.org>.
352
353         Fix compilation on arm
354
355         * platform/graphics/qt/GraphicsContextQt.cpp:
356         (WebCore::GraphicsContext::endTransparencyLayer):
357
358 2008-01-17  Simon Hausmann  <shausman@trolltech.com>
359
360         Reviewed by Holger.
361
362         Fix compilation against Qt 4.4 without files that are specific for the Qt 4.3 build.
363
364         * WebCore.pro:
365         * platform/network/qt/ResourceHandleQt.cpp:
366         * platform/qt/MIMETypeRegistryQt.cpp:
367         * platform/qt/PlugInInfoStoreQt.cpp:
368
369 2008-01-17  Frans Englich  <fenglich@trolltech.com>
370
371         Reviewed by Simon Hausmann <hausmann@webkit.org>.
372
373         Fixes compilation with MinGW.
374         Neither localtime_r nor localtime_s are available on MingW, so instead of
375         calling back to the thread-unsafe localtime use QDateTime instead.
376
377         * loader/FTPDirectoryDocument.cpp:
378         (WebCore::FTPDirectoryTokenizer::WebCore::processFilesizeString):
379         (WebCore::FTPDirectoryTokenizer::WebCore::wasLastDayOfMonth):
380         (WebCore::FTPDirectoryTokenizer::WebCore::WebCore::gmtimeQt):
381         * loader/FTPDirectoryParser.cpp:
382         (WebCore::parseOneFTPLine):
383
384 2008-01-17  Dan Bernstein  <mitz@apple.com>
385
386         Reviewed by Dave Hyatt.
387
388         - fix determinePitch for segmented fonts
389
390         Covered by fast/css/font-face-implicit-local-font.html
391
392         * platform/graphics/FontFallbackList.cpp:
393         (WebCore::FontFallbackList::determinePitch): If the primary font is
394         segmented, treat as fixed pitch only if it has only one segment
395         and that segment is fixed-pitch.
396
397 2008-01-16  David Hyatt  <hyatt@apple.com>
398
399         Fix for http://bugs.webkit.org/show_bug.cgi?id=16611
400
401         Make sure vertical-align length values are offset from their parents rather than being absolute to the
402         line.
403
404         Reviewed by olliej
405
406         Added fast/css/vertical-align-lengths.html
407
408         * rendering/RenderObject.cpp:
409         (WebCore::RenderObject::getVerticalPosition):
410
411 2008-01-16  Dan Bernstein  <mitz@apple.com>
412
413         Reviewed by Dave Hyatt.
414
415         - fix for @font-face rules with unicode-range: always use a local font where not
416           explicitly overlaid.
417
418         Test: fast/css/font-face-implicit-local-font.html
419
420         * css/CSSFontSelector.cpp:
421         (WebCore::CSSFontSelector::addFontFaceRule): Changed to insert an implicit
422         @font-face rule with the local font the matches the family and description before
423         any explicit @font-face rules that overlay specific ranges of the same font.
424         * css/CSSSegmentedFontFace.h:
425         (WebCore::CSSSegmentedFontFace::numRanges): Addded.
426
427 2008-01-16  Antti Koivisto  <antti@apple.com>
428
429         Fix Tiger build.
430
431         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
432         (WebCore::MediaPlayerPrivate::disableUnsupportedTracks):
433
434 2008-01-16  Antti Koivisto  <antti@apple.com>
435
436         Reviewed by Adele.
437         
438         OS X fix for <rdar://problem/5605682>
439         Disallow streaming protocols for media elements
440         and <rdar://problem/5668711>
441         Limit the container and codec types that the <video> tag supports
442         
443         - Disable unsupported QuickTime tracks types. 
444         - Disallow streaming protocols (for now).
445         - Set QTMovie QTMoviePreventExternalURLLinksAttribute and QTSecurityPolicyNoCrossSiteAttribute 
446           to limit QuickTime's access to external resources.
447         
448         Windows patch coming up.
449
450         Tests: media/broken-video.html
451                media/unsupported-rtsp.html
452                media/unsupported-tracks.html
453
454         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
455         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
456         (WebCore::MediaPlayerPrivate::createQTMovie):
457         (WebCore::MediaPlayerPrivate::updateStates):
458         (WebCore::MediaPlayerPrivate::disableUnsupportedTracks):
459
460 2008-01-16  Rodney Dawes  <dobey@wayofthemonkey.com>
461
462         Reviewed by Alp Toker.
463
464         http://bugs.webkit.org/show_bug.cgi?id=16897
465         Add shared plugins directory to INCLUDE path
466
467         Add the plugins directory to INCLUDEPATH
468
469         * GNUmakefile.am:
470         * WebCore.pro:
471
472 2008-01-16  Geoffrey Garen  <ggaren@apple.com>
473
474         Reviewed by Sam Weinig.
475         
476         Added a debug counter for SQL transactions. This helped me debug an SQL
477         leak.
478
479         * bindings/js/JSCustomSQLTransactionCallback.cpp:
480         (WebCore::):
481         (WebCore::JSCustomSQLTransactionCallbackCounter::~JSCustomSQLTransactionCallbackCounter):
482         (WebCore::JSCustomSQLTransactionCallback::JSCustomSQLTransactionCallback):
483         (WebCore::JSCustomSQLTransactionCallback::~JSCustomSQLTransactionCallback):
484         * bindings/js/JSCustomSQLTransactionCallback.h:
485
486         * bindings/js/kjs_window.cpp: Removed a silly comment.
487
488 2008-01-16  David Hyatt  <hyatt@apple.com>
489
490         Fix for http://bugs.webkit.org/show_bug.cgi?id=14846, cell padding can't be changed dynamically.
491
492         Reviewed by Eric Seidel
493
494         Added fast/table/dynamic-cellpadding.html
495
496         * html/HTMLTableElement.cpp:
497         (WebCore::HTMLTableElement::parseMappedAttribute):
498         * rendering/RenderTable.cpp:
499         (WebCore::RenderTable::setCellPadding):
500         * rendering/RenderTable.h:
501
502 2008-01-16  David Hyatt  <hyatt@apple.com>
503
504         Fix for <rdar://problem/5681647> Item pages on http://www.stendmarsofa.com/ hang Safari
505
506         This regression was caused by an attempt to implement a WinIE quirk in RenderBlock::calcInlinePrefWidths.
507         The original patch introduced pathological O(n^2) behavior into this function even when the quirk didn't need
508         to apply.  In addition the quirk was only partially implemented (the full quirk did not care what was adjacent
509         to images and also needed bidi.cpp patched, since the quirk applies both when computing pref widths and when
510         laying out).
511
512         This new patch rewrites the quirk to be complete.  The original test case attached to the bug that tested a variety
513         of image/text combinations now fully matches WinIE.
514
515         Reviewed by Beth
516
517         Added fast/table/unbreakable-images-quirk.html
518
519         * rendering/RenderBlock.cpp:
520         (WebCore::RenderBlock::calcInlinePrefWidths):
521         * rendering/bidi.cpp:
522         (WebCore::RenderBlock::findNextLineBreak):
523
524 2008-01-16  Rodney Dawes  <dobey@wayofthemonkey.com>
525
526         Reviewed by Jon Honeycutt
527
528         Move isPluginBlacklisted to PluginPackageWin.cpp, to avoid
529         a circular dependency on PluginDatabaseWin
530         Remove the getFileVersion method, and just check the versions directly
531         in isPluginBlacklisted, as it was the only caller
532
533         http://bugs.webkit.org/show_bug.cgi?id=16884
534
535         * plugins/win/PluginDatabaseWin.cpp:
536         * plugins/win/PluginDatabaseWin.h:
537         * plugins/win/PluginPackageWin.cpp:
538         * plugins/win/PluginPackageWin.h:
539
540 2008-01-16  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
541
542         Reviewed by Lars.
543
544         * Set the cursor on the containingWindow() instead of the
545         nativeWidget()
546         * This should be safe even with plugins as the cursor is set
547         on the mouse events.
548
549         * platform/qt/WidgetQt.cpp:
550         (WebCore::Widget::setCursor):
551
552 2008-01-16  Brad Hughes  <bhughes@trolltech.com>
553
554         Reviewed by Lars.
555
556         Improve the sqlite3 dependency when building WebKit inside Qt.
557
558         Build sqlite3 into QtWebKit if a system sqlite3 development package
559         can't be found.
560
561         * WebCore.pro:
562
563 2008-01-16  Lars Knoll  <lars@trolltech.com>
564
565         Reviewed by Simon Hausmann <simon.hausmann@trolltech.com>.
566
567         Implement GraphicsContext::clipOut and fix transparency layers.
568
569         Transparency layers where broken in two ways: It always used the
570         complete device rect as the size of the layer pixmap and the pixmaps
571         where not correctly initialized to transparent.
572
573         This fixes the worst drawing errors in the Inspector and makes drawing it
574         10 times faster.
575
576         * platform/graphics/qt/GraphicsContextQt.cpp:
577         (WebCore::toQtLineJoin):
578         (WebCore::TransparencyLayer::TransparencyLayer):
579         (WebCore::GraphicsContextPlatformPrivate::p):
580         (WebCore::GraphicsContext::platformContext):
581         (WebCore::GraphicsContext::savePlatformState):
582         (WebCore::GraphicsContext::restorePlatformState):
583         (WebCore::GraphicsContext::drawRect):
584         (WebCore::GraphicsContext::drawLine):
585         (WebCore::GraphicsContext::drawEllipse):
586         (WebCore::GraphicsContext::strokeArc):
587         (WebCore::GraphicsContext::drawConvexPolygon):
588         (WebCore::GraphicsContext::fillRect):
589         (WebCore::GraphicsContext::fillRoundedRect):
590         (WebCore::GraphicsContext::clip):
591         (WebCore::GraphicsContext::drawFocusRing):
592         (WebCore::GraphicsContext::beginTransparencyLayer):
593         (WebCore::GraphicsContext::endTransparencyLayer):
594         (WebCore::GraphicsContext::clearRect):
595         (WebCore::GraphicsContext::strokeRect):
596         (WebCore::GraphicsContext::setLineCap):
597         (WebCore::GraphicsContext::setLineJoin):
598         (WebCore::GraphicsContext::setMiterLimit):
599         (WebCore::GraphicsContext::setAlpha):
600         (WebCore::GraphicsContext::setCompositeOperation):
601         (WebCore::GraphicsContext::clipOut):
602         (WebCore::GraphicsContext::translate):
603         (WebCore::GraphicsContext::origin):
604         (WebCore::GraphicsContext::rotate):
605         (WebCore::GraphicsContext::scale):
606         (WebCore::GraphicsContext::clipOutEllipseInRect):
607         (WebCore::GraphicsContext::addInnerRoundedRectClip):
608         (WebCore::GraphicsContext::setPlatformStrokeStyle):
609         (WebCore::GraphicsContext::setPlatformStrokeThickness):
610         (WebCore::GraphicsContext::setPlatformFillColor):
611         (WebCore::GraphicsContext::setUseAntialiasing):
612
613 2008-01-16  Lars Knoll  <lars@trolltech.com>
614
615         Reviewed by Simon Hausmann <simon.hausmann@trolltech.com>.
616
617         Trivially implement the themed search field by mapping it to a text field
618
619         Also add a bunch of notImplemented warnings for other places where we don't
620         have an implementatin in RenderTheme.
621
622         * platform/qt/RenderThemeQt.cpp:
623         (WebCore::RenderThemeQt::paintTextField):
624         (WebCore::RenderThemeQt::paintMenuListButton):
625         (WebCore::RenderThemeQt::adjustMenuListButtonStyle):
626         (WebCore::RenderThemeQt::paintSliderTrack):
627         (WebCore::RenderThemeQt::paintSliderThumb):
628         (WebCore::RenderThemeQt::paintSearchField):
629         (WebCore::RenderThemeQt::adjustSearchFieldStyle):
630         (WebCore::RenderThemeQt::adjustSearchFieldCancelButtonStyle):
631         (WebCore::RenderThemeQt::paintSearchFieldCancelButton):
632         (WebCore::RenderThemeQt::adjustSearchFieldDecorationStyle):
633         (WebCore::RenderThemeQt::paintSearchFieldDecoration):
634         (WebCore::RenderThemeQt::adjustSearchFieldResultsDecorationStyle):
635         (WebCore::RenderThemeQt::paintSearchFieldResultsDecoration):
636
637 2008-01-16  Holger Freyther  <holger.freyther@trolltech.com>
638
639         Reviewed by Simon.
640
641         * Follow the EventHandlerWin.cpp and always return true in the handlers.
642         * Match the windows implementation more closely as well.
643         * This is fixing "selection" bugs with the Web Inspector
644
645         * page/qt/EventHandlerQt.cpp:
646         (WebCore::EventHandler::focusDocumentView):
647         (WebCore::EventHandler::passMousePressEventToSubframe):
648         (WebCore::EventHandler::passMouseMoveEventToSubframe):
649         (WebCore::EventHandler::passMouseReleaseEventToSubframe):
650         (WebCore::EventHandler::passMousePressEventToScrollbar):
651
652 2008-01-16  Simon Hausmann  <hausmann@webkit.org>
653
654         Reviewed by Lars Knoll <lars@trolltech.com>.
655
656         Fix crashes in the new networking code.
657
658         When the ResourceLoader cancels the handle we have to make sure not to access
659         the resource handle afterwards again.
660
661         * platform/network/qt/QNetworkReplyHandler.cpp:
662         (WebCore::QNetworkReplyHandler::finish):
663         (WebCore::QNetworkReplyHandler::forwardData):
664
665 2008-01-16  Lars Knoll  <lars@trolltech.com>
666
667         Reviewed by Simon.
668
669         add conversion methods from and to QUrl to KURL.
670
671         Use them in the places I found at the moment. Fixes a bug
672         where form data was encoded twice.
673         Also fix QWebSettings to take a QUrl for the user style sheet
674         location.
675
676         * WebCore.pro:
677         * platform/KURL.h:
678         * platform/network/qt/QNetworkReplyHandler.cpp:
679         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
680         * platform/network/qt/ResourceRequestQt.cpp:
681         (WebCore::ResourceRequest::toNetworkRequest):
682         * platform/qt/KURLQt.cpp: Added.
683         (WebCore::KURL::KURL):
684         (WebCore::KURL::operator QUrl):
685
686 2008-01-15  Darin Adler  <darin@apple.com>
687
688         Rubber-stamped by Maciej Stachowiak and Oliver Hunt.
689
690         - fix <rdar://problem/5689748> REGRESSION: Cannot redirect to protocols handled by external applications
691
692         Put navigation policy delegate calls back for redirects.
693         Just rolled out the change where I took them out.
694
695         * loader/MainResourceLoader.cpp:
696         (WebCore::MainResourceLoader::callContinueAfterNavigationPolicy):
697         (WebCore::MainResourceLoader::continueAfterNavigationPolicy):
698         (WebCore::MainResourceLoader::willSendRequest):
699         * loader/MainResourceLoader.h:
700
701 2008-01-15  Adele Peterson  <adele@apple.com>
702
703         Reviewed by Sam.
704
705         Remove unused variable for old media control background drawing code.
706
707         * rendering/RenderThemeMac.h:
708         * rendering/RenderThemeMac.mm:
709         (WebCore::RenderThemeMac::RenderThemeMac):
710         (WebCore::RenderThemeMac::~RenderThemeMac):
711
712 2008-01-15  Sam Weinig  <sam@webkit.org>
713
714         Reviewed by Geoffrey Garen.
715
716         Fix <rdar://problem/5595552> r27608 introduced a 20% increase in JS binary size, 4% increase in WebCore binary size
717
718         - Update JS Function implementations to use a static function based method. This decreases
719           the binary size of an Intel only build by 1013.5K.
720
721         * WebCore.xcodeproj/project.pbxproj:
722         * bindings/js/JSDOMWindowCustom.cpp:
723         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
724         * bindings/js/JSEventTargetBase.cpp:
725         (WebCore::jsEventTargetAddEventListener):
726         (WebCore::jsEventTargetRemoveEventListener):
727         (WebCore::jsEventTargetDispatchEvent):
728         (WebCore::retrieveEventTargetAndCorrespondingNode):
729         * bindings/js/JSEventTargetBase.h:
730         * bindings/js/JSHTMLInputElementBase.cpp:
731         (WebCore::jsHTMLInputElementBaseFunctionSetSelectionRange):
732         (WebCore::JSHTMLInputElementBase::getOwnPropertySlot):
733         * bindings/js/JSHTMLInputElementBase.h:
734         * bindings/js/JSLocation.cpp:
735         (WebCore::JSLocation::getOwnPropertySlot):
736         (WebCore::jsLocationProtoFuncReplace):
737         (WebCore::jsLocationProtoFuncReload):
738         (WebCore::jsLocationProtoFuncAssign):
739         (WebCore::jsLocationProtoFuncToString):
740         * bindings/js/JSLocation.h:
741         * bindings/js/JSXMLHttpRequest.cpp:
742         (KJS::jsXMLHttpRequestPrototypeFunctionAbort):
743         (KJS::jsXMLHttpRequestPrototypeFunctionGetAllResponseHeaders):
744         (KJS::jsXMLHttpRequestPrototypeFunctionGetResponseHeader):
745         (KJS::jsXMLHttpRequestPrototypeFunctionOpen):
746         (KJS::jsXMLHttpRequestPrototypeFunctionSend):
747         (KJS::jsXMLHttpRequestPrototypeFunctionSetRequestHeader):
748         (KJS::jsXMLHttpRequestPrototypeFunctionOverrideMIMEType):
749         (KJS::jsXMLHttpRequestPrototypeFunctionAddEventListener):
750         (KJS::jsXMLHttpRequestPrototypeFunctionRemoveEventListener):
751         (KJS::jsXMLHttpRequestPrototypeFunctionDispatchEvent):
752         * bindings/js/JSXMLHttpRequest.h:
753         * bindings/js/JSXSLTProcessor.cpp:
754         (KJS::jsXSLTProcessorPrototypeFunctionImportStylesheet):
755         (KJS::jsXSLTProcessorPrototypeFunctionTransformToFragment):
756         (KJS::jsXSLTProcessorPrototypeFunctionTransformToDocument):
757         (KJS::jsXSLTProcessorPrototypeFunctionSetParameter):
758         (KJS::jsXSLTProcessorPrototypeFunctionGetParameter):
759         (KJS::jsXSLTProcessorPrototypeFunctionRemoveParameter):
760         (KJS::jsXSLTProcessorPrototypeFunctionClearParameters):
761         (KJS::jsXSLTProcessorPrototypeFunctionReset):
762         * bindings/js/JSXSLTProcessor.h:
763         * bindings/js/kjs_events.cpp:
764         (WebCore::jsClipboardPrototypeFunctionClearData):
765         (WebCore::jsClipboardPrototypeFunctionGetData):
766         (WebCore::jsClipboardPrototypeFunctionSetData):
767         (WebCore::jsClipboardPrototypeFunctionSetDragImage):
768         * bindings/js/kjs_events.h:
769         * bindings/js/kjs_navigator.cpp:
770         (KJS::pluginsFunctionRefresh):
771         (KJS::navigatorProtoFuncJavaEnabled):
772         * bindings/js/kjs_navigator.h:
773         * bindings/js/kjs_window.cpp:
774         (KJS::Window::getOwnPropertySlot):
775         (KJS::windowProtoFuncAToB):
776         (KJS::windowProtoFuncBToA):
777         (KJS::windowProtoFuncOpen):
778         (KJS::windowProtoFuncSetTimeout):
779         (KJS::windowProtoFuncClearTimeout):
780         (KJS::windowProtoFuncSetInterval):
781         (KJS::windowProtoFuncAddEventListener):
782         (KJS::windowProtoFuncRemoveEventListener):
783         (KJS::windowProtoFuncShowModalDialog):
784         (KJS::windowProtoFuncNotImplemented):
785         * bindings/js/kjs_window.h:
786         * bindings/scripts/CodeGenerator.pm:
787         * bindings/scripts/CodeGeneratorJS.pm:
788
789 2008-01-15  Adele Peterson  <adele@apple.com>
790
791         Reviewed by Dan.
792
793         Fix for <rdar://problem/5682492> With the <video> element, the audio is heard when forwarding or rewinding a movie while it's playing
794
795         * rendering/MediaControlElements.cpp: (WebCore::MediaControlSeekButtonElement::defaultEventHandler):
796           Instead of pausing the media when you stop seeking on mouse up, pause the video when you first start seeking on mouse down. 
797
798 2008-01-15  Alp Toker  <alp@atoker.com>
799
800         Rubber-stamped by Anders.
801
802         Make the HTTP backend configurable in the GTK+ port. curl is currently
803         the only option.
804
805         * GNUmakefile.am:
806
807 2008-01-15  Adele Peterson  <adele@apple.com>
808
809         Build fix.
810
811         * rendering/RenderThemeSafari.cpp: Removing MediaBackgroundAppearance.
812
813 2008-01-14  Samuel Weinig  <sam@webkit.org>
814
815         Reviewed by Darin.
816
817         Fix for <rdar://problem/5671040>
818         REGRESSION: 6% HTML iBench regression from r28722 (getElementsByClassName)
819
820         On my most consistent tests, this brings the HTML iBench from 1.46 -> 1.41,
821         which does not completely make up reported regression, but I was not able to
822         reproduce those findings either.
823
824         * css/CSSStyleSelector.cpp:
825         (WebCore::CSSStyleSelector::matchRules):
826         (WebCore::CSSStyleSelector::checkOneSelector):
827         * dom/ClassNames.cpp:
828         (WebCore::ClassNames::parseClassAttribute):
829         * dom/ClassNames.h:
830         (WebCore::ClassNames::contains):
831         (WebCore::ClassNames::operator[]):
832
833 2008-01-15  Adele Peterson  <adele@apple.com>
834
835         Build fix.  This time for real.
836
837         * rendering/RenderThemeSafari.cpp:
838
839 2008-01-15  Adele Peterson  <adele@apple.com>
840
841         Build fix.
842
843         * rendering/RenderThemeSafari.cpp:
844
845 2008-01-15  Dan Bernstein  <mitz@apple.com>
846
847         Reviewed by Darin Adler.
848
849         - fix <rdar://problem/5666926> svg/custom/use-css-no-effect-on-shadow-tree.svg is failing
850
851         * svg/SVGPreserveAspectRatio.cpp:
852         (WebCore::SVGPreserveAspectRatio::getCTM): Changed the arguments' type
853         from float to double in order to make the values passed to scale() and
854         translate() on Mac OS X and on Windows the same.
855         * svg/SVGPreserveAspectRatio.h:
856
857 2008-01-15  Alexey Proskuryakov  <ap@webkit.org>
858
859         Reviewed by Darin.
860
861         <rdar://problem/5342813> REGRESSION: Safari encodes mailto URLs incorrectly
862
863         Test: fast/encoding/mailto-always-utf-8.html
864
865         * platform/KURL.cpp: (WebCore::encodeRelativeString): Always use UTF-8 for mailto URLs.
866
867 2008-01-15  Adele Peterson  <adele@apple.com>
868
869         Reviewed by Adam and Antti.
870
871         WebCore part of fix for <rdar://problem/5619062> Add load progress indicator to video controls
872
873         * WebCore.base.exp: Removed symbol for wkGetMediaControlBackgroundImageData.  Added symbol for wkDrawMediaSliderTrack.
874         * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Removed case for MediaBackgroundAppearance.
875         * css/html4.css: Removed -webkit-appearance: media-background rule for the media panel element.  Removed unnecessary margin for slider.
876         * rendering/RenderStyle.h: (WebCore::): Removed MediaBackgroundAppearance.
877
878         * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::initAndDispatchProgressEvent):
879           Call updateMediaPlayer more frequently so the load progress control gets updated appropriately.
880         * platform/mac/WebCoreSystemInterface.h: Removed wkGetMediaControlBackgroundImageData.  Added wkDrawMediaSliderTrack.
881         * platform/mac/WebCoreSystemInterface.mm: ditto.
882
883         * rendering/RenderTheme.h: Removed paintMediaBackground. Added paintMediaSliderTrack.
884         * rendering/RenderTheme.cpp: (WebCore::RenderTheme::paint): Call paintMediaSliderTrack for elements with MediaSliderAppearance.
885         * rendering/RenderThemeMac.h: Removed paintMediaBackground. Added paintMediaSliderTrack.
886         * rendering/RenderThemeMac.mm:
887         (WebCore::RenderThemeMac::adjustSliderThumbSize): Added different sizes for the media slider thumb.
888         (WebCore::RenderThemeMac::paintMediaSliderTrack): Added.  Calls wkDrawMediaSliderTrack with the percentage the media has loaded.
889         * rendering/RenderThemeSafari.cpp: ditto.
890         (WebCore::RenderThemeSafari::adjustSliderThumbSize):
891         (WebCore::RenderThemeSafari::paintMediaSliderTrack):
892         * rendering/RenderThemeSafari.h:
893
894 2008-01-15  Alexey Proskuryakov  <ap@webkit.org>
895
896         Reviewed by Mark Rowe.
897
898         Some logging channels weren't initialized from user defaults.
899
900         * platform/mac/LoggingMac.mm: (WebCore::InitializeLoggingChannelsIfNecessary):
901         Initialize LogPlatformLeaks, LogStorageAPI, LogMedia, LogPlugin.
902
903 2008-01-14  Steve Falkenburg  <sfalken@apple.com>
904
905         Use shared vsprops for most vcproj properties.
906         
907         Reviewed by Darin.
908
909         * WebCore.vcproj/QTMovieWin.vcproj:
910         * WebCore.vcproj/WebCore.vcproj:
911         * platform/graphics/win/QTMovieWin.cpp:
912         (QTMovieWin::initializeQuickTime): Fix compiler warning.
913
914 2008-01-14  Eric Seidel  <eric@webkit.org>
915
916         Reviewed by mjs.
917
918         Remove a couple more uses of DeprecatedString
919
920         No functional changes, thus no test case.
921
922         * dom/Document.cpp:
923         (WebCore::Document::write):
924         (WebCore::Document::writeln):
925         (WebCore::Document::recalcStyleSelector):
926         * dom/Document.h:
927
928 2008-01-14  Pierre-Luc Beaudoin  <pierre-luc.beaudoin@collabora.co.uk>
929
930         Reviewed by Alp Toker.
931
932         Build fix: missing symbols when compiling WebKit/Gtk+ with --enable-svg-filters
933         http://bugs.webkit.org/show_bug.cgi?id=16874
934
935         * GNUmakefile.am:
936         * svg/graphics/cairo/SVGResourceFilterCairo.cpp: Added.
937         (WebCore::SVGResourceFilter::createPlatformData):
938         (WebCore::SVGResourceFilter::prepareFilter):
939         (WebCore::SVGResourceFilter::applyFilter):
940
941 2008-01-14  Finnur Thorarinsson  <finnur.webkit@gmail.com>
942
943         Reviewed by hyatt & eseidel.
944
945         - fix http://bugs.webkit.org/show_bug.cgi?id=16844
946         RenderText::addLineBoxRects erroneously includes last char for boundingBox
947
948         This patch fixes an issue with addLineBoxRects not correctly calculating the 
949         rects due to an off-by-one error in using box->end(). We were assuming that 
950         end() gives the index past the last character, when in fact it gives the 
951         index _of_ the last character. 
952
953         Eric Seidel and I could not find a way to test this via DRT. This method is 
954         only used by WebKit or Safari for displaying selection rects AFAICT.
955
956         * rendering/RenderText.cpp:
957         (WebCore::RenderText::addLineBoxRects):
958
959 2008-01-14  Darin Adler  <darin@apple.com>
960
961         Reviewed by Geoff.
962
963         - fix crash seen in layout tests
964
965         * html/HTMLFrameSetElement.cpp:
966         (WebCore::HTMLFrameSetElement::attach):
967         Remove incorrect cast to HTMLElement* for parentNode(). The parent is either an
968         HTMLElement or a Document, not necessarily an HTMLElement.
969
970 2008-01-14  Darin Adler  <darin@apple.com>
971
972         Reviewed by Sam.
973
974         - fix mistakes Sam noticed in my re-speed-up patch
975
976         * dom/Element.cpp:
977         (WebCore::Element::virtualHasTagName): Moved out of header file. No reason to make
978         this inline.
979         * dom/Element.h: Moved virtualHasTagName out of header file.
980
981         * dom/Node.cpp:
982         (WebCore::Node::virtualHasTagName): Moved out of header file. No reason to make
983         this inline.
984         * dom/Node.h: Removed incorrect "virtual" on hasTagName and moved virtualHasTagName
985         out of header file.
986
987         * platform/text/StringBuffer.h: Added. Has just the new StringBuffer class.
988
989         * platform/text/StringImpl.h: Removed StringBuffer class.
990
991         * loader/DocumentLoader.cpp: Added StringBuffer.h include.
992         * platform/text/String.cpp: Ditto.
993         * platform/text/StringImpl.cpp: Ditto.
994         * platform/text/TextCodecLatin1.cpp: Ditto.
995         * platform/text/TextCodecUTF16.cpp: Ditto.
996         * platform/text/TextCodecUserDefined.cpp: Ditto.
997
998         * WebCore.vcproj/WebCore.vcproj: Added StringBuffer.h.
999         * WebCore.xcodeproj/project.pbxproj: Ditto.
1000
1001 2008-01-14  Dave Hyatt  <hyatt@apple.com>
1002
1003         Clean up all the misplaced graphics files after the recent file moves.  Clean up the project to
1004         accurately reflect the location of all the graphics files.
1005         
1006         Reviewed by Adam
1007
1008         * WebCore.vcproj/WebCore.vcproj:
1009         * platform/graphics/win/GraphicsContextWin.cpp: Copied from platform/win/GraphicsContextWin.cpp.
1010         * platform/graphics/win/UniscribeController.cpp: Copied from platform/win/UniscribeController.cpp.
1011         * platform/graphics/win/UniscribeController.h: Copied from platform/win/UniscribeController.h.
1012         * platform/win/GraphicsContextWin.cpp: Removed.
1013         * platform/win/UniscribeController.cpp: Removed.
1014         * platform/win/UniscribeController.h: Removed.
1015
1016 2008-01-14  Geoffrey Garen  <ggaren@apple.com>
1017
1018         Reviewed by Sam Weinig.
1019         
1020         Some cleanup to my last patch.
1021
1022         Removed one unused setter declaration and one unused setter definition.
1023         
1024         Renamed DoNotCheckDomainSecurityOnRead to DoNotCheckDomainSecurityOnGet
1025         because "get" is all over the IDL files, and "read" is not.
1026
1027         * bindings/scripts/CodeGeneratorJS.pm:
1028         * page/DOMWindow.h:
1029         (WebCore::DOMWindow::defaultstatus):
1030         * page/DOMWindow.idl:
1031
1032 2008-01-14  Dan Bernstein  <mitz@apple.com>
1033
1034         Rubber-stamped by Alice Liu.
1035
1036         - remove reference to nonexistent file
1037
1038         * WebCore.vcproj/WebCore.vcproj: Removed reference to SVGFont.h.
1039
1040 2008-01-14  Darin Adler  <darin@apple.com>
1041
1042         Reviewed by Adam.
1043
1044         - re-speed-up the page load test (my StringImpl change slowed it down)
1045           <rdar://problem/5677241> 1.5% PLT regression from r29098
1046
1047         To reverse the slowdown I caused by changing StringImpl, I tightened it up,
1048         and also did a little optimization in the HTML tokenizer and in other clients
1049         of Vector.
1050
1051         * WebCore.base.exp: Removed export of a now-inline function.
1052
1053         * css/CSSParser.cpp:
1054         (WebCore::CSSParser::parseTransitionProperty): Removed use of DeprecatedString
1055         to get property ID. This could be sped up even more by writing a fast path
1056         to use a local Vector<char> rather than allocating a string.
1057         (WebCore::convertASCIIToFloat): Added. Allows numeric conversion without
1058         allocating a string object to hold the number.
1059         (WebCore::CSSParser::lex): Changed to call convertASCIIToFloat instead of
1060         DeprecatedString::toFloat.
1061
1062         * dom/Element.h:
1063         (WebCore::Element::hasTagName): Made this non-virtual and inline if you have
1064         an Element*. It's still virtual if you have a Node*.
1065         (WebCore::Element::virtualHasTagName): Virtual version that makes the Node*
1066         case work.
1067
1068         * dom/Node.h:
1069         (WebCore::Node::hasTagName): Made this non-virtual and inline so that Element
1070         can override it with an inline. This is the same technique we use for
1071         firstChild and lastChild.
1072         (WebCore::Node::virtualHasTagName): This is the private virtual that Element
1073         overrides.
1074
1075         * dom/Text.cpp:
1076         (WebCore::Text::splitText): Clean up by using a RefPtr here instead of a
1077         PassRefPtr.
1078
1079         * html/HTMLTokenizer.cpp:
1080         (WebCore::HTMLTokenizer::parseSpecial): Use the new advancePastNonNewline(),
1081         which is more efficient in cases where we know the character is not a newline
1082         and hence we don't have to update the line number.
1083         (WebCore::HTMLTokenizer::parseComment): Ditto.
1084         (WebCore::HTMLTokenizer::parseServer): Ditto.
1085         (WebCore::HTMLTokenizer::parseProcessingInstruction): Ditto.
1086         (WebCore::HTMLTokenizer::parseText): Ditto.
1087         (WebCore::HTMLTokenizer::parseEntity): Ditto.
1088         (WebCore::HTMLTokenizer::parseTag): Ditto. Also streamline the QuotedValue case
1089         so there's one less branch taken for non-punctuation characters since this
1090         code path is *so* hot.
1091         (WebCore::HTMLTokenizer::write): More of the same.
1092
1093         * loader/Cache.cpp:
1094         (WebCore::Cache::lruListFor): Use Vector::grow instead of resize.
1095
1096         * loader/DocumentLoader.cpp:
1097         (WebCore::canonicalizedTitle): Use StringBuffer instead of Vector<UChar>.
1098
1099         * loader/TextResourceDecoder.cpp:
1100         (WebCore::TextResourceDecoder::checkForCSSCharset): Use Vector::grow instead of resize.
1101         (WebCore::TextResourceDecoder::checkForHeadCharset): Ditto.
1102         (WebCore::TextResourceDecoder::decode): Use Vector::grow and shrink instead of resize.
1103         (WebCore::TextResourceDecoder::flush): Use Vector::shrink instead of resize.
1104
1105         * platform/KURL.cpp:
1106         (WebCore::KURL::decode_string): Use Vector::grow instead of resize.
1107
1108         * platform/SharedBuffer.cpp:
1109         (WebCore::SharedBuffer::clear): Use Vector::shrink instead of resize.
1110
1111         * platform/graphics/BitmapImage.cpp:
1112         (WebCore::BitmapImage::cacheFrame): Use Vector::grow instead of resize.
1113
1114         * platform/network/FormData.cpp:
1115         (WebCore::FormData::appendData): Use Vector::grow instead of resize.
1116         (WebCore::FormData::flatten): Ditto.
1117
1118         * platform/text/AtomicString.cpp:
1119         (WebCore::CStringTranslator::translate): Use a new StringImpl constructor made just
1120         for use by AtomicString. Avoids setting fields twice, and also preserves reference
1121         count behavior (which I changed for the other constructors, since they're entirely
1122         private and used only inside the class).
1123         (WebCore::UCharBufferTranslator::translate): Ditto.
1124
1125         * platform/text/Base64.cpp:
1126         (WebCore::base64Encode): Use Vector::grow instead of resize.
1127         (WebCore::base64Decode): Use Vector::grow and shrink instead of resize.
1128
1129         * platform/text/PlatformString.h:
1130         (WebCore::String::adopt): Added an overload for the new StringBuffer class. Also
1131         made both versions inline.
1132
1133         * platform/text/SegmentedString.h:
1134         (WebCore::SegmentedString::advancePastNewline): Added. One less branch for case
1135         where the character is known to be a newline.
1136         (WebCore::SegmentedString::advancePastNonNewline): Added. Less code for case where
1137         the character is known not to be a newline.
1138
1139         * platform/text/String.cpp:
1140         (WebCore::String::append): Use StringBuffer instead of Vector<UChar>.
1141         (WebCore::String::insert): Ditto.
1142         (WebCore::String::truncate): Ditto.
1143         (WebCore::String::remove): Ditto.
1144         (WebCore::String::format): Use Vector::grow instead of resize.
1145
1146         * platform/text/StringImpl.cpp:
1147         (WebCore::StringImpl::StringImpl): Changed constructors to start with a refCount
1148         of 1 instead of 0, and made them all inline. Eliminates the WithOneRef constructor
1149         since they all behave this way now. The only exceptions are the constructors for
1150         AtomicString, which retain the old behavior.
1151         (WebCore::StringImpl::empty): Simplified, since we no longer need to use the
1152         special WithOneRef constructor.
1153         (WebCore::StringImpl::toCoordsArray): Use StringBuffer instead of Vector<UChar>.
1154         (WebCore::StringImpl::lower): Ditto.
1155         (WebCore::StringImpl::upper): Ditto.
1156         (WebCore::StringImpl::secure): Ditto.
1157         (WebCore::StringImpl::foldCase): Ditto.
1158         (WebCore::StringImpl::simplifyWhiteSpace): Ditto. Also change to use Vector::shrink
1159         instead of resize (since half of the function uses Vector<UChar>).
1160         (WebCore::StringImpl::capitalize): Use StringBuffer instead of Vector<UChar>.
1161         (WebCore::StringImpl::replace): Ditto.
1162         (WebCore::StringImpl::ascii): Streamlined a bit.
1163         (WebCore::StringImpl::createStrippingNullCharacters): Use StringBuffer insetad of
1164         Vector<UChar>. Took out checks for null characters and 0 length that aren't needed.
1165         Coded the check for null characters in a slightly more efficient way. Since this
1166         is so hot, didn't call adopt at all, putting the code right in here, including
1167         the call to the StringImpl constructor and adoptRef (for the fast case).
1168         (WebCore::StringImpl::adopt): Added a version for the new StringBuffer class.
1169         Removed the attempt to resize the buffer at the time we adopt based on measuring
1170         actual use and realizing that it's just a character here or there and not worth
1171         a call to fastRealloc. Changed to use adoptRef since the constructor now starts
1172         with a refCount of 1.
1173         (WebCore::StringImpl::create): Changed to use adoptRef since the constructor now
1174         starts with a refCount of 1.
1175         (WebCore::StringImpl::createWithTerminatingNullCharacter): Ditto.
1176         (WebCore::StringImpl::copy): Ditto. Also made non-inline since the constructor
1177         itself is now inline.
1178
1179         * platform/text/StringImpl.h: Added a StringBuffer class that's useful for
1180         putting characters into a buffer before creating an immutable string. Not good
1181         at resizing the way Vector<UChar> is, so only useful for things that rarely need
1182         to be resized. Added a new AdoptBuffer constructor and empty constructor, but
1183         made all constructors private so they can be inlined and only used inside the
1184         StringImpl class. Added two new constructors for AtomicString. Made copy()
1185         no longer inline. Changed the type of the [] operator to unsigned instead of
1186         int and added an assertion. Made the hash functions inline.
1187
1188         * platform/text/TextCodecICU.cpp:
1189         (WebCore::TextCodecICU::encode): Use Vector::grow instead of resize.
1190
1191         * platform/text/TextCodecLatin1.cpp:
1192         (WebCore::TextCodecLatin1::decode): Use StringBuffer instead of Vector<UChar>.
1193         (WebCore::encodeComplexWindowsLatin1): Use Vector::grow instead of resize.
1194
1195         * platform/text/TextCodecUTF16.cpp:
1196         (WebCore::TextCodecUTF16::decode): Use StringBuffer instead of Vector<UChar>.
1197
1198         * platform/text/TextCodecUserDefined.cpp:
1199         (WebCore::TextCodecUserDefined::decode): Use StringBuffer instead of Vector<UChar>.
1200         (WebCore::encodeComplexUserDefined): Use Vector::grow instead of resize.
1201
1202         * platform/text/TextEncoding.cpp:
1203         (WebCore::TextEncoding::encode): Use Vector::grow instead of resize.
1204
1205         * platform/text/TextStream.cpp:
1206         (WebCore::TextStream::operator<<): Use Vector::grow instead of resize.
1207
1208         * platform/text/mac/TextCodecMac.cpp:
1209         (WebCore::TextCodecMac::encode): Use Vector::grow instead of resize.
1210
1211         * rendering/AutoTableLayout.cpp:
1212         (WebCore::AutoTableLayout::insertSpanCell): Use Vector::grow instead of resize.
1213
1214         * rendering/RenderFrameSet.h:
1215         (WebCore::FrameEdgeInfo::FrameEdgeInfo): Allocate vectors with the correct initial
1216         size instead of calling resize on them after allocating empty.
1217
1218         * rendering/RenderListMarker.cpp:
1219         (WebCore::RenderListMarker::paint): Use Vector::grow instead of resize.
1220
1221         * rendering/RenderStyle.cpp: Removed CursorList::operator==.
1222         * rendering/RenderStyle.h:
1223         (WebCore::CursorList::operator==): Implemented using the Vector ==.
1224         (WebCore::CursorList::operator!=): Ditto.
1225
1226         * rendering/RenderTable.cpp:
1227         (WebCore::RenderTable::splitColumn): Use Vector::grow instead of resize.
1228         (WebCore::RenderTable::appendColumn): Ditto.
1229
1230         * rendering/RenderTableSection.cpp:
1231         (WebCore::RenderTableSection::ensureRows): Use Vector::grow instead of resize.
1232
1233         * rendering/bidi.cpp:
1234         (WebCore::addMidpoint): Use Vector::grow instead of resize.
1235
1236         * xml/XPathNodeSet.h:
1237         (WebCore::XPath::NodeSet::clear): Use Vector::shrink instead of resize.
1238
1239 2008-01-13  Steve Falkenburg  <sfalken@apple.com>
1240
1241         Share common files across projects.
1242         
1243         Unify vsprops files
1244         Debug:          common.vsprops, debug.vsprops
1245         Debug_Internal: common.vsprops, debug.vsprops, debug_internal.vsprops
1246         Release:        common.vsprops, release.vsprops
1247         
1248         Shared properties can go into common.vsprops, shared debug settings can go into debug.vsprops.
1249         debug_internal.vsprops will be mostly empty except for file path prefix modifiers.
1250
1251         Pull auto-version.sh, VERSION, and PRODUCTVERSION from tools.
1252
1253         Reviewed by Adam Roben.
1254
1255         * WebCore.vcproj/PRODUCTVERSION: Removed.
1256         * WebCore.vcproj/QTMovieWin.vcproj:
1257         * WebCore.vcproj/VERSION: Removed.
1258         * WebCore.vcproj/WebCore.vcproj:
1259         * WebCore.vcproj/auto-version.sh: Removed.
1260         * WebCore.vcproj/debug.vsprops: Removed.
1261         * WebCore.vcproj/debug_internal.vsprops: Removed.
1262         * WebCore.vcproj/release.vsprops: Removed.
1263
1264 2008-01-13  Dan Bernstein  <mitz@apple.com>
1265
1266         Reviewed by Darin Adler.
1267
1268         - fix http://bugs.webkit.org/show_bug.cgi?id=16865
1269           fast/layers/resize-layer-deletion-crash.html crashes under GuardMalloc
1270
1271         * rendering/RenderBox.cpp:
1272         (WebCore::RenderBox::destroy): Removed the call to
1273         RenderLayer::destroy() from here, because ~RenderLayer() calls
1274         RenderObject() methods.
1275         * rendering/RenderObject.cpp:
1276         (WebCore::RenderObject::destroy): Added the call to
1277         RenderLayer::destroy() here.
1278
1279 2008-01-13  Eric Seidel  <eric@webkit.org>
1280
1281         Reviewed by darin.
1282
1283         Range.insertNode does not update endContainer endIndex correctly
1284         in the case where it had to split a text node.
1285         http://bugs.webkit.org/show_bug.cgi?id=16765
1286         
1287         Darin pointed out during review that we still don't handle the dynamic
1288         range case (where the dom tree changes not using range methods)
1289         Thus this code will get ripped out when we add that.  The test cases
1290         are still valid and useful however, so I'm landing this as-is.
1291
1292         Tests: fast/dom/Range/range-insertNode-separate-endContainer.html
1293                fast/dom/Range/range-insertNode-splittext.html
1294
1295         * dom/Range.cpp:
1296         (WebCore::Range::insertNode): handle the splitText case correctly.
1297
1298 2008-01-13  Darin Adler  <darin@apple.com>
1299
1300         Reviewed by Eric.
1301
1302         - http://bugs.webkit.org/show_bug.cgi?id=16861
1303           get rid of unnecessary string copying
1304
1305         * dom/Document.cpp:
1306         (WebCore::Document::setDomain): Removed unneeded call to copy.
1307         (WebCore::Document::parseQualifiedName): Removed unneeded call to copy, and
1308         unneeded length argument to substring, which stops at the end of the string
1309         if you don't specify a length.
1310         (WebCore::Document::createAttributeNS): Replaced code that was calling copy
1311         with more-efficient code using the substring function.
1312         * dom/StyledElement.cpp:
1313         (WebCore::StyledElement::addCSSColor): Removed unneeded call to copy.
1314         * editing/InsertIntoTextNodeCommand.cpp:
1315         (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand): Removed
1316         unneeded copy and also initialized text instead of assigning to it.
1317         (WebCore::InsertIntoTextNodeCommand::doApply): Removed redundant assertions.
1318         (WebCore::InsertIntoTextNodeCommand::doUnapply): Ditto.
1319
1320         * editing/htmlediting.cpp:
1321         (WebCore::stringWithRebalancedWhitespace): Removed unneeded call to copy.
1322         This one was particularly bad since we just turned around and copied it again!
1323
1324         * editing/markup.cpp:
1325         (WebCore::stringValueForRange): Removed unneeded call to copy.
1326
1327         * loader/icon/IconDatabase.cpp:
1328         (WebCore::IconDatabase::performOpenInitialization): Changed logging code to not
1329         get the path from the database object. This was the only reason the database
1330         had to keep its path around.
1331
1332         * platform/sql/SQLiteDatabase.cpp:
1333         (WebCore::SQLiteDatabase::open): Use a local variable instead of a data member to
1334         convert the string to a null-terminated one.
1335         (WebCore::SQLiteDatabase::close): Removed the code to clear out m_path.
1336         * platform/sql/SQLiteDatabase.h: Removed the m_path data member and the path
1337         functio member. Also tweaked formatting and comments a bit. Removed the unused
1338         escapeSQLString function.
1339
1340         * platform/text/String.cpp: (WebCore::operator+): Removed uneeded calls to copy.
1341
1342 2008-01-13  Oliver Hunt  <oliver@apple.com>
1343
1344         Attempt to fix QT build
1345
1346         * html/CanvasRenderingContext2D.cpp:
1347         (WebCore::CanvasRenderingContext2D::willDraw):
1348
1349 2008-01-13  Oliver Hunt  <oliver@apple.com>
1350
1351         Reviewed by Mark Rowe.
1352
1353         Avoid repainting the entire canvas element when possible.
1354
1355         http://bugs.webkit.org/show_bug.cgi?id=16859
1356
1357         We now only register the dirty regions of a canvas for repainting, rather
1358         than the entire element (though repaint coalescing may choose to combine
1359         these regions).  This doesn't cause a measurable regression in the worst
1360         case (clearing the canvas repeatedly), but is a moderate-large win if only
1361         a minor update has occurred.  If there is any CSS scaling applied to the
1362         canvas almost any update short of clearing the entire element is substantially
1363         faster.
1364
1365         * html/CanvasRenderingContext2D.cpp:
1366         (WebCore::CanvasRenderingContext2D::willDraw):
1367         * html/HTMLCanvasElement.cpp:
1368         (WebCore::HTMLCanvasElement::willDraw):
1369
1370 2008-01-13  Michael Goddard  <michael.goddard@trolltech.com>
1371
1372         Reviewed by Anders Carlsson.
1373
1374         Move RuntimeObjectImp creations into Instance.
1375         Make the ctor protected, and Instance a friend class, so
1376         that all creation of RuntimeObjectImps goes through
1377         one place.
1378
1379         * bindings/js/kjs_dom.cpp:
1380         (WebCore::getRuntimeObject):
1381
1382 2008-01-12  Rodney Dawes  <dobey@wayofthemonkey.com>
1383
1384         Gtk debug build fix.  Reviewed by Mark Rowe.
1385
1386         Add plugin logging channel, and use it rather than Win32-specific debugging methods _RPTF1 _RPTF2 and _CRT_WARN.
1387
1388         * WebCore.pro: Add plugins directory to DEPENDPATH so dependencies are correctly tracked.
1389         * platform/Logging.cpp:
1390         * platform/Logging.h:
1391         * plugins/PluginDebug.h:
1392
1393 2008-01-12  Adam Barth  <hk9565@gmail.com>
1394
1395         Reviewed by Maciej (and also tweaked a little bit).
1396
1397         - more thorough fix for some crashing tests
1398           http://bugs.webkit.org/show_bug.cgi?id=16782
1399
1400         * loader/FrameLoader.cpp:
1401         (WebCore::FrameLoader::urlSelected):
1402         (WebCore::FrameLoader::submitForm):
1403         (WebCore::FrameLoader::executeIfJavaScriptURL):
1404         * loader/FrameLoader.h:
1405
1406 2008-01-12  Maciej Stachowiak  <mjs@apple.com>
1407
1408         Reviewed by Sam.
1409
1410         - fixed <rdar://problem/5556374> REGRESSION: cross-domain error when one URL uses an explicit port number and another doesn't
1411         
1412         * platform/SecurityOrigin.cpp:
1413         (WebCore::isDefaultPortForProtocol):
1414         (WebCore::SecurityOrigin::SecurityOrigin):
1415
1416 2008-01-11  Geoffrey Garen  <ggaren@apple.com>
1417
1418         Reviewed by Oliver Hunt.
1419         
1420         Fixed <rdar://problem/5665251> REGRESSION (r28880-r28886): Global
1421         variable access (16644)
1422         
1423         Removed the ReadOnly bit from some properties, to match Firefox. Also
1424         removed status-related setters, to allow using their names as variable
1425         names.
1426         
1427         * bindings/scripts/CodeGeneratorJS.pm: Added support for properties that
1428         are one-way across domain boundaries, to match Firefox.
1429
1430         * bindings/js/kjs_window.cpp: Changed ReadOnly declarations to match FF.
1431
1432         * bindings/scripts/CodeGeneratorJS.pm: Don't use JSObject:: because
1433         we don't know that JSObject is our base class.
1434
1435         * page/DOMWindow.idl: Replaced lots of readonly declarations with
1436         [Replaceable] declarations.
1437
1438         * page/DOMWindow.h: Removed interfaces for setting status text via the
1439         DOM. (They were getting in the way of, e.g., "var status"
1440         declarations.) By default, IE 7 and FF disable these interfaces in order
1441         to defend against phishing attacks that try to spoof domain names in the
1442         statusbar.
1443         * page/DOMWindow.cpp:
1444
1445 2008-01-11  Anyang Ren  <anyang.ren@gmail.com>
1446
1447         Reviewed by Darin Adler.
1448
1449         http://bugs.webkit.org/show_bug.cgi?id=15960
1450         The view source mode should skip an empty attribute value only if
1451         the attribute name is not followed by an equal sign (=).
1452
1453         Test: fast/frames/viewsource-empty-attribute-value.html
1454
1455         * html/HTMLViewSourceDocument.cpp:
1456         (WebCore::HTMLViewSourceDocument::addViewSourceToken):
1457
1458 2008-01-11  Sylvain Pasche  <sylvain.pasche@gmail.com>
1459
1460         Reviewed by Alp Toker.
1461
1462         [Gtk] Uneven glyph spacing with subpixel antialiasing
1463         http://bugs.webkit.org/show_bug.cgi?id=16715
1464
1465         Use cairo font options from the default GDK screen when creating a
1466         scaled font.
1467
1468         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
1469         (WebCore::FontPlatformData::FontPlatformData):
1470
1471 2008-01-11  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
1472
1473         Reviewed by Maciej.
1474
1475         Added a new forwarding header, because Activation.h has been separated
1476         from function.h
1477
1478         * ForwardingHeaders/kjs/Activation.h: Added.
1479
1480 2008-01-11  Luca Bruno  <lethalman88@gmail.com>
1481
1482         Reviewed by Alp Toker.
1483
1484         http://bugs.webkit.org/show_bug.cgi?id=16729
1485         [cURL] Allow multiple files for upload
1486
1487         * platform/network/ResourceHandleInternal.h:
1488         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1489         * platform/network/curl/ResourceHandleCurl.cpp:
1490         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
1491         * platform/network/curl/ResourceHandleManager.cpp:
1492         (WebCore::readCallback): added
1493         (WebCore::ResourceHandleManager::setupPOST): setup for streaming the POST
1494         (WebCore::ResourceHandleManager::startJob):
1495         (WebCore::ResourceHandleManager::cancel): revert the previous patch for regression
1496         * platform/network/curl/ResourceHandleManager.h:
1497
1498 2008-01-11  Christian Dywan  <christian@imendio.com>
1499
1500         Reviewed by Alp Toker.
1501
1502         [Gtk] Menu items need underscores
1503         http://bugs.webkit.org/show_bug.cgi?id=16817
1504
1505         Add underscores to appropriate menu labels.
1506         Also adjust strings slightly.
1507
1508         * platform/gtk/ContextMenuItemGtk.cpp:
1509         (WebCore::ContextMenuItem::createNativeMenuItem):
1510         * platform/gtk/LocalizedStringsGtk.cpp:
1511         (WebCore::searchableIndexIntroduction):
1512         (WebCore::fileButtonChooseFileLabel):
1513         (WebCore::fileButtonNoFileSelectedLabel):
1514         (WebCore::contextMenuItemTagOpenLinkInNewWindow):
1515         (WebCore::contextMenuItemTagDownloadLinkToDisk):
1516         (WebCore::contextMenuItemTagCopyLinkToClipboard):
1517         (WebCore::contextMenuItemTagOpenImageInNewWindow):
1518         (WebCore::contextMenuItemTagDownloadImageToDisk):
1519         (WebCore::contextMenuItemTagCopyImageToClipboard):
1520         (WebCore::contextMenuItemTagOpenFrameInNewWindow):
1521         (WebCore::contextMenuItemTagCopy):
1522         (WebCore::contextMenuItemTagGoBack):
1523         (WebCore::contextMenuItemTagGoForward):
1524         (WebCore::contextMenuItemTagStop):
1525         (WebCore::contextMenuItemTagReload):
1526         (WebCore::contextMenuItemTagCut):
1527         (WebCore::contextMenuItemTagPaste):
1528         (WebCore::contextMenuItemTagIgnoreSpelling):
1529         (WebCore::contextMenuItemTagLearnSpelling):
1530         (WebCore::contextMenuItemTagSearchWeb):
1531         (WebCore::contextMenuItemTagLookUpInDictionary):
1532         (WebCore::contextMenuItemTagOpenLink):
1533         (WebCore::contextMenuItemTagIgnoreGrammar):
1534         (WebCore::contextMenuItemTagSpellingMenu):
1535         (WebCore::contextMenuItemTagShowSpellingPanel):
1536         (WebCore::contextMenuItemTagCheckSpelling):
1537         (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
1538         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
1539         (WebCore::contextMenuItemTagFontMenu):
1540         (WebCore::contextMenuItemTagBold):
1541         (WebCore::contextMenuItemTagItalic):
1542         (WebCore::contextMenuItemTagUnderline):
1543         (WebCore::contextMenuItemTagOutline):
1544         (WebCore::contextMenuItemTagWritingDirectionMenu):
1545         (WebCore::contextMenuItemTagDefaultDirection):
1546         (WebCore::contextMenuItemTagLeftToRight):
1547         (WebCore::contextMenuItemTagRightToLeft):
1548         (WebCore::contextMenuItemTagInspectElement):
1549         (WebCore::searchMenuClearRecentSearchesText):
1550
1551 2008-01-11  Ada Chan  <adachan@apple.com>
1552
1553         <rdar://problem/5681557> On Windows Safari, mouse events are ignored after clicking on link that triggers download
1554         Moved the call to cache page from provisionalLoadStarted() to commitProvisionalLoad(), since 
1555         provisionalLoadStarted() can be called for cases that do not result in a page navigation, for example,
1556         when a link to download a file has been clicked.
1557
1558         Reviewed by John and Anders.
1559
1560         * loader/FrameLoader.cpp:
1561         (WebCore::FrameLoader::provisionalLoadStarted):
1562         (WebCore::FrameLoader::commitProvisionalLoad):
1563
1564 2008-01-11  Jon Honeycutt  <jhoneycutt@apple.com>
1565
1566         Reviewed by Anders.
1567
1568         <rdar://problem/5683529> plugins/embed-inside-object.html is timing
1569         out/failing
1570
1571         Revert to using FrameTree::find() so that frame aliases like "_self" and
1572         "_current" are interpreted properly
1573
1574         * plugins/win/PluginViewWin.cpp:
1575         (WebCore::PluginViewWin::performRequest):
1576         (WebCore::PluginViewWin::load):
1577
1578 2008-01-11  Alp Toker  <alp@atoker.com>
1579
1580         Reviewed by Dave Hyatt and Mark Rowe.
1581
1582         http://bugs.webkit.org/show_bug.cgi?id=16089
1583         [GTK] Support custom fonts, CachedFont::platformDataFromCustomData()
1584
1585         Add support for CSS2 @font-face custom/downloadable fonts to the GTK+
1586         port.
1587
1588         * GNUmakefile.am:
1589         * WebCore.pro:
1590         * loader/CachedFont.cpp:
1591         (WebCore::CachedFont::~CachedFont):
1592         (WebCore::CachedFont::ensureCustomFontData):
1593         (WebCore::CachedFont::platformDataFromCustomData):
1594         (WebCore::CachedFont::allReferencesRemoved):
1595         * platform/graphics/gtk/FontCustomPlatformData.cpp: Added.
1596         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
1597         (WebCore::FontCustomPlatformData::fontPlatformData):
1598         (WebCore::releaseData):
1599         (WebCore::createFontCustomPlatformData):
1600         * platform/graphics/gtk/FontCustomPlatformData.h: Added.
1601         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
1602         * platform/graphics/gtk/FontPlatformData.h:
1603         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
1604         (WebCore::FontPlatformData::FontPlatformData):
1605         (WebCore::FontPlatformData::init):
1606         (WebCore::FontPlatformData::isFixedPitch):
1607         * platform/graphics/gtk/SimpleFontDataGtk.cpp:
1608         (WebCore::SimpleFontData::platformDestroy):
1609
1610 2008-01-11  Adam Roben  <aroben@apple.com>
1611
1612         Remove FrameLoader::committedFirstRealDocumentLoad
1613         
1614         This method no longer has any callers.
1615
1616         Reviewed by Hyatt.
1617
1618         * loader/FrameLoader.h:
1619
1620 2008-01-11  Antti Koivisto  <antti@apple.com>
1621
1622         Add a standalone version of the blog post video player as a manual test.
1623
1624         * manual-tests/resources/touch-poster.png: Added.
1625         * manual-tests/video-player.html: Added.
1626
1627 2008-01-10  Antti Koivisto  <antti@apple.com>
1628
1629         Reviewed by Adam.
1630
1631         Fix <rdar://problem/5682767>
1632         Video does not show up in http://webkit.org/blog/140/html5-media-support/ on Windows
1633         
1634         Take care that GWorld is created and deletes when needed as size or visibility changes.
1635
1636         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
1637         (WebCore::MediaPlayerPrivate::load):
1638         * platform/graphics/win/QTMovieWin.cpp:
1639         (QTMovieWinPrivate::QTMovieWinPrivate):
1640         (QTMovieWinPrivate::updateGWorld):
1641         (QTMovieWinPrivate::setSize):
1642         (QTMovieWin::setVisible):
1643         (QTMovieWin::initializeQuickTime):
1644
1645 2008-01-11  David Hyatt  <hyatt@apple.com>
1646
1647         Fix for bug 11188, setting hspace on a table overrides align=center.  Fix align=center to be done using
1648         mapped attributes so that it does not get overridden by hspace all the time.
1649
1650         Reviewed by mitz
1651
1652         Added fast/table/table-hspace-align-center.html
1653
1654         * css/html4.css:
1655         * html/HTMLTableElement.cpp:
1656         (WebCore::HTMLTableElement::parseMappedAttribute):
1657
1658 2008-01-11  Mark Rowe  <mrowe@apple.com>
1659
1660         Qt build fix.
1661
1662         * platform/qt/TemporaryLinkStubs.cpp: Include CString.h.
1663
1664 2008-01-11  Mark Rowe  <mrowe@apple.com>
1665
1666         Qt build fix.  Add link stubs for the new FileSystem.h functions introduced
1667         in r29399.
1668
1669         * platform/qt/TemporaryLinkStubs.cpp:
1670         (WebCore::openTemporaryFile):
1671
1672 2008-01-11  Rodney Dawes  <dobey@wayofthemonkey.com>
1673
1674         Reviewed by Anders Carlsson.
1675
1676         Bug 16779: Make the PluginStream implementation be shared across platforms
1677         http://bugs.webkit.org/show_bug.cgi?id=16779
1678
1679         Add the new shared PluginStream files to the GTK+ and Win32 builds.
1680         Add PluginStreamClient class for the streamDidFinishLoading method.
1681         Add open/close/write methods to FileSystem for temporary file handling.
1682         Add PluginDebug.h and npfunctions.h for shared PluginStream.
1683         Add shared PluginStream.
1684         Remove PluginStreamWin.
1685         Update PluginViewWin to use shared PluginStream and PluginStreamClass.
1686
1687         * GNUmakefile.am:
1688         * WebCore.pro:
1689         * WebCore.vcproj/WebCore.vcproj:
1690         * platform/FileSystem.h:
1691         * platform/gtk/FileSystemGtk.cpp:
1692         * platform/win/FileSystemWin.cpp:
1693         * plugins/PluginDebug.h:
1694         * plugins/PluginStream.cpp:
1695         * plugins/PluginStream.h:
1696         * plugins/npfunctions.h:
1697         * plugins/win/PluginDebug: Moved to PluginDebug.h.
1698         * plugins/win/PluginStreamWin.cpp: Moved to PluginStream.cpp.
1699         * plugins/win/PluginStreamWin.h: Moved to PluginStream.h
1700         * plugins/win/PluginViewWin.cpp:
1701         * plugins/win/PluginViewWin.h:
1702         * plugins/win/npfunctions.h: Moved to npfunctions.h
1703
1704 2008-01-11  Geoffrey Garen  <ggaren@apple.com>
1705
1706         Try to fix Mac build: Edit the right .exp file.
1707
1708         * WebCore.base.exp:
1709
1710 2008-01-11  Geoffrey Garen  <ggaren@apple.com>
1711
1712         Try to fix Qt build: don't use pthreads if they're not available.
1713
1714         * bindings/js/GCController.cpp:
1715
1716 2008-01-10  Geoffrey Garen  <ggaren@apple.com>
1717
1718         Reviewed by John Sullivan.
1719
1720         Fixed some world leak reports:
1721         * <rdar://problem/5669436> PLT complains about world leak of 1 JavaScript
1722         Interpreter after running cvs-base suite
1723
1724         * <rdar://problem/5669423> PLT complains about world leak if browser
1725         window is open when PLT starts
1726         
1727         These were both bugs in the reporting mechanism, so I took the
1728         opportunity to do some house cleaning there.
1729
1730         Stupid class, I kill you:
1731         * bridge/JavaScriptStatistics.cpp: Removed.
1732         * bridge/JavaScriptStatistics.h: Removed.
1733
1734         * bindings/js/GCController.h: Adopted the only useful features of
1735         JavaScriptStatistics, since they were GC-related.
1736         * bindings/js/GCController.cpp:
1737
1738 2008-01-10  Eric Seidel  <eric@webkit.org>
1739
1740         Reviewed by Adele.
1741
1742         No functional changes, only code cleanup.
1743
1744         * css/MediaQueryEvaluator.cpp:
1745         (WebCore::compareValue): renamed from cmpvalue
1746         (WebCore::colorMediaFeatureEval):
1747         (WebCore::device_aspect_ratioMediaFeatureEval):
1748         (WebCore::device_pixel_ratioMediaFeatureEval):
1749         (WebCore::gridMediaFeatureEval):
1750         (WebCore::device_heightMediaFeatureEval):
1751         (WebCore::device_widthMediaFeatureEval):
1752         (WebCore::heightMediaFeatureEval):
1753         (WebCore::widthMediaFeatureEval):
1754
1755 2008-01-10  Dan Bernstein  <mitz@apple.com>
1756
1757         Reviewed by Anders Carlsson.
1758
1759         - fix a crash when calling alert() from a repeating timer
1760
1761         On non-Mac platforms, the PageGroupLoadDeferrer pauses DOM timers during
1762         alert() and other similar functions, which deletes the actual
1763         DOMWindowTimer objects and replaces them with new objects when resuming.
1764
1765         * bindings/js/kjs_window.cpp:
1766         (KJS::Window::timerFired): Re-fetch the timer object from the map in
1767         case it has been deleted or replaced.
1768
1769 2008-01-10  Maciej Stachowiak  <mjs@apple.com>
1770
1771         Reviewed by Sam.
1772
1773         - remove SecurityOriginData and fold its functionality into SecurityOrigin
1774
1775         * GNUmakefile.am:
1776         * WebCore.base.exp:
1777         * WebCore.pro:
1778         * WebCore.vcproj/WebCore.vcproj:
1779         * WebCore.xcodeproj/project.pbxproj:
1780         * WebCoreSources.bkl:
1781         * bindings/js/JSDOMWindowCustom.cpp:
1782         (WebCore::JSDOMWindow::postMessage):
1783         * dom/Document.cpp:
1784         (WebCore::Document::domain):
1785         * page/Chrome.cpp:
1786         (WebCore::Chrome::requestQuotaIncreaseForNewDatabase):
1787         (WebCore::Chrome::requestQuotaIncreaseForDatabaseOperation):
1788         * page/Chrome.h:
1789         * page/ChromeClient.h:
1790         * platform/SecurityOrigin.cpp:
1791         (WebCore::SecurityOrigin::copy):
1792         (WebCore::SecurityOrigin::createFromIdentifier):
1793         (WebCore::SecurityOrigin::stringIdentifier):
1794         * platform/SecurityOrigin.h:
1795         (WebCore::SecurityOrigin::host):
1796         (WebCore::SecurityOrigin::protocol):
1797         (WebCore::SecurityOrigin::port):
1798         (WebCore::SecurityOrigin::equal):
1799         * platform/SecurityOriginData.cpp: Removed.
1800         * platform/SecurityOriginData.h: Removed.
1801         * storage/Database.cpp:
1802         (WebCore::Database::openDatabase):
1803         (WebCore::Database::Database):
1804         (WebCore::Database::securityOriginCopy):
1805         * storage/Database.h:
1806         * storage/DatabaseTracker.cpp:
1807         (WebCore::SecurityOriginHash::hash):
1808         (WebCore::SecurityOriginHash::equal):
1809         (WebCore::SecurityOriginTraits::deletedValue):
1810         (WebCore::SecurityOriginTraits::emptyValue):
1811         (WebCore::DatabaseTracker::canEstablishDatabase):
1812         (WebCore::DatabaseTracker::hasEntryForOrigin):
1813         (WebCore::DatabaseTracker::hasEntryForDatabase):
1814         (WebCore::DatabaseTracker::establishEntryForOrigin):
1815         (WebCore::DatabaseTracker::fullPathForDatabase):
1816         (WebCore::DatabaseTracker::populateOrigins):
1817         (WebCore::DatabaseTracker::origins):
1818         (WebCore::DatabaseTracker::databaseNamesForOrigin):
1819         (WebCore::DatabaseTracker::detailsForNameAndOrigin):
1820         (WebCore::DatabaseTracker::setDatabaseDetails):
1821         (WebCore::DatabaseTracker::usageForDatabase):
1822         (WebCore::DatabaseTracker::usageForOrigin):
1823         (WebCore::DatabaseTracker::quotaForOrigin):
1824         (WebCore::DatabaseTracker::setQuota):
1825         (WebCore::DatabaseTracker::addDatabase):
1826         (WebCore::DatabaseTracker::deleteAllDatabases):
1827         (WebCore::DatabaseTracker::deleteDatabasesWithOrigin):
1828         (WebCore::DatabaseTracker::deleteDatabase):
1829         (WebCore::DatabaseTracker::deleteDatabaseFile):
1830         (WebCore::notificationQueue):
1831         (WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged):
1832         (WebCore::DatabaseTracker::notifyDatabasesChanged):
1833         * storage/DatabaseTracker.h:
1834         * storage/DatabaseTrackerClient.h:
1835         * storage/SQLTransaction.cpp:
1836         (WebCore::SQLTransaction::openTransactionAndPreflight):
1837         (WebCore::SQLTransaction::runStatements):
1838         (WebCore::SQLTransaction::deliverQuotaIncreaseCallback):
1839         (WebCore::SQLTransaction::postflightAndCommit):
1840         (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback):
1841         * svg/graphics/SVGImageEmptyClients.h:
1842         (WebCore::SVGEmptyChromeClient::requestQuotaIncreaseForNewDatabase):
1843         (WebCore::SVGEmptyChromeClient::requestQuotaIncreaseForDatabaseOperation):
1844
1845 2008-01-10  Anders Carlsson  <andersca@apple.com>
1846
1847         Reviewed by Sam.
1848
1849         Use the correct frame loader load method. Using the old method would not cause a 
1850         new window to be open if the frame navigation was not allowed.
1851         
1852         * plugins/win/PluginViewWin.cpp:
1853         (WebCore::PluginViewWin::performRequest):
1854
1855 2008-01-10  Alp Toker  <alp@atoker.com>
1856
1857         SVG font build fix for GTK+/autotools.
1858
1859         * GNUmakefile.am:
1860
1861 2008-01-10  Adam Barth  <hk9565@gmail.com>
1862
1863         Reviewed by Sam Weinig and Anders Carlsson.
1864
1865         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16522
1866         <rdar://problem/5657355>
1867
1868         This patch makes two changes:
1869
1870         1) Java calls FrameLoader::load in a slightly different way than
1871            JavaScript, which previously let a malicious web site bypass the
1872            shouldAllowNavigation check.  This patch adds that check to that
1873            code path.
1874
1875         2) FrameLoader now wraps calls to m_frame->tree()->find(name) with
1876            findFrameForNavigation, which calls shouldAllowNavigation.  This
1877            treats disallowed frame navigations as if the named frame did not
1878            exist, resulting in a popup window when appropriate.
1879
1880         Tests: http/tests/security/frameNavigation/xss-DENIED-plugin-navigation.html
1881                http/tests/security/frameNavigation/xss-DENIED-targeted-link-navigation.html
1882
1883         * WebCore.base.exp:
1884         * bindings/js/kjs_window.cpp:
1885         (KJS::WindowProtoFuncOpen::callAsFunction):
1886         * loader/FrameLoader.cpp:
1887         (WebCore::FrameLoader::createWindow):
1888         (WebCore::FrameLoader::load):
1889         (WebCore::FrameLoader::post):
1890         (WebCore::FrameLoader::findFrameForNavigation):
1891         * loader/FrameLoader.h:
1892
1893 2008-01-10  John Sullivan  <sullivan@apple.com>
1894
1895         Written by Hyatt, reviewed by me
1896         
1897         - fixed <rdar://problem/5654297> Mail crashes occurs at WebCore::FontFallbackList::fontDataAt() when attempting to display 
1898           a <video> element that uses controls attribute
1899
1900         * rendering/MediaControlElements.cpp:
1901         (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement):
1902         force the render style to inherit from the media element's style; Hyatt filed 5682383 to cover cleaning
1903         up this architecture, but this one-line fix will prevent the crash in the meantime
1904
1905 2008-01-10  Ada Chan  <adachan@apple.com>
1906
1907         Fix fast/forms/input-radio-checked-tab.html
1908         Meta key is not the same as Alt key on windows.
1909
1910         Reviewed by Darin.
1911
1912         * platform/win/KeyEventWin.cpp:
1913         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1914
1915 2008-01-10  Anders Carlsson  <andersca@apple.com>
1916
1917         Reviewed by Jon.
1918
1919         Fix an assert that would happen when a plug-in tries to load a URL while a provisional load is going.
1920         
1921         * plugins/win/PluginViewWin.cpp:
1922         (WebCore::PluginViewWin::performRequest):
1923         Move document loader check here since we don't start loading until here and a new document load could have started in the meantime.
1924         
1925         (WebCore::PluginViewWin::requestTimerFired):
1926         Don't leak the plugin requests.
1927         
1928         (WebCore::PluginViewWin::load):
1929
1930 2008-01-10  Anders Carlsson  <andersca@apple.com>
1931
1932         Reviewed by John Sullivan.
1933
1934         <rdar://problem/5455889>
1935         REGRESSION: BumperCar crashes when attempting to load a long invalid URL
1936         
1937         Make sure to call FrameLoader::receivedMainResourceError before calling
1938         FrameLoader::didFailToLoad. The call to receivedMainResourceError takes care of
1939         clearing out the provisional document loader so that we won't call the didFail
1940         ResourceLoadDelegate method twice. This also makes us call the FrameLoadDelegate method
1941         didFailPrivisionalLoad before calling the ResourceLoadDelegate method, which Safari 2.0 does.
1942         
1943         * loader/MainResourceLoader.cpp:
1944         (WebCore::MainResourceLoader::receivedError):
1945
1946 2008-01-10  Antti Koivisto  <antti@apple.com>
1947
1948         Reviewed by Adele.
1949
1950         Fix <rdar://problem/5658048>
1951         After <video> has finished playing, dragging the scroller on different location of controller starts to play movie
1952         
1953         - Move to paused state if the playback had ended and the controller is used to seek to earlier time
1954         - Pause video playback during drag so the knob does not constantly try to escape from the mouse pointer
1955
1956         * html/HTMLMediaElement.cpp:
1957         (WebCore::HTMLMediaElement::HTMLMediaElement):
1958         (WebCore::HTMLMediaElement::updateMediaPlayer):
1959         (WebCore::HTMLMediaElement::setPausedInternal):
1960         * html/HTMLMediaElement.h:
1961         * rendering/MediaControlElements.cpp:
1962         (WebCore::MediaControlTimelineElement::defaultEventHandler):
1963
1964 2008-01-10  Alexey Proskuryakov  <ap@webkit.org>
1965
1966         Reviewed by Adam Roben.
1967
1968         <rdar://problem/5667003> fast/dom/xmlhttprequest-html-response-encoding.html is failing
1969
1970         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::send): Do not disable sniffing for file://
1971         requests, as CFNetwork doesn't perform extension to MIME type mapping then.
1972
1973 2008-01-10  Adam Roben  <aroben@apple.com>
1974
1975         Fixes to allow multiple FrameViews on Windows
1976
1977         Reviewed by Hyatt.
1978
1979         * page/FrameView.cpp:
1980         (WebCore::FrameView::FrameView): Added a new constructor that takes an
1981         IntSize to specify the FrameView's initial size.
1982         (WebCore::FrameView::scheduleRelayout): Added an assertion that our
1983         Document is not in the page cache.
1984         * page/FrameView.h:
1985         * platform/gtk/WidgetGtk.cpp:
1986         (WebCore::Widget::~Widget): Add a warm, fuzzy ASSERT.
1987         * platform/qt/WidgetQt.cpp:
1988         (WebCore::Widget::~Widget): Ditto.
1989         * rendering/RenderWidget.cpp:
1990         (WebCore::RenderWidget::setWidget): Make sure to remove any existing
1991         Widget from the Widget hierarchy before deleting it. One instance
1992         where this is needed is when setWidget is called during FrameView
1993         creation on Windows.
1994
1995 2008-01-10  Alp Toker  <alp@atoker.com>
1996
1997         Include math.h to get ceilf(). Part of the SVG font GTK+ build fix.
1998
1999         * svg/SVGFontFaceElement.cpp:
2000
2001 2008-01-10  Justin Garcia  <justin.garcia@apple.com>
2002
2003         Reviewed by Alice Liu.
2004
2005         <rdar://problem/5658603> Crash in InsertNodeBefore::doUnapply() on Undo in Yahoo Mail
2006         <rdar://problem/5658709> Crash in RenderView::setSelection on Undo in Yahoo Mail
2007         
2008         Make sure we have an updated layout before we perform any editing work.
2009
2010         * editing/EditCommand.cpp:
2011         (WebCore::EditCommand::apply):
2012         (WebCore::EditCommand::unapply):
2013         (WebCore::EditCommand::reapply):
2014
2015 2008-01-10  Luca Bruno  <lethalman88@gmail.com>
2016
2017         Reviewed by Alp Toker.
2018
2019         Back out r29206 which was causing regressions in curl http job
2020         cancellation.
2021
2022         * platform/network/curl/ResourceHandleManager.cpp
2023         (ResourceHandleManager::cancel): 
2024
2025 2008-01-10  Kevin McCullough  <kmccullough@apple.com>
2026
2027         Reviewed by Darin, Sam, and Adam.
2028
2029         - <rdar://problem/5654486> REGRESSION (Safari 3.0.4-TOT): clicking on
2030         - link in gmail message displays JavaScript alert falsely complaining
2031         about pop-up blocking
2032         - When trying to open a new window, we now see if the user gesture 
2033         occurred in the global dynamic object instead of the frame since that is
2034         the only place an event can occur. 
2035
2036         * bindings/js/kjs_window.cpp: - Check the dynamic global object instead
2037         of the frame.
2038         (KJS::allowPopUp):
2039         (KJS::showModalDialog):
2040         (KJS::WindowProtoFuncOpen::callAsFunction):
2041
2042 2008-01-10  David Hyatt  <hyatt@apple.com>
2043
2044         Fix for bug 16247, visibility:hidden not honored when hit testing inline replaced elements.
2045
2046         Reviewed by adele
2047
2048         Added fast/css/visibility-hit-test.html test case.
2049
2050         * rendering/RenderBox.cpp:
2051         (WebCore::RenderBox::nodeAtPoint):
2052
2053 2008-01-10  Lars Knoll  <lars@trolltech.com>
2054
2055         Reviewed by Simon.
2056
2057         rename QWebPageHistory to QWebHistory.
2058
2059         * WebCore.pro:
2060
2061 2008-01-10  Lars Knoll  <lars@trolltech.com>
2062
2063         Reviewed by Simon.
2064
2065         fix the drawing errors that where introduced due to refactoring.
2066
2067         Correctly clip to the rectangle we want to draw in ScrollView::paint().
2068
2069         * platform/qt/ScrollViewQt.cpp:
2070         (WebCore::ScrollView::paint):
2071
2072 2008-01-10  Simon Hausmann  <hausmann@webkit.org>
2073
2074         Reviewed by Lars.
2075
2076         Temporarily disable gzip decompression in qhttp due to a bug.
2077
2078         * platform/network/qt/QNetworkReplyHandler.cpp:
2079         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
2080
2081 2008-01-10  Simon Hausmann  <hausmann@webkit.org>
2082
2083         Reviewed by Lars.
2084
2085         http://bugs.webkit.org/show_bug.cgi?id=16588
2086
2087         Added a (last) Frame argument to ResourceHandle::loadResourceSynchronously.
2088         This allows implementing the synchronous loading correctly for the Qt port where the networking
2089         backend is bound to the page.
2090
2091         * loader/FrameLoader.cpp:
2092         (WebCore::FrameLoader::loadResourceSynchronously):
2093         * platform/network/ResourceHandle.h:
2094         * platform/network/cf/ResourceHandleCFNet.cpp:
2095         * platform/network/curl/ResourceHandleCurl.cpp:
2096         * platform/network/mac/ResourceHandleMac.mm:
2097         * platform/network/qt/ResourceHandleQt.cpp:
2098         (WebCore::ResourceHandle::loadResourceSynchronously):
2099
2100 2008-01-10  Kevin Ollivier  <kevino@theolliviers.com>
2101
2102         wx build fix for changes in r29328
2103
2104         * WebCoreSources.bkl:
2105
2106 2008-01-09  Maciej Stachowiak  <mjs@apple.com>
2107
2108         Reviewed by Sam.
2109
2110         - refactor SecurityOrigin in preparation for merging with SecurityOriginData
2111
2112         * platform/SecurityOrigin.cpp:
2113         (WebCore::SecurityOrigin::SecurityOrigin):
2114         (WebCore::SecurityOrigin::create):
2115         (WebCore::SecurityOrigin::createForFrame):
2116         * platform/SecurityOrigin.h:
2117
2118 2008-01-09  Ada Chan  <adachan@apple.com>
2119
2120         Tabs with ctrl, meta, or altgraph modifier key down should not advance focus.
2121
2122         Reviewed by Darin.
2123
2124         Test: fast/forms/tabs-with-modifiers.html
2125
2126         * page/EventHandler.cpp:
2127         (WebCore::EventHandler::defaultKeyboardEventHandler):
2128         (WebCore::EventHandler::defaultTabEventHandler): bail if ctrl, meta, or altgraph key is down.  
2129         Clean up the code a bit.
2130         * page/EventHandler.h:
2131         * page/FocusController.cpp: Remove the advanceFocus() that takes in a KeyboardEvent.  It was
2132         only called in EventHandler::defaultTabEventHandler() but we have cleaned up the code there and
2133         no longer needs it.
2134         * page/FocusController.h:
2135
2136 2008-01-09  Antti Koivisto  <antti@apple.com>
2137
2138         Reviewed by Mitz.
2139
2140         Fix http://bugs.webkit.org/show_bug.cgi?id=16376
2141         <rdar://problem/5665206>
2142         <video> element fails to play frames when navigating back to page (16376)
2143         
2144         Don't make MediaPlayer visible when it is actually in page cache.
2145
2146         * rendering/RenderVideo.cpp:
2147         (WebCore::RenderVideo::updatePlayer):
2148
2149 2008-01-09  Anders Carlsson  <andersca@apple.com>
2150
2151         Reviewed by Darin.
2152
2153         <rdar://problem/5532361> 
2154         CrashTracer: 9840 crashes in Safari at com.apple.JavaScriptCore: KJS::Bindings::CInstance::~CInstance [in-charge deleting] + 35
2155         
2156         Clear the frame's plugin root objects so that they don't outlive the plugin bundle.
2157         
2158         * page/Frame.cpp:
2159         (WebCore::Frame::pageDestroyed):
2160
2161 2008-01-09  John Sullivan  <sullivan@apple.com>
2162
2163         Reviewed by Adam Roben and Anders Carlsson
2164         
2165         - fixed <rdar://problem/5469398> Repro assertion failure in context menu code due to 
2166           missing-but-expected Reload item
2167
2168         * platform/ContextMenu.cpp:
2169         (WebCore::ContextMenu::populate):
2170         use isLoadingInAPISense when deciding whether to include Stop or Reload in context
2171         menu, to match the WebKit API
2172
2173 2008-01-09  Mark Rowe  <mrowe@apple.com>
2174
2175         Fix Windows debug build for opensource developers.
2176
2177         * WebCore.vcproj/QTMovieWin.vcproj: Use the correct library suffix.
2178
2179 2007-10-01  Allan Sandfeld Jensen  <sandfeld@kde.org>
2180
2181         Reworked by Eric, Reviewed by Hyatt.
2182
2183         - fix http://bugs.webkit.org/show_bug.cgi?id=9454
2184         Add support for :lang inheritance and xml:lang support.
2185
2186         Tests: fast/selectors/lang-inheritance.html
2187                fast/selectors/lang-inheritance2.html
2188                fast/selectors/lang-vs-xml-lang.html
2189                fast/selectors/lang-vs-xml-lang-xhtml.xhtml
2190
2191         * css/CSSStyleSelector.cpp:
2192         (WebCore::CSSStyleSelector::canShareStyleWithElement): Do not share style between elements with
2193         different LANG-attribute.
2194         (WebCore::CSSStyleSelector::checkOneSelector): Change :lang() to recursively check the LANG attribute
2195         for all the elements parents and the content-language of the document.
2196         * dom/Document.cpp:
2197         (WebCore::Document::processHttpEquiv): Parse MIME Content-Language
2198         * dom/Document.h:
2199         (WebCore::Document::contentLanguage):
2200         (WebCore::Document::setContentLanguage):
2201
2202 2008-01-08  Timothy Hatcher  <timothy@apple.com>
2203
2204         Reviewed by Brady.
2205
2206         Bug 16678: Unreproducible crash in KJS::JSObject::inherits() after using Web Inspector
2207         http://bugs.webkit.org/show_bug.cgi?id=16678
2208
2209         Add a NULL check for controller before calling JSObjectSetPrivate.
2210
2211         * page/InspectorController.cpp:
2212         (WebCore::InspectorController::~InspectorController):
2213
2214 2008-01-08  Xan Lopez  <xan@gnome.org>
2215
2216         Reviewed by Alp Toker.
2217
2218         http://bugs.webkit.org/show_bug.cgi?id=15610
2219         [GTK] Text rendering using Pango
2220
2221         Use Pango to render Complex path text.
2222
2223         * platform/graphics/gtk/FontGtk.cpp:
2224         (WebCore::utf16_to_utf8):
2225         (WebCore::convertUniCharToUTF8):
2226         (WebCore::setPangoAttributes):
2227         (WebCore::Font::drawGlyphs):
2228         (WebCore::Font::drawComplexText):
2229         (WebCore::Font::floatWidthForComplexText):
2230         (WebCore::Font::offsetForPositionForComplexText):
2231
2232 2008-01-08  Timothy Hatcher  <timothy@apple.com>
2233
2234         Reviewed by Darin Adler.
2235
2236         <rdar://problem/5665860> With the web inspector displayed, a crash occurs
2237         at WebCore::Frame::document() when navigating back to previous page
2238
2239         This fixes the crash, but the inspector was totally broken with back/forward.
2240         So this also fixes back/forward navigation so the right main resource shows
2241         up in the inspector.
2242
2243         * page/InspectorController.cpp:
2244         (WebCore::addSourceToFrame): Add some null checks for the frame when
2245         getting the textEncoding. This was the crash.
2246         (WebCore::InspectorController::addScriptResource): Create a script object
2247         only if needed, and always add it by calling addResource.
2248         (WebCore::InspectorController::didCommitLoad): Check if the loader is 
2249         loading from the page cache, and clear m_mainResource. If the load is
2250         normal, then call addAndUpdateScriptResource with the main resource. 
2251         (WebCore::InspectorController::identifierForInitialRequest): If the load
2252         is from the page cache and the resource is the main resource call
2253         addAndUpdateScriptResource since didCommitLoad did not do it.
2254
2255 2008-01-08  Alp Toker  <alp@atoker.com>
2256
2257         Back out VIDEO by default in the GTK+ qmake build. The build bot
2258         doesn't have the necessary libraries installed.
2259
2260         * WebCore.pro:
2261
2262 2008-01-08  Alp Toker  <alp@atoker.com>
2263
2264         Win build fix for breakage introduced in r29328.
2265
2266         * WebCore.vcproj/WebCore.vcproj:
2267
2268 2008-01-08  Alp Toker  <alp@atoker.com>
2269
2270         Rubber-stamped by Mark Rowe.
2271
2272         Enable VIDEO by default in the GTK+ qmake build.
2273
2274         * WebCore.pro:
2275
2276 2008-01-08  Alp Toker  <alp@atoker.com>
2277
2278         GTK+ VIDEO build fix for breakage introduced in r29328.
2279
2280         Issue noticed by Ori_B.
2281
2282         * GNUmakefile.am:
2283         * WebCore.pro:
2284
2285 2008-01-08  Antti Koivisto  <antti@apple.com>
2286
2287         Reviewed by Darin.
2288         
2289         HTMLAudioElement needs generated constructor. Otherwise video instanceof HTMLAudioElement is true which is 
2290         bit strange.
2291         
2292         Renamed custom constructor JSHTMLAudioElementConstructor to JSAudioConstructor to avoid name clashes.
2293
2294         Test: media/constructors.html
2295
2296         * ChangeLog:
2297         * WebCore.xcodeproj/project.pbxproj:
2298         * bindings/js/JSAudioConstructor.cpp: Copied from WebCore/bindings/js/JSHTMLAudioElementConstructor.cpp.
2299         (WebCore::JSAudioConstructor::JSAudioConstructor):
2300         (WebCore::JSAudioConstructor::implementsConstruct):
2301         (WebCore::JSAudioConstructor::construct):
2302         * bindings/js/JSAudioConstructor.h: Copied from WebCore/bindings/js/JSHTMLAudioElementConstructor.h.
2303         * bindings/js/JSHTMLAudioElementConstructor.cpp: Removed.
2304         * bindings/js/JSHTMLAudioElementConstructor.h: Removed.
2305         * bindings/js/kjs_window.cpp:
2306         (KJS::Window::getValueProperty):
2307         * html/HTMLAudioElement.idl:
2308
2309 2008-01-08  Anders Carlsson  <andersca@apple.com>
2310
2311         Reviewed by Mitz.
2312
2313         Don't add the applet widget to the view, that's done later by RenderApplet.
2314             
2315         * loader/FrameLoader.cpp:
2316         (WebCore::FrameLoader::createJavaAppletWidget):
2317
2318 2008-01-08  Antti Koivisto  <antti@apple.com>
2319
2320         Reviewed by Weinig.
2321         
2322         Add security check for Audio constructor.
2323
2324         * bindings/js/kjs_window.cpp:
2325         (KJS::Window::getValueProperty):
2326
2327 2008-01-08  Timothy Hatcher  <timothy@apple.com>
2328
2329         Reviewed by Adam Roben.
2330
2331         <rdar://problem/5676515> List of scripts and images missing when opening Web Inspector from new window (16567)
2332
2333         InspectorController::didLoadResourceFromMemoryCache was not being called for
2334         resources that loaded from the memory cache that the FrameLoader's client
2335         has already been notified about. This fix always calls the InspectorController
2336         when loading a memory cached resource. No test possible for the Web Inspector.
2337
2338         * loader/DocLoader.cpp:
2339         (WebCore::DocLoader::checkCacheObjectStatus): Moved most of the logic to
2340         FrameLoader::loadedResourceFromMemoryCache so the InspectorController can always be notified.
2341         * loader/FrameLoader.cpp:
2342         (WebCore::FrameLoader::didTellClientAboutLoad): Renamed from didTellBridgeAboutLoad.
2343         (WebCore::FrameLoader::haveToldClientAboutLoad): Renamed from haveToldBridgeAboutLoad.
2344         (WebCore::FrameLoader::loadResourceSynchronously): Call the renamed didTellClientAboutLoad.
2345         (WebCore::FrameLoader::loadedResourceFromMemoryCache): Only takes a CachedResource now.
2346         Always call InspectorController. If the resource's sendResourceLoadCallbacks is false or
2347         didTellClientAboutLoad is true, do an early return. Otherwise call the client and call
2348         didTellClientAboutLoad.
2349         (WebCore::FrameLoader::dispatchDidLoadResourceFromMemoryCache): Removed, work now done
2350         in FrameLoader::loadedResourceFromMemoryCache.
2351         * loader/FrameLoader.h: Renamed {didTell,haveTold}BridgeAboutLoad to {didTell,haveTold}ClientAboutLoad.
2352         Made loadedResourceFromMemoryCache only take a CachedResource. Renamed m_urlsBridgeKnowsAbout to 
2353         m_urlsClientKnowsAbout.
2354         * loader/SubresourceLoader.cpp:
2355         (WebCore::SubresourceLoader::load): Call the renamed didTellClientAboutLoad.
2356
2357 2008-01-08  Dan Bernstein  <mitz@apple.com>
2358
2359         Rubber-stamped by Sam Weinig.
2360
2361         - prefix all member variables in CSSStyleSelector with m_
2362
2363         * css/CSSStyleSelector.cpp:
2364         (WebCore::CSSStyleSelector::CSSStyleSelector):
2365         (WebCore::CSSStyleSelector::init):
2366         (WebCore::CSSStyleSelector::setEncodedURL):
2367         (WebCore::CSSStyleSelector::loadDefaultStyle):
2368         (WebCore::CSSStyleSelector::matchRules):
2369         (WebCore::CSSStyleSelector::matchRulesForList):
2370         (WebCore::CSSStyleSelector::initElementAndPseudoState):
2371         (WebCore::CSSStyleSelector::initForStyleResolve):
2372         (WebCore::CSSStyleSelector::canShareStyleWithElement):
2373         (WebCore::CSSStyleSelector::locateSharedStyle):
2374         (WebCore::CSSStyleSelector::matchUARules):
2375         (WebCore::CSSStyleSelector::styleForElement):
2376         (WebCore::CSSStyleSelector::pseudoStyleForElement):
2377         (WebCore::CSSStyleSelector::updateFont):
2378         (WebCore::CSSStyleSelector::cacheBorderAndBackground):
2379         (WebCore::CSSStyleSelector::checkSelector):
2380         (WebCore::CSSStyleSelector::checkOneSelector):
2381         (WebCore::CSSStyleSelector::applyProperty):
2382         (WebCore::CSSStyleSelector::mapBackgroundImage):
2383         (WebCore::CSSStyleSelector::mapBackgroundSize):
2384         (WebCore::CSSStyleSelector::mapBackgroundXPosition):
2385         (WebCore::CSSStyleSelector::mapBackgroundYPosition):
2386         (WebCore::CSSStyleSelector::checkForTextSizeAdjust):
2387         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
2388         * css/CSSStyleSelector.h:
2389         (WebCore::CSSStyleSelector::):
2390         (WebCore::CSSRuleData::CSSRuleData):
2391         (WebCore::CSSRuleDataList::CSSRuleDataList):
2392         (WebCore::CSSRuleDataList::append):
2393         * css/SVGCSSStyleSelector.cpp:
2394         (WebCore::CSSStyleSelector::applySVGProperty):
2395         * rendering/RenderStyle.cpp:
2396         (WebCore::RenderStyle::isStyleAvailable):
2397
2398 2008-01-08  David D. Kilzer  <ddkilzer@apple.com>
2399
2400         Removed unnecessary files from Copy Bundle Resources build phase.
2401
2402         Reviewed by Sam.
2403
2404         * WebCore.xcodeproj/project.pbxproj: Files removed from build phase:
2405         DOMCoreException.idl
2406         EventException.idl
2407         MessageEvent.idl
2408         SVGAElement.idl
2409         SVGAngle.idl
2410         SVGAnimateColorElement.idl
2411         SVGAnimateElement.idl
2412         SVGAnimateTransformElement.idl
2413         SVGAnimatedAngle.idl
2414         SVGAnimatedBoolean.idl
2415         SVGAnimatedEnumeration.idl
2416         SVGAnimatedInteger.idl
2417         SVGAnimatedLength.idl
2418         SVGAnimatedLengthList.idl
2419         SVGAnimatedNumber.idl
2420         SVGAnimatedNumberList.idl
2421         SVGAnimatedPathData.idl
2422         SVGAnimatedPoints.idl
2423         SVGAnimatedPreserveAspectRatio.idl
2424         SVGAnimatedRect.idl
2425         SVGAnimatedString.idl
2426         SVGAnimatedTransformList.idl
2427         SVGAnimationElement.idl
2428         SVGCSSPropertyNames.in
2429         SVGCSSValueKeywords.in
2430         SVGCircleElement.idl
2431         SVGClipPathElement.idl
2432         SVGColor.idl
2433         SVGComponentTransferFunctionElement.idl
2434         SVGCursorElement.idl
2435         SVGDefinitionSrcElement.idl
2436         SVGDefsElement.idl
2437         SVGDescElement.idl
2438         SVGDocument.idl
2439         SVGElement.idl
2440         SVGElementInstance.idl
2441         SVGElementInstanceList.idl
2442         SVGEllipseElement.idl
2443         SVGException.idl
2444         SVGExternalResourcesRequired.idl
2445         SVGFEBlendElement.idl
2446         SVGFEColorMatrixElement.idl
2447         SVGFEComponentTransferElement.idl
2448         SVGFECompositeElement.idl
2449         SVGFEDiffuseLightingElement.idl
2450         SVGFEDisplacementMapElement.idl
2451         SVGFEDistantLightElement.idl
2452         SVGFEFloodElement.idl
2453         SVGFEFuncAElement.idl
2454         SVGFEFuncBElement.idl
2455         SVGFEFuncGElement.idl
2456         SVGFEFuncRElement.idl
2457         SVGFEGaussianBlurElement.idl
2458         SVGFEImageElement.idl
2459         SVGFEMergeElement.idl
2460         SVGFEMergeNodeElement.idl
2461         SVGFEOffsetElement.idl
2462         SVGFEPointLightElement.idl
2463         SVGFESpecularLightingElement.idl
2464         SVGFESpotLightElement.idl
2465         SVGFETileElement.idl
2466         SVGFETurbulenceElement.idl
2467         SVGFilterElement.idl
2468         SVGFilterPrimitiveStandardAttributes.idl
2469         SVGFitToViewBox.idl
2470         SVGFontElement.idl
2471         SVGFontFaceElement.idl
2472         SVGFontFaceFormatElement.idl
2473         SVGFontFaceNameElement.idl
2474         SVGFontFaceSrcElement.idl
2475         SVGFontFaceUriElement.idl
2476         SVGForeignObjectElement.idl
2477         SVGGElement.idl
2478         SVGGlyphElement.idl
2479         SVGGradientElement.idl
2480         SVGImageElement.idl
2481         SVGLangSpace.idl
2482         SVGLength.idl
2483         SVGLengthList.idl
2484         SVGLineElement.idl
2485         SVGLinearGradientElement.idl
2486         SVGLocatable.idl
2487         SVGMarkerElement.idl
2488         SVGMaskElement.idl
2489         SVGMatrix.idl
2490         SVGMetadataElement.idl
2491         SVGMissingGlyphElement.idl
2492         SVGNumber.idl
2493         SVGNumberList.idl
2494         SVGPaint.idl
2495         SVGPathElement.idl
2496         SVGPathSeg.idl
2497         SVGPathSegArcAbs.idl
2498         SVGPathSegArcRel.idl
2499         SVGPathSegClosePath.idl
2500         SVGPathSegCurvetoCubicAbs.idl
2501         SVGPathSegCurvetoCubicRel.idl
2502         SVGPathSegCurvetoCubicSmoothAbs.idl
2503         SVGPathSegCurvetoCubicSmoothRel.idl
2504         SVGPathSegCurvetoQuadraticAbs.idl
2505         SVGPathSegCurvetoQuadraticRel.idl
2506         SVGPathSegCurvetoQuadraticSmoothAbs.idl
2507         SVGPathSegCurvetoQuadraticSmoothRel.idl
2508         SVGPathSegLinetoAbs.idl
2509         SVGPathSegLinetoHorizontalAbs.idl
2510         SVGPathSegLinetoHorizontalRel.idl
2511         SVGPathSegLinetoRel.idl
2512         SVGPathSegLinetoVerticalAbs.idl
2513         SVGPathSegLinetoVerticalRel.idl
2514         SVGPathSegList.idl
2515         SVGPathSegMovetoAbs.idl
2516         SVGPathSegMovetoRel.idl
2517         SVGPatternElement.idl
2518         SVGPoint.idl
2519         SVGPointList.idl
2520         SVGPolygonElement.idl
2521         SVGPolylineElement.idl
2522         SVGPreserveAspectRatio.idl
2523         SVGRadialGradientElement.idl
2524         SVGRect.idl
2525         SVGRectElement.idl
2526         SVGRenderingIntent.idl
2527         SVGSVGElement.idl
2528         SVGScriptElement.idl
2529         SVGSetElement.idl
2530         SVGStopElement.idl
2531         SVGStringList.idl
2532         SVGStylable.idl
2533         SVGStyleElement.idl
2534         SVGSwitchElement.idl
2535         SVGSymbolElement.idl
2536         SVGTRefElement.idl
2537         SVGTSpanElement.idl
2538         SVGTests.idl
2539         SVGTextContentElement.idl
2540         SVGTextElement.idl
2541         SVGTextPathElement.idl
2542         SVGTextPositioningElement.idl
2543         SVGTitleElement.idl
2544         SVGTransform.idl
2545         SVGTransformList.idl
2546         SVGTransformable.idl
2547         SVGURIReference.idl
2548         SVGUnitTypes.idl
2549         SVGUseElement.idl
2550         SVGViewElement.idl
2551         SVGViewSpec.idl
2552         SVGZoomAndPan.idl
2553         SVGZoomEvent.idl
2554         XMLHttpRequestException.idl
2555         XPathException.idl
2556         character-sets.txt
2557         mac-encodings.txt
2558         make-charset-table.pl
2559         svgattrs.in
2560         svgtags.in
2561         xlinkattrs.in
2562
2563 2008-01-08  Luca Bruno  <lethalman88@gmail.com>
2564
2565         Reviewed by Alp Toker.
2566
2567         Support copying the selected URL to the clipboard.
2568
2569         * platform/gtk/PasteboardGtk.cpp:
2570         (WebCore::Pasteboard::writeURL): implemented
2571
2572 2008-01-08  David D. Kilzer  <ddkilzer@webkit.org>
2573
2574         Renamed CharacterData::m_str to m_data
2575
2576         Rubber-stamped by Adam again.
2577
2578         No test cases added since there is no change in behavior.
2579
2580         * dom/CDATASection.cpp:
2581         * dom/CharacterData.cpp:
2582         (WebCore::CharacterData::CharacterData):
2583         (WebCore::CharacterData::setData):
2584         (WebCore::CharacterData::substringData):
2585         (WebCore::CharacterData::appendData):
2586         (WebCore::CharacterData::insertData):
2587         (WebCore::CharacterData::deleteData):
2588         (WebCore::CharacterData::replaceData):
2589         (WebCore::CharacterData::nodeValue):
2590         (WebCore::CharacterData::containsOnlyWhitespace):
2591         (WebCore::CharacterData::dispatchModifiedEvent):
2592         (WebCore::CharacterData::checkCharDataOperation):
2593         (WebCore::CharacterData::dump):
2594         * dom/CharacterData.h:
2595         * dom/Comment.cpp:
2596         * dom/Text.cpp:
2597         (WebCore::Text::splitText):
2598         (WebCore::Text::createRenderer):
2599         (WebCore::Text::recalcStyle):
2600
2601 2008-01-08  Steve Falkenburg  <sfalken@apple.com>
2602
2603         Fix a couple of compiler warnings.
2604         
2605         Reviewed by Mitz.
2606
2607         * platform/win/ThreadingWin.cpp:
2608         * platform/win/UniscribeController.cpp: Remove unused function.
2609         (WebCore::UniscribeController::advance): Fix bogus warning about un-initialized variable.
2610
2611 2008-01-08  Adele Peterson  <adele@apple.com>
2612
2613         Reviewed by Darin.
2614
2615         Fix for <rdar://problem/5674667> fast/forms/slider-mouse-events.html is broken by media control checkin 29257
2616
2617         * rendering/RenderSlider.cpp: (WebCore::HTMLSliderThumbElement::defaultEventHandler):
2618           After fixing a bug in EventHandler to make sure events always go to the capturing node, this bug was exposed.
2619           MouseMove and MouseUp events were going to the thumb element, but not to the slider input element.  
2620           This change makes the input element the capturing node, and then the input element forwards the mouse events to the thumb element.
2621           I also added a missing call to setDefaultHandled for the mousemove event.
2622
2623 2008-01-08  Adele Peterson  <adele@apple.com>
2624
2625         Reviewed by Adam. 
2626
2627         * rendering/RenderThemeSafari.cpp: Use the SafariTheme version number to decide whether or not to
2628         paint the media controls in RenderThemeSafari.
2629
2630 2008-01-08  Oliver Hunt  <oliver@apple.com>
2631
2632         Reviewed by Adele and John.
2633
2634         Fix <rdar://problem/5652740> Crash occurs at WebCore::Widget::getView() after
2635         dragging file into window that contains web page ( http://www.econocraft.com/flood_arch.htm )
2636
2637         We hit this crash if the page reloads between DragController::dragUpdated
2638         and DragController::performDrag, meaning that m_document starts pointing to
2639         a now viewless document.  This is picked up by an assertion in performDrag
2640         which I have now replaced with an assignment given that the assertion is 
2641         invalid -- it is possible for m_document to be changed between dragUpdated
2642         performDrag
2643
2644         * page/DragController.cpp:
2645         (WebCore::DragController::performDrag):
2646
2647 2008-01-08  Alexey Proskuryakov  <ap@webkit.org>
2648
2649         Reviewed by Darin.
2650
2651         <rdar://problem/5659812> CrashTracer: 462 crashes in Safari at com.apple.WebCore:
2652         WebCore::Node::setChanged + 96
2653
2654         Test: fast/dom/cssTarget-crash.html
2655
2656         * dom/Node.cpp: (WebCore::Node::removedFromDocument):
2657         Check to see if the node being removed is currently set as the Document's cssTarget.
2658         If it is, clear the cssTarget to prevent a hanging reference to it.
2659
2660 2008-01-08  Adam Roben  <aroben@apple.com>
2661
2662         * bindings/scripts/CodeGeneratorJS.pm: Touch this so the bindings will
2663         rebuild on Windows now that the media elements are enabled.
2664
2665 2008-01-08  Adam Roben  <aroben@apple.com>
2666
2667         * svg/svgtags.in: Touch this again for the sake of the Windows bots.
2668
2669 2008-01-08  Timothy Hatcher  <timothy@apple.com>
2670
2671         Reviewed by Adam Roben.
2672
2673         Use JSRetainPtr in the Web Inspector everywhere we own a JSStringRef.
2674         Also added some #pragma marks to help find places in the file.
2675
2676         * page/InspectorController.cpp:
2677         (WebCore::callSimpleFunction): Use JSRetainPtr<JSStringRef>.
2678         And return the result of JSObjectCallAsFunction.
2679         (WebCore::search): Use JSRetainPtr<JSStringRef>.
2680         (WebCore::databaseTableNames): Ditto.
2681         (WebCore::localizedStrings): Ditto.
2682         (WebCore::InspectorController::~InspectorController): Ditto.
2683         (WebCore::InspectorController::focusNode): Ditto.
2684         (WebCore::InspectorController::windowScriptObjectAvailable): Ditto.
2685         (WebCore::InspectorController::scriptObjectReady): Ditto.
2686         (WebCore::addHeaders): Ditto.
2687         (WebCore::InspectorController::addScriptResource): Ditto.
2688         (WebCore::InspectorController::removeScriptResource): Ditto.
2689         (WebCore::InspectorController::updateScriptResourceRequest): Ditto.
2690         (WebCore::InspectorController::updateScriptResourceResponse): Ditto.
2691         (WebCore::InspectorController::updateScriptResource): Ditto.
2692         (WebCore::InspectorController::addDatabaseScriptResource): Ditto.
2693         (WebCore::InspectorController::removeDatabaseScriptResource): Ditto.
2694         (WebCore::InspectorController::addScriptConsoleMessage): Ditto.
2695
2696 2008-01-08  Dan Bernstein  <mitz@apple.com>
2697
2698         Rubber-stamped by Sam Weinig.
2699
2700         - rename FontDataBaseClass.{cpp,h} back to FontData.{cpp,h}
2701
2702         * GNUmakefile.am:
2703         * WebCore.pro:
2704         * WebCore.vcproj/WebCore.vcproj:
2705         * WebCore.xcodeproj/project.pbxproj:
2706         * WebCoreSources.bkl:
2707         * editing/Editor.cpp:
2708         * platform/graphics/FontData.cpp: Copied from WebCore/platform/graphics/FontDataBaseClass.cpp.
2709         * platform/graphics/FontData.h: Copied from WebCore/platform/graphics/FontDataBaseClass.h.
2710         * platform/graphics/FontDataBaseClass.cpp: Removed.
2711         * platform/graphics/FontDataBaseClass.h: Removed.
2712         * platform/graphics/SegmentedFontData.h:
2713         * platform/graphics/SimpleFontData.h:
2714
2715 2008-01-08  Dan Bernstein  <mitz@apple.com>
2716
2717         Fix a Wx build error.
2718
2719         * platform/graphics/wx/GlyphMapWx.cpp:
2720         (WebCore::GlyphPage::fill):
2721
2722 2008-01-08  Dan Bernstein  <mitz@apple.com>
2723
2724         Fix a Qt build error.
2725
2726         * platform/graphics/qt/SimpleFontDataQt.cpp:
2727         (WebCore::SimpleFontData::containsCharacters):
2728         (WebCore::SimpleFontData::fontDataForCharacter):
2729         (WebCore::SimpleFontData::isSegmented):
2730
2731 2008-01-08  Adam Roben  <aroben@apple.com>
2732
2733         Windows build fix.
2734
2735         Touch config.h to force a rebuild (apparently changing preprocessor
2736         definitions in the .vcproj doesn't force a rebuild).
2737
2738         * config.h:
2739
2740 2008-01-08  Dan Bernstein  <mitz@apple.com>
2741
2742         Fix a Wx build failure.
2743
2744         * webcore-wx.bkl:
2745
2746 2008-01-08  Dan Bernstein  <mitz@apple.com>
2747
2748         Fix a Qt build failure.
2749
2750         * WebCore.pro:
2751
2752 2008-01-08  John Sullivan  <sullivan@apple.com>
2753
2754         Reviewed by Adam Roben
2755         
2756         - fixed <rdar://problem/5671668> REGRESSION (r28711-r28730): With caret in an empty form field, 
2757           Delete menu item is enabled but shouldn't be
2758
2759         The enabled logic was incorrect for the Delete menu item. To fix this, I added an EditorCommandSource
2760         parameter to the enabled functions so that they can have parallel logic to the execute functions.
2761
2762         * editing/EditorCommand.cpp:
2763         added EditorCommandSource parameter to isEnabled function prototype
2764         (WebCore::enabled):
2765         added unused EditorCommandSource parameter to these isEnabled functions:
2766         (WebCore::enabledAnySelection):
2767         (WebCore::enabledAnySelectionAndMark):
2768         (WebCore::enableCaretInEditableText):
2769         (WebCore::enabledCopy):
2770         (WebCore::enabledCut):
2771
2772         (WebCore::enabledDelete):
2773         new function, uses logic previously used by Delete command for DOM sources; uses logic in enabledCut
2774         for menu source
2775
2776         added unused EditorCommandSource parameter to these isEnabled functions:
2777         (WebCore::enabledInEditableText):
2778         (WebCore::enabledInRichlyEditableText):
2779         (WebCore::enabledPaste):
2780         (WebCore::enabledRangeInEditableText):
2781         (WebCore::enabledRangeInRichlyEditableText):
2782         (WebCore::enabledRedo):
2783         (WebCore::enabledUndo):
2784         
2785         (WebCore::CommandEntry::):
2786         wire up new enabledDelete function as delete function for Delete command
2787         
2788         (WebCore::Editor::Command::isEnabled):
2789         pass EditorCommandSource parameter to isEnabled function
2790
2791 2008-01-08  Adam Roben  <aroben@apple.com>
2792
2793         Visual C++ Express build fix
2794
2795         * WebCore.vcproj/QTMovieWin.vcproj: Explicitly link against user32.lib
2796         and advapi32.lib. VS implicitly links against these, VC++ Express
2797         doesn't.
2798
2799 2008-01-08  Dan Bernstein  <mitz@apple.com>
2800
2801         - add bug number
2802
2803         * platform/graphics/mac/FontCustomPlatformData.cpp:
2804         (WebCore::createFontCustomPlatformData):
2805
2806 2008-01-08  Dan Bernstein  <mitz@apple.com>
2807
2808         Try to fix the Qt build.
2809
2810         * WebCore.pro:
2811
2812 2008-01-08  Nikolas Zimmermann  <zimmermann@kde.org>
2813
2814         Not reviewed. Try to fix Qt builds after Timothy's inspector changes.
2815
2816         * page/inspector/WebKit.qrc:
2817
2818 2008-01-08  Maciej Stachowiak  <mjs@apple.com>
2819
2820         Reviewed by Mark.
2821
2822         - remove duplicate definition of getElementById from HTMLDocument IDL (and ObjC bindings)
2823
2824         * bindings/objc/PublicDOMInterfaces.h:
2825         * html/HTMLDocument.idl:
2826
2827 2008-01-08  David D. Kilzer  <ddkilzer@webkit.org>
2828
2829         Renamed CharacterData::str to m_str to match coding style
2830
2831         Rubber-stamped by Adam.
2832
2833         No test cases added since there is no change in behavior.
2834
2835         * dom/CDATASection.cpp:
2836         * dom/CharacterData.cpp:
2837         (WebCore::CharacterData::CharacterData):
2838         (WebCore::CharacterData::setData):
2839         (WebCore::CharacterData::substringData):
2840         (WebCore::CharacterData::appendData):
2841         (WebCore::CharacterData::insertData):
2842         (WebCore::CharacterData::deleteData):
2843         (WebCore::CharacterData::replaceData):
2844         (WebCore::CharacterData::nodeValue):
2845         (WebCore::CharacterData::containsOnlyWhitespace):
2846         (WebCore::CharacterData::dispatchModifiedEvent):
2847         (WebCore::CharacterData::checkCharDataOperation):
2848         (WebCore::CharacterData::dump):
2849         * dom/CharacterData.h:
2850         * dom/Comment.cpp:
2851         * dom/Text.cpp:
2852         (WebCore::Text::splitText):
2853         (WebCore::Text::createRenderer):
2854         (WebCore::Text::recalcStyle):
2855
2856 2008-01-08  Oliver Hunt  <oliver@apple.com>
2857
2858         Set the ENABLE_SVG_FONTS flag in Windows build, now builds, 
2859         I'm not sure if it just caused the right files to regenerate,
2860         or if there's some configuration weirdness in the non-SVG-fonts
2861         build. 
2862
2863         * WebCore.vcproj/WebCore.vcproj:
2864
2865 2008-01-07  Maciej Stachowiak  <mjs@apple.com>
2866
2867         Reviewed by Brady.
2868
2869         - fixed <rdar://problem/5644300> Back/Forward Cache should not include pages with databases
2870         
2871         Track whether a document has ever opened a database; if so, exclude it from b/f caching (for now)
2872         
2873         * dom/Document.cpp:
2874         (WebCore::Document::Document):
2875         * dom/Document.h:
2876         (WebCore::Document::setHasOpenDatabases):
2877         (WebCore::Document::hasOpenDatabases):
2878         * loader/FrameLoader.cpp:
2879         (WebCore::FrameLoader::canCachePage):
2880         * storage/Database.cpp:
2881         (WebCore::Database::openDatabase):
2882
2883 2008-01-07  Dan Bernstein  <mitz@apple.com>
2884
2885         Reviewed by Oliver Hunt.
2886
2887         - fix leaks seen on the build bot
2888
2889         * css/CSSFontSelector.cpp:
2890         (WebCore::CSSFontSelector::addFontFaceRule): Avoid creating a
2891         CSSFontFaceSource for SVG font-face elements going into an
2892         SVGCSSFontFace because it just leaks them. Avoid adding SVG font-
2893         face elements to a CSSFontFace because it will not work as expected.
2894
2895 2008-01-07  Mark Rowe  <mrowe@apple.com>
2896
2897         Tiger build fix.
2898
2899         * platform/graphics/mac/FontCustomPlatformData.cpp:
2900         (WebCore::createFontCustomPlatformData): Only include this code on Leopard.
2901         It's not needed on Tiger, and breaks the build.
2902
2903 2008-01-07  Antti Koivisto  <antti@apple.com>
2904
2905         Reviewed by Steve.
2906
2907         Re-enable media support in Windows build.
2908
2909         * WebCore.vcproj/QTMovieWin.vcproj:
2910         * WebCore.vcproj/WebCore.vcproj:
2911         * WebCore.vcproj/build-generated-files.sh:
2912
2913 2008-01-07  Steve Falkenburg  <sfalken@apple.com>
2914
2915         Add version resource to QTMovieWin.dll
2916         
2917         Reviewed by Adam.
2918
2919         * WebCore.vcproj/PRODUCTVERSION: Copied from ../WebKit/win/WebKit.vcproj/PRODUCTVERSION.
2920         * WebCore.vcproj/QTMovieWin.rc: Added.
2921         * WebCore.vcproj/QTMovieWin.vcproj:
2922         * WebCore.vcproj/VERSION: Copied from ../WebKit/win/WebKit.vcproj/VERSION.
2923         * WebCore.vcproj/auto-version.sh: Copied from ../WebKit/win/WebKit.vcproj/auto-version.sh.
2924
2925 2008-01-07  Dan Bernstein  <mitz@apple.com>
2926
2927         Build fix.
2928
2929         * platform/graphics/qt/FontCustomPlatformData.cpp:
2930         (WebCore::FontCustomPlatformData::~FontCustomPlatformData): Added.
2931         Calls QFontDatabase::removeApplicationFont().
2932         * platform/graphics/qt/FontCustomPlatformData.h:
2933         * platform/graphics/qt/GlyphPageTreeNodeQt.cpp:
2934         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData): Removed the
2935         implementation because Qt does not use the WebCore glyph cache.
2936
2937 2008-01-07  Dan Bernstein  <mitz@apple.com>
2938
2939         Reviewed by Oliver Hunt.
2940
2941         - fix an assertion failure in svg/W3C-SVG-1.1/fonts-elem-03-b.svg on
2942           Tiger and multiple SVG layout test failures on Leopard.
2943
2944         * css/CSSSegmentedFontFace.cpp:
2945         (WebCore::CSSSegmentedFontFace::getFontData): Avoid returning an
2946         empty SegmentedFontData.
2947         * platform/graphics/mac/FontCustomPlatformData.cpp:
2948         (WebCore::createFontCustomPlatformData): Avoid creating a font that
2949         contains no glyphs. On Leopard, ATS might create such a font given
2950         data in an unsupported format (such as SVG).
2951
2952 2008-01-07  Steve Falkenburg  <sfalken@apple.com>
2953
2954         Build fix.
2955
2956         * WebCore.vcproj/WebCore.sln:
2957         * WebCore.vcproj/WebCore.submit.sln:
2958
2959 2008-01-07  Oliver Hunt  <oliver@apple.com>
2960
2961         Reviewed by Niko.
2962
2963         Fix painting of SVG <image> when the image must be scaled to retain aspect ratio
2964
2965         Test: svg/custom/image-with-aspect-ratio-stretch.svg
2966
2967         * rendering/RenderSVGImage.cpp:
2968         (WebCore::RenderSVGImage::adjustRectsForAspectRatio):
2969
2970 2008-01-07  Dan Bernstein  <mitz@apple.com>
2971
2972         Build fix.
2973
2974         * platform/graphics/qt/GlyphPageTreeNodeQt.cpp:
2975         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
2976
2977 2008-01-07  Adele Peterson  <adele@apple.com>
2978
2979         Add missing newline.
2980
2981         * rendering/MediaControlElements.cpp:
2982
2983 2008-01-07  Jon Honeycutt  <jhoneycutt@apple.com>
2984
2985         Reviewed by Hyatt.
2986
2987         <rdar://problem/5673489> Safari does not render windowless plugins in an
2988         iframe when opacity < 1.0
2989
2990         Plugins in transparency layers handle their own world transforms, so
2991         only apply the horizontal/vertical transform if we are not in a
2992         transparency layer.
2993
2994         * platform/graphics/GraphicsContext.h: Add a Windows-platform-only
2995         inTransparencyLayer() function
2996         * platform/win/GraphicsContextWin.cpp:
2997         (WebCore::GraphicsContext::getWindowsContext): Use inTransparencyLayer()
2998         (WebCore::GraphicsContext::inTransparencyLayer):
2999         (WebCore::GraphicsContext::releaseWindowsContext): Use
3000         inTransparencyLayer()
3001         * plugins/win/PluginViewWin.cpp:
3002         (WebCore::PluginViewWin::paint): When retrieving the HDC, use the rect
3003         relative to the window. Pass m_isTransparent to
3004         get/releaseWindowsContext(). Only set the world transform if we are not
3005         in a transparency layer.
3006
3007 2008-01-07  Adele Peterson  <adele@apple.com>
3008
3009         Build fix.  Need to wrap these classes in #if ENABLE(VIDEO)
3010
3011         * rendering/MediaControlElements.cpp:
3012         * rendering/MediaControlElements.h:
3013
3014 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
3015
3016         Reviewed by Mark.
3017
3018         Enable SVG_FONTS by default.
3019
3020         * Configurations/WebCore.xcconfig:
3021         * WebCore.vcproj/build-generated-files.sh:
3022
3023 2008-01-07  Dan Bernstein  <mitz@apple.com>
3024
3025         Build fix.
3026
3027         * platform/graphics/qt/SimpleFontDataQt.cpp:
3028         (WebCore::SimpleFontData::SimpleFontData):
3029         (WebCore::SimpleFontData::~SimpleFontData):
3030
3031 2008-01-07  Adam Barth  <hk9565@gmail.com>
3032
3033         Reviewed by Sam Weinig
3034
3035         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16523
3036         <rdar://problem/5657447>
3037
3038         When a frame is created with the URL "about:blank" or "", it should
3039         inherit its SecurityOrigin from its opener.  However, once it has
3040         decided on that SecurityOrigin, it should not change its mind.
3041         Prior to this patch, several events could induce the frame to change
3042         its SecurityOrigin, permitting an attacker to inject script into an
3043         arbitrary SecurityOrigin.
3044
3045         This patch makes several changes:
3046
3047         1) Documents refuse to change from one SecurityOrigin to another
3048            unless explicitly instructed to do so.
3049
3050         2) Navigating to a JavaScript URL that produces a value
3051            preserves the current SecurityOrigin explicitly instead of
3052            relying on the URL to preserve the origin (which fails for
3053            about:blank URLs and SecurityOrigins with document.domain set).
3054
3055            Ideally, we should not preserve the URL at all.  Instead, the
3056            frame's URL should be the JavaScript URL, as in Firefox, but this
3057            would require changes that are too risky for this patch.  I'll
3058            file this as a separate issue.
3059
3060         3) Various methods of navigating to JavaScript URLs were not
3061            properly handling JavaScript that returned a value (and should
3062            therefore replace the current document).  This patch unifies
3063            those code paths with the path that works.
3064
3065            There are still a handful of bugs relating to the handling of
3066            JavaScript URLs, but I'll file those as separate issues.
3067
3068         Tests: http/tests/security/aboutBlank/xss-DENIED-navigate-opener-document-write.html
3069                http/tests/security/aboutBlank/xss-DENIED-navigate-opener-javascript-url.html
3070                http/tests/security/aboutBlank/xss-DENIED-set-opener.html
3071
3072         * dom/Document.cpp:
3073         (WebCore::Document::initSecurityOrigin):
3074         * dom/Document.h:
3075         (WebCore::Document::setSecurityOrigin):
3076         * loader/FrameLoader.cpp:
3077         (WebCore::FrameLoader::changeLocation):
3078         (WebCore::FrameLoader::urlSelected):
3079         (WebCore::FrameLoader::requestFrame):
3080         (WebCore::FrameLoader::submitForm):
3081         (WebCore::FrameLoader::executeIfJavaScriptURL):
3082         (WebCore::FrameLoader::begin):
3083         * loader/FrameLoader.h:
3084         * platform/SecurityOrigin.cpp:
3085         (WebCore::SecurityOrigin::setForURL):
3086         (WebCore::SecurityOrigin::createForFrame):
3087         * platform/SecurityOrigin.h:
3088
3089 2008-01-07  Adele Peterson  <adele@apple.com>
3090
3091         Forgot to check in these changes in my last checkin.
3092
3093         * rendering/RenderThemeSafari.cpp:
3094
3095 2008-01-07  Dan Bernstein  <mitz@apple.com>
3096
3097         Build fixes.
3098
3099         * WebCore.pro:
3100         * platform/graphics/qt/FontCacheQt.cpp:
3101         (WebCore::FontCache::getCachedFontData):
3102
3103 2008-01-07  Timothy Hatcher  <timothy@apple.com>
3104
3105         Reviewed by John Sullivan.
3106
3107         <rdar://problem/5674119> Make the Web Inspector toolbar the normal size when not docked
3108
3109         * page/inspector/inspector.css: Changed CSS rules to have the toolbar and buttons be
3110           normal height when not docked, and small when docked. Also added some cursor properties
3111           prevent showing the text cursor over areas that are not selectable.
3112         * page/inspector/Images: A few images added and old ones removed or renamed.
3113
3114 2008-01-07  Alp Toker  <alp@atoker.com>
3115
3116         Prospective GTK+ autotools/qmake VIDEO build fix for breakage
3117         introduced in r29257.
3118
3119         * GNUmakefile.am:
3120         * WebCore.pro:
3121
3122 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
3123
3124         Reviewed by Oliver.
3125
3126         Build fix affecting all builds - again related to the unicode-range addition.
3127
3128         * css/CSSFontSelector.cpp:
3129         (WebCore::CSSFontSelector::addFontFaceRule):
3130         * css/SVGCSSFontFace.cpp:
3131         (WebCore::SVGCSSFontFace::SVGCSSFontFace):
3132         * css/SVGCSSFontFace.h:
3133         * rendering/RenderSVGText.cpp:
3134         * svg/SVGFont.cpp:
3135         (WebCore::svgFontAndFontFaceElementForFontData):
3136         (WebCore::floatWidthMissingGlyphCallback):
3137         (WebCore::drawTextMissingGlyphCallback):
3138         * svg/SVGFontFaceElement.cpp:
3139
3140 2008-01-07  Adele Peterson  <adele@apple.com>
3141
3142         Reviewed by Antti, Adam, and Mitz.
3143
3144         WebCore part of fix for 
3145         <rdar://problem/5619073> Updated look for <video> controls
3146         <rdar://problem/5619057> Add volume control to video controls
3147
3148         * WebCore.base.exp: Added symbols for WebKitSystemInterface drawing methods.
3149         * WebCore.xcodeproj/project.pbxproj: Added MediaControlElements.h/cpp
3150         * WebCore.vcproj/WebCore.vcproj: ditto.
3151
3152         * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added cases for new appearances.
3153         * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType): Added cases for new types.
3154         * css/CSSSelector.h: (WebCore::CSSSelector::): Added new pseudo elements.
3155         * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::checkOneSelector): ditto.
3156         * css/CSSValueKeywords.in: Added keywords for new control appearance styles.
3157         * css/html4.css: Added new styles for new controls.
3158
3159         * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::canPlay): Added. Takes loading state into account.
3160         * html/HTMLMediaElement.h:
3161
3162         * page/EventHandler.cpp: (WebCore::EventHandler::updateMouseEventTargetNode): Make sure the events always go to the capturing node, if there is one.
3163
3164         * platform/mac/WebCoreSystemInterface.h: Added drawing methods for controls.
3165         * platform/mac/WebCoreSystemInterface.mm: ditto.
3166
3167         * rendering/MediaControlElements.cpp: Added.
3168         (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement): Moved from RenderMedia.  Made this relatively positioned, instead of absolute.
3169         (WebCore::MediaControlInputElement::MediaControlInputElement): Moved from RenderMedia.  Removed call to updateFromElement, 
3170          since its too early to do this here, and causes crashes for the slider.
3171         (WebCore::MediaControlInputElement::attachToParent): Moved from RenderMedia.
3172         (WebCore::MediaControlInputElement::update): ditto.
3173         (WebCore::MediaControlMuteButtonElement::MediaControlMuteButtonElement): Added.
3174         (WebCore::MediaControlMuteButtonElement::defaultEventHandler): ditto.
3175         (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement): Moved from RenderMedia.
3176         (WebCore::MediaControlPlayButtonElement::defaultEventHandler): ditto.
3177         (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement): Added.
3178         (WebCore::MediaControlSeekButtonElement::defaultEventHandler): ditto.
3179         (WebCore::MediaControlSeekButtonElement::seekTimerFired): ditto.
3180         (WebCore::MediaControlTimelineElement::MediaControlTimelineElement): Moved from RenderMedia.
3181         (WebCore::MediaControlTimelineElement::defaultEventHandler): ditto.
3182         (WebCore::MediaControlTimelineElement::update): ditto. 
3183         (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement): Added.
3184         (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler): ditto.
3185         * rendering/MediaControlElements.h: Added. Moved from RenderMedia.
3186         (WebCore::MediaControlShadowRootElement::isShadowNode):
3187         (WebCore::MediaControlShadowRootElement::shadowParentNode):
3188         (WebCore::RenderMediaControlShadowRoot::RenderMediaControlShadowRoot):
3189         (WebCore::RenderMediaControlShadowRoot::setParent):
3190
3191         * rendering/RenderMedia.cpp: Moved control element classes to MediaControlElements files.
3192         (WebCore::RenderMedia::RenderMedia): No need to initialize RefPtrs.
3193         (WebCore::RenderMedia::layout): Set the position for the controlsRenderer.
3194         (WebCore::RenderMedia::createPanel): Added nil check for the renderer.
3195         (WebCore::RenderMedia::createMuteButton): Added.
3196         (WebCore::RenderMedia::createSeekBackButton): ditto.
3197         (WebCore::RenderMedia::createSeekForwardButton): ditto.
3198         (WebCore::RenderMedia::createTimeDisplay): Added nil check for the renderer.
3199         (WebCore::RenderMedia::createFullscreenButton): Added.
3200         (WebCore::RenderMedia::updateControls): Create, delete, and update new controls when appropriate.
3201         (WebCore::RenderMedia::updateControlVisibility): Don't fade controls for audio controls. 
3202         (WebCore::RenderMedia::forwardEvent): Forward events for new controls.
3203         * rendering/RenderMedia.h: Added new methods for creating new controls.
3204
3205         * rendering/RenderObject.cpp: (WebCore::RenderObject::containingBlock): Updated special case for media elements, which are replaced elements, 
3206           but also can contain children (the controls' container) that may need to look for the containing block.
3207
3208         * rendering/RenderSlider.cpp: (WebCore::RenderSlider::createThumbStyle): Added case for MediaSliderAppearance.
3209
3210         * rendering/RenderStyle.h: Added appearance constants and pseudo ids for new controls.
3211         (WebCore::):
3212         (WebCore::RenderStyle::):
3213
3214         * rendering/RenderTheme.cpp:
3215         (WebCore::RenderTheme::adjustStyle): Added cases for new appearances.
3216         (WebCore::RenderTheme::paint): ditto.
3217         * rendering/RenderTheme.h: Added new methods for painting new appearances.
3218         (WebCore::RenderTheme::paintMediaBackground):
3219         (WebCore::RenderTheme::paintMediaFullscreenButton):
3220         (WebCore::RenderTheme::paintMediaPlayButton):
3221         (WebCore::RenderTheme::paintMediaMuteButton):
3222         (WebCore::RenderTheme::paintMediaSeekBackButton):
3223         (WebCore::RenderTheme::paintMediaSeekForwardButton):
3224         (WebCore::RenderTheme::paintMediaSliderThumb):
3225         * rendering/RenderThemeMac.h:
3226         * rendering/RenderThemeMac.mm:
3227         (WebCore::RenderThemeMac::RenderThemeMac): Initialize m_mediaControlBackgroundImage.
3228         (WebCore::RenderThemeMac::~RenderThemeMac): Delete m_mediaControlBackgroundImage.
3229         (WebCore::RenderThemeMac::paintCapsLockIndicator): Use LocalCurrentGraphicsContext here too, since we use it in all other painting methods.
3230         (WebCore::RenderThemeMac::paintSliderTrack): Added case for MediaSliderAppearance.
3231         (WebCore::RenderThemeMac::adjustSliderThumbSize): Added case for MediaSliderThumbAppearance.
3232         (WebCore::RenderThemeMac::paintMediaBackground): Draws the new artwork for the controls.
3233         (WebCore::RenderThemeMac::paintMediaFullscreenButton): ditto.
3234         (WebCore::RenderThemeMac::paintMediaMuteButton): ditto.
3235         (WebCore::RenderThemeMac::paintMediaPlayButton): ditto.
3236         (WebCore::RenderThemeMac::paintMediaSeekBackButton): ditto.
3237         (WebCore::RenderThemeMac::paintMediaSeekForwardButton): ditto.
3238         (WebCore::RenderThemeMac::paintMediaSliderThumb): ditto.
3239         * rendering/RenderThemeSafari.cpp: Draws the new artwork on Windows.
3240         (WebCore::RenderThemeSafari::paintSliderTrack):
3241         (WebCore::RenderThemeSafari::adjustSliderThumbSize):
3242         (WebCore::RenderThemeSafari::paintMediaBackground):
3243         (WebCore::RenderThemeSafari::paintMediaFullscreenButton):
3244         (WebCore::RenderThemeSafari::paintMediaMuteButton):
3245         (WebCore::RenderThemeSafari::paintMediaPlayButton):
3246         (WebCore::RenderThemeSafari::paintMediaSeekBackButton):
3247         (WebCore::RenderThemeSafari::paintMediaSeekForwardButton):
3248         (WebCore::RenderThemeSafari::paintMediaSliderThumb):
3249         * rendering/RenderThemeSafari.h:
3250
3251 2008-01-07  Timothy Hatcher  <timothy@apple.com>
3252
3253         Reviewed by Darin Adler.
3254
3255         Fix ASSERTION FAILED: dstOffset + srcSegmentLength == static_cast<int>(data.size())
3256         when the replacment string is a different length.
3257
3258         * platform/text/StringImpl.cpp:
3259         (WebCore::StringImpl::replace): Move the parenthesis to be around only the subtraction in
3260         the Vector size calculation, correcting the order of math operations.
3261
3262 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
3263
3264         Reviewed by Eric. Hopefully fix build with mac tiger after the unicode-range addition. NSInteger not available there.
3265
3266         * platform/graphics/mac/FontCacheMac.mm:
3267
3268 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
3269
3270         Reviewed by Oliver. Fix build error introduced by Dan's unicode-range support patch & enabling SVG_FONTS by default.
3271
3272         * css/CSSFontSelector.cpp:
3273         (WebCore::CSSFontSelector::getFontData):
3274
3275 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
3276
3277         Not reviewed. Next try to fix wx/mac leopard build.
3278
3279         * css/CSSFontSelector.cpp: Need to wrap a SVG* include in ENABLE(SVG) blocks, as this port doesn't build this generated file.
3280         * svg/SVGFontFaceElement.cpp:
3281         (WebCore::SVGFontFaceElement::createFontData): Fix double<->float conversion issue.
3282         * webcore-base.bkl: Undo svg/ include.
3283
3284 2008-01-07  Dan Bernstein  <mitz@apple.com>
3285
3286         Reviewed by Dave Hyatt.
3287
3288         - <rdar://problem/5665216> Support the unicode-range property in @font-face rules
3289
3290         * GNUmakefile.am:
3291         * WebCore.pro:
3292         * WebCore.vcproj/WebCore.vcproj:
3293         * WebCore.xcodeproj/project.pbxproj:
3294         * WebCoreSources.bkl:
3295         * bindings/objc/DOM.mm:
3296         * bridge/mac/WebCoreAXObject.mm:
3297         * css/CSSComputedStyleDeclaration.cpp:
3298         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3299         * css/CSSFontFace.cpp:
3300         (WebCore::CSSFontFace::fontLoaded): Changed to call the owning segmented
3301         font face.
3302         (WebCore::CSSFontFace::getFontData):
3303         * css/CSSFontFace.h:
3304         (WebCore::CSSFontFace::CSSFontFace):
3305         (WebCore::CSSFontFace::setSegmentedFontFace):
3306         * css/CSSFontFaceSource.cpp:
3307         (WebCore::CSSFontFaceSource::pruneTable): Removed the calls to
3308         GlyphPageTreeNode::pruneTreeCustomFontData because the fonts in the
3309         font table are not exposed in the glyph page tree. Only the segmented
3310         font is, and that is taken care of by the segmented font face.
3311         (WebCore::CSSFontFaceSource::getFontData):
3312         * css/CSSFontFaceSource.h:
3313         * css/CSSFontSelector.cpp:
3314         (WebCore::CSSFontSelector::addFontFaceRule): Changed to collect
3315         @font-face rules with the same family and traits into a single
3316         segmented font face, instead of just retaining the most recent one.
3317         (WebCore::CSSFontSelector::fontLoaded):
3318         (WebCore::CSSFontSelector::getFontData):
3319         * css/CSSFontSelector.h:
3320         * css/CSSGrammar.y:
3321         * css/CSSParser.cpp:
3322         (WebCore::CSSParser::parseValue):
3323         (WebCore::CSSParser::parseFontFaceUnicodeRange): Added. Parses a unicode
3324         range value.
3325         * css/CSSParser.h:
3326         * css/CSSPrimitiveValue.h:
3327         (WebCore::CSSPrimitiveValue::):
3328         * css/CSSPropertyNames.in:
3329         * css/CSSSegmentedFontFace.cpp: Added.
3330         (WebCore::CSSSegmentedFontFace::CSSSegmentedFontFace):
3331         (WebCore::CSSSegmentedFontFace::~CSSSegmentedFontFace):
3332         (WebCore::CSSSegmentedFontFace::pruneTable):
3333         (WebCore::CSSSegmentedFontFace::isLoaded):
3334         (WebCore::CSSSegmentedFontFace::isValid):
3335         (WebCore::CSSSegmentedFontFace::fontLoaded):
3336         (WebCore::CSSSegmentedFontFace::overlayRange):
3337         (WebCore::CSSSegmentedFontFace::getFontData):
3338         * css/CSSSegmentedFontFace.h: Added.
3339         (WebCore::FontFaceRange::FontFaceRange):
3340         (WebCore::FontFaceRange::from):
3341         (WebCore::FontFaceRange::to):
3342         (WebCore::FontFaceRange::fontFace):
3343         (WebCore::CSSSegmentedFontFace::fontSelector):
3344         * css/CSSStyleSelector.cpp:
3345         (WebCore::CSSStyleSelector::applyProperty):
3346         * css/CSSUnicodeRangeValue.cpp: Added.
3347         (WebCore::CSSUnicodeRangeValue::~CSSUnicodeRangeValue):
3348         (WebCore::CSSUnicodeRangeValue::cssText):
3349         * css/CSSUnicodeRangeValue.h: Added.
3350         (WebCore::CSSUnicodeRangeValue::CSSUnicodeRangeValue):
3351         (WebCore::CSSUnicodeRangeValue::from):
3352         (WebCore::CSSUnicodeRangeValue::to):
3353         * css/SVGCSSFontFace.cpp:
3354         (WebCore::SVGCSSFontFace::getFontData):
3355         * css/SVGCSSFontFace.h:
3356         * editing/Editor.cpp:
3357         (WebCore::Editor::fontForSelection):
3358         * editing/Editor.h:
3359         * page/mac/FrameMac.mm:
3360         * page/mac/WebCoreFrameBridge.mm:
3361         (-[WebCoreFrameBridge fontForSelection:]):
3362         * platform/graphics/Font.cpp:
3363         (WebCore::WidthIterator::advance):
3364         (WebCore::Font::glyphDataForCharacter):
3365         (WebCore::Font::primaryFont): Changed to return the simple font data
3366         used for the space character.
3367         (WebCore::Font::fontDataAt):
3368         (WebCore::Font::fontDataForCharacters):
3369         (WebCore::Font::drawGlyphBuffer):
3370         * platform/graphics/Font.h:
3371         * platform/graphics/FontCache.cpp:
3372         (WebCore::FontCache::getCachedFontData):
3373         (WebCore::FontCache::getFontData):
3374         * platform/graphics/FontCache.h:
3375         * platform/graphics/FontData.cpp: Renamed to SimpleFontData.cpp
3376         * platform/graphics/FontData.h: Renamed to SimpleFontData.cpp.
3377         * platform/graphics/FontDataBaseClass.cpp: Added. This will be renamed
3378         FontData.cpp.
3379         (WebCore::FontData::~FontData):
3380         * platform/graphics/FontDataBaseClass.h: Added. This will be renamed
3381         FontData.h.
3382         * platform/graphics/FontFallbackList.cpp:
3383         (WebCore::FontFallbackList::determinePitch):
3384         (WebCore::FontFallbackList::fontDataAt):
3385         (WebCore::FontFallbackList::fontDataForCharacters):
3386         * platform/graphics/FontFallbackList.h:
3387         (WebCore::FontFallbackList::primaryFont):
3388         * platform/graphics/FontSelector.h:
3389         * platform/graphics/GlyphBuffer.h:
3390         (WebCore::GlyphBuffer::fontDataAt):
3391         (WebCore::GlyphBuffer::swap):
3392         (WebCore::GlyphBuffer::add):
3393         * platform/graphics/GlyphPageTreeNode.cpp:
3394         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
3395         (WebCore::GlyphPageTreeNode::initializePage): Added code to initialize
3396         pages for segmented font data.
3397         (WebCore::GlyphPageTreeNode::getChild):
3398         (WebCore::GlyphPageTreeNode::pruneCustomFontData):
3399         * platform/graphics/GlyphPageTreeNode.h:
3400         (WebCore::GlyphPage::setGlyphDataForCharacter):
3401         (WebCore::GlyphPage::setGlyphDataForIndex):
3402         (WebCore::GlyphPageTreeNode::getRootChild):
3403         * platform/graphics/SegmentedFontData.cpp: Added.
3404         (WebCore::SegmentedFontData::~SegmentedFontData):
3405         (WebCore::SegmentedFontData::fontDataForCharacter):
3406         (WebCore::SegmentedFontData::containsCharacters):
3407         (WebCore::SegmentedFontData::isCustomFont):
3408         (WebCore::SegmentedFontData::isLoading):
3409         (WebCore::SegmentedFontData::isSegmented):
3410         * platform/graphics/SegmentedFontData.h: Added.
3411         (WebCore::FontDataRange::FontDataRange):
3412         (WebCore::FontDataRange::from):
3413         (WebCore::FontDataRange::to):
3414         (WebCore::FontDataRange::fontData):
3415         (WebCore::SegmentedFontData::appendRange):
3416         (WebCore::SegmentedFontData::numRanges):
3417         (WebCore::SegmentedFontData::rangeAt):
3418         * platform/graphics/SimpleFontData.cpp: Copied from WebCore/platform/graphics/FontData.cpp.
3419         (WebCore::SimpleFontData::SimpleFontData):
3420         (WebCore::SimpleFontData::~SimpleFontData):
3421         (WebCore::SimpleFontData::ascent):
3422         (WebCore::SimpleFontData::descent):
3423         (WebCore::SimpleFontData::widthForGlyph):
3424         (WebCore::SimpleFontData::fontDataForCharacter):
3425         (WebCore::SimpleFontData::isSegmented):
3426         * platform/graphics/SimpleFontData.h: Copied from WebCore/platform/graphics/FontData.h.
3427         (WebCore::SimpleFontData::isCustomFont):
3428         (WebCore::SimpleFontData::isLoading):
3429         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3430         (WebCore::GraphicsContext::setPlatformFont):
3431         * platform/graphics/gtk/FontCacheGtk.cpp:
3432         (WebCore::FontCache::getFontDataForCharacters):
3433         * platform/graphics/gtk/FontDataGtk.cpp: Renamed to
3434         SimpleFontDataGtk.cpp.
3435         * platform/graphics/gtk/FontGtk.cpp:
3436         (WebCore::Font::drawGlyphs):
3437         * platform/graphics/gtk/GlyphPageTreeNodeGtk.cpp:
3438         (WebCore::GlyphPage::fill):
3439         * platform/graphics/gtk/SimpleFontDataGtk.cpp: Copied from WebCore/platform/graphics/gtk/FontDataGtk.cpp.
3440         (WebCore::SimpleFontData::platformInit):
3441         (WebCore::SimpleFontData::platformDestroy):
3442         (WebCore::SimpleFontData::smallCapsFontData):
3443         (WebCore::SimpleFontData::containsCharacters):
3444         (WebCore::SimpleFontData::determinePitch):
3445         (WebCore::SimpleFontData::platformWidthForGlyph):
3446         (WebCore::SimpleFontData::setFont):
3447         * platform/graphics/mac/FontCacheMac.mm:
3448         (WebCore::FontCache::getFontDataForCharacters):
3449         * platform/graphics/mac/FontDataMac.mm: Renamed to SimpleFontDataMac.mm.
3450         * platform/graphics/mac/FontMac.mm:
3451         (WebCore::initializeATSUStyle):
3452         (WebCore::overrideLayoutOperation):
3453         (WebCore::ATSULayoutParameters::initialize):
3454         (WebCore::Font::drawGlyphs):
3455         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
3456         (WebCore::GlyphPage::fill):
3457         * platform/graphics/mac/SimpleFontDataMac.mm: Copied from WebCore/platform/graphics/mac/FontDataMac.mm.
3458         (WebCore::initFontData):
3459         (WebCore::SimpleFontData::platformInit):
3460         (WebCore::SimpleFontData::platformDestroy):
3461         (WebCore::SimpleFontData::smallCapsFontData):
3462         (WebCore::SimpleFontData::containsCharacters):
3463         (WebCore::SimpleFontData::determinePitch):
3464         (WebCore::SimpleFontData::platformWidthForGlyph):
3465         (WebCore::SimpleFontData::checkShapesArabic):
3466         * platform/graphics/qt/FontDataQt.cpp: Renamed to SimpleFontDataQt.cpp.
3467         * platform/graphics/qt/GlyphPageTreeNodeQt.cpp:
3468         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
3469         * platform/graphics/qt/SimpleFontDataQt.cpp: Copied from WebCore/platform/graphics/qt/FontDataQt.cpp.
3470         * platform/graphics/win/FontCacheWin.cpp:
3471         (WebCore::FontCache::getFontDataForCharacters):
3472         * platform/graphics/win/FontDataWin.cpp: Renamed to
3473         SimpleFontDataWin.cpp.
3474         * platform/graphics/win/FontWin.cpp:
3475         (WebCore::Font::drawGlyphs):
3476         * platform/graphics/win/GlyphPageTreeNodeWin.cpp:
3477         (WebCore::GlyphPage::fill):
3478         * platform/graphics/win/SimpleFontDataWin.cpp: Copied from WebCore/platform/graphics/win/FontDataWin.cpp.
3479         (WebCore::SimpleFontData::setShouldApplyMacAscentHack):
3480         (WebCore::SimpleFontData::platformInit):
3481         (WebCore::SimpleFontData::platformDestroy):
3482         (WebCore::SimpleFontData::smallCapsFontData):
3483         (WebCore::SimpleFontData::containsCharacters):
3484         (WebCore::SimpleFontData::determinePitch):
3485         (WebCore::SimpleFontData::platformWidthForGlyph):
3486         (WebCore::SimpleFontData::scriptFontProperties):
3487         * platform/graphics/wx/FontCacheWx.cpp:
3488         (WebCore::FontCache::getFontDataForCharacters):
3489         * platform/graphics/wx/FontDataWx.cpp: Renamed to SimpleFontDataWx.cpp.
3490         * platform/graphics/wx/FontWx.cpp:
3491         (WebCore::Font::drawGlyphs):
3492         * platform/graphics/wx/GlyphMapWx.cpp:
3493         (WebCore::GlyphPage::fill):
3494         * platform/graphics/wx/SimpleFontDataWx.cpp: Copied from WebCore/platform/graphics/wx/FontDataWx.cpp.
3495         (WebCore::SimpleFontData::platformInit):
3496         (WebCore::SimpleFontData::platformDestroy):
3497         (WebCore::SimpleFontData::smallCapsFontData):
3498         (WebCore::SimpleFontData::containsCharacters):
3499         (WebCore::SimpleFontData::determinePitch):
3500         (WebCore::SimpleFontData::platformWidthForGlyph):
3501         * platform/mac/FileChooserMac.mm:
3502         * platform/mac/PopupMenuMac.mm:
3503         * platform/mac/WebCoreTextRenderer.mm:
3504         * platform/win/PopupMenuWin.cpp:
3505         * platform/win/UniscribeController.cpp:
3506         (WebCore::UniscribeController::advance):
3507         (WebCore::UniscribeController::itemizeShapeAndPlace):
3508         (WebCore::UniscribeController::shapeAndPlaceItem):
3509         (WebCore::UniscribeController::shape):
3510         * platform/win/UniscribeController.h:
3511         * svg/SVGFont.cpp:
3512         (WebCore::Font::drawGlyphsWithSVGFont):
3513         * svg/SVGFontElement.cpp:
3514         (WebCore::SVGFontElement::collectGlyphs):
3515         * svg/SVGFontFaceElement.cpp:
3516         (WebCore::SVGFontFaceElement::createFontData):
3517         * svg/SVGFontFaceElement.h:
3518         * svg/SVGGlyphElement.cpp:
3519
3520 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
3521
3522         Not reviewed. Try to fix mac build by forcing SVGNames regeneration.
3523
3524         * svg/svgtags.in:
3525
3526 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
3527
3528         Not reviewed. Proposed build fix for wx.
3529
3530         * webcore-base.bkl:
3531
3532 2008-01-07  Dan Bernstein  <mitz@apple.com>
3533
3534         64-bit build fix
3535
3536         * platform/graphics/mac/FontCustomPlatformData.cpp:
3537         (WebCore::FontCustomPlatformData::fontPlatformData): Have to use a
3538         cast here since FMGetFontFromATSFontRef() is not available on 64-bit.
3539
3540 2008-01-06  Nikolas Zimmermann  <zimmermann@kde.org>
3541
3542         Reviewed by Oliver. Parts reviewed by Eric, David Hyatt & Dan & Alexey.
3543         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)
3544
3545         Display SVG Fonts, fill svg/SVGFont.cpp with life by adding all needed code to
3546         measure & render glyphs contained in SVG Fonts, including ligature lookup support.
3547
3548         Implement floatWidth/selectionRectForText for SVG Fonts, fixing text selection.
3549
3550         Support horiz-origin-x/y, horiz-adv-x, vert-adv-y, vert-origin-x/y & arabic-form.
3551         Implement simple algorithm to determine the arabic forms for a string (initial, isolated, medial, terminal).
3552
3553         Removed drawGlyphsWithSVGFont - create a new function drawTextWithSVGFont instead.
3554         This doesn't involve creating/using a 'GlyphBuffer' object anymore, which is not
3555         required for SVG Fonts anyway (we already know all our offsets/advances/etc..)
3556
3557         Don't call it from drawSimpleText anymore, but directly in drawText - as Dan suggested.
3558
3559         <glyph> elements now register themselves in the SVGFontElement's glyph cache.
3560         (insertedIntoDocument / removedFromDocument take care of this)
3561
3562         The cache is built once now, and is kept updated - it's not rebuild anymore
3563         on painting (!) - which was a crude hack for testing.
3564
3565         W3C testcase which include SVG Fonts:
3566         svg/W3C-SVG-1.1/animate-elem-03-t.svg (Fixed, of course not the anim itself, but it's SVG Fonts usage)
3567         svg/W3C-SVG-1.1/animate-elem-24-t.svg (Ditto)
3568         svg/W3C-SVG-1.1/animate-elem-36-t.svg (Ditto)
3569         svg/W3C-SVG-1.1/animate-elem-40-t.svg (Ditto)
3570         svg/W3C-SVG-1.1/fonts-kern-01-t.svg (missing <vkern>/<hkern> support)
3571         svg/W3C-SVG-1.1/fonts-desc-02-t.svg (Fixed, tests CSS font matching based on font-variant attribute)
3572         svg/W3C-SVG-1.1/fonts-elem-01-t.svg (Fixed, basic SVG font test)
3573         svg/W3C-SVG-1.1/fonts-elem-02-t.svg (Fixed, accuracy test for embedded SVG font)
3574         svg/W3C-SVG-1.1/fonts-elem-05-t.svg (Fixed, checks horiz-origin-x support, note: W3C reference image is wrong)
3575         svg/W3C-SVG-1.1/fonts-elem-06-t.svg (Fixed, checks horiz-adv-x support)
3576         svg/W3C-SVG-1.1/fonts-glyph-02-t.svg (Fixed, checks arabic-form support)
3577         svg/W3C-SVG-1.1/fonts-glyph-03-t.svg (Fixed, checks glyph matching based on xml:lang)
3578         svg/W3C-SVG-1.1/masking-mask-01-b.svg (Fixed, SVG Fonts & masking)
3579         svg/W3C-SVG-1.1/pservers-grad-08-b.svg (Fixed, SVG Fonts & gradient on fill/stroke)
3580         svg/W3C-SVG-1.1/render-elems-06-t.svg (Fixed, simple 'fill' property test)
3581         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)
3582         svg/W3C-SVG-1.1/render-elems-08-t.svg (Fixed, simple 'fill' & 'stroke' property test)
3583         svg/W3C-SVG-1.1/render-groups-01-b.svg (missing <vkern>/<hkern> support)
3584         svg/W3C-SVG-1.1/render-groups-03-t.svg (Ditto)
3585         svg/W3C-SVG-1.1/text-altglyph-01-b.svg (no <altGlyph> support yet)
3586         svg/W3C-SVG-1.1/text-text-04-t.svg (Fixed, absolute placing of characters pixel perfect now)
3587         svg/W3C-SVG-1.1/text-text-05-t.svg (FIXME: problem with text-anchor)
3588         svg/W3C-SVG-1.1/text-text-06-t.svg (highlights problem with ligatures & absolute positioned characters)
3589
3590         Questionable testcases:
3591         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.)