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