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