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