88c8c5e2a1e50613334b583933fa46f0f82d7c25
[WebKit-https.git] / WebCore / ChangeLog
1 2008-01-24  Alexey Proskuryakov  <ap@webkit.org>
2
3         http://bugs.webkit.org/show_bug.cgi?id=16993
4         <rdar://problem/5704331> REGRESSION: Loading page leads to many unexpected redirections
5
6         Rolled out r29590, which was not a correct fix for <rdar://problem/5692566>.
7
8         * loader/FrameLoader.cpp:
9         (WebCore::FrameLoader::clear):
10
11 2008-01-24  Antti Koivisto  <antti@apple.com>
12
13         Reviewed by Adam.
14         
15         If the media is playing and the load stalls the playback wont restart by seeking backwards.
16         
17         We should be in CAN_PLAY state if the current time is less than the maximum loaded time. Rate 
18         tricks were for streaming case and are not necessary now since that is now disabled.
19         
20         Windows patch coming separately.
21
22         Test: http/tests/media/video-play-stall-seek.html
23
24         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
25         (WebCore::MediaPlayerPrivate::updateStates):
26
27 2008-01-24  Antti Koivisto  <antti@apple.com>
28
29         Reviewed by Adam.
30
31         Fix <rdar://problem/5684815>
32         After navigating back to the page that contains a <audio> that has been muted, the audio is still heard
33         
34         - get rid of the separate muted state in MediaPlayer, maintain the state in the cross platform code only
35         - remove volumeChanged() callbacks from HTMLMediaElement and OS X MediaPlayer, they were not used for anything
36         - rename updateMediaPlayer -> updatePlayState which tells more about what it actually does
37
38         * html/HTMLMediaElement.cpp:
39         (WebCore::HTMLMediaElement::load):
40         (WebCore::HTMLMediaElement::setReadyState):
41         (WebCore::HTMLMediaElement::play):
42         (WebCore::HTMLMediaElement::pause):
43         (WebCore::HTMLMediaElement::setVolume):
44         (WebCore::HTMLMediaElement::setMuted):
45         (WebCore::HTMLMediaElement::checkIfSeekNeeded):
46         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
47         (WebCore::HTMLMediaElement::updateVolume):
48         (WebCore::HTMLMediaElement::updatePlayState):
49         (WebCore::HTMLMediaElement::setPausedInternal):
50         * html/HTMLMediaElement.h:
51         * platform/graphics/MediaPlayer.cpp:
52         (WebCore::MediaPlayer::MediaPlayer):
53         * platform/graphics/MediaPlayer.h:
54         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
55         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
56         (WebCore::MediaPlayerPrivate::createQTMovie):
57         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
58         * platform/graphics/win/QTMovieWin.cpp:
59         * platform/graphics/win/QTMovieWin.h:
60
61 2008-01-24  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
62
63         Reviewed by Simon.
64
65         * Fix "QObject::startTimer: QTimer can only be used with threads started with QThread"
66         * The JSC GCController gets automatically destructed on application exit, it will stop
67         its timer and we try to schedule the next timer. Now the GCController can get destructed
68         after our QApplication is gone. This will trigger the above warning, we can avoid this
69         by checking if our qApp is still around.
70
71         * platform/qt/SharedTimerQt.cpp:
72         (WebCore::setSharedTimerFireTime):
73
74 2008-01-24  Morten Johan Sørvig  <msorvig@trolltech.com>
75
76         Reviewed by Simon.
77
78         Qt/Mac: Make sure the scrollbars does not overlap the grow box.
79
80         When showing only one scrollbar we need to move it so it doesn't overlap the
81         grow box. This is similar to the code in QAbstractScrollArea.
82
83
84         * platform/qt/ScrollViewQt.cpp:
85         (WebCore::ScrollView::updateScrollbars):
86
87 2008-01-15  Michael Goddard  <michael.goddard@trolltech.com>
88
89         Reviewed by Darin.
90
91         While parsing -webkit-border-image, store
92         the border widths as naked pointers rather
93         than as OwnPtrs, since they point to the
94         middle of an array.
95
96         Test: fast/css/border-image-crash.html
97
98         * css/CSSParser.cpp:
99
100 2008-01-24  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
101
102         Reviewed by Simon.
103
104         * Attempt to fix showing of popup again after a popup has been shown but
105         the user did not select any item (e.g. clicked outside of the popup)
106         * Keep track of the popup status using the virtuals showPopup and hidePopup
107         and do not go into recursion when hiding a popup.
108
109         * platform/qt/QWebPopup.cpp:
110         (WebCore::QWebPopup::showPopup):
111         (WebCore::QWebPopup::hidePopup):
112         * platform/qt/QWebPopup.h:
113
114 2008-01-24  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
115
116         Reviewed by Simon.
117
118         * Assert the presence of the PopupMenuClient
119
120         * platform/qt/QWebPopup.cpp:
121         (WebCore::QWebPopup::QWebPopup):
122         (WebCore::QWebPopup::hideEvent):
123         (WebCore::QWebPopup::activeChanged):
124
125 2008-01-23  David Kilzer  <ddkilzer@apple.com>
126
127         <rdar://problem/5702947> WebCore: CGContextDrawPDFDocument will be deprecated
128
129         Reviewed by Darin.
130
131         No test cases added since there is no change in behavior.
132
133         * platform/graphics/cg/PDFDocumentImage.cpp:
134         (WebCore::PDFDocumentImage::draw): Replace CGContextDrawPDFDocument() with
135         calls to CG methods that perform the equivalent work.
136
137 2008-01-23  Antti Koivisto  <antti@apple.com>
138
139         Reviewed by Hyatt, Adele.
140
141         Timers for media controls keep running when the page is in the page cache.
142         
143         Stop timers in RenderMedia and get rid of the controls tree when the page goes to the cache. 
144
145         * html/HTMLMediaElement.cpp:
146         (WebCore::HTMLMediaElement::HTMLMediaElement):
147         (WebCore::HTMLMediaElement::willSaveToCache):
148         (WebCore::HTMLMediaElement::didRestoreFromCache):
149         * html/HTMLMediaElement.h:
150         (WebCore::HTMLMediaElement::inPageCache):
151         * rendering/RenderMedia.cpp:
152         (WebCore::RenderMedia::updateControls):
153
154 2008-01-23  Antti Koivisto  <antti@apple.com>
155
156         Reviewed by Adam.
157
158         Video that had already played to the end would start playing (from beginning) on back/forward navigation.
159         
160         Use setPausedInternal() instead of pause(). This avoid generating pause/play events and matches specification text.
161
162         * html/HTMLMediaElement.cpp:
163         (WebCore::HTMLMediaElement::willSaveToCache):
164
165 2008-01-23  Alexey Proskuryakov  <ap@webkit.org>
166
167         Reviewed by Darin.
168
169         <rdar://problem/4200075> Missing support for accented chars in mailto forms
170
171         With some combinations of form parameters, this was resulting in regressed behavior.
172
173         Tests: fast/forms/mailto/get-non-ascii-text-plain-latin-1.html
174                fast/forms/mailto/post-text-plain-with-accept-charset.html
175                fast/forms/mailto/post-text-plain.html
176
177         * html/HTMLFormElement.cpp:
178         (WebCore::HTMLFormElement::formData): Ignore accept-charset for mailto forms, which are always
179         encoded as UTF-8.
180         (WebCore::HTMLFormElement::isMailtoForm): Added.
181         (WebCore::HTMLFormElement::dataEncoding): Added (factored out from formData).
182         (WebCore::HTMLFormElement::submit): When round-tripping in text/plain case, use utf-8 encoding.
183         * html/HTMLFormElement.h: Added a isMailtoForm() function. It may be a bit unfortunate that
184         its result is calculated repeatedly, but this doesn't seem to be anywhere near hot code.
185
186 2008-01-22  Justin Garcia  <justin.garcia@apple.com>
187
188         Reviewed by Alice Liu.
189
190         <rdar://problem/5658727> Undo/redo for pasted or typed text in yahoo mail becomes disabled after one round of being selected
191
192         * rendering/RenderTextControl.cpp:
193         (WebCore::RenderTextControl::updateFromElement): If value == text() and
194         m_innerText is empty, then value and text() are "". In that case both DOM 
195         mutations are no-ops and there is no reason to clear the Undo stack.
196
197 2008-01-23  Steve Falkenburg  <sfalken@apple.com>
198
199         <rdar://problem/5698732> Copyright strings should include 2008
200
201         Reviewed by Sam.
202
203         * WebCore.vcproj/QTMovieWin.rc:
204
205 2008-01-23  Steve Falkenburg  <sfalken@apple.com>
206
207         <rdar://problem/5699509> Allow file upload dialog to be localized.
208
209         Reviewed by Darin.
210
211         * platform/LocalizedStrings.h:
212         * platform/win/FileChooserWin.cpp:
213         (WebCore::FileChooser::openFileChooser):
214
215 2008-01-23  Adam Roben  <aroben@apple.com>
216
217         Fix behavior of type-to-select in <select> menus
218
219         In r27825 we started posting both a WM_KEYDOWN and WM_CHAR message
220         whenever a key was pressed in the dropdown menu. However, since posted
221         messages go through TranslateMessage, the WM_KEYDOWN was generating
222         another WM_CHAR message, so two WM_CHAR messages in a row would reach
223         the WebView. This caused the searching to happen twice for each key,
224         so typing "dog" would search for "ddoogg".
225
226         Reviewed by Darin.
227
228         * platform/win/PopupMenuWin.cpp:
229         (WebCore::PopupWndProc): Repost the WM_KEYDOWN message to the WebView.
230         This is will generate a WM_CHAR message which will trigger the
231         type-to-select behavior. This is very similar to our behavior prior to
232         r27825, except that we're now calling PostMessage instead of
233         SendMessage.
234
235 2008-01-23  Alp Toker  <alp@atoker.com>
236
237         Rubber-stamped by Mark Rowe.
238
239         Remove whitespace after -I in automake include lists.
240
241         * GNUmakefile.am:
242
243 2008-01-23  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
244
245         * Rubber stamped by Simon
246
247         * Load images incrementally. This will show warnings on the console
248         and we want to fix them for Qt4.4. If that happens we have to remove
249         the comment from the enum inside the ImageDecoderQt.cpp
250
251         * platform/graphics/qt/ImageDecoderQt.cpp:
252         (WebCore::ImageDecoderQt::setData):
253
254 2008-01-23  Lars Knoll  <lars@trolltech.com>
255
256         Reviewed by Holger Freyther <holger.freyther@trolltech.com>.
257
258         Fix rendering of the Scrollbar as well as mouse handling for some styles.
259
260         The QStyle expects that that painter is set up to clip to the scrollbar bounds
261         and some of the styles seem to paint somewhat outside of these bounds. Clipping to
262         the scrollbar bounds before drawing removes some artifacts.
263
264         Also set m_opt.rect.topLeft to (0/0) in the mouse handlers. Fixes some issues with
265         the oxygen style.
266
267
268         * platform/qt/PlatformScrollBarQt.cpp:
269         (WebCore::PlatformScrollbar::paint):
270         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
271         (WebCore::PlatformScrollbar::handleMousePressEvent):
272
273 2008-01-23  Michael Brasser  <michael.brasser@trolltech.com>
274
275         Reviewed by Simon.
276
277         Rendering fixes for Qtopia.
278
279         Make the focus ring work with line breaks (until we have QPainterPath::simplify) and
280         call QStyle with better arguments when painting themed elements.
281
282         * platform/graphics/qt/GraphicsContextQt.cpp:
283         (WebCore::GraphicsContext::drawFocusRing):
284         * platform/qt/RenderThemeQt.cpp:
285         (WebCore::RenderThemeQt::paintButton):
286         (WebCore::RenderThemeQt::applyTheme):
287
288 2008-01-23  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
289
290         Reviewed by Simon.
291
292         * FormData::flatten does not include to be uploaded files. Create our own QIODevice
293         for the QNetworkAccessManager and feed the complete content of the FormData* to
294         the (HTTP) backend.
295         * Try to optimize the ::readData implementation to fill the buffer as best as possible
296
297         * platform/network/qt/QNetworkReplyHandler.cpp:
298         (WebCore::FormDataIODevice::FormDataIODevice):
299         (WebCore::FormDataIODevice::~FormDataIODevice):
300         (WebCore::FormDataIODevice::moveToNextElement):
301         (WebCore::FormDataIODevice::readData):
302         (WebCore::FormDataIODevice::writeData):
303         (WebCore::FormDataIODevice::setParent):
304         (WebCore::FormDataIODevice::isSequential):
305         (WebCore::FormDataIODevice::slotFinished):
306         (WebCore::QNetworkReplyHandler::start):
307         * platform/network/qt/QNetworkReplyHandler.h:
308
309 2008-01-23  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
310
311         Reviewed by Simon.
312
313         * Coding-Style fixes
314
315         * platform/network/qt/QNetworkReplyHandler.cpp:
316         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
317
318 2008-01-23  Michael Brasser  <michael.brasser@trolltech.com>
319
320         Reviewed by Simon.
321
322         use PopupClient's font for popup menu. Otherwise, in Qtopia, the popup's font is much bigger (QApplication::font()?) and the text doesn't fit.
323
324         * platform/qt/QWebPopup.cpp:
325         (WebCore::QWebPopup::QWebPopup):
326
327 2008-01-23  Simon Hausmann  <hausmann@webkit.org>
328
329         Reviewed by Lars.
330
331         Implemented FrameLoaderClient::startDownload() and FrameLoaderClient::download().
332         
333         Added two signals to QWebPage to handle downloading of links and handling of
334         unsupported content.
335         
336
337         * platform/network/qt/QNetworkReplyHandler.cpp:
338         (WebCore::QNetworkReplyHandler::release):
339         * platform/network/qt/QNetworkReplyHandler.h:
340
341 2008-01-22  Dan Bernstein  <mitz@apple.com>
342
343         Reviewed by Adele Peterson.
344
345         - fix http://bugs.webkit.org/show_bug.cgi?id=16905
346           <rdar://problem/5692407> REGRESSION (3.0.4-TOT): "menu" pseudocolor is badly chosen
347
348         The regression test for this is fast/css/css2-system-color.html which
349         is currently disabled.
350
351         * rendering/RenderThemeMac.mm:
352         (WebCore::menuBackgroundColor): Added. Uses HIThemeDrawMenuBackground
353         to draw the menu item background into a bitmap graphics context and
354         returns the color of the pixel at (0, 0).
355         (WebCore::RenderThemeMac::systemColor): Changed to call
356         menuBackgroundColor for the CSS2 menu color.
357
358 2008-01-22  Darin Adler  <darin@apple.com>
359
360         Reviewed by Oliver Hunt.
361
362         - turn full repainting back on for <canvas> until we get incremental
363           repaint working properly
364
365         Ollie and I came up with a plan for testing this, but for now we should
366         just fall back on the "repaint everything" behavior we have always had.
367
368         * html/HTMLCanvasElement.cpp:
369         (WebCore::HTMLCanvasElement::willDraw): Just call repaint.
370
371 2008-01-22  Alp Toker  <alp@atoker.com>
372
373         GTK+/qmake build fix.
374
375         * WebCore.pro:
376
377 2008-01-22  Adam Roben  <aroben@apple.com>
378
379         Add HTMLFrameOwnerElement::scrollingMode
380
381         This new virtual method is overridden by HTMLFrameElementBase to
382         provide the scrolling mode set on the frame or iframe element. Object
383         elements always have scrolling=auto, so there's no need to override
384         this method for HTMLPlugInElement.
385
386         Reviewed by Hyatt.
387
388         * html/HTMLFrameElementBase.h: Declare scrollingMode as virtual.
389         * html/HTMLFrameOwnerElement.h:
390         (WebCore::HTMLFrameOwnerElement::scrollingMode): Added.
391
392 2008-01-22  David Hyatt  <hyatt@apple.com>
393
394         Fix for <rdar://problem/5698481> REGRESSION: Web Inspector source view gutter double divider and no padding
395
396         Now that cellpadding cascades properly on <td>s, we need to make the view source padding rules in the user
397         agent sheet have !important in order to override author settings.
398
399         Reviewed by Tim
400
401         * css/view-source.css:
402
403 2008-01-22  Nikolas Zimmermann  <zimmermann@kde.org>
404
405         Reviewed by Alp.
406
407         Allow to use SVGPaintServerSolid without RenderObject/RenderStyle. Used later to draw SVG Fonts in HTML.
408
409         * svg/graphics/SVGPaintServer.cpp:
410         (WebCore::SVGPaintServer::sharedSolidPaintServer):
411         * svg/graphics/SVGPaintServer.h:
412         * svg/graphics/cg/SVGPaintServerCg.cpp:
413         (WebCore::SVGPaintServer::renderPath):
414         (WebCore::SVGPaintServer::fillPath):
415         (WebCore::SVGPaintServer::clipToFillPath):
416         * svg/graphics/cg/SVGPaintServerSolidCg.cpp:
417         (WebCore::SVGPaintServerSolid::setup):
418
419 2008-01-22  Nikolas Zimmermann  <zimmermann@kde.org>
420
421         Reviewed by Alp.
422
423         Initialize missing variables, m_lineGap / m_lineSpacing.
424         Only noticeable when trying to render HTML text using SVG Fonts (which is not possible with trunk, but with my local version).
425
426         * platform/graphics/SimpleFontData.cpp:
427         (WebCore::SimpleFontData::SimpleFontData):
428
429 2008-01-22  Alp Toker  <alp@atoker.com>
430
431         Reviewed by Nikolas.
432
433         Fix Cairo SVG fonts following changes in r29700.
434
435         Set the font description's details as needed in FontPlatformData and
436         eliminate GraphicsContext::setPlatformFont() since it was redundant
437         and assumed all fonts were Cairo fonts.
438
439         * platform/graphics/GraphicsContext.cpp:
440         * platform/graphics/cairo/GraphicsContextCairo.cpp:
441         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
442         (WebCore::FontPlatformData::FontPlatformData):
443
444 2008-01-22  Dan Bernstein  <mitz@apple.com>
445  
446          Reviewed by Eric.
447  
448          - fix http://bugs.webkit.org/show_bug.cgi?id=16967
449            <rdar://problem/5699344> Reproducible crash when navigating back to a page using SVG fonts
450  
451          Test: svg/custom/font-platformDestroy-crash.svg
452  
453          * platform/graphics/SimpleFontData.cpp:
454          (WebCore::SimpleFontData::~SimpleFontData): Changed to call
455          platformDestroy() only if platformInit() was called from the
456          constructor.
457
458 2008-01-22  Lars Knoll  <lars@trolltech.com>
459
460         Reviewed by Simon.
461
462         cleanup the CookieJarQt implementation and implement cookiesEnabled.
463
464         * platform/qt/CookieJarQt.cpp:
465         (WebCore::cookieJar):
466         (WebCore::setCookies):
467         (WebCore::cookies):
468         (WebCore::cookiesEnabled):
469
470 2008-01-22  Lars Knoll  <lars@trolltech.com>
471
472         Reviewed by Simon.
473
474         Ported the font implementation to use the new QFont features of Qt 4.4.
475         
476
477         * platform/graphics/Font.h:
478         (WebCore::Font::setWordSpacing):
479         (WebCore::Font::setLetterSpacing):
480         (WebCore::Font::font):
481         (WebCore::Font::):
482         * platform/graphics/qt/FontQt.cpp:
483         (WebCore::Font::Font):
484         (WebCore::Font::setWordSpacing):
485         (WebCore::Font::setLetterSpacing):
486         (WebCore::qstring):
487         (WebCore::setupLayout):
488         (WebCore::Font::drawText):
489         (WebCore::Font::width):
490         (WebCore::Font::floatWidth):
491         (WebCore::Font::offsetForPosition):
492         (WebCore::Font::selectionRectForText):
493         (WebCore::generateComponents):
494         (WebCore::cursorToX):
495         (WebCore::Font::~Font):
496         (WebCore::Font::operator=):
497         (WebCore::Font::operator==):
498         (WebCore::Font::update):
499
500 2008-01-21  Eric Seidel  <eric@webkit.org>
501
502         Reviewed by Nikolas & Oliver.
503         
504         Tested by svg/custom/svg-features.html
505         
506         * dom/DOMImplementation.cpp:
507         (WebCore::isSVG10Feature): use ENABLE(SVG_*) conditionals
508         (WebCore::isSVG11Feature): use ENABLE(SVG_*) conditionals
509
510 2008-01-21  Geoffrey Garen  <ggaren@apple.com>
511
512         Reviewed by Maciej Stachowiak.
513
514         Adapted WebCore to the fix for http://bugs.webkit.org/show_bug.cgi?id=16909
515         REGRESSION: Amazon.com crash (ActivationImp)
516
517         * bindings/js/kjs_proxy.cpp:
518         (WebCore::KJSProxy::~KJSProxy): No convenient way to make this assertion
519         anymore. (It wasn't firing for anyone, anyway, so it's no big loss.)
520
521         * bindings/objc/WebScriptObject.mm:
522         (+[WebScriptObject throwException:]): Use the ExecState stack, instead
523         of currentExec.
524         (-[WebScriptObject setException:]): ditto. Also, a slight change in
525         behavior: If no ExecStates are active, we no longer throw an exception
526         in the global ExecState. The JavaScriptCore ChangeLog explains why.
527         This also matches the behavior of +throwException.
528
529 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
530
531         Not reviewed. Try to fix Qt build, after the rmdir() fixes.c
532
533         * platform/graphics/qt/SimpleFontDataQt.cpp:
534         (WebCore::SimpleFontData::SimpleFontData):
535
536 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
537
538         Not reviewed. Another Wx build fix.
539
540         * platform/graphics/wx/FontWx.cpp:
541         (WebCore::Font::drawGlyphs):
542
543 2008-01-21  Darin Adler  <darin@apple.com>
544
545         - try to fix Qt build
546
547         * platform/qt/FileSystemQt.cpp:
548         (WebCore::deleteEmptyDirectory): QDir::root().rmdir() instead of QDir::rmdir().
549
550 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
551
552         Not reviewed. Yet another win/gtk build fix.
553
554         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
555         (WebCore::FontPlatformData::FontPlatformData):
556         * platform/graphics/win/FontWin.cpp:
557         (WebCore::Font::drawGlyphs):
558
559 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
560
561         Not reviewed. Another build fix for Gtk/Linux & Wx/Mac.
562
563         * platform/graphics/SimpleFontData.cpp:
564         (WebCore::SimpleFontData::SimpleFontData):
565
566 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
567
568         Not reviewed. Build fix for Qt/Gtk & Wx.
569
570         * css/CSSFontSelector.cpp:
571         * platform/graphics/SegmentedFontData.cpp:
572         (WebCore::SegmentedFontData::isSVGFont): Remove SVG_FONTS block, it's a pure virtual function in the base class.
573         * platform/graphics/SegmentedFontData.h:
574
575 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
576
577         Not reviewed. Build fix for ports that don't build SVG: wx.
578
579         * css/CSSFontFaceSource.h: Wrap include in ENABLE(SVG_FONTS) blocks.
580         * css/CSSFontFaceSrcValue.h: Ditto.
581
582 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
583
584         Not reviewed. Build fix for Qt/Gtk.
585
586         * platform/graphics/SimpleFontData.h:
587         (WebCore::SimpleFontData::svgFontData):
588         (WebCore::SimpleFontData::isSVGFont):
589
590 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
591
592         Reviewed by Eric. Older parts reviewed by Dan.
593
594         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16880 (SVGCSSFontFace should die, instead integrate within the FontCache.)
595         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16784 (In-document fonts work only as the first child to font-face-src)
596
597         Proper integration of SVG Fonts within the existing custom font concept, removing the need for a custom SVGCSSFontFace.
598         Integrate within the CSSFontFaceSource logic for caching support, as well as the framework for external SVG Fonts.
599
600         Proper handling of missing glyphs, using <missing-glyph> element. If that is not specified in a font, fallback to non-SVG font rendering.
601
602         * GNUmakefile.am:
603         * WebCore.pro:
604         * WebCore.vcproj/WebCore.vcproj:
605         * WebCore.xcodeproj/project.pbxproj:
606         * css/CSSFontFaceSource.cpp:
607         (WebCore::CSSFontFaceSource::getFontData):
608         * css/CSSFontFaceSource.h:
609         (WebCore::CSSFontFaceSource::svgFontFaceElement):
610         (WebCore::CSSFontFaceSource::setSVGFontFaceElement):
611         * css/CSSFontFaceSrcValue.h:
612         (WebCore::CSSFontFaceSrcValue::m_isLocal):
613         (WebCore::CSSFontFaceSrcValue::~CSSFontFaceSrcValue):
614         (WebCore::CSSFontFaceSrcValue::svgFontFaceElement):
615         (WebCore::CSSFontFaceSrcValue::setSVGFontFaceElement):
616         * css/CSSFontSelector.cpp:
617         (WebCore::CSSFontSelector::addFontFaceRule):
618         * css/SVGCSSFontFace.cpp: Removed.
619         * css/SVGCSSFontFace.h: Removed.
620         * platform/graphics/Font.cpp:
621         (WebCore::Font::ascent):
622         (WebCore::Font::descent):
623         (WebCore::Font::lineSpacing):
624         (WebCore::Font::xHeight):
625         (WebCore::Font::fontSelector):
626         * platform/graphics/Font.h:
627         * platform/graphics/FontData.h:
628         * platform/graphics/SegmentedFontData.cpp:
629         (WebCore::SegmentedFontData::isSVGFont):
630         * platform/graphics/SegmentedFontData.h:
631         * platform/graphics/SimpleFontData.cpp:
632         (WebCore::SimpleFontData::SimpleFontData):
633         * platform/graphics/SimpleFontData.h:
634         (WebCore::SimpleFontData::ascent):
635         (WebCore::SimpleFontData::descent):
636         (WebCore::SimpleFontData::lineSpacing):
637         (WebCore::SimpleFontData::lineGap):
638         (WebCore::SimpleFontData::xHeight):
639         (WebCore::SimpleFontData::isSVGFont):
640         (WebCore::SimpleFontData::svgFontData):
641         * platform/graphics/gtk/FontPlatformData.h:
642         (WebCore::FontPlatformData::size):
643         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
644         (WebCore::FontPlatformData):
645         * platform/graphics/mac/FontPlatformData.h:
646         (WebCore::FontPlatformData::FontPlatformData):
647         (WebCore::FontPlatformData::size):
648         * platform/graphics/win/FontPlatformData.h:
649         * platform/graphics/win/FontPlatformDataWin.cpp:
650         (WebCore::FontPlatformData::FontPlatformData):
651         * rendering/RenderSVGText.cpp:
652         (WebCore::RenderSVGText::relativeBBox):
653         * svg/SVGFont.cpp:
654         (WebCore::convertEmUnitToPixel):
655         (WebCore::isCompatibleGlyph):
656         (WebCore::svgFontAndFontFaceElementForFontData):
657         (WebCore::SVGTextRunWalker::SVGTextRunWalker):
658         (WebCore::SVGTextRunWalker::walk):
659         (WebCore::floatWidthUsingSVGFontCallback):
660         (WebCore::floatWidthMissingGlyphCallback):
661         (WebCore::floatWidthOfSubStringUsingSVGFont):
662         (WebCore::drawTextUsingSVGFontCallback):
663         (WebCore::drawTextMissingGlyphCallback):
664         (WebCore::Font::drawTextUsingSVGFont):
665         * svg/SVGFontData.cpp: Added.
666         (WebCore::SVGFontData::SVGFontData):
667         (WebCore::SVGFontData::~SVGFontData):
668         * svg/SVGFontData.h: Added.
669         (WebCore::SVGFontData::svgFontFaceElement):
670         (WebCore::SVGFontData::horizontalOriginX):
671         (WebCore::SVGFontData::horizontalOriginY):
672         (WebCore::SVGFontData::horizontalAdvanceX):
673         (WebCore::SVGFontData::verticalOriginX):
674         (WebCore::SVGFontData::verticalOriginY):
675         (WebCore::SVGFontData::verticalAdvanceY):
676         * svg/SVGFontFaceElement.cpp:
677         (WebCore::SVGFontFaceElement::unitsPerEm):
678         (WebCore::SVGFontFaceElement::xHeight):
679         (WebCore::SVGFontFaceElement::horizontalOriginX):
680         (WebCore::SVGFontFaceElement::horizontalOriginY):
681         (WebCore::SVGFontFaceElement::horizontalAdvanceX):
682         (WebCore::SVGFontFaceElement::verticalOriginX):
683         (WebCore::SVGFontFaceElement::verticalOriginY):
684         (WebCore::SVGFontFaceElement::verticalAdvanceY):
685         (WebCore::SVGFontFaceElement::ascent):
686         (WebCore::SVGFontFaceElement::descent):
687         (WebCore::SVGFontFaceElement::fontFamily):
688         (WebCore::SVGFontFaceElement::associatedFontElement):
689         (WebCore::SVGFontFaceElement::rebuildFontFace):
690         * svg/SVGFontFaceElement.h:
691         * svg/SVGGlyphElement.cpp:
692         (WebCore::SVGGlyphElement::inheritUnspecifiedAttributes):
693         (WebCore::parseSVGGlyphAttribute):
694         (WebCore::SVGGlyphElement::buildGenericGlyphIdentifier):
695         (WebCore::SVGGlyphElement::buildGlyphIdentifier):
696         * svg/SVGGlyphElement.h:
697         * svg/SVGMissingGlyphElement.cpp:
698         * svg/svgattrs.in:
699
700 2008-01-21  Darin Adler  <darin@apple.com>
701
702         Reviewed by John Sullivan.
703
704         - fix <rdar://problem/5644324> Delegate-less WebKit clients should have no databases
705
706         - remove the default database quota setting
707
708         - simplify the quota-related client calls by merging the one for a new database with
709           the one for an existing database, adding a feature where you can get details about
710           a database being created using the same functions that work on the other databases,
711           and removing the parameters and return values, instead having clients use a function
712           to set the quota
713
714         - fix unsafe multi-thread access to the database tracker's quota map
715         - fix bug in deleteAllDatabases where it would iterate a HashMap while modifying it
716
717         The tracker database is now only created when we set the quota for a database origin.
718         Thus asking for info about databases won't cause anything to be written to disk.
719
720         * WebCore.base.exp: Updated.
721
722         * bindings/js/GCController.cpp: Added an #if to get rid of an unused function warning.
723
724         * page/Chrome.cpp: Removed database-related functions. There's no problem having the
725         code deal directly with the client.
726         * page/Chrome.h: Ditto. Also made Chrome inherit from Noncopyable.
727
728         * page/ChromeClient.h: Replaced the two quota-related functions with a single one.
729         The details about the state of databases in the origin are now available by asking
730         for database details. There's also no need to pass the security origin, since
731         it's easy to get that from the frame's document.
732
733         * page/Settings.cpp: Removed the default quota setting.
734         * page/Settings.h: Ditto.
735
736         * platform/FileSystem.h: Added deleteEmptyDirectory.
737         * platform/gtk/FileSystemGtk.cpp:
738         (WebCore::deleteEmptyDirectory): Added.
739         * platform/posix/FileSystemPOSIX.cpp:
740         (WebCore::deleteEmptyDirectory): Added.
741         * platform/qt/FileSystemQt.cpp:
742         (WebCore::deleteEmptyDirectory): Added.
743         * platform/win/FileSystemWin.cpp:
744         (WebCore::deleteEmptyDirectory): Added.
745         * platform/wx/FileSystemWx.cpp:
746         (WebCore::deleteEmptyDirectory): Added placeholder.
747
748         * storage/DatabaseDetails.h: Removed the isValid() function since its name is
749         confusing -- we removed our other isValid() functions. For the few callers that
750         need this, it's fine to just check name().isEmpty(). Made the member functions
751         all const.
752
753         * storage/DatabaseTracker.cpp:
754         (WebCore::DatabaseTracker::DatabaseTracker): Removed m_defaultQuota initialization.
755         Added m_proposedDatabase and m_thread.
756         (WebCore::DatabaseTracker::setDatabaseDirectoryPath): Got rid of code that would
757         open the tracker database here. This might slightly speed up launch time, since
758         we won't do the I/O until we have to, and before we were actually creating an SQL
759         database in this code that's run when we go to the first webpage.
760         (WebCore::DatabaseTracker::trackerDatabasePath): Added.
761         (WebCore::DatabaseTracker::openTrackerDatabase): Added a boolean parameter telling
762         this function whether to create the database. Made this function safe to call if
763         the database is already open. Also made the function fail quietly if the path has
764         not been set yet.
765         (WebCore::DatabaseTracker::canEstablishDatabase): Got rid of the call to the
766         establishEntryForOrigin function. The origin is now put in the tracker database
767         when the quota is set to a non-zero value. When judging if there's enough space
768         for the new database, require at least one byte even if estimatedSize is 0, and
769         check for overflow. Also added code here to populate the origins map, which
770         guarantees it will be ready when the database uses it on another thread later.
771         Also changed this to call the new ChromeClient function.
772         (WebCore::DatabaseTracker::hasEntryForDatabase): Added code to open the
773         tracker database, since that's no longer done by setDatabaseDirectoryPath.
774         (WebCore::DatabaseTracker::originPath): Added.
775         (WebCore::DatabaseTracker::fullPathForDatabase): Added code so that this will
776         return a null string for the proposed database if called from within the
777         ChromeClient function. Also switched from empty string to null string for the
778         error cases.
779         (WebCore::DatabaseTracker::populateOrigins): Added code to open the tracker
780         database.
781         (WebCore::DatabaseTracker::databaseNamesForOrigin): Ditto.
782         (WebCore::DatabaseTracker::detailsForNameAndOrigin): Ditto. Also added code that
783         will return the details of the proposed database if called from within the
784         ChromeClient function. This is how the client can learn of the display name and
785         the estimated size of the new database.
786         (WebCore::DatabaseTracker::setDatabaseDetails): Added code to open the tracker
787         database.
788         (WebCore::DatabaseTracker::quotaForOrigin): Made this code OK to call on a non-main
789         thread by using m_quotaMapGuard to guard access to the map. Other code runs on the
790         main thread only, and only functions that write to the map use the lock.
791         (WebCore::DatabaseTracker::setQuota): Changed this function so it can insert the
792         initial quota as well as updating an existing quota. Added locking since this
793         function modifies the quota map. Added code to open the tracker database. Added
794         an early exit if the quota is already correct, which is guarantees that if you
795         set a quota to 0 it won't trigger creation of a tracker database.
796         (WebCore::DatabaseTracker::addDatabase): Added code to open the tracker database.
797         (WebCore::DatabaseTracker::deleteAllDatabases): Made a copy of the quota map before
798         iterating it to find all the origins. This fixes a problem with the old code where
799         it would modify the map while iterating it, which gives assertions in debug builds
800         and unpredictable results.
801         (WebCore::DatabaseTracker::deleteOrigin): Replaced deleteDatabasesWithOrigin with
802         this function. Added code to open the tracker database if needed. Added code to
803         delete the origin from the tracker database, and to close the tracker database
804         and delete files and directories as needed if we are deleting the final origin.
805         (WebCore::DatabaseTracker::deleteDatabase): Added code to open the tracker database
806         if needed.
807
808         * storage/DatabaseTracker.h: Renamed databasePath to databaseDirectoryPath for
809         clarity, including the data member, and the getter and setter functions.
810         Replaced deleteDatabasesWithOrigin with deleteOrigin. Removed the functions
811         dealing with default origin quota. There is no default any more; origins start
812         with no quota and the client must set a quota. Added trackerDatabasePath and
813         originPath helper functions. Added a boolean parameter to openTrackerDatabase
814         to tell it whether to create the database or not. Removed the
815         establishEntryForOrigin function. Renamed m_originQuotaMap to just m_quotaMap,
816         and added m_quotaMapGuard. Added a QuotaMap typedef. Added m_proposedDatabase,
817         which holds the origin and details for the current proposed database during
818         the client callback function that must decide whether to grant quota. Added a
819         m_thread data member for debugging use to assert if functions that can only
820         be called on a single thread are misused.
821
822         * storage/SQLTransaction.cpp:
823         (WebCore::SQLTransaction::deliverQuotaIncreaseCallback): Changed to call the
824         new exceededDatabaseQuota function instead of the old one.
825
826         * svg/graphics/SVGImageEmptyClients.h: Updated for the change to ChromeClient.
827
828 2008-01-21  David Hyatt  <hyatt@apple.com>
829
830         Fix for http://bugs.webkit.org/show_bug.cgi?id=16935
831
832         Fix a bug in layers where the positioned ancestor was being computed incorrectly (the root should not
833         automatically be included).
834
835         Reviewed by olliej
836
837         Added fast/layers/positioned-inside-root-with-margins.html
838
839         * rendering/RenderLayer.cpp:
840         (WebCore::RenderLayer::stackingContext):
841         (WebCore::RenderLayer::enclosingPositionedAncestor):
842
843 2008-01-21  Simon Hausmann  <hausmann@webkit.org>
844
845         Reviewed by Holger.
846
847         Fix KURL to QUrl conversion.
848         
849         Stick to the encoded version of the URL and in addition to KURL we encode the
850         characters mentioned in section 2.4.3 of RFC 2396 as QUrl requires these, too.
851         
852         This fixes fast/css/import-rule-regression-11590.html,
853         fast/css/import-style-update.html, svg/hixie/processing-model/003.xml and
854         svg/hixie/processing-model/004.xml.
855
856
857         * platform/qt/KURLQt.cpp:
858         (WebCore::toHex):
859         (WebCore::KURL::operator QUrl):
860
861 2008-01-21  Simon Hausmann  <hausmann@webkit.org>
862
863         Reviewed by Holger.
864
865         Fix focus chain handling and cycling through focusable objects (links) using tab/backtab.
866         
867         * Fix GraphicsContext::drawFocusRing to also draw single focus rects.
868         * Implemented QWebPage::focusNextPrevChild by sending fake tab/shift-tab events
869         and make the return value depend on whether we successfully determined a focusable
870         node or not.
871         * Changed QWebView::focusNextPrevChild() to call the base QWidget implementation correctly
872         if we could not handle the focus chain ourselves.
873         * Changed the focus policy of QWebView to correctly use WheelFocus instead of ClickFocus.
874         * Made ChromeClientQt::canTakeFocus() and takeFocus() dummy method since they are only
875         used to control the situation of stepping out of the focus chain inside the page.
876         * Made inclusion of links in the focus chain configurable through QWebSettings::LinksIncludedInFocusChain.
877         The layout tests expect this to be disabled but for the user it seems sensible to have it
878         on by default, hence the default in qwebsettings.cpp
879
880         * platform/graphics/qt/GraphicsContextQt.cpp:
881         (WebCore::GraphicsContext::drawFocusRing):
882
883 2008-01-21  Simon Hausmann  <hausmann@webkit.org>
884
885         Reviewed by Holger.
886
887         Fix access key support and fast/forms/legend-access-key.html
888
889         SVN revision 26664 changed the default access key for the non-mac build to Alt
890         while this test relies on Ctrl.
891
892         * page/EventHandler.cpp:
893
894 2008-01-21  Simon Hausmann  <hausmann@webkit.org>
895
896         Reviewed by Holger.
897
898         Fix error reporting when parsing X(HT)ML fragments.
899         
900         We use the regular XMLTokenizer write()/.../end() sequence to parse those
901         fragments, but we should not report any parsing errors inline inside the
902         content. Instead we should just return the error and the DOM layer will take
903         care of throwing an exception.
904         
905         This fixes fast/innerHTML/innerHTML-changing-document-properties.xhtml
906         
907
908         * dom/XMLTokenizer.cpp:
909         (WebCore::createXHTMLParserErrorHeader):
910
911 2008-01-21  Holger Freyther  <holger.freyther@trolltech.com>
912
913         Reviewed by Simon.
914
915         Fix some issues with redirections.
916         
917         * Ensure that we deliver the response to the ResourceHandleClient only once by
918         setting m_responseSent back to false only before calling start() for the
919         redirection
920         * Added 307 as another HTTP status code that causes a redirection after POST to
921         become get, just like in MainResourceLoader::isPostOrRedirectAfterPost
922         * Also set the HTTP method on the ResourceRequest to GET before passing it to
923         willSendRequest.
924         * willSendRequest's newRequest argument is actually an in/out argument and could be
925         modified in theory, so set m_request accordingly after the call.
926         
927
928         * platform/network/qt/QNetworkReplyHandler.cpp:
929         (WebCore::QNetworkReplyHandler::finish):
930         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
931
932 2008-01-21  Holger Freyther  <holger.freyther@trolltech.com>
933
934         Reviewed by Simon.
935
936         Fixed WebCore::cookies() to return all cookies, not only the first one.
937         
938         Fixes login into mail.yahoo.com.
939         
940
941         * platform/qt/CookieJarQt.cpp:
942         (WebCore::cookies):
943
944 2008-01-20  Oliver Hunt  <oliver@apple.com>
945
946         Reviewed by Mitz.
947
948         Fix http://bugs.webkit.org/show_bug.cgi?id=16816 , rdar://problem/5682985
949         
950         Correctly trigger willPerformDragDestinationAction when a drop causes a 
951         load to occur.  The logic that originally did this was lost during the
952         great drag migration of '07.
953
954         * page/DragController.cpp:
955         (WebCore::DragController::performDrag):
956
957 2008-01-20  Dan Bernstein  <mitz@apple.com>
958
959         Reviewed by Darin Adler.
960
961         - fix http://bugs.webkit.org/show_bug.cgi?id=16951
962           Assertion failure in FrameView::scheduleRelayout (!m_frame->document() || !m_frame->document()->inPageCache()) when going back from a page with a focused popup
963
964         * dom/Document.cpp:
965         (WebCore::Document::setFocusedNode): Bail out if the document is in the
966         page cache. Documents in the back/forward cache are "frozen" and should
967         not change state.
968
969 2008-01-20  Collin Jackson  <webkit@collinjackson.com>
970
971         Reviewed by Sam Weinig.
972
973         Fix for http://bugs.webkit.org/show_bug.cgi?id=16775
974
975         We now use frame()->loader()->url() for postMessage, preventing a
976         malicious sender from overwriting the uri property (using a <base> tag,
977         for example). Also, use frame->loader()->url().host() instead of 
978         instead of document()->SecurityOrigin()->domain() to reflect a recent
979         clarification in the HTML5 spec. 
980
981         Tests: http/tests/security/postMessage/domain-affected-by-document-domain.html
982                http/tests/security/postMessage/domain-and-uri-unaffected-by-base-tag.html
983                http/tests/security/postMessage/javascript-page-still-sends-domain.html
984
985         * bindings/js/JSDOMWindowCustom.cpp:
986         (WebCore::JSDOMWindow::postMessage):
987
988 2008-01-20  Antti Koivisto  <antti@apple.com>
989
990         Reviewed by Adele.
991
992         Fix <rdar://problem/5695451>
993         Middle part of the media timeline missing on Windows if load failed
994
995         Add some null checking to avoid getting garbage results from the functions.
996
997         * platform/graphics/MediaPlayer.cpp:
998         * platform/graphics/win/QTMovieWin.cpp:
999         (QTMovieWin::duration):
1000         (QTMovieWin::currentTime):
1001         (QTMovieWin::setCurrentTime):
1002         (QTMovieWin::maxTimeLoaded):
1003
1004 2008-01-19  Alp Toker  <alp@atoker.com>
1005
1006         Reviewed by Mark Rowe.
1007
1008         http://bugs.webkit.org/show_bug.cgi?id=16944
1009         Use of GST_PLUGIN_DEFINE_STATIC results in a module-level constructor
1010
1011         http://bugzilla.gnome.org/show_bug.cgi?id=510547
1012         Epiphany/Webkit fails to start due to initializing threads twice
1013
1014         Don't call GST_PLUGIN_DEFINE_STATIC() as it performs g_thread_init()
1015         in the global initializer, breaking subsequent calls to
1016         g_thread_init() in applications.
1017
1018         * platform/graphics/gtk/VideoSinkGStreamer.cpp:
1019
1020 2008-01-19  Alp Toker  <alp@atoker.com>
1021
1022         Reviewed by Mark Rowe.
1023
1024         Remove any fragment part from the URL to be requested just before
1025         passing it to curl, otherwise curl sends it as part of the HTTP/local
1026         file request, causing page loads to fail.
1027
1028         * platform/network/curl/ResourceHandleManager.cpp:
1029         (WebCore::ResourceHandleManager::startJob):
1030
1031 2008-01-19  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
1032
1033         Reviewed by Alp Toker.
1034
1035         Add svg foreign object and svg experimental to the GTK+/autotools
1036         build system.
1037
1038         * GNUmakefile.am:
1039
1040 2008-01-19  Dan Bernstein  <mitz@apple.com>
1041
1042         Reviewed by Maciej Stachowiak.
1043
1044         - fix <rdar://problem/5645813> CrashTracer: [USER] 6 crashes in Safari at com.apple.WebCore: WebCore::RenderBox::destroy + 116
1045
1046         Test: editing/selection/inconsistent-in-removeChildNode.html
1047
1048         * editing/SelectionController.cpp:
1049         (WebCore::SelectionController::nodeWillBeRemoved): If the selection
1050         base or extent are not visible any more, adjust the selection.
1051
1052 2008-01-19  Oliver Hunt  <oliver@apple.com>
1053
1054         Reviewed by Eric Seidel.
1055
1056         Build fix for --svg-foreign-object path
1057
1058         * svg/SVGForeignObjectElement.idl:
1059
1060 2008-01-18  Stephanie  <slewis@apple.com>
1061
1062         Reviewed by Oliver.
1063
1064         Workaround for <rdar://problem/5695848>.  Set mime_type for local files based on file extension. 
1065
1066         * platform/network/cf/ResourceResponseCFNet.cpp:
1067         (WebCore::ResourceResponse::doUpdateResourceResponse):
1068
1069 2008-01-18  Ada Chan  <adachan@apple.com>
1070
1071         <rdar://problem/5682340> REGRESSION (r28188): Context menu appears at wrong place when clicking in iframe whose parent is scrolled (16827)
1072         Calling absolutePosition() in EventHandler::hitTestResultAtPoint() is extremely inefficient and passing in
1073         true as fixed before was wrong.  Use HitTestResult::localPoint() instead, and take into account border and padding widths.
1074
1075         Reviewed by Hyatt and Darin.
1076
1077         * page/EventHandler.cpp:
1078         (WebCore::EventHandler::hitTestResultAtPoint):
1079         * rendering/HitTestResult.cpp:
1080         (WebCore::HitTestResult::operator=):
1081
1082 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1083
1084         Reviewed by Darin, landed by Beth.
1085
1086         - fixed http://bugs.webkit.org/show_bug.cgi?id=15765
1087
1088         The call to HTMLTokenizer::write might result in a call to ::end which will invoke
1089         HTMLParser::finished() or Document::finishedParsing(). HTMLParser::finished() will eventually
1090         call Document::finishedParsing. The Document will delete the calling HTMLTokenizer and from the deleted
1091         tokenizer we will call into FrameLoader::tokenizerProcessedData.
1092         -) FrameLoader::tokenizerProcessedData calls FrameLoader::checkCompleted which gets called from the Document::finishedParsing
1093            (FrameLoader::finishedParsing).
1094
1095         * html/HTMLTokenizer.cpp:
1096         (WebCore::HTMLTokenizer::timerFired):
1097
1098 2008-01-18  David Hyatt  <hyatt@apple.com>
1099
1100         Don't apply the border/margin/padding check to root line boxes, since their renderers
1101         are blocks.
1102
1103         * rendering/InlineFlowBox.cpp:
1104         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
1105         (WebCore::InlineFlowBox::placeBoxesVertically):
1106
1107 2008-01-18  Geoffrey Garen  <ggaren@apple.com>
1108
1109         Not reviewed: rolling out a previous patch.
1110         
1111         Fixed <rdar://problem/5695439> Crash during GCController destructor on
1112         quitting browser
1113
1114         Used svn merge to roll out r29603 because it introduced some crashes
1115         on quit.
1116         
1117         GC relies on static hash tables, so it's not safe to GC from a static
1118         destructor, which might run after the static hash tables' destructors.
1119
1120         * bindings/js/GCController.cpp:
1121         (WebCore::GCController::garbageCollectNow):
1122         * bindings/js/GCController.h:
1123
1124 2008-01-18  David Hyatt  <hyatt@apple.com>
1125
1126         Fix for http://bugs.webkit.org/show_bug.cgi?id=15665
1127
1128         Building on Beth's earlier work to start building line boxes for empty inlines, this patch makes more
1129         empty inline cases work.  Empty inlines on lines by themselves now set isLineEmpty to false so that
1130         bidiReorderLine will get properly called.  In addition, the "shrink boxes with no text children" quirk
1131         needs to be disabled for inlines with padding, margins or borders.
1132
1133         Reviewed by Beth
1134
1135         Added fast/inline/inline-padding-disables-text-quirk.html
1136
1137         * rendering/InlineFlowBox.cpp:
1138         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
1139         (WebCore::InlineFlowBox::placeBoxesVertically):
1140         (WebCore::InlineFlowBox::shrinkBoxesWithNoTextChildren):
1141         * rendering/RenderObject.h:
1142         (WebCore::RenderObject::hasBordersPaddingOrMargin):
1143         * rendering/bidi.cpp:
1144         (WebCore::inlineFlowRequiresLineBox):
1145         (WebCore::RenderBlock::findNextLineBreak):
1146
1147 2008-01-18  David Hyatt  <hyatt@apple.com>
1148
1149         Fix for http://bugs.webkit.org/show_bug.cgi?id=14975
1150
1151         Computed size of padding is incorrect because we default padding to auto.  This is a made-up value that
1152         was only used to implement cellpadding on tables.  We needed this made-up value in order to tell that
1153         padding wasn't set so that we could then apply cellpadding.
1154        
1155         This patch rewrites cellpadding to be like other browsers.  Instead of being a setting on the table
1156         renderer that applies to all cells (even ones that were not <td>s), cellpadding is now mapped into the
1157         style of <td>s.  With this change it effectively becomes a content model feature and not a rendering
1158         feature.
1159
1160         For example, a <td> will pick up cellpadding even when it is not a cell and/or the enclosing <table> is
1161         not a table.  Anonymous cells and CSS-display-type cells will now never pick up cellpadding.  This behavior
1162         is all consistent with other browsers.
1163
1164         Reviewed by Antti
1165
1166         Added fast/css/padding-no-renderer.html
1167
1168         * css/CSSStyleSelector.cpp:
1169         (WebCore::CSSStyleSelector::canShareStyleWithElement):
1170         (WebCore::CSSStyleSelector::styleForElement):
1171         * css/CSSStyleSelector.h:
1172         * dom/StyledElement.cpp:
1173         * dom/StyledElement.h:
1174         (WebCore::StyledElement::canHaveAdditionalAttributeStyleDecls):
1175         (WebCore::StyledElement::additionalAttributeStyleDecls):
1176         * html/HTMLTableCellElement.cpp:
1177         (WebCore::HTMLTableCellElement::additionalAttributeStyleDecls):
1178         * html/HTMLTableCellElement.h:
1179         (WebCore::HTMLTableCellElement::canHaveAdditionalAttributeStyleDecls):
1180         * html/HTMLTableColElement.cpp:
1181         (WebCore::HTMLTableColElement::additionalAttributeStyleDecls):
1182         * html/HTMLTableColElement.h:
1183         (WebCore::HTMLTableColElement::canHaveAdditionalAttributeStyleDecls):
1184         * html/HTMLTableElement.cpp:
1185         (WebCore::HTMLTableElement::parseMappedAttribute):
1186         (WebCore::HTMLTableElement::additionalAttributeStyleDecls):
1187         (WebCore::HTMLTableElement::addSharedCellDecls):
1188         (WebCore::HTMLTableElement::addSharedCellBordersDecl):
1189         (WebCore::HTMLTableElement::addSharedCellPaddingDecl):
1190         (WebCore::HTMLTableElement::addSharedGroupDecls):
1191         (WebCore::HTMLTableElement::attach):
1192         * html/HTMLTableElement.h:
1193         (WebCore::HTMLTableElement::canHaveAdditionalAttributeStyleDecls):
1194         * html/HTMLTableSectionElement.cpp:
1195         (WebCore::HTMLTableSectionElement::additionalAttributeStyleDecls):
1196         * html/HTMLTableSectionElement.h:
1197         (WebCore::HTMLTableSectionElement::canHaveAdditionalAttributeStyleDecls):
1198         * rendering/AutoTableLayout.cpp:
1199         (WebCore::AutoTableLayout::recalcColumn):
1200         * rendering/RenderObject.cpp:
1201         (WebCore::RenderObject::paddingTop):
1202         (WebCore::RenderObject::paddingBottom):
1203         (WebCore::RenderObject::paddingLeft):
1204         (WebCore::RenderObject::paddingRight):
1205         * rendering/RenderStyle.cpp:
1206         (WebCore::StyleSurroundData::StyleSurroundData):
1207         * rendering/RenderStyle.h:
1208         (WebCore::RenderStyle::initialPadding):
1209         * rendering/RenderTable.cpp:
1210         (WebCore::RenderTable::RenderTable):
1211         * rendering/RenderTable.h:
1212
1213 2008-01-18  Dan Bernstein  <mitz@apple.com>
1214
1215         Reviewed by Dave Hyatt.
1216
1217         - fix <rdar://problem/5615307> Repro crash in WebKit!WebCore::RenderContainer::destroyLeftoverChildren
1218
1219         Test: fast/table/insert-row-before-form.html
1220
1221         * rendering/RenderTableRow.cpp:
1222         (WebCore::RenderTableRow::addChild): Changed to ensure that the
1223         object a new cell is inserted before is a child of the row, and
1224         added an assertion that that object is either a cell or a form.
1225         * rendering/RenderTableSection.cpp:
1226         (WebCore::RenderTableSection::addChild): Changed to ensure that the
1227         object a new row is inserted before is a child of the table section, and
1228         added an assertion that that object is either a table row or a form.
1229
1230 2008-01-18  Geoffrey Garen  <ggaren@apple.com>
1231
1232         Reviewed by Brady Eidson.
1233
1234         Fixed <rdar://problem/5622424> World Leak dialog when closing a page
1235         that has a Database
1236         
1237         The problem was that each transaction and SQL statement would hold on
1238         to its callback indefinitely. By design, callbacks often establish
1239         reference cycles to temporarily protect their execution environments.
1240         To break the cycle, we need to explicitly release each callback as soon
1241         as it is no longer needed.
1242
1243         * storage/SQLStatement.cpp:
1244         (WebCore::SQLStatement::performCallback): Release our callback objects
1245         after performing our callback.
1246
1247         * storage/SQLTransaction.cpp:
1248         (WebCore::SQLTransaction::postflightAndCommit): Release our callback
1249         objects after the transaction has terminated.
1250         (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback): ditto.
1251
1252 2008-01-18  Adele Peterson  <adele@apple.com>
1253
1254         Reviewed by Antti.
1255
1256         Fix for <rdar://problem/5679490> media controls fade in and out too jerkily and too slowly
1257
1258         * rendering/RenderMedia.cpp: Shorten the duration for the fade in/out animation.
1259
1260 2008-01-18  Beth Dakin  <bdakin@apple.com>
1261
1262         Reviewed by Oliver.
1263
1264         Disables SVG foreign object for <rdar://problem/5686989> turn off 
1265         SVG foreignobject because it does not repaint/dirty correctly
1266
1267         * DerivedSources.make:
1268         * WebCore.SVG.ForeignObject.exp: Added.
1269         * WebCore.SVG.exp:
1270         * bindings/js/JSSVGElementWrapperFactory.cpp:
1271         (WebCore::createJSSVGWrapper):
1272         * rendering/RenderForeignObject.cpp:
1273         * rendering/RenderForeignObject.h:
1274         * svg/SVGForeignObjectElement.cpp:
1275         * svg/SVGForeignObjectElement.h:
1276         * svg/SVGForeignObjectElement.idl:
1277         * svg/SVGLocatable.cpp:
1278         (WebCore::SVGLocatable::nearestViewportElement):
1279         (WebCore::SVGLocatable::farthestViewportElement):
1280         * svg/SVGUseElement.cpp:
1281         (WebCore::isDisallowedElement):
1282         * svg/svgtags.in:
1283
1284 2008-01-18  Mark Rowe  <mrowe@apple.com>
1285
1286         Rubber-stamped by Adam Roben.
1287
1288         Fix mixed line endings in FileSystemWin.cpp and set svn:eol-style to native
1289         to try and keep them consistent in the future.
1290
1291         * platform/win/FileSystemWin.cpp:
1292         (WebCore::fileSize):
1293         (WebCore::fileExists):
1294         (WebCore::deleteFile):
1295         (WebCore::pathByAppendingComponent):
1296         (WebCore::fileSystemRepresentation):
1297         (WebCore::makeAllDirectories):
1298         (WebCore::homeDirectoryPath):
1299         (WebCore::bundleName):
1300         (WebCore::storageDirectory):
1301         (WebCore::cachedStorageDirectory):
1302
1303 2008-01-18  Antti Koivisto  <antti@apple.com>
1304
1305         Reviewed by Adam.
1306
1307         Fix unreachable code warning in RenderVideo on Windows.
1308         
1309         Make switch cases explicit.
1310
1311         * rendering/RenderImage.cpp:
1312         (WebCore::RenderImage::isWidthSpecified):
1313         (WebCore::RenderImage::isHeightSpecified):
1314         * rendering/RenderVideo.cpp:
1315         (WebCore::RenderVideo::isWidthSpecified):
1316         (WebCore::RenderVideo::isHeightSpecified):
1317
1318 2008-01-18  Timothy Hatcher  <timothy@apple.com>
1319
1320         Reviewed by Adam Roben.
1321
1322         <rdar://problem/5693558> REGRESSION (r29581): no form field focus
1323         rings and inactive text selection after loading a page
1324         Bug 16910: [GTK] REGRESSION: keyboard cursor doesn't blink
1325         Bug 16917: REGRESSION (r29581/2): Google Maps search box loses focused appearance
1326
1327         * page/FocusController.cpp:
1328         (WebCore::FocusController::setActive): Use focusedOrMainFrame() instead of focusedFrame()
1329         to call selectionController()->pageActivationChanged() for cases when the focusedFrame()
1330         has not been set yet. 
1331
1332 2008-01-18  Alexey Proskuryakov  <ap@webkit.org>
1333
1334         Reviewed by Brady.
1335
1336         Database origin tracking is broken.
1337
1338         * storage/DatabaseTracker.cpp: (WebCore::DatabaseTracker::populateOrigins):
1339         Move reading from statement back into the loop (broken in r29386).
1340
1341 2008-01-18  Marius Storm-Olsen  <marius@trolltech.com>
1342
1343         Reviewed by Simon Hausmann <hausmann@webkit.org>.
1344
1345         Add use of precompiled header, when building inside Qt.
1346         
1347         Compiling WebKit was taking forever; 17 minutes on my machine for _one_ build! Adding the PCH at least brings it down to 12 minutes for one build, for me.
1348         
1349
1350         * WebCore.pro:
1351
1352 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
1353
1354         Reviewed by Holger.
1355
1356         Fix fast/forms/button-state-restore.html
1357         
1358         Similar to the fix for fast/forms/form-post-urlencoded.html transform POST
1359         requests to data urls into GET.
1360         
1361
1362         * platform/network/qt/QNetworkReplyHandler.cpp:
1363         (WebCore::QNetworkReplyHandler::start):
1364
1365 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
1366
1367         Reviewed by Holger.
1368
1369         Fix LayoutTests/fast/cookies/local-file-can-set-cookies.html
1370         
1371         In WebCore::cookies() don't return the full raw form but only the name=value
1372         part. This fixes the getter part of the above test. The above test also
1373         requires a parsing fix in Qt 4.4's QNetworkCookie to fully pass.
1374         
1375
1376         * platform/qt/CookieJarQt.cpp:
1377         (WebCore::cookies):
1378
1379 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
1380
1381         Reviewed by Holger.
1382
1383         Fix svg/custom/path-getTotalLength.svg
1384         
1385         Path::apply creates a PathElement and its points array on the stack,
1386         to fill it in from the QPainterPath data and then use the platform
1387         independent path applier functions to calculate properties such as
1388         the length. For converting a QPainterPath::CurveToElement we need
1389         three points in the path element. However we allocated only two
1390         on the stack and as a result we got memory corruption and the
1391         failing test.
1392         
1393
1394         * platform/graphics/qt/PathQt.cpp:
1395         (WebCore::Path::apply):
1396
1397 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
1398
1399         Reviewed by Holger.
1400
1401         Fix LayoutTests/fast/dom/document-attribute-js-null.html
1402         
1403         Don't crash when trying to get/set cookies without a frameloader.
1404         
1405
1406         * platform/qt/CookieJarQt.cpp:
1407         (WebCore::setCookies):
1408         (WebCore::cookies):
1409
1410 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
1411
1412         Reviewed by Holger.
1413
1414         Fix fast/dom/xmlhttprequest-get.xhtml
1415         
1416         For local file requests remove the content length and the last-modified
1417         headers in the response.
1418         
1419
1420         * platform/network/qt/QNetworkReplyHandler.cpp:
1421         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
1422
1423 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
1424
1425         Reviewed by Holger.
1426
1427         Fix fast/forms/form-post-urlencoded.html.
1428         
1429         Post requests on files don't really make sense, but for
1430         fast/forms/form-post-urlencoded.html we still need to retrieve the file,
1431         which means we map it to a Get instead.
1432         
1433
1434         * platform/network/qt/QNetworkReplyHandler.cpp:
1435         (WebCore::QNetworkReplyHandler::start):
1436
1437 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
1438
1439         Reviewed by Holger.
1440
1441         Make QNetworkReplyHandler::abort() more robust against multiple invocations.
1442
1443         During DRT runs I see cancel() being called on the same handle multiple times. Guard
1444         against this a bit better by setting m_reply to 0 after we called abort() on it.
1445
1446         * platform/network/qt/QNetworkReplyHandler.cpp:
1447         (WebCore::QNetworkReplyHandler::abort):
1448
1449 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1450
1451         Reviewed by Simon.
1452
1453         * httpBody() can return 0 and other ports (cf/mac) check for this condition
1454         * Looking at the cf/mac implementation we might need to call setHTTPBody somewhere
1455         as well.
1456         
1457
1458         WARNING: NO TEST CASES ADDED OR CHANGED
1459
1460         * platform/network/qt/QNetworkReplyHandler.cpp:
1461         (WebCore::QNetworkReplyHandler::start):
1462
1463 2008-01-18  Prasanth Ullattil  <prasanth.ullattil@trolltech.com>
1464
1465         Reviewed by Simon Hausmann <hausmann@webkit.org>.
1466
1467         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.
1468
1469         * xml/XPathFunctions.cpp:
1470         (WebCore::XPath::FunCount::evaluate):
1471
1472 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1473
1474         Reviewed by Simon.
1475
1476         * Remove our windowClipRect reimplementation and instead have our own
1477         Widget::invalidate implementation that is invalidating
1478         IntRect(0, 0, width(), height()) without trying to clip it (in contrast
1479         to Widget::invalidateRect)
1480
1481         * platform/qt/PlatformScrollBar.h:
1482         * platform/qt/PlatformScrollBarQt.cpp:
1483         (WebCore::PlatformScrollbar::invalidate):
1484
1485 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1486
1487         Reviewed by Simon.
1488
1489         * Change the coordinate transformation in the PlatformMouseEvent handlers
1490         * We want to convert from coordinates of the containing window to our local
1491         position on the scrollbar.
1492
1493         * platform/qt/PlatformScrollBarQt.cpp:
1494         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
1495         (WebCore::PlatformScrollbar::handleMousePressEvent):
1496
1497 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1498
1499         Reviewed by Simon.
1500
1501         * Make the qDebug more usable. Do not have an additional newline and print
1502         the untranslated coordinates as well.
1503
1504         * platform/qt/PlatformScrollBarQt.cpp:
1505         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
1506         (WebCore::PlatformScrollbar::handleMousePressEvent):
1507
1508 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1509
1510         Reviewed by Simon.
1511
1512         * Dead code, remove it
1513
1514         * platform/qt/PlatformScrollBarQt.cpp:
1515
1516 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1517
1518         Reviewed by Simon.
1519
1520         * Coding-Style fixes.
1521
1522         * platform/qt/PlatformScrollBarQt.cpp:
1523         (WebCore::PlatformScrollbar::PlatformScrollbar):
1524
1525 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1526
1527         Reviewed by Simon.
1528
1529         * Coding-Style fix
1530
1531         * platform/graphics/qt/ImageDecoderQt.cpp:
1532         (WebCore::ImageDecoderQt::ReadContext::ReadContext):
1533
1534 2008-01-17  Geoffrey Garen  <ggaren@apple.com>
1535
1536         Reviewed by Darin Adler.
1537
1538         Fixed: lots of WebCore leaks reported when quitting Safari
1539         
1540         If we're quitting with a GC still scheduled, do the GC before quitting.
1541         That way, WebCore's leak counters won't count objects that were
1542         scheduled for GC.
1543
1544         * bindings/js/GCController.cpp:
1545         (WebCore::GCController::~GCController):
1546         (WebCore::GCController::garbageCollectNow):
1547         * bindings/js/GCController.h:
1548
1549 2008-01-17  Alp Toker  <alp@atoker.com>
1550
1551         Reviewed by Oliver Hunt.
1552
1553         gdk_screen_get_font_options() returns NULL if no default options are
1554         set so we always have to NULL check to avoid crashes later on since
1555         Cairo doesn't accept NULL font options.
1556
1557         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
1558         (WebCore::FontPlatformData::FontPlatformData):
1559
1560 2008-01-17  Antti Koivisto  <antti@apple.com>
1561
1562         Reviewed by Adele.
1563
1564         Windows fix for <rdar://problem/5605682>
1565         Disallow streaming protocols for media elements
1566         and <rdar://problem/5668711>
1567         Limit the container and codec types that the <video> tag supports
1568         
1569         - Disable unsupported QuickTime tracks types. 
1570         - Disallow streaming protocols (for now).
1571
1572         * WebCore.vcproj/WebCore.vcproj:
1573         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
1574         (WebCore::MediaPlayerPrivate::updateStates):
1575         * platform/graphics/win/QTMovieWin.cpp:
1576         (QTMovieWin::load):
1577         (QTMovieWin::disableUnsupportedTracks):
1578         * platform/graphics/win/QTMovieWin.h:
1579
1580 2008-01-17  Oliver Hunt  <oliver@apple.com>
1581
1582         Support smart copy and paste during drag and drop
1583         
1584         Reviewed by Alice
1585         
1586         In order for the drag and drop tests in Windows DRT to pass
1587         we need to support smart cut and paste operations during
1588         drag and drop on windows.
1589         
1590         There is no layout test as drag and drop is still unsupported
1591         on windows.  Once supported smart drag/drop is tested by existing
1592         tests
1593
1594         * platform/win/ClipboardUtilitiesWin.cpp:
1595         (WebCore::smartPasteFormat):
1596         * platform/win/ClipboardUtilitiesWin.h:
1597         * platform/win/ClipboardWin.cpp:
1598         (WebCore::ClipboardWin::writeRange):
1599         * platform/win/DragDataWin.cpp:
1600
1601 2008-01-17  Oliver Hunt  <oliver@apple.com>
1602
1603         Reviewed by Anders.
1604
1605         <rdar://problem/5692940> Crash when attempting to get text properties in
1606         SVG with no renderer
1607
1608         We use the element renderer to calculate the text element bounds,
1609         however there was no check against the possibility of the text dimension
1610         properties being requested on a element with no renderer (eg. unattached, 
1611         display: none).
1612
1613         Test: svg/text/text-property-with-display-none.html
1614
1615         * svg/SVGTextContentElement.cpp:
1616         (WebCore::rootInlineBoxForTextContentElement):
1617
1618 2008-01-17  Anders Carlsson  <andersca@apple.com>
1619
1620         Reviewed by Oliver.
1621
1622         <rdar://problem/5636742>
1623         CrashTracer: [USER] 1302 crashes in Safari at com.apple.WebCore: WTF::Vector<char, 0ul>::reserveCapacity + 78
1624         
1625         When loading full-frame plug-ins, disable buffering data for the main resource loader. Otherwise, this can cause us
1626         to crash when loading large files such as movies in the browser. We already do this for embedded plug-ins.
1627         
1628         * WebCore.base.exp:
1629         * loader/DocumentLoader.h:
1630         (WebCore::DocumentLoader::mainResourceLoader):
1631         New accessor method.
1632         
1633         * loader/PluginDocument.cpp:
1634         (WebCore::PluginTokenizer::writeRawData):
1635         Disable buffering for the main resource loader.
1636         
1637         * loader/ResourceLoader.cpp:
1638         (WebCore::ResourceLoader::setShouldBufferData):
1639         * loader/ResourceLoader.h:
1640         Have this free the buffer when disabling buffering.
1641
1642 2008-01-17  Adam Roben  <aroben@apple.com>
1643
1644         More Qt/GTK+ build fixing.
1645
1646         * platform/gtk/ScrollViewGtk.cpp:
1647         * platform/qt/ScrollViewQt.cpp:
1648
1649 2008-01-17  Alexey Proskuryakov  <ap@webkit.org>
1650
1651         Reviewed by Darin.
1652
1653         http://bugs.webkit.org/show_bug.cgi?id=16902
1654         <rdar://problem/5692566> fast/encoding/mailto-always-utf-8.html fails when run after
1655         fast/dom/Window/window-property-shadowing.html
1656
1657         Test: fast/dom/Window/window-property-shadowing_.html
1658
1659         * loader/FrameLoader.cpp: (WebCore::FrameLoader::clear): Clear the frame name, too.
1660
1661 2008-01-17  Adam Roben  <aroben@apple.com>
1662
1663         Qt/GTK+ build fix.
1664
1665         * platform/gtk/ScrollViewGtk.cpp:
1666         (WebCore::ScrollView::ScrollViewPrivate::isActive):
1667         * platform/qt/ScrollViewQt.cpp:
1668         (WebCore::ScrollView::ScrollViewPrivate::isActive):
1669
1670 2008-01-16  Adam Roben  <aroben@apple.com>
1671
1672         Update scroll bars/form controls when FocusController::isActive changes
1673
1674         Part of <rdar://5006915> Inactive look for Aqua controls
1675
1676         Reviewed by Darin.
1677
1678         All tests pass.
1679
1680         * page/FocusController.cpp:
1681         (WebCore::FocusController::setActive): Update control tints when the
1682         active state changes.
1683         * page/FrameView.cpp:
1684         (WebCore::FrameView::updateControlTints): On Windows, we have to ask
1685         ScrollView to paint so that the outermost scroll bars will paint. On
1686         Mac, the outermost scroll bars are taken care of by NSScroller.
1687         * platform/PopupMenu.h: Updated for ScrollBarClient changes.
1688         * platform/ScrollBar.h: Added a new ScrollBarClient method.
1689         * platform/win/PlatformScrollBarSafari.cpp:
1690         (WebCore::PlatformScrollbar::paint): Invalidate when updating control
1691         tints so that we can paint with the new tint later.
1692         (WebCore::PlatformScrollbar::paintButton): Pass the active state down
1693         to SafariTheme.
1694         (WebCore::PlatformScrollbar::paintTrack): Ditto.
1695         (WebCore::PlatformScrollbar::paintThumb): Ditto.
1696         * platform/win/ScrollViewWin.cpp:
1697         (WebCore::ScrollView::ScrollViewPrivate::isActive): Added.
1698         (WebCore::ScrollView::paint): Pass paint calls on down if we're
1699         updating control tints so the scroll bars can invalidate.
1700         * rendering/RenderLayer.cpp:
1701         (WebCore::RenderLayer::isActive): Added.
1702         * rendering/RenderLayer.h:
1703         * rendering/RenderListBox.cpp:
1704         (WebCore::RenderListBox::isActive): Added.
1705         * rendering/RenderListBox.h:
1706         * rendering/RenderTheme.cpp:
1707         (WebCore::RenderTheme::isActive): Added.
1708         * rendering/RenderTheme.h:
1709         * rendering/RenderThemeSafari.cpp:
1710         (WebCore::RenderThemeSafari::determineState): Pass the active state
1711         down to SafariTheme.
1712
1713 2008-01-16  Adam Roben  <aroben@apple.com>
1714
1715         Move focused/active state from Frame to SelectionController/FocusController
1716
1717         This is the first part of <rdar://5006915> Inactive look for Aqua
1718         controls.
1719
1720         The following methods were moved/renamed:
1721             - Frame::setIsActive -> FocusController::setActive
1722             - Frame::isActive -> SelectionController::isActiveAndFocused
1723             - Frame::setWindowHasFocus -> SelectionController::setFocused
1724
1725         Active state is now correctly a Page-level concept.
1726
1727         The Mac parts of this patch were written by Darin.
1728
1729         Reviewed by Darin.
1730
1731         All tests pass.
1732
1733         * WebCore.base.exp: Updated for method renames.
1734         * css/CSSStyleSelector.cpp:
1735         (WebCore::CSSStyleSelector::checkOneSelector): Ditto.
1736         * editing/SelectionController.cpp:
1737         (WebCore::SelectionController::SelectionController): Initialize new
1738         member.
1739         (WebCore::SelectionController::focusedOrActiveStateChanged): New
1740         private method. Most of this code came from Frame::setIsActive.
1741         (WebCore::SelectionController::pageActivationChanged): Added.
1742         (WebCore::SelectionController::setFocused): Added. Replaces
1743         Frame::setWindowHasFocus.
1744         (WebCore::SelectionController::isFocusedAndActive): Added. Replaces
1745         Frame::isActive.
1746         * editing/SelectionController.h:
1747         * page/FocusController.cpp:
1748         (WebCore::FocusController::FocusController): Initialize new member.
1749         (WebCore::FocusController::setFocusedFrame): Changed to just call
1750         SelectionController::setFocused, since active state has doesn't change
1751         when the focused frame changes.
1752         (WebCore::FocusController::setActive): Added. Replaces
1753         Frame::setIsActive.
1754         * page/FocusController.h:
1755         (WebCore::FocusController::isActive): Added.
1756         * page/Frame.cpp:
1757         (WebCore::Frame::setDocument): Updated for method renames.
1758         (WebCore::Frame::setFocusedNodeIfNeeded): Ditto.
1759         (WebCore::Frame::updateSecureKeyboardEntryIfActive): Ditto.
1760         (WebCore::FramePrivate::FramePrivate): Removed initialization of
1761         removed members.
1762         * page/Frame.h:
1763         * page/FramePrivate.h:
1764         * page/mac/WebCoreFrameBridge.h: Removed -selectionColor.
1765         * page/mac/WebCoreFrameBridge.mm: Ditto.
1766         * rendering/RenderListBox.cpp:
1767         (WebCore::RenderListBox::paintItemForeground): Updated for method
1768         renames.
1769         (WebCore::RenderListBox::paintItemBackground): Ditto.
1770         * rendering/RenderObject.cpp:
1771         (WebCore::RenderObject::selectionBackgroundColor): Ditto.
1772         (WebCore::RenderObject::selectionForegroundColor): Ditto.
1773         * rendering/RenderTextControl.cpp:
1774         (WebCore::RenderTextControl::capsLockStateMayHaveChanged): Ditto.
1775         * rendering/RenderTheme.cpp:
1776         (WebCore::RenderTheme::isFocused): Ditto.
1777
1778 2008-01-17  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1779
1780         Reviewed by Simon.
1781
1782         * Make the nice 'safari' feature work on our port. When viewing a single image, clicking
1783         on the image will zoom it.
1784         * It seems like our platform can only determine the size of the image once it is completely
1785         loaded. Call m_doc->imageChanged on the last chunk of data as well.
1786
1787         * loader/ImageDocument.cpp:
1788         (WebCore::ImageTokenizer::finish):
1789
1790 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
1791
1792         Reviewed by Lars.
1793
1794         Set the library version of QtWebKit to the Qt version.
1795
1796         * WebCore.pro:
1797
1798 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
1799
1800         Reviewed by Holger.
1801
1802         Re-enable gzip compression as accepted encoding, now that the bug is fixed in Qt 4.4's network module.
1803
1804         * platform/network/qt/QNetworkReplyHandler.cpp:
1805         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
1806
1807 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
1808
1809         Another Windows build fix, setCookies accidentially had a const
1810         Document pointer.
1811
1812         * platform/network/win/CookieJarWin.cpp:
1813
1814 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
1815
1816         MSVC Windows build fix. Forward declaring Document in CookieJar.h
1817         seems not enough for MSVC.
1818
1819         * platform/network/win/CookieJarWin.cpp:
1820
1821 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
1822
1823         Reviewed by Maciej, Lars, Holger.
1824
1825         http://bugs.webkit.org/show_bug.cgi?id=16589
1826
1827         Add a document parameter to WebCore::cookies, setCookies and cookiesEnabled.
1828
1829         * WebCore.pro:
1830         * bindings/js/kjs_navigator.cpp:
1831         (KJS::Navigator::getValueProperty):
1832         * dom/Document.cpp:
1833         (WebCore::Document::cookie):
1834         * platform/CookieJar.h:
1835         * platform/gtk/CookieJarGtk.cpp:
1836         (WebCore::setCookies):
1837         (WebCore::cookies):
1838         * platform/mac/CookieJar.mm:
1839         * platform/network/win/CookieJarWin.cpp:
1840         * platform/qt/CookieJarQt.cpp:
1841         (WebCore::setCookies):
1842         (WebCore::cookies):
1843         (WebCore::cookiesEnabled):
1844         * platform/wx/TemporaryLinkStubs.cpp:
1845
1846 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
1847
1848         Reviewed by Holger.
1849
1850         Windows build fix. (use localtime_r again instead of _s)
1851
1852         * loader/FTPDirectoryDocument.cpp:
1853         (WebCore::processFileDateString):
1854
1855 2008-01-17  Frans Englich  <fenglich@trolltech.com>
1856
1857         Reviewed by Simon Hausmann <hausmann@webkit.org>.
1858
1859         Fix linking on MinGW and at least one MSVC platform by having gmtimeQt in the correct namespace.
1860
1861         * loader/FTPDirectoryDocument.cpp:
1862
1863 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
1864
1865         Reviewed by Holger.
1866
1867         Don't link QtWebKit against libQtXml when building against Qt 4.4.
1868
1869         This is not necessary anymore since QXmlStream has been moved into QtCore.
1870
1871         * WebCore.pro:
1872
1873 2008-01-17  Håvard Wall  <hwall@trolltech.com>
1874
1875         Reviewed by Simon Hausmann <hausmann@webkit.org>.
1876
1877         Fix compilation on arm
1878
1879         * platform/graphics/qt/GraphicsContextQt.cpp:
1880         (WebCore::GraphicsContext::endTransparencyLayer):
1881
1882 2008-01-17  Simon Hausmann  <shausman@trolltech.com>
1883
1884         Reviewed by Holger.
1885
1886         Fix compilation against Qt 4.4 without files that are specific for the Qt 4.3 build.
1887
1888         * WebCore.pro:
1889         * platform/network/qt/ResourceHandleQt.cpp:
1890         * platform/qt/MIMETypeRegistryQt.cpp:
1891         * platform/qt/PlugInInfoStoreQt.cpp:
1892
1893 2008-01-17  Frans Englich  <fenglich@trolltech.com>
1894
1895         Reviewed by Simon Hausmann <hausmann@webkit.org>.
1896
1897         Fixes compilation with MinGW.
1898         Neither localtime_r nor localtime_s are available on MingW, so instead of
1899         calling back to the thread-unsafe localtime use QDateTime instead.
1900
1901         * loader/FTPDirectoryDocument.cpp:
1902         (WebCore::FTPDirectoryTokenizer::WebCore::processFilesizeString):
1903         (WebCore::FTPDirectoryTokenizer::WebCore::wasLastDayOfMonth):
1904         (WebCore::FTPDirectoryTokenizer::WebCore::WebCore::gmtimeQt):
1905         * loader/FTPDirectoryParser.cpp:
1906         (WebCore::parseOneFTPLine):
1907
1908 2008-01-17  Dan Bernstein  <mitz@apple.com>
1909
1910         Reviewed by Dave Hyatt.
1911
1912         - fix determinePitch for segmented fonts
1913
1914         Covered by fast/css/font-face-implicit-local-font.html
1915
1916         * platform/graphics/FontFallbackList.cpp:
1917         (WebCore::FontFallbackList::determinePitch): If the primary font is
1918         segmented, treat as fixed pitch only if it has only one segment
1919         and that segment is fixed-pitch.
1920
1921 2008-01-16  David Hyatt  <hyatt@apple.com>
1922
1923         Fix for http://bugs.webkit.org/show_bug.cgi?id=16611
1924
1925         Make sure vertical-align length values are offset from their parents rather than being absolute to the
1926         line.
1927
1928         Reviewed by olliej
1929
1930         Added fast/css/vertical-align-lengths.html
1931
1932         * rendering/RenderObject.cpp:
1933         (WebCore::RenderObject::getVerticalPosition):
1934
1935 2008-01-16  Dan Bernstein  <mitz@apple.com>
1936
1937         Reviewed by Dave Hyatt.
1938
1939         - fix for @font-face rules with unicode-range: always use a local font where not
1940           explicitly overlaid.
1941
1942         Test: fast/css/font-face-implicit-local-font.html
1943
1944         * css/CSSFontSelector.cpp:
1945         (WebCore::CSSFontSelector::addFontFaceRule): Changed to insert an implicit
1946         @font-face rule with the local font the matches the family and description before
1947         any explicit @font-face rules that overlay specific ranges of the same font.
1948         * css/CSSSegmentedFontFace.h:
1949         (WebCore::CSSSegmentedFontFace::numRanges): Addded.
1950
1951 2008-01-16  Antti Koivisto  <antti@apple.com>
1952
1953         Fix Tiger build.
1954
1955         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1956         (WebCore::MediaPlayerPrivate::disableUnsupportedTracks):
1957
1958 2008-01-16  Antti Koivisto  <antti@apple.com>
1959
1960         Reviewed by Adele.
1961         
1962         OS X fix for <rdar://problem/5605682>
1963         Disallow streaming protocols for media elements
1964         and <rdar://problem/5668711>
1965         Limit the container and codec types that the <video> tag supports
1966         
1967         - Disable unsupported QuickTime tracks types. 
1968         - Disallow streaming protocols (for now).
1969         - Set QTMovie QTMoviePreventExternalURLLinksAttribute and QTSecurityPolicyNoCrossSiteAttribute 
1970           to limit QuickTime's access to external resources.
1971         
1972         Windows patch coming up.
1973
1974         Tests: media/broken-video.html
1975                media/unsupported-rtsp.html
1976                media/unsupported-tracks.html
1977
1978         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1979         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1980         (WebCore::MediaPlayerPrivate::createQTMovie):
1981         (WebCore::MediaPlayerPrivate::updateStates):
1982         (WebCore::MediaPlayerPrivate::disableUnsupportedTracks):
1983
1984 2008-01-16  Rodney Dawes  <dobey@wayofthemonkey.com>
1985
1986         Reviewed by Alp Toker.
1987
1988         http://bugs.webkit.org/show_bug.cgi?id=16897
1989         Add shared plugins directory to INCLUDE path
1990
1991         Add the plugins directory to INCLUDEPATH
1992
1993         * GNUmakefile.am:
1994         * WebCore.pro:
1995
1996 2008-01-16  Geoffrey Garen  <ggaren@apple.com>
1997
1998         Reviewed by Sam Weinig.
1999         
2000         Added a debug counter for SQL transactions. This helped me debug an SQL
2001         leak.
2002
2003         * bindings/js/JSCustomSQLTransactionCallback.cpp:
2004         (WebCore::):
2005         (WebCore::JSCustomSQLTransactionCallbackCounter::~JSCustomSQLTransactionCallbackCounter):
2006         (WebCore::JSCustomSQLTransactionCallback::JSCustomSQLTransactionCallback):
2007         (WebCore::JSCustomSQLTransactionCallback::~JSCustomSQLTransactionCallback):
2008         * bindings/js/JSCustomSQLTransactionCallback.h:
2009
2010         * bindings/js/kjs_window.cpp: Removed a silly comment.
2011
2012 2008-01-16  David Hyatt  <hyatt@apple.com>
2013
2014         Fix for http://bugs.webkit.org/show_bug.cgi?id=14846, cell padding can't be changed dynamically.
2015
2016         Reviewed by Eric Seidel
2017
2018         Added fast/table/dynamic-cellpadding.html
2019
2020         * html/HTMLTableElement.cpp:
2021         (WebCore::HTMLTableElement::parseMappedAttribute):
2022         * rendering/RenderTable.cpp:
2023         (WebCore::RenderTable::setCellPadding):
2024         * rendering/RenderTable.h:
2025
2026 2008-01-16  David Hyatt  <hyatt@apple.com>
2027
2028         Fix for <rdar://problem/5681647> Item pages on http://www.stendmarsofa.com/ hang Safari
2029
2030         This regression was caused by an attempt to implement a WinIE quirk in RenderBlock::calcInlinePrefWidths.
2031         The original patch introduced pathological O(n^2) behavior into this function even when the quirk didn't need
2032         to apply.  In addition the quirk was only partially implemented (the full quirk did not care what was adjacent
2033         to images and also needed bidi.cpp patched, since the quirk applies both when computing pref widths and when
2034         laying out).
2035
2036         This new patch rewrites the quirk to be complete.  The original test case attached to the bug that tested a variety
2037         of image/text combinations now fully matches WinIE.
2038
2039         Reviewed by Beth
2040
2041         Added fast/table/unbreakable-images-quirk.html
2042
2043         * rendering/RenderBlock.cpp:
2044         (WebCore::RenderBlock::calcInlinePrefWidths):
2045         * rendering/bidi.cpp:
2046         (WebCore::RenderBlock::findNextLineBreak):
2047
2048 2008-01-16  Rodney Dawes  <dobey@wayofthemonkey.com>
2049
2050         Reviewed by Jon Honeycutt
2051
2052         Move isPluginBlacklisted to PluginPackageWin.cpp, to avoid
2053         a circular dependency on PluginDatabaseWin
2054         Remove the getFileVersion method, and just check the versions directly
2055         in isPluginBlacklisted, as it was the only caller
2056
2057         http://bugs.webkit.org/show_bug.cgi?id=16884
2058
2059         * plugins/win/PluginDatabaseWin.cpp:
2060         * plugins/win/PluginDatabaseWin.h:
2061         * plugins/win/PluginPackageWin.cpp:
2062         * plugins/win/PluginPackageWin.h:
2063
2064 2008-01-16  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2065
2066         Reviewed by Lars.
2067
2068         * Set the cursor on the containingWindow() instead of the
2069         nativeWidget()
2070         * This should be safe even with plugins as the cursor is set
2071         on the mouse events.
2072
2073         * platform/qt/WidgetQt.cpp:
2074         (WebCore::Widget::setCursor):
2075
2076 2008-01-16  Brad Hughes  <bhughes@trolltech.com>
2077
2078         Reviewed by Lars.
2079
2080         Improve the sqlite3 dependency when building WebKit inside Qt.
2081
2082         Build sqlite3 into QtWebKit if a system sqlite3 development package
2083         can't be found.
2084
2085         * WebCore.pro:
2086
2087 2008-01-16  Lars Knoll  <lars@trolltech.com>
2088
2089         Reviewed by Simon Hausmann <simon.hausmann@trolltech.com>.
2090
2091         Implement GraphicsContext::clipOut and fix transparency layers.
2092
2093         Transparency layers where broken in two ways: It always used the
2094         complete device rect as the size of the layer pixmap and the pixmaps
2095         where not correctly initialized to transparent.
2096
2097         This fixes the worst drawing errors in the Inspector and makes drawing it
2098         10 times faster.
2099
2100         * platform/graphics/qt/GraphicsContextQt.cpp:
2101         (WebCore::toQtLineJoin):
2102         (WebCore::TransparencyLayer::TransparencyLayer):
2103         (WebCore::GraphicsContextPlatformPrivate::p):
2104         (WebCore::GraphicsContext::platformContext):
2105         (WebCore::GraphicsContext::savePlatformState):
2106         (WebCore::GraphicsContext::restorePlatformState):
2107         (WebCore::GraphicsContext::drawRect):
2108         (WebCore::GraphicsContext::drawLine):
2109         (WebCore::GraphicsContext::drawEllipse):
2110         (WebCore::GraphicsContext::strokeArc):
2111         (WebCore::GraphicsContext::drawConvexPolygon):
2112         (WebCore::GraphicsContext::fillRect):
2113         (WebCore::GraphicsContext::fillRoundedRect):
2114         (WebCore::GraphicsContext::clip):
2115         (WebCore::GraphicsContext::drawFocusRing):
2116         (WebCore::GraphicsContext::beginTransparencyLayer):
2117         (WebCore::GraphicsContext::endTransparencyLayer):
2118         (WebCore::GraphicsContext::clearRect):
2119         (WebCore::GraphicsContext::strokeRect):
2120         (WebCore::GraphicsContext::setLineCap):
2121         (WebCore::GraphicsContext::setLineJoin):
2122         (WebCore::GraphicsContext::setMiterLimit):
2123         (WebCore::GraphicsContext::setAlpha):
2124         (WebCore::GraphicsContext::setCompositeOperation):
2125         (WebCore::GraphicsContext::clipOut):
2126         (WebCore::GraphicsContext::translate):
2127         (WebCore::GraphicsContext::origin):
2128         (WebCore::GraphicsContext::rotate):
2129         (WebCore::GraphicsContext::scale):
2130         (WebCore::GraphicsContext::clipOutEllipseInRect):
2131         (WebCore::GraphicsContext::addInnerRoundedRectClip):
2132         (WebCore::GraphicsContext::setPlatformStrokeStyle):
2133         (WebCore::GraphicsContext::setPlatformStrokeThickness):
2134         (WebCore::GraphicsContext::setPlatformFillColor):
2135         (WebCore::GraphicsContext::setUseAntialiasing):
2136
2137 2008-01-16  Lars Knoll  <lars@trolltech.com>
2138
2139         Reviewed by Simon Hausmann <simon.hausmann@trolltech.com>.
2140
2141         Trivially implement the themed search field by mapping it to a text field
2142
2143         Also add a bunch of notImplemented warnings for other places where we don't
2144         have an implementatin in RenderTheme.
2145
2146         * platform/qt/RenderThemeQt.cpp:
2147         (WebCore::RenderThemeQt::paintTextField):
2148         (WebCore::RenderThemeQt::paintMenuListButton):
2149         (WebCore::RenderThemeQt::adjustMenuListButtonStyle):
2150         (WebCore::RenderThemeQt::paintSliderTrack):
2151         (WebCore::RenderThemeQt::paintSliderThumb):
2152         (WebCore::RenderThemeQt::paintSearchField):
2153         (WebCore::RenderThemeQt::adjustSearchFieldStyle):
2154         (WebCore::RenderThemeQt::adjustSearchFieldCancelButtonStyle):
2155         (WebCore::RenderThemeQt::paintSearchFieldCancelButton):
2156         (WebCore::RenderThemeQt::adjustSearchFieldDecorationStyle):
2157         (WebCore::RenderThemeQt::paintSearchFieldDecoration):
2158         (WebCore::RenderThemeQt::adjustSearchFieldResultsDecorationStyle):
2159         (WebCore::RenderThemeQt::paintSearchFieldResultsDecoration):
2160
2161 2008-01-16  Holger Freyther  <holger.freyther@trolltech.com>
2162
2163         Reviewed by Simon.
2164
2165         * Follow the EventHandlerWin.cpp and always return true in the handlers.
2166         * Match the windows implementation more closely as well.
2167         * This is fixing "selection" bugs with the Web Inspector
2168
2169         * page/qt/EventHandlerQt.cpp:
2170         (WebCore::EventHandler::focusDocumentView):
2171         (WebCore::EventHandler::passMousePressEventToSubframe):
2172         (WebCore::EventHandler::passMouseMoveEventToSubframe):
2173         (WebCore::EventHandler::passMouseReleaseEventToSubframe):
2174         (WebCore::EventHandler::passMousePressEventToScrollbar):
2175
2176 2008-01-16  Simon Hausmann  <hausmann@webkit.org>
2177
2178         Reviewed by Lars Knoll <lars@trolltech.com>.
2179
2180         Fix crashes in the new networking code.
2181
2182         When the ResourceLoader cancels the handle we have to make sure not to access
2183         the resource handle afterwards again.
2184
2185         * platform/network/qt/QNetworkReplyHandler.cpp:
2186         (WebCore::QNetworkReplyHandler::finish):
2187         (WebCore::QNetworkReplyHandler::forwardData):
2188
2189 2008-01-16  Lars Knoll  <lars@trolltech.com>
2190
2191         Reviewed by Simon.
2192
2193         add conversion methods from and to QUrl to KURL.
2194
2195         Use them in the places I found at the moment. Fixes a bug
2196         where form data was encoded twice.
2197         Also fix QWebSettings to take a QUrl for the user style sheet
2198         location.
2199
2200         * WebCore.pro:
2201         * platform/KURL.h:
2202         * platform/network/qt/QNetworkReplyHandler.cpp:
2203         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
2204         * platform/network/qt/ResourceRequestQt.cpp:
2205         (WebCore::ResourceRequest::toNetworkRequest):
2206         * platform/qt/KURLQt.cpp: Added.
2207         (WebCore::KURL::KURL):
2208         (WebCore::KURL::operator QUrl):
2209
2210 2008-01-15  Darin Adler  <darin@apple.com>
2211
2212         Rubber-stamped by Maciej Stachowiak and Oliver Hunt.
2213
2214         - fix <rdar://problem/5689748> REGRESSION: Cannot redirect to protocols handled by external applications
2215
2216         Put navigation policy delegate calls back for redirects.
2217         Just rolled out the change where I took them out.
2218
2219         * loader/MainResourceLoader.cpp:
2220         (WebCore::MainResourceLoader::callContinueAfterNavigationPolicy):
2221         (WebCore::MainResourceLoader::continueAfterNavigationPolicy):
2222         (WebCore::MainResourceLoader::willSendRequest):
2223         * loader/MainResourceLoader.h:
2224
2225 2008-01-15  Adele Peterson  <adele@apple.com>
2226
2227         Reviewed by Sam.
2228
2229         Remove unused variable for old media control background drawing code.
2230
2231         * rendering/RenderThemeMac.h:
2232         * rendering/RenderThemeMac.mm:
2233         (WebCore::RenderThemeMac::RenderThemeMac):
2234         (WebCore::RenderThemeMac::~RenderThemeMac):
2235
2236 2008-01-15  Sam Weinig  <sam@webkit.org>
2237
2238         Reviewed by Geoffrey Garen.
2239
2240         Fix <rdar://problem/5595552> r27608 introduced a 20% increase in JS binary size, 4% increase in WebCore binary size
2241
2242         - Update JS Function implementations to use a static function based method. This decreases
2243           the binary size of an Intel only build by 1013.5K.
2244
2245         * WebCore.xcodeproj/project.pbxproj:
2246         * bindings/js/JSDOMWindowCustom.cpp:
2247         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
2248         * bindings/js/JSEventTargetBase.cpp:
2249         (WebCore::jsEventTargetAddEventListener):
2250         (WebCore::jsEventTargetRemoveEventListener):
2251         (WebCore::jsEventTargetDispatchEvent):
2252         (WebCore::retrieveEventTargetAndCorrespondingNode):
2253         * bindings/js/JSEventTargetBase.h:
2254         * bindings/js/JSHTMLInputElementBase.cpp:
2255         (WebCore::jsHTMLInputElementBaseFunctionSetSelectionRange):
2256         (WebCore::JSHTMLInputElementBase::getOwnPropertySlot):
2257         * bindings/js/JSHTMLInputElementBase.h:
2258         * bindings/js/JSLocation.cpp:
2259         (WebCore::JSLocation::getOwnPropertySlot):
2260         (WebCore::jsLocationProtoFuncReplace):
2261         (WebCore::jsLocationProtoFuncReload):
2262         (WebCore::jsLocationProtoFuncAssign):
2263         (WebCore::jsLocationProtoFuncToString):
2264         * bindings/js/JSLocation.h:
2265         * bindings/js/JSXMLHttpRequest.cpp:
2266         (KJS::jsXMLHttpRequestPrototypeFunctionAbort):
2267         (KJS::jsXMLHttpRequestPrototypeFunctionGetAllResponseHeaders):
2268         (KJS::jsXMLHttpRequestPrototypeFunctionGetResponseHeader):
2269         (KJS::jsXMLHttpRequestPrototypeFunctionOpen):
2270         (KJS::jsXMLHttpRequestPrototypeFunctionSend):
2271         (KJS::jsXMLHttpRequestPrototypeFunctionSetRequestHeader):
2272         (KJS::jsXMLHttpRequestPrototypeFunctionOverrideMIMEType):
2273         (KJS::jsXMLHttpRequestPrototypeFunctionAddEventListener):
2274         (KJS::jsXMLHttpRequestPrototypeFunctionRemoveEventListener):
2275         (KJS::jsXMLHttpRequestPrototypeFunctionDispatchEvent):
2276         * bindings/js/JSXMLHttpRequest.h:
2277         * bindings/js/JSXSLTProcessor.cpp:
2278         (KJS::jsXSLTProcessorPrototypeFunctionImportStylesheet):
2279         (KJS::jsXSLTProcessorPrototypeFunctionTransformToFragment):
2280         (KJS::jsXSLTProcessorPrototypeFunctionTransformToDocument):
2281         (KJS::jsXSLTProcessorPrototypeFunctionSetParameter):
2282         (KJS::jsXSLTProcessorPrototypeFunctionGetParameter):
2283         (KJS::jsXSLTProcessorPrototypeFunctionRemoveParameter):
2284         (KJS::jsXSLTProcessorPrototypeFunctionClearParameters):
2285         (KJS::jsXSLTProcessorPrototypeFunctionReset):
2286         * bindings/js/JSXSLTProcessor.h:
2287         * bindings/js/kjs_events.cpp:
2288         (WebCore::jsClipboardPrototypeFunctionClearData):
2289         (WebCore::jsClipboardPrototypeFunctionGetData):
2290         (WebCore::jsClipboardPrototypeFunctionSetData):
2291         (WebCore::jsClipboardPrototypeFunctionSetDragImage):
2292         * bindings/js/kjs_events.h:
2293         * bindings/js/kjs_navigator.cpp:
2294         (KJS::pluginsFunctionRefresh):
2295         (KJS::navigatorProtoFuncJavaEnabled):
2296         * bindings/js/kjs_navigator.h:
2297         * bindings/js/kjs_window.cpp:
2298         (KJS::Window::getOwnPropertySlot):
2299         (KJS::windowProtoFuncAToB):
2300         (KJS::windowProtoFuncBToA):
2301         (KJS::windowProtoFuncOpen):
2302         (KJS::windowProtoFuncSetTimeout):
2303         (KJS::windowProtoFuncClearTimeout):
2304         (KJS::windowProtoFuncSetInterval):
2305         (KJS::windowProtoFuncAddEventListener):
2306         (KJS::windowProtoFuncRemoveEventListener):
2307         (KJS::windowProtoFuncShowModalDialog):
2308         (KJS::windowProtoFuncNotImplemented):
2309         * bindings/js/kjs_window.h:
2310         * bindings/scripts/CodeGenerator.pm:
2311         * bindings/scripts/CodeGeneratorJS.pm:
2312
2313 2008-01-15  Adele Peterson  <adele@apple.com>
2314
2315         Reviewed by Dan.
2316
2317         Fix for <rdar://problem/5682492> With the <video> element, the audio is heard when forwarding or rewinding a movie while it's playing
2318
2319         * rendering/MediaControlElements.cpp: (WebCore::MediaControlSeekButtonElement::defaultEventHandler):
2320           Instead of pausing the media when you stop seeking on mouse up, pause the video when you first start seeking on mouse down. 
2321
2322 2008-01-15  Alp Toker  <alp@atoker.com>
2323
2324         Rubber-stamped by Anders.
2325
2326         Make the HTTP backend configurable in the GTK+ port. curl is currently
2327         the only option.
2328
2329         * GNUmakefile.am:
2330
2331 2008-01-15  Adele Peterson  <adele@apple.com>
2332
2333         Build fix.
2334
2335         * rendering/RenderThemeSafari.cpp: Removing MediaBackgroundAppearance.
2336
2337 2008-01-14  Samuel Weinig  <sam@webkit.org>
2338
2339         Reviewed by Darin.
2340
2341         Fix for <rdar://problem/5671040>
2342         REGRESSION: 6% HTML iBench regression from r28722 (getElementsByClassName)
2343
2344         On my most consistent tests, this brings the HTML iBench from 1.46 -> 1.41,
2345         which does not completely make up reported regression, but I was not able to
2346         reproduce those findings either.
2347
2348         * css/CSSStyleSelector.cpp:
2349         (WebCore::CSSStyleSelector::matchRules):
2350         (WebCore::CSSStyleSelector::checkOneSelector):
2351         * dom/ClassNames.cpp:
2352         (WebCore::ClassNames::parseClassAttribute):
2353         * dom/ClassNames.h:
2354         (WebCore::ClassNames::contains):
2355         (WebCore::ClassNames::operator[]):
2356
2357 2008-01-15  Adele Peterson  <adele@apple.com>
2358
2359         Build fix.  This time for real.
2360
2361         * rendering/RenderThemeSafari.cpp:
2362
2363 2008-01-15  Adele Peterson  <adele@apple.com>
2364
2365         Build fix.
2366
2367         * rendering/RenderThemeSafari.cpp:
2368
2369 2008-01-15  Dan Bernstein  <mitz@apple.com>
2370
2371         Reviewed by Darin Adler.
2372
2373         - fix <rdar://problem/5666926> svg/custom/use-css-no-effect-on-shadow-tree.svg is failing
2374
2375         * svg/SVGPreserveAspectRatio.cpp:
2376         (WebCore::SVGPreserveAspectRatio::getCTM): Changed the arguments' type
2377         from float to double in order to make the values passed to scale() and
2378         translate() on Mac OS X and on Windows the same.
2379         * svg/SVGPreserveAspectRatio.h:
2380
2381 2008-01-15  Alexey Proskuryakov  <ap@webkit.org>
2382
2383         Reviewed by Darin.
2384
2385         <rdar://problem/5342813> REGRESSION: Safari encodes mailto URLs incorrectly
2386
2387         Test: fast/encoding/mailto-always-utf-8.html
2388
2389         * platform/KURL.cpp: (WebCore::encodeRelativeString): Always use UTF-8 for mailto URLs.
2390
2391 2008-01-15  Adele Peterson  <adele@apple.com>
2392
2393         Reviewed by Adam and Antti.
2394
2395         WebCore part of fix for <rdar://problem/5619062> Add load progress indicator to video controls
2396
2397         * WebCore.base.exp: Removed symbol for wkGetMediaControlBackgroundImageData.  Added symbol for wkDrawMediaSliderTrack.
2398         * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Removed case for MediaBackgroundAppearance.
2399         * css/html4.css: Removed -webkit-appearance: media-background rule for the media panel element.  Removed unnecessary margin for slider.
2400         * rendering/RenderStyle.h: (WebCore::): Removed MediaBackgroundAppearance.
2401
2402         * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::initAndDispatchProgressEvent):
2403           Call updateMediaPlayer more frequently so the load progress control gets updated appropriately.
2404         * platform/mac/WebCoreSystemInterface.h: Removed wkGetMediaControlBackgroundImageData.  Added wkDrawMediaSliderTrack.
2405         * platform/mac/WebCoreSystemInterface.mm: ditto.
2406
2407         * rendering/RenderTheme.h: Removed paintMediaBackground. Added paintMediaSliderTrack.
2408         * rendering/RenderTheme.cpp: (WebCore::RenderTheme::paint): Call paintMediaSliderTrack for elements with MediaSliderAppearance.
2409         * rendering/RenderThemeMac.h: Removed paintMediaBackground. Added paintMediaSliderTrack.
2410         * rendering/RenderThemeMac.mm:
2411         (WebCore::RenderThemeMac::adjustSliderThumbSize): Added different sizes for the media slider thumb.
2412         (WebCore::RenderThemeMac::paintMediaSliderTrack): Added.  Calls wkDrawMediaSliderTrack with the percentage the media has loaded.
2413         * rendering/RenderThemeSafari.cpp: ditto.
2414         (WebCore::RenderThemeSafari::adjustSliderThumbSize):
2415         (WebCore::RenderThemeSafari::paintMediaSliderTrack):
2416         * rendering/RenderThemeSafari.h:
2417
2418 2008-01-15  Alexey Proskuryakov  <ap@webkit.org>
2419
2420         Reviewed by Mark Rowe.
2421
2422         Some logging channels weren't initialized from user defaults.
2423
2424         * platform/mac/LoggingMac.mm: (WebCore::InitializeLoggingChannelsIfNecessary):
2425         Initialize LogPlatformLeaks, LogStorageAPI, LogMedia, LogPlugin.
2426
2427 2008-01-14  Steve Falkenburg  <sfalken@apple.com>
2428
2429         Use shared vsprops for most vcproj properties.
2430         
2431         Reviewed by Darin.
2432
2433         * WebCore.vcproj/QTMovieWin.vcproj:
2434         * WebCore.vcproj/WebCore.vcproj:
2435         * platform/graphics/win/QTMovieWin.cpp:
2436         (QTMovieWin::initializeQuickTime): Fix compiler warning.
2437
2438 2008-01-14  Eric Seidel  <eric@webkit.org>
2439
2440         Reviewed by mjs.
2441
2442         Remove a couple more uses of DeprecatedString
2443
2444         No functional changes, thus no test case.
2445
2446         * dom/Document.cpp:
2447         (WebCore::Document::write):
2448         (WebCore::Document::writeln):
2449         (WebCore::Document::recalcStyleSelector):
2450         * dom/Document.h:
2451
2452 2008-01-14  Pierre-Luc Beaudoin  <pierre-luc.beaudoin@collabora.co.uk>
2453
2454         Reviewed by Alp Toker.
2455
2456         Build fix: missing symbols when compiling WebKit/Gtk+ with --enable-svg-filters
2457         http://bugs.webkit.org/show_bug.cgi?id=16874
2458
2459         * GNUmakefile.am:
2460         * svg/graphics/cairo/SVGResourceFilterCairo.cpp: Added.
2461         (WebCore::SVGResourceFilter::createPlatformData):
2462         (WebCore::SVGResourceFilter::prepareFilter):
2463         (WebCore::SVGResourceFilter::applyFilter):
2464
2465 2008-01-14  Finnur Thorarinsson  <finnur.webkit@gmail.com>
2466
2467         Reviewed by hyatt & eseidel.
2468
2469         - fix http://bugs.webkit.org/show_bug.cgi?id=16844
2470         RenderText::addLineBoxRects erroneously includes last char for boundingBox
2471
2472         This patch fixes an issue with addLineBoxRects not correctly calculating the 
2473         rects due to an off-by-one error in using box->end(). We were assuming that 
2474         end() gives the index past the last character, when in fact it gives the 
2475         index _of_ the last character. 
2476
2477         Eric Seidel and I could not find a way to test this via DRT. This method is 
2478         only used by WebKit or Safari for displaying selection rects AFAICT.
2479
2480         * rendering/RenderText.cpp:
2481         (WebCore::RenderText::addLineBoxRects):
2482
2483 2008-01-14  Darin Adler  <darin@apple.com>
2484
2485         Reviewed by Geoff.
2486
2487         - fix crash seen in layout tests
2488
2489         * html/HTMLFrameSetElement.cpp:
2490         (WebCore::HTMLFrameSetElement::attach):
2491         Remove incorrect cast to HTMLElement* for parentNode(). The parent is either an
2492         HTMLElement or a Document, not necessarily an HTMLElement.
2493
2494 2008-01-14  Darin Adler  <darin@apple.com>
2495
2496         Reviewed by Sam.
2497
2498         - fix mistakes Sam noticed in my re-speed-up patch
2499
2500         * dom/Element.cpp:
2501         (WebCore::Element::virtualHasTagName): Moved out of header file. No reason to make
2502         this inline.
2503         * dom/Element.h: Moved virtualHasTagName out of header file.
2504
2505         * dom/Node.cpp:
2506         (WebCore::Node::virtualHasTagName): Moved out of header file. No reason to make
2507         this inline.
2508         * dom/Node.h: Removed incorrect "virtual" on hasTagName and moved virtualHasTagName
2509         out of header file.
2510
2511         * platform/text/StringBuffer.h: Added. Has just the new StringBuffer class.
2512
2513         * platform/text/StringImpl.h: Removed StringBuffer class.
2514
2515         * loader/DocumentLoader.cpp: Added StringBuffer.h include.
2516         * platform/text/String.cpp: Ditto.
2517         * platform/text/StringImpl.cpp: Ditto.
2518         * platform/text/TextCodecLatin1.cpp: Ditto.
2519         * platform/text/TextCodecUTF16.cpp: Ditto.
2520         * platform/text/TextCodecUserDefined.cpp: Ditto.
2521
2522         * WebCore.vcproj/WebCore.vcproj: Added StringBuffer.h.
2523         * WebCore.xcodeproj/project.pbxproj: Ditto.
2524
2525 2008-01-14  Dave Hyatt  <hyatt@apple.com>
2526
2527         Clean up all the misplaced graphics files after the recent file moves.  Clean up the project to
2528         accurately reflect the location of all the graphics files.
2529         
2530         Reviewed by Adam
2531
2532         * WebCore.vcproj/WebCore.vcproj:
2533         * platform/graphics/win/GraphicsContextWin.cpp: Copied from platform/win/GraphicsContextWin.cpp.
2534         * platform/graphics/win/UniscribeController.cpp: Copied from platform/win/UniscribeController.cpp.
2535         * platform/graphics/win/UniscribeController.h: Copied from platform/win/UniscribeController.h.
2536         * platform/win/GraphicsContextWin.cpp: Removed.
2537         * platform/win/UniscribeController.cpp: Removed.
2538         * platform/win/UniscribeController.h: Removed.
2539
2540 2008-01-14  Geoffrey Garen  <ggaren@apple.com>
2541
2542         Reviewed by Sam Weinig.
2543         
2544         Some cleanup to my last patch.
2545
2546         Removed one unused setter declaration and one unused setter definition.
2547         
2548         Renamed DoNotCheckDomainSecurityOnRead to DoNotCheckDomainSecurityOnGet
2549         because "get" is all over the IDL files, and "read" is not.
2550
2551         * bindings/scripts/CodeGeneratorJS.pm:
2552         * page/DOMWindow.h:
2553         (WebCore::DOMWindow::defaultstatus):
2554         * page/DOMWindow.idl:
2555
2556 2008-01-14  Dan Bernstein  <mitz@apple.com>
2557
2558         Rubber-stamped by Alice Liu.
2559
2560         - remove reference to nonexistent file
2561
2562         * WebCore.vcproj/WebCore.vcproj: Removed reference to SVGFont.h.
2563
2564 2008-01-14  Darin Adler  <darin@apple.com>
2565
2566         Reviewed by Adam.
2567
2568         - re-speed-up the page load test (my StringImpl change slowed it down)
2569           <rdar://problem/5677241> 1.5% PLT regression from r29098
2570
2571         To reverse the slowdown I caused by changing StringImpl, I tightened it up,
2572         and also did a little optimization in the HTML tokenizer and in other clients
2573         of Vector.
2574
2575         * WebCore.base.exp: Removed export of a now-inline function.
2576
2577         * css/CSSParser.cpp:
2578         (WebCore::CSSParser::parseTransitionProperty): Removed use of DeprecatedString
2579         to get property ID. This could be sped up even more by writing a fast path
2580         to use a local Vector<char> rather than allocating a string.
2581         (WebCore::convertASCIIToFloat): Added. Allows numeric conversion without
2582         allocating a string object to hold the number.
2583         (WebCore::CSSParser::lex): Changed to call convertASCIIToFloat instead of
2584         DeprecatedString::toFloat.
2585
2586         * dom/Element.h:
2587         (WebCore::Element::hasTagName): Made this non-virtual and inline if you have
2588         an Element*. It's still virtual if you have a Node*.
2589         (WebCore::Element::virtualHasTagName): Virtual version that makes the Node*
2590         case work.
2591
2592         * dom/Node.h:
2593         (WebCore::Node::hasTagName): Made this non-virtual and inline so that Element
2594         can override it with an inline. This is the same technique we use for
2595         firstChild and lastChild.
2596         (WebCore::Node::virtualHasTagName): This is the private virtual that Element
2597         overrides.
2598
2599         * dom/Text.cpp:
2600         (WebCore::Text::splitText): Clean up by using a RefPtr here instead of a
2601         PassRefPtr.
2602
2603         * html/HTMLTokenizer.cpp:
2604         (WebCore::HTMLTokenizer::parseSpecial): Use the new advancePastNonNewline(),
2605         which is more efficient in cases where we know the character is not a newline
2606         and hence we don't have to update the line number.
2607         (WebCore::HTMLTokenizer::parseComment): Ditto.
2608         (WebCore::HTMLTokenizer::parseServer): Ditto.
2609         (WebCore::HTMLTokenizer::parseProcessingInstruction): Ditto.
2610         (WebCore::HTMLTokenizer::parseText): Ditto.
2611         (WebCore::HTMLTokenizer::parseEntity): Ditto.
2612         (WebCore::HTMLTokenizer::parseTag): Ditto. Also streamline the QuotedValue case
2613         so there's one less branch taken for non-punctuation characters since this
2614         code path is *so* hot.
2615         (WebCore::HTMLTokenizer::write): More of the same.
2616
2617         * loader/Cache.cpp:
2618         (WebCore::Cache::lruListFor): Use Vector::grow instead of resize.
2619
2620         * loader/DocumentLoader.cpp:
2621         (WebCore::canonicalizedTitle): Use StringBuffer instead of Vector<UChar>.
2622
2623         * loader/TextResourceDecoder.cpp:
2624         (WebCore::TextResourceDecoder::checkForCSSCharset): Use Vector::grow instead of resize.
2625         (WebCore::TextResourceDecoder::checkForHeadCharset): Ditto.
2626         (WebCore::TextResourceDecoder::decode): Use Vector::grow and shrink instead of resize.
2627         (WebCore::TextResourceDecoder::flush): Use Vector::shrink instead of resize.
2628
2629         * platform/KURL.cpp:
2630         (WebCore::KURL::decode_string): Use Vector::grow instead of resize.
2631
2632         * platform/SharedBuffer.cpp:
2633         (WebCore::SharedBuffer::clear): Use Vector::shrink instead of resize.
2634
2635         * platform/graphics/BitmapImage.cpp:
2636         (WebCore::BitmapImage::cacheFrame): Use Vector::grow instead of resize.
2637
2638         * platform/network/FormData.cpp:
2639         (WebCore::FormData::appendData): Use Vector::grow instead of resize.
2640         (WebCore::FormData::flatten): Ditto.
2641
2642         * platform/text/AtomicString.cpp:
2643         (WebCore::CStringTranslator::translate): Use a new StringImpl constructor made just
2644         for use by AtomicString. Avoids setting fields twice, and also preserves reference
2645         count behavior (which I changed for the other constructors, since they're entirely
2646         private and used only inside the class).
2647         (WebCore::UCharBufferTranslator::translate): Ditto.
2648
2649         * platform/text/Base64.cpp:
2650         (WebCore::base64Encode): Use Vector::grow instead of resize.
2651         (WebCore::base64Decode): Use Vector::grow and shrink instead of resize.
2652
2653         * platform/text/PlatformString.h:
2654         (WebCore::String::adopt): Added an overload for the new StringBuffer class. Also
2655         made both versions inline.
2656
2657         * platform/text/SegmentedString.h:
2658         (WebCore::SegmentedString::advancePastNewline): Added. One less branch for case
2659         where the character is known to be a newline.
2660         (WebCore::SegmentedString::advancePastNonNewline): Added. Less code for case where
2661         the character is known not to be a newline.
2662
2663         * platform/text/String.cpp:
2664         (WebCore::String::append): Use StringBuffer instead of Vector<UChar>.
2665         (WebCore::String::insert): Ditto.
2666         (WebCore::String::truncate): Ditto.
2667         (WebCore::String::remove): Ditto.
2668         (WebCore::String::format): Use Vector::grow instead of resize.
2669
2670         * platform/text/StringImpl.cpp:
2671         (WebCore::StringImpl::StringImpl): Changed constructors to start with a refCount
2672         of 1 instead of 0, and made them all inline. Eliminates the WithOneRef constructor
2673         since they all behave this way now. The only exceptions are the constructors for
2674         AtomicString, which retain the old behavior.
2675         (WebCore::StringImpl::empty): Simplified, since we no longer need to use the
2676         special WithOneRef constructor.
2677         (WebCore::StringImpl::toCoordsArray): Use StringBuffer instead of Vector<UChar>.
2678         (WebCore::StringImpl::lower): Ditto.
2679         (WebCore::StringImpl::upper): Ditto.
2680         (WebCore::StringImpl::secure): Ditto.
2681         (WebCore::StringImpl::foldCase): Ditto.
2682         (WebCore::StringImpl::simplifyWhiteSpace): Ditto. Also change to use Vector::shrink
2683         instead of resize (since half of the function uses Vector<UChar>).
2684         (WebCore::StringImpl::capitalize): Use StringBuffer instead of Vector<UChar>.
2685         (WebCore::StringImpl::replace): Ditto.
2686         (WebCore::StringImpl::ascii): Streamlined a bit.
2687         (WebCore::StringImpl::createStrippingNullCharacters): Use StringBuffer insetad of
2688         Vector<UChar>. Took out checks for null characters and 0 length that aren't needed.
2689         Coded the check for null characters in a slightly more efficient way. Since this
2690         is so hot, didn't call adopt at all, putting the code right in here, including
2691         the call to the StringImpl constructor and adoptRef (for the fast case).
2692         (WebCore::StringImpl::adopt): Added a version for the new StringBuffer class.
2693         Removed the attempt to resize the buffer at the time we adopt based on measuring
2694         actual use and realizing that it's just a character here or there and not worth
2695         a call to fastRealloc. Changed to use adoptRef since the constructor now starts
2696         with a refCount of 1.
2697         (WebCore::StringImpl::create): Changed to use adoptRef since the constructor now
2698         starts with a refCount of 1.
2699         (WebCore::StringImpl::createWithTerminatingNullCharacter): Ditto.
2700         (WebCore::StringImpl::copy): Ditto. Also made non-inline since the constructor
2701         itself is now inline.
2702
2703         * platform/text/StringImpl.h: Added a StringBuffer class that's useful for
2704         putting characters into a buffer before creating an immutable string. Not good
2705         at resizing the way Vector<UChar> is, so only useful for things that rarely need
2706         to be resized. Added a new AdoptBuffer constructor and empty constructor, but
2707         made all constructors private so they can be inlined and only used inside the
2708         StringImpl class. Added two new constructors for AtomicString. Made copy()
2709         no longer inline. Changed the type of the [] operator to unsigned instead of
2710         int and added an assertion. Made the hash functions inline.
2711
2712         * platform/text/TextCodecICU.cpp:
2713         (WebCore::TextCodecICU::encode): Use Vector::grow instead of resize.
2714
2715         * platform/text/TextCodecLatin1.cpp:
2716         (WebCore::TextCodecLatin1::decode): Use StringBuffer instead of Vector<UChar>.
2717         (WebCore::encodeComplexWindowsLatin1): Use Vector::grow instead of resize.
2718
2719         * platform/text/TextCodecUTF16.cpp:
2720         (WebCore::TextCodecUTF16::decode): Use StringBuffer instead of Vector<UChar>.
2721
2722         * platform/text/TextCodecUserDefined.cpp:
2723         (WebCore::TextCodecUserDefined::decode): Use StringBuffer instead of Vector<UChar>.
2724         (WebCore::encodeComplexUserDefined): Use Vector::grow instead of resize.
2725
2726         * platform/text/TextEncoding.cpp:
2727         (WebCore::TextEncoding::encode): Use Vector::grow instead of resize.
2728
2729         * platform/text/TextStream.cpp:
2730         (WebCore::TextStream::operator<<): Use Vector::grow instead of resize.
2731
2732         * platform/text/mac/TextCodecMac.cpp:
2733         (WebCore::TextCodecMac::encode): Use Vector::grow instead of resize.
2734
2735         * rendering/AutoTableLayout.cpp:
2736         (WebCore::AutoTableLayout::insertSpanCell): Use Vector::grow instead of resize.
2737
2738         * rendering/RenderFrameSet.h:
2739         (WebCore::FrameEdgeInfo::FrameEdgeInfo): Allocate vectors with the correct initial
2740         size instead of calling resize on them after allocating empty.
2741
2742         * rendering/RenderListMarker.cpp:
2743         (WebCore::RenderListMarker::paint): Use Vector::grow instead of resize.
2744
2745         * rendering/RenderStyle.cpp: Removed CursorList::operator==.
2746         * rendering/RenderStyle.h:
2747         (WebCore::CursorList::operator==): Implemented using the Vector ==.
2748         (WebCore::CursorList::operator!=): Ditto.
2749
2750         * rendering/RenderTable.cpp:
2751         (WebCore::RenderTable::splitColumn): Use Vector::grow instead of resize.
2752         (WebCore::RenderTable::appendColumn): Ditto.
2753
2754         * rendering/RenderTableSection.cpp:
2755         (WebCore::RenderTableSection::ensureRows): Use Vector::grow instead of resize.
2756
2757         * rendering/bidi.cpp:
2758         (WebCore::addMidpoint): Use Vector::grow instead of resize.
2759
2760         * xml/XPathNodeSet.h:
2761         (WebCore::XPath::NodeSet::clear): Use Vector::shrink instead of resize.
2762
2763 2008-01-13  Steve Falkenburg  <sfalken@apple.com>
2764
2765         Share common files across projects.
2766         
2767         Unify vsprops files
2768         Debug:          common.vsprops, debug.vsprops
2769         Debug_Internal: common.vsprops, debug.vsprops, debug_internal.vsprops
2770         Release:        common.vsprops, release.vsprops
2771         
2772         Shared properties can go into common.vsprops, shared debug settings can go into debug.vsprops.
2773         debug_internal.vsprops will be mostly empty except for file path prefix modifiers.
2774
2775         Pull auto-version.sh, VERSION, and PRODUCTVERSION from tools.
2776
2777         Reviewed by Adam Roben.
2778
2779         * WebCore.vcproj/PRODUCTVERSION: Removed.
2780         * WebCore.vcproj/QTMovieWin.vcproj:
2781         * WebCore.vcproj/VERSION: Removed.
2782         * WebCore.vcproj/WebCore.vcproj:
2783         * WebCore.vcproj/auto-version.sh: Removed.
2784         * WebCore.vcproj/debug.vsprops: Removed.
2785         * WebCore.vcproj/debug_internal.vsprops: Removed.
2786         * WebCore.vcproj/release.vsprops: Removed.
2787
2788 2008-01-13  Dan Bernstein  <mitz@apple.com>
2789
2790         Reviewed by Darin Adler.
2791
2792         - fix http://bugs.webkit.org/show_bug.cgi?id=16865
2793           fast/layers/resize-layer-deletion-crash.html crashes under GuardMalloc
2794
2795         * rendering/RenderBox.cpp:
2796         (WebCore::RenderBox::destroy): Removed the call to
2797         RenderLayer::destroy() from here, because ~RenderLayer() calls
2798         RenderObject() methods.
2799         * rendering/RenderObject.cpp:
2800         (WebCore::RenderObject::destroy): Added the call to
2801         RenderLayer::destroy() here.
2802
2803 2008-01-13  Eric Seidel  <eric@webkit.org>
2804
2805         Reviewed by darin.
2806
2807         Range.insertNode does not update endContainer endIndex correctly
2808         in the case where it had to split a text node.
2809         http://bugs.webkit.org/show_bug.cgi?id=16765
2810         
2811         Darin pointed out during review that we still don't handle the dynamic
2812         range case (where the dom tree changes not using range methods)
2813         Thus this code will get ripped out when we add that.  The test cases
2814         are still valid and useful however, so I'm landing this as-is.
2815
2816         Tests: fast/dom/Range/range-insertNode-separate-endContainer.html
2817                fast/dom/Range/range-insertNode-splittext.html
2818
2819         * dom/Range.cpp:
2820         (WebCore::Range::insertNode): handle the splitText case correctly.
2821
2822 2008-01-13  Darin Adler  <darin@apple.com>
2823
2824         Reviewed by Eric.
2825
2826         - http://bugs.webkit.org/show_bug.cgi?id=16861
2827           get rid of unnecessary string copying
2828
2829         * dom/Document.cpp:
2830         (WebCore::Document::setDomain): Removed unneeded call to copy.
2831         (WebCore::Document::parseQualifiedName): Removed unneeded call to copy, and
2832         unneeded length argument to substring, which stops at the end of the string
2833         if you don't specify a length.
2834         (WebCore::Document::createAttributeNS): Replaced code that was calling copy
2835         with more-efficient code using the substring function.
2836         * dom/StyledElement.cpp:
2837         (WebCore::StyledElement::addCSSColor): Removed unneeded call to copy.
2838         * editing/InsertIntoTextNodeCommand.cpp:
2839         (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand): Removed
2840         unneeded copy and also initialized text instead of assigning to it.
2841         (WebCore::InsertIntoTextNodeCommand::doApply): Removed redundant assertions.
2842         (WebCore::InsertIntoTextNodeCommand::doUnapply): Ditto.
2843
2844         * editing/htmlediting.cpp:
2845         (WebCore::stringWithRebalancedWhitespace): Removed unneeded call to copy.
2846         This one was particularly bad since we just turned around and copied it again!
2847
2848         * editing/markup.cpp:
2849         (WebCore::stringValueForRange): Removed unneeded call to copy.
2850
2851         * loader/icon/IconDatabase.cpp:
2852         (WebCore::IconDatabase::performOpenInitialization): Changed logging code to not
2853         get the path from the database object. This was the only reason the database
2854         had to keep its path around.
2855
2856         * platform/sql/SQLiteDatabase.cpp:
2857         (WebCore::SQLiteDatabase::open): Use a local variable instead of a data member to
2858         convert the string to a null-terminated one.
2859         (WebCore::SQLiteDatabase::close): Removed the code to clear out m_path.
2860         * platform/sql/SQLiteDatabase.h: Removed the m_path data member and the path
2861         functio member. Also tweaked formatting and comments a bit. Removed the unused
2862         escapeSQLString function.
2863
2864         * platform/text/String.cpp: (WebCore::operator+): Removed uneeded calls to copy.
2865
2866 2008-01-13  Oliver Hunt  <oliver@apple.com>
2867
2868         Attempt to fix QT build
2869
2870         * html/CanvasRenderingContext2D.cpp:
2871         (WebCore::CanvasRenderingContext2D::willDraw):
2872
2873 2008-01-13  Oliver Hunt  <oliver@apple.com>
2874
2875         Reviewed by Mark Rowe.
2876
2877         Avoid repainting the entire canvas element when possible.
2878
2879         http://bugs.webkit.org/show_bug.cgi?id=16859
2880
2881         We now only register the dirty regions of a canvas for repainting, rather
2882         than the entire element (though repaint coalescing may choose to combine
2883         these regions).  This doesn't cause a measurable regression in the worst
2884         case (clearing the canvas repeatedly), but is a moderate-large win if only
2885         a minor update has occurred.  If there is any CSS scaling applied to the
2886         canvas almost any update short of clearing the entire element is substantially
2887         faster.
2888
2889         * html/CanvasRenderingContext2D.cpp:
2890         (WebCore::CanvasRenderingContext2D::willDraw):
2891         * html/HTMLCanvasElement.cpp:
2892         (WebCore::HTMLCanvasElement::willDraw):
2893
2894 2008-01-13  Michael Goddard  <michael.goddard@trolltech.com>
2895
2896         Reviewed by Anders Carlsson.
2897
2898         Move RuntimeObjectImp creations into Instance.
2899         Make the ctor protected, and Instance a friend class, so
2900         that all creation of RuntimeObjectImps goes through
2901         one place.
2902
2903         * bindings/js/kjs_dom.cpp:
2904         (WebCore::getRuntimeObject):
2905
2906 2008-01-12  Rodney Dawes  <dobey@wayofthemonkey.com>
2907
2908         Gtk debug build fix.  Reviewed by Mark Rowe.
2909
2910         Add plugin logging channel, and use it rather than Win32-specific debugging methods _RPTF1 _RPTF2 and _CRT_WARN.
2911
2912         * WebCore.pro: Add plugins directory to DEPENDPATH so dependencies are correctly tracked.
2913         * platform/Logging.cpp:
2914         * platform/Logging.h:
2915         * plugins/PluginDebug.h:
2916
2917 2008-01-12  Adam Barth  <hk9565@gmail.com>
2918
2919         Reviewed by Maciej (and also tweaked a little bit).
2920
2921         - more thorough fix for some crashing tests
2922           http://bugs.webkit.org/show_bug.cgi?id=16782
2923
2924         * loader/FrameLoader.cpp:
2925         (WebCore::FrameLoader::urlSelected):
2926         (WebCore::FrameLoader::submitForm):
2927         (WebCore::FrameLoader::executeIfJavaScriptURL):
2928         * loader/FrameLoader.h:
2929
2930 2008-01-12  Maciej Stachowiak  <mjs@apple.com>
2931
2932         Reviewed by Sam.
2933
2934         - fixed <rdar://problem/5556374> REGRESSION: cross-domain error when one URL uses an explicit port number and another doesn't
2935         
2936         * platform/SecurityOrigin.cpp:
2937         (WebCore::isDefaultPortForProtocol):
2938         (WebCore::SecurityOrigin::SecurityOrigin):
2939
2940 2008-01-11  Geoffrey Garen  <ggaren@apple.com>
2941
2942         Reviewed by Oliver Hunt.
2943         
2944         Fixed <rdar://problem/5665251> REGRESSION (r28880-r28886): Global
2945         variable access (16644)
2946         
2947         Removed the ReadOnly bit from some properties, to match Firefox. Also
2948         removed status-related setters, to allow using their names as variable
2949         names.
2950         
2951         * bindings/scripts/CodeGeneratorJS.pm: Added support for properties that
2952         are one-way across domain boundaries, to match Firefox.
2953
2954         * bindings/js/kjs_window.cpp: Changed ReadOnly declarations to match FF.
2955
2956         * bindings/scripts/CodeGeneratorJS.pm: Don't use JSObject:: because
2957         we don't know that JSObject is our base class.
2958
2959         * page/DOMWindow.idl: Replaced lots of readonly declarations with
2960         [Replaceable] declarations.
2961
2962         * page/DOMWindow.h: Removed interfaces for setting status text via the
2963         DOM. (They were getting in the way of, e.g., "var status"
2964         declarations.) By default, IE 7 and FF disable these interfaces in order
2965         to defend against phishing attacks that try to spoof domain names in the
2966         statusbar.
2967         * page/DOMWindow.cpp:
2968
2969 2008-01-11  Anyang Ren  <anyang.ren@gmail.com>
2970
2971         Reviewed by Darin Adler.
2972
2973         http://bugs.webkit.org/show_bug.cgi?id=15960
2974         The view source mode should skip an empty attribute value only if
2975         the attribute name is not followed by an equal sign (=).
2976
2977         Test: fast/frames/viewsource-empty-attribute-value.html
2978
2979         * html/HTMLViewSourceDocument.cpp:
2980         (WebCore::HTMLViewSourceDocument::addViewSourceToken):
2981
2982 2008-01-11  Sylvain Pasche  <sylvain.pasche@gmail.com>
2983
2984         Reviewed by Alp Toker.
2985
2986         [Gtk] Uneven glyph spacing with subpixel antialiasing
2987         http://bugs.webkit.org/show_bug.cgi?id=16715
2988
2989         Use cairo font options from the default GDK screen when creating a
2990         scaled font.
2991
2992         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
2993         (WebCore::FontPlatformData::FontPlatformData):
2994
2995 2008-01-11  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
2996
2997         Reviewed by Maciej.
2998
2999         Added a new forwarding header, because Activation.h has been separated
3000         from function.h
3001
3002         * ForwardingHeaders/kjs/Activation.h: Added.
3003
3004 2008-01-11  Luca Bruno  <lethalman88@gmail.com>
3005
3006         Reviewed by Alp Toker.
3007
3008         http://bugs.webkit.org/show_bug.cgi?id=16729
3009         [cURL] Allow multiple files for upload
3010
3011         * platform/network/ResourceHandleInternal.h:
3012         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
3013         * platform/network/curl/ResourceHandleCurl.cpp:
3014         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
3015         * platform/network/curl/ResourceHandleManager.cpp:
3016         (WebCore::readCallback): added
3017         (WebCore::ResourceHandleManager::setupPOST): setup for streaming the POST
3018         (WebCore::ResourceHandleManager::startJob):
3019         (WebCore::ResourceHandleManager::cancel): revert the previous patch for regression
3020         * platform/network/curl/ResourceHandleManager.h:
3021
3022 2008-01-11  Christian Dywan  <christian@imendio.com>
3023
3024         Reviewed by Alp Toker.
3025
3026         [Gtk] Menu items need underscores
3027         http://bugs.webkit.org/show_bug.cgi?id=16817
3028
3029         Add underscores to appropriate menu labels.
3030         Also adjust strings slightly.
3031
3032         * platform/gtk/ContextMenuItemGtk.cpp:
3033         (WebCore::ContextMenuItem::createNativeMenuItem):
3034         * platform/gtk/LocalizedStringsGtk.cpp:
3035         (WebCore::searchableIndexIntroduction):
3036         (WebCore::fileButtonChooseFileLabel):
3037         (WebCore::fileButtonNoFileSelectedLabel):
3038         (WebCore::contextMenuItemTagOpenLinkInNewWindow):
3039         (WebCore::contextMenuItemTagDownloadLinkToDisk):
3040         (WebCore::contextMenuItemTagCopyLinkToClipboard):
3041         (WebCore::contextMenuItemTagOpenImageInNewWindow):
3042         (WebCore::contextMenuItemTagDownloadImageToDisk):
3043         (WebCore::contextMenuItemTagCopyImageToClipboard):
3044         (WebCore::contextMenuItemTagOpenFrameInNewWindow):
3045         (WebCore::contextMenuItemTagCopy):
3046         (WebCore::contextMenuItemTagGoBack):
3047         (WebCore::contextMenuItemTagGoForward):
3048         (WebCore::contextMenuItemTagStop):
3049         (WebCore::contextMenuItemTagReload):
3050         (WebCore::contextMenuItemTagCut):
3051         (WebCore::contextMenuItemTagPaste):
3052         (WebCore::contextMenuItemTagIgnoreSpelling):
3053         (WebCore::contextMenuItemTagLearnSpelling):
3054         (WebCore::contextMenuItemTagSearchWeb):
3055         (WebCore::contextMenuItemTagLookUpInDictionary):
3056         (WebCore::contextMenuItemTagOpenLink):
3057         (WebCore::contextMenuItemTagIgnoreGrammar):
3058         (WebCore::contextMenuItemTagSpellingMenu):
3059         (WebCore::contextMenuItemTagShowSpellingPanel):
3060         (WebCore::contextMenuItemTagCheckSpelling):
3061         (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
3062         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
3063         (WebCore::contextMenuItemTagFontMenu):
3064         (WebCore::contextMenuItemTagBold):
3065         (WebCore::contextMenuItemTagItalic):
3066         (WebCore::contextMenuItemTagUnderline):
3067         (WebCore::contextMenuItemTagOutline):
3068         (WebCore::contextMenuItemTagWritingDirectionMenu):
3069         (WebCore::contextMenuItemTagDefaultDirection):
3070         (WebCore::contextMenuItemTagLeftToRight):
3071         (WebCore::contextMenuItemTagRightToLeft):
3072         (WebCore::contextMenuItemTagInspectElement):
3073         (WebCore::searchMenuClearRecentSearchesText):
3074
3075 2008-01-11  Ada Chan  <adachan@apple.com>
3076
3077         <rdar://problem/5681557> On Windows Safari, mouse events are ignored after clicking on link that triggers download
3078         Moved the call to cache page from provisionalLoadStarted() to commitProvisionalLoad(), since 
3079         provisionalLoadStarted() can be called for cases that do not result in a page navigation, for example,
3080         when a link to download a file has been clicked.
3081
3082         Reviewed by John and Anders.
3083
3084         * loader/FrameLoader.cpp:
3085         (WebCore::FrameLoader::provisionalLoadStarted):
3086         (WebCore::FrameLoader::commitProvisionalLoad):
3087
3088 2008-01-11  Jon Honeycutt  <jhoneycutt@apple.com>
3089
3090         Reviewed by Anders.
3091
3092         <rdar://problem/5683529> plugins/embed-inside-object.html is timing
3093         out/failing
3094
3095         Revert to using FrameTree::find() so that frame aliases like "_self" and
3096         "_current" are interpreted properly
3097
3098         * plugins/win/PluginViewWin.cpp:
3099         (WebCore::PluginViewWin::performRequest):
3100         (WebCore::PluginViewWin::load):
3101
3102 2008-01-11  Alp Toker  <alp@atoker.com>
3103
3104         Reviewed by Dave Hyatt and Mark Rowe.
3105
3106         http://bugs.webkit.org/show_bug.cgi?id=16089
3107         [GTK] Support custom fonts, CachedFont::platformDataFromCustomData()
3108
3109         Add support for CSS2 @font-face custom/downloadable fonts to the GTK+
3110         port.
3111
3112         * GNUmakefile.am:
3113         * WebCore.pro:
3114         * loader/CachedFont.cpp:
3115         (WebCore::CachedFont::~CachedFont):
3116         (WebCore::CachedFont::ensureCustomFontData):
3117         (WebCore::CachedFont::platformDataFromCustomData):
3118         (WebCore::CachedFont::allReferencesRemoved):
3119         * platform/graphics/gtk/FontCustomPlatformData.cpp: Added.
3120         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
3121         (WebCore::FontCustomPlatformData::fontPlatformData):
3122         (WebCore::releaseData):
3123         (WebCore::createFontCustomPlatformData):
3124         * platform/graphics/gtk/FontCustomPlatformData.h: Added.
3125         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
3126         * platform/graphics/gtk/FontPlatformData.h:
3127         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
3128         (WebCore::FontPlatformData::FontPlatformData):
3129         (WebCore::FontPlatformData::init):
3130         (WebCore::FontPlatformData::isFixedPitch):
3131         * platform/graphics/gtk/SimpleFontDataGtk.cpp:
3132         (WebCore::SimpleFontData::platformDestroy):
3133
3134 2008-01-11  Adam Roben  <aroben@apple.com>
3135
3136         Remove FrameLoader::committedFirstRealDocumentLoad
3137         
3138         This method no longer has any callers.
3139
3140         Reviewed by Hyatt.
3141
3142         * loader/FrameLoader.h:
3143
3144 2008-01-11  Antti Koivisto  <antti@apple.com>
3145
3146         Add a standalone version of the blog post video player as a manual test.
3147
3148         * manual-tests/resources/touch-poster.png: Added.
3149         * manual-tests/video-player.html: Added.
3150
3151 2008-01-10  Antti Koivisto  <antti@apple.com>
3152
3153         Reviewed by Adam.
3154
3155         Fix <rdar://problem/5682767>
3156         Video does not show up in http://webkit.org/blog/140/html5-media-support/ on Windows
3157         
3158         Take care that GWorld is created and deletes when needed as size or visibility changes.
3159
3160         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
3161         (WebCore::MediaPlayerPrivate::load):
3162         * platform/graphics/win/QTMovieWin.cpp:
3163         (QTMovieWinPrivate::QTMovieWinPrivate):
3164         (QTMovieWinPrivate::updateGWorld):
3165         (QTMovieWinPrivate::setSize):
3166         (QTMovieWin::setVisible):
3167         (QTMovieWin::initializeQuickTime):
3168
3169 2008-01-11  David Hyatt  <hyatt@apple.com>
3170
3171         Fix for bug 11188, setting hspace on a table overrides align=center.  Fix align=center to be done using
3172         mapped attributes so that it does not get overridden by hspace all the time.
3173
3174         Reviewed by mitz
3175
3176         Added fast/table/table-hspace-align-center.html
3177
3178         * css/html4.css:
3179         * html/HTMLTableElement.cpp:
3180         (WebCore::HTMLTableElement::parseMappedAttribute):
3181
3182 2008-01-11  Mark Rowe  <mrowe@apple.com>
3183
3184         Qt build fix.
3185
3186         * platform/qt/TemporaryLinkStubs.cpp: Include CString.h.
3187
3188 2008-01-11  Mark Rowe  <mrowe@apple.com>
3189
3190         Qt build fix.  Add link stubs for the new FileSystem.h functions introduced
3191         in r29399.
3192
3193         * platform/qt/TemporaryLinkStubs.cpp:
3194         (WebCore::openTemporaryFile):
3195
3196 2008-01-11  Rodney Dawes  <dobey@wayofthemonkey.com>
3197
3198         Reviewed by Anders Carlsson.
3199
3200         Bug 16779: Make the PluginStream implementation be shared across platforms
3201         http://bugs.webkit.org/show_bug.cgi?id=16779
3202
3203         Add the new shared PluginStream files to the GTK+ and Win32 builds.
3204         Add PluginStreamClient class for the streamDidFinishLoading method.
3205         Add open/close/write methods to FileSystem for temporary file handling.
3206         Add PluginDebug.h and npfunctions.h for shared PluginStream.
3207         Add shared PluginStream.
3208         Remove PluginStreamWin.
3209         Update PluginViewWin to use shared PluginStream and PluginStreamClass.
3210
3211         * GNUmakefile.am:
3212         * WebCore.pro:
3213         * WebCore.vcproj/WebCore.vcproj:
3214         * platform/FileSystem.h:
3215         * platform/gtk/FileSystemGtk.cpp:
3216         * platform/win/FileSystemWin.cpp:
3217         * plugins/PluginDebug.h:
3218         * plugins/PluginStream.cpp:
3219         * plugins/PluginStream.h:
3220         * plugins/npfunctions.h:
3221         * plugins/win/PluginDebug: Moved to PluginDebug.h.
3222         * plugins/win/PluginStreamWin.cpp: Moved to PluginStream.cpp.
3223         * plugins/win/PluginStreamWin.h: Moved to PluginStream.h
3224         * plugins/win/PluginViewWin.cpp:
3225         * plugins/win/PluginViewWin.h:
3226         * plugins/win/npfunctions.h: Moved to npfunctions.h
3227
3228 2008-01-11  Geoffrey Garen  <ggaren@apple.com>
3229
3230         Try to fix Mac build: Edit the right .exp file.
3231
3232         * WebCore.base.exp:
3233
3234 2008-01-11  Geoffrey Garen  <ggaren@apple.com>
3235
3236         Try to fix Qt build: don't use pthreads if they're not available.
3237
3238         * bindings/js/GCController.cpp:
3239
3240 2008-01-10  Geoffrey Garen  <ggaren@apple.com>
3241
3242         Reviewed by John Sullivan.
3243
3244         Fixed some world leak reports:
3245         * <rdar://problem/5669436> PLT complains about world leak of 1 JavaScript
3246         Interpreter after running cvs-base suite
3247
3248         * <rdar://problem/5669423> PLT complains about world leak if browser
3249         window is open when PLT starts
3250         
3251         These were both bugs in the reporting mechanism, so I took the
3252         opportunity to do some house cleaning there.
3253
3254         Stupid class, I kill you:
3255         * bridge/JavaScriptStatistics.cpp: Removed.
3256         * bridge/JavaScriptStatistics.h: Removed.
3257
3258         * bindings/js/GCController.h: Adopted the only useful features of
3259         JavaScriptStatistics, since they were GC-related.
3260         * bindings/js/GCController.cpp:
3261
3262 2008-01-10  Eric Seidel  <eric@webkit.org>
3263
3264         Reviewed by Adele.
3265
3266         No functional changes, only code cleanup.
3267
3268         * css/MediaQueryEvaluator.cpp:
3269         (WebCore::compareValue): renamed from cmpvalue
3270         (WebCore::colorMediaFeatureEval):
3271         (WebCore::device_aspect_ratioMediaFeatureEval):
3272         (WebCore::device_pixel_ratioMediaFeatureEval):
3273         (WebCore::gridMediaFeatureEval):
3274         (WebCore::device_heightMediaFeatureEval):
3275         (WebCore::device_widthMediaFeatureEval):
3276         (WebCore::heightMediaFeatureEval):
3277         (WebCore::widthMediaFeatureEval):
3278
3279 2008-01-10  Dan Bernstein  <mitz@apple.com>
3280
3281         Reviewed by Anders Carlsson.
3282
3283         - fix a crash when calling alert() from a repeating timer
3284
3285         On non-Mac platforms, the PageGroupLoadDeferrer pauses DOM timers during
3286         alert() and other similar functions, which deletes the actual
3287         DOMWindowTimer objects and replaces them with new objects when resuming.
3288
3289         * bindings/js/kjs_window.cpp:
3290         (KJS::Window::timerFired): Re-fetch the timer object from the map in
3291         case it has been deleted or replaced.
3292
3293 2008-01-10  Maciej Stachowiak  <mjs@apple.com>
3294
3295         Reviewed by Sam.
3296
3297         - remove SecurityOriginData and fold its functionality into SecurityOrigin
3298
3299         * GNUmakefile.am:
3300         * WebCore.base.exp:
3301         * WebCore.pro:
3302         * WebCore.vcproj/WebCore.vcproj:
3303         * WebCore.xcodeproj/project.pbxproj:
3304         * WebCoreSources.bkl:
3305         * bindings/js/JSDOMWindowCustom.cpp:
3306         (WebCore::JSDOMWindow::postMessage):
3307         * dom/Document.cpp:
3308         (WebCore::Document::domain):
3309         * page/Chrome.cpp:
3310         (WebCore::Chrome::requestQuotaIncreaseForNewDatabase):
3311         (WebCore::Chrome::requestQuotaIncreaseForDatabaseOperation):
3312         * page/Chrome.h:
3313         * page/ChromeClient.h:
3314         * platform/SecurityOrigin.cpp:
3315         (WebCore::SecurityOrigin::copy):
3316         (WebCore::SecurityOrigin::createFromIdentifier):
3317         (WebCore::SecurityOrigin::stringIdentifier):
3318         * platform/SecurityOrigin.h:
3319         (WebCore::SecurityOrigin::host):
3320         (WebCore::SecurityOrigin::protocol):
3321         (WebCore::SecurityOrigin::port):
3322         (WebCore::SecurityOrigin::equal):
3323         * platform/SecurityOriginData.cpp: Removed.
3324         * platform/SecurityOriginData.h: Removed.
3325         * storage/Database.cpp:
3326         (WebCore::Database::openDatabase):
3327         (WebCore::Database::Database):
3328         (WebCore::Database::securityOriginCopy):
3329         * storage/Database.h:
3330         * storage/DatabaseTracker.cpp:
3331         (WebCore::SecurityOriginHash::hash):
3332         (WebCore::SecurityOriginHash::equal):
3333         (WebCore::SecurityOriginTraits::deletedValue):
3334         (WebCore::SecurityOriginTraits::emptyValue):
3335         (WebCore::DatabaseTracker::canEstablishDatabase):
3336         (WebCore::DatabaseTracker::hasEntryForOrigin):
3337         (WebCore::DatabaseTracker::hasEntryForDatabase):
3338         (WebCore::DatabaseTracker::establishEntryForOrigin):
3339         (WebCore::DatabaseTracker::fullPathForDatabase):
3340         (WebCore::DatabaseTracker::populateOrigins):
3341         (WebCore::DatabaseTracker::origins):
3342         (WebCore::DatabaseTracker::databaseNamesForOrigin):
3343         (WebCore::DatabaseTracker::detailsForNameAndOrigin):
3344         (WebCore::DatabaseTracker::setDatabaseDetails):
3345         (WebCore::DatabaseTracker::usageForDatabase):
3346         (WebCore::DatabaseTracker::usageForOrigin):
3347         (WebCore::DatabaseTracker::quotaForOrigin):
3348         (WebCore::DatabaseTracker::setQuota):
3349         (WebCore::DatabaseTracker::addDatabase):
3350         (WebCore::DatabaseTracker::deleteAllDatabases):
3351         (WebCore::DatabaseTracker::deleteDatabasesWithOrigin):
3352         (WebCore::DatabaseTracker::deleteDatabase):
3353         (WebCore::DatabaseTracker::deleteDatabaseFile):
3354         (WebCore::notificationQueue):
3355         (WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged):
3356         (WebCore::DatabaseTracker::notifyDatabasesChanged):
3357         * storage/DatabaseTracker.h:
3358         * storage/DatabaseTrackerClient.h:
3359         * storage/SQLTransaction.cpp:
3360         (WebCore::SQLTransaction::openTransactionAndPreflight):
3361         (WebCore::SQLTransaction::runStatements):
3362         (WebCore::SQLTransaction::deliverQuotaIncreaseCallback):
3363         (WebCore::SQLTransaction::postflightAndCommit):
3364         (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback):
3365         * svg/graphics/SVGImageEmptyClients.h:
3366         (WebCore::SVGEmptyChromeClient::requestQuotaIncreaseForNewDatabase):
3367         (WebCore::SVGEmptyChromeClient::requestQuotaIncreaseForDatabaseOperation):
3368
3369 2008-01-10  Anders Carlsson  <andersca@apple.com>
3370
3371         Reviewed by Sam.
3372
3373         Use the correct frame loader load method. Using the old method would not cause a 
3374         new window to be open if the frame navigation was not allowed.
3375         
3376         * plugins/win/PluginViewWin.cpp:
3377         (WebCore::PluginViewWin::performRequest):
3378
3379 2008-01-10  Alp Toker  <alp@atoker.com>
3380
3381         SVG font build fix for GTK+/autotools.
3382
3383         * GNUmakefile.am:
3384
3385 2008-01-10  Adam Barth  <hk9565@gmail.com>
3386
3387         Reviewed by Sam Weinig and Anders Carlsson.
3388
3389         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16522
3390         <rdar://problem/5657355>
3391
3392         This patch makes two changes:
3393
3394         1) Java calls FrameLoader::load in a slightly different way than
3395            JavaScript, which previously let a malicious web site bypass the
3396            shouldAllowNavigation check.  This patch adds that check to that
3397            code path.
3398
3399         2) FrameLoader now wraps calls to m_frame->tree()->find(name) with
3400            findFrameForNavigation, which calls shouldAllowNavigation.  This
3401            treats disallowed frame navigations as if the named frame did not
3402            exist, resulting in a popup window when appropriate.
3403
3404         Tests: http/tests/security/frameNavigation/xss-DENIED-plugin-navigation.html
3405                http/tests/security/frameNavigation/xss-DENIED-targeted-link-navigation.html
3406
3407         * WebCore.base.exp:
3408         * bindings/js/kjs_window.cpp:
3409         (KJS::WindowProtoFuncOpen::callAsFunction):
3410         * loader/FrameLoader.cpp:
3411         (WebCore::FrameLoader::createWindow):
3412         (WebCore::FrameLoader::load):
3413         (WebCore::FrameLoader::post):
3414         (WebCore::FrameLoader::findFrameForNavigation):
3415         * loader/FrameLoader.h:
3416
3417 2008-01-10  John Sullivan  <sullivan@apple.com>
3418
3419         Written by Hyatt, reviewed by me
3420         
3421         - fixed <rdar://problem/5654297> Mail crashes occurs at WebCore::FontFallbackList::fontDataAt() when attempting to display 
3422           a <video> element that uses controls attribute
3423
3424         * rendering/MediaControlElements.cpp:
3425         (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement):
3426         force the render style to inherit from the media element's style; Hyatt filed 5682383 to cover cleaning
3427         up this architecture, but this one-line fix will prevent the crash in the meantime
3428
3429 2008-01-10  Ada Chan  <adachan@apple.com>
3430
3431         Fix fast/forms/input-radio-checked-tab.html
3432         Meta key is not the same as Alt key on windows.
3433
3434         Reviewed by Darin.
3435
3436         * platform/win/KeyEventWin.cpp:
3437         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
3438
3439 2008-01-10  Anders Carlsson  <andersca@apple.com>
3440
3441         Reviewed by Jon.
3442
3443         Fix an assert that would happen when a plug-in tries to load a URL while a provisional load is going.
3444         
3445         * plugins/win/PluginViewWin.cpp:
3446         (WebCore::PluginViewWin::performRequest):
3447         Move document loader check here since we don't start loading until here and a new document load could have started in the meantime.
3448         
3449         (WebCore::PluginViewWin::requestTimerFired):
3450         Don't leak the plugin requests.
3451         
3452         (WebCore::PluginViewWin::load):
3453
3454 2008-01-10  Anders Carlsson  <andersca@apple.com>
3455
3456         Reviewed by John Sullivan.
3457
3458         <rdar://problem/5455889>
3459         REGRESSION: BumperCar crashes when attempting to load a long invalid URL
3460         
3461         Make sure to call FrameLoader::receivedMainResourceError before calling
3462         FrameLoader::didFailToLoad. The call to receivedMainResourceError takes care of
3463         clearing out the provisional document loader so that we won't call the didFail
3464         ResourceLoadDelegate method twice. This also makes us call the FrameLoadDelegate method
3465         didFailPrivisionalLoad before calling the ResourceLoadDelegate method, which Safari 2.0 does.
3466         
3467         * loader/MainResourceLoader.cpp:
3468         (WebCore::MainResourceLoader::receivedError):
3469
3470 2008-01-10  Antti Koivisto  <antti@apple.com>
3471
3472         Reviewed by Adele.
3473
3474         Fix <rdar://problem/5658048>
3475         After <video> has finished playing, dragging the scroller on different location of controller starts to play movie
3476         
3477         - Move to paused state if the playback had ended and the controller is used to seek to earlier time
3478         - Pause video playback during drag so the knob does not constantly try to escape from the mouse pointer
3479
3480         * html/HTMLMediaElement.cpp:
3481         (WebCore::HTMLMediaElement::HTMLMediaElement):
3482         (WebCore::HTMLMediaElement::updateMediaPlayer):
3483         (WebCore::HTMLMediaElement::setPausedInternal):
3484         * html/HTMLMediaElement.h:
3485         * rendering/MediaControlElements.cpp:
3486         (WebCore::MediaControlTimelineElement::defaultEventHandler):
3487
3488 2008-01-10  Alexey Proskuryakov  <ap@webkit.org>
3489
3490         Reviewed by Adam Roben.
3491
3492         <rdar://problem/5667003> fast/dom/xmlhttprequest-html-response-encoding.html is failing
3493
3494         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::send): Do not disable sniffing for file://
3495         requests, as CFNetwork doesn't perform extension to MIME type mapping then.
3496
3497 2008-01-10  Adam Roben  <aroben@apple.com>
3498
3499         Fixes to allow multiple FrameViews on Windows
3500
3501         Reviewed by Hyatt.
3502
3503         * page/FrameView.cpp:
3504         (WebCore::FrameView::FrameView): Added a new constructor that takes an
3505         IntSize to specify the FrameView's initial size.
3506         (WebCore::FrameView::scheduleRelayout): Added an assertion that our
3507         Document is not in the page cache.
3508         * page/FrameView.h:
3509         * platform/gtk/WidgetGtk.cpp:
3510         (WebCore::Widget::~Widget): Add a warm, fuzzy ASSERT.
3511         * platform/qt/WidgetQt.cpp:
3512         (WebCore::Widget::~Widget): Ditto.
3513         * rendering/RenderWidget.cpp:
3514         (WebCore::RenderWidget::setWidget): Make sure to remove any existing
3515         Widget from the Widget hierarchy before deleting it. One instance
3516         where this is needed is when setWidget is called during FrameView
3517         creation on Windows.
3518
3519 2008-01-10  Alp Toker  <alp@atoker.com>
3520
3521         Include math.h to get ceilf(). Part of the SVG font GTK+ build fix.
3522
3523         * svg/SVGFontFaceElement.cpp:
3524
3525 2008-01-10  Justin Garcia  <justin.garcia@apple.com>
3526
3527         Reviewed by Alice Liu.
3528
3529         <rdar://problem/5658603> Crash in InsertNodeBefore::doUnapply() on Undo in Yahoo Mail
3530         <rdar://problem/5658709> Crash in RenderView::setSelection on Undo in Yahoo Mail
3531         
3532         Make sure we have an updated layout before we perform any editing work.
3533
3534         * editing/EditCommand.cpp:
3535         (WebCore::EditCommand::apply):
3536         (WebCore::EditCommand::unapply):
3537         (WebCore::EditCommand::reapply):
3538
3539 2008-01-10  Luca Bruno  <lethalman88@gmail.com>
3540
3541         Reviewed by Alp Toker.
3542
3543         Back out r29206 which was causing regressions in curl http job
3544         cancellation.
3545
3546         * platform/network/curl/ResourceHandleManager.cpp
3547         (ResourceHandleManager::cancel): 
3548
3549 2008-01-10  Kevin McCullough  <kmccullough@apple.com>
3550
3551         Reviewed by Darin, Sam, and Adam.
3552
3553         - <rdar://problem/5654486> REGRESSION (Safari 3.0.4-TOT): clicking on
3554         - link in gmail message displays JavaScript alert falsely complaining
3555         about pop-up blocking
3556         - When trying to open a new window, we now see if the user gesture 
3557         occurred in the global dynamic object instead of the frame since that is
3558         the only place an event can occur. 
3559
3560         * bindings/js/kjs_window.cpp: - Check the dynamic global object instead
3561         of the frame.
3562         (KJS::allowPopUp):
3563         (KJS::showModalDialog):
3564         (KJS::WindowProtoFuncOpen::callAsFunction):
3565
3566 2008-01-10  David Hyatt  <hyatt@apple.com>
3567
3568         Fix for bug 16247, visibility:hidden not honored when hit testing inline replaced elements.
3569
3570         Reviewed by adele
3571
3572         Added fast/css/visibility-hit-test.html test case.
3573
3574         * rendering/RenderBox.cpp:
3575         (WebCore::RenderBox::nodeAtPoint):
3576
3577 2008-01-10  Lars Knoll  <lars@trolltech.com>
3578
3579         Reviewed by Simon.
3580
3581         rename QWebPageHistory to QWebHistory.
3582
3583         * WebCore.pro:
3584
3585 2008-01-10  Lars Knoll  <lars@trolltech.com>
3586
3587         Reviewed by Simon.
3588
3589         fix the drawing errors that where introduced due to refactoring.
3590
3591         Correctly clip to the rectangle we want to draw in ScrollView::paint().
3592
3593         * platform/qt/ScrollViewQt.cpp:
3594         (WebCore::ScrollView::paint):
3595
3596 2008-01-10  Simon Hausmann  <hausmann@webkit.org>
3597
3598         Reviewed by Lars.
3599
3600         Temporarily disable gzip decompression in qhttp due to a bug.
3601
3602         * platform/network/qt/QNetworkReplyHandler.cpp:
3603         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
3604
3605 2008-01-10  Simon Hausmann  <hausmann@webkit.org>
3606
3607         Reviewed by Lars.
3608
3609         http://bugs.webkit.org/show_bug.cgi?id=16588
3610
3611         Added a (last) Frame argument to ResourceHandle::loadResourceSynchronously.
3612         This allows implementing the synchronous loading correctly for the Qt port where the networking
3613         backend is bound to the page.
3614
3615         * loader/FrameLoader.cpp:
3616         (WebCore::FrameLoader::loadResourceSynchronously):
3617         * platform/network/ResourceHandle.h:
3618         * platform/network/cf/ResourceHandleCFNet.cpp:
3619         * platform/network/curl/ResourceHandleCurl.cpp:
3620         * platform/network/mac/ResourceHandleMac.mm:
3621         * platform/network/qt/ResourceHandleQt.cpp:
3622         (WebCore::ResourceHandle::loadResourceSynchronously):
3623
3624 2008-01-10  Kevin Ollivier  <kevino@theolliviers.com>
3625
3626         wx build fix for changes in r29328
3627
3628         * WebCoreSources.bkl:
3629
3630 2008-01-09  Maciej Stachowiak  <mjs@apple.com>
3631
3632         Reviewed by Sam.
3633
3634         - refactor SecurityOrigin in preparation for merging with SecurityOriginData
3635
3636         * platform/SecurityOrigin.cpp:
3637         (WebCore::SecurityOrigin::SecurityOrigin):
3638         (WebCore::SecurityOrigin::create):
3639         (WebCore::SecurityOrigin::createForFrame):
3640         * platform/SecurityOrigin.h:
3641
3642 2008-01-09  Ada Chan  <adachan@apple.com>
3643
3644         Tabs with ctrl, meta, or altgraph modifier key down should not advance focus.
3645
3646         Reviewed by Darin.
3647
3648         Test: fast/forms/tabs-with-modifiers.html
3649
3650         * page/EventHandler.cpp:
3651         (WebCore::EventHandler::defaultKeyboardEventHandler):
3652         (WebCore::EventHandler::defaultTabEventHandler): bail if ctrl, meta, or altgraph key is down.  
3653         Clean up the code a bit.
3654         * page/EventHandler.h:
3655         * page/FocusController.cpp: Remove the advanceFocus() that takes in a KeyboardEvent.  It was
3656         only called in EventHandler::defaultTabEventHandler() but we have cleaned up the code there and
3657         no longer needs it.
3658         * page/FocusController.h:
3659
3660 2008-01-09  Antti Koivisto  <antti@apple.com>
3661
3662         Reviewed by Mitz.
3663
3664         Fix http://bugs.webkit.org/show_bug.cgi?id=16376
3665         <rdar://problem/5665206>
3666         <video> element fails to play frames when navigating back to page (16376)
3667         
3668         Don't make MediaPlayer visible when it is actually in page cache.
3669
3670         * rendering/RenderVideo.cpp:
3671         (WebCore::RenderVideo::updatePlayer):
3672
3673 2008-01-09  Anders Carlsson  <andersca@apple.com>
3674
3675         Reviewed by Darin.
3676
3677         <rdar://problem/5532361> 
3678         CrashTracer: 9840 crashes in Safari at com.apple.JavaScriptCore: KJS::Bindings::CInstance::~CInstance [in-charge deleting] + 35
3679         
3680         Clear the frame's plugin root objects so that they don't outlive the plugin bundle.
3681         
3682         * page/Frame.cpp:
3683         (WebCore::Frame::pageDestroyed):
3684
3685 2008-01-09  John Sullivan  <sullivan@apple.com>
3686
3687         Reviewed by Adam Roben and Anders Carlsson
3688         
3689         - fixed <rdar://problem/5469398> Repro assertion failure in context menu code due to 
3690           missing-but-expected Reload item
3691
3692         * platform/ContextMenu.cpp:
3693         (WebCore::ContextMenu::populate):
3694         use isLoadingInAPISense when deciding whether to include Stop or Reload in context
3695         menu, to match the WebKit API
3696
3697 2008-01-09  Mark Rowe  <mrowe@apple.com>
3698
3699         Fix Windows debug build for opensource developers.
3700
3701         * WebCore.vcproj/QTMovieWin.vcproj: Use the correct library suffix.
3702
3703 2007-10-01  Allan Sandfeld Jensen  <sandfeld@kde.org>
3704
3705         Reworked by Eric, Reviewed by Hyatt.
3706
3707         - fix http://bugs.webkit.org/show_bug.cgi?id=9454
3708         Add support for :lang inheritance and xml:lang support.
3709
3710         Tests: fast/selectors/lang-inheritance.html
3711                fast/selectors/lang-inheritance2.html
3712                fast/selectors/lang-vs-xml-lang.html
3713                fast/selectors/lang-vs-xml-lang-xhtml.xhtml
3714
3715         * css/CSSStyleSelector.cpp:
3716         (WebCore::CSSStyleSelector::canShareStyleWithElement): Do not share style between elements with
3717         different LANG-attribute.
3718         (WebCore::CSSStyleSelector::checkOneSelector): Change :lang() to recursively check the LANG attribute
3719         for all the elements parents and the content-language of the document.
3720         * dom/Document.cpp:
3721         (WebCore::Document::processHttpEquiv): Parse MIME Content-Language
3722         * dom/Document.h:
3723         (WebCore::Document::contentLanguage):
3724         (WebCore::Document::setContentLanguage):
3725
3726 2008-01-08  Timothy Hatcher  <timothy@apple.com>
3727
3728         Reviewed by Brady.
3729
3730         Bug 16678: Unreproducible crash in KJS::JSObject::inherits() after using Web Inspector
3731         http://bugs.webkit.org/show_bug.cgi?id=16678
3732
3733         Add a NULL check for controller before calling JSObjectSetPrivate.
3734
3735         * page/InspectorController.cpp:
3736         (WebCore::InspectorController::~InspectorController):
3737
3738 2008-01-08  Xan Lopez  <xan@gnome.org>
3739
3740         Reviewed by Alp Toker.
3741
3742         http://bugs.webkit.org/show_bug.cgi?id=15610
3743         [GTK] Text rendering using Pango
3744
3745         Use Pango to render Complex path text.
3746
3747         * platform/graphics/gtk/FontGtk.cpp:
3748         (WebCore::utf16_to_utf8):
3749         (WebCore::convertUniCharToUTF8):
3750         (WebCore::setPangoAttributes):
3751         (WebCore::Font::drawGlyphs):
3752         (WebCore::Font::drawComplexText):
3753         (WebCore::Font::floatWidthForComplexText):
3754         (WebCore::Font::offsetForPositionForComplexText):
3755
3756 2008-01-08  Timothy Hatcher  <timothy@apple.com>
3757
3758         Reviewed by Darin Adler.
3759
3760         <rdar://problem/5665860> With the web inspector displayed, a crash occurs
3761         at WebCore::Frame::document() when navigating back to previous page
3762
3763         This fixes the crash, but the inspector was totally broken with back/forward.
3764         So this also fixes back/forward navigation so the right main resource shows
3765         up in the inspector.
3766
3767         * page/InspectorController.cpp:
3768         (WebCore::addSourceToFrame): Add some null checks for the frame when
3769         getting the textEncoding. This was the crash.
3770         (WebCore::InspectorController::addScriptResource): Create a script object
3771         only if needed, and always add it by calling addResource.
3772         (WebCore::InspectorController::didCommitLoad): Check if the loader is 
3773         loading from the page cache, and clear m_mainResource. If the load is
3774         normal, then call addAndUpdateScriptResource with the main resource. 
3775         (WebCore::InspectorController::identifierForInitialRequest): If the load
3776         is from the page cache and the resource is the main resource call
3777         addAndUpdateScriptResource since didCommitLoad did not do it.
3778
3779 2008-01-08  Alp Toker  <alp@atoker.com>
3780
3781         Back out VIDEO by default in the GTK+ qmake build. The build bot
3782         doesn't have the necessary libraries installed.
3783
3784         * WebCore.pro:
3785
3786 2008-01-08  Alp Toker  <alp@atoker.com>
3787
3788         Win build fix for breakage introduced in r29328.
3789
3790         * WebCore.vcproj/WebCore.vcproj:
3791
3792 2008-01-08  Alp Toker  <alp@atoker.com>
3793
3794         Rubber-stamped by Mark Rowe.
3795
3796         Enable VIDEO by default in the GTK+ qmake build.
3797
3798         * WebCore.pro:
3799
3800 2008-01-08  Alp Toker  <alp@atoker.com>
3801
3802         GTK+ VIDEO build fix for breakage introduced in r29328.
3803
3804         Issue noticed by Ori_B.
3805
3806         * GNUmakefile.am:
3807         * WebCore.pro:
3808
3809 2008-01-08  Antti Koivisto  <antti@apple.com>
3810
3811         Reviewed by Darin.
3812         
3813         HTMLAudioElement needs generated constructor. Otherwise video instanceof HTMLAudioElement is true which is 
3814         bit strange.
3815         
3816         Renamed custom constructor JSHTMLAudioElementConstructor to JSAudioConstructor to avoid name clashes.
3817
3818         Test: media/constructors.html
3819
3820         * WebCore.xcodeproj/project.pbxproj:
3821         * bindings/js/JSAudioConstructor.cpp: Copied from WebCore/bindings/js/JSHTMLAudioElementConstructor.cpp.
3822         (WebCore::JSAudioConstructor::JSAudioConstructor):
3823         (WebCore::JSAudioConstructor::implementsConstruct):
3824         (WebCore::JSAudioConstructor::construct):
3825         * bindings/js/JSAudioConstructor.h: Copied from WebCore/bindings/js/JSHTMLAudioElementConstructor.h.
3826         * bindings/js/JSHTMLAudioElementConstructor.cpp: Removed.
3827         * bindings/js/JSHTMLAudioElementConstructor.h: Removed.
3828         * bindings/js/kjs_window.cpp:
3829         (KJS::Window::getValueProperty):
3830         * html/HTMLAudioElement.idl:
3831
3832 2008-01-08  Anders Carlsson  <andersca@apple.com>
3833
3834         Reviewed by Mitz.
3835
3836         Don't add the applet widget to the view, that's done later by RenderApplet.
3837             
3838         * loader/FrameLoader.cpp:
3839         (WebCore::FrameLoader::createJavaAppletWidget):
3840
3841 2008-01-08  Antti Koivisto  <antti@apple.com>
3842
3843         Reviewed by Weinig.
3844         
3845         Add security check for Audio constructor.
3846
3847         * bindings/js/kjs_window.cpp:
3848         (KJS::Window::getValueProperty):
3849
3850 2008-01-08  Timothy Hatcher  <timothy@apple.com>
3851
3852         Reviewed by Adam Roben.
3853
3854         <rdar://problem/5676515> List of scripts and images missing when opening Web Inspector from new window (16567)
3855
3856         InspectorController::didLoadResourceFromMemoryCache was not being called for
3857         resources that loaded from the memory cache that the FrameLoader's client
3858         has already been notified about. This fix always calls the InspectorController
3859         when loading a memory cached resource. No test possible for the Web Inspector.
3860
3861         * loader/DocLoader.cpp:
3862         (WebCore::DocLoader::checkCacheObjectStatus): Moved most of the logic to
3863         FrameLoader::loadedResourceFromMemoryCache so the InspectorController can always be notified.
3864         * loader/FrameLoader.cpp:
3865         (WebCore::FrameLoader::didTellClientAboutLoad): Renamed from didTellBridgeAboutLoad.
3866         (WebCore::FrameLoader::haveToldClientAboutLoad): Renamed from haveToldBridgeAboutLoad.
3867         (WebCore::FrameLoader::loadResourceSynchronously): Call the renamed didTellClientAboutLoad.
3868         (WebCore::FrameLoader::loadedResourceFromMemoryCache): Only takes a CachedResource now.
3869         Always call InspectorController. If the resource's sendResourceLoadCallbacks is false or
3870         didTellClientAboutLoad is true, do an early return. Otherwise call the client and call
3871         didTellClientAboutLoad.
3872         (WebCore::FrameLoader::dispatchDidLoadResourceFromMemoryCache): Removed, work now done
3873         in FrameLoader::loadedResourceFromMemoryCache.
3874         * loader/FrameLoader.h: Renamed {didTell,haveTold}BridgeAboutLoad to {didTell,haveTold}ClientAboutLoad.
3875         Made loadedResourceFromMemoryCache only take a CachedResource. Renamed m_urlsBridgeKnowsAbout to 
3876         m_urlsClientKnowsAbout.
3877         * loader/SubresourceLoader.cpp:
3878         (WebCore::SubresourceLoader::load): Call the renamed didTellClientAboutLoad.
3879
3880 2008-01-08  Dan Bernstein  <mitz@apple.com>
3881
3882         Rubber-stamped by Sam Weinig.
3883
3884         - prefix all member variables in CSSStyleSelector with m_
3885
3886         * css/CSSStyleSelector.cpp:
3887         (WebCore::CSSStyleSelector::CSSStyleSelector):
3888         (WebCore::CSSStyleSelector::init):
3889         (WebCore::CSSStyleSelector::setEncodedURL):
3890         (WebCore::CSSStyleSelector::loadDefaultStyle):
3891         (WebCore::CSSStyleSelector::matchRules):
3892         (WebCore::CSSStyleSelector::matchRulesForList):
3893         (WebCore::CSSStyleSelector::initElementAndPseudoState):
3894         (WebCore::CSSStyleSelector::initForStyleResolve):
3895         (WebCore::CSSStyleSelector::canShareStyleWithElement):
3896         (WebCore::CSSStyleSelector::locateSharedStyle):
3897         (WebCore::CSSStyleSelector::matchUARules):
3898         (WebCore::CSSStyleSelector::styleForElement):
3899         (WebCore::CSSStyleSelector::pseudoStyleForElement):
3900         (WebCore::CSSStyleSelector::updateFont):
3901         (WebCore::CSSStyleSelector::cacheBorderAndBackground):
3902         (WebCore::CSSStyleSelector::checkSelector):
3903         (WebCore::CSSStyleSelector::checkOneSelector):
3904         (WebCore::CSSStyleSelector::applyProperty):
3905         (WebCore::CSSStyleSelector::mapBackgroundImage):
3906         (WebCore::CSSStyleSelector::mapBackgroundSize):
3907         (WebCore::CSSStyleSelector::mapBackgroundXPosition):
3908         (WebCore::CSSStyleSelector::mapBackgroundYPosition):
3909         (WebCore::CSSStyleSelector::checkForTextSizeAdjust):
3910         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
3911         * css/CSSStyleSelector.h:
3912         (WebCore::CSSStyleSelector::):
3913         (WebCore::CSSRuleData::CSSRuleData):
3914         (WebCore::CSSRuleDataList::CSSRuleDataList):
3915         (WebCore::CSSRuleDataList::append):
3916         * css/SVGCSSStyleSelector.cpp:
3917         (WebCore::CSSStyleSelector::applySVGProperty):
3918         * rendering/RenderStyle.cpp:
3919         (WebCore::RenderStyle::isStyleAvailable):
3920
3921 2008-01-08  David D. Kilzer  <ddkilzer@apple.com>
3922
3923         Removed unnecessary files from Copy Bundle Resources build phase.
3924
3925         Reviewed by Sam.
3926
3927         * WebCore.xcodeproj/project.pbxproj: Files removed from build phase:
3928         DOMCoreException.idl
3929         EventException.idl
3930         MessageEvent.idl
3931         SVGAElement.idl
3932         SVGAngle.idl
3933         SVGAnimateColorElement.idl
3934         SVGAnimateElement.idl
3935         SVGAnimateTransformElement.idl
3936         SVGAnimatedAngle.idl
3937         SVGAnimatedBoolean.idl
3938         SVGAnimatedEnumeration.idl
3939         SVGAnimatedInteger.idl
3940         SVGAnimatedLength.idl
3941         SVGAnimatedLengthList.idl
3942         SVGAnimatedNumber.idl
3943         SVGAnimatedNumberList.idl
3944         SVGAnimatedPathData.idl
3945         SVGAnimatedPoints.idl
3946         SVGAnimatedPreserveAspectRatio.idl
3947         SVGAnimatedRect.idl
3948         SVGAnimatedString.idl
3949         SVGAnimatedTransformList.idl
3950         SVGAnimationElement.idl
3951         SVGCSSPropertyNames.in
3952         SVGCSSValueKeywords.in
3953         SVGCircleElement.idl
3954         SVGClipPathElement.idl
3955         SVGColor.idl
3956         SVGComponentTransferFunctionElement.idl
3957         SVGCursorElement.idl
3958         SVGDefinitionSrcElement.idl
3959         SVGDefsElement.idl
3960         SVGDescElement.idl
3961         SVGDocument.idl
3962         SVGElement.idl
3963         SVGElementInstance.idl
3964         SVGElementInstanceList.idl
3965         SVGEllipseElement.idl
3966         SVGException.idl
3967         SVGExternalResourcesRequired.idl
3968         SVGFEBlendElement.idl
3969         SVGFEColorMatrixElement.idl
3970         SVGFEComponentTransferElement.idl
3971         SVGFECompositeElement.idl
3972         SVGFEDiffuseLightingElement.idl
3973         SVGFEDisplacementMapElement.idl
3974         SVGFEDistantLightElement.idl
3975         SVGFEFloodElement.idl
3976         SVGFEFuncAElement.idl
3977         SVGFEFuncBElement.idl
3978         SVGFEFuncGElement.idl
3979         SVGFEFuncRElement.idl
3980         SVGFEGaussianBlurElement.idl
3981         SVGFEImageElement.idl
3982         SVGFEMergeElement.idl
3983         SVGFEMergeNodeElement.idl
3984         SVGFEOffsetElement.idl
3985         SVGFEPointLightElement.idl
3986         SVGFESpecularLightingElement.idl
3987         SVGFESpotLightElement.idl
3988         SVGFETileElement.idl
3989         SVGFETurbulenceElement.idl
3990         SVGFilterElement.idl
3991         SVGFilterPrimitiveStandardAttributes.idl
3992         SVGFitToViewBox.idl
3993         SVGFontElement.idl
3994         SVGFontFaceElement.idl
3995         SVGFontFaceFormatElement.idl
3996         SVGFontFaceNameElement.idl
3997         SVGFontFaceSrcElement.idl
3998         SVGFontFaceUriElement.idl
3999         SVGForeignObjectElement.idl
4000         SVGGElement.idl
4001         SVGGlyphElement.idl
4002         SVGGradientElement.idl
4003         SVGImageElement.idl
4004         SVGLangSpace.idl
4005         SVGLength.idl
4006         SVGLengthList.idl
4007         SVGLineElement.idl
4008         SVGLinearGradientElement.idl
4009         SVGLocatable.idl
4010         SVGMarkerElement.idl
4011         SVGMaskElement.idl
4012         SVGMatrix.idl
4013         SVGMetadataElement.idl
4014         SVGMissingGlyphElement.idl
4015         SVGNumber.idl
4016         SVGNumberList.idl
4017         SVGPaint.idl
4018         SVGPathElement.idl
4019         SVGPathSeg.idl
4020         SVGPathSegArcAbs.idl
4021         SVGPathSegArcRel.idl
4022         SVGPathSegClosePath.idl
4023         SVGPathSegCurvetoCubicAbs.idl
4024         SVGPathSegCurvetoCubicRel.idl
4025         SVGPathSegCurvetoCubicSmoothAbs.idl
4026         SVGPathSegCurvetoCubicSmoothRel.idl
4027         SVGPathSegCurvetoQuadraticAbs.idl
4028         SVGPathSegCurvetoQuadraticRel.idl
4029         SVGPathSegCurvetoQuadraticSmoothAbs.idl
4030         SVGPathSegCurvetoQuadraticSmoothRel.idl
4031         SVGPathSegLinetoAbs.idl
4032         SVGPathSegLinetoHorizontalAbs.idl
4033         SVGPathSegLinetoHorizontalRel.idl
4034         SVGPathSegLinetoRel.idl
4035         SVGPathSegLinetoVerticalAbs.idl
4036         SVGPathSegLinetoVerticalRel.idl
4037         SVGPathSegList.idl
4038         SVGPathSegMovetoAbs.idl
4039         SVGPathSegMovetoRel.idl
4040         SVGPatternElement.idl
4041         SVGPoint.idl
4042         SVGPointList.idl
4043         SVGPolygonElement.idl
4044         SVGPolylineElement.idl
4045         SVGPreserveAspectRatio.idl
4046         SVGRadialGradientElement.idl
4047         SVGRect.idl
4048         SVGRectElement.idl
4049         SVGRenderingIntent.idl
4050         SVGSVGElement.idl
4051         SVGScriptElement.idl
4052         SVGSetElement.idl
4053         SVGStopElement.idl
4054         SVGStringList.idl
4055         SVGStylable.idl
4056         SVGStyleElement.idl
4057         SVGSwitchElement.idl
4058         SVGSymbolElement.idl
4059         SVGTRefElement.idl
4060         SVGTSpanElement.idl
4061         SVGTests.idl
4062         SVGTextContentElement.idl
4063         SVGTextElement.idl
4064         SVGTextPathElement.idl
4065         SVGTextPositioningElement.idl
4066         SVGTitleElement.idl
4067         SVGTransform.idl
4068         SVGTransformList.idl
4069         SVGTransformable.idl
4070         SVGURIReference.idl
4071         SVGUnitTypes.idl
4072         SVGUseElement.idl
4073         SVGViewElement.idl
4074         SVGViewSpec.idl
4075         SVGZoomAndPan.idl
4076         SVGZoomEvent.idl
4077         XMLHttpRequestException.idl
4078         XPathException.idl
4079         character-sets.txt
4080         mac-encodings.txt
4081         make-charset-table.pl
4082         svgattrs.in
4083         svgtags.in
4084         xlinkattrs.in
4085
4086 2008-01-08  Luca Bruno  <lethalman88@gmail.com>
4087
4088         Reviewed by Alp Toker.
4089
4090         Support copying the selected URL to the clipboard.
4091
4092         * platform/gtk/PasteboardGtk.cpp:
4093         (WebCore::Pasteboard::writeURL): implemented
4094
4095 2008-01-08  David D. Kilzer  <ddkilzer@webkit.org>
4096
4097         Renamed CharacterData::m_str to m_data
4098
4099         Rubber-stamped by Adam again.
4100
4101         No test cases added since there is no change in behavior.
4102
4103         * dom/CDATASection.cpp:
4104         * dom/CharacterData.cpp:
4105         (WebCore::CharacterData::CharacterData):
4106         (WebCore::CharacterData::setData):
4107         (WebCore::CharacterData::substringData):
4108         (WebCore::CharacterData::appendData):
4109         (WebCore::CharacterData::insertData):
4110         (WebCore::CharacterData::deleteData):
4111         (WebCore::CharacterData::replaceData):
4112         (WebCore::CharacterData::nodeValue):
4113         (WebCore::CharacterData::containsOnlyWhitespace):
4114         (WebCore::CharacterData::dispatchModifiedEvent):
4115         (WebCore::CharacterData::checkCharDataOperation):
4116         (WebCore::CharacterData::dump):
4117         * dom/CharacterData.h:
4118         * dom/Comment.cpp:
4119         * dom/Text.cpp:
4120         (WebCore::Text::splitText):
4121         (WebCore::Text::createRenderer):
4122         (WebCore::Text::recalcStyle):
4123
4124 2008-01-08  Steve Falkenburg  <sfalken@apple.com>
4125
4126         Fix a couple of compiler warnings.
4127         
4128         Reviewed by Mitz.
4129
4130         * platform/win/ThreadingWin.cpp:
4131         * platform/win/UniscribeController.cpp: Remove unused function.
4132         (WebCore::UniscribeController::advance): Fix bogus warning about un-initialized variable.
4133
4134 2008-01-08  Adele Peterson  <adele@apple.com>
4135
4136         Reviewed by Darin.
4137
4138         Fix for <rdar://problem/5674667> fast/forms/slider-mouse-events.html is broken by media control checkin 29257
4139
4140         * rendering/RenderSlider.cpp: (WebCore::HTMLSliderThumbElement::defaultEventHandler):
4141           After fixing a bug in EventHandler to make sure events always go to the capturing node, this bug was exposed.
4142           MouseMove and MouseUp events were going to the thumb element, but not to the slider input element.  
4143           This change makes the input element the capturing node, and then the input element forwards the mouse events to the thumb element.
4144           I also added a missing call to setDefaultHandled for the mousemove event.
4145
4146 2008-01-08  Adele Peterson  <adele@apple.com>
4147
4148         Reviewed by Adam. 
4149
4150         * rendering/RenderThemeSafari.cpp: Use the SafariTheme version number to decide whether or not to
4151         paint the media controls in RenderThemeSafari.
4152
4153 2008-01-08  Oliver Hunt  <oliver@apple.com>
4154
4155         Reviewed by Adele and John.
4156
4157         Fix <rdar://problem/5652740> Crash occurs at WebCore::Widget::getView() after
4158         dragging file into window that contains web page ( http://www.econocraft.com/flood_arch.htm )
4159
4160         We hit this crash if the page reloads between DragController::dragUpdated
4161         and DragController::performDrag, meaning that m_document starts pointing to
4162         a now viewless document.  This is picked up by an assertion in performDrag
4163         which I have now replaced with an assignment given that the assertion is 
4164         invalid -- it is possible for m_document to be changed between dragUpdated
4165         performDrag
4166
4167         * page/DragController.cpp:
4168         (WebCore::DragController::performDrag):
4169
4170 2008-01-08  Alexey Proskuryakov  <ap@webkit.org>
4171
4172         Reviewed by Darin.
4173
4174         <rdar://problem/5659812> CrashTracer: 462 crashes in Safari at com.apple.WebCore:
4175         WebCore::Node::setChanged + 96
4176
4177         Test: fast/dom/cssTarget-crash.html
4178
4179         * dom/Node.cpp: (WebCore::Node::removedFromDocument):
4180         Check to see if the node being removed is currently set as the Document's cssTarget.
4181         If it is, clear the cssTarget to prevent a hanging reference to it.
4182
4183 2008-01-08  Adam Roben  <aroben@apple.com>
4184
4185         * bindings/scripts/CodeGeneratorJS.pm: Touch this so the bindings will
4186         rebuild on Windows now that the media elements are enabled.
4187
4188 2008-01-08  Adam Roben  <aroben@apple.com>
4189
4190         * svg/svgtags.in: Touch this again for the sake of the Windows bots.
4191
4192 2008-01-08  Timothy Hatcher  <timothy@apple.com>
4193
4194         Reviewed by Adam Roben.
4195
4196         Use JSRetainPtr in the Web Inspector everywhere we own a JSStringRef.
4197         Also added some #pragma marks to help find places in the file.
4198
4199         * page/InspectorController.cpp:
4200         (WebCore::callSimpleFunction): Use JSRetainPtr<JSStringRef>.
4201         And return the result of JSObjectCallAsFunction.
4202         (WebCore::search): Use JSRetainPtr<JSStringRef>.
4203         (WebCore::databaseTableNames): Ditto.
4204         (WebCore::localizedStrings): Ditto.
4205         (WebCore::InspectorController::~InspectorController): Ditto.
4206         (WebCore::InspectorController::focusNode): Ditto.
4207         (WebCore::InspectorController::windowScriptObjectAvailable): Ditto.
4208         (WebCore::InspectorController::scriptObjectReady): Ditto.
4209         (WebCore::addHeaders): Ditto.
4210         (WebCore::InspectorController::addScriptResource): Ditto.
4211         (WebCore::InspectorController::removeScriptResource): Ditto.
4212         (WebCore::InspectorController::updateScriptResourceRequest): Ditto.
4213         (WebCore::InspectorController::updateScriptResourceResponse): Ditto.
4214         (WebCore::InspectorController::updateScriptResource): Ditto.
4215         (WebCore::InspectorController::addDatabaseScriptResource): Ditto.
4216         (WebCore::InspectorController::removeDatabaseScriptResource): Ditto.
4217         (WebCore::InspectorController::addScriptConsoleMessage): Ditto.
4218
4219 2008-01-08  Dan Bernstein  <mitz@apple.com>
4220
4221         Rubber-stamped by Sam Weinig.
4222
4223         - rename FontDataBaseClass.{cpp,h} back to FontData.{cpp,h}
4224
4225         * GNUmakefile.am:
4226         * WebCore.pro:
4227         * WebCore.vcproj/WebCore.vcproj:
4228         * WebCore.xcodeproj/project.pbxproj:
4229         * WebCoreSources.bkl:
4230         * editing/Editor.cpp:
4231         * platform/graphics/FontData.cpp: Copied from WebCore/platform/graphics/FontDataBaseClass.cpp.
4232         * platform/graphics/FontData.h: Copied from WebCore/platform/graphics/FontDataBaseClass.h.
4233         * platform/graphics/FontDataBaseClass.cpp: Removed.
4234         * platform/graphics/FontDataBaseClass.h: Removed.
4235         * platform/graphics/SegmentedFontData.h:
4236         * platform/graphics/SimpleFontData.h:
4237
4238 2008-01-08  Dan Bernstein  <mitz@apple.com>
4239
4240         Fix a Wx build error.
4241
4242         * platform/graphics/wx/GlyphMapWx.cpp:
4243         (WebCore::GlyphPage::fill):
4244
4245 2008-01-08  Dan Bernstein  <mitz@apple.com>
4246
4247         Fix a Qt build error.
4248
4249         * platform/graphics/qt/SimpleFontDataQt.cpp:
4250      &nbs