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