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