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