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