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